summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-04-09 12:00:49 +0200
committerTor Andersson <tor.andersson@artifex.com>2015-04-09 12:09:15 +0200
commitcfe7e42822a217371c412342f9aa8f0669ad8997 (patch)
treec4ecf2be046305c021e823632e34c1558438d9cb
parent1f913dcbca84e327977d633a985ad6bdb92f7804 (diff)
downloadmupdf-cfe7e42822a217371c412342f9aa8f0669ad8997.tar.xz
Add -v option to mutool and mudraw to print MuPDF version number.
-rw-r--r--source/tools/mudraw.c4
-rw-r--r--source/tools/mutool.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c
index d60101b5..39c5105c 100644
--- a/source/tools/mudraw.c
+++ b/source/tools/mudraw.c
@@ -855,7 +855,7 @@ int main(int argc, char **argv)
fz_var(doc);
- while ((c = fz_getopt(argc, argv, "po:F:R:r:w:h:fB:c:G:I:s:A:DiW:H:S:")) != -1)
+ while ((c = fz_getopt(argc, argv, "po:F:R:r:w:h:fB:c:G:I:s:A:DiW:H:S:v")) != -1)
{
switch (c)
{
@@ -891,6 +891,8 @@ int main(int argc, char **argv)
case 'A': alphabits = atoi(fz_optarg); break;
case 'D': uselist = 0; break;
case 'i': ignore_errors = 1; break;
+
+ case 'v': fprintf(stderr, "mudraw version %s\n", FZ_VERSION); return 1;
}
}
diff --git a/source/tools/mutool.c b/source/tools/mutool.c
index 868ebf28..1389b37b 100644
--- a/source/tools/mutool.c
+++ b/source/tools/mutool.c
@@ -72,6 +72,11 @@ int main(int argc, char **argv)
for (i = 0; i < nelem(tools); i++)
if (!strcmp(tools[i].name, argv[1]))
return tools[i].func(argc - 1, argv + 1);
+ if (!strcmp(argv[1], "-v"))
+ {
+ fprintf(stderr, "mutool version %s\n", FZ_VERSION);
+ return 0;
+ }
}
/* Print usage */