![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 /* 0003 * A symbol table (symtab) maintains associations between symbol 0004 * strings and datum values. The type of the datum values 0005 * is arbitrary. The symbol table type is implemented 0006 * using the hash table type (hashtab). 0007 * 0008 * Author : Stephen Smalley, <sds@tycho.nsa.gov> 0009 */ 0010 #ifndef _SS_SYMTAB_H_ 0011 #define _SS_SYMTAB_H_ 0012 0013 #include "hashtab.h" 0014 0015 struct symtab { 0016 struct hashtab table; /* hash table (keyed on a string) */ 0017 u32 nprim; /* number of primary names in table */ 0018 }; 0019 0020 int symtab_init(struct symtab *s, unsigned int size); 0021 0022 int symtab_insert(struct symtab *s, char *name, void *datum); 0023 void *symtab_search(struct symtab *s, const char *name); 0024 0025 #endif /* _SS_SYMTAB_H_ */ 0026 0027
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |