X-Git-Url: http://git.hcoop.net/hcoop/zz_old/portal.git/blobdiff_plain/3ad30cf65673b36d3adb0725693c25310b9e1040..6465acc2841419721c97a9785372710ba7093f09:/util.sml diff --git a/util.sml b/util.sml index 7da69eb..d1c7214 100644 --- a/util.sml +++ b/util.sml @@ -29,11 +29,12 @@ fun makeSet f items = fun neg (r : real) = ~r fun add (r1 : real, r2) = r1 + r2 +fun mult (r1, r2) = real r1 * r2 fun isIdent ch = Char.isLower ch orelse Char.isDigit ch orelse ch = #"-" fun validHost s = - size s > 0 andalso size s < 20 andalso List.all isIdent (String.explode s) + size s > 0 andalso size s < 40 andalso List.all isIdent (String.explode s) fun validDomain s = size s > 0 andalso size s < 100 andalso List.all validHost (String.fields (fn ch => ch = #".") s)