From 380296a4fa76253c754bcb13594cc0f198be3359 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Thu, 26 Sep 2019 13:30:22 +0100 Subject: [PATCH] more --- cpdfcommand.ml | 10 +++++----- cpdfcoord.ml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index cf85ff6..bbd6885 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -2,8 +2,8 @@ let demo = false let noncomp = false let major_version = 2 -let minor_version = 3 -let version_date = "(build of 13th September 2019)" +let minor_version = 4 +let version_date = "(devel build of 26th September 2019)" open Pdfutil open Pdfio @@ -735,12 +735,12 @@ let output_page_count pdf = Printf.printf "%i\n" (Pdfpage.endpage pdf) let detect_duplicate_op op = - if args.op <> None then - begin + match args.op with + None | Some Shift -> () + | _ -> Printf.eprintf "Operation %s already specified, so cannot specify operation %s.\nUse AND from Chapter 1 of the manual to chain commands together.\n" (string_of_op (unopt args.op)) (string_of_op op); exit 1 - end let setop op () = detect_duplicate_op op; diff --git a/cpdfcoord.ml b/cpdfcoord.ml index 7054be2..c59d1ae 100644 --- a/cpdfcoord.ml +++ b/cpdfcoord.ml @@ -69,11 +69,11 @@ let make_num pdf page unt num = | Pdfgenlex.LexName (( "PW" | "PH" | "CW" | "CH" | "PMINX" | "PMINY" | "PMAXX" | "PMAXY" | "CMINX" | "CMINY" | "CMAXX" | "CMAXY") as page_characteristic) -> - let r = + (*let r =*) find_page_characteristic pdf page page_characteristic - in + (*in Printf.printf "characteristic %s is %f\n" page_characteristic r; - r + r*) | _ -> failwith "make_num" in match unt with @@ -178,7 +178,7 @@ and parse_units pdf page numbers = function let r = find_page_characteristic pdf page page_characteristic in - Printf.printf "characteristic %s is %f\n" page_characteristic r; + (* Printf.printf "characteristic %s is %f\n" page_characteristic r;*) parse_units pdf page (r::numbers) more | Pdfgenlex.LexName ("add" | "sub" | "mul" | "div") as op:: ((Pdfgenlex.LexInt _ | Pdfgenlex.LexReal _ | Pdfgenlex.LexName @@ -233,7 +233,7 @@ let parse_coordinate pdf s = try match parse_units_string pdf emptypage s with | [dx; dy] -> - Printf.printf "result = %f, %f\n" dx dy; + (*Printf.printf "result = %f, %f\n" dx dy;*) dx, dy | _ -> error ("Bad coordinate specification " ^ s) with