| 60 | |
| 61 | |
| 62 | static void tablerehash (TString **vect, int osize, int nsize) { |
| 63 | int i; |
| 64 | for (i = osize; i < nsize; i++) /* clear new elements */ |
| 65 | vect[i] = NULL; |
| 66 | for (i = 0; i < osize; i++) { /* rehash old part of the array */ |
| 67 | TString *p = vect[i]; |
| 68 | vect[i] = NULL; |
| 69 | while (p) { /* for each string in the list */ |
| 70 | TString *hnext = p->u.hnext; /* save next */ |
| 71 | unsigned int h = lmod(p->hash, nsize); /* new position */ |
| 72 | p->u.hnext = vect[h]; /* chain it into array */ |
| 73 | vect[h] = p; |
| 74 | p = hnext; |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | |
| 80 | /* |
no outgoing calls
no test coverage detected