Mercurial > hg > dmlib
changeset 2269:f350c7514785
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 17 Jun 2019 10:27:05 +0300 |
parents | f2ff364065eb |
children | 0f0218dcccf8 |
files | tools/fanalyze.c |
diffstat | 1 files changed, 13 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/fanalyze.c Mon Jun 17 10:26:47 2019 +0300 +++ b/tools/fanalyze.c Mon Jun 17 10:27:05 2019 +0300 @@ -10,14 +10,15 @@ #include "dmargs.h" #include "dmfile.h" -#define SET_MAX_FILES 64 -#define SET_MAX_ELEMS 256 -#define SET_MAX_VALUES 64 -#define SET_MAX_GREPLIST 64 +#define SET_MAX_FILES 64 +#define SET_MAX_ELEMS 256 #define SET_MAX_VARIANTS 4 -#define SET_MAX_SEQUENCES 1024 -#define SET_MAX_PLACES 1024 +#define SET_MAX_GREP_VALUES 64 +#define SET_MAX_GREP_LIST 64 + +#define SET_MAX_SEQUENCES 1024 +#define SET_MAX_PLACES 1024 /* Typedefs @@ -97,8 +98,8 @@ int type; int disp; int nvalues; - Uint32 values[SET_MAX_GREPLIST]; - BOOL vwildcards[SET_MAX_GREPLIST]; + Uint32 values[SET_MAX_GREP_LIST]; + BOOL vwildcards[SET_MAX_GREP_LIST]; } DMGrepValue; @@ -151,7 +152,7 @@ DMSourceFile srcFiles[SET_MAX_FILES]; // Source file names DMStats totalStats; int nsetGrepValues = 0; -DMGrepValue setGrepValues[SET_MAX_VALUES]; +DMGrepValue setGrepValues[SET_MAX_GREP_VALUES]; size_t optMinMatchLen = 8; DMMatchSeq dmSequences[SET_MAX_SEQUENCES]; @@ -364,7 +365,7 @@ char *vtmp = vstr; do { - if (val.nvalues >= SET_MAX_GREPLIST) + if (val.nvalues >= SET_MAX_GREP_LIST) { ret = dmError(DMERR_BOUNDS, "Too many greplist values specified '%s'.\n", @@ -452,7 +453,7 @@ val.type = DMGV_UINT8; } - if (nsetGrepValues < SET_MAX_VALUES) + if (nsetGrepValues < SET_MAX_GREP_VALUES) { DMGrepValue *node = &setGrepValues[nsetGrepValues++]; memcpy(node, &val, sizeof(val)); @@ -469,7 +470,7 @@ { ret = dmError(DMERR_BOUNDS, "Too many values specified (max %d).", - SET_MAX_VALUES); + SET_MAX_GREP_VALUES); } out: