sarg
2.4.0
About: SARG ia a Squid Analysis Report Generator. Fossies Dox: sarg-2.4.0.tar.gz ("unofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file.
65 Obj=malloc(
sizeof(*Obj));
70 memset(Obj,0,
sizeof(*Obj));
87 if (!ObjPtr || !*ObjPtr)
return;
92 for (i=0 ; i<Obj->
NItems ; i++)
113 cmp=strcasecmp(key,Obj->
Items[middle].
Key);
145 if (!Obj)
return(
false);
149 if (Found)
return(
false);
161 debuga(__FILE__,__LINE__,
_(
"Not enough memory to store the key/value pair %s/%s\n"),key,value);
167 for (i=Obj->
NItems ; i>Position ; i--)
172 Obj->
Items[Position].
Key=strdup(key);
176 debuga(__FILE__,__LINE__,
_(
"Not enough memory to store the key/value pair %s/%s\n"),key,value);
197 if (!Obj)
return(NULL);
200 if (!Found)
return(NULL);
static int Dichotomic_FindKeyPos(DichotomicObject Obj, const char *key, bool *Found)
void debuga(const char *File, int Line, const char *msg,...)
struct DichotomicItemStruct * Items
The array containing the sorted pairs.
const char * Dichotomic_Search(DichotomicObject Obj, const char *key)
void Dichotomic_Destroy(DichotomicObject *ObjPtr)
const char * Value
The value.
int NItems
The number of pairs in the array.
Include headers and define global variables. */.
DichotomicObject Dichotomic_Create(void)
int NAllocated
The size of the array.
Declaration of the structures and functions.
bool Dichotomic_Insert(DichotomicObject Obj, const char *key, const char *value)