HCoop
/
hcoop
/
domtool2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Type annotations on environment variable reads
[hcoop/domtool2.git]
/
src
/
domain.sml
diff --git
a/src/domain.sml
b/src/domain.sml
index
ed26bcd
..
b2c0c5c
100644
(file)
--- a/
src/domain.sml
+++ b/
src/domain.sml
@@
-1,5
+1,5
@@
(* HCoop Domtool (http://hcoop.sourceforge.net/)
(* HCoop Domtool (http://hcoop.sourceforge.net/)
- * Copyright (c) 2006, Adam Chlipala
+ * Copyright (c) 2006
-2007
, Adam Chlipala
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@
-114,10
+114,12
@@
val validGroup = validUser
val _ = Env.type_one "no_spaces"
Env.string
val _ = Env.type_one "no_spaces"
Env.string
- (CharVector.all (fn ch => not (Char.isSpace ch)))
+ (CharVector.all (fn ch => Char.isPrint ch andalso not (Char.isSpace ch)
+ andalso ch <> #"\"" andalso ch <> #"'"))
val _ = Env.type_one "no_newlines"
Env.string
val _ = Env.type_one "no_newlines"
Env.string
- (CharVector.all (fn ch => ch <> #"\n" andalso ch <> #"\r"))
+ (CharVector.all (fn ch => Char.isPrint ch andalso ch <> #"\n" andalso ch <> #"\r"
+ andalso ch <> #"\"" andalso ch <> #"'"))
val _ = Env.type_one "ip"
Env.string
val _ = Env.type_one "ip"
Env.string