aboutsummaryrefslogtreecommitdiff
path: root/cat.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>1999-10-12 15:42:48 +0000
committerEric Andersen <andersen@codepoet.org>1999-10-12 15:42:48 +0000
commit2ce1edcf544ac675e6762c9861a6b918401ea716 (patch)
tree34245558cd448f01969679fc420de4dfd246dc13 /cat.c
parentf811e07b072600a3784a92e5a1dc8a93dac477eb (diff)
downloadbusybox-w32-2ce1edcf544ac675e6762c9861a6b918401ea716.tar.gz
busybox-w32-2ce1edcf544ac675e6762c9861a6b918401ea716.tar.bz2
busybox-w32-2ce1edcf544ac675e6762c9861a6b918401ea716.zip
Latest and greatest.
-Erik
Diffstat (limited to 'cat.c')
-rw-r--r--cat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cat.c b/cat.c
index 0f2460eb7..8718c4d02 100644
--- a/cat.c
+++ b/cat.c
@@ -29,9 +29,9 @@ extern int cat_more_main(int argc, char **argv)
29 int c; 29 int c;
30 FILE *file = stdin; 30 FILE *file = stdin;
31 31
32 if (argc < 2) { 32 if ( (argc < 2) || (**(argv+1) == '-') ) {
33 fprintf(stderr, "Usage: %s %s", *argv, cat_usage); 33 fprintf(stderr, "Usage: %s %s", *argv, cat_usage);
34 return(FALSE); 34 exit(FALSE);
35 } 35 }
36 argc--; 36 argc--;
37 argv++; 37 argv++;
@@ -40,7 +40,7 @@ extern int cat_more_main(int argc, char **argv)
40 file = fopen(*argv, "r"); 40 file = fopen(*argv, "r");
41 if (file == NULL) { 41 if (file == NULL) {
42 perror(*argv); 42 perror(*argv);
43 return(FALSE); 43 exit(FALSE);
44 } 44 }
45 while ((c = getc(file)) != EOF) 45 while ((c = getc(file)) != EOF)
46 putc(c, stdout); 46 putc(c, stdout);
@@ -50,5 +50,5 @@ extern int cat_more_main(int argc, char **argv)
50 argc--; 50 argc--;
51 argv++; 51 argv++;
52 } 52 }
53 return(TRUE); 53 exit(TRUE);
54} 54}