diff options
author | Bernie Innocenti <bernie@codewiz.org> | 2010-05-03 21:53:47 (GMT) |
---|---|---|
committer | Bernie Innocenti <bernie@codewiz.org> | 2010-05-03 21:53:47 (GMT) |
commit | 1030dc837b10a03a02a85d5504cbeec168ce49e2 (patch) | |
tree | 698eefa87ac437deaf36a4141b326f8ce7986692 /tools/wintounix.c |
Import XaoS r489 (trunk after version 3.5)
Diffstat (limited to 'tools/wintounix.c')
-rw-r--r-- | tools/wintounix.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/wintounix.c b/tools/wintounix.c new file mode 100644 index 0000000..8e6a3a0 --- /dev/null +++ b/tools/wintounix.c @@ -0,0 +1,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); +} |