From 5b5a2adeeb110e02a7e5d30a0a2b93d58c8e7bcd Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 24 Oct 1996 03:17:48 +0000 Subject: [PATCH] Change NEWS-HEADER:GUARANTEE-FULL-TEXT! so that it stores the header text after it is fetched. This is necessary to allow off-line reading to work properly. --- v7/src/edwin/nntp.scm | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/v7/src/edwin/nntp.scm b/v7/src/edwin/nntp.scm index 655fac4ea..6d4269c18 100644 --- a/v7/src/edwin/nntp.scm +++ b/v7/src/edwin/nntp.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: nntp.scm,v 1.10 1996/10/23 22:59:36 cph Exp $ +;;; $Id: nntp.scm,v 1.11 1996/10/24 03:17:48 cph Exp $ ;;; ;;; Copyright (c) 1995-96 Massachusetts Institute of Technology ;;; @@ -1200,14 +1200,29 @@ (define (news-header:guarantee-full-text! header) (let ((text (news-header:text header))) - (if (and (not (string-null? text)) - (char=? (string-ref text 0) #\newline)) + (if (pruned-header-text? text) (let ((reply - (read-header (news-header:group header) - (news-header:number header) - #f))) + (get-full-header (news-header:group header) + (news-header:number header)))) (if (vector? reply) (set-news-header:text! header (vector-ref reply 2))))))) + +(define (get-full-header group number) + (let ((gdbf (news-group:header-gdbf group #t))) + (if gdbf + (let ((key (->key number))) + (let ((reply (get-pre-read-header gdbf key))) + (if (and (vector? reply) + (pruned-header-text? (vector-ref reply 2))) + (let ((reply (read-header group number #f))) + (store-header gdbf key reply) + reply) + reply))) + (read-header group number #f)))) + +(define (pruned-header-text? text) + (and (not (string-null? text)) + (char=? (string-ref text 0) #\newline))) ;;;; Conversation Threads -- 2.25.1