Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tools/wintounix.c
blob: 8e6a3a0d81038f26fadbcb45d0e5a88b10f4b675 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
// This C code converts from Microsoft's #13#10 formatted files to UNIX.
// See do-indent for details.
main(int argc, char *argv[])
{
    FILE *f;
    int c;
    f = fopen(argv[1], "r");
    while (!(feof(f))) {
	c = fgetc(f);
	if ((c != 0x0d) && (c != -1))
	    putchar(c);
    }
    fclose(f);
}