Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
996eb580
Commit
996eb580
authored
Jan 05, 2002
by
Howard Chu
Browse files
Fix ASCII detection; can't use "< 0x80" on a signed char.
parent
f3b61d87
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ldap_pvt.h
View file @
996eb580
...
...
@@ -106,7 +106,7 @@ LDAP_F (void) ldap_pvt_hex_unescape LDAP_P(( char *s ));
* these macros assume 'x' is an ASCII x
* and assume the "C" locale
*/
#define LDAP_ASCII(c) ((c)
<
0x80)
#define LDAP_ASCII(c)
(!
((c)
&
0x80)
)
#define LDAP_SPACE(c) ((c) == ' ' || (c) == '\t' || (c) == '\n')
#define LDAP_DIGIT(c) ((c) >= '0' && (c) <= '9')
#define LDAP_LOWER(c) ((c) >= 'a' && (c) <= 'z')
...
...
include/ldap_pvt_uc.h
View file @
996eb580
...
...
@@ -77,7 +77,7 @@ LDAP_F (char*) ldap_utf8_strtok( char* sp, const char* sep, char **last);
/* Optimizations */
LDAP_V
(
const
char
)
ldap_utf8_lentab
[
128
];
#define LDAP_UTF8_ISASCII(p) ( *(unsigned char *)(p)
^
0x80 )
#define LDAP_UTF8_ISASCII(p) (
!(
*(unsigned char *)(p)
&
0x80 )
)
#define LDAP_UTF8_CHARLEN(p) ( LDAP_UTF8_ISASCII(p) \
? 1 : ldap_utf8_lentab[*(unsigned char *)(p) ^ 0x80] )
#define LDAP_UTF8_OFFSET(p) ( LDAP_UTF8_ISASCII(p) \
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment