diff options
author | Stef Walter <stef@memberwebs.com> | 2005-06-08 16:23:14 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2005-06-08 16:23:14 +0000 |
commit | 773b54cdf97a9cbad83d309c0d99f157a7b0d27e (patch) | |
tree | deb9e196048d8628168ed9ca6403ae667c85e312 /src/rtfx.cpp | |
parent | 099b3f5ad0a70070fd183b85aeee7d2420960f33 (diff) |
RTFX now displays version number with -v argument.
Diffstat (limited to 'src/rtfx.cpp')
-rw-r--r-- | src/rtfx.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/rtfx.cpp b/src/rtfx.cpp index e305959..5428148 100644 --- a/src/rtfx.cpp +++ b/src/rtfx.cpp @@ -44,15 +44,17 @@ #include "rtfparser.h" #include "xmlcomposer.h" -int usage() +void usage() { fprintf(stderr, "usage: rtfx [-pw] [inrtf] [outxml]\n"); + fprintf(stderr, " rtfx -v\n"); exit(2); } int main(int argc, char* argv[]) { XmlComposerOptions options; + bool version = false; argc--; argv++; @@ -75,6 +77,10 @@ int main(int argc, char* argv[]) options.pretty = true; break; + case 'v': + version = true; + break; + case '-': arg = NULL; break; @@ -92,6 +98,12 @@ int main(int argc, char* argv[]) argv++; } + if(version) + { + fprintf(stdout, "RTFX (version %s)\n", VERSION); + return 0; + } + if(argc > 2) usage(); |