diff options
author | Adam Chlipala <adam@chlipala.net> | 2014-01-09 17:27:24 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2014-01-09 17:27:24 -0500 |
commit | 55d485365f4d52a84d06bc38d6d34b6a47890b57 (patch) | |
tree | 67ed3697d7f212b698cdc3cfc8c530c54e5fba64 /src/cjr_print.sml | |
parent | bb567cd6c1490dcabf53a3dd18f1aebd8e3055e0 (diff) |
Add 'html5' .urp directive
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r-- | src/cjr_print.sml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml index 1fc0b40f..05dce35e 100644 --- a/src/cjr_print.sml +++ b/src/cjr_print.sml @@ -3083,7 +3083,11 @@ fun p_file env (ds, ps) = ServerOnly => box [] | _ => box [string "uw_write_header(ctx, \"Content-script-type: text/javascript\\r\\n\");", newline], - string "uw_write(ctx, begin_xhtml);", + string ("uw_write(ctx, uw_begin_" ^ + (if Settings.getIsHtml5 () then + "html5" + else + "xhtml") ^ ");"), newline, string "uw_mayReturnIndirectly(ctx);", newline, @@ -3374,9 +3378,6 @@ fun p_file env (ds, ps) = newline, newline, - string "static const char begin_xhtml[] = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\\n<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\">\\n<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" xml:lang=\\\"en\\\" lang=\\\"en\\\">\";", - newline, - newline, p_list_sep newline (fn x => x) pds, newline, @@ -3588,7 +3589,8 @@ fun p_file env (ds, ps) = "uw_handle", "uw_input_num", "uw_cookie_sig", "uw_check_url", "uw_check_mime", "uw_check_requestHeader", "uw_check_responseHeader", "uw_check_envVar", case onError of NONE => "NULL" | SOME _ => "uw_onError", "my_periodics", - "\"" ^ Prim.toCString (Settings.getTimeFormat ()) ^ "\""], + "\"" ^ Prim.toCString (Settings.getTimeFormat ()) ^ "\"", + if Settings.getIsHtml5 () then "1" else "0"], string "};", newline] end |