From 773b54cdf97a9cbad83d309c0d99f157a7b0d27e Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 8 Jun 2005 16:23:14 +0000 Subject: RTFX now displays version number with -v argument. --- src/rtfx.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/rtfx.cpp') 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(); -- cgit v1.2.3