From 60fc56f01993137b4e6edcd7b5aaf2bc9eabb29a Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 12 Oct 2010 16:11:24 -0400 Subject: [PATCH] Rendering test --- webcit/blogview_renderer.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/webcit/blogview_renderer.c b/webcit/blogview_renderer.c index 1a18297f0..42cf1abb0 100644 --- a/webcit/blogview_renderer.c +++ b/webcit/blogview_renderer.c @@ -146,7 +146,7 @@ void blogview_learn_thread_references(struct blogpost *bp) int blogview_render(SharedMessageStatus *Stat, void **ViewSpecific, long oper) { struct blogview *BLOG = (struct blogview *) *ViewSpecific; - int i; + int i, j; /* Pass #1 - sort */ if (Stat->nummsgs > 0) { @@ -172,21 +172,36 @@ int blogview_render(SharedMessageStatus *Stat, void **ViewSpecific, long oper) * * Comments * * etc */ + + for (i=0; (inum_msgs); ++i) { if (BLOG->msgs[i].msgnum > 0L) { - if (BLOG->msgs[i].refs == 0) { - wc_printf(""); - } - wc_printf("Message %d, #%ld, id %d, refs %d", + wc_printf("Message %d, #%ld, id %d, refs %d
\n", i, BLOG->msgs[i].msgnum, BLOG->msgs[i].id, BLOG->msgs[i].refs ); + } + } + + wc_printf("
\n"); + + for (i=0; (inum_msgs); ++i) { + if (BLOG->msgs[i].msgnum > 0L) { if (BLOG->msgs[i].refs == 0) { - wc_printf("
"); + wc_printf("Message %d, #%ld, id %d, refs %d
\n", + i, + BLOG->msgs[i].msgnum, + BLOG->msgs[i].id, + BLOG->msgs[i].refs + ); + for (j=0; (jnum_msgs); ++j) { + if (BLOG->msgs[j].refs == BLOG->msgs[i].id) { + wc_printf("* comment %d
\n", j); + } + } } - wc_printf("
\n"); } } -- 2.30.2