aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/calcurse.c6
-rw-r--r--src/calcurse.h3
-rw-r--r--src/day.c10
3 files changed, 9 insertions, 10 deletions
diff --git a/src/calcurse.c b/src/calcurse.c
index 43189b0..e179e8c 100644
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -49,8 +49,8 @@ int count, reg;
*/
static struct day_items_nb do_storage(int day_changed)
{
- struct day_items_nb inday = *day_process_storage(calendar_get_slctd_day(),
- day_changed, &inday);
+ struct day_items_nb inday = day_process_storage(calendar_get_slctd_day(),
+ day_changed);
if (day_changed) {
if ((inday.nb_events + inday.nb_apoints) > 0)
@@ -578,7 +578,7 @@ int main(int argc, char **argv)
wins_update(FLAG_ALL);
io_startup_screen(no_data_file);
}
- inday = *day_process_storage(0, 0, &inday);
+ inday = day_process_storage(0, 0);
wins_slctd_set(conf.default_panel);
wins_update(FLAG_ALL);
diff --git a/src/calcurse.h b/src/calcurse.h
index 1aff02a..c31f322 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -684,8 +684,7 @@ int day_item_get_state(struct day_item *);
void day_item_add_exc(struct day_item *, long);
void day_item_fork(struct day_item *, struct day_item *);
int day_store_items(long, unsigned *, unsigned *, regex_t *);
-struct day_items_nb *day_process_storage(struct date *, unsigned,
- struct day_items_nb *);
+struct day_items_nb day_process_storage(struct date *, unsigned);
void day_write_pad(long, int, int, int);
void day_write_stdout(long, const char *, const char *, const char *,
const char *);
diff --git a/src/day.c b/src/day.c
index df95ccf..74e6db0 100644
--- a/src/day.c
+++ b/src/day.c
@@ -360,12 +360,12 @@ day_store_items(long date, unsigned *pnb_events, unsigned *pnb_apoints,
* those items in a pad. If selected day is null, then store items for current
* day. This is useful to speed up the appointment panel update.
*/
-struct day_items_nb *day_process_storage(struct date *slctd_date,
- unsigned day_changed,
- struct day_items_nb *inday)
+struct day_items_nb day_process_storage(struct date *slctd_date,
+ unsigned day_changed)
{
long date;
struct date day;
+ struct day_items_nb inday;
if (slctd_date)
day = *slctd_date;
@@ -379,8 +379,8 @@ struct day_items_nb *day_process_storage(struct date *slctd_date,
delwin(apad.ptrwin);
/* Store the events and appointments (recursive and normal items). */
- day_store_items(date, &inday->nb_events, &inday->nb_apoints, NULL);
- apad.length = (inday->nb_events + 1 + 3 * inday->nb_apoints);
+ day_store_items(date, &inday.nb_events, &inday.nb_apoints, NULL);
+ apad.length = (inday.nb_events + 1 + 3 * inday.nb_apoints);
/* Create the new pad with its new length. */
if (day_changed)