From owner-freebsd-ports Sun Nov 19 08:51:54 1995 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id IAA10372 for ports-outgoing; Sun, 19 Nov 1995 08:51:54 -0800 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id IAA10344 for ; Sun, 19 Nov 1995 08:51:43 -0800 Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id RAA14440; Sun, 19 Nov 1995 17:50:46 +0100 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id RAA28785; Sun, 19 Nov 1995 17:50:45 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.6.12/8.6.9) id RAA27637; Sun, 19 Nov 1995 17:31:59 +0100 From: J Wunsch Message-Id: <199511191631.RAA27637@uriah.heep.sax.de> Subject: Re: knews-0.9.3 ported - really, an amazing X11 Newsreader with , graphical threads To: ports@freebsd.org Date: Sun, 19 Nov 1995 17:31:59 +0100 (MET) Cc: kjj@matematik.su.se (Karl-Johan Johnsson) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: from "Andreas Klemm" at Nov 19, 95 10:02:13 am X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 2358 Sender: owner-ports@freebsd.org Precedence: bulk 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. ;-)