1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +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

@ -5,7 +5,7 @@
*
* 1998 Jan Wieck
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.34 2000/08/01 18:29:35 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.35 2000/12/03 20:45:36 tgl Exp $
*
* ----------
*/
@ -2339,7 +2339,7 @@ set_var_from_str(char *str, NumericVar *dest)
while (*cp)
{
if (!isspace((int) *cp))
if (!isspace((unsigned char) *cp))
break;
cp++;
}
@ -2368,12 +2368,12 @@ set_var_from_str(char *str, NumericVar *dest)
cp++;
}
if (!isdigit((int) *cp))
if (!isdigit((unsigned char) *cp))
elog(ERROR, "Bad numeric input format '%s'", str);
while (*cp)
{
if (isdigit((int) *cp))
if (isdigit((unsigned char) *cp))
{
dest->digits[i++] = *cp++ - '0';
if (!have_dp)
@ -2416,7 +2416,7 @@ set_var_from_str(char *str, NumericVar *dest)
/* Should be nothing left but spaces */
while (*cp)
{
if (!isspace((int) *cp))
if (!isspace((unsigned char) *cp))
elog(ERROR, "Bad numeric input format '%s'", str);
cp++;
}