aboutsummaryrefslogtreecommitdiffstats
path: root/rope.c
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2004-12-07 23:23:48 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:28 -0800
commit37f2f5e0bb11a18deecf48c7ad6bcbf7bd932db2 (patch)
tree692caebb60ec5f80ce528a403b69351ca756d530 /rope.c
parente21d47d7813159bb71e0671df9b52ec0470c358d (diff)
parentc7d035ae1a729232579a0fe41ed5affa131d3623 (diff)
downloadscm-37f2f5e0bb11a18deecf48c7ad6bcbf7bd932db2.tar.gz
scm-37f2f5e0bb11a18deecf48c7ad6bcbf7bd932db2.zip
Import Debian changes 5d9-4.1debian/5d9-4.1
scm (5d9-4.1) unstable; urgency=high * Non-maintainer upload. * High-urgency upload for sarge-targetted RC bugfix. * Revert upstream "CAUTIOUS" define, which causes the scm build to fail its test suite on alpha (and, it appears, powerpc as well). Closes: #245810. scm (5d9-4) unstable; urgency=low * Apply patch from 144062 to fix hppa build (Closes: #144062) * Change scm.1 section from Jan 4 200 to 1. (lintian) scm (5d9-3) unstable; urgency=low * Properly clean up info files. * Make and install Xlibscm.info. scm (5d9-2) unstable; urgency=low * Fix path problem in slibcat. Hack at mklibcat.scm. (Closes: #241510) scm (5d9-1) unstable; urgency=low * New upstream release * Merge NMU sparc changes (Closes: #191171, #191356) * SHORT_INT is defined for ia64 upstream (Closes: #141928) * Scheme imps now grouped in info file (has been for a while) (Closes: #115452)
Diffstat (limited to 'rope.c')
-rw-r--r--rope.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/rope.c b/rope.c
index af62c41..b4ca0d4 100644
--- a/rope.c
+++ b/rope.c
@@ -85,7 +85,7 @@ unsigned char num2uchar(num, pos, s_caller)
char *pos, *s_caller;
{
unsigned long res = INUM(num);
- ASSERT(INUMP(num) && (255L >= res), num, pos, s_caller);
+ ASRTER(INUMP(num) && (255L >= res), num, pos, s_caller);
return (unsigned char) res;
}
unsigned short num2ushort(num, pos, s_caller)
@@ -93,7 +93,7 @@ unsigned short num2ushort(num, pos, s_caller)
char *pos, *s_caller;
{
unsigned long res = INUM(num);
- ASSERT(INUMP(num) && (65535L >= res), num, pos, s_caller);
+ ASRTER(INUMP(num) && (65535L >= res), num, pos, s_caller);
return (unsigned short) res;
}
unsigned long num2ulong(num, pos, s_caller)
@@ -223,7 +223,7 @@ char **makargvfrmstrs(args, s_name)
int argc = ilength(args);
argv = (char **)must_malloc((1L+argc)*sizeof(char *), s_vector);
for(argc = 0; NNULLP(args); args=CDR(args), ++argc) {
- ASSERT(NIMP(CAR(args)) && STRINGP(CAR(args)), CAR(args), ARG2, s_name);
+ ASRTER(NIMP(CAR(args)) && STRINGP(CAR(args)), CAR(args), ARG2, s_name);
{
sizet len = 1 + LENGTH(CAR(args));
char *dst = (char *)must_malloc((long)len, s_string);
@@ -300,13 +300,13 @@ unsigned long scm_addr(args, s_name)
}
else {
if NIMP(args) {
- ASSERT(CONSP(args) && INUMP(CAR(args)), args, ARG2, s_name);
+ ASRTER(CONSP(args) && INUMP(CAR(args)), args, ARG2, s_name);
pos = INUM(CAR(args));
ASRTGO(NULLP(CDR(args)), wna);
}
else if NULLP(args) pos = 0;
else {
- ASSERT(INUMP(args), args, ARG2, s_name);
+ ASRTER(INUMP(args), args, ARG2, s_name);
pos = INUM(args);
}
ASRTGO(pos >= 0 && pos < LENGTH(v), outrng);
@@ -418,8 +418,11 @@ SCM scm_gc_protect(obj)
SCM obj;
{
long len;
- ASSERT(NIMP(scm_uprotects), MAKINUM(20), NALLOC, "protects");
+ ASRTER(NIMP(scm_uprotects), MAKINUM(20), NALLOC, "protects");
if IMP(obj) return obj;
+ for (len = LENGTH(scm_uprotects);len--;) {
+ if (obj==VELTS(scm_uprotects)[len]) return obj;
+ }
len = LENGTH(scm_uprotects);
if (scm_protidx >= len) resizuve(scm_uprotects, MAKINUM(len + (len>>2)));
VELTS(scm_uprotects)[scm_protidx++] = obj;
@@ -428,5 +431,6 @@ SCM scm_gc_protect(obj)
void init_rope()
{
+ scm_protidx = 0;
scm_uprotects = make_vector(MAKINUM(20), UNDEFINED);
}