From da702a7313cb147206630bea66a348cb1dc94fd9 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 13 Oct 2010 12:21:15 -0400 Subject: [PATCH] number of comments --- webcit/blogview_renderer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webcit/blogview_renderer.c b/webcit/blogview_renderer.c index cd2a52efd..b56b549a5 100644 --- a/webcit/blogview_renderer.c +++ b/webcit/blogview_renderer.c @@ -149,7 +149,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, j; + int i, j, num_comments; /* Pass #1 - sort */ if (Stat->nummsgs > 0) { @@ -199,11 +199,13 @@ int blogview_render(SharedMessageStatus *Stat, void **ViewSpecific, long oper) BLOG->msgs[i].refs ); read_message(WC->WBuf, HKEY("view_message"), BLOG->msgs[i].msgnum, NULL, &Mime); + num_comments = 0; for (j=0; (jnum_msgs); ++j) { if (BLOG->msgs[j].refs == BLOG->msgs[i].id) { - wc_printf(" * comment %d
\n", j); + ++num_comments; } } + wc_printf("%d comments\n", num_comments); wc_printf("
\n"); } } -- 2.30.2