From 41c33eeb44d1b1a4b476810757f7b91032950439 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 4 Nov 2011 15:48:36 +0100 Subject: Use a global configuration variable This is one of the few valid use cases for a global variable. No need to make it pseudo-local and pass it from one function to another. Signed-off-by: Lukas Fleischer --- src/recur.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/recur.c') diff --git a/src/recur.c b/src/recur.c index f8f04e0..b373b11 100644 --- a/src/recur.c +++ b/src/recur.c @@ -860,7 +860,7 @@ recur_apoint_erase (long start, unsigned num, unsigned delete_whole, * and then delete the selected item to recreate it as a recurrent one */ void -recur_repeat_item (struct conf *conf) +recur_repeat_item (void) { struct tm *lt; time_t t; @@ -935,7 +935,7 @@ recur_repeat_item (struct conf *conf) while (!date_entered) { snprintf (outstr, BUFSIZ, mesg_until_1, - DATEFMT_DESC (conf->input_datefmt)); + DATEFMT_DESC (conf.input_datefmt)); status_mesg (_(outstr), ""); if (getstring (win[STA].p, user_input, BUFSIZ, 0, 1) == GETSTRING_VALID) { @@ -946,7 +946,7 @@ recur_repeat_item (struct conf *conf) } else { - if (parse_date (user_input, conf->input_datefmt, + if (parse_date (user_input, conf.input_datefmt, &year, &month, &day, calendar_get_slctd_day ())) { t = p->start; @@ -969,7 +969,7 @@ recur_repeat_item (struct conf *conf) else { snprintf (outstr, BUFSIZ, mesg_wrong_2, - DATEFMT_DESC (conf->input_datefmt)); + DATEFMT_DESC (conf.input_datefmt)); status_mesg (mesg_wrong_1, _(outstr)); wgetch (win[STA].p); date_entered = 0; -- cgit v1.2.3-54-g00ecf