-/*
- * This function is called for every message in the list.
- */
-int blogview_LoadMsgFromServer(SharedMessageStatus *Stat,
- void **ViewSpecific,
- message_summary* Msg,
- int is_new,
- int i)
-{
- struct blogview *BLOG = (struct blogview *) *ViewSpecific;
-
- if (BLOG->alloc_msgs == 0) {
- BLOG->alloc_msgs = 1000;
- BLOG->msgs = malloc(BLOG->alloc_msgs * sizeof(struct blogpost));
- memset(BLOG->msgs, 0, (BLOG->alloc_msgs * sizeof(struct blogpost)) );
- }
-
- /* Check our buffer size */
- if (BLOG->num_msgs >= BLOG->alloc_msgs) {
- BLOG->alloc_msgs *= 2;
- BLOG->msgs = realloc(BLOG->msgs, (BLOG->alloc_msgs * sizeof(long)));
- memset(&BLOG->msgs[BLOG->num_msgs], 0, ((BLOG->alloc_msgs - BLOG->num_msgs) * sizeof(long)) );
- }
-
- BLOG->msgs[BLOG->num_msgs++].msgnum = Msg->msgnum;
- BLOG->msgs[BLOG->num_msgs].id = 0;
- BLOG->msgs[BLOG->num_msgs].refs = 0;
- BLOG->msgs[BLOG->num_msgs].comment_count = 0;
-
- return 200;
-}
-
-
-
-/*
- * Sort a list of 'struct blogpost' objects by newest-to-oldest msgnum.
- */
-int blogview_sortfunc(const void *s1, const void *s2) {
- struct blogpost *l1 = (struct blogpost *)(s1);
- struct blogpost *l2 = (struct blogpost *)(s2);
-
- if (l1->msgnum > l2->msgnum) return(-1);
- if (l1->msgnum < l2->msgnum) return(+1);
- return(0);
-}
-
-
-