changeset 57947:678d2c0d522e

(fontset_pattern_regexp): Use unsigned char.
author Kim F. Storm <storm@cua.dk>
date Thu, 04 Nov 2004 23:12:33 +0000
parents de92b2015bb2
children 481911368712
files src/fontset.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/fontset.c	Thu Nov 04 23:08:07 2004 +0000
+++ b/src/fontset.c	Thu Nov 04 23:12:33 2004 +0000
@@ -789,9 +789,9 @@
       || strcmp (SDATA (pattern), CACHED_FONTSET_NAME))
     {
       /* We must at first update the cached data.  */
-      char *regex, *p0, *p1;
+      unsigned char *regex, *p0, *p1;
       int ndashes = 0, nstars = 0;
-      
+
       for (p0 = SDATA (pattern); *p0; p0++)
 	{
 	  if (*p0 == '-')
@@ -804,12 +804,12 @@
 	 we convert "*" to "[^-]*" which is much faster in regular
 	 expression matching.  */
       if (ndashes < 14)
-	p1 = regex = (char *) alloca (SBYTES (pattern) + 2 * nstars + 1);
+	p1 = regex = (unsigned char *) alloca (SBYTES (pattern) + 2 * nstars + 1);
       else
-	p1 = regex = (char *) alloca (SBYTES (pattern) + 5 * nstars + 1);
+	p1 = regex = (unsigned char *) alloca (SBYTES (pattern) + 5 * nstars + 1);
 
       *p1++ = '^';
-      for (p0 = (char *) SDATA (pattern); *p0; p0++)
+      for (p0 = SDATA (pattern); *p0; p0++)
 	{
 	  if (*p0 == '*' && p0 > SDATA (pattern) && p0[-1] != '\\')
 	    {