summaryrefslogtreecommitdiff
path: root/mail/bulk_mailer/files/patch-ab
blob: 29afbd1047b672132673de949710fbc7c0654768 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
--- bulk_mailer.c.ORIG	Thu Jan 29 22:32:58 1998
+++ bulk_mailer.c	Thu Jan 29 23:05:35 1998
@@ -91,6 +91,8 @@
 #include <sysexits.h>
 #include <errno.h>
 #include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
@@ -271,6 +273,7 @@
  * memory, appending a NUL to the copy.
  */
 
+/*
 static char *
 strndup (str, len)
 char *str;
@@ -282,6 +285,7 @@
     result[len] = '\0';
     return result;
 }
+*/
 
 /*
  * sort by case-folded reversed domain
@@ -312,15 +316,15 @@
 {
     char *at;
     char *ptr;
-    char *domain;
+/*    char *domain; */
     char tempbuf[1024];
-    char c;
+/*    char c; */
 
     /*
      * make sure there's room in the buffer.
      */
     if (num_addrs >= num_addr_slots) {
-	struct address *new;
+/*	struct address *new; */
 	
 	num_addr_slots += 1000;
 	if (address_list == NULL)
@@ -916,7 +920,7 @@
 copy_message (out, in)
 FILE *out, *in;
 {
-    int c;
+/*    int c; */
     char linebuf[32*1024];
     int has_valid_approved_hdr = 0;
     int has_resent_to_hdr = 0;
@@ -1105,14 +1109,14 @@
      */
     lines = 0;
     while (fgets (linebuf, sizeof (linebuf), in) != NULL) {
-	if (lines < 5 && 
+	if (lines < 5 && (
 	    /*
 	     * these often occur in English-text unsubscribe requests
 	     */
 	    contains (linebuf, "delete me") ||
 	    contains (linebuf, "remove me") ||
 	    contains (linebuf, "subscribe") ||
-	    contains (linebuf, "unsubscribe"))
+	    contains (linebuf, "unsubscribe")))
 	    saw_command = 1;
 	++lines;
 	fputs (linebuf, out);
@@ -1210,13 +1214,13 @@
 int argc;
 char *argv[];
 {
-    int i;
+/*    int i; */
     FILE *fp;
     FILE *tmp;
     static char template[] = "/tmp/blkXXXXXX";
     char *tempname;
-    int c;
-    char buf[1024];
+/*    int c; */
+/*    char buf[1024]; */
 
     while (argc > 1 && (*argv[1] == '-' || *argv[1] == '+')) {
 	if (strcmp (argv[1], "-comment") == 0 && argc > 2) {
@@ -1377,4 +1381,5 @@
 	
 	exit (EX_OK);
     }
+    exit (EX_OK);
 }