summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-06-16 11:47:38 +0100
committerRobin Watts <robin.watts@artifex.com>2017-06-16 11:53:05 +0100
commitc87adf950ad83fc9737cf22d91943e0fc21352fd (patch)
tree568193f4ebc536bfc01db44a5e61f68530195513 /platform/x11
parenta1857dfdc5d4b7988b19e59092dc5a80794569d4 (diff)
downloadmupdf-c87adf950ad83fc9737cf22d91943e0fc21352fd.tar.xz
Windows MuPDF viewer; add ability to start on a given page.
Same mechanism as the x11 version: mupdf.exe in.pdf 10
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/win_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/x11/win_main.c b/platform/x11/win_main.c
index 860c6dbc..67efdb9d 100644
--- a/platform/x11/win_main.c
+++ b/platform/x11/win_main.c
@@ -1280,7 +1280,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow
if (fz_optind < argc)
{
- strcpy(filename, argv[fz_optind]);
+ strcpy(filename, argv[fz_optind++]);
}
else
{
@@ -1291,6 +1291,9 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow
winerror(&gapp, "cannot convert filename to utf-8");
}
+ if (fz_optind < argc)
+ gapp.pageno = atoi(argv[fz_optind++]);
+
if (bps)
pdfapp_open_progressive(&gapp, filename, 0, bps);
else