int next_day(struct icalrecur_iterator_impl* impl)
{
- short has_by_data = (impl->by_ptrs[BY_DAY][0]!=ICAL_RECURRENCE_ARRAY_MAX);
short this_frequency = (impl->rule.freq == ICAL_DAILY_RECURRENCE);
+#ifndef NDEBUG
+ short has_by_data = (impl->by_ptrs[BY_DAY][0]!=ICAL_RECURRENCE_ARRAY_MAX);
assert(has_by_data || this_frequency);
+#endif /* NDEBUG */
if (next_hour(impl) == 0){
return 0;
{
int data_valid = 1;
+#ifndef NDEBUG
short this_frequency = (impl->rule.freq == ICAL_MONTHLY_RECURRENCE);
assert( has_by_data(impl,BY_MONTH) || this_frequency);
+#endif /* NDEBUG */
/* Iterate through the occurrences within a day. If we don't get to
the end of the intra-day data, don't bother going to the next
if( has_by_data){
/* Use the Week Number byrule data */
int week_no;
- struct icaltimetype t;
impl->by_indices[BY_WEEK_NO]++;
end_of_data = 1;
}
- t = impl->last;
- t.month=1; /* HACK, should be setting to the date of the first week of year*/
- t.day=1;
-
week_no = impl->by_ptrs[BY_WEEK_NO][impl->by_indices[BY_WEEK_NO]];
impl->last.day += week_no*7;
int i;
pvl_list days_list = pvl_newlist();
- short start_dow, end_dow, end_year_day, start_doy;
+ short start_dow, end_year_day, start_doy;
struct icaltimetype tmp = impl->last;
tmp.year= year;
tmp.day--;
tmp = icaltime_normalize(tmp);
- end_dow = icaltime_day_of_week(tmp);
end_year_day = icaltime_day_of_year(tmp);
for(i = 0; BYDAYPTR[i] != ICAL_RECURRENCE_ARRAY_MAX; i++){
case 1<<BY_WEEK_NO: {
/* FREQ=YEARLY; BYWEEKNO=20,50 */
- struct icaltimetype t;
- short dow;
-
- t.day = impl->dtstart.day;
- t.month = impl->dtstart.month;
- t.year = year;
- t.is_date = 1;
-
- dow = icaltime_day_of_week(t);
- /* HACK Not finished */
-
break;
}
{
struct mime_impl impl;
struct sspm_header header;
- void *part;
int i;
/* Initialize all of the data */
sspm_read_header(&impl,&header);
if(header.major == SSPM_MULTIPART_MAJOR_TYPE){
- struct sspm_header *child_header;
- child_header = &(impl.parts[impl.part_no].header);
-
sspm_store_part(&impl,header,impl.level,0,0);
-
- part = sspm_make_multipart_part(&impl,child_header);
-
} else {
void *part;
size_t size;