1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-07 19:06:32 +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

@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.49 2000/11/20 20:36:47 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.50 2000/12/03 20:45:33 tgl Exp $
*
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
@@ -71,7 +71,7 @@ case_translate_language_name(const char *input, char *output)
int i;
for (i = 0; i < NAMEDATALEN-1 && input[i]; ++i)
output[i] = tolower(input[i]);
output[i] = tolower((unsigned char) input[i]);
output[i] = '\0';

View File

@@ -31,7 +31,7 @@ case_translate_language_name(const char *input, char *output)
int i;
for (i = 0; i < NAMEDATALEN && input[i]; ++i)
output[i] = tolower(input[i]);
output[i] = tolower((unsigned char) input[i]);
output[i] = '\0';

View File

@@ -473,9 +473,8 @@ get_seq_name(text *seqin)
*/
for (; *rawname; rawname++)
{
if (isascii((int) *rawname) &&
isupper((int) *rawname))
*rawname = tolower(*rawname);
if (isupper((unsigned char) *rawname))
*rawname = tolower((unsigned char) *rawname);
}
}
return seqname;

View File

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.43 2000/10/26 17:31:34 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.44 2000/12/03 20:45:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -104,7 +104,7 @@ get_token(char **tok, char **val, char *str)
return NULL;
/* skip leading white space */
while (isspace((int) *str))
while (isspace((unsigned char) *str))
str++;
/* end of string? then return NULL */
@@ -118,7 +118,8 @@ get_token(char **tok, char **val, char *str)
*tok = str;
/* Advance to end of word */
while (*str && !isspace((int) *str) && *str != ',' && *str != '=')
while (*str && !isspace((unsigned char) *str) &&
*str != ',' && *str != '=')
str++;
/* Terminate word string for caller */
@@ -126,7 +127,7 @@ get_token(char **tok, char **val, char *str)
*str = '\0';
/* Skip any whitespace */
while (isspace((int) ch))
while (isspace((unsigned char) ch))
ch = *(++str);
/* end of string? */
@@ -144,7 +145,7 @@ get_token(char **tok, char **val, char *str)
str++;
/* skip whitespace after '=' */
while (isspace((int) *str))
while (isspace((unsigned char) *str))
str++;
if (*str == ',' || *str == '\0')
@@ -154,7 +155,7 @@ get_token(char **tok, char **val, char *str)
*val = str;
/* Advance to end of word */
while (*str && !isspace((int) *str) && *str != ',')
while (*str && !isspace((unsigned char) *str) && *str != ',')
str++;
/* Terminate word string for caller */
@@ -162,7 +163,7 @@ get_token(char **tok, char **val, char *str)
*str = '\0';
/* Skip any whitespace */
while (isspace((int) ch))
while (isspace((unsigned char) ch))
ch = *(++str);
/* end of string? */