summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--config.win32.h2
-rw-r--r--configure.in6
-rw-r--r--src/rtfx.18
-rw-r--r--src/rtfx.cpp14
5 files changed, 24 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 05500be..d2b49ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@ Version 0.9.6
- Add 'align' attribute to <para> tags for paragraph alignment
- Add 'indent' attriute to <para> tags for paragraph indent
- Now has option for pretty printing output XML
+ - Displays version with '-v' argument
Version 0.9.5
- Allow conversions on stdin and stdout
diff --git a/config.win32.h b/config.win32.h
index 5fcd53a..257a95c 100644
--- a/config.win32.h
+++ b/config.win32.h
@@ -118,7 +118,7 @@
#define STDC_HEADERS 1
/* Version number of package */
-#define VERSION "0.9.5"
+#define VERSION "0.9.5.92"
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
diff --git a/configure.in b/configure.in
index 2c776d1..a06f67f 100644
--- a/configure.in
+++ b/configure.in
@@ -35,9 +35,9 @@ dnl CONTRIBUTORS
dnl Nate Nielsen <nielsen@memberwebs.com>
dnl
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(rtfx, 0.9.5.90, nielsen@memberwebs.com)
-AM_INIT_AUTOMAKE(rtfx, 0.9.5.90)
+dnl IMPORTANT! Always update config.win32.h with new version number
+AC_INIT(rtfx, 0.9.5.92, nielsen@memberwebs.com)
+AM_INIT_AUTOMAKE(rtfx, 0.9.5.92)
LDFLAGS="$LDFLAGS -L/usr/local/lib"
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
diff --git a/src/rtfx.1 b/src/rtfx.1
index 3d234c6..7b742c6 100644
--- a/src/rtfx.1
+++ b/src/rtfx.1
@@ -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();