*** lib.sml.~1~ 1999-10-27 10:02:45.000000000 +0200 --- lib.sml 2005-08-28 14:42:20.000000000 +0200 *************** *** 169,175 **** let fun strip (#" "::t) = strip t | strip (#"\n"::t) = strip t | strip l = l ! val revline = strip(rev(strip(explode(TextIO.inputLine infile)))) in if not(isnil revline) andalso hd revline = #"\\" then (implode(rev(strip(tl revline))))^" "^(get_line infile) else implode(rev revline) --- 169,178 ---- let fun strip (#" "::t) = strip t | strip (#"\n"::t) = strip t | strip l = l ! val line = case TextIO.inputLine infile of ! SOME x => x ! | NONE => "" ! val revline = strip(rev(strip(explode(line)))) in if not(isnil revline) andalso hd revline = #"\\" then (implode(rev(strip(tl revline))))^" "^(get_line infile) else implode(rev revline) *** topinst.sml.~1~ 1999-10-28 22:00:06.000000000 +0200 --- topinst.sml 2005-08-28 15:02:33.000000000 +0200 *************** *** 205,209 **** val toplevel = TT.toplevel fun toptest() = ! TT.cmdloop (fn _ => TextIO.inputLine TextIO.stdIn) (E.empty,E.empty,E.empty,E.empty) end --- 205,209 ---- val toplevel = TT.toplevel fun toptest() = ! TT.cmdloop (fn _ => case TextIO.inputLine TextIO.stdIn of SOME x => x | NONE => "") (E.empty,E.empty,E.empty,E.empty) end *** saveit.sml.~1~ 1999-10-28 22:27:23.000000000 +0200 --- saveit.sml 2005-08-28 15:03:20.000000000 +0200 *************** *** 1,6 **** let fun vrsn () = let val i = TextIO.openIn "Version" ! val line = TextIO.inputLine i val ver = (fn (l) => if size l > 0 andalso substring(l,(size l)-1,1) = "\n" then substring(l,0,(size l)-1) --- 1,6 ---- let fun vrsn () = let val i = TextIO.openIn "Version" ! val line = case TextIO.inputLine i of SOME x => x | NONE => "" val ver = (fn (l) => if size l > 0 andalso substring(l,(size l)-1,1) = "\n" then substring(l,0,(size l)-1) *** sources.cm.~1~ 1999-10-28 22:36:48.000000000 +0200 --- sources.cm 2005-08-28 14:40:30.000000000 +0200 *************** *** 1,4 **** --- 1,6 ---- Group is + str : suffix (sml) + $/basis.cm commands.sig commands.str cond.sig *** topcode.str.~1~ 2002-05-17 00:16:03.000000000 +0200 --- topcode.str 2005-08-28 15:01:51.000000000 +0200 *************** *** 159,165 **** val version = ref "Development version" fun read_line() = ! let val line = TextIO.inputLine TextIO.stdIn fun scan_line nil = nil | scan_line ([#"\n"]) = nil | scan_line (hd::rst) = hd::(scan_line rst) --- 159,167 ---- val version = ref "Development version" fun read_line() = ! let val line = case TextIO.inputLine TextIO.stdIn of ! SOME x => x ! | NONE => "" fun scan_line nil = nil | scan_line ([#"\n"]) = nil | scan_line (hd::rst) = hd::(scan_line rst) *************** *** 1555,1561 **** | Cmd.Input(file) => let fun rfile file old = let val s = TextIO.openIn(file) ! val e' = cmdloop (fn _ => TextIO.inputLine s) env in (TextIO.closeIn s; Flags.interactive := old; --- 1557,1563 ---- | Cmd.Input(file) => let fun rfile file old = let val s = TextIO.openIn(file) ! val e' = cmdloop (fn _ => case TextIO.inputLine s of SOME x => x | NONE => "") env in (TextIO.closeIn s; Flags.interactive := old; *************** *** 1657,1663 **** val rt0 = Timer.startRealTimer() val env' = cmdhandle(cmd,env) handle (Quit e) => e val rt = Timer.checkRealTimer(rt0) ! val {usr=usrtime,sys=systime,gc=gctime} = Timer.checkCPUTimer(start) val ohead = Lib.timediff(rt, (Lib.fold Time.+ [usrtime,systime] gctime)) val _ = Flags.interactive := oldi --- 1659,1670 ---- val rt0 = Timer.startRealTimer() val env' = cmdhandle(cmd,env) handle (Quit e) => e val rt = Timer.checkRealTimer(rt0) ! val {gc,nongc} = Timer.checkCPUTimes(start) ! val (usrtime,systime,gctime) = ! (Time.+(#usr nongc,#usr gc), ! Time.+(#sys nongc,#sys gc), ! Time.+(#usr gc, #sys gc)) ! (* val {usr=usrtime,sys=systime,gc=gctime} = Timer.checkCPUTimer(start) *) val ohead = Lib.timediff(rt, (Lib.fold Time.+ [usrtime,systime] gctime)) val _ = Flags.interactive := oldi *************** *** 1728,1734 **** Flags.interactive := true; print ("\n The Mobility Workbench\n"^ " ("^vrsn^")\n\n"); ! cmdloop (fn _ => TextIO.inputLine TextIO.stdIn) (E.empty,E.empty,E.empty,E.empty); O.cleartbls(); A.cleartbls(); Fsem.cleartbls(); FA.cleartbls(); (* This is documented as bool->bool, so arg shd b om here *) (* SMLofNJ.Internals.GC.messages om; *) --- 1735,1741 ---- Flags.interactive := true; print ("\n The Mobility Workbench\n"^ " ("^vrsn^")\n\n"); ! cmdloop (fn _ => case TextIO.inputLine TextIO.stdIn of SOME x => x | NONE => "") (E.empty,E.empty,E.empty,E.empty); O.cleartbls(); A.cleartbls(); Fsem.cleartbls(); FA.cleartbls(); (* This is documented as bool->bool, so arg shd b om here *) (* SMLofNJ.Internals.GC.messages om; *)