[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-core/srfi srfi-14.c
From: |
Thien-Thi Nguyen |
Subject: |
guile/guile-core/srfi srfi-14.c |
Date: |
Wed, 31 Oct 2001 13:34:38 -0500 |
CVSROOT: /cvs
Module name: guile
Branch: branch_release-1-6
Changes by: Thien-Thi Nguyen <address@hidden> 01/10/31 13:34:38
Modified files:
guile-core/srfi: srfi-14.c
Log message:
(scm_string_to_char_set, scm_string_to_char_set_x): Use `size_t'
instead of deprecated `scm_sizet'.
CVSWeb URLs:
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.14&tr2=1.9.2.15&r1=text&r2=text
Patches:
Index: guile/guile-core/srfi/srfi-14.c
diff -u guile/guile-core/srfi/srfi-14.c:1.22
guile/guile-core/srfi/srfi-14.c:1.23
--- guile/guile-core/srfi/srfi-14.c:1.22 Tue Jul 31 17:42:24 2001
+++ guile/guile-core/srfi/srfi-14.c Fri Sep 21 13:55:07 2001
@@ -51,9 +51,10 @@
#include "srfi-14.h"
-#define SCM_CHARSET_SET(cs, idx) (((long *) SCM_SMOB_DATA (cs))[(idx) /
SCM_BITS_PER_LONG] |= (1 << ((idx) % SCM_BITS_PER_LONG)))
+#define SCM_CHARSET_SET(cs, idx) \
+ (((long *) SCM_SMOB_DATA (cs))[(idx) / SCM_BITS_PER_LONG] |= \
+ (1L << ((idx) % SCM_BITS_PER_LONG)))
-
#define BYTES_PER_CHARSET (SCM_CHARSET_SIZE / 8)
#define LONGS_PER_CHARSET (SCM_CHARSET_SIZE / SCM_BITS_PER_LONG)
@@ -191,7 +192,7 @@
const int default_bnd = 871;
int bnd;
long * p;
- unsigned val = 0;
+ unsigned long val = 0;
int k;
SCM_VALIDATE_SMOB (1, cs, charset);
@@ -479,7 +480,7 @@
SCM_VALIDATE_CHAR_COPY (argnum, SCM_CAR (rest), c);
argnum++;
rest = SCM_CDR (rest);
- p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG);
+ p[c / SCM_BITS_PER_LONG] |= 1L << (c % SCM_BITS_PER_LONG);
}
return cs;
}
@@ -513,7 +514,7 @@
SCM_VALIDATE_CHAR_COPY (0, chr, c);
list = SCM_CDR (list);
- p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG);
+ p[c / SCM_BITS_PER_LONG] |= 1L << (c % SCM_BITS_PER_LONG);
}
return cs;
}
@@ -525,7 +526,7 @@
"Convert the character list @var{list} to a character set. The\n"
"characters are added to @var{base_cs} and @var{base_cs} is\n"
"returned.")
-#define FUNC_NAME s_scm_list_to_char_set
+#define FUNC_NAME s_scm_list_to_char_set_x
{
long * p;
@@ -540,7 +541,7 @@
SCM_VALIDATE_CHAR_COPY (0, chr, c);
list = SCM_CDR (list);
- p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG);
+ p[c / SCM_BITS_PER_LONG] |= 1L << (c % SCM_BITS_PER_LONG);
}
return base_cs;
}
@@ -557,7 +558,7 @@
SCM cs;
long * p;
char * s;
- int k = 0;
+ size_t k = 0;
SCM_VALIDATE_STRING (1, str);
if (SCM_UNBNDP (base_cs))
@@ -572,7 +573,7 @@
while (k < SCM_STRING_LENGTH (str))
{
int c = s[k++];
- p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG);
+ p[c / SCM_BITS_PER_LONG] |= 1L << (c % SCM_BITS_PER_LONG);
}
return cs;
}
@@ -588,7 +589,7 @@
{
long * p;
char * s;
- int k = 0;
+ size_t k = 0;
SCM_VALIDATE_STRING (1, str);
SCM_VALIDATE_SMOB (2, base_cs, charset);
@@ -597,7 +598,7 @@
while (k < SCM_STRING_LENGTH (str))
{
int c = s[k++];
- p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG);
+ p[c / SCM_BITS_PER_LONG] |= 1L << (c % SCM_BITS_PER_LONG);
}
return base_cs;
}
@@ -632,7 +633,7 @@
SCM res = scm_call_1 (pred, SCM_MAKE_CHAR (k));
if (!SCM_FALSEP (res))
- p[k / SCM_BITS_PER_LONG] |= 1 << (k % SCM_BITS_PER_LONG);
+ p[k / SCM_BITS_PER_LONG] |= 1L << (k % SCM_BITS_PER_LONG);
}
}
return ret;
@@ -661,7 +662,7 @@
SCM res = scm_call_1 (pred, SCM_MAKE_CHAR (k));
if (!SCM_FALSEP (res))
- p[k / SCM_BITS_PER_LONG] |= 1 << (k % SCM_BITS_PER_LONG);
+ p[k / SCM_BITS_PER_LONG] |= 1L << (k % SCM_BITS_PER_LONG);
}
}
return base_cs;
@@ -715,7 +716,7 @@
p = (long *) SCM_SMOB_DATA (cs);
while (clower < cupper)
{
- p[clower / SCM_BITS_PER_LONG] |= 1 << (clower % SCM_BITS_PER_LONG);
+ p[clower / SCM_BITS_PER_LONG] |= 1L << (clower % SCM_BITS_PER_LONG);
clower++;
}
return cs;
@@ -758,7 +759,7 @@
p = (long *) SCM_SMOB_DATA (base_cs);
while (clower < cupper)
{
- p[clower / SCM_BITS_PER_LONG] |= 1 << (clower % SCM_BITS_PER_LONG);
+ p[clower / SCM_BITS_PER_LONG] |= 1L << (clower % SCM_BITS_PER_LONG);
clower++;
}
return base_cs;
@@ -931,7 +932,7 @@
SCM_VALIDATE_CHAR_COPY (1, chr, c);
rest = SCM_CDR (rest);
- p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG);
+ p[c / SCM_BITS_PER_LONG] |= 1L << (c % SCM_BITS_PER_LONG);
}
return cs;
}
@@ -959,7 +960,7 @@
SCM_VALIDATE_CHAR_COPY (1, chr, c);
rest = SCM_CDR (rest);
- p[c / SCM_BITS_PER_LONG] &= ~(1 << (c % SCM_BITS_PER_LONG));
+ p[c / SCM_BITS_PER_LONG] &= ~(1L << (c % SCM_BITS_PER_LONG));
}
return cs;
}
@@ -986,7 +987,7 @@
SCM_VALIDATE_CHAR_COPY (1, chr, c);
rest = SCM_CDR (rest);
- p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG);
+ p[c / SCM_BITS_PER_LONG] |= 1L << (c % SCM_BITS_PER_LONG);
}
return cs;
}
@@ -1013,7 +1014,7 @@
SCM_VALIDATE_CHAR_COPY (1, chr, c);
rest = SCM_CDR (rest);
- p[c / SCM_BITS_PER_LONG] &= ~(1 << (c % SCM_BITS_PER_LONG));
+ p[c / SCM_BITS_PER_LONG] &= ~(1L << (c % SCM_BITS_PER_LONG));
}
return cs;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- guile/guile-core/srfi srfi-14.c,
Thien-Thi Nguyen <=