7
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
8
*/
9
9
10
+ #ifdef HAVE_CONFIG_H
11
+ #include " config.h"
12
+ #endif
13
+
10
14
#include < stdio.h>
11
15
#include < string.h>
12
16
#include < librevenge-stream/librevenge-stream.h>
13
17
#include < librevenge-generators/librevenge-generators.h>
14
18
#include < librevenge/librevenge.h>
15
19
#include < libvisio/libvisio.h>
16
20
21
+ #ifndef PACKAGE
22
+ #define PACKAGE " libvisio"
23
+ #endif
24
+ #ifndef VERSION
25
+ #define VERSION " UNKNOWN VERSION"
26
+ #endif
27
+
17
28
namespace
18
29
{
19
30
20
31
int printUsage ()
21
32
{
22
- printf (" Usage: vsd2raw [OPTION] <Visio Document File>\n " );
33
+ printf (" `vsd2raw' is used to test import of Microsoft Visio documents in " PACKAGE " .\n " );
34
+ printf (" \n " );
35
+ printf (" Usage: vsd2raw [OPTION] INPUT\n " );
23
36
printf (" \n " );
24
37
printf (" Options:\n " );
25
- printf (" --callgraph Display the call graph nesting level\n " );
26
- printf (" --help Shows this help message\n " );
38
+ printf (" \t --callgraph display the call graph nesting level\n " );
39
+ printf (" \t --help show this help message\n " );
40
+ printf (" \t --version show version information\n " );
41
+ printf (" \n " );
42
+ printf (" Report bugs to <https://bugs.documentfoundation.org/>.\n " );
27
43
return -1 ;
28
44
}
29
45
46
+ int printVersion ()
47
+ {
48
+ printf (" vsd2raw " VERSION " \n " );
49
+ return 0 ;
50
+ }
51
+
30
52
} // anonymous namespace
31
53
32
54
int main (int argc, char *argv[])
@@ -41,6 +63,8 @@ int main(int argc, char *argv[])
41
63
{
42
64
if (!strcmp (argv[i], " --callgraph" ))
43
65
printIndentLevel = true ;
66
+ else if (!strcmp (argv[i], " --version" ))
67
+ return printVersion ();
44
68
else if (!file && strncmp (argv[i], " --" , 2 ))
45
69
file = argv[i];
46
70
else
0 commit comments