diff options
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(); |