X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fblogview_renderer.c;h=42cf1abb0751588853664719730673622b26d59c;hb=60fc56f01993137b4e6edcd7b5aaf2bc9eabb29a;hp=1a18297f07ec035bfbbfb4ede8c688936e5ba72d;hpb=a066e10a45c321c47a9a06bd309651039833cf2a;p=citadel.git 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"); } }