summaryrefslogtreecommitdiff
path: root/apps/pdfclean.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/pdfclean.c
parent322f289734b045fd2d14de0f8cef89658001be01 (diff)
downloadmupdf-e3a7b20c1d25019175718e66ed95b56a08d57807.tar.xz
Use fz_getopt & co.
Diffstat (limited to 'apps/pdfclean.c')
-rw-r--r--apps/pdfclean.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/apps/pdfclean.c b/apps/pdfclean.c
index 211c461d..f008992f 100644
--- a/apps/pdfclean.c
+++ b/apps/pdfclean.c
@@ -357,39 +357,39 @@ int main(int argc, char **argv)
int lastfree;
- while ((c = getopt(argc, argv, "d:egn:o:p:u:x")) != -1)
+ while ((c = fz_getopt(argc, argv, "d:egn:o:p:u:x")) != -1)
{
switch (c)
{
case 'p':
/* see TABLE 3.15 User access permissions */
perms = 0xfffff0c0;
- if (strchr(optarg, 'p')) /* print */
+ if (strchr(fz_optarg, 'p')) /* print */
perms |= (1 << 2) | (1 << 11);
- if (strchr(optarg, 'm')) /* modify */
+ if (strchr(fz_optarg, 'm')) /* modify */
perms |= (1 << 3) | (1 << 10);
- if (strchr(optarg, 'c')) /* copy */
+ if (strchr(fz_optarg, 'c')) /* copy */
perms |= (1 << 4) | (1 << 9);
- if (strchr(optarg, 'a')) /* annotate / forms */
+ if (strchr(fz_optarg, 'a')) /* annotate / forms */
perms |= (1 << 5) | (1 << 8);
break;
- case 'd': password = optarg; break;
+ case 'd': password = fz_optarg; break;
case 'e': doencrypt ++; break;
case 'g': dogarbage ++; break;
- case 'n': keylen = atoi(optarg); break;
- case 'o': ownerpw = optarg; break;
- case 'u': userpw = optarg; break;
+ case 'n': keylen = atoi(fz_optarg); break;
+ case 'o': ownerpw = fz_optarg; break;
+ case 'u': userpw = fz_optarg; break;
case 'x': doexpand ++; break;
default: cleanusage(); break;
}
}
- if (argc - optind < 1)
+ if (argc - fz_optind < 1)
cleanusage();
- infile = argv[optind++];
- if (argc - optind > 0)
- outfile = argv[optind++];
+ infile = argv[fz_optind++];
+ if (argc - fz_optind > 0)
+ outfile = argv[fz_optind++];
openxref(infile, password);