mirror of
https://github.com/hufrea/byedpi.git
synced 2024-11-22 06:55:22 +03:00
26 lines
476 B
C
26 lines
476 B
C
#include <stdbool.h>
|
|
#include <time.h>
|
|
#include "kavl.h"
|
|
|
|
struct elem {
|
|
int len;
|
|
char *data;
|
|
int m;
|
|
time_t time;
|
|
KAVL_HEAD(struct elem) head;
|
|
};
|
|
|
|
struct mphdr {
|
|
bool stat;
|
|
struct elem *root;
|
|
};
|
|
|
|
struct mphdr *mem_pool(bool cst);
|
|
|
|
struct elem *mem_get(struct mphdr *hdr, char *str, int len);
|
|
|
|
struct elem *mem_add(struct mphdr *hdr, char *str, int len);
|
|
|
|
void mem_delete(struct mphdr *hdr, char *str, int len);
|
|
|
|
void mem_destroy(struct mphdr *hdr);
|