delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/12/18/02:35:31

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Tue, 18 Dec 2001 02:33:27 -0500
From: AAganichev AT netscape DOT net (Alexander Aganichev)
To: djgpp-workers AT delorie DOT com
Subject: regcomp NLS fix
Message-ID: <4890F40B.025BA7D0.09ACFA57@netscape.net>
X-Mailer: Atlas Mailer 1.0
Reply-To: djgpp-workers AT delorie DOT com

Hi!

regcomp() sometimes crashes when NLS characters are in use. This patch seems to fix this (though I'm not sure whether NLS characters may be a problem in other places):

--- regcomp.old Sat Jun  9 23:50:56 2001
+++ regcomp.c   Mon Dec 17 23:53:16 2001
@@ -863,11 +863,12 @@
  == static void ordinary(register struct parse *p, register int ch);
  */
 static void
-ordinary(p, ch)
+ordinary(p, _ch)
 register struct parse *p;
-register int ch;
+register int _ch;
 {
    register cat_t *cap = p->g->categories;
+   register int ch = (unsigned char)_ch;
 
    if ((p->g->cflags&REG_ICASE) && isalpha(ch) && othercase(ch) != ch)
        bothcases(p, ch);

PS: What is about promised complaints on my locale patches? ;)

-- 
alexander aganichev
url: http://aaganichev.narod.ru



__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop AT Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019