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>
This commit is contained in:
Lukas Fleischer
2011-11-04 15:48:36 +01:00
parent 14b6ae79a2
commit 41c33eeb44
11 changed files with 159 additions and 162 deletions

View File

@@ -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;