From 55d485365f4d52a84d06bc38d6d34b6a47890b57 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 9 Jan 2014 17:27:24 -0500 Subject: Add 'html5' .urp directive --- src/cjr_print.sml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/cjr_print.sml') 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[] = \"\\n\\n\";", - 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 -- cgit v1.2.3