*
* Copyright (c) 2000-2010, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.228 2010/08/14 14:20:35 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.229 2010/08/25 00:53:37 tgl Exp $
*/
#include "postgres_fe.h"
#include "command.h"
*/
/* skip trailing whitespace */
- while (c > func && isascii(*c) && isspace(*c))
+ while (c > func && isascii((unsigned char) *c) && isspace((unsigned char) *c))
c--;
/* must have a digit as last non-space char */
- if (c == func || !isascii(*c) || !isdigit(*c))
+ if (c == func || !isascii((unsigned char) *c) || !isdigit((unsigned char) *c))
return -1;
/* find start of digit string */
- while (c > func && isascii(*c) && isdigit(*c))
+ while (c > func && isascii((unsigned char) *c) && isdigit((unsigned char) *c))
c--;
/* digits must be separated from func name by space or closing paren */
/* notice also that we are not allowing an empty func name ... */
- if (c == func || !isascii(*c) || !(isspace(*c) || *c == ')'))
+ if (c == func || !isascii((unsigned char) *c) ||
+ !(isspace((unsigned char) *c) || *c == ')'))
return -1;
/* parse digit string */