Date: Sun, 19 Nov 1995 17:31:59 +0100 (MET) From: J Wunsch <j@uriah.heep.sax.de> To: ports@freebsd.org Cc: kjj@matematik.su.se (Karl-Johan Johnsson) Subject: Re: knews-0.9.3 ported - really, an amazing X11 Newsreader with , graphical threads Message-ID: <199511191631.RAA27637@uriah.heep.sax.de> In-Reply-To: <Pine.BSF.3.91.951119095734.429B-100000@knobel.gun.de> from "Andreas Klemm" at Nov 19, 95 10:02:13 am
next in thread | previous in thread | raw e-mail | index | archive | help
As Andreas Klemm wrote: > > On Sun, 19 Nov 1995, Ollivier Robert wrote: > > Sounds very good what you are telling about Newsview. I'll give it > a try, if it's available. Anyway, i like knews' way to use a `standard' .newsrc file. This way, i could also intermix knews with trn when X is not available. > Just for now it's the best newsreader I ever saw. Might be the > case that Newsview is really better, ok, then I'd switch to it. > But knews is available now, Newsview not. One nit: Karl-Johan was over-eager to ``beautify'' the postings. This had the ill side-effect of botching the References: header by wrapping it onto several lines. This (and the limitation to only 8 references) is in violation of RFC1036: ..., the follow-up message should have a "References" line containing the text of the original "References" line, a blank, and the Message-ID of the original message. The patch below fixes it. --- src/pedit.c.orig Thu Oct 5 11:50:50 1995 +++ src/pedit.c Sun Nov 19 16:54:27 1995 @@ -394,38 +394,34 @@ } } -#define MAX_REFS 8 static int print_references_header(FILE *fp, ARTICLE *art) { - ARTICLE *arts[MAX_REFS + 2]; - int i = MAX_REFS + 1, col, rows; + ARTICLE **arts, *a; + int i, j; + j = 0; + a = art; do { - arts[i--] = art; - art = A_PARENT(art); - } while (i > 0 && art); - - if (art) { - while (A_PARENT(art)) - art = A_PARENT(art); - arts[i] = art; - } else { - i++; - } - - rows = 1; - col = 11 + fprintf(fp, " <%s>", arts[i++]->msgid); - while (i < MAX_REFS + 2) { - if (col + arts[i]->hash_len > 75) { - rows++; - fprintf(fp, "\n "); - col = 1; - } - col += fprintf(fp, " <%s>", arts[i++]->msgid); - } - fprintf(fp, "\n"); + a = A_PARENT(a); + j++; + } while (a); - return rows; + arts = (ARTICLE **)XtMalloc(sizeof(ARTICLE *) * j); + + a = art; + i = j; + do { + arts[--i] = a; + a = A_PARENT(a); + } while(i); + + for (i = 0; i < j; i++) + (void)fprintf(fp, " <%s>", arts[i]->msgid); + (void)fprintf(fp, "\n"); + + XtFree((char *)arts); + + return 1; } static void print_attribution(FILE *fp, char *attr, ARTICLE *art) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511191631.RAA27637>