diff options
author | Ralph Giles <giles@ghostscript.com> | 2008-11-25 20:58:06 +0100 |
---|---|---|
committer | Ralph Giles <giles@ghostscript.com> | 2008-11-25 20:58:06 +0100 |
commit | 3b0530dde8c79ac81d0e2041d3a844cf2ec6ed8e (patch) | |
tree | de9fbdc3ced9f17f18a45672a4753df446a9e5f0 /apps/pdftool.c | |
parent | d92261094b0e10b8773f594adfb886b4b8b31765 (diff) | |
download | mupdf-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.c | 3 |
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-"); |