sarg
2.4.0
About: SARG ia a Squid Analysis Report Generator.
![]() ![]() |
Go to the source code of this file.
Macros | |
#define | true 1 |
#define | false 0 |
Typedefs | |
typedef int | bool |
typedef struct DichotomicStruct * | DichotomicObject |
The object to store key/value pairs. More... | |
Functions | |
DichotomicObject | Dichotomic_Create (void) |
void | Dichotomic_Destroy (DichotomicObject *ObjPtr) |
const char * | Dichotomic_Search (DichotomicObject Obj, const char *key) |
bool | Dichotomic_Insert (DichotomicObject Obj, const char *key, const char *value) |
#define false 0 |
Definition at line 12 of file dichotomic.h.
#define true 1 |
Definition at line 9 of file dichotomic.h.
typedef int bool |
Definition at line 7 of file dichotomic.h.
typedef struct DichotomicStruct* DichotomicObject |
The object to store key/value pairs.
Definition at line 17 of file dichotomic.h.
DichotomicObject Dichotomic_Create | ( | void | ) |
Create an object to store key/value pairs and retrieve them.
Definition at line 61 of file dichotomic.c.
Referenced by ip2name().
void Dichotomic_Destroy | ( | DichotomicObject * | ObjPtr | ) |
Destroy an object created by Dichotomic_Create().
ObjPtr | The pointer to the variable containing the object to destroy. The pointer is reset to NULL by this function. It is safe to pass NULL or a NULL pointer. |
Definition at line 82 of file dichotomic.c.
References DichotomicStruct::Items, DichotomicItemStruct::Key, DichotomicStruct::NItems, and DichotomicItemStruct::Value.
Referenced by ip2name_cleanup().
bool Dichotomic_Insert | ( | DichotomicObject | Obj, |
const char * | key, | ||
const char * | value | ||
) |
Insert a key/value pair into the array.
Obj | The object created by Dichotomic_Create(). |
key | The key of the pair. |
value | The value of the pair. |
True
if the pair was inserted or false
if it failed. Definition at line 139 of file dichotomic.c.
References _, debuga(), Dichotomic_FindKeyPos(), DichotomicStruct::Items, DichotomicItemStruct::Key, DichotomicStruct::NAllocated, DichotomicStruct::NItems, and DichotomicItemStruct::Value.
Referenced by ip2name().
const char* Dichotomic_Search | ( | DichotomicObject | Obj, |
const char * | key | ||
) |
Search for the value of a key.
Obj | The object created by Dichotomic_Create(). |
key | The key to search for. |
Definition at line 192 of file dichotomic.c.
References Dichotomic_FindKeyPos(), DichotomicStruct::Items, DichotomicStruct::NItems, and DichotomicItemStruct::Value.
Referenced by ip2name().