Lines 1350-1356
rfc_ncasecmp (char *str1, char *str2, int n)
Link Here
|
1350 |
register unsigned char *s2 = (unsigned char *) str2; |
1350 |
register unsigned char *s2 = (unsigned char *) str2; |
1351 |
register int res; |
1351 |
register int res; |
1352 |
|
1352 |
|
1353 |
while ((res = rfc_tolower (*s1) - rfc_tolower (*s2)) == 0) |
1353 |
while ((res = hal_casecomp(s1,s2)) == 0) |
1354 |
{ |
1354 |
{ |
1355 |
s1++; |
1355 |
s1++; |
1356 |
s2++; |
1356 |
s2++; |
Lines 1361-1366
rfc_ncasecmp (char *str1, char *str2, int n)
Link Here
|
1361 |
return (res); |
1361 |
return (res); |
1362 |
} |
1362 |
} |
1363 |
|
1363 |
|
|
|
1364 |
int |
1365 |
hal_casecomp ( char *s1, char *s2) |
1366 |
{ |
1367 |
|
1368 |
/* This function, called by rfc_ncasecmp, enables enhanced tab |
1369 |
* completition: It completes te<tab> to Test but not Te<tab> to |
1370 |
* test2. (This is useful if you have two users Test1 and test2 in |
1371 |
* the channel. Can be toggeled wit /set completion_cinsens (0|1) |
1372 |
* |
1373 |
* -- Mathias Weyland <mathias@weyland.ch>, 6.9.2004 |
1374 |
*/ |
1375 |
if((*s2 - rfc_tolower (*s2)) || prefs.completion_cinsens) |
1376 |
{ |
1377 |
return (rfc_tolower (*s1) - rfc_tolower (*s2)); |
1378 |
} else { |
1379 |
return (*s1 - *s2); |
1380 |
} |
1381 |
} |
1382 |
|
1364 |
const unsigned char rfc_tolowertab[] = |
1383 |
const unsigned char rfc_tolowertab[] = |
1365 |
{ 0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, |
1384 |
{ 0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, |
1366 |
0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, |
1385 |
0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, |