|
|
1.1 root 1: /* @(#) _comphash.c: 1.1 10/15/83 (1.9 10/27/82) */
2:
3: #include "curses.ext"
4:
5: _comphash (p)
6: register struct line *p;
7: {
8: register chtype *c, *l;
9: register int rc;
10:
11: if (p == NULL)
12: return;
13: if (p -> hash)
14: return;
15: rc = 1;
16: c = p -> body;
17: l = &p -> body[p -> length];
18: while (--l > c && *l == ' ')
19: ;
20: while (c <= l && *c == ' ')
21: c++;
22: p -> bodylen = l - c + 1;
23: while (c <= l)
24: rc = (rc<<1) + *c++;
25: p -> hash = rc;
26: if (p->hash == 0)
27: p->hash = 123;
28: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.