mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2024-12-28 01:30:30 +01:00
Adds -collate-n
This commit is contained in:
parent
c1013ea7fe
commit
8279a06ec0
@ -3,8 +3,8 @@ let demo = false
|
|||||||
let agpl = true
|
let agpl = true
|
||||||
let major_version = 2
|
let major_version = 2
|
||||||
let minor_version = 7
|
let minor_version = 7
|
||||||
let minor_minor_version = 2
|
let minor_minor_version = 3
|
||||||
let version_date = "(19th November 2024)"
|
let version_date = "(devel, 3rd December 2024)"
|
||||||
|
|
||||||
open Pdfutil
|
open Pdfutil
|
||||||
open Pdfio
|
open Pdfio
|
||||||
@ -3587,9 +3587,17 @@ let collate n (names, pdfs, ranges) =
|
|||||||
(fun ({contents = (name, pdf, range)} as r) ->
|
(fun ({contents = (name, pdf, range)} as r) ->
|
||||||
match range with
|
match range with
|
||||||
| [] -> ()
|
| [] -> ()
|
||||||
| h::t ->
|
| l ->
|
||||||
nis := (name, pdf, [h])::!nis;
|
if length l > n then
|
||||||
r := (name, pdf, t))
|
begin
|
||||||
|
nis := (name, pdf, take l n)::!nis;
|
||||||
|
r := (name, pdf, drop l n)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
nis := (name, pdf, l)::!nis;
|
||||||
|
r := (name, pdf, [])
|
||||||
|
end)
|
||||||
ois
|
ois
|
||||||
done;
|
done;
|
||||||
split3 (rev !nis)
|
split3 (rev !nis)
|
||||||
|
Loading…
Reference in New Issue
Block a user