Implement OBLISTs
[muddle-interpreter.git] / src / oblist.h
diff --git a/src/oblist.h b/src/oblist.h
new file mode 100644 (file)
index 0000000..590a38d
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+Copyright (C) 2017-2018 Keziah Wesley
+
+You can redistribute and/or modify this file under the terms of the
+GNU Affero General Public License as published by the Free Software
+Foundation, either version 3 of the License, or (at your option) any
+later version.
+
+This file is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public
+License along with this file. If not, see
+<http://www.gnu.org/licenses/>.
+*/
+
+#ifndef OBLIST_H
+#define OBLIST_H
+
+#include "object.h"
+
+// UVECTOR of LISTs of ATOMs
+// each LIST is a hash bucket
+// each LIST is sorted by PNAME
+// each LIST is headed by a LOSE sentry object
+
+// for now, 1 global oblist
+extern uvector_object root;
+
+uvector_object oblist_create (uint32_t buckct);
+
+atom_object oblist_find_or_insert (uvector_object oblist, const char *name,
+                                  uint32_t namelen);
+
+// returns a ATOM object or #FALSE ()
+//object oblist_lookup (uvector_object oblist, const char * name, uint32_t namelen);
+
+#endif