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/Controls/registry.sml
ViewVC logotype

Diff of /sml/trunk/src/smlnj-lib/Controls/registry.sml

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

revision 1197, Fri May 17 18:04:19 2002 UTC revision 1199, Fri May 17 19:25:31 2002 UTC
# Line 103  Line 103 
103            end            end
104    
105      datatype registry_tree = RTree of {      datatype registry_tree = RTree of {
106            path : string list,
107          help : string,          help : string,
108          ctls : string Controls.control list,          ctls : string Controls.control list,
109          subregs : registry_tree list          subregs : registry_tree list
# Line 120  Line 121 
121                    | SOME obs => (fn (x as SubReg{obscurity, ...}, l) =>                    | SOME obs => (fn (x as SubReg{obscurity, ...}, l) =>
122                        if (obscurity < obs) then x::l else l)                        if (obscurity < obs) then x::l else l)
123                  (* end case *))                  (* end case *))
124            fun getTree (root as Reg{help, ctls, qRegs, uRegs, ...}) = let            fun getTree (path, root as Reg{help, ctls, qRegs, uRegs, ...}) = let
125                  val subregs =                  val subregs =
126                        List.foldl gather (ATbl.fold gather [] qRegs) (!uRegs)                        List.foldl gather (ATbl.fold gather [] qRegs) (!uRegs)
127                  val subregs = sortSubregs subregs                  val subregs = sortSubregs subregs
128                  fun getReg (SubReg{reg, ...}) = getTree reg                  fun getReg (SubReg{reg, ...}) = getTree (path, reg)
129                    fun getRegi (prefix, SubReg{reg, ...}) =
130                          getTree(prefix::path, reg)
131                  in                  in
132                    RTree{                    RTree{
133                          path = List.rev path,
134                        help = help,                        help = help,
135                        ctls = List.map #ctl (case obs                        ctls = List.map #ctl (case obs
136                           of NONE => ControlSet.listControls ctls                           of NONE => ControlSet.listControls ctls
# Line 136  Line 140 
140                      }                      }
141                  end                  end
142            in            in
143              getTree root              getTree ([], root)
144            end            end
145    
146    end    end

Legend:
Removed from v.1197  
changed lines
  Added in v.1199

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