summaryrefslogtreecommitdiff
path: root/mail/elm+ME/files/patch-newmbox.c
blob: 9ee96d2d04e431e8d6ee52f2be728442bc170468 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- src/newmbox.c.orig	Wed Mar 20 08:04:48 2002
+++ src/newmbox.c	Tue Apr 16 05:02:54 2002
@@ -422,6 +422,36 @@
     }
 
     if (NULL != (tmphdr = locate_header_by_name(parsed_headers,
+						"Newsgroup"))) {	    
+	struct addr_item * addrs = 
+	    break_down_address(tmphdr->body,
+			       !(current_header -> status & 
+				 NOHDRENCODING) &&
+			       is_rfc1522(tmphdr->body),
+			       current_header->header_charset);
+	
+	if (addrs) {
+	    if (current_header->to)
+		free_addr_items(current_header->to);
+	    current_header->to = addrs;
+	    
+#if DEBUG
+	    if (Debug.active > 10) {
+		struct addr_item * p;
+		for (p =  current_header->to; p->addr; p++) {
+		    DPRINT(Debug,15,(&Debug, 
+				     "--   newsgroup[%d] addr='%s' comment='%S' fullname='%S'\n",
+				     p - current_header->to,
+				     p->addr,
+				     p->comment,
+				     p->fullname));
+		}
+	    }
+#endif
+	}	       
+    }
+
+    if (NULL != (tmphdr = locate_header_by_name(parsed_headers,
 						"Cc"))) {	    
 	struct addr_item * addrs = 
 	    break_down_address(tmphdr->body,