1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +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/tab-complete.c,v 1.23 2000/12/03 14:36:47 petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.24 2000/12/03 20:45:38 tgl Exp $
*/
/*----------------------------------------------------------------------
@@ -50,7 +50,7 @@
/* If we don't have this, we might as well forget about the whole thing: */
#ifdef USE_READLINE
#include <ctype.h> /* toupper */
#include <ctype.h>
#ifdef USE_ASSERT_CHECKING
#include <assert.h>
#endif
@@ -440,7 +440,8 @@ psql_completion(char *text, int start, int end)
/* Complete "AS ON <sth with a 'T' :)>" with a "TO" */
else if (strcasecmp(prev3_wd, "AS") == 0 &&
strcasecmp(prev2_wd, "ON") == 0 &&
(toupper(prev_wd[4]) == 'T' || toupper(prev_wd[5]) == 'T'))
(toupper((unsigned char) prev_wd[4]) == 'T' ||
toupper((unsigned char) prev_wd[5]) == 'T'))
COMPLETE_WITH_CONST("TO");
/* Complete "AS ON <sth> TO" with a table name */
else if (strcasecmp(prev4_wd, "AS") == 0 &&