summaryrefslogtreecommitdiff
path: root/apps/pdftool.c
diff options
context:
space:
mode:
authorRalph Giles <giles@ghostscript.com>2008-11-25 20:58:06 +0100
committerRalph Giles <giles@ghostscript.com>2008-11-25 20:58:06 +0100
commit3b0530dde8c79ac81d0e2041d3a844cf2ec6ed8e (patch)
treede9fbdc3ced9f17f18a45672a4753df446a9e5f0 /apps/pdftool.c
parentd92261094b0e10b8773f594adfb886b4b8b31765 (diff)
downloadmupdf-3b0530dde8c79ac81d0e2041d3a844cf2ec6ed8e.tar.xz
Recognize .PDF as an extension in mupdftool draw.
Currently the implementation of 'mupdftool draw' looks for a .pdf file extension to distinguish filename arguments from page range arguments. Prior to this patch 'mupdftool draw FILE.PDF' would print the usage since no filename was recognized. This commit adds the upcase version. Really, something more robust should be used, like looking for valid page ranges, and testing arguments for existance in the filesystem.
Diffstat (limited to 'apps/pdftool.c')
-rw-r--r--apps/pdftool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/pdftool.c b/apps/pdftool.c
index 5908148b..9534141f 100644
--- a/apps/pdftool.c
+++ b/apps/pdftool.c
@@ -859,7 +859,8 @@ drawmain(int argc, char **argv)
state = NO_FILE_OPENED;
while (optind < argc)
{
- if (strstr(argv[optind], ".pdf"))
+ if (strstr(argv[optind], ".pdf") ||
+ strstr(argv[optind], ".PDF"))
{
if (state == NO_PAGES_DRAWN)
drawpages("1-");