|
3 | 3 | *
|
4 | 4 | * Copyright (c) 2000-2010, PostgreSQL Global Development Group
|
5 | 5 | *
|
6 |
| - * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.228 2010/08/14 14:20:35 tgl Exp $ |
| 6 | + * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.229 2010/08/25 00:53:37 tgl Exp $ |
7 | 7 | */
|
8 | 8 | #include"postgres_fe.h"
|
9 | 9 | #include"command.h"
|
@@ -2452,20 +2452,21 @@ strip_lineno_from_funcdesc(char *func)
|
2452 | 2452 | */
|
2453 | 2453 |
|
2454 | 2454 | /* skip trailing whitespace */
|
2455 |
| -while (c>func&&isascii(*c)&&isspace(*c)) |
| 2455 | +while (c>func&&isascii((unsignedchar)*c)&&isspace((unsignedchar)*c)) |
2456 | 2456 | c--;
|
2457 | 2457 |
|
2458 | 2458 | /* must have a digit as last non-space char */
|
2459 |
| -if (c==func|| !isascii(*c)|| !isdigit(*c)) |
| 2459 | +if (c==func|| !isascii((unsignedchar)*c)|| !isdigit((unsignedchar)*c)) |
2460 | 2460 | return-1;
|
2461 | 2461 |
|
2462 | 2462 | /* find start of digit string */
|
2463 |
| -while (c>func&&isascii(*c)&&isdigit(*c)) |
| 2463 | +while (c>func&&isascii((unsignedchar)*c)&&isdigit((unsignedchar)*c)) |
2464 | 2464 | c--;
|
2465 | 2465 |
|
2466 | 2466 | /* digits must be separated from func name by space or closing paren */
|
2467 | 2467 | /* notice also that we are not allowing an empty func name ... */
|
2468 |
| -if (c==func|| !isascii(*c)|| !(isspace(*c)||*c==')')) |
| 2468 | +if (c==func|| !isascii((unsignedchar)*c)|| |
| 2469 | +!(isspace((unsignedchar)*c)||*c==')')) |
2469 | 2470 | return-1;
|
2470 | 2471 |
|
2471 | 2472 | /* parse digit string */
|
|