#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "mwm.h"
Go to the source code of this file.
Functions | |
int | FatalError (char *,...) |
UINT64 | mwmGetPatByteCount () |
void | mwmResetByteCount () |
static void | init_xlatcase () |
static INLINE void | ConvCaseToUpper (unsigned char *s, int m) |
static INLINE void | ConvCaseToUpperEx (unsigned char *d, unsigned char *s, int m) |
HBM_STRUCT * | hbm_prepx (HBM_STRUCT *p, unsigned char *pat, int m) |
HBM_STRUCT * | hbm_prep (unsigned char *pat, int m) |
static INLINE unsigned char * | hbm_match (HBM_STRUCT *px, unsigned char *text, int n) |
void * | mwmNew () |
void | mwmFree (void *pv) |
int | mwmAddPatternEx (void *pv, unsigned char *P, int m, unsigned noCase, unsigned offset, unsigned depth, void *id, int iid) |
int | mwmAddPattern (void *pv, unsigned char *P, int m, unsigned id) |
static int | bcompare (unsigned char *a, int alen, unsigned char *b, int blen) |
static int CDECL | sortcmp (const void *e1, const void *e2) |
static unsigned | HASH16 (unsigned char *T) |
static void | mwmPrepHashedPatternGroups (MWM_STRUCT *ps) |
static void | mwmPrepBadCharTable (MWM_STRUCT *ps) |
static void | mbmPrepBadWordTable (MWM_STRUCT *ps) |
void | mwmShowStats (void *pv) |
static void | mwmAnalyzePattens (MWM_STRUCT *ps) |
void | mwmLargeShifts (void *pv, int flag) |
int | mwmGetNumPatterns (void *pv) |
void | mwmSetRuleMask (void *pv, BITOP *rm) |
static INLINE int | mwmGroupMatch2 (MWM_STRUCT *ps, int index, unsigned char *Tx, unsigned char *T, unsigned char *Tc, int Tleft, void *data, int(*match)(void *, int, void *)) |
static int | mwmSearchExNoBC (MWM_STRUCT *ps, unsigned char *Tx, int n, unsigned char *Tc, int(*match)(void *id, int index, void *data), void *data) |
static int | mwmSearchExBC (MWM_STRUCT *ps, unsigned char *Tx, int n, unsigned char *Tc, int(*match)(void *id, int index, void *data), void *data) |
static int | mwmSearchExBW (MWM_STRUCT *ps, unsigned char *Tx, int n, unsigned char *Tc, int(*match)(void *id, int index, void *data), void *data) |
static void | show_bytes (unsigned n, unsigned char *p) |
void | mwmGroupDetails (void *pv) |
int | mwmPrepPatterns (void *pv) |
int | mwmSearch (void *pv, unsigned char *T, int n, int(*match)(void *id, int index, void *data), void *data) |
void | mwmFeatures (void) |
Variables | |
static UINT64 | iPatCount = 0 |
static unsigned char | xlatcase [256] |
static unsigned char | S [65536] |
|
Definition at line 598 of file mwm.c. References memcmp(). Referenced by sortcmp(). |
|
Definition at line 240 of file mwm.c. References xlatcase. Referenced by mwmAddPatternEx(). |
|
Definition at line 252 of file mwm.c. References xlatcase. Referenced by mwmSearch(). |
|
|
Definition at line 632 of file mwm.c. Referenced by mwmPrepHashedPatternGroups(). |
|
Definition at line 328 of file mwm.c. References HBM_STRUCT::bcShift, HBM_STRUCT::M, and HBM_STRUCT::P. |
|
Definition at line 295 of file mwm.c. References hbm_prepx(). Referenced by mwmPrepPatterns(). |
|
Definition at line 268 of file mwm.c. References HBM_STRUCT::bcShift, HBM_STRUCT::M, memcpy, and HBM_STRUCT::P. |
|
Definition at line 227 of file mwm.c. References xlatcase. |
|
Definition at line 749 of file mwm.c. References BWSHIFTABLESIZE, _mwm_struct::msNumPatterns, _mwm_struct::msPatArray, _mwm_struct::msShift2, _mwm_struct::msShiftLen, _mwm_pattern_struct::psLen, and _mwm_pattern_struct::psPat. Referenced by mwmPrepPatterns(). |
|
Definition at line 580 of file mwm.c. References mwmAddPatternEx(). |
|
|
Definition at line 830 of file mwm.c. References memset, _mwm_struct::msLargest, _mwm_struct::msLengths, _mwm_struct::msNumPatterns, _mwm_struct::msPatArray, and _mwm_pattern_struct::psLen. Referenced by mwmPrepPatterns(). |
|
Definition at line 1426 of file mwm.c. References MWM_FEATURES. |
|
Definition at line 419 of file mwm.c. References _mwm_struct::msHash, _mwm_struct::msNumArray, _mwm_struct::msPatArray, and _mwm_struct::msShift2. Referenced by mpseFree(). |
|
Definition at line 862 of file mwm.c. References _mwm_struct::msNumPatterns. |
|
Definition at line 202 of file mwm.c. References iPatCount. |
|
Definition at line 1203 of file mwm.c. References HASH_TYPE, _mwm_struct::msHash, _mwm_struct::msNumArray, _mwm_struct::msPatArray, _mwm_pattern_struct::psLen, _mwm_pattern_struct::psPat, and show_bytes(). |
|
Definition at line 890 of file mwm.c. References boIsBitSet(), HASHBYTES16, memcmp(), _mwm_struct::msNumArray, _mwm_struct::msPatArray, _mwm_pattern_struct::psID, _mwm_pattern_struct::psIID, _mwm_pattern_struct::psLen, _mwm_pattern_struct::psNoCase, _mwm_pattern_struct::psPat, _mwm_pattern_struct::psPatCase, and _mwm_struct::RuleMask. Referenced by mwmSearchExBC(), mwmSearchExBW(), and mwmSearchExNoBC(). |
|
Definition at line 853 of file mwm.c. References _mwm_struct::msLargeShifts. Referenced by mpseLargeShifts(). |
|
Definition at line 400 of file mwm.c. References init_xlatcase(), and _mwm_struct::msSmallest. Referenced by mpseNew(). |
|
Definition at line 705 of file mwm.c. References _mwm_struct::msNumPatterns, _mwm_struct::msPatArray, _mwm_struct::msShift, _mwm_struct::msShiftLen, _mwm_pattern_struct::psLen, and _mwm_pattern_struct::psPat. Referenced by mwmPrepPatterns(). |
|
Definition at line 640 of file mwm.c. References FatalError(), HASH16(), HASH_TYPE, HASHTABLESIZE, and int(). Referenced by mwmPrepPatterns(). |
|
|
Definition at line 207 of file mwm.c. References iPatCount. |
|
Definition at line 1352 of file mwm.c. References ConvCaseToUpperEx(), hbm_match(), iPatCount, memcmp(), _mwm_struct::msMethod, _mwm_struct::msNumPatterns, _mwm_struct::msPatArray, MTH_BM, NULL, _mwm_pattern_struct::psBmh, _mwm_pattern_struct::psID, _mwm_pattern_struct::psLen, _mwm_pattern_struct::psNoCase, _mwm_pattern_struct::psPatCase, S, and _mwm_struct::search. Referenced by mpseSearch(). |
|
Definition at line 1057 of file mwm.c. References HASH_TYPE, _mwm_struct::msHash, _mwm_struct::msShift, _mwm_struct::msShiftLen, and mwmGroupMatch2(). Referenced by mwmPrepPatterns(). |
|
Definition at line 1129 of file mwm.c. References HASH_TYPE, _mwm_struct::msHash, _mwm_struct::msShift2, _mwm_struct::msShiftLen, and mwmGroupMatch2(). Referenced by mwmPrepPatterns(). |
|
Definition at line 967 of file mwm.c. References HASH_TYPE, _mwm_struct::msHash, _mwm_struct::msHash1, _mwm_struct::msNumArray, _mwm_struct::msPatArray, _mwm_struct::msShiftLen, mwmGroupMatch2(), _mwm_pattern_struct::psID, _mwm_pattern_struct::psNoCase, and _mwm_pattern_struct::psPatCase. Referenced by mwmPrepPatterns(). |
|
Definition at line 873 of file mwm.c. References _mwm_struct::RuleMask. Referenced by mpseSetRuleMask(). |
|
Definition at line 804 of file mwm.c. References _mwm_struct::msAvg, _mwm_struct::msLargest, _mwm_struct::msLengths, _mwm_struct::msNumPatterns, _mwm_struct::msSmallest, and _mwm_struct::msTotal. |
|
Definition at line 1189 of file mwm.c. References int(). Referenced by mwmGroupDetails(). |
|
Definition at line 622 of file mwm.c. References bcompare(), _mwm_pattern_struct::psLen, and _mwm_pattern_struct::psPat. Referenced by mwmPrepPatterns(). |
|
Definition at line 200 of file mwm.c. Referenced by mwmGetPatByteCount(), mwmResetByteCount(), and mwmSearch(). |
|
Definition at line 222 of file mwm.c. Referenced by mwmSearch(). |
|
|