shithub: asif

Download patch

ref: c85201c11dbbafb78e2a8ab58d6b73f9bc4bbe8d
parent: f0ee06d3ea3901d66c2be3e8d4b48511f82a9b84
author: qwx <qwx@sciops.net>
date: Sun May 29 20:18:22 EDT 2022

update header

--- a/asif.h
+++ b/asif.h
@@ -13,6 +13,7 @@
 	void *p;
 };
 void	vfree(VArray*);
+void	vnuke(VArray*);
 void	vinsert(VArray*, char*);
 VArray*	valloc(ulong, int);
 
@@ -66,6 +67,24 @@
 VArray*	knuthmorrispratt(String, String);
 VArray*	rabinkarp(String, String, int, int);
 VArray*	rabinkarp8(String, String);
+
+enum{
+	Hashsz = 101,
+};
+typedef struct HTab HTab;
+typedef struct HPair HPair;
+struct HPair{
+	char *key;
+	void *val;
+	HPair *next;
+};
+struct HTab{
+	HPair b[Hashsz];
+};
+
+void*	htget(HTab*, char*);
+void	htput(HTab*, char*, void*);
+HTab*	htalloc(void);
 
 typedef struct Pairheap Pairheap;
 struct Pairheap{