xref: /netbsd-src/external/ibm-public/postfix/dist/src/util/nvtable.h (revision e89934bbf778a6d6d6894877c4da59d0c7835b0f)
1*e89934bbSchristos /*	$NetBSD: nvtable.h,v 1.2 2017/02/14 01:16:49 christos Exp $	*/
241fbaed0Stron 
341fbaed0Stron #ifndef _NVTABLE_H_INCLUDED_
441fbaed0Stron #define _NVTABLE_H_INCLUDED_
541fbaed0Stron 
641fbaed0Stron /*++
741fbaed0Stron /* NAME
841fbaed0Stron /*	nvtable 3h
941fbaed0Stron /* SUMMARY
1041fbaed0Stron /*	attribute list manager
1141fbaed0Stron /* SYNOPSIS
1241fbaed0Stron /*	#include <nvtable.h>
1341fbaed0Stron /* DESCRIPTION
1441fbaed0Stron /* .nf
1541fbaed0Stron 
1641fbaed0Stron  /*
1741fbaed0Stron   * Utility library.
1841fbaed0Stron   */
1941fbaed0Stron #include <htable.h>
2041fbaed0Stron #include <mymalloc.h>
2141fbaed0Stron 
2241fbaed0Stron typedef struct HTABLE NVTABLE;
2341fbaed0Stron typedef struct HTABLE_INFO NVTABLE_INFO;
2441fbaed0Stron 
2541fbaed0Stron #define nvtable_create(size)		htable_create(size)
2641fbaed0Stron #define nvtable_locate(table, key)	htable_locate((table), (key))
27e262b48eSchristos #define nvtable_walk(table, action, ptr) htable_walk((table), HTABLE_ACTION_FN_CAST(action), (ptr))
2841fbaed0Stron #define nvtable_list(table)		htable_list(table)
2941fbaed0Stron #define nvtable_find(table, key)	htable_find((table), (key))
3041fbaed0Stron #define nvtable_delete(table, key)	htable_delete((table), (key), myfree)
3141fbaed0Stron #define nvtable_free(table)		htable_free((table), myfree)
3241fbaed0Stron 
3341fbaed0Stron extern NVTABLE_INFO *nvtable_update(NVTABLE *, const char *, const char *);
3441fbaed0Stron 
3541fbaed0Stron /* LICENSE
3641fbaed0Stron /* .ad
3741fbaed0Stron /* .fi
3841fbaed0Stron /*	The Secure Mailer license must be distributed with this software.
3941fbaed0Stron /* AUTHOR(S)
4041fbaed0Stron /*	Wietse Venema
4141fbaed0Stron /*	IBM T.J. Watson Research
4241fbaed0Stron /*	P.O. Box 704
4341fbaed0Stron /*	Yorktown Heights, NY 10598, USA
4441fbaed0Stron /*--*/
4541fbaed0Stron 
4641fbaed0Stron #endif
47