streecmp/streecmp.h
2024-09-03 21:01:26 +02:00

27 lines
525 B
C

#ifndef STREECMP_H
#define STREECMP_H
#define POOL_SIZE 256
#define DEF_DELIM "\n"
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 gentree(struct nod *nod, char *strs, char *delim);
int streecmp(struct nod *nod, char *str);
int streencmp(struct nod *nod, char *str, int len);
#endif