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 /smlnj-lib/branches/rt-transition/Unix/unix-env.sml
ViewVC logotype

Diff of /smlnj-lib/branches/rt-transition/Unix/unix-env.sml

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

revision 2980, Sat Apr 12 15:01:15 2008 UTC revision 2981, Sat Apr 12 15:56:39 2008 UTC
# Line 74  Line 74 
74            end            end
75    
76    (* return the user's environment *)    (* return the user's environment *)
77    (* Workaround for new runtime until we have the Posix APIs implemented *)
78        local
79          fun :+: (v, l) = (case OS.Process.getEnv v
80                 of NONE => l
81                  | SOME d => concat[v, "=", d] :: l
82                (* end case *))
83          infixr :+:
84        in
85        fun environ () = (
86              "HOSTNAME" :+: "SHELL" :+: "DISPLAY" :+: "EDITOR" :+: "ENV"
87                  :+: "PWD" :+: "TERM" :+: "USER" :+: "PATH" :+: [])
88        end
89    (*
90      val environ = Posix.ProcEnv.environ      val environ = Posix.ProcEnv.environ
91    *)
92    
93    (* return the binding of an environment variable in the    (* return the binding of an environment variable in the
94     * user's environment.     * user's environment.

Legend:
Removed from v.2980  
changed lines
  Added in v.2981

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