DtSvc/DtUtil2: remove register keyword
[oweals/cde.git] / cde / lib / DtSvc / DtUtil2 / HashP.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: HashP.h /main/4 1995/10/26 15:22:50 rswiston $ */
24 /*
25  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
26  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
27  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
28  * (c) Copyright 1993, 1994 Novell, Inc.                                *
29  */
30 #ifdef REV_INFO
31 #ifndef lint
32 static char SCCSID[] = "OSF/Motif: @(#)_HashP.h 4.16 91/09/12";
33 #endif /* lint */
34 #endif /* REV_INFO */
35 /******************************************************************************
36 *******************************************************************************
37 *
38 *  (c) Copyright 1989, 1990, 1991 OPEN SOFTWARE FOUNDATION, INC.
39 *  (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
40 *  (c) Copyright 1987, 1988, 1989, 1990, 1991 HEWLETT-PACKARD COMPANY
41 *  ALL RIGHTS RESERVED
42 *  
43 *       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED
44 *  AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND
45 *  WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR
46 *  ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE
47 *  AVAILABLE TO ANY OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF THE
48 *  SOFTWARE IS HEREBY TRANSFERRED.
49 *  
50 *       THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
51 *  NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY OPEN SOFTWARE
52 *  FOUNDATION, INC. OR ITS THIRD PARTY SUPPLIERS  
53 *  
54 *       OPEN SOFTWARE FOUNDATION, INC. AND ITS THIRD PARTY SUPPLIERS,
55 *  ASSUME NO RESPONSIBILITY FOR THE USE OR INABILITY TO USE ANY OF ITS
56 *  SOFTWARE .   OSF SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
57 *  KIND, AND OSF EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING
58 *  BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
59 *  FITNESS FOR A PARTICULAR PURPOSE.
60 *  
61 *  Notice:  Notwithstanding any other lease or license that may pertain to,
62 *  or accompany the delivery of, this computer software, the rights of the
63 *  Government regarding its use, reproduction and disclosure are as set
64 *  forth in Section 52.227-19 of the FARS Computer Software-Restricted
65 *  Rights clause.
66 *  
67 *  (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc.  Unpublished - all
68 *  rights reserved under the Copyright laws of the United States.
69 *  
70 *  RESTRICTED RIGHTS NOTICE:  Use, duplication, or disclosure by the
71 *  Government is subject to the restrictions as set forth in subparagraph
72 *  (c)(1)(ii) of the Rights in Technical Data and Computer Software clause
73 *  at DFARS 52.227-7013.
74 *  
75 *  Open Software Foundation, Inc.
76 *  11 Cambridge Center
77 *  Cambridge, MA   02142
78 *  (617)621-8700
79 *  
80 *  RESTRICTED RIGHTS LEGEND:  This computer software is submitted with
81 *  "restricted rights."  Use, duplication or disclosure is subject to the
82 *  restrictions as set forth in NASA FAR SUP 18-52.227-79 (April 1985)
83 *  "Commercial Computer Software- Restricted Rights (April 1985)."  Open
84 *  Software Foundation, Inc., 11 Cambridge Center, Cambridge, MA  02142.  If
85 *  the contract contains the Clause at 18-52.227-74 "Rights in Data General"
86 *  then the "Alternate III" clause applies.
87 *  
88 *  (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc.
89 *  ALL RIGHTS RESERVED 
90 *  
91 *  
92 * Open Software Foundation is a trademark of The Open Software Foundation, Inc.
93 * OSF is a trademark of Open Software Foundation, Inc.
94 * OSF/Motif is a trademark of Open Software Foundation, Inc.
95 * Motif is a trademark of Open Software Foundation, Inc.
96 * DEC is a registered trademark of Digital Equipment Corporation
97 * DIGITAL is a registered trademark of Digital Equipment Corporation
98 * X Window System is a trademark of the Massachusetts Institute of Technology
99 *
100 *******************************************************************************
101 ******************************************************************************/
102 #ifndef __HashP_h
103 #define __HashP_h
104
105 #include <X11/Intrinsic.h>
106  
107 #ifdef __cplusplus
108 extern "C" {
109 #endif
110 /*
111  * the structure is used as a common header part for different
112  * users of the hash functions in order to locate the key
113  */
114 typedef XtPointer DtHashKey;
115
116 typedef DtHashKey (*DtGetHashKeyFunc)();
117 typedef Boolean (*DtHashEnumerateFunc)();
118 typedef void (*DtReleaseKeyProc)();
119
120 typedef struct _DtHashEntryPartRec {
121     unsigned int        type:16;
122     unsigned int        flags:16;
123 }DtHashEntryPartRec, *DtHashEntryPart;
124
125 typedef struct _DtHashEntryRec {
126     DtHashEntryPartRec  hash;
127 }DtHashEntryRec, *DtHashEntry;
128
129 typedef struct _DtHashEntryTypePartRec {
130     unsigned int                entrySize;
131     DtGetHashKeyFunc            getKeyFunc;
132     XtPointer                   getKeyClientData;
133     DtReleaseKeyProc            releaseKeyProc;
134 }DtHashEntryTypePartRec, *DtHashEntryTypePart;
135
136 typedef struct _DtHashEntryTypeRec {
137     DtHashEntryTypePartRec      hash;
138 }DtHashEntryTypeRec, *DtHashEntryType;
139
140 typedef struct _DtHashTableRec *DtHashTable;
141
142 /********    Private Function Declarations for Hash.c    ********/
143
144 extern void _DtRegisterHashEntry( 
145                         DtHashTable tab,
146                         DtHashKey key,
147                         DtHashEntry entry) ;
148 extern void _DtUnregisterHashEntry( 
149                         DtHashTable tab,
150                         DtHashEntry entry) ;
151 extern DtHashEntry _DtEnumerateHashTable( 
152                         DtHashTable tab,
153                         DtHashEnumerateFunc enumFunc,
154                         XtPointer clientData) ;
155 extern DtHashEntry _DtKeyToHashEntry( 
156                         DtHashTable tab,
157                         DtHashKey key) ;
158 extern DtHashTable _DtAllocHashTable( 
159                         DtHashEntryType *hashEntryTypes,
160                         Cardinal numHashEntryTypes,
161 #if NeedWidePrototypes
162                         int keyIsString) ;
163 #else
164                         Boolean keyIsString) ;
165 #endif /* NeedWidePrototypes */
166 extern void _DtFreeHashTable( 
167                         DtHashTable hashTable) ;
168
169 /********    End Private Function Declarations    ********/
170
171
172
173 #ifdef __cplusplus
174 }  /* Close scope of 'extern "C"' declaration which encloses file. */
175 #endif
176
177 #endif /* HashP_h */
178 /* DON'T ADD ANYTHING AFTER THIS #endif */
179
180
181