aboutsummaryrefslogtreecommitdiffstats
path: root/src/recur.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-11-04 15:48:36 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2011-11-14 11:08:14 +0100
commit41c33eeb44d1b1a4b476810757f7b91032950439 (patch)
tree2f38da227b9f554d0eab35fdb7c8cfd18e9d88d2 /src/recur.c
parent14b6ae79a25106501a30693889b1c03abd56c8c1 (diff)
downloadcalcurse-41c33eeb44d1b1a4b476810757f7b91032950439.tar.gz
calcurse-41c33eeb44d1b1a4b476810757f7b91032950439.zip
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 <calcurse@cryptocrack.de>
Diffstat (limited to 'src/recur.c')
-rw-r--r--src/recur.c8
1 files changed, 4 insertions, 4 deletions
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;