2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: list.h /main/4 1995/11/09 12:45:45 rswiston $ */
25 * (c) Copyright 1993, 1994 Hewlett-Packard Company
26 * (c) Copyright 1993, 1994 International Business Machines Corp.
27 * (c) Copyright 1993, 1994 Novell, Inc.
28 * (c) Copyright 1993, 1994 Sun Microsystems, Inc.
38 typedef struct lnode {
49 caddr_t private; /* for internal tool state */
52 typedef int(*Destroy_proc)P((caddr_t));
54 #define hc_lookup_next(p_node) (p_node)->rlink
55 #define hc_lookup_previous(p_node) (p_node)->llink
57 extern Rb_Status hc_check_list P((Hc_list*));
58 extern Hc_list* hc_create P((_DtCmsGetKeyProc, _DtCmsCompareProc));
59 extern List_node *hc_delete P((Hc_list*, caddr_t key));
60 extern List_node *hc_delete_node P((Hc_list*, List_node*));
61 extern void hc_destroy P((Hc_list*, Destroy_proc));
62 extern void hc_enumerate_down P((Hc_list*, _DtCmsEnumerateProc));
63 extern Rb_Status hc_enumerate_up P((Hc_list*, _DtCmsEnumerateProc));
64 extern Rb_Status hc_insert P((Hc_list*, caddr_t data, caddr_t key,
65 RepeatEvent *re, List_node **node_r));
66 extern caddr_t hc_lookup P((Hc_list*, caddr_t key));
67 extern caddr_t hc_lookup_largest P((Hc_list*));
68 extern caddr_t hc_lookup_next_larger P((Hc_list*, caddr_t key));
69 extern caddr_t hc_lookup_next_smaller P((Hc_list*, caddr_t key));
70 extern caddr_t hc_lookup_smallest P((Hc_list*));
71 extern int hc_size P((Hc_list*));
72 extern List_node *hc_lookup_node P((Hc_list*, caddr_t key));
73 extern Hc_list* hc_create P((_DtCmsGetKeyProc, _DtCmsCompareProc));
74 extern Rb_Status hc_insert_node P((Hc_list *, List_node *, caddr_t key));