File: strset.h

package info (click to toggle)
fastforward 1%3A0.51-3.1~deb9u1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 688 kB
  • sloc: ansic: 4,393; makefile: 527; sh: 138
file content (29 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef STRSET_H
#define STRSET_H

#include "uint32.h"

typedef struct strset_list
 {
  uint32 h;
  int next;
 }
strset_list;

typedef struct
 {
  int mask; /* mask + 1 is power of 2, size of hash table */
  int n; /* number of entries used in list and x */
  int a; /* number of entries allocated in list and x */
  int *first; /* first[h] is front of hash list h */
  strset_list *p; /* p[i].next is next; p[i].h is hash of x[i] */
  char **x; /* x[i] is entry i */
 }
strset;

extern uint32 strset_hash();
extern int strset_init();
extern char *strset_in();
extern int strset_add();

#endif