Skip to content
Snippets Groups Projects
Commit a27ac524 authored by François Bobot's avatar François Bobot
Browse files

Support 32bit by removing large integer constant

parent 1c160bfe
No related branches found
No related tags found
1 merge request!24Release helpers
Pipeline #46202 passed
## Release 0.3.3
* Bump cmdliner version
* Bump OCaml version
* Remove some warnings in 4.14
* Fix OUnit2 dependency
* Support 32bit by removing large integer constant
## Release 0.3.2
* Add missing dependencies
......
......@@ -195,13 +195,12 @@ let print_limit_last_effort : _ Arg.printer =
let size_string f =
let n = int_of_float f in
let aux n div = (n / div, n mod div) in
let n_tera, n = aux n 1_000_000_000_000 in
let n_giga, n = aux n 1_000_000_000 in
let n_mega, n = aux n 1_000_000 in
let n_kilo, n = aux n 1_000 in
let print_aux s n = if n <> 0 then string_of_int n ^ s else "" in
print_aux "To" n_tera ^ print_aux "Go" n_giga ^ print_aux "Mo" n_mega
^ print_aux "ko" n_kilo ^ print_aux "" n
print_aux "Go" n_giga ^ print_aux "Mo" n_mega ^ print_aux "ko" n_kilo
^ print_aux "" n
let print_size fmt f = Format.fprintf fmt "%s" (size_string f)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment