Mercurial > urweb
comparison src/settings.sml @ 1979:81bc76aa4acd
Merge in upstream changes.
author | Patrick Hurst <phurst@mit.edu> |
---|---|
date | Sat, 18 Jan 2014 18:26:24 -0500 |
parents | 3cc14f1e47d1 |
children | b15a4c2cb542 334b5cbff198 |
comparison
equal
deleted
inserted
replaced
1978:c5143edaf3c7 | 1979:81bc76aa4acd |
---|---|
185 "onMouseover", | 185 "onMouseover", |
186 "onMouseup", | 186 "onMouseup", |
187 "preventDefault", | 187 "preventDefault", |
188 "stopPropagation", | 188 "stopPropagation", |
189 "fresh", | 189 "fresh", |
190 "giveFocus"] | 190 "giveFocus", |
191 "currentUrlHasPost", | |
192 "currentUrlHasQueryString", | |
193 "currentUrl"] | |
191 | 194 |
192 val benign = ref benignBase | 195 val benign = ref benignBase |
193 fun setBenignEffectful ls = benign := S.addList (benignBase, ls) | 196 fun setBenignEffectful ls = benign := S.addList (benignBase, ls) |
194 fun isBenignEffectful x = S.member (!benign, x) | 197 fun isBenignEffectful x = S.member (!benign, x) |
195 | 198 |
297 ("isdigit", "isDigit"), | 300 ("isdigit", "isDigit"), |
298 ("isalnum", "isAlnum"), | 301 ("isalnum", "isAlnum"), |
299 ("isblank", "isBlank"), | 302 ("isblank", "isBlank"), |
300 ("isspace", "isSpace"), | 303 ("isspace", "isSpace"), |
301 ("isxdigit", "isXdigit"), | 304 ("isxdigit", "isXdigit"), |
305 ("isprint", "isPrint"), | |
302 ("tolower", "toLower"), | 306 ("tolower", "toLower"), |
303 ("toupper", "toUpper"), | 307 ("toupper", "toUpper"), |
308 ("ord", "ord"), | |
304 | 309 |
305 ("checkUrl", "checkUrl"), | 310 ("checkUrl", "checkUrl"), |
306 ("bless", "bless"), | 311 ("bless", "bless"), |
307 | 312 |
308 ("eq_time", "eq"), | 313 ("eq_time", "eq"), |
689 | 694 |
690 val timeFormat = ref "%c" | 695 val timeFormat = ref "%c" |
691 fun setTimeFormat v = timeFormat := v | 696 fun setTimeFormat v = timeFormat := v |
692 fun getTimeFormat () = !timeFormat | 697 fun getTimeFormat () = !timeFormat |
693 | 698 |
699 fun lowercase s = | |
700 case s of | |
701 "" => "" | |
702 | _ => str (Char.toLower (String.sub (s, 0))) ^ String.extract (s, 1, NONE) | |
703 | |
704 fun capitalize s = | |
705 case s of | |
706 "" => "" | |
707 | _ => str (Char.toUpper (String.sub (s, 0))) ^ String.extract (s, 1, NONE) | |
708 | |
709 val mangle = ref true | |
710 fun setMangleSql x = mangle := x | |
711 fun mangleSqlTable s = if !mangle then "uw_" ^ capitalize s | |
712 else if #name (currentDbms ()) = "mysql" then capitalize s | |
713 else lowercase s | |
714 fun mangleSql s = if !mangle then "uw_" ^ s | |
715 else if #name (currentDbms ()) = "mysql" then lowercase s | |
716 else lowercase s | |
717 fun mangleSqlCatalog s = if !mangle then "uw_" ^ s else lowercase s | |
718 | |
719 val html5 = ref false | |
720 fun setIsHtml5 b = html5 := b | |
721 fun getIsHtml5 () = !html5 | |
722 | |
694 end | 723 end |