"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "plugins/examples/index2table.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.

index2table.cc  (bed-3.0.3.src.tar.xz):index2table.cc  (bed-3.1.0.src.tar.xz)
skipping to change at line 73 skipping to change at line 73
edit(rev.edit) edit(rev.edit)
{ {
} }
int Index2table::setpart(ScreenPart *p) { int Index2table::setpart(ScreenPart *p) {
Filter::setpart(p); Filter::setpart(p);
edit=p->editor; edit=p->editor;
if(maxintable==INT_MAX) if(maxintable==INT_MAX)
maxintable=edit->filesize()-tableoffset; maxintable=edit->filesize()-tableoffset;
return 0; return 0;
} }
char *Index2table::convstr(void) { char *Index2table::convstr(void) const {
#define convmax 80 #define convmax 80
static char *conv=new char[convmax]; static char *conv=new char[convmax];
snprintf(conv,convmax,"%d-%d-%d",tableoffset,maxintable,ptrbase); snprintf(conv,convmax,"%d-%d-%d",tableoffset,maxintable,ptrbase);
return conv; return conv;
} }
Index2table::~Index2table() { Index2table::~Index2table() {
} }
Filter *Index2table::newone(void) const { Filter *Index2table::newone(void) const {
return new Index2table(*this); return new Index2table(*this);
} }
skipping to change at line 130 skipping to change at line 130
int len=strcspn((char *)input," "); int len=strcspn((char *)input," ");
char tmp[len+1]; char tmp[len+1];
memcpy(tmp,input,len); memcpy(tmp,input,len);
tmp[len]='\0'; tmp[len]='\0';
edit->putmem( tableoffset +intable,(char *)tmp, min(bytesscreen,len+1)); edit->putmem( tableoffset +intable,(char *)tmp, min(bytesscreen,len+1));
} }
} }
return bytesfile; return bytesfile;
} }
int Index2table::equal(Filter *fil) { int Index2table::equal(const Filter *fil) const {
if(!Filter::equal(fil)) if(!Filter::equal(fil))
return 0; return 0;
if(tableoffset!=((Index2table *)fil)->tableoffset) if(tableoffset!=((Index2table *)fil)->tableoffset)
return 0; return 0;
if(maxintable!=((Index2table *)fil)->maxintable) if(maxintable!=((Index2table *)fil)->maxintable)
return 0; return 0;
if(edit!=((Index2table *)fil)->edit) if(edit!=((Index2table *)fil)->edit)
return 0; return 0;
return 1; return 1;
} }
 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)