Lines Matching refs:newsize
159 static off_t matchlen(u_char *olddata,off_t oldsize,u_char *newdata,off_t newsize) in matchlen() argument
163 for(i=0;(i<oldsize)&&(i<newsize);i++) in matchlen()
170 u_char *newdata,off_t newsize,off_t st,off_t en,off_t *pos) 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
252 if(((db=reinterpret_cast<u_char*>(malloc(newsize+1)))==NULL) || in bsdiff()
253 ((eb=reinterpret_cast<u_char*>(malloc(newsize+1)))==NULL)) err(1,NULL); in bsdiff()
274 offtout(newsize, header + 24); in bsdiff()
283 while(scan<newsize) { in bsdiff()
286 for(scsc=scan+=len;scan<newsize;scan++) { in bsdiff()
287 len=search(I,old,oldsize,newdata+scan,newsize-scan, in bsdiff()
303 if((len!=oldscore) || (scan==newsize)) { in bsdiff()
312 if(scan<newsize) { in bsdiff()
383 if ((newsize = ftello(pf)) == -1) in bsdiff()
385 offtout(newsize - len, header + 16); in bsdiff()