Fix IS ASCII checks. Should be < 0x80 (0100), not < 0x100.

This commit is contained in:
Kurt Zeilenga 2000-10-23 18:04:45 +00:00
parent 52402fa752
commit 2504f29a0c
2 changed files with 3 additions and 3 deletions

View file

@ -82,7 +82,7 @@ LDAP_F (char *) ldap_utf8_strpbrk( const char* str, const char *set);
LDAP_F (char*) ldap_utf8_strtok( char* sp, const char* sep, char **last);
/* Optimizations */
#define LDAP_UTF8_ISASCII(p) ( * (const unsigned char *) (p) < 0x100 )
#define LDAP_UTF8_ISASCII(p) ( * (const unsigned char *) (p) < 0x80 )
#define LDAP_UTF8_CHARLEN(p) ( LDAP_UTF8_ISASCII(p) \
? 1 : ldap_utf8_charlen((p)) )
#define LDAP_UTF8_OFFSET(p) ( LDAP_UTF8_ISASCII(p) \

View file

@ -29,7 +29,7 @@
#include "ldap_defaults.h"
#undef ISASCII
#define ISASCII(uc) ((uc) < 0x100)
#define ISASCII(uc) ((uc) < 0x80)
/*
* Basic UTF-8 routines
@ -264,7 +264,7 @@ int ldap_utf8_copy( char* dst, const char *src )
/*
* UTF-8 ctype routines
* Only deals with characters < 0x100 (ie: US-ASCII)
* Only deals with characters < 0x80 (ie: US-ASCII)
*/
int ldap_utf8_isascii( const char * p )