summaryrefslogtreecommitdiff
path: root/srfi/srfi-14.c
diff options
context:
space:
mode:
authorGary Houston <ghouston@arglist.com>2001-07-16 22:30:25 +0000
committerGary Houston <ghouston@arglist.com>2001-07-16 22:30:25 +0000
commit8b19021c25ec8ead2e1237788160e4d486c017f4 (patch)
treea01ab149d6cb1ae5be83ee3dd736a7335a6968bf /srfi/srfi-14.c
parent139777e5c7fb9621456adadc98610feb5549a5de (diff)
downloadguile-8b19021c25ec8ead2e1237788160e4d486c017f4.tar.gz
* 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).
Diffstat (limited to 'srfi/srfi-14.c')
-rw-r--r--srfi/srfi-14.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/srfi/srfi-14.c b/srfi/srfi-14.c
index 14a717a80..427ee9e23 100644
--- a/srfi/srfi-14.c
+++ b/srfi/srfi-14.c
@@ -241,7 +241,7 @@ SCM_DEFINE (scm_char_set_ref, "char-set-ref", 2, 0, 0,
int ccursor;
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))
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;
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))
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;
- SCM_VALIDATE_INUM_COPY (1, cursor, ccursor);
+ SCM_VALIDATE_INUM_MIN_COPY (1, cursor, 0, ccursor);
return SCM_BOOL (ccursor >= SCM_CHARSET_SIZE);
}
#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);
int c;
- SCM_VALIDATE_CHAR_COPY (1, chr, c);
+ SCM_VALIDATE_CHAR_COPY (0, chr, c);
list = SCM_CDR (list);
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);
int c;
- SCM_VALIDATE_CHAR_COPY (1, chr, c);
+ SCM_VALIDATE_CHAR_COPY (0, chr, c);
list = SCM_CDR (list);
p[c / sizeof (long)] |= 1 << (c % sizeof (long));