mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-09 23:40:29 +02:00
* srfi-14.scm: export string->char-set!, not string-char-set!.
* srfi-14.c (scm_char_set_ref, scm_char_set_cursor_next, scm_end_of_char_set_p): reject negative cursor values. (scm_list_to_char_set, scm_list_to_char_set_x): when reporting type error in list component, omit the position (was always 1).
This commit is contained in:
parent
5c8c4411a8
commit
f47ed23fa2
3 changed files with 16 additions and 7 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2001-07-16 Gary Houston <ghouston@arglist.com>
|
||||||
|
|
||||||
|
* srfi-14.scm: export string->char-set!, not string-char-set!.
|
||||||
|
|
||||||
|
* srfi-14.c (scm_char_set_ref, scm_char_set_cursor_next,
|
||||||
|
scm_end_of_char_set_p): reject negative cursor values.
|
||||||
|
(scm_list_to_char_set, scm_list_to_char_set_x): when reporting
|
||||||
|
type error in list component, omit the position (was always 1).
|
||||||
|
|
||||||
2001-07-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
|
2001-07-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
|
||||||
|
|
||||||
(scm_char_set_map): Bug-fix: char-set-map was modifying the
|
(scm_char_set_map): Bug-fix: char-set-map was modifying the
|
||||||
|
@ -11,7 +20,7 @@
|
||||||
more values.
|
more values.
|
||||||
|
|
||||||
2001-07-15 Gary Houston <ghouston@arglist.com>
|
2001-07-15 Gary Houston <ghouston@arglist.com>
|
||||||
|
|
||||||
* srfi-14.c (scm_char_set_hash): recognise 0 instead of #f in the
|
* srfi-14.c (scm_char_set_hash): recognise 0 instead of #f in the
|
||||||
opt arg to give default bound, as in final spec. don't allow
|
opt arg to give default bound, as in final spec. don't allow
|
||||||
negative bounds.
|
negative bounds.
|
||||||
|
|
|
@ -241,7 +241,7 @@ SCM_DEFINE (scm_char_set_ref, "char-set-ref", 2, 0, 0,
|
||||||
int ccursor;
|
int ccursor;
|
||||||
|
|
||||||
SCM_VALIDATE_SMOB (1, cs, charset);
|
SCM_VALIDATE_SMOB (1, cs, charset);
|
||||||
SCM_VALIDATE_INUM_COPY (2, cursor, ccursor);
|
SCM_VALIDATE_INUM_MIN_COPY (2, cursor, 0, ccursor);
|
||||||
|
|
||||||
if (ccursor >= SCM_CHARSET_SIZE || !SCM_CHARSET_GET (cs, ccursor))
|
if (ccursor >= SCM_CHARSET_SIZE || !SCM_CHARSET_GET (cs, ccursor))
|
||||||
SCM_MISC_ERROR ("invalid character set cursor: ~A", scm_list_1 (cursor));
|
SCM_MISC_ERROR ("invalid character set cursor: ~A", scm_list_1 (cursor));
|
||||||
|
@ -260,7 +260,7 @@ SCM_DEFINE (scm_char_set_cursor_next, "char-set-cursor-next", 2, 0, 0,
|
||||||
int ccursor;
|
int ccursor;
|
||||||
|
|
||||||
SCM_VALIDATE_SMOB (1, cs, charset);
|
SCM_VALIDATE_SMOB (1, cs, charset);
|
||||||
SCM_VALIDATE_INUM_COPY (2, cursor, ccursor);
|
SCM_VALIDATE_INUM_MIN_COPY (2, cursor, 0, ccursor);
|
||||||
|
|
||||||
if (ccursor >= SCM_CHARSET_SIZE || !SCM_CHARSET_GET (cs, ccursor))
|
if (ccursor >= SCM_CHARSET_SIZE || !SCM_CHARSET_GET (cs, ccursor))
|
||||||
SCM_MISC_ERROR ("invalid character set cursor: ~A", scm_list_1 (cursor));
|
SCM_MISC_ERROR ("invalid character set cursor: ~A", scm_list_1 (cursor));
|
||||||
|
@ -282,7 +282,7 @@ SCM_DEFINE (scm_end_of_char_set_p, "end-of-char-set?", 1, 0, 0,
|
||||||
{
|
{
|
||||||
int ccursor;
|
int ccursor;
|
||||||
|
|
||||||
SCM_VALIDATE_INUM_COPY (1, cursor, ccursor);
|
SCM_VALIDATE_INUM_MIN_COPY (1, cursor, 0, ccursor);
|
||||||
return SCM_BOOL (ccursor >= SCM_CHARSET_SIZE);
|
return SCM_BOOL (ccursor >= SCM_CHARSET_SIZE);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
|
@ -507,7 +507,7 @@ SCM_DEFINE (scm_list_to_char_set, "list->char-set", 1, 1, 0,
|
||||||
SCM chr = SCM_CAR (list);
|
SCM chr = SCM_CAR (list);
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
SCM_VALIDATE_CHAR_COPY (1, chr, c);
|
SCM_VALIDATE_CHAR_COPY (0, chr, c);
|
||||||
list = SCM_CDR (list);
|
list = SCM_CDR (list);
|
||||||
|
|
||||||
p[c / sizeof (long)] |= 1 << (c % sizeof (long));
|
p[c / sizeof (long)] |= 1 << (c % sizeof (long));
|
||||||
|
@ -534,7 +534,7 @@ SCM_DEFINE (scm_list_to_char_set_x, "list->char-set!", 2, 0, 0,
|
||||||
SCM chr = SCM_CAR (list);
|
SCM chr = SCM_CAR (list);
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
SCM_VALIDATE_CHAR_COPY (1, chr, c);
|
SCM_VALIDATE_CHAR_COPY (0, chr, c);
|
||||||
list = SCM_CDR (list);
|
list = SCM_CDR (list);
|
||||||
|
|
||||||
p[c / sizeof (long)] |= 1 << (c % sizeof (long));
|
p[c / sizeof (long)] |= 1 << (c % sizeof (long));
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
char-set-copy
|
char-set-copy
|
||||||
char-set
|
char-set
|
||||||
list->char-set list->char-set!
|
list->char-set list->char-set!
|
||||||
string->char-set string-char-set!
|
string->char-set string->char-set!
|
||||||
char-set-filter char-set-filter!
|
char-set-filter char-set-filter!
|
||||||
ucs-range->char-set ucs-range->char-set!
|
ucs-range->char-set ucs-range->char-set!
|
||||||
->char-set
|
->char-set
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue