1*2775Sraf /* 2*2775Sraf * CDDL HEADER START 3*2775Sraf * 4*2775Sraf * The contents of this file are subject to the terms of the 5*2775Sraf * Common Development and Distribution License, Version 1.0 only 6*2775Sraf * (the "License"). You may not use this file except in compliance 7*2775Sraf * with the License. 8*2775Sraf * 9*2775Sraf * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*2775Sraf * or http://www.opensolaris.org/os/licensing. 11*2775Sraf * See the License for the specific language governing permissions 12*2775Sraf * and limitations under the License. 13*2775Sraf * 14*2775Sraf * When distributing Covered Code, include this CDDL HEADER in each 15*2775Sraf * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*2775Sraf * If applicable, add the following below this CDDL HEADER, with the 17*2775Sraf * fields enclosed by brackets "[]" replaced with your own identifying 18*2775Sraf * information: Portions Copyright [yyyy] [name of copyright owner] 19*2775Sraf * 20*2775Sraf * CDDL HEADER END 21*2775Sraf */ 22*2775Sraf /* 23*2775Sraf * Copyright 1997-1999,2003 Sun Microsystems, Inc. All rights reserved. 24*2775Sraf * Use is subject to license terms. 25*2775Sraf */ 26*2775Sraf 27*2775Sraf #ifndef _BUCKET_H 28*2775Sraf #define _BUCKET_H 29*2775Sraf 30*2775Sraf #pragma ident "%Z%%M% %I% %E% SMI" 31*2775Sraf 32*2775Sraf #ifdef __cplusplus 33*2775Sraf extern "C" { 34*2775Sraf #endif 35*2775Sraf 36*2775Sraf struct bucketlist { 37*2775Sraf struct bucket *bl_bucket; 38*2775Sraf struct bucketlist *bl_next; 39*2775Sraf }; 40*2775Sraf 41*2775Sraf typedef struct bucket { 42*2775Sraf char *b_name; 43*2775Sraf struct bucket *b_parent; 44*2775Sraf struct bucketlist *b_uncles; 45*2775Sraf struct bucket *b_thread; 46*2775Sraf int b_has_locals; /* Should contain ``local:*;'' */ 47*2775Sraf int b_has_protecteds; /* Has ``protected:'' section */ 48*2775Sraf int b_was_printed; /* For loop detection. */ 49*2775Sraf int b_weak; /* Weak interface. */ 50*2775Sraf table_t *b_global_table; 51*2775Sraf table_t *b_protected_table; 52*2775Sraf } bucket_t; 53*2775Sraf 54*2775Sraf 55*2775Sraf /* Bucket interfaces, general. */ 56*2775Sraf extern void create_lists(void); 57*2775Sraf extern void delete_lists(void); 58*2775Sraf extern void print_bucket(const bucket_t *); 59*2775Sraf extern void print_all_buckets(void); 60*2775Sraf 61*2775Sraf /* Transformation interfaces. */ 62*2775Sraf extern void sort_buckets(void); 63*2775Sraf extern void thread_trees(void); 64*2775Sraf extern void add_local(void); 65*2775Sraf 66*2775Sraf /* Composite interfaces for insertion. */ 67*2775Sraf extern int add_by_name(const char *, const Interface *); 68*2775Sraf extern int add_parent(const char *, const char *, int); 69*2775Sraf extern int add_uncle(const char *, const char *, int); 70*2775Sraf 71*2775Sraf /* Output Interfaces, iterators */ 72*2775Sraf extern bucket_t *first_list(void); 73*2775Sraf extern bucket_t *next_list(void); 74*2775Sraf extern bucket_t *first_from_list(const bucket_t *); 75*2775Sraf extern bucket_t *next_from_list(void); 76*2775Sraf 77*2775Sraf /* Output Interfaces, extraction. */ 78*2775Sraf extern char **parents_of(const bucket_t *); 79*2775Sraf 80*2775Sraf extern void set_weak(const char *, int); 81*2775Sraf 82*2775Sraf typedef struct { 83*2775Sraf int h_hash; 84*2775Sraf char *h_version_name; 85*2775Sraf bucket_t *h_bucket; 86*2775Sraf } hashmap_t; 87*2775Sraf 88*2775Sraf #ifdef __cplusplus 89*2775Sraf } 90*2775Sraf #endif 91*2775Sraf 92*2775Sraf #endif /* _BUCKET_H */ 93