aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/arrayfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-12-03 20:45:40 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-12-03 20:45:40 +0000
commita27b691e2903a886be640db801677f6f988d3793 (patch)
treec68f25c9edef18954e9c5b3d74893f1df87b8871 /src/backend/utils/adt/arrayfuncs.c
parent4d2a506526ceacab5f75df040596a5287ab40612 (diff)
downloadpostgresql-a27b691e2903a886be640db801677f6f988d3793.tar.gz
postgresql-a27b691e2903a886be640db801677f6f988d3793.zip
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.
Diffstat (limited to 'src/backend/utils/adt/arrayfuncs.c')
-rw-r--r--src/backend/utils/adt/arrayfuncs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index 47c1b814c4d..6379f041ad6 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.66 2000/11/16 22:30:31 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.67 2000/12/03 20:45:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -146,14 +146,14 @@ array_in(PG_FUNCTION_ARGS)
* Note: we currently allow whitespace between, but not within,
* dimension items.
*/
- while (isspace((int) *p))
+ while (isspace((unsigned char) *p))
p++;
if (*p != '[')
break; /* no more dimension items */
p++;
if (ndim >= MAXDIM)
elog(ERROR, "array_in: more than %d dimensions", MAXDIM);
- for (q = p; isdigit((int) *q); q++);
+ for (q = p; isdigit((unsigned char) *q); q++);
if (q == p) /* no digits? */
elog(ERROR, "array_in: missing dimension value");
if (*q == ':')
@@ -162,7 +162,7 @@ array_in(PG_FUNCTION_ARGS)
*q = '\0';
lBound[ndim] = atoi(p);
p = q + 1;
- for (q = p; isdigit((int) *q); q++);
+ for (q = p; isdigit((unsigned char) *q); q++);
if (q == p) /* no digits? */
elog(ERROR, "array_in: missing dimension value");
}
@@ -197,7 +197,7 @@ array_in(PG_FUNCTION_ARGS)
if (strncmp(p, ASSGN, strlen(ASSGN)) != 0)
elog(ERROR, "array_in: missing assignment operator");
p += strlen(ASSGN);
- while (isspace((int) *p))
+ while (isspace((unsigned char) *p))
p++;
}
@@ -323,7 +323,7 @@ ArrayCount(char *str, int *dim, int typdelim)
temp[ndim - 1]++;
q++;
if (!eoArray)
- while (isspace((int) *q))
+ while (isspace((unsigned char) *q))
q++;
}
for (i = 0; i < ndim; ++i)
@@ -454,7 +454,7 @@ ReadArrayStr(char *arrayStr,
* if not at the end of the array skip white space
*/
if (!eoArray)
- while (isspace((int) *q))
+ while (isspace((unsigned char) *q))
{
p++;
q++;