summaryrefslogtreecommitdiff
path: root/table.c
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2023-08-07 19:43:57 -0400
committerTest_User <hax@andrewyu.org>2023-08-07 19:43:57 -0400
commita25d22a1c26203b7c9e2dcd33f4c602b0f82684d (patch)
tree0ce7ba3ab39ae16e730076d1e66bdeb4a41099a7 /table.c
parent4f6fdc6d4faba1c268b8714be26f683de6884c77 (diff)
downloadcoupserv-a25d22a1c26203b7c9e2dcd33f4c602b0f82684d.tar.gz
coupserv-a25d22a1c26203b7c9e2dcd33f4c602b0f82684d.zip
A bunch of stuff, mostly related to client support
Diffstat (limited to 'table.c')
-rw-r--r--table.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/table.c b/table.c
index 5dbc290..a06e034 100644
--- a/table.c
+++ b/table.c
@@ -145,6 +145,12 @@ void * get_table_index(struct table tbl, struct string name) {
return tbl.array[index].ptr;
}
+uint8_t has_table_index(struct table tbl, struct string name) {
+ uint8_t exists;
+ search(tbl, name, &exists);
+ return exists;
+}
+
void * remove_table_index(struct table *tbl, struct string name) {
uint8_t exists;
uint64_t index = search(*tbl, name, &exists);