git.annexia.org
/
wrappi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More updates to RPC.
[wrappi.git]
/
generator-lib
/
wrappi_utils.ml
diff --git
a/generator-lib/wrappi_utils.ml
b/generator-lib/wrappi_utils.ml
index
89cc662
..
958c55e
100644
(file)
--- a/
generator-lib/wrappi_utils.ml
+++ b/
generator-lib/wrappi_utils.ml
@@
-20,6
+20,13
@@
open Printf
let failwithf fs = ksprintf failwith fs
let failwithf fs = ksprintf failwith fs
+let isspace c =
+ c = ' '
+ (* || c = '\f' *) || c = '\n' || c = '\r' || c = '\t' (* || c = '\v' *)
+
+let isalnum c =
+ (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')
+
let files_equal n1 n2 =
let cmd = sprintf "cmp -s %s %s" (Filename.quote n1) (Filename.quote n2) in
match Sys.command cmd with
let files_equal n1 n2 =
let cmd = sprintf "cmp -s %s %s" (Filename.quote n1) (Filename.quote n2) in
match Sys.command cmd with
@@
-33,3
+40,5
@@
let count_chars c str =
if c = String.unsafe_get str i then incr count
done;
!count
if c = String.unsafe_get str i then incr count
done;
!count
+
+module StringMap = Map.Make (String)