Path: blob/main/cddl/contrib/opensolaris/tools/ctf/cvt/alist.h
39586 views
/*1* CDDL HEADER START2*3* The contents of this file are subject to the terms of the4* Common Development and Distribution License, Version 1.0 only5* (the "License"). You may not use this file except in compliance6* with the License.7*8* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE9* or http://www.opensolaris.org/os/licensing.10* See the License for the specific language governing permissions11* and limitations under the License.12*13* When distributing Covered Code, include this CDDL HEADER in each14* file and include the License file at usr/src/OPENSOLARIS.LICENSE.15* If applicable, add the following below this CDDL HEADER, with the16* fields enclosed by brackets "[]" replaced with your own identifying17* information: Portions Copyright [yyyy] [name of copyright owner]18*19* CDDL HEADER END20*/21/*22* Copyright 2001-2003 Sun Microsystems, Inc. All rights reserved.23* Use is subject to license terms.24*/2526#ifndef _ASSOC_H27#define _ASSOC_H2829#pragma ident "%Z%%M% %I% %E% SMI"3031/*32* Create, manage, and destroy association lists. alists are arrays with33* arbitrary index types.34*/3536#ifdef __cplusplus37extern "C" {38#endif3940typedef struct alist alist_t;4142alist_t *alist_new(void (*)(void *), void (*)(void *));43alist_t *alist_xnew(int, void (*)(void *), void (*)(void *),44int (*)(int, void *), int (*)(void *, void *));45void alist_free(alist_t *);46void alist_add(alist_t *, void *, void *);47int alist_find(alist_t *, void *, void **);48int alist_iter(alist_t *, int (*)(void *, void *, void *), void *);49void alist_stats(alist_t *, int);50int alist_dump(alist_t *, int (*)(void *, void *));5152#ifdef __cplusplus53}54#endif5556#endif /* _ASSOC_H */575859