2024-08-25 12:04:27 +00:00
|
|
|
#ifndef STREECMP_H
|
|
|
|
#define STREECMP_H
|
|
|
|
|
2024-08-27 16:45:27 +00:00
|
|
|
#define POOL_SIZE 256
|
2024-08-27 16:59:30 +00:00
|
|
|
#define DEF_DELIM "\n"
|
2024-08-27 16:45:27 +00:00
|
|
|
|
2024-09-12 17:28:17 +00:00
|
|
|
#define LOOSE_CHECK 0b00000001
|
|
|
|
|
2024-08-25 12:04:27 +00:00
|
|
|
struct nodval {
|
|
|
|
int ival;
|
|
|
|
char cval;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct nod {
|
|
|
|
struct nodval val;
|
|
|
|
int pool_size;
|
2024-08-25 20:24:08 +00:00
|
|
|
struct nod **pool;
|
2024-08-25 12:04:27 +00:00
|
|
|
};
|
|
|
|
|
2024-08-27 16:45:27 +00:00
|
|
|
void frenod(struct nod *nod);
|
2024-08-25 20:24:08 +00:00
|
|
|
struct nod *allocnod(void);
|
|
|
|
struct nod *mknod(struct nod *nod, int loc);
|
2024-09-12 17:28:17 +00:00
|
|
|
int mkstr(struct nod *nod, char *str, int val, int flag);
|
|
|
|
int gentree(struct nod *nod, char *strs, char *delim, int flag);
|
|
|
|
int streecmp(struct nod *nod, char *str, int flag);
|
|
|
|
int streencmp(struct nod *nod, char *str, int len, int flag);
|
2024-08-25 12:04:27 +00:00
|
|
|
|
|
|
|
#endif
|