From: Kim F. Storm Date: Thu, 4 Nov 2004 23:12:33 +0000 (+0000) Subject: (fontset_pattern_regexp): Use unsigned char. X-Git-Tag: ttn-vms-21-2-B4~4184 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6cc06608ad4a8d97ab0bdd10879ceeb18593f425;p=emacs.git (fontset_pattern_regexp): Use unsigned char. --- diff --git a/src/fontset.c b/src/fontset.c index fc4da1305f3..6d2840ffd26 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -789,9 +789,9 @@ fontset_pattern_regexp (pattern) || 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 @@ fontset_pattern_regexp (pattern) 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] != '\\') {