]> code.citadel.org Git - citadel.git/commitdiff
* Keep track of msgnums in the two-pass calendar loop, so we can hotlink to
authorArt Cancro <ajc@citadel.org>
Wed, 25 Sep 2002 21:57:13 +0000 (21:57 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 25 Sep 2002 21:57:13 +0000 (21:57 +0000)
  individual items

webcit/ChangeLog
webcit/calendar.c
webcit/calendar_view.c
webcit/webcit.c
webcit/webcit.h

index 1d9d9edd76a653bfb72b384bd60ad3312c761b79..d8b275f377170d49bec38e5d7868611af93812bd 100644 (file)
@@ -1,4 +1,8 @@
 $Log$
+Revision 400.24  2002/09/25 21:57:13  ajc
+* Keep track of msgnums in the two-pass calendar loop, so we can hotlink to
+  individual items
+
 Revision 400.23  2002/09/24 04:12:34  ajc
 * Rough cut of the two-pass calendar display routines (first pass: go thru
   messages gathering VEVENT items; second pass: render calendar with data)
@@ -1019,4 +1023,3 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
index 22bf1507f36a22a5e991b1a51ef5d6af22e3874f..e2c005e9f376572839939f947798aa4d7c41b47b 100644 (file)
@@ -237,9 +237,14 @@ void cal_process_attachment(char *part_source) {
 void display_individual_cal(icalcomponent *cal, long msgnum) {
 
        WC->num_cal += 1;
+
        WC->disp_cal = realloc(WC->disp_cal,
                        (sizeof(icalcomponent *) * WC->num_cal) );
        WC->disp_cal[WC->num_cal - 1] = icalcomponent_new_clone(cal);
+
+       WC->cal_msgnum = realloc(WC->cal_msgnum,
+                       (sizeof(long) * WC->num_cal) );
+       WC->cal_msgnum[WC->num_cal - 1] = msgnum;
 }
 
 
index b6bff018dca64f4feb9649c4380ab9d7a4a4e367..0c8cc49a5419d6c7c5fbf0de07f76e2b49b5f668 100644 (file)
@@ -244,7 +244,9 @@ void do_calendar_view(void) {
                icalcomponent_free(WC->disp_cal[i]);
        }
        WC->num_cal = 0;
+       free(WC->disp_cal);
        WC->disp_cal = NULL;
+       free(WC->cal_msgnum);
 }
 
 
index e2f084ec5f11de33cfc38cc634017cea098d86f7..3a25aafa9311fe62755f372784b28fe32f3ac8ce 100644 (file)
@@ -168,7 +168,7 @@ ssize_t http_write(int fd, void *buf, size_t count) {
 
 #else
 
-ssize_t http_write(int fd, const void *buf, size_t count) {
+ssize_t http_write(int fd, void *buf, size_t count) {
        return write(fd, buf, count);
 }
 
index a396ffbf27c44274859c73198931c995f0ab464c..8815cfeb42595da919ec7d5d38117de20dac6986 100644 (file)
@@ -178,6 +178,7 @@ struct wcsession {
 #endif
 #ifdef HAVE_ICAL_H
        icalcomponent **disp_cal;       /* store calendar items for display */
+       long *cal_msgnum;               /* store calendar msgids for display */
        int num_cal;
 #endif
 };
@@ -353,6 +354,7 @@ void cal_process_attachment(char *part_source);
 void display_calendar(long msgnum);
 void display_task(long msgnum);
 void do_calendar_view(void);
+ssize_t http_write(int fd, void *buf, size_t count);
 
 #ifdef HAVE_ICAL_H
 void display_edit_task(void);