Mercurial > hg > xemacs-beta
changeset 5036:9624523604c5
Use better types when ESCAPECHAR is specified, split_string_by_ichar_1
src/ChangeLog addition:
2010-02-19 Aidan Kehoe <kehoea@parhasard.net>
* 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 <kehoea@parhasard.net>
* 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.)
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Fri, 19 Feb 2010 23:46:53 +0000 |
parents | b1e48555be7d |
children | f8ae1031c706 32e1ae4c1e3a c3d372419e09 6aba0daedb7c b5df3737028a |
files | src/ChangeLog src/fns.c tests/ChangeLog tests/automated/lisp-tests.el |
diffstat | 4 files changed, 45 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- 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 <kehoea@parhasard.net> + + * 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 <kehoea@parhasard.net> * fns.c (mapcarX):
--- 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) {
--- 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 <kehoea@parhasard.net> + + * 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 <kehoea@parhasard.net> * automated/lisp-tests.el: Check that multiple values are discarded correctly with #'mapcar and one SEQUENCE. + (equal): 2010-02-05 Jerry James <james@xemacs.org>
--- 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.