From owner-svn-src-user@FreeBSD.ORG Fri Sep 2 18:48:44 2011 Return-Path: Delivered-To: svn-src-user@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4B851065672; Fri, 2 Sep 2011 18:48:44 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 549F48FC08; Fri, 2 Sep 2011 18:48:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id p82ImgOi028472; Fri, 2 Sep 2011 22:48:42 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id p82Img5m028471; Fri, 2 Sep 2011 22:48:42 +0400 (MSK) (envelope-from ache) Date: Fri, 2 Sep 2011 22:48:42 +0400 From: Andrey Chernov To: Gabor Kovesdan Message-ID: <20110902184842.GA28351@vniz.net> Mail-Followup-To: Andrey Chernov , Gabor Kovesdan , src-committers@FreeBSD.ORG, svn-src-user@FreeBSD.ORG References: <201109021818.p82IIO73010722@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201109021818.p82IIO73010722@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.ORG, svn-src-user@FreeBSD.ORG Subject: Re: svn commit: r225347 - user/gabor/tre-integration/contrib/tre/lib X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 18:48:44 -0000 On Fri, Sep 02, 2011 at 06:18:24PM +0000, Gabor Kovesdan wrote: > { \ > char c = islower(fg->pattern[i]) ? toupper(fg->pattern[i]) \ > : tolower(fg->pattern[i]); \ > - fg->qsBc[(unsigned)c] = fg->len - i; \ > + fg->qsBc[(unsigned char)c] = fg->len - i; \ It looks like there should be char c = islower((unsigned char)fg->pattern[i]) ? \ toupper((unsigned char)fg->pattern[i]) : \ tolower((unsigned char)fg->pattern[i]); \ I don't see whole code, it depends on what type fg->pattern[i] have. Due to their bad design ctype macros can't be called directly on signed (i.e. default) char type, unless its value is known to be 7bit. BTW, I don't understand the intention of that expression. You turn lower to upper and upper to lower. Ignore case mode converts all to single case instead. -- http://ache.vniz.net/