/* by Marc BARILLEY*/ /**************************/ /* _mconnectlib001.pkg */ /* */ /* needed package : none */ /* */ /**************************/ fun cutbypoints(l)= if l==nil then [nil nil] else let l -> [a nxt] in if a==': then [nil nxt] else let cutbypoints nxt -> [x y] in [a::x y];; fun isIP (l)= if l==nil then 0 else let l -> [a b] in ((a=='.) || ((a>='0) && (a<='9))) && ((b==nil) || (isIP b));; fun isPort (l)= if l==nil then 0 else let l -> [a b] in ((a>='0) && (a<='9)) && ((b==nil) || (isPort b));;