2024-03-08 18:33:25 +00:00
|
|
|
#include <time.h>
|
|
|
|
|
2024-03-08 00:37:02 +00:00
|
|
|
struct elem {
|
|
|
|
int m;
|
2024-03-08 18:33:25 +00:00
|
|
|
time_t time;
|
2024-03-08 00:37:02 +00:00
|
|
|
int len;
|
|
|
|
char data[];
|
|
|
|
};
|
|
|
|
struct mphdr {
|
|
|
|
int max;
|
|
|
|
int inc;
|
|
|
|
int count;
|
|
|
|
struct elem **values;
|
|
|
|
};
|
|
|
|
struct mphdr *mem_pool(int count);
|
|
|
|
int mem_index(struct mphdr *hdr, char *str, int len);
|
2024-03-08 18:33:25 +00:00
|
|
|
struct elem *mem_add(struct mphdr *hdr, char *str, int len, int pos);
|
2024-03-26 19:43:41 +00:00
|
|
|
void mem_delete(struct mphdr *hdr, int pos);
|
|
|
|
void mem_destroy(struct mphdr *hdr);
|