Path: blob/main/cddl/contrib/opensolaris/tools/ctf/cvt/hash.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 2004 Sun Microsystems, Inc. All rights reserved.23* Use is subject to license terms.24*/2526#ifndef _HASH_H27#define _HASH_H2829#pragma ident "%Z%%M% %I% %E% SMI"3031/*32* Routines for manipulating hash tables33*/3435#ifdef __cplusplus36extern "C" {37#endif3839typedef struct hash hash_t;4041hash_t *hash_new(int, int (*)(int, void *), int (*)(void *, void *));42void hash_add(hash_t *, void *);43void hash_merge(hash_t *, hash_t *);44void hash_remove(hash_t *, void *);45int hash_find(hash_t *, void *, void **);46int hash_find_iter(hash_t *, void *, int (*)(void *, void *), void *);47int hash_iter(hash_t *, int (*)(void *, void *), void *);48int hash_match(hash_t *, void *, int (*)(void *, void *), void *);49int hash_count(hash_t *);50int hash_name(int, const char *);51void hash_stats(hash_t *, int);52void hash_free(hash_t *, void (*)(void *, void *), void *);5354#ifdef __cplusplus55}56#endif5758#endif /* _HASH_H */596061