#| -*-Scheme-*-
-$Id: edwin.pkg,v 1.227 1998/12/29 02:35:29 cph Exp $
+$Id: edwin.pkg,v 1.228 1998/12/29 04:08:17 cph Exp $
Copyright (c) 1989-98 Massachusetts Institute of Technology
edwin-variable$news-group-keep-seen-headers
edwin-variable$news-group-mode-hook
edwin-variable$news-group-show-author-name
+ edwin-variable$news-group-show-cache-policy
edwin-variable$news-group-show-context-headers
edwin-variable$news-group-show-seen-headers
edwin-variable$news-hide-groups
news-group:server
news-group:server-info
news-group:update-server-info!
+ news-group:use-gdbm?
news-group?
news-header:<
news-header:field-value
organize-headers-into-threads
set-news-group:reader-hook!
set-news-group:server-info!
+ set-news-group:use-gdbm!
set-news-header:reader-hook!
set-news-thread:reader-hook!
set-nntp-connection:reader-hook!
;;; -*-Scheme-*-
;;;
-;;; $Id: nntp.scm,v 1.19 1998/06/21 09:05:17 cph Exp $
+;;; $Id: nntp.scm,v 1.20 1998/12/29 04:07:48 cph Exp $
;;;
;;; Copyright (c) 1995-98 Massachusetts Institute of Technology
;;;
(%estimated-n-articles #f)
(%first-article #f)
(%last-article #f)
- (reader-hook #f))
+ (reader-hook #f)
+ (%use-gdbm? 'UNDECIDED))
(define (make-news-group connection name)
(or (find-news-group connection name)
(define (news-group:last-article group)
(and (news-group:active? group) (news-group:%last-article group)))
-
+\f
(define (news-group:update-server-info! group)
(set-news-group:server-info!
group
(vector (news-group:%estimated-n-articles group)
(news-group:%first-article group)
(news-group:%last-article group))))
+
+(define (news-group:use-gdbm? group type)
+ (and (gdbm-available?)
+ (memq type (news-group:%use-gdbm? group))))
+
+(define (set-news-group:use-gdbm! group types)
+ (set-news-group:%use-gdbm?! group types))
\f
;;;; Header Cache
(lambda (headers numbers)
(cond ((null? numbers)
headers)
- ((gdbm-available?)
+ ((news-group:use-gdbm? group 'HEADERS)
(news-group:headers-gdbm group numbers headers ignore?))
(else
(news-group:headers-no-gdbm group numbers headers ignore?))))))
(if gdbf
(if (eq? 'UNAVAILABLE gdbf) #f gdbf)
(let ((gdbf
- (and (gdbm-available?)
+ (and (news-group:use-gdbm? group 'HEADERS)
(let ((pathname
(news-group:header-gdbf-pathname group)))
(guarantee-init-file-directory pathname)
(if gdbf
(if (eq? 'UNAVAILABLE gdbf) #f gdbf)
(let ((gdbf
- (and (gdbm-available?)
+ (and (news-group:use-gdbm? group 'BODIES)
(let ((pathname
(news-group:body-gdbf-pathname group)))
(guarantee-init-file-directory pathname)
(nntp-body-command (news-group:connection group)
(news-header:message-id header)
port))))
-
+\f
(define (news-header:pre-read-body header)
(let ((group (news-header:group header)))
(let ((gdbf (news-group:body-gdbf group #t)))
datum)))))
\f
(define (news-group:purge-pre-read-headers group predicate)
- (if (gdbm-available?)
+ (if (news-group:use-gdbm? group 'HEADERS)
(if (eq? predicate 'ALL)
(begin
(set-news-group:%header-gdbf! group #f)