From a3745be835073ffc8fedf13b72d660bb829d7044 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Thu, 26 Oct 2023 17:33:10 +0100 Subject: [PATCH] MiB/MB --- cpdfcommand.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index e692068..bec15c9 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -1077,9 +1077,12 @@ let displaydoctitle b = let read_file_size s = let read_int s = int_of_string (implode (rev s)) in match rev (explode (String.uppercase_ascii s)) with - | 'B'::'G'::s -> 1024 * 1024 * 1024 * read_int s - | 'B'::'M'::s -> 1024 * 1024 * read_int s - | 'B'::'K'::s -> 1024 * read_int s + | 'B'::'I'::'G'::s -> 1024 * 1024 * 1024 * read_int s + | 'B'::'G'::s -> 1000 * 1000 * 1000 * read_int s + | 'B'::'I'::'M'::s -> 1024 * 1024 * read_int s + | 'B'::'M'::s -> 1000 * 1000 * read_int s + | 'B'::'I'::'K'::s -> 1024 * read_int s + | 'B'::'K'::s -> 1000 * read_int s | s -> read_int s let setsplitbookmarks i = setop (SplitOnBookmarks i) ()