"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "debian/relog/relog.cc" between
bed-3.0.0.src.tar.xz and bed-3.0.1.src.tar.xz

About: bed is an adjustable data format binary editor.

relog.cc  (bed-3.0.0.src.tar.xz):relog.cc  (bed-3.0.1.src.tar.xz)
/* /*
zo 31 dec 2017 16:14:41 CET Jaap Korthals Altes <bed@dse.nl> zo 31 dec 2017 16:14:41 CET Jaap Korthals Altes <binaryeditor@gmx.com>
Converts CHANGELOG to debian format to put in debian/changelog. Converts CHANGELOG to debian format to put in debian/changelog.
compile with: compile with:
g++ relog.cc -o relog -lre2 g++ relog.cc -o relog -lre2
run: run:
debian/relog/relog CHANGELOG > debian/changelog debian/relog/relog CHANGELOG > debian/changelog
Change unstable and urgency by hand. Change unstable and urgency by hand.
skipping to change at line 68 skipping to change at line 68
constexpr int outlen=256; constexpr int outlen=256;
char out[outlen]; char out[outlen];
int got=0; int got=0;
for( startpos=0;startpos<end;) { for( startpos=0;startpos<end;) {
const char *start=input.data()+startpos; const char *start=input.data()+startpos;
const char * const endline=strchrnul(start,'\n'); const char * const endline=strchrnul(start,'\n');
int len=endline-start; int len=endline-start;
if(pattern.Match(input, startpos, startpos+len, RE2::ANCHOR_BOTH , word, args_c ount) ) { if(pattern.Match(input, startpos, startpos+len, RE2::ANCHOR_BOTH , word, args_c ount) ) {
if(got) { if(got) {
cout<<"\n -- Jaap Korthals Altes <bed.dse.nl> "<<out<<endl; cout<<"\n -- Jaap Korthals Altes <binaryeditor@gmx.com> "<<out<< endl;
} }
static char buf[256]="date -R --date=\'"; static char buf[256]="date -R --date=\'";
static const int blen=strlen(buf); static const int blen=strlen(buf);
int siz=word[4].length(); int siz=word[4].length();
memcpy(buf+blen ,word[4].data(),siz); memcpy(buf+blen ,word[4].data(),siz);
buf[blen+siz]='\''; buf[blen+siz]='\'';
buf[blen+siz+1]='\0'; buf[blen+siz+1]='\0';
redi::ipstream dat(buf); redi::ipstream dat(buf);
dat.read(out,outlen); dat.read(out,outlen);
got= dat.gcount(); got= dat.gcount();
skipping to change at line 94 skipping to change at line 94
cout<<" * "; cout<<" * ";
if(*start=='-') if(*start=='-')
while(isspace(*++start)) while(isspace(*++start))
; ;
cout.write(start,endline-start); cout.write(start,endline-start);
cout<<'\n'; cout<<'\n';
}; };
startpos+=(len+1); startpos+=(len+1);
} }
if(got) { if(got) {
cout<<"-- Jaap Korthals Altes <bed.dse.nl> "<<out<<endl; cout<<"-- Jaap Korthals Altes <binaryeditor@gmx.com> "<<out<<endl;
} }
return 0; return 0;
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

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