mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2024-12-27 09:13:04 +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 major_version = 2
|
||||
let minor_version = 7
|
||||
let minor_minor_version = 2
|
||||
let version_date = "(19th November 2024)"
|
||||
let minor_minor_version = 3
|
||||
let version_date = "(devel, 3rd December 2024)"
|
||||
|
||||
open Pdfutil
|
||||
open Pdfio
|
||||
@ -3587,9 +3587,17 @@ let collate n (names, pdfs, ranges) =
|
||||
(fun ({contents = (name, pdf, range)} as r) ->
|
||||
match range with
|
||||
| [] -> ()
|
||||
| h::t ->
|
||||
nis := (name, pdf, [h])::!nis;
|
||||
r := (name, pdf, t))
|
||||
| l ->
|
||||
if length l > n then
|
||||
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
|
||||
done;
|
||||
split3 (rev !nis)
|
||||
|
Loading…
Reference in New Issue
Block a user