diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-06-11 17:28:39 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-06-11 17:28:39 -0700 |
commit | 13e10e81bdb29fb661231b51086dd542da76b8ee (patch) | |
tree | 2d6b0b94788c902d10674a83d87a7efe47ccd320 /ascii_strcasecmp.c | |
parent | 3dd9240cc311f3c617d68764a6e6a1a21a77c6a6 (diff) | |
download | tcpdump-13e10e81bdb29fb661231b51086dd542da76b8ee.tar.gz |
Map *ONLY* ASCII letters; don't map anything with the 8th bit set.
Diffstat (limited to 'ascii_strcasecmp.c')
-rw-r--r-- | ascii_strcasecmp.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/ascii_strcasecmp.c b/ascii_strcasecmp.c index 05e587d7..4d63ab2e 100644 --- a/ascii_strcasecmp.c +++ b/ascii_strcasecmp.c @@ -13,12 +13,10 @@ #include "ascii_strcasecmp.h" /* - * This array is designed for mapping upper and lower case letters - * together for a case independent comparison. The mappings are - * based upon ASCII character sequences; all values other than - * ASCII letters are mapped to themselves, so this is locale- - * independent and intended to be locale-independent, to avoid - * issues with, for example, "i" and "I" not being lower-case + * This array maps upper-case ASCII letters to their lower-case + * equivalents; all other byte values are mapped to themselves, + * so this is locale-independent and intended to be locale-independent, + * to avoid issues with, for example, "i" and "I" not being lower-case * and upper-case versions of the same letter in Turkish, where * there are separate "i with dot" and "i without dot" letters. */ @@ -47,10 +45,10 @@ static const unsigned char charmap[] = { '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', - '\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347', - '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', - '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', - '\370', '\371', '\372', '\333', '\334', '\335', '\336', '\337', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', |