mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
Clean up some signedness warnings.
This commit is contained in:
parent
1a7be5cc7e
commit
b35fdaaa1a
@ -9,14 +9,16 @@
|
|||||||
bool
|
bool
|
||||||
RS_isRegis(const char *str)
|
RS_isRegis(const char *str)
|
||||||
{
|
{
|
||||||
unsigned char *ptr = (unsigned char *) str;
|
while (str && *str)
|
||||||
|
{
|
||||||
while (ptr && *ptr)
|
if (t_isalpha(str) ||
|
||||||
if (t_isalpha(ptr) || t_iseq(ptr,'[') || t_iseq(ptr,']') || t_iseq(ptr, '^'))
|
t_iseq(str, '[') ||
|
||||||
ptr+=pg_mblen(ptr);
|
t_iseq(str,']') ||
|
||||||
|
t_iseq(str, '^'))
|
||||||
|
str += pg_mblen(str);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ char2wchar(wchar_t *to, const char *from, size_t len)
|
|||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
|
|
||||||
int
|
int
|
||||||
_t_isalpha( char *ptr ) {
|
_t_isalpha( const char *ptr ) {
|
||||||
wchar_t character;
|
wchar_t character;
|
||||||
|
|
||||||
char2wchar(&character, ptr, 1);
|
char2wchar(&character, ptr, 1);
|
||||||
@ -83,7 +83,7 @@ _t_isalpha( char *ptr ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
_t_isprint( char *ptr ) {
|
_t_isprint( const char *ptr ) {
|
||||||
wchar_t character;
|
wchar_t character;
|
||||||
|
|
||||||
char2wchar(&character, ptr, 1);
|
char2wchar(&character, ptr, 1);
|
||||||
|
@ -44,9 +44,9 @@ size_t char2wchar(wchar_t *to, const char *from, size_t len);
|
|||||||
|
|
||||||
#define t_isdigit(x) ( pg_mblen(x)==1 && isdigit( TOUCHAR(x) ) )
|
#define t_isdigit(x) ( pg_mblen(x)==1 && isdigit( TOUCHAR(x) ) )
|
||||||
#define t_isspace(x) ( pg_mblen(x)==1 && isspace( TOUCHAR(x) ) )
|
#define t_isspace(x) ( pg_mblen(x)==1 && isspace( TOUCHAR(x) ) )
|
||||||
int _t_isalpha( char *ptr );
|
extern int _t_isalpha( const char *ptr );
|
||||||
#define t_isalpha(x) ( (pg_mblen(x)==1) ? isalpha( TOUCHAR(x) ) : _t_isalpha(x) )
|
#define t_isalpha(x) ( (pg_mblen(x)==1) ? isalpha( TOUCHAR(x) ) : _t_isalpha(x) )
|
||||||
int _t_isprint( char *ptr );
|
extern int _t_isprint( const char *ptr );
|
||||||
#define t_isprint(x) ( (pg_mblen(x)==1) ? isprint( TOUCHAR(x) ) : _t_isprint(x) )
|
#define t_isprint(x) ( (pg_mblen(x)==1) ? isprint( TOUCHAR(x) ) : _t_isprint(x) )
|
||||||
/*
|
/*
|
||||||
* t_iseq() should be called only for ASCII symbols
|
* t_iseq() should be called only for ASCII symbols
|
||||||
|
Loading…
Reference in New Issue
Block a user