# HG changeset patch # User Aidan Kehoe # Date 1266623213 0 # Node ID 9624523604c51d581b50900ae6bf36fb0ef0a195 # Parent b1e48555be7d8d5af3c884def162fd58f9b0906a Use better types when ESCAPECHAR is specified, split_string_by_ichar_1 src/ChangeLog addition: 2010-02-19 Aidan Kehoe * fns.c (split_string_by_ichar_1): Use better types (e.g., not an Ichar for a buffer size) in this function when dealing with ESCAPECHAR. tests/ChangeLog addition: 2010-02-19 Aidan Kehoe * automated/lisp-tests.el: Change the #'split-string-by-char text to use US federal government information instead of a couple of sentences from the OED; the latter would probably have qualified as non-infringement, but with the former the question won't arise. (The German text in the same tests is from a very public domain 19th-century work.) diff -r b1e48555be7d -r 9624523604c5 src/ChangeLog --- a/src/ChangeLog Sun Feb 07 12:24:03 2010 +0000 +++ b/src/ChangeLog Fri Feb 19 23:46:53 2010 +0000 @@ -1,3 +1,9 @@ +2010-02-19 Aidan Kehoe + + * fns.c (split_string_by_ichar_1): + Use better types (e.g., not an Ichar for a buffer size) in this + function when dealing with ESCAPECHAR. + 2010-02-19 Aidan Kehoe * fns.c (mapcarX): diff -r b1e48555be7d -r 9624523604c5 src/fns.c --- a/src/fns.c Sun Feb 07 12:24:03 2010 +0000 +++ b/src/fns.c Fri Feb 19 23:46:53 2010 +0000 @@ -1070,10 +1070,10 @@ { Ibyte unescape_buffer[64], *unescape_buffer_ptr = unescape_buffer, escaped[MAX_ICHAR_LEN], *unescape_cursor; - int deleting_escapes, previous_escaped, escaped_len; - Ichar pchar, unescape_buffer_size = countof (unescape_buffer); - - escaped_len = set_itext_ichar (escaped, escapechar); + Bytecount unescape_buffer_size = countof (unescape_buffer), + escaped_len = set_itext_ichar (escaped, escapechar); + Boolint deleting_escapes, previous_escaped; + Ichar pchar; while (1) { diff -r b1e48555be7d -r 9624523604c5 tests/ChangeLog --- a/tests/ChangeLog Sun Feb 07 12:24:03 2010 +0000 +++ b/tests/ChangeLog Fri Feb 19 23:46:53 2010 +0000 @@ -1,8 +1,19 @@ +2010-02-19 Aidan Kehoe + + * automated/lisp-tests.el: + Change the #'split-string-by-char text to use US federal + government information instead of a couple of sentences from the + OED; the latter would probably have qualified as non-infringement, + but with the former the question won't arise. + (The German text in the same tests is from a very public domain + 19th-century work.) + 2010-02-19 Aidan Kehoe * automated/lisp-tests.el: Check that multiple values are discarded correctly with #'mapcar and one SEQUENCE. + (equal): 2010-02-05 Jerry James diff -r b1e48555be7d -r 9624523604c5 tests/automated/lisp-tests.el --- a/tests/automated/lisp-tests.el Sun Feb 07 12:24:03 2010 +0000 +++ b/tests/automated/lisp-tests.el Fri Feb 19 23:46:53 2010 +0000 @@ -1088,20 +1088,20 @@ bisherige Quellenzufluß versiegt oder abgeleitet wird. Aus dem Wasser, worüber der Geist Gottes schwebte, wird Sumpf und Moder, worüber die unreinen\: Geister brüten.\\ -tocopherol -Vitamin E: any or all of a group of closely related fat-soluble compounds -that occur especially in plant oils and are anti-oxidants essential in the -diets of many animals and probably of man. " +Serum concentrations of vitamin E: (alpha-tocopherol) depend on the liver, +which takes up the nutrient after the various forms are absorbed from the +small intestine. The liver preferentially resecretes only alpha-tocopherol +via the hepatic alpha-tocopherol transfer protein" ?: ?\\) '("re:ee" "this\\is\\text\\\\" "oops" " Eine Sprache, die stagnirt, ist zu vergleichen mit einem See, dem der bisherige Quellenzufluß versiegt oder abgeleitet wird. Aus dem Wasser, worüber der Geist Gottes schwebte, wird Sumpf und Moder, worüber die unreinen: Geister brüten.\\ -tocopherol -Vitamin E" " any or all of a group of closely related fat-soluble compounds -that occur especially in plant oils and are anti-oxidants essential in the -diets of many animals and probably of man. "))) +Serum concentrations of vitamin E" " (alpha-tocopherol) depend on the liver, +which takes up the nutrient after the various forms are absorbed from the +small intestine. The liver preferentially resecretes only alpha-tocopherol +via the hepatic alpha-tocopherol transfer protein"))) (Assert (equal (split-string-by-char @@ -1110,20 +1110,20 @@ bisherige Quellenzufluß versiegt oder abgeleitet wird. Aus dem Wasser, worüber der Geist Gottes schwebte, wird Sumpf und Moder, worüber die unreinen\: Geister brüten.\\ -tocopherol -Vitamin E: any or all of a group of closely related fat-soluble compounds -that occur especially in plant oils and are anti-oxidants essential in the -diets of many animals and probably of man. " +Serum concentrations of vitamin E: (alpha-tocopherol) depend on the liver, +which takes up the nutrient after the various forms are absorbed from the +small intestine. The liver preferentially resecretes only alpha-tocopherol +via the hepatic alpha-tocopherol transfer protein" ?: ?\x00) '("re\\" "ee" "this\\\\is\\\\text\\\\\\\\" "oo\\ps" " Eine Sprache, die stagnirt, ist zu vergleichen mit einem See, dem der bisherige Quellenzufluß versiegt oder abgeleitet wird. Aus dem Wasser, worüber der Geist Gottes schwebte, wird Sumpf und Moder, worüber die unreinen\\" " Geister brüten.\\\\ -tocopherol -Vitamin E" " any or all of a group of closely related fat-soluble compounds -that occur especially in plant oils and are anti-oxidants essential in the -diets of many animals and probably of man. "))) +Serum concentrations of vitamin E" " (alpha-tocopherol) depend on the liver, +which takes up the nutrient after the various forms are absorbed from the +small intestine. The liver preferentially resecretes only alpha-tocopherol +via the hepatic alpha-tocopherol transfer protein"))) (Assert (equal (split-string-by-char @@ -1132,19 +1132,19 @@ bisherige Quellenzufluß versiegt oder abgeleitet wird. Aus dem Wasser, worüber der Geist Gottes schwebte, wird Sumpf und Moder, worüber die unreinen\: Geister brüten.\\ -tocopherol -Vitamin E: any or all of a group of closely related fat-soluble compounds -that occur especially in plant oils and are anti-oxidants essential in the -diets of many animals and probably of man. " ?\\) +Serum concentrations of vitamin E: (alpha-tocopherol) depend on the liver, +which takes up the nutrient after the various forms are absorbed from the +small intestine. The liver preferentially resecretes only alpha-tocopherol +via the hepatic alpha-tocopherol transfer protein" ?\\) '("re" ":ee:this" "" "is" "" "text" "" "" "" ":oo" "ps: Eine Sprache, die stagnirt, ist zu vergleichen mit einem See, dem der bisherige Quellenzufluß versiegt oder abgeleitet wird. Aus dem Wasser, worüber der Geist Gottes schwebte, wird Sumpf und Moder, worüber die unreinen" ": Geister brüten." "" " -tocopherol -Vitamin E: any or all of a group of closely related fat-soluble compounds -that occur especially in plant oils and are anti-oxidants essential in the -diets of many animals and probably of man. "))) +Serum concentrations of vitamin E: (alpha-tocopherol) depend on the liver, +which takes up the nutrient after the various forms are absorbed from the +small intestine. The liver preferentially resecretes only alpha-tocopherol +via the hepatic alpha-tocopherol transfer protein"))) ;;----------------------------------------------------- ;; Test near-text buffer functions.