diff options
author | Gary Houston <ghouston@arglist.com> | 2001-07-22 23:21:03 +0000 |
---|---|---|
committer | Gary Houston <ghouston@arglist.com> | 2001-07-22 23:21:03 +0000 |
commit | d95744e9865c423588a884ef8effa0c4a204226a (patch) | |
tree | cfb77e06e43ba96c87e3071afd9513bba0077078 /srfi/srfi-14.c | |
parent | 42b54c05a9ba541cfe15eb071ad96b42de19d908 (diff) | |
download | guile-d95744e9865c423588a884ef8effa0c4a204226a.tar.gz |
Reverse the n-ary logxor change. The behaviour is weird in a set
context, but consistent with logxor and scsh. Maybe it should get
the benefit of the doubt.
Diffstat (limited to 'srfi/srfi-14.c')
-rw-r--r-- | srfi/srfi-14.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/srfi/srfi-14.c b/srfi/srfi-14.c index 8d628252a..8a7a7321a 100644 --- a/srfi/srfi-14.c +++ b/srfi/srfi-14.c @@ -1153,12 +1153,9 @@ SCM_DEFINE (scm_char_set_xor, "char-set-xor", 0, 0, 1, res = make_char_set (FUNC_NAME); else { - long * p; int argnum = 2; - long mask[LONGS_PER_CHARSET]; - int k; + long * p; - memset (mask, 0, sizeof mask); res = scm_char_set_copy (SCM_CAR (rest)); p = (long *) SCM_SMOB_DATA (res); rest = SCM_CDR (rest); @@ -1167,6 +1164,7 @@ SCM_DEFINE (scm_char_set_xor, "char-set-xor", 0, 0, 1, { SCM cs = SCM_CAR (rest); long *cs_data; + int k; SCM_VALIDATE_SMOB (argnum, cs, charset); argnum++; @@ -1174,14 +1172,8 @@ SCM_DEFINE (scm_char_set_xor, "char-set-xor", 0, 0, 1, rest = SCM_CDR (rest); for (k = 0; k < LONGS_PER_CHARSET; k++) - { - mask[k] |= p[k] & cs_data[k]; - p[k] ^= cs_data[k]; - } + p[k] ^= cs_data[k]; } - /* avoid including characters that occur an odd number of times >= 3. */ - for (k = 0; k < LONGS_PER_CHARSET; k++) - p[k] &= ~mask[k]; } return res; } |