diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pdfdraw.c | 10 | ||||
-rw-r--r-- | apps/x11_main.c | 13 |
2 files changed, 17 insertions, 6 deletions
diff --git a/apps/pdfdraw.c b/apps/pdfdraw.c index 0adceff1..f0601570 100644 --- a/apps/pdfdraw.c +++ b/apps/pdfdraw.c @@ -44,6 +44,7 @@ static void usage(void) "\t\tsupported formats: pgm, ppm, pam, png\n" "\t-p -\tpassword\n" "\t-r -\tresolution in dpi (default: 72)\n" + "\t-A\tdisable accelerated functions\n" "\t-a\tsave alpha channel (only pam and png)\n" "\t-g\trender in grayscale\n" "\t-m\tshow timing information\n" @@ -260,19 +261,19 @@ int main(int argc, char **argv) { char *password = ""; int grayscale = 0; + int accelerate = 1; pdf_xref *xref; fz_error error; int c; - fz_accelerate(); - - while ((c = fz_getopt(argc, argv, "o:p:r:agmtx5")) != -1) + while ((c = fz_getopt(argc, argv, "o:p:r:Aagmtx5")) != -1) { switch (c) { case 'o': output = fz_optarg; break; case 'p': password = fz_optarg; break; case 'r': resolution = atof(fz_optarg) / 72; break; + case 'A': accelerate = 0; break; case 'a': savealpha = 1; break; case 'm': showtime++; break; case 't': showtext++; break; @@ -286,6 +287,9 @@ int main(int argc, char **argv) if (fz_optind == argc) usage(); + if (accelerate) + fz_accelerate(); + glyphcache = fz_newglyphcache(); colorspace = pdf_devicergb; diff --git a/apps/x11_main.c b/apps/x11_main.c index 16ce9759..2582580f 100644 --- a/apps/x11_main.c +++ b/apps/x11_main.c @@ -507,7 +507,11 @@ static void onmouse(int x, int y, int btn, int modifiers, int state) static void usage(void) { - fprintf(stderr, "usage: mupdf [-p password] [-r resolution] file.pdf [page]\n"); + fprintf(stderr, "usage: mupdf [options] file.pdf [page]\n"); + fprintf(stderr, "\t-p -\tpassword\n"); + fprintf(stderr, "\t-r -\tresolution\n"); + fprintf(stderr, "\t-A\tdisable accelerated functions\n"); + fprintf(stderr, "usage: mupdf [options] file.pdf [page]\n"); exit(1); } @@ -565,14 +569,16 @@ int main(int argc, char **argv) int pageno = 1; int wasshowingpage; struct timeval tmo, tmo_at; + int accelerate = 1; int fd; - while ((c = fz_getopt(argc, argv, "p:r:")) != -1) + while ((c = fz_getopt(argc, argv, "p:r:A")) != -1) { switch (c) { case 'p': password = fz_optarg; break; case 'r': resolution = atoi(fz_optarg); break; + case 'A': accelerate = 0; break; default: usage(); } } @@ -590,7 +596,8 @@ int main(int argc, char **argv) if (argc - fz_optind == 1) pageno = atoi(argv[fz_optind++]); - fz_accelerate(); + if (accelerate) + fz_accelerate(); winopen(); |