src/Tools/Metis/src/PortableMosml.sml
changeset 39353 7f11d833d65b
parent 25430 372d6749f00e
parent 39349 2d0a4361c3ef
child 39429 126b879df319
--- a/src/Tools/Metis/src/PortableMosml.sml	Mon Sep 13 16:44:20 2010 +0200
+++ b/src/Tools/Metis/src/PortableMosml.sml	Mon Sep 13 21:24:10 2010 +0200
@@ -1,6 +1,6 @@
 (* ========================================================================= *)
 (* MOSCOW ML SPECIFIC FUNCTIONS                                              *)
-(* Copyright (c) 2002-2004 Joe Hurd, distributed under the BSD License *)
+(* Copyright (c) 2002 Joe Hurd, distributed under the BSD License            *)
 (* ========================================================================= *)
 
 structure Portable :> Portable =
@@ -29,12 +29,6 @@
 val time = Mosml.time;
 
 (* ------------------------------------------------------------------------- *)
-(* Critical section markup (multiprocessing)                                 *)
-(* ------------------------------------------------------------------------- *)
-
-fun CRITICAL e = e ();     (*dummy*)
-
-(* ------------------------------------------------------------------------- *)
 (* Generating random values.                                                 *)
 (* ------------------------------------------------------------------------- *)
 
@@ -98,6 +92,24 @@
       modifyi f (a,0,NONE)
     end;
 
+fun OS_Process_isSuccess s = s = OS.Process.success;
+
+fun String_isSuffix p s =
+    let
+      val sizeP = size p
+      and sizeS = size s
+    in
+      sizeP <= sizeS andalso
+      String.extract (s, sizeS - sizeP, NONE) = p
+    end;
+
+fun Substring_full s =
+    let
+      open Substring
+    in
+      all s
+    end;
+
 fun TextIO_inputLine h =
     let
       open TextIO