diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-12-03 20:45:40 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-12-03 20:45:40 +0000 |
commit | a27b691e2903a886be640db801677f6f988d3793 (patch) | |
tree | c68f25c9edef18954e9c5b3d74893f1df87b8871 /src/bin/psql/command.c | |
parent | 4d2a506526ceacab5f75df040596a5287ab40612 (diff) |
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/bin/psql/command.c')
-rw-r--r-- | src/bin/psql/command.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 782c161c23a..3a47f8e15cf 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -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; |