1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Ensure that all uses of <ctype.h> functions are applied to unsigned-char

values, whether the local char type is signed or not.  This is necessary
for portability.  Per discussion on pghackers around 9/16/00.
This commit is contained in:
Tom Lane
2000-12-03 20:45:40 +00:00
parent 4d2a506526
commit a27b691e29
59 changed files with 318 additions and 303 deletions

View File

@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.83 2000/11/25 20:33:53 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.84 2000/12/03 20:45:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1421,7 +1421,7 @@ like_fixed_prefix(char *patt, bool case_insensitive,
* XXX I suspect isalpha() is not an adequately locale-sensitive
* test for characters that can vary under case folding?
*/
if (case_insensitive && isalpha((int) patt[pos]))
if (case_insensitive && isalpha((unsigned char) patt[pos]))
break;
/*
* NOTE: this code used to think that %% meant a literal %, but
@ -1504,7 +1504,7 @@ regex_fixed_prefix(char *patt, bool case_insensitive,
patt[pos] == '(' ||
patt[pos] == '[' ||
patt[pos] == '$' ||
(case_insensitive && isalpha((int) patt[pos])))
(case_insensitive && isalpha((unsigned char) patt[pos])))
break;
/*
* Check for quantifiers. Except for +, this means the preceding