add case sensitive matching

This commit is contained in:
leitner
2002-04-03 23:53:12 +00:00
parent ebca2ebe43
commit 0221bf98a9
10 changed files with 307 additions and 35 deletions

14
byte_case_diff.c Normal file
View File

@@ -0,0 +1,14 @@
#include <ctype.h>
int byte_case_diff(const void* a, unsigned int len, const void* b) {
register const char* s=a;
register const char* t=b;
register const char* u=t+len;
register int j;
j=0;
for (;;) {
if (t==u) break; if ((j=(tolower(*s)-tolower(*t)))) break; ++s; ++t;
}
return j;
}