summaryrefslogtreecommitdiff
path: root/apps/pdfshow.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2009-07-03 00:53:20 +0200
committerTor Andersson <tor@ghostscript.com>2009-07-03 00:53:20 +0200
commite3a7b20c1d25019175718e66ed95b56a08d57807 (patch)
treecf50228c16148f4262af6bbb317ce24f93a6a405 /apps/pdfshow.c
parent322f289734b045fd2d14de0f8cef89658001be01 (diff)
downloadmupdf-e3a7b20c1d25019175718e66ed95b56a08d57807.tar.xz
Use fz_getopt & co.
Diffstat (limited to 'apps/pdfshow.c')
-rw-r--r--apps/pdfshow.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/pdfshow.c b/apps/pdfshow.c
index 994a885c..44d50774 100644
--- a/apps/pdfshow.c
+++ b/apps/pdfshow.c
@@ -181,11 +181,11 @@ int main(int argc, char **argv)
char *password = "";
int c;
- while ((c = getopt(argc, argv, "d:bx")) != -1)
+ while ((c = fz_getopt(argc, argv, "d:bx")) != -1)
{
switch (c)
{
- case 'd': password = optarg; break;
+ case 'd': password = fz_optarg; break;
case 'b': showbinary ++; break;
case 'x': showdecode ++; break;
default:
@@ -194,23 +194,23 @@ int main(int argc, char **argv)
}
}
- if (optind == argc)
+ if (fz_optind == argc)
showusage();
- openxref(argv[optind++], password);
+ openxref(argv[fz_optind++], password);
- if (optind == argc)
+ if (fz_optind == argc)
showtrailer();
- while (optind < argc)
+ while (fz_optind < argc)
{
- if (!strcmp(argv[optind], "trailer"))
+ if (!strcmp(argv[fz_optind], "trailer"))
showtrailer();
- else if (!strcmp(argv[optind], "xref"))
+ else if (!strcmp(argv[fz_optind], "xref"))
showxref();
else
- showobject(atoi(argv[optind]), 0);
- optind++;
+ showobject(atoi(argv[fz_optind]), 0);
+ fz_optind++;
}
closexref();