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/cm/tools/tools.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/tools/tools.sml

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

revision 644, Fri May 12 09:18:31 2000 UTC revision 645, Mon May 15 07:17:30 2000 UTC
# Line 388  Line 388 
388  end  end
389    
390  functor ToolsFn (val load_plugin : string -> bool  functor ToolsFn (val load_plugin : string -> bool
391                   val mkStdSrcPath : string -> SrcPath.t) : TOOLS = struct                   val pcmode: PathConfig.mode) : TOOLS = struct
392    
393      open PrivateTools      open PrivateTools
394      val defaultClassOf = defaultClassOf load_plugin      val defaultClassOf = defaultClassOf load_plugin
# Line 396  Line 396 
396      val say = Say.say      val say = Say.say
397      val vsay = Say.vsay      val vsay = Say.vsay
398    
399      fun mkCmdName cmdStdPath = let      fun mkCmdName cmdStdPath =
400          (* It is not enough to turn the string into a SrcPath.t          (* It is not enough to turn the string into a SrcPath.t
401           * once.  This is because if there was no anchor in the           * once.  This is because if there was no anchor in the
402           * beginning, later additions of an anchor will go unnoticed.           * beginning, later additions of an anchor will go unnoticed.
403           * This is different from how other files (ML source files)           * This is different from how other files (ML source files etc.)
404           * behave: They, once the are found to be unanchored, should           * behave: They, once the are found to be unanchored, should
405           * never become anchored later (although an existing anchor           * never become (implicitly) anchored later (although an existing
406           * is allowed to change). *)           * anchor is allowed to change). Of course, the whole issue
407          val p = mkStdSrcPath cmdStdPath           * becomes moot once there are no more implicitly anchored paths. *)
408          val n = SrcPath.osstring p          case PathConfig.configAnchor pcmode cmdStdPath of
409      in              NONE => cmdStdPath
410          (* If the resulting path is not absolute, then it cannot have            | SOME mkPath =>
411           * been anchored (configured). In this case we just use the              OS.Path.joinDirFile { dir = mkPath (), file = cmdStdPath }
          * given string as-is. *)  
         if OS.Path.isAbsolute n then n else cmdStdPath  
     end  
412    
413      fun registerStdShellCmdTool args = let      fun registerStdShellCmdTool args = let
414          val { tool, class, suffixes, cmdStdPath,          val { tool, class, suffixes, cmdStdPath,

Legend:
Removed from v.644  
changed lines
  Added in v.645

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