diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-01-12 14:20:31 +0100 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-01-12 14:20:31 +0100 |
commit | 81e91f965e7b1afbea8d1630015e75f11f0a3afd (patch) | |
tree | 270a85299f33d783e33745c917796f080f7300e1 /tools/ndfun.ml | |
parent | 3304820b870e4524c7d1f14fcd62506634f7922b (diff) | |
parent | 06841a5bb7ca27bc436e87e7991d0d05dbf5267c (diff) | |
download | compcert-81e91f965e7b1afbea8d1630015e75f11f0a3afd.tar.gz compcert-81e91f965e7b1afbea8d1630015e75f11f0a3afd.zip |
Merge branch 'master' into dwarf
Conflicts:
powerpc/PrintAsm.ml
Diffstat (limited to 'tools/ndfun.ml')
-rw-r--r-- | tools/ndfun.ml | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/tools/ndfun.ml b/tools/ndfun.ml index 78fb03d5..4ee07e54 100644 --- a/tools/ndfun.ml +++ b/tools/ndfun.ml @@ -1,3 +1,20 @@ +(* *********************************************************************) +(* *) +(* The Compcert verified compiler *) +(* *) +(* Xavier Leroy, INRIA Paris-Rocquencourt *) +(* *) +(* Copyright Institut National de Recherche en Informatique et en *) +(* Automatique. All rights reserved. This file is distributed *) +(* under the terms of the GNU General Public License as published by *) +(* the Free Software Foundation, either version 2 of the License, or *) +(* (at your option) any later version. This file is also distributed *) +(* under the terms of the INRIA Non-Commercial License Agreement. *) +(* *) +(* *********************************************************************) + +(* Preprocessor for .vp files *) + open Printf (* Error reporting *) @@ -9,11 +26,7 @@ let error file line msg = (* Replace newlines with spaces *) let oneline s = - let t = String.create (String.length s) in - for i = 0 to String.length s - 1 do - t.[i] <- (match s.[i] with '\n' -> ' ' | c -> c) - done; - t + String.map (function '\n' -> ' ' | c -> c) s (* Trim leading and terminating spaces, and compress multiple spaces *) |