Skip to content
Snippets Groups Projects
Commit 049f3b17 authored by Pierre Loic Garoche's avatar Pierre Loic Garoche
Browse files

Merge branch 'unstable' of https://cavale.enseeiht.fr/git/lustrec into unstable

parents 329774de 714588bf
No related branches found
No related tags found
No related merge requests found
...@@ -34,15 +34,15 @@ let record_types prog = ...@@ -34,15 +34,15 @@ let record_types prog =
(* Basic printing functions *) (* Basic printing functions *)
(* If string length of f is longer than 50 chars, we select the 20 first and (* If string length of f is longer than 50 chars, we select the 10 first and
last and put a hash in the middle *) last and put a hash in the middle *)
let print_protect fmt f = let print_protect fmt f =
fprintf str_formatter "%t" f; fprintf str_formatter "%t" f;
let s = flush_str_formatter () in let s = flush_str_formatter () in
let l = String.length s in let l = String.length s in
if l > 50 then if l > 30 then
let prefix = String.sub s 0 20 and let prefix = String.sub s 0 10 and
suffix = String.sub s (l-20) 20 in suffix = String.sub s (l-10) 10 in
let hash = Hashtbl.hash s in let hash = Hashtbl.hash s in
fprintf fmt "%s_%i_%s" prefix hash suffix fprintf fmt "%s_%i_%s" prefix hash suffix
else else
......
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