ucx/string.c

changeset 238
27b31c2c959c
parent 237
5ba9de6361ff
child 250
b7d1317b138e
equal deleted inserted replaced
237:5ba9de6361ff 238:27b31c2c959c
215 /* fill prefix table */ 215 /* fill prefix table */
216 i = 0; j = 0; 216 i = 0; j = 0;
217 ptable_w(useheap, ptable, i, j); 217 ptable_w(useheap, ptable, i, j);
218 while (i < match.length) { 218 while (i < match.length) {
219 while (j >= 1 && match.ptr[j-1] != match.ptr[i]) { 219 while (j >= 1 && match.ptr[j-1] != match.ptr[i]) {
220 ptable_r(j, useheap, ptable, j-i); 220 ptable_r(j, useheap, ptable, j-1);
221 } 221 }
222 i++; j++; 222 i++; j++;
223 ptable_w(useheap, ptable, i, j); 223 ptable_w(useheap, ptable, i, j);
224 } 224 }
225 225

mercurial