Lines Matching refs:old
121 static void qsufsort(off_t *I,off_t *V,u_char *old,off_t oldsize) in qsufsort() argument
127 for(i=0;i<oldsize;i++) buckets[old[i]]++; in qsufsort()
132 for(i=0;i<oldsize;i++) I[++buckets[old[i]]]=i; in qsufsort()
134 for(i=0;i<oldsize;i++) V[i]=buckets[old[i]]; in qsufsort()
169 static off_t search(off_t *I,u_char *old,off_t oldsize, in search() argument
175 x=matchlen(old+I[st],oldsize-I[st],newdata,newsize); in search()
176 y=matchlen(old+I[en],oldsize-I[en],newdata,newsize); in search()
188 if(memcmp(old+I[x],newdata,MIN(oldsize-I[x],newsize))<0) { in search()
189 return search(I,old,oldsize,newdata,newsize,x,en,pos); in search()
191 return search(I,old,oldsize,newdata,newsize,st,x,pos); in search()
224 int bsdiff(u_char* old, off_t oldsize, off_t** IP, u_char* newdata, off_t newsize, in bsdiff() argument
247 qsufsort(*IP, V, old, oldsize); in bsdiff()
287 len=search(I,old,oldsize,newdata+scan,newsize-scan, in bsdiff()
292 (old[scsc+lastoffset] == newdata[scsc])) in bsdiff()
299 (old[scan+lastoffset] == newdata[scan])) in bsdiff()
306 if(old[lastpos+i]==newdata[lastscan+i]) s++; in bsdiff()
315 if(old[pos-i]==newdata[scan-i]) s++; in bsdiff()
325 old[lastpos+lenf-overlap+i]) s++; in bsdiff()
327 old[pos-lenb+i]) s--; in bsdiff()
336 db[dblen+i]=newdata[lastscan+i]-old[lastpos+i]; in bsdiff()