Un-hard code some things
[bpt/mlt.git] / src / config.sml
index 691f714..3ddc0d7 100644 (file)
@@ -1,6 +1,6 @@
 (*
  * Dynamic web page generation with Standard ML
- * Copyright (C) 2003  Adam Chlipala
+ * Copyright (C) 2003-2004  Adam Chlipala
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -21,7 +21,7 @@
 
 structure Config :> CONFIG =
 struct
-    val defaultFile = "/etc/mlt.conf"
+    open Settings
 
     datatype config =
             CONFIG of {inPath : string, (* Directory for input sources *)
@@ -62,8 +62,8 @@ struct
 
            fun read (fields as {inPath, outPath, pubPath, lib, compiler, cm, sml, printFn, beforeT, afterT, exnT}) =
                (case TextIO.inputLine inf of
-                    "" => CONFIG fields
-                  | line =>
+                    NONE => CONFIG fields
+                  | SOME line =>
                     (case String.tokens Char.isSpace line of
                          [] => read fields
                        | ["in", inPath] => read {inPath = expandPath inPath, outPath = outPath, pubPath = pubPath,