diff src/cjr_print.sml @ 764:7f653298dd66

C FFI compiler options
author Adam Chlipala <adamc@hcoop.net>
date Thu, 30 Apr 2009 17:15:14 -0400
parents 67cd8326f743
children a28982de5645
line wrap: on
line diff
--- a/src/cjr_print.sml	Thu Apr 30 16:25:27 2009 -0400
+++ b/src/cjr_print.sml	Thu Apr 30 17:15:14 2009 -0400
@@ -1250,8 +1250,6 @@
         urlify' IS.empty 0 t
     end
 
-val timeout = ref 0
-
 fun p_exp' par env (e, loc) =
     case e of
         EPrim p => Prim.p_t_GCC p
@@ -2832,7 +2830,7 @@
                                     string (case side of
                                                 ServerOnly => ""
                                               | _ => "<script src=\\\""
-                                                     ^ OS.Path.joinDirFile {dir = !Monoize.urlPrefix,
+                                                     ^ OS.Path.joinDirFile {dir = Settings.getUrlPrefix (),
                                                                             file = "app.js"}
                                                      ^ "\\\"></script>\\n"),
                                     string "\");",
@@ -2844,7 +2842,7 @@
                                     string ");",
                                     newline,
                                     string "uw_set_url_prefix(ctx, \"",
-                                    string (!Monoize.urlPrefix),
+                                    string (Settings.getUrlPrefix ()),
                                     string "\");",
                                     newline]),
                      string "uw_set_needs_sig(ctx, ",
@@ -3185,6 +3183,10 @@
              else
                  box [],
              newline,
+             p_list_sep (box []) (fn s => box [string "#include \"",
+                                               string s,
+                                               string "\"",
+                                               newline]) (Settings.getHeaders ()),
              string "#include \"",
              string (OS.Path.joinDirFile {dir = Config.includ,
                                           file = "urweb.h"}),
@@ -3198,7 +3200,7 @@
              string ";",
              newline,
              string "int uw_timeout = ",
-             string (Int.toString (!timeout)),
+             string (Int.toString (Settings.getTimeout ())),
              string ";",
              newline,
              newline,