| # | Line 1 | Line 1 | |
|---|---|---|
| 1 | < | /* Copyright (c) 1986 Regents of the University of California */ |
| 1 | > | /* Copyright (c) 1992 Regents of the University of California */ |
| 2 | ||
| 3 | #ifndef lint | |
| 4 | static char SCCSid[] = "$SunId$ LBL"; | |
| # | Line 80 | Line 80 | int oldsiz; | |
| 80 | if (*hsp > oldsiz) | |
| 81 | return(*hsp); | |
| 82 | return(oldsiz*2 + 1); /* not always prime */ | |
| 83 | – | } |
| 84 | – | |
| 85 | – | |
| 86 | – | static int |
| 87 | – | shash(s) /* hash a string */ |
| 88 | – | register char *s; |
| 89 | – | { |
| 90 | – | register int h = 0; |
| 91 | – | |
| 92 | – | while (*s) |
| 93 | – | h = (h<<1 & 0x7fff) ^ *s++; |
| 94 | – | return(h); |
| 83 | } | |
| 84 | ||
| 85 | ||
| – | Removed lines |
| + | Added lines |
| < | Changed lines (old) |
| > | Changed lines (new) |