repo: update docs
This commit is contained in:
parent
152d119601
commit
66e392b922
16
README
16
README
|
@ -13,19 +13,27 @@ TECHNICALS
|
||||||
|
|
||||||
struct nod
|
struct nod
|
||||||
* data structure that represents a node of the tree
|
* data structure that represents a node of the tree
|
||||||
struct nod *mknod(struct nod *prnt)
|
void frenod(struct nod *nod)
|
||||||
|
* free memory of node and all of its children
|
||||||
|
struct nod *allocnod(void)
|
||||||
|
* allocate memory for a node and its pool size for
|
||||||
|
character hashmap
|
||||||
|
* returns: poiner to said node or NULL if function fails
|
||||||
|
struct nod *mknod(struct nod *nod, int loc)
|
||||||
* create a child node below given parent node
|
* create a child node below given parent node
|
||||||
|
* loc is the character of the node (consult source code
|
||||||
|
of mkstr for more information)
|
||||||
* returns: pointer to said node or NULL if function fails
|
* returns: pointer to said node or NULL if function fails
|
||||||
int mkstr(struct nod *rot, char *str)
|
int mkstr(struct nod *nod, char *str)
|
||||||
* fit string into tree if it does not already exist
|
* fit string into tree if it does not already exist
|
||||||
* warning: string has to be null-byte terminated
|
* warning: string has to be null-byte terminated
|
||||||
* returns: the assigned ID of the string, 0 if string
|
* returns: the assigned ID of the string, 0 if string
|
||||||
is already inside tree, or -1 if function fails
|
is already inside tree, or -1 if function fails
|
||||||
int gentree(struct nod *rot, char *strs)
|
int gentree(struct nod *nod, char *strs)
|
||||||
* generate tree from character seperated strings
|
* generate tree from character seperated strings
|
||||||
* warning: seperation character is '\n'
|
* warning: seperation character is '\n'
|
||||||
* returns: 0 if ok or -1 if function fails
|
* returns: 0 if ok or -1 if function fails
|
||||||
int streecmp(struct nod *rot, char *str)
|
int streecmp(struct nod *nod, char *str)
|
||||||
* traverse tree and search for str
|
* traverse tree and search for str
|
||||||
* returns: id of string or 0 if there is no match
|
* returns: id of string or 0 if there is no match
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user