mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-10 01:43:12 +02:00
Made match() a little bit faster
This commit is contained in:
@@ -540,3 +540,4 @@ seen. gmtime warning still there
|
||||
- Changed how hooks work, making them support voidfuncs
|
||||
- Added src/modules/scan.c and src/modules/scan_dummy.c
|
||||
- Made militime() just as accurate on win32 as on linux
|
||||
- Made match() a little bit faster
|
||||
|
||||
+4
-6
@@ -44,10 +44,9 @@ u_char touppertab[], tolowertab[];
|
||||
static inline match2(mask, name)
|
||||
char *mask, *name;
|
||||
{
|
||||
u_char *m; /* why didn't the old one use registers ?!??!?!?! */
|
||||
u_char *n;
|
||||
u_char *m; /* why didn't the old one use registers */
|
||||
u_char *n; /* because registers suck -- codemastr */
|
||||
u_char cm;
|
||||
u_char *mylowertab;
|
||||
u_char *wsn;
|
||||
u_char *wsm;
|
||||
|
||||
@@ -56,9 +55,8 @@ static inline match2(mask, name)
|
||||
cm = *m;
|
||||
|
||||
#ifndef USE_LOCALE
|
||||
mylowertab = tolowertab2;
|
||||
#define lc(x) mylowertab[x] /* use mylowertab, because registers are FASTER */
|
||||
#else
|
||||
#define lc(x) tolowertab2[x] /* use mylowertab, because registers are FASTER */
|
||||
#else /* maybe in the old 4mb hard drive days but not anymore -- codemastr */
|
||||
#define lc(x) tolower(x)
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user