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:
@@ -262,7 +262,7 @@ apoint_add (void)
|
||||
|
||||
/* Delete an item from the appointment list. */
|
||||
void
|
||||
apoint_delete (struct conf *conf, unsigned *nb_events, unsigned *nb_apoints)
|
||||
apoint_delete (unsigned *nb_events, unsigned *nb_apoints)
|
||||
{
|
||||
char *choices = "[y/n] ";
|
||||
char *del_app_str = _("Do you really want to delete this item ?");
|
||||
@@ -275,7 +275,7 @@ apoint_delete (struct conf *conf, unsigned *nb_events, unsigned *nb_apoints)
|
||||
|
||||
date = calendar_get_slctd_day_sec ();
|
||||
|
||||
if (conf->confirm_delete)
|
||||
if (conf.confirm_delete)
|
||||
{
|
||||
status_mesg (del_app_str, choices);
|
||||
answer = wgetch (win[STA].p);
|
||||
|
||||
Reference in New Issue
Block a user