comparison src/cjr_print.sml @ 1407:7d963b8019e6

Some fixes for tasks and onError handlers
author Adam Chlipala <adam@chlipala.net>
date Thu, 20 Jan 2011 15:11:45 -0500
parents 59c8a19bfb22
children 4a6f84092399
comparison
equal deleted inserted replaced
1406:e8bea46f8eda 1407:7d963b8019e6
2989 newline, 2989 newline,
2990 string "static int uw_db_rollback(uw_context ctx) { return 0; };"], 2990 string "static int uw_db_rollback(uw_context ctx) { return 0; };"],
2991 newline, 2991 newline,
2992 newline, 2992 newline,
2993 2993
2994 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\\\">\";",
2995 newline,
2996 newline,
2997
2998 p_list_sep newline (fn x => x) pds,
2999 newline,
3000 newline,
3001 string "static int uw_input_num(const char *name) {",
3002 newline,
3003 makeSwitch (fnums, 0),
3004 string "}",
3005 newline,
3006 newline,
3007
2994 box (ListUtil.mapi (fn (i, (_, x1, x2, e)) => 3008 box (ListUtil.mapi (fn (i, (_, x1, x2, e)) =>
2995 box [string "static void uw_periodic", 3009 box [string "static void uw_periodic",
2996 string (Int.toString i), 3010 string (Int.toString i),
2997 string "(uw_context ctx) {", 3011 string "(uw_context ctx) {",
2998 newline, 3012 newline,
3016 string ",", 3030 string ",",
3017 space, 3031 space,
3018 string (Int64.toString n), 3032 string (Int64.toString n),
3019 string "},"]) periodics), 3033 string "},"]) periodics),
3020 string "{NULL}};", 3034 string "{NULL}};",
3021 newline,
3022 newline,
3023
3024 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\\\">\";",
3025 newline,
3026 newline,
3027
3028 p_list_sep newline (fn x => x) pds,
3029 newline,
3030 newline,
3031 string "static int uw_input_num(const char *name) {",
3032 newline,
3033 makeSwitch (fnums, 0),
3034 string "}",
3035 newline, 3035 newline,
3036 newline, 3036 newline,
3037 3037
3038 makeChecker ("uw_check_url", Settings.getUrlRules ()), 3038 makeChecker ("uw_check_url", Settings.getUrlRules ()),
3039 newline, 3039 newline,