summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-06-27 07:35:11 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-06-30 14:34:36 +0200
commit44d3c96828a856b67f87411e4cf8c933677f6d01 (patch)
tree228f609683b66c736e9bb70f779eac5ac7f96aaf /src
parent954e3fd8ee08054e79013e6af69c8026bce929a7 (diff)
downloadcalcurse-44d3c96828a856b67f87411e4cf8c933677f6d01.tar.gz
calcurse-44d3c96828a856b67f87411e4cf8c933677f6d01.zip
Remove "appt_pos" member from day items
This is no longer used and removing it saves a few bytes per item. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src')
-rw-r--r--src/calcurse.h1
-rw-r--r--src/day.c12
2 files changed, 5 insertions, 8 deletions
diff --git a/src/calcurse.h b/src/calcurse.h
index adc742f..2986420 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -363,7 +363,6 @@ struct day_item {
int type; /* (recursive or normal) event or appointment */
long start; /* start time of the repetition occurrence */
union aptev_ptr item; /* pointer to the actual item */
- int appt_pos; /* real position in recurrent list */
};
/* Available view for the calendar panel. */
diff --git a/src/day.c b/src/day.c
index 5d67d46..087d8b7 100644
--- a/src/day.c
+++ b/src/day.c
@@ -79,14 +79,12 @@ static int day_cmp_start(struct day_item *a, struct day_item *b)
}
/* Add an item to the current day list. */
-static void day_add_item(int type, long start, union aptev_ptr item,
- int appt_pos)
+static void day_add_item(int type, long start, union aptev_ptr item)
{
struct day_item *day = mem_malloc(sizeof(struct day_item));
day->type = type;
day->start = start;
day->item = item;
- day->appt_pos = appt_pos;
LLIST_ADD_SORTED(&day_items, day, day_cmp_start);
}
@@ -171,7 +169,7 @@ static int day_store_events(long date, regex_t *regex)
continue;
p.ev = ev;
- day_add_item(EVNT, ev->day, p, 0);
+ day_add_item(EVNT, ev->day, p);
e_nb++;
}
@@ -198,7 +196,7 @@ static int day_store_recur_events(long date, regex_t *regex)
continue;
p.rev = rev;
- day_add_item(RECUR_EVNT, rev->day, p, 0);
+ day_add_item(RECUR_EVNT, rev->day, p);
e_nb++;
}
@@ -230,7 +228,7 @@ static int day_store_apoints(long date, regex_t *regex)
if (apt->start >= date + DAYINSEC)
break;
- day_add_item(APPT, apt->start, p, 0);
+ day_add_item(APPT, apt->start, p);
a_nb++;
}
LLIST_TS_UNLOCK(&alist_p);
@@ -262,7 +260,7 @@ static int day_store_recur_apoints(long date, regex_t *regex)
unsigned real_start;
if (recur_apoint_find_occurrence(rapt, date, &real_start)) {
- day_add_item(RECUR_APPT, real_start, p, a_nb);
+ day_add_item(RECUR_APPT, real_start, p);
a_nb++;
}
}