- Merge aicom-network-fixes up to r36740
[reactos.git] / rosapps / applications / sysutils / utils / cat / cat.c
1 #include <stdlib.h>
2 #include <stdio.h>
3
4 int main(int argc, char* argv[])
5 {
6 int i;
7 FILE* in;
8 char ch;
9
10 for (i=1; i<argc; i++)
11 {
12 in = fopen(argv[i],"r");
13 if (in == NULL)
14 {
15 printf("Failed to open file %s\n", argv[i]);
16 return(0);
17 }
18
19 while ((ch = fgetc(in)) != EOF)
20 {
21 putchar(ch);
22 }
23 fclose(in);
24 }
25 return 0;
26 }