--- lmtp2nntp_lh.h 2002/01/15 11:57:31 1.2
+++ lmtp2nntp_lh.h 2002/01/16 09:46:52 1.3
@@ -27,13 +27,23 @@
#ifndef __LH_H__
#define __LH_H__
+#ifndef FALSE
+#define FALSE 0
+#endif
+#ifndef TRUE
+#define TRUE !FALSE
+#endif
+
struct lh_st;
typedef struct lh_st lh_t;
+typedef int (*lh_cb_t)(void *ctx, const void *keyptr, int keylen, const void *datptr, int datlen);
+
lh_t *lh_create (void);
int lh_insert (lh_t *h, const void *keyptr, int keylen, const void *datptr, int datlen, int override);
int lh_lookup (lh_t *h, const void *keyptr, int keylen, void **datptr, int *datlen);
int lh_delete (lh_t *h, const void *keyptr, int keylen);
+int lh_apply (lh_t *h, lh_cb_t cb, void *ctx);
int lh_destroy(lh_t *h);
#endif /* __LH_H__ */
|