summaryrefslogtreecommitdiffstats
path: root/subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'subr.c')
-rw-r--r--subr.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/subr.c b/subr.c
index 4b75e13..f9552c2 100644
--- a/subr.c
+++ b/subr.c
@@ -1265,11 +1265,11 @@ SCM string(chrs)
SCM chrs;
{
SCM res;
- register char *data;
+ register unsigned char *data;
long i = ilength(chrs);
ASSERT(i >= 0, chrs, ARG1, s_string);
res = makstr(i);
- data = CHARS(res);
+ data = UCHARS(res);
for(;NNULLP(chrs);chrs = CDR(chrs)) {
ASSERT(ICHRP(CAR(chrs)), chrs, ARG1, s_string);
*data++ = ICHR(CAR(chrs));
@@ -1280,12 +1280,12 @@ SCM make_string(k, chr)
SCM k, chr;
{
SCM res;
- register char *dst;
+ register unsigned char *dst;
register long i;
ASSERT(INUMP(k) && (k >= 0), k, ARG1, s_make_string);
i = INUM(k);
res = makstr(i);
- dst = CHARS(res);
+ dst = UCHARS(res);
if (!UNBNDP(chr)) {
ASSERT(ICHRP(chr), chr, ARG2, s_make_string);
for(i--;i >= 0;i--) dst[i] = ICHR(chr);
@@ -1304,7 +1304,7 @@ SCM st_ref(str, k)
ASSERT(NIMP(str) && STRINGP(str), str, ARG1, s_st_ref);
ASSERT(INUMP(k), k, ARG2, s_st_ref);
ASSERT(INUM(k) < LENGTH(str) && INUM(k) >= 0, k, OUTOFRANGE, s_st_ref);
- return MAKICHR(CHARS(str)[INUM(k)]);
+ return MAKICHR(UCHARS(str)[INUM(k)]);
}
SCM st_set(str, k, chr)
SCM str, k, chr;
@@ -1313,20 +1313,20 @@ SCM st_set(str, k, chr)
ASSERT(INUMP(k), k, ARG2, s_st_set);
ASSERT(ICHRP(chr), chr, ARG3, s_st_set);
ASSERT(INUM(k) < LENGTH(str) && INUM(k) >= 0, k, OUTOFRANGE, s_st_set);
- CHARS(str)[INUM(k)] = ICHR(chr);
+ UCHARS(str)[INUM(k)] = ICHR(chr);
return UNSPECIFIED;
}
SCM st_equal(s1, s2)
SCM s1, s2;
{
register sizet i;
- register char *c1, *c2;
+ register unsigned char *c1, *c2;
ASSERT(NIMP(s1) && STRINGP(s1), s1, ARG1, s_st_equal);
ASSERT(NIMP(s2) && STRINGP(s2), s2, ARG2, s_st_equal);
i = LENGTH(s2);
if (LENGTH(s1) != i) return BOOL_F;
- c1 = CHARS(s1);
- c2 = CHARS(s2);
+ c1 = UCHARS(s1);
+ c2 = UCHARS(s2);
while(0 != i--) if(*c1++ != *c2++) return BOOL_F;
return BOOL_T;
}
@@ -1433,7 +1433,7 @@ SCM st_append(args)
SCM res;
register long i = 0;
register SCM l, s;
- register char *data;
+ register unsigned char *data;
for(l = args;NIMP(l);) {
ASSERT(CONSP(l), l, ARGn, s_st_append);
s = CAR(l);
@@ -1443,10 +1443,10 @@ SCM st_append(args)
}
ASSERT(NULLP(l), args, ARGn, s_st_append);
res = makstr(i);
- data = CHARS(res);
+ data = UCHARS(res);
for(l = args;NIMP(l);l = CDR(l)) {
s = CAR(l);
- for(i = 0;i<LENGTH(s);i++) *data++ = CHARS(s)[i];
+ for(i = 0;i<LENGTH(s);i++) *data++ = UCHARS(s)[i];
}
return res;
}