"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "plugins/examples/translate.cc" between
bed-3.0.3.src.tar.xz and bed-3.1.0.src.tar.xz

About: bed is an adjustable data format binary editor.

translate.cc  (bed-3.0.3.src.tar.xz):translate.cc  (bed-3.1.0.src.tar.xz)
skipping to change at line 303 skipping to change at line 303
meaning->len=fromhexstring(ptr,len,meaning->buf); meaning->len=fromhexstring(ptr,len,meaning->buf);
ptr=end+1; ptr=end+1;
putconnection(name,meaning); putconnection(name,meaning);
} }
labelnr=i; labelnr=i;
if(labelnr!=last) if(labelnr!=last)
fprintf(stderr,"Translate::setconvstr found only %d labels, not %d\n",lab elnr,last); fprintf(stderr,"Translate::setconvstr found only %d labels, not %d\n",lab elnr,last);
/*otherwise a copy seems not identical */ /*otherwise a copy seems not identical */
return 0; return 0;
} }
inline char *convstr(void) override{ inline char *convstr(void) const override{
return constconvstr(); return constconvstr();
} }
char *constconvstr(void) const { char *constconvstr(void) const {
int newlen=labelnr*((bytesscreen+bytesfile)*2+2)+sizeof(labelnr)*2+unknown.l en*2+3; int newlen=labelnr*((bytesscreen+bytesfile)*2+2)+sizeof(labelnr)*2+unknown.l en*2+3;
if(newlen>maxlen) { if(newlen>maxlen) {
if(maxlen>0) if(maxlen>0)
delete[] conf; delete[] conf;
maxlen=newlen; maxlen=newlen;
conf=new char[maxlen]; conf=new char[maxlen];
} }
skipping to change at line 373 skipping to change at line 373
memcpy(output,uit->buf,uit->len); memcpy(output,uit->buf,uit->len);
break; break;
} }
} }
for(;len<inplen&&isspace(input[len]);len++) for(;len<inplen&&isspace(input[len]);len++)
; ;
if(len<inplen) if(len<inplen)
inplen=len-part->apart; inplen=len-part->apart;
return bytesfile; return bytesfile;
} }
int equal(Filter *fil) override{ int equal(const Filter *fil) const override{
if(!Filter::equal(fil)) if(!Filter::equal(fil))
return 0; return 0;
char *convthis=convstr(); /*Caution overwriten by new call*/ char *convthis=convstr(); /*Caution overwriten by new call*/
char *convthat=fil->convstr(); char *convthat=fil->convstr();
if(strcmp(convthis,convthat)) if(strcmp(convthis,convthat))
return 0; return 0;
return 1; return 1;
} }
}; };
registerfilterclass(Translate) registerfilterclass(Translate)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)