diff options
author | Stef Walter <stef@memberwebs.com> | 2004-09-02 16:48:05 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-09-02 16:48:05 +0000 |
commit | b2a1203e06567692c68218b2162886b595e8c571 (patch) | |
tree | cae11e835659a3a15c06a1f2580ac1a16744b26b | |
parent | ab26c497f5f4aca0f3fd14e70e939327fccae207 (diff) |
More argument fixes
-rw-r--r-- | src/rtfx.cpp | 7 |
1 files 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; } |