1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +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

@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.41 2000/11/27 02:20:36 tgl Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.42 2000/12/03 20:45:38 tgl Exp $
*/
#include "postgres.h"
#include "command.h"
@ -142,7 +142,7 @@ HandleSlashCmds(const char *line,
status = exec_command(new_cmd, my_line + 1, &continue_parse, query_buf);
#if 0 /* turned out to be too annoying */
if (status != CMD_UNKNOWN && isalpha(new_cmd[0]))
if (status != CMD_UNKNOWN && isalpha((unsigned char) new_cmd[0]))
psql_error("Warning: this syntax is deprecated\n");
#endif
}
@ -1070,8 +1070,8 @@ scan_option(char **string, enum option_type type, char *quote)
if (type == OT_SQLID)
for (cp = return_val; *cp; cp += PQmblen(cp, pset.encoding))
if (isascii(*cp))
*cp = tolower(*cp);
if (isupper((unsigned char) *cp))
*cp = tolower((unsigned char) *cp);
*string = &options_string[pos + token_end];
return return_val;