Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/smlnj-lib/Unix/unix-env.sml
ViewVC logotype

Diff of /sml/trunk/src/smlnj-lib/Unix/unix-env.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 966, Thu Oct 18 14:42:36 2001 UTC revision 967, Fri Oct 19 20:19:39 2001 UTC
# Line 13  Line 13 
13  structure UnixEnv : UNIX_ENV =  structure UnixEnv : UNIX_ENV =
14    struct    struct
15    
16        structure SS = Substring
17    
18      local      local
19        fun isEqual #"=" = true | isEqual _ = false        fun notEqual #"=" = false | notEqual _ = true
20          val split = SS.splitl notEqual
21        in
22        fun splitBinding s = let
23              val (a, b) = split(SS.all s)
24      in      in
25      fun splitBinding s = (case (String.fields isEqual s)              if SS.isEmpty b
26             of [a, b] => (a, b)                then (s, "")
27              | _ => (s, "")                else (SS.string a, SS.string(SS.triml 1 b))
28            (* end case *))            end
29      end      end
30    
31    (* return the value, if any, bound to the name. *)    (* return the value, if any, bound to the name. *)

Legend:
Removed from v.966  
changed lines
  Added in v.967

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0