"Fossies" - the Fresh Open Source Software Archive  

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

timerommel.h  (bed-3.0.3.src.tar.xz):timerommel.h  (bed-3.1.0.src.tar.xz)
char months[][4]= { "Jan","Feb","Mar","Apr","May", "Jun", "Jul", "Aug","S ep","Oct","Nov" ,"Dec" }; char months[][4]= { "Jan","Feb","Mar","Apr","May", "Jun", "Jul", "Aug","S ep","Oct","Nov" ,"Dec" };
char *ptr=formal+4; const char *ptr=formal+4;
int timtm_year, timtm_hour; int timtm_year, timtm_hour;
for(int j=0;j<12;j++) { for(int j=0;j<12;j++) {
if(!strncasecmp(months[j], ptr,3)) { if(!strncasecmp(months[j], ptr,3)) {
tim.tm_mon=j; tim.tm_mon=j;
tim.tm_isdst=0; tim.tm_isdst=0;
tim.tm_wday=0; tim.tm_wday=0;
ptr+=4; ptr+=4;
sscanf(ptr,"%d %d:%d:%d %d", &tim.tm_mday,&timtm_hour,&tim.tm_min,&tim.tm_sec,&t imtm_year); sscanf(ptr,"%d %d:%d:%d %d", &tim.tm_mday,&timtm_hour,&tim.tm_min,&tim.tm_sec,&t imtm_year);
/* if(timtm_hour>24||timtm_hour<0||tim.tm_min<0||tim .tm_min>60||tim.tm_mday<0||tim.tm_mday>32||timtm_year<1901||timtm_year>2037) /* if(timtm_hour>24||timtm_hour<0||tim.tm_min<0||tim .tm_min>60||tim.tm_mday<0||tim.tm_mday>32||timtm_year<1901||timtm_year>2037)
return -1; return -1;
*/ */
timtm_year-=1900; timtm_year-=1900;
tim.tm_year=timtm_year; tim.tm_year=timtm_year;
tim.tm_hour=timtm_hour; tim.tm_hour=timtm_hour;
t=amktime(&tim); t=amktime(&tim);
// t+=tim.tm_gmtoff; // t+=tim.tm_gmtoff;
// t-=timezone; // t-=timezone;
memmove(bin,(char *)&t,4); memcpy(bin,(char *)&t,4);
return 0; return 0;
} }
} }
return -1; return -1;
 End of changes. 3 change blocks. 
3 lines changed or deleted 2 lines changed or added

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