|
|
1.1 root 1: /*
2: * Copyright (c) 1988 Regents of the University of California.
3: * All rights reserved.
4: *
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) 3/28/88
13: */
14:
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:
20: struct Hits {
21: struct hits hits;
22: char *name[4];
23: };
24:
25: struct thing {
26: struct thing *next;
27: struct Hits *hits;
28: unsigned char value;
29: char name[100];
30: };
31:
32: extern struct Hits Hits[256]; /* one for each of 0x00-0xff */
33: extern struct thing *table[100];
34:
35: extern unsigned int dohash();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.