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-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);
|
|
|
|
int mkstr(struct nod *nod, char *str);
|
2024-08-27 16:59:30 +00:00
|
|
|
int gentree(struct nod *nod, char *strs, char *delim);
|
2024-08-25 20:24:08 +00:00
|
|
|
int streecmp(struct nod *nod, char *str);
|
2024-08-28 18:31:07 +00:00
|
|
|
int streencmp(struct nod *nod, char *str, int len);
|
2024-08-25 12:04:27 +00:00
|
|
|
|
|
|
|
#endif
|