"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/ui-day.c" between
calcurse-4.5.0.tar.gz and calcurse-4.5.1.tar.gz

About: calcurse is a text-based calendar and scheduling application.

ui-day.c  (calcurse-4.5.0):ui-day.c  (calcurse-4.5.1)
skipping to change at line 281 skipping to change at line 281
status_mesg(_("Enter the new item description:"), ""); status_mesg(_("Enter the new item description:"), "");
updatestring(win[STA].p, desc, 0, 1); updatestring(win[STA].p, desc, 0, 1);
} }
/* Edit the list of exception days for a recurrent item. */ /* Edit the list of exception days for a recurrent item. */
static int update_exc(llist_t *exc) static int update_exc(llist_t *exc)
{ {
int updated = 0; int updated = 0;
if (!exc->head) if (!exc->head)
return updated; return !updated;
char *days; char *days;
enum getstr ret; enum getstr ret;
status_mesg(_("Exception days:"), ""); status_mesg(_("Exception days:"), "");
days = recur_exc2str(exc); days = recur_exc2str(exc);
while (1) { while (1) {
ret = updatestring(win[STA].p, &days, 0, 1); ret = updatestring(win[STA].p, &days, 0, 1);
if (ret == GETSTRING_VALID || ret == GETSTRING_RET) { if (ret == GETSTRING_VALID || ret == GETSTRING_RET) {
if (recur_update_exc(exc, days)) { if (recur_update_exc(exc, days)) {
updated = 1; updated = 1;
skipping to change at line 423 skipping to change at line 423
keys_wgetch(win[KEY].p); keys_wgetch(win[KEY].p);
continue; continue;
} }
if (*timstr == '+') { if (*timstr == '+') {
unsigned days; unsigned days;
if (!parse_date_duration(timstr + 1, &days, start)) { if (!parse_date_duration(timstr + 1, &days, start)) {
status_mesg(msg_wrong_date, msg_enter); status_mesg(msg_wrong_date, msg_enter);
keys_wgetch(win[KEY].p); keys_wgetch(win[KEY].p);
continue; continue;
} }
newuntil = date_sec_change(start, 0, days); /* Until is midnight of the day. */
newuntil = date_sec_change(
update_time_in_date(start, 0, 0),
0, days
);
} else { } else {
int year, month, day; int year, month, day;
if (!parse_date(timstr, conf.input_datefmt, &year, if (!parse_date(timstr, conf.input_datefmt, &year,
&month, &day, ui_calendar_get_slctd_day())) { &month, &day, ui_calendar_get_slctd_day())) {
status_mesg(msg_wrong_date, msg_enter); status_mesg(msg_wrong_date, msg_enter);
keys_wgetch(win[KEY].p); keys_wgetch(win[KEY].p);
continue; continue;
} }
struct date d = { day, month, year }; struct date d = { day, month, year };
newuntil = date2sec(d, 0, 0); newuntil = date2sec(d, 0, 0);
} }
if (newuntil >= start) /* Conmpare days (midnights) - until-day may equal start day. */
if (newuntil >= update_time_in_date(start, 0, 0))
break; break;
mem_free(timstr); mem_free(timstr);
mem_free(outstr); mem_free(outstr);
timstr = date_sec2date_str(start, DATEFMT(conf.input_datefmt)); timstr = date_sec2date_str(start, DATEFMT(conf.input_datefmt));
asprintf(&outstr, msg_wrong_time, timstr); asprintf(&outstr, msg_wrong_time, timstr);
status_mesg(outstr, msg_enter); status_mesg(outstr, msg_enter);
keys_wgetch(win[KEY].p); keys_wgetch(win[KEY].p);
} }
skipping to change at line 946 skipping to change at line 951
mem_free(outstr); mem_free(outstr);
wgetch(win[KEY].p); wgetch(win[KEY].p);
continue; continue;
} }
if (*user_input == '+') { if (*user_input == '+') {
if (!parse_date_duration(user_input + 1, &days, p->start) ) { if (!parse_date_duration(user_input + 1, &days, p->start) ) {
status_mesg(mesg_wrong_1, mesg_wrong_2); status_mesg(mesg_wrong_1, mesg_wrong_2);
keys_wgetch(win[KEY].p); keys_wgetch(win[KEY].p);
continue; continue;
} }
until = date_sec_change(p->start, 0, days); /* Until is midnight of the day. */
until = date_sec_change(
update_time_in_date(p->start, 0, 0),
0, days
);
} else { } else {
int year, month, day; int year, month, day;
if (!parse_date(user_input, conf.input_datefmt, if (!parse_date(user_input, conf.input_datefmt,
&year, &month, &day, ui_calendar_get_slctd_day())) { &year, &month, &day, ui_calendar_get_slctd_day())) {
status_mesg(mesg_wrong_1, mesg_wrong_2); status_mesg(mesg_wrong_1, mesg_wrong_2);
keys_wgetch(win[KEY].p); keys_wgetch(win[KEY].p);
continue; continue;
} }
struct date d = { day, month, year }; struct date d = { day, month, year };
until = date2sec(d, 0, 0); until = date2sec(d, 0, 0);
} }
if (until >= p->start) /* Compare days (midnights) - until-day may equal start day. */
if (until >= get_slctd_day())
break; break;
datestr = date_sec2date_str(p->start, DATEFMT(conf.input_datefmt) ); datestr = date_sec2date_str(p->start, DATEFMT(conf.input_datefmt) );
asprintf(&outstr, mesg_older, datestr); asprintf(&outstr, mesg_older, datestr);
status_mesg(outstr, wrong_type_2); status_mesg(outstr, wrong_type_2);
mem_free(datestr); mem_free(datestr);
mem_free(outstr); mem_free(outstr);
keys_wgetch(win[KEY].p); keys_wgetch(win[KEY].p);
} }
 End of changes. 5 change blocks. 
5 lines changed or deleted 15 lines changed or added

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