diff options
-rw-r--r-- | src/conv/raw/vsd2raw.cpp | 30 | ||||
-rw-r--r-- | src/conv/raw/vss2raw.cpp | 30 | ||||
-rw-r--r-- | src/conv/svg/vsd2xhtml.cpp | 27 | ||||
-rw-r--r-- | src/conv/svg/vss2xhtml.cpp | 27 | ||||
-rw-r--r-- | src/conv/text/vsd2text.cpp | 27 | ||||
-rw-r--r-- | src/conv/text/vss2text.cpp | 27 |
6 files changed, 150 insertions, 18 deletions
diff --git a/src/conv/raw/vsd2raw.cpp b/src/conv/raw/vsd2raw.cpp index 518c84a..b9ffde9 100644 --- a/src/conv/raw/vsd2raw.cpp +++ b/src/conv/raw/vsd2raw.cpp @@ -7,6 +7,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdio.h> #include <string.h> #include <librevenge-stream/librevenge-stream.h> @@ -14,19 +18,37 @@ #include <librevenge/librevenge.h> #include <libvisio/libvisio.h> +#ifndef PACKAGE +#define PACKAGE "libvisio" +#endif +#ifndef VERSION +#define VERSION "UNKNOWN VERSION" +#endif + namespace { int printUsage() { - printf("Usage: vsd2raw [OPTION] <Visio Document File>\n"); + printf("`vsd2raw' is used to test import of Microsoft Visio documents in " PACKAGE ".\n"); + printf("\n"); + printf("Usage: vsd2raw [OPTION] INPUT\n"); printf("\n"); printf("Options:\n"); - printf("--callgraph Display the call graph nesting level\n"); - printf("--help Shows this help message\n"); + printf("\t--callgraph display the call graph nesting level\n"); + printf("\t--help show this help message\n"); + printf("\t--version show version information\n"); + printf("\n"); + printf("Report bugs to <https://bugs.documentfoundation.org/>.\n"); return -1; } +int printVersion() +{ + printf("vsd2raw " VERSION "\n"); + return 0; +} + } // anonymous namespace int main(int argc, char *argv[]) @@ -41,6 +63,8 @@ int main(int argc, char *argv[]) { if (!strcmp(argv[i], "--callgraph")) printIndentLevel = true; + else if (!strcmp(argv[i], "--version")) + return printVersion(); else if (!file && strncmp(argv[i], "--", 2)) file = argv[i]; else diff --git a/src/conv/raw/vss2raw.cpp b/src/conv/raw/vss2raw.cpp index 0555579..4af8e3c 100644 --- a/src/conv/raw/vss2raw.cpp +++ b/src/conv/raw/vss2raw.cpp @@ -7,6 +7,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdio.h> #include <string.h> #include <librevenge-stream/librevenge-stream.h> @@ -14,19 +18,37 @@ #include <librevenge/librevenge.h> #include <libvisio/libvisio.h> +#ifndef PACKAGE +#define PACKAGE "libvisio" +#endif +#ifndef VERSION +#define VERSION "UNKNOWN VERSION" +#endif + namespace { int printUsage() { - printf("Usage: vsd2raw [OPTION] <Visio Stencils File>\n"); + printf("`vss2raw' is used to test import of Microsoft Visio stencils in " PACKAGE ".\n"); + printf("\n"); + printf("Usage: vss2raw [OPTION] INPUT\n"); printf("\n"); printf("Options:\n"); - printf("--callgraph Display the call graph nesting level\n"); - printf("--help Shows this help message\n"); + printf("\t--callgraph display the call graph nesting level\n"); + printf("\t--help show this help message\n"); + printf("\t--version show version information\n"); + printf("\n"); + printf("Report bugs to <https://bugs.documentfoundation.org/>.\n"); return -1; } +int printVersion() +{ + printf("vss2raw " VERSION "\n"); + return 0; +} + } // anonymous namespace int main(int argc, char *argv[]) @@ -41,6 +63,8 @@ int main(int argc, char *argv[]) { if (!strcmp(argv[i], "--callgraph")) printIndentLevel = true; + else if (!strcmp(argv[i], "--version")) + return printVersion(); else if (!file && strncmp(argv[i], "--", 2)) file = argv[i]; else diff --git a/src/conv/svg/vsd2xhtml.cpp b/src/conv/svg/vsd2xhtml.cpp index 8bab9e7..cc91c85 100644 --- a/src/conv/svg/vsd2xhtml.cpp +++ b/src/conv/svg/vsd2xhtml.cpp @@ -7,6 +7,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <iostream> #include <sstream> #include <stdio.h> @@ -16,18 +20,33 @@ #include <librevenge/librevenge.h> #include <libvisio/libvisio.h> +#ifndef VERSION +#define VERSION "UNKNOWN VERSION" +#endif + namespace { int printUsage() { - printf("Usage: vsd2xhtml [OPTION] <Visio Document>\n"); + printf("`vsd2xhtml' converts Microsoft Visio documents to SVG.\n"); + printf("\n"); + printf("Usage: vsd2xhtml [OPTION] INPUT\n"); printf("\n"); printf("Options:\n"); - printf("--help Shows this help message\n"); + printf("\t--help show this help message\n"); + printf("\t--version show version information\n"); + printf("\n"); + printf("Report bugs to <https://bugs.documentfoundation.org/>.\n"); return -1; } +int printVersion() +{ + printf("vsd2xhtml " VERSION "\n"); + return 0; +} + } // anonymous namespace int main(int argc, char *argv[]) @@ -39,7 +58,9 @@ int main(int argc, char *argv[]) for (int i = 1; i < argc; i++) { - if (!file && strncmp(argv[i], "--", 2)) + if (!strcmp(argv[i], "--version")) + return printVersion(); + else if (!file && strncmp(argv[i], "--", 2)) file = argv[i]; else return printUsage(); diff --git a/src/conv/svg/vss2xhtml.cpp b/src/conv/svg/vss2xhtml.cpp index 84693cd..f466988 100644 --- a/src/conv/svg/vss2xhtml.cpp +++ b/src/conv/svg/vss2xhtml.cpp @@ -7,6 +7,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <iostream> #include <sstream> #include <stdio.h> @@ -16,18 +20,33 @@ #include <librevenge/librevenge.h> #include <libvisio/libvisio.h> +#ifndef VERSION +#define VERSION "UNKNOWN VERSION" +#endif + namespace { int printUsage() { - printf("Usage: vss2xhtml [OPTION] <Visio Stencils File>\n"); + printf("`vss2xhtml' converts Microsoft Visio stencils to SVG.\n"); + printf("\n"); + printf("Usage: vss2xhtml [OPTION] INPUT\n"); printf("\n"); printf("Options:\n"); - printf("--help Shows this help message\n"); + printf("\t--help show this help message\n"); + printf("\t--version show version information\n"); + printf("\n"); + printf("Report bugs to <https://bugs.documentfoundation.org/>.\n"); return -1; } +int printVersion() +{ + printf("vss2xhtml " VERSION "\n"); + return 0; +} + } // anonymous namespace int main(int argc, char *argv[]) @@ -39,7 +58,9 @@ int main(int argc, char *argv[]) for (int i = 1; i < argc; i++) { - if (!file && strncmp(argv[i], "--", 2)) + if (!strcmp(argv[i], "--version")) + return printVersion(); + else if (!file && strncmp(argv[i], "--", 2)) file = argv[i]; else return printUsage(); diff --git a/src/conv/text/vsd2text.cpp b/src/conv/text/vsd2text.cpp index 59b7580..e5fe090 100644 --- a/src/conv/text/vsd2text.cpp +++ b/src/conv/text/vsd2text.cpp @@ -7,6 +7,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdio.h> #include <string.h> @@ -15,18 +19,33 @@ #include <librevenge/librevenge.h> #include <libvisio/libvisio.h> +#ifndef VERSION +#define VERSION "UNKNOWN VERSION" +#endif + namespace { int printUsage() { - printf("Usage: vsd2text [OPTION] <Visio Document File>\n"); + printf("`vsd2text' converts Microsoft Visio documents to plain text.\n"); + printf("\n"); + printf("Usage: vsd2text [OPTION] INPUT\n"); printf("\n"); printf("Options:\n"); - printf("--help Shows this help message\n"); + printf("\t--help show this help message\n"); + printf("\t--version show version information\n"); + printf("\n"); + printf("Report bugs to <https://bugs.documentfoundation.org/>.\n"); return -1; } +int printVersion() +{ + printf("vsd2text " VERSION "\n"); + return 0; +} + } // anonymous namespace int main(int argc, char *argv[]) @@ -38,7 +57,9 @@ int main(int argc, char *argv[]) for (int i = 1; i < argc; i++) { - if (!file && strncmp(argv[i], "--", 2)) + if (!strcmp(argv[i], "--version")) + return printVersion(); + else if (!file && strncmp(argv[i], "--", 2)) file = argv[i]; else return printUsage(); diff --git a/src/conv/text/vss2text.cpp b/src/conv/text/vss2text.cpp index 76c921d..dd8148e 100644 --- a/src/conv/text/vss2text.cpp +++ b/src/conv/text/vss2text.cpp @@ -7,6 +7,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdio.h> #include <string.h> @@ -15,18 +19,33 @@ #include <librevenge/librevenge.h> #include <libvisio/libvisio.h> +#ifndef VERSION +#define VERSION "UNKNOWN VERSION" +#endif + namespace { int printUsage() { - printf("Usage: vss2text [OPTION] <Visio Stencils File>\n"); + printf("`vss2text' converts Microsoft Visio stencils to plain text.\n"); + printf("\n"); + printf("Usage: vss2text [OPTION] INPUT\n"); printf("\n"); printf("Options:\n"); - printf("--help Shows this help message\n"); + printf("\t--help show this help message\n"); + printf("\t--version show version information\n"); + printf("\n"); + printf("Report bugs to <https://bugs.documentfoundation.org/>.\n"); return -1; } +int printVersion() +{ + printf("vss2text " VERSION "\n"); + return 0; +} + } // anonymous namespace int main(int argc, char *argv[]) @@ -38,7 +57,9 @@ int main(int argc, char *argv[]) for (int i = 1; i < argc; i++) { - if (!file && strncmp(argv[i], "--", 2)) + if (!strcmp(argv[i], "--version")) + return printVersion(); + else if (!file && strncmp(argv[i], "--", 2)) file = argv[i]; else return printUsage(); |