1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
459 B
C

/*
* trie.h: declaration of functions workong with trie
*/
#ifndef TRIE_H
#define TRIE_H
#include <stdbool.h>
#include <stdint.h>
bool trie_load(void);
bool trie_save(void);
struct trie {
int64_t val;
struct trie *children[37]; //Alphabet: A-Z0-9_
bool defined;
};
enum trie_ret_status {OK, UNDEF};
struct trie_retval {
int64_t val;
bool def;
};
struct trie_retval trie_lookup(char string[]);
bool trie_set (char string[], int64_t val);
#endif