Mercurial > bday
comparison bday.c @ 14:a56120a4678f
wrapping of long lines
author | meillo@marmaro.de |
---|---|
date | Thu, 13 Nov 2008 13:31:33 +0100 |
parents | 4f48b4f86e3d |
children | 032af48d590b |
comparison
equal
deleted
inserted
replaced
13:a1ac59b7916b | 14:a56120a4678f |
---|---|
315 } | 315 } |
316 } else { | 316 } else { |
317 if (delta(&(evl[i].date)) <= evl[i].warn) { | 317 if (delta(&(evl[i].date)) <= evl[i].warn) { |
318 append(buf, evl[i].text); | 318 append(buf, evl[i].text); |
319 append(buf, " for "); | 319 append(buf, " for "); |
320 /* +1 because, if the difference between two dates is one day, then the length of an event on those days is two days */ | 320 /* +1 because, if the difference between two dates is one day, |
321 then the length of an event on those days is two days */ | |
321 j = ddiff(&(evl[i].date),&(evl[i].enddate)) + 1; | 322 j = ddiff(&(evl[i].date),&(evl[i].enddate)) + 1; |
322 tmp = ttime(0, 0, j/7, j%7); | 323 tmp = ttime(0, 0, j/7, j%7); |
323 append(buf, tmp); | 324 append(buf, tmp); |
324 free(tmp); | 325 free(tmp); |
325 append(buf, " "); | 326 append(buf, " "); |
601 strcpy(buf2, buf); | 602 strcpy(buf2, buf); |
602 } | 603 } |
603 break; | 604 break; |
604 case F_TEVENT: | 605 case F_TEVENT: |
605 /* if a year was specified, and this warning isn't for it, ignore! */ | 606 /* if a year was specified, and this warning isn't for it, ignore! */ |
606 if ((evl[i].date.year != 0 && ydelta(evl[i].date, today) != 0) && (evl[i].enddate.year == 0 || ydelta(evl[i].enddate, today) != 0)) { | 607 if ((evl[i].date.year != 0 && ydelta(evl[i].date, today) != 0) |
608 && (evl[i].enddate.year == 0 || ydelta(evl[i].enddate, today) != 0)) { | |
607 i--; | 609 i--; |
608 continue; | 610 continue; |
609 } | 611 } |
610 strcpy(buf2, buf); | 612 strcpy(buf2, buf); |
611 break; | 613 break; |