Linux Audio

Check our new training course

Loading...
v4.6
 
 1/*
 2 * A symbol table (symtab) maintains associations between symbol
 3 * strings and datum values.  The type of the datum values
 4 * is arbitrary.  The symbol table type is implemented
 5 * using the hash table type (hashtab).
 6 *
 7 * Author : Stephen Smalley, <sds@epoch.ncsc.mil>
 8 */
 
 9#ifndef _SS_SYMTAB_H_
10#define _SS_SYMTAB_H_
11
12#include "hashtab.h"
13
14struct symtab {
15	struct hashtab *table;	/* hash table (keyed on a string) */
16	u32 nprim;		/* number of primary names in table */
17};
18
19int symtab_init(struct symtab *s, unsigned int size);
20
21#endif	/* _SS_SYMTAB_H_ */
22
 
 
23
v6.9.4
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 * A symbol table (symtab) maintains associations between symbol
 4 * strings and datum values.  The type of the datum values
 5 * is arbitrary.  The symbol table type is implemented
 6 * using the hash table type (hashtab).
 7 *
 8 * Author : Stephen Smalley, <stephen.smalley.work@gmail.com>
 9 */
10
11#ifndef _SS_SYMTAB_H_
12#define _SS_SYMTAB_H_
13
14#include "hashtab.h"
15
16struct symtab {
17	struct hashtab table; /* hash table (keyed on a string) */
18	u32 nprim; /* number of primary names in table */
19};
20
21int symtab_init(struct symtab *s, u32 size);
 
 
22
23int symtab_insert(struct symtab *s, char *name, void *datum);
24void *symtab_search(struct symtab *s, const char *name);
25
26#endif /* _SS_SYMTAB_H_ */