[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-core/srfi ChangeLog srfi-14.c srfi-...
From: |
Gary Houston |
Subject: |
guile/guile-core/srfi ChangeLog srfi-14.c srfi-... |
Date: |
Wed, 11 Jul 2001 15:01:37 -0700 |
CVSROOT: /cvs
Module name: guile
Branch: branch_release-1-6
Changes by: Gary Houston <address@hidden> 01/07/11 15:01:37
Modified files:
guile-core/srfi: ChangeLog srfi-14.c srfi-14.h
Log message:
(s_scm_char_set_leq): similarly, (char-set<=) should return #t.
take a single "rest" argument.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/srfi/ChangeLog.diff?cvsroot=OldCVS&only_with_tag=branch_release-1-6&tr1=1.44.2.2&tr2=1.44.2.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/srfi/srfi-14.c.diff?cvsroot=OldCVS&only_with_tag=branch_release-1-6&tr1=1.9.2.1&tr2=1.9.2.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/srfi/srfi-14.h.diff?cvsroot=OldCVS&only_with_tag=branch_release-1-6&tr1=1.3.2.1&tr2=1.3.2.2&r1=text&r2=text
Patches:
Index: guile/guile-core/srfi/ChangeLog
diff -u guile/guile-core/srfi/ChangeLog:1.46
guile/guile-core/srfi/ChangeLog:1.47
--- guile/guile-core/srfi/ChangeLog:1.46 Wed Jul 11 13:47:07 2001
+++ guile/guile-core/srfi/ChangeLog Wed Jul 11 15:00:52 2001
@@ -4,7 +4,9 @@
return #t instead of giving wrong-number-of-arguments . take a
single "rest" argument. use memcmp instead of a loop to compare
the values.
- srfi-14.h: update the declaration.
+ (s_scm_char_set_leq): similarly, (char-set<=) should return #t.
+ take a single "rest" argument.
+ srfi-14.h: update the declarations.
2001-07-09 Martin Grabmueller <address@hidden>
Index: guile/guile-core/srfi/srfi-14.c
diff -u guile/guile-core/srfi/srfi-14.c:1.10
guile/guile-core/srfi/srfi-14.c:1.11
--- guile/guile-core/srfi/srfi-14.c:1.10 Wed Jul 11 13:47:07 2001
+++ guile/guile-core/srfi/srfi-14.c Wed Jul 11 15:00:52 2001
@@ -123,14 +123,14 @@
while (!SCM_NULLP (char_sets))
{
- SCM csn = SCM_CAR (char_sets);
- long *csn_data;
+ SCM csi = SCM_CAR (char_sets);
+ long *csi_data;
- SCM_VALIDATE_SMOB (argnum++, csn, charset);
- csn_data = (long *) SCM_SMOB_DATA (csn);
+ SCM_VALIDATE_SMOB (argnum++, csi, charset);
+ csi_data = (long *) SCM_SMOB_DATA (csi);
if (cs1_data == NULL)
- cs1_data = csn_data;
- else if (memcmp (cs1_data, csn_data, SCM_CHARSET_SIZE) != 0)
+ cs1_data = csi_data;
+ else if (memcmp (cs1_data, csi_data, SCM_CHARSET_SIZE) != 0)
return SCM_BOOL_F;
char_sets = SCM_CDR (char_sets);
}
@@ -139,34 +139,36 @@
#undef FUNC_NAME
-SCM_DEFINE (scm_char_set_leq, "char-set<=", 1, 0, 1,
- (SCM cs1, SCM csr),
+SCM_DEFINE (scm_char_set_leq, "char-set<=", 0, 0, 1,
+ (SCM char_sets),
"Return @code{#t} if every character set @var{cs}i is a subset\n"
"of character set @var{cs}i+1.")
#define FUNC_NAME s_scm_char_set_leq
{
- int argnum = 2;
+ int argnum = 1;
+ long *prev_data = NULL;
- SCM_VALIDATE_SMOB (1, cs1, charset);
- SCM_VALIDATE_REST_ARGUMENT (csr);
+ SCM_VALIDATE_REST_ARGUMENT (char_sets);
- while (!SCM_NULLP (csr))
+ while (!SCM_NULLP (char_sets))
{
- long * p1, * p2;
- SCM cs2 = SCM_CAR (csr);
- int k;
-
- SCM_VALIDATE_SMOB (argnum++, cs2, charset);
- p1 = (long *) SCM_SMOB_DATA (cs1);
- p2 = (long *) SCM_SMOB_DATA (cs2);
- for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++)
+ SCM csi = SCM_CAR (char_sets);
+ long *csi_data;
+
+ SCM_VALIDATE_SMOB (argnum++, csi, charset);
+ csi_data = (long *) SCM_SMOB_DATA (csi);
+ if (prev_data)
{
- if ((p1[k] & p2[k]) != p1[k])
- return SCM_BOOL_F;
+ int k;
+
+ for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++)
+ {
+ if ((prev_data[k] & csi_data[k]) != prev_data[k])
+ return SCM_BOOL_F;
+ }
}
-
- csr = SCM_CDR (csr);
- cs1 = cs2;
+ prev_data = csi_data;
+ char_sets = SCM_CDR (char_sets);
}
return SCM_BOOL_T;
}
Index: guile/guile-core/srfi/srfi-14.h
diff -u guile/guile-core/srfi/srfi-14.h:1.4 guile/guile-core/srfi/srfi-14.h:1.5
--- guile/guile-core/srfi/srfi-14.h:1.4 Wed Jul 11 13:47:07 2001
+++ guile/guile-core/srfi/srfi-14.h Wed Jul 11 15:00:52 2001
@@ -61,7 +61,7 @@
SCM scm_char_set_p (SCM obj);
SCM scm_char_set_eq (SCM char_sets);
-SCM scm_char_set_leq (SCM cs1, SCM csr);
+SCM scm_char_set_leq (SCM char_sets);
SCM scm_char_set_hash (SCM cs, SCM bound);
SCM scm_char_set_cursor (SCM cs);
SCM scm_char_set_ref (SCM cs, SCM cursor);
- guile/guile-core/srfi ChangeLog srfi-14.c srfi-..., Gary Houston, 2001/07/11
- guile/guile-core/srfi ChangeLog srfi-14.c srfi-..., Gary Houston, 2001/07/11
- guile/guile-core/srfi ChangeLog srfi-14.c srfi-..., Gary Houston, 2001/07/11
- guile/guile-core/srfi ChangeLog srfi-14.c srfi-...,
Gary Houston <=
- guile/guile-core/srfi ChangeLog srfi-14.c srfi-..., Gary Houston, 2001/07/16
- guile/guile-core/srfi ChangeLog srfi-14.c srfi-..., Gary Houston, 2001/07/16
- guile/guile-core/srfi ChangeLog srfi-14.c srfi-..., Martin Grabmueller, 2001/07/17
- guile/guile-core/srfi ChangeLog srfi-14.c srfi-..., Martin Grabmueller, 2001/07/17
- guile/guile-core/srfi ChangeLog srfi-14.c srfi-..., Martin Grabmueller, 2001/07/17
- guile/guile-core/srfi ChangeLog srfi-14.c srfi-..., Martin Grabmueller, 2001/07/17
- guile/guile-core/srfi ChangeLog srfi-14.c srfi-..., Gary Houston, 2001/07/31
- guile/guile-core/srfi ChangeLog srfi-14.c srfi-..., Gary Houston, 2001/07/31