VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.3.0.0/x-hash.h@ 103048

最後變更 在這個檔案從103048是 25078,由 vboxsync 提交於 15 年 前

Additions/x11/x11include: exported and set eol-style on new headers

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.5 KB
 
1/* x-hash.h -- basic hash table class
2 $Id$
3
4 Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
5
6 Permission is hereby granted, free of charge, to any person
7 obtaining a copy of this software and associated documentation files
8 (the "Software"), to deal in the Software without restriction,
9 including without limitation the rights to use, copy, modify, merge,
10 publish, distribute, sublicense, and/or sell copies of the Software,
11 and to permit persons to whom the Software is furnished to do so,
12 subject to the following conditions:
13
14 The above copyright notice and this permission notice shall be
15 included in all copies or substantial portions of the Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
21 HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 DEALINGS IN THE SOFTWARE.
25
26 Except as contained in this notice, the name(s) of the above
27 copyright holders shall not be used in advertising or otherwise to
28 promote the sale, use or other dealings in this Software without
29 prior written authorization. */
30
31#ifndef X_HASH_H
32#define X_HASH_H 1
33
34typedef struct x_hash_table_struct x_hash_table;
35
36typedef int (x_compare_fun) (const void *a, const void *b);
37typedef unsigned int (x_hash_fun) (const void *k);
38typedef void (x_destroy_fun) (void *x);
39typedef void (x_hash_foreach_fun) (void *k, void *v, void *data);
40
41/* for X_PFX and X_EXTERN */
42#include "x-list.h"
43
44X_EXTERN x_hash_table *X_PFX (hash_table_new) (x_hash_fun *hash,
45 x_compare_fun *compare,
46 x_destroy_fun *key_destroy,
47 x_destroy_fun *value_destroy);
48X_EXTERN void X_PFX (hash_table_free) (x_hash_table *h);
49
50X_EXTERN unsigned int X_PFX (hash_table_size) (x_hash_table *h);
51
52X_EXTERN void X_PFX (hash_table_insert) (x_hash_table *h, void *k, void *v);
53X_EXTERN void X_PFX (hash_table_replace) (x_hash_table *h, void *k, void *v);
54X_EXTERN void X_PFX (hash_table_remove) (x_hash_table *h, void *k);
55X_EXTERN void *X_PFX (hash_table_lookup) (x_hash_table *h,
56 void *k, void **k_ret);
57X_EXTERN void X_PFX (hash_table_foreach) (x_hash_table *h,
58 x_hash_foreach_fun *fun,
59 void *data);
60
61#endif /* X_HASH_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette