123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #ifndef NASM_STRTBL_H
- #define NASM_STRTBL_H
- #include "compiler.h"
- #include "hashtbl.h"
- struct nasm_strtbl {
- size_t size;
- struct hash_table hash;
- };
- #define STRTBL_NONE ((size_t)-1)
- void strtbl_init(struct nasm_strtbl *tbl);
- void strtbl_free(struct nasm_strtbl *tbl);
- size_t strtbl_find(struct nasm_strtbl *tbl, const char *str);
- size_t strtbl_add(struct nasm_strtbl *tbl, const char *str);
- static inline size_t strtbl_size(const struct nasm_strtbl *tbl)
- {
- return tbl->size;
- }
- void * safe_alloc strtbl_generate(const struct nasm_strtbl *tbl);
- #endif
|