Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

mwm.h File Reference

#include "bitop.h"

Go to the source code of this file.

Classes

struct  HBM_STRUCT

Defines

#define BITOP_TEST
#define UINT64   unsigned long long
#define COPY_PATTERNS
#define MWM_FEATURES   "MWM:BC/BW-SHIFT + 2-BYTE-HASH"
#define HASHTABLESIZE   (64*1024)
#define HASHBYTES16   2
#define MTH_MWM   0
#define MTH_BM   1
#define HASH_TYPE   short
#define BWSHIFTABLESIZE   (64*1024)

Typedefs

typedef _mwm_pattern_struct MWM_PATTERN_STRUCT
typedef _mwm_struct MWM_STRUCT

Functions

void * mwmNew (void)
void mwmFree (void *pv)
int mwmAddPatternEx (void *pv, unsigned char *P, int m, unsigned noCase, unsigned offset, unsigned depth, void *ID, int IID)
void mwmLargeShifts (void *pv, int flag)
int mwmPrepPatterns (void *pv)
void mwmSetRuleMask (void *pv, BITOP *rm)
int mwmSearch (void *pv, unsigned char *T, int n, int(*action)(void *id, int index, void *data), void *data)
UINT64 mwmGetPatByteCount ()
void mwmResetByteCount ()
int mwmAddPattern (void *pv, unsigned char *P, int m, unsigned id)
int mwmGetNumPatterns (void *pv)
void mwmFeatures (void)


Define Documentation

#define BITOP_TEST
 

Definition at line 34 of file mwm.h.

#define BWSHIFTABLESIZE   (64*1024)
 

Definition at line 140 of file mwm.h.

Referenced by mbmPrepBadWordTable().

#define COPY_PATTERNS
 

Definition at line 70 of file mwm.h.

#define HASH_TYPE   short
 

Definition at line 138 of file mwm.h.

Referenced by mwmGroupDetails(), mwmPrepHashedPatternGroups(), mwmSearchExBC(), mwmSearchExBW(), and mwmSearchExNoBC().

#define HASHBYTES16   2
 

Definition at line 81 of file mwm.h.

Referenced by mwmGroupMatch2().

#define HASHTABLESIZE   (64*1024)
 

Definition at line 80 of file mwm.h.

Referenced by mwmPrepHashedPatternGroups().

#define MTH_BM   1
 

Definition at line 136 of file mwm.h.

Referenced by mwmPrepPatterns(), and mwmSearch().

#define MTH_MWM   0
 

Definition at line 135 of file mwm.h.

Referenced by mwmPrepPatterns().

#define MWM_FEATURES   "MWM:BC/BW-SHIFT + 2-BYTE-HASH"
 

Definition at line 78 of file mwm.h.

Referenced by mwmFeatures().

#define UINT64   unsigned long long
 

Definition at line 51 of file mwm.h.


Typedef Documentation

typedef struct _mwm_pattern_struct MWM_PATTERN_STRUCT
 

typedef struct _mwm_struct MWM_STRUCT
 


Function Documentation

int mwmAddPattern void *  pv,
unsigned char *  P,
int  m,
unsigned  id
 

Definition at line 580 of file mwm.c.

References mwmAddPatternEx().

int mwmAddPatternEx void *  pv,
unsigned char *  P,
int  m,
unsigned  noCase,
unsigned  offset,
unsigned  depth,
void *  ID,
int  IID
 

Definition at line 439 of file mwm.c.

References ConvCaseToUpper(), memcmp(), memcpy, _mwm_struct::msAvg, _mwm_struct::msLargest, _mwm_struct::msNoCase, _mwm_struct::msNumPatterns, _mwm_struct::msSmallest, _mwm_struct::msTotal, _mwm_pattern_struct::next, NULL, _mwm_struct::plist, _mwm_pattern_struct::psDepth, _mwm_pattern_struct::psID, _mwm_pattern_struct::psIID, _mwm_pattern_struct::psLen, _mwm_pattern_struct::psNoCase, _mwm_pattern_struct::psOffset, _mwm_pattern_struct::psPat, and _mwm_pattern_struct::psPatCase.

Referenced by mpseAddPattern(), and mwmAddPattern().

void mwmFeatures void   ) 
 

Definition at line 1426 of file mwm.c.

References MWM_FEATURES.

void mwmFree void *  pv  ) 
 

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().

int mwmGetNumPatterns void *  pv  ) 
 

Definition at line 862 of file mwm.c.

References _mwm_struct::msNumPatterns.

UINT64 mwmGetPatByteCount  ) 
 

Definition at line 202 of file mwm.c.

References iPatCount.

void mwmLargeShifts void *  pv,
int  flag
 

Definition at line 853 of file mwm.c.

References _mwm_struct::msLargeShifts.

Referenced by mpseLargeShifts().

void* mwmNew void   ) 
 

Definition at line 400 of file mwm.c.

References init_xlatcase(), and _mwm_struct::msSmallest.

Referenced by mpseNew().

int mwmPrepPatterns void *  pv  ) 
 

Definition at line 1253 of file mwm.c.

References hbm_prep(), mbmPrepBadWordTable(), memcpy, _mwm_struct::msLargeShifts, _mwm_struct::msMethod, _mwm_struct::msNumArray, _mwm_struct::msNumPatterns, _mwm_struct::msPatArray, _mwm_struct::msShift2, _mwm_struct::msShiftLen, MTH_BM, MTH_MWM, mwmAnalyzePattens(), mwmPrepBadCharTable(), mwmPrepHashedPatternGroups(), mwmSearchExBC(), mwmSearchExBW(), mwmSearchExNoBC(), _mwm_pattern_struct::next, NULL, _mwm_struct::plist, _mwm_pattern_struct::psBmh, _mwm_pattern_struct::psLen, _mwm_pattern_struct::psPat, _mwm_struct::search, and sortcmp().

Referenced by mpsePrepPatterns().

void mwmResetByteCount  ) 
 

Definition at line 207 of file mwm.c.

References iPatCount.

int mwmSearch void *  pv,
unsigned char *  T,
int  n,
int(*)(void *id, int index, void *data)  action,
void *  data
 

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().

void mwmSetRuleMask void *  pv,
BITOP rm
 

Definition at line 873 of file mwm.c.

References _mwm_struct::RuleMask.

Referenced by mpseSetRuleMask().


Generated on Sun May 14 14:51:26 2006 by  doxygen 1.4.2