From b2a1203e06567692c68218b2162886b595e8c571 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 2 Sep 2004 16:48:05 +0000 Subject: More argument fixes --- src/rtfx.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/rtfx.cpp b/src/rtfx.cpp index 1fb2d2c..8239b49 100644 --- a/src/rtfx.cpp +++ b/src/rtfx.cpp @@ -57,7 +57,7 @@ int main(int argc, char* argv[]) argc--; argv++; - while(argc > 1) + while(argc > 0) { char* arg = argv[0]; if(*arg != '-') @@ -88,7 +88,6 @@ int main(int argc, char* argv[]) argv++; } - if(argc > 2) usage(); @@ -101,7 +100,7 @@ int main(int argc, char* argv[]) // An input file if(argc > 0) { - file = fopen(argv[0], "rb"); + file = fopen(argv[0], "rb"); if(!file) { @@ -151,7 +150,7 @@ int main(int argc, char* argv[]) out = fopen(argv[0], "wb"); if(!out) { - fprintf(stderr, "rtfx: couldn't open file: %s: %s\n", argv[0], strerror(errno)); + fprintf(stderr, "rtfx: couldn't open output file: %s: %s\n", argv[0], strerror(errno)); return 1; } -- cgit v1.2.3