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 | |
parent | 099b3f5ad0a70070fd183b85aeee7d2420960f33 (diff) |
RTFX now displays version number with -v argument.
Diffstat (limited to 'src')
-rw-r--r-- | src/rtfx.1 | 8 | ||||
-rw-r--r-- | src/rtfx.cpp | 14 |
2 files changed, 19 insertions, 3 deletions
@@ -45,6 +45,8 @@ .Op Fl pw .Op Ar inrtf .Op Ar outxml +.Nm +.Fl v .Sh DESCRIPTION .Nm converts RTF files into a generic XML format. It majors on keeping meta data like style @@ -62,6 +64,10 @@ The options are as follows: Puts .Nm into 'presentation' output mode. +.It Fl v +Displays +.Nm +version number and then quits. .It Fl w Output XML is written with indents for easy reading. .It Ar inrtf @@ -71,7 +77,5 @@ The XML file to output the converted data to. If not specified writes to stdout. .El .Sh WEBSITE http://memberwebs.com/nielsen/software/rtfx/ -.Sh BUGS -Doesn't handle crummy RTF files nicely. Needs some speed improvements. .Sh AUTHOR .An Nate Nielsen Aq nielsen@memberwebs.com 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(); |