Commit | Line | Data |
---|---|---|
21c4e167 H |
1 | #include <stdio.h>\r |
2 | \r | |
3 | int main(int argc, char *argv[])\r | |
4 | { | |
5 | if(argc < 2) { | |
6 | printf("Usage: %s output-file < input-file\n", argv[0]); | |
7 | } | |
8 | ||
9 | FILE *outfp; | |
10 | outfp = 0; | |
11 | unsigned int c;\r | |
12 | while( (c = getchar()) != EOF ) { | |
13 | if(!outfp) outfp = fopen(argv[1], "wb"); | |
14 | putc(c, outfp);\r | |
15 | } | |
16 | fclose(outfp);\r | |
17 | return 0;\r | |
18 | }\r |