include ultrix -> vaxuba
[unix-history] / usr / src / usr.bin / tn3270 / tools / mkhits / dohits.h
CommitLineData
992de934 1/*
0de390c0
KB
2 * Copyright (c) 1988 Regents of the University of California.
3 * All rights reserved.
992de934 4 *
0de390c0
KB
5 * Redistribution and use in source and binary forms are permitted
6 * provided that this notice is preserved and that due credit is given
7 * to the University of California at Berkeley. The name of the University
8 * may not be used to endorse or promote products derived from this
9 * software without specific prior written permission. This software
10 * is provided ``as is'' without express or implied warranty.
11 *
12 * @(#)dohits.h 3.2 (Berkeley) %G%
992de934
GM
13 */
14
d9416b81
GM
15#define numberof(x) (sizeof x/sizeof x[0])
16#define highestof(x) (numberof(x)-1)
17
18#define firstentry(x) (table[dohash(0, (x))%highestof(table)])
19
bfbc528f 20struct Hits {
d9416b81
GM
21 struct hits hits;
22 char *name[4];
23};
24
25struct thing {
26 struct thing *next;
27 struct Hits *hits;
28 unsigned char value;
29 char name[100];
30};
31
32extern struct Hits Hits[256]; /* one for each of 0x00-0xff */
33extern struct thing *table[100];
34
35extern unsigned int dohash();