Hi. I have three less-important patches for the Ur/Web I didn't sent to this list. Here they are:
1_of_3_Add_basic_support_for__meta__tag.patch Enables <meta> tag which is used in some Bootstrap examples 2_of_3_Add__role__data_attribute_.patch Adds role=String attribute to every tag. Again, used by the Bootstrap's javascript library. 3_of_3_Check_realloc_s_return_code_to_prevent_segfault_on_out_of_memoty_condition.patch Just an obvious fix. Please, review and apply if you find they are OK Regards, Sergey
# HG changeset patch # User Sergey Mironov <[email protected]> # Date 1404712998 -14400 # Mon Jul 07 10:03:18 2014 +0400 # Node ID 702c3996de5220ea272381d168a543db7ccdbe54 # Parent 15ecf697542b0abf2206f0f037da66f68352d5b6 Add basic support for 'meta' tag diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -810,6 +810,7 @@ val head : unit -> tag [Data = data_attr] html head [] [] val title : unit -> tag [Data = data_attr] head [] [] [] val link : unit -> tag [Data = data_attr, Id = id, Rel = string, Typ = string, Href = url, Media = string] head [] [] [] +val meta : unit -> tag [Nam = string, Content = string] head [] [] [] val body : unit -> tag [Data = data_attr, Onload = transaction unit, Onresize = transaction unit, Onunload = transaction unit, Onhashchange = transaction unit] html body [] []
# HG changeset patch # User Sergey Mironov <[email protected]> # Date 1404713104 -14400 # Mon Jul 07 10:05:04 2014 +0400 # Node ID 38e396576f0106db00d97cd35bab7bb25976aa30 # Parent 702c3996de5220ea272381d168a543db7ccdbe54 Add 'role' data attribute. Note, that 'role' attribute is a part of reach ARIA API described here: http://www.w3.org/TR/wai-aria/ Among 'role', it defines lots of aria-* attributes diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -849,7 +849,7 @@ con boxEvents = focusEvents ++ mouseEvents ++ keyEvents ++ resizeEvents ++ scrollEvents con tableEvents = focusEvents ++ mouseEvents ++ keyEvents -con boxAttrs = [Data = data_attr, Id = id, Title = string] ++ boxEvents +con boxAttrs = [Data = data_attr, Id = id, Title = string, Role = string] ++ boxEvents con tableAttrs = [Data = data_attr, Id = id, Title = string] ++ tableEvents val span : bodyTag boxAttrs
# HG changeset patch # User Sergey Mironov <[email protected]> # Date 1408795174 0 # Sat Aug 23 11:59:34 2014 +0000 # Node ID cbbbfa481aa98ec28cae9fb77dbbbd1a5c157a27 # Parent 0f5160a935e396c6369d03e72a7eba732607df84 Check realloc's return code to prevent segfault on out of memoty condition diff --git a/src/c/request.c b/src/c/request.c --- a/src/c/request.c +++ b/src/c/request.c @@ -444,8 +444,12 @@ int len = strlen(inputs); if (len+1 > rc->queryString_size) { + rc->queryString = realloc(rc->queryString, len+1); + if(rc->queryString == NULL) { + log_error(logger_data, "queryString is too long (not enough memory)\n"); + return FAILED; + } rc->queryString_size = len+1; - rc->queryString = realloc(rc->queryString, len+1); } strcpy(rc->queryString, inputs); @@ -481,8 +485,12 @@ on_success(ctx); if (path_len + 1 > rc->path_copy_size) { + rc->path_copy = realloc(rc->path_copy, path_len + 1); + if(rc->path_copy == NULL) { + log_error(logger_data, "Path is too long (not enough memory)\n"); + return FAILED; + } rc->path_copy_size = path_len + 1; - rc->path_copy = realloc(rc->path_copy, rc->path_copy_size); } strcpy(rc->path_copy, path);
_______________________________________________ Ur mailing list [email protected] http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
