Change code that joins and splits threads on the basis of subject.
authorChris Hanson <org/chris-hanson/cph>
Wed, 23 Oct 1996 22:59:36 +0000 (22:59 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 23 Oct 1996 22:59:36 +0000 (22:59 +0000)
This code is now more discriminating than previously.

v7/src/edwin/nntp.scm

index f07bf4cfcb9148af7f69d69610480deea4fc44d6..655fac4eaea052f72033e9cd8647cfc593ea47d7 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: nntp.scm,v 1.9 1996/10/15 20:19:20 cph Exp $
+;;;    $Id: nntp.scm,v 1.10 1996/10/23 22:59:36 cph Exp $
 ;;;
 ;;;    Copyright (c) 1995-96 Massachusetts Institute of Technology
 ;;;
                            (if (news-header:real? parent)
                                (news-header:subject parent)
                                (find-tree-subject header))))
-                      (compare-subjects
-                       (canonicalize-subject (news-header:subject header))
-                       (canonicalize-subject subject)))))
+                      (memq
+                       (compare-subjects
+                        (canonicalize-subject (news-header:subject header))
+                        (canonicalize-subject subject))
+                       '(EQUAL LEFT-PREFIX)))))
               (disassociate-header-from-parent header parent)))))
    headers))
 
 (define (assoc-subject subject alist)
   (let loop ((alist alist))
     (and (not (null? alist))
-        (let ((comparison (compare-subjects subject (caar alist))))
-          (if comparison
-              (begin
-                (if (eq? 'LEFT-PREFIX comparison)
-                    (set-car! (car alist) subject))
-                (car alist))
-              (loop (cdr alist)))))))
+        (if (eq? 'EQUAL (compare-subjects subject (caar alist)))
+            (car alist)
+            (loop (cdr alist))))))
 
 (define (compare-subjects x y)
   (let ((xe (string-length x))