29 lines
597 B
C
29 lines
597 B
C
#ifndef STREECMP_H
|
|
#define STREECMP_H
|
|
|
|
#define POOL_SIZE 256
|
|
#define DEF_DELIM "\n"
|
|
|
|
#define LOOSE_CHECK 0b00000001
|
|
|
|
struct nodval {
|
|
int ival;
|
|
char cval;
|
|
};
|
|
|
|
struct nod {
|
|
struct nodval val;
|
|
int pool_size;
|
|
struct nod **pool;
|
|
};
|
|
|
|
void frenod(struct nod *nod);
|
|
struct nod *allocnod(void);
|
|
struct nod *mknod(struct nod *nod, int loc);
|
|
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);
|
|
|
|
#endif
|