aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichael Schmidt <github@mschmidt.me>2015-10-14 15:07:48 +0200
committerMichael Schmidt <github@mschmidt.me>2015-10-14 15:07:48 +0200
commit60ab550a952c3d9719b2a91ec90c9b58769f6717 (patch)
tree523cf4eb5a35594b16a297b4bd7e29157f42b0fc /tools
parenta479c280441b91007c379b0b63b907926d54f930 (diff)
downloadcompcert-60ab550a952c3d9719b2a91ec90c9b58769f6717.tar.gz
compcert-60ab550a952c3d9719b2a91ec90c9b58769f6717.zip
bug 17392: remove trailing whitespace in source files
Diffstat (limited to 'tools')
-rw-r--r--tools/ndfun.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/ndfun.ml b/tools/ndfun.ml
index 4ee07e54..2b8bcb19 100644
--- a/tools/ndfun.ml
+++ b/tools/ndfun.ml
@@ -33,7 +33,7 @@ let oneline s =
let re_trim_1 = Str.regexp "^[ \t]+\\|[ \t]+$"
let re_trim_2 = Str.regexp " +"
-let trim s =
+let trim s =
Str.global_replace re_trim_2 " " (Str.global_replace re_trim_1 "" s)
(* A nicer interface to Str.match_string, with automatic trimming *)
@@ -70,7 +70,7 @@ let re_arg = Str.regexp "\\([a-z][a-z0-9_]*\\)"
let match_args args =
let n = ref 0 in
- let subst s =
+ let subst s =
incr n; sprintf "%s as zz%d" (Str.matched_group 1 s) !n in
Str.global_substitute re_arg subst args
@@ -78,7 +78,7 @@ let match_args args =
let match_temps args =
let n = ref 0 in
- let subst s =
+ let subst s =
incr n; sprintf "zz%d" !n in
Str.global_substitute re_arg subst (remove_commas args)