You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
387 B
21 lines
387 B
#ifndef DICT_H_
|
|
#define DICT_H_
|
|
|
|
typedef struct Dict {
|
|
char *key;
|
|
void *value;
|
|
struct Dict *next;
|
|
} Dict;
|
|
|
|
char *sprintf_id(char *str, int id);
|
|
Dict **dict_alloc();
|
|
void dict_dealloc(Dict *dict);
|
|
void *dict_getItem(Dict *dict, char *key);
|
|
void dict_delItem(Dict **dict, char *key);
|
|
void dict_addItem(Dict **dict, char *key, void *value);
|
|
int dict_size(Dict *dict);
|
|
|
|
|
|
|
|
|
|
#endif |