- p = icalcomponent_get_first_property(
- Cal->cal,
- ICAL_SUMMARY_PROPERTY);
- if (p == NULL) {
- p = icalproperty_new_summary(_("Untitled Event"));
- icalcomponent_add_property(Cal->cal, p);
- }
- e = icalcomponent_get_first_property(
- Cal->cal,
- ICAL_DTEND_PROPERTY);
- if ((p != NULL) && (e != NULL)) {
- time_t difftime;
- int hours, minutes;
- t = icalproperty_get_dtend(e);
- event_tte = icaltime_as_timet(t);
- localtime_r(&event_tte, &event_tme);
- difftime=(event_tte-event_tts)/60;
- hours=(int)(difftime / 60);
- minutes=difftime % 60;
- wc_printf("<tr><td bgcolor='%s'>%i:%2i</td><td bgcolor='%s'>"
- "<font size=\"-1\">"
- "<a class=\"event%s\" href=\"display_edit_event?msgnum=%ld?calview=calbrief?year=%s?month=%s?day=%s\">",
- daycolor,
- hours, minutes,
- (Cal->unread)?"_unread":"_read",
- daycolor,
- Cal->cal_msgnum,
- bstr("year"),
- bstr("month"),
- bstr("day")
- );
-
- escputs((char *)
- icalproperty_get_comment(p));
- /* \todo: allso ammitime format */
- wc_strftime(&sbuf[0], sizeof(sbuf), timeformat, &event_tms);
- wc_strftime(&ebuf[0], sizeof(sbuf), timeformat, &event_tme);
-
- wc_printf("</a></font></td>"
- "<td bgcolor='%s'>%s</td><td bgcolor='%s'>%s</td></tr>",
- daycolor,
- sbuf,
- daycolor,
- ebuf);
+ p = icalcomponent_get_first_property(Cal->cal, ICAL_SUMMARY_PROPERTY);
+ if (p == NULL) {
+ p = icalproperty_new_summary(_("Untitled Event"));
+ icalcomponent_add_property(Cal->cal, p);
+ }
+ e = icalcomponent_get_first_property(Cal->cal, ICAL_DTEND_PROPERTY);
+ if ((p != NULL) && (e != NULL)) {
+ time_t difftime;
+ int hours, minutes;
+ t = icalproperty_get_dtend(e);
+ event_tte = icaltime_as_timet(t);
+ localtime_r(&event_tte, &event_tme);
+ difftime = (event_tte - event_tts) / 60;
+ hours = (int) (difftime / 60);
+ minutes = difftime % 60;
+ wc_printf("<tr><td bgcolor='%s'>%i:%2i</td><td bgcolor='%s'>"
+ "<font size=\"-1\">"
+ "<a class=\"event%s\" href=\"display_edit_event?msgnum=%ld?calview=calbrief?year=%s?month=%s?day=%s\">",
+ daycolor,
+ hours, minutes,
+ (Cal->unread) ? "_unread" : "_read",
+ daycolor, Cal->cal_msgnum, bstr("year"), bstr("month"), bstr("day")
+ );
+
+ escputs((char *)
+ icalproperty_get_comment(p));
+ /* \todo: allso ammitime format */
+ wc_strftime(&sbuf[0], sizeof(sbuf), timeformat, &event_tms);
+ wc_strftime(&ebuf[0], sizeof(sbuf), timeformat, &event_tme);
+
+ wc_printf("</a></font></td>"
+ "<td bgcolor='%s'>%s</td><td bgcolor='%s'>%s</td></tr>",
+ daycolor, sbuf, daycolor, ebuf);