Tidying MaxSplit output

This commit is contained in:
John Whitington 2023-10-26 16:51:54 +01:00
parent f12d62abc4
commit 33eb99fe39
1 changed files with 5 additions and 5 deletions

View File

@ -3176,7 +3176,7 @@ let rec split_max_search pdf s b p q =
if p = q then if p = q then
if split_max_fits pdf s b q then q else -1 if split_max_fits pdf s b q then q else -1
else else
let half = ((q + p) / 2) in let half = (q + p) / 2 in
if split_max_fits pdf s b (half + 1) if split_max_fits pdf s b (half + 1)
then split_max_search pdf s b (half + 1) q then split_max_search pdf s b (half + 1) q
else split_max_search pdf s b p half else split_max_search pdf s b p half
@ -3191,7 +3191,7 @@ let rec split_max enc original_filename ~squeeze output_spec s pdf =
let newq = split_max_search pdf s !p !p !q in let newq = split_max_search pdf s !p !p !q in
if newq = -1 then (Printf.eprintf "Failed to make small enough split at page %i\n" !p; exit 2) else if newq = -1 then (Printf.eprintf "Failed to make small enough split at page %i\n" !p; exit 2) else
begin begin
(*Printf.printf "Found a suitable interval (%i, %i)\n%!" !p newq;*) Printf.printf "Pages %i-%i will fit...\n%!" !p newq;
outs := ilist !p newq::!outs; outs := ilist !p newq::!outs;
p := newq + 1; p := newq + 1;
q := endpage q := endpage