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/paths/srcpath.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/paths/srcpath.sml

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

revision 1189, Fri May 10 20:40:33 2002 UTC revision 1190, Mon May 13 20:39:05 2002 UTC
# Line 202  Line 202 
202      val pre = pre0 o unintern      val pre = pre0 o unintern
203    
204      fun encode0 bracket (pf: prefile) = let      fun encode0 bracket (pf: prefile) = let
205          fun needesc c = not (Char.isPrint c) orelse Char.contains "/:\\$%" c          fun needesc c = not (Char.isPrint c) orelse Char.contains "/:\\$%()" c
206          fun esc c =          fun esc c =
207              "\\" ^ StringCvt.padLeft #"0" 3 (Int.toString (Char.ord c))              "\\" ^ StringCvt.padLeft #"0" 3 (Int.toString (Char.ord c))
208          fun tc c = if needesc c then esc c else String.str c          fun tc c = if needesc c then esc c else String.str c
# Line 225  Line 225 
225            | e_ac (arcs, context, ctxt, a) =            | e_ac (arcs, context, ctxt, a) =
226              let val l = map arc arcs              let val l = map arc arcs
227                  val a0 = List.hd l                  val a0 = List.hd l
228                  val l' = rev l                  val l' = map arc (rev l)
229                  val l'' = if ctxt andalso bracket then                  val l'' = if ctxt andalso bracket then
230                                concat ["(", List.hd l', ")"] :: List.tl l'                                concat ["(", List.hd l', ")"] :: List.tl l'
231                          else l'                          else l'
232                  val a' = foldl (fn (x, l) => arc x ::/:: l)                  val a' = foldl (fn (x, l) => x ::/:: l)
233                                (arc (List.hd l'') :: a) (List.tl l'')                                (List.hd l'' :: a) (List.tl l'')
234              in e_c (context, a', SOME a0)              in e_c (context, a', SOME a0)
235              end              end
236          and e_c (ROOT "", a, _) = concat ("/" :: a)          and e_c (ROOT "", a, _) = concat ("/" :: a)

Legend:
Removed from v.1189  
changed lines
  Added in v.1190

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