diff options
Diffstat (limited to 'src/conv/text/sw6022text.cpp')
-rw-r--r-- | src/conv/text/sw6022text.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/conv/text/sw6022text.cpp b/src/conv/text/sw6022text.cpp index abbd22a..e661be5 100644 --- a/src/conv/text/sw6022text.cpp +++ b/src/conv/text/sw6022text.cpp @@ -23,23 +23,31 @@ #define VERSION "UNKNOWN VERSION" #endif +#define TOOL "sw6022text" + namespace { int printUsage() { - printf("Usage: sw6022text [OPTION] <document>\n"); - printf("\n"); - printf("Options:\n"); - printf("--info Display document metadata instead of the text\n"); - printf("--help Shows this help message\n"); - printf("--version Output sw6022text version\n"); - return -1; + printf( + "`" TOOL "' converts Software602 documents to plain text.\n" + "\n" + "Usage: " TOOL " [OPTION] INPUT\n" + "\n" + "Options:\n" + "\t--info print document metadata instead of text\n" + "\t--help show this help message\n" + "\t--version show version information\n" + "\n" + "Report bugs to <>.\n" + ); + return 0; } int printVersion() { - printf("sw6022text %s\n", VERSION); + printf(TOOL " " VERSION "\n"); return 0; } |