diff options
author | Steve Price <steve@FreeBSD.org> | 1998-08-10 00:05:49 +0000 |
---|---|---|
committer | Steve Price <steve@FreeBSD.org> | 1998-08-10 00:05:49 +0000 |
commit | 6ce371c6db0613e4ea237878f8bcbd2877325c6e (patch) | |
tree | b682335d247f0198180256af7e7cb8ea1de849bf /mail/bulk_mailer/files/patch-ab | |
parent | 21704cd5242b6340e006490704c9b33a26288b59 (diff) | |
download | ports-6ce371c6db0613e4ea237878f8bcbd2877325c6e.tar.gz ports-6ce371c6db0613e4ea237878f8bcbd2877325c6e.zip |
Notes
Diffstat (limited to 'mail/bulk_mailer/files/patch-ab')
-rw-r--r-- | mail/bulk_mailer/files/patch-ab | 260 |
1 files changed, 95 insertions, 165 deletions
diff --git a/mail/bulk_mailer/files/patch-ab b/mail/bulk_mailer/files/patch-ab index adecbd5a2794..29afbd1047b6 100644 --- a/mail/bulk_mailer/files/patch-ab +++ b/mail/bulk_mailer/files/patch-ab @@ -1,165 +1,95 @@ -*** bulk_mailer.c.original Sun Feb 11 09:49:32 1996 ---- bulk_mailer.c Fri Mar 22 18:55:32 1996 -*************** -*** 87,92 **** ---- 87,95 ---- - #include <sysexits.h> - #include <errno.h> - #include <time.h> -+ #include <string.h> -+ #include <stdlib.h> -+ #include <unistd.h> - #include "patchlevel.h" - - #ifndef PIPECOMMAND -*************** -*** 260,274 **** - * memory, appending a NUL to the copy. - */ - -! static char * -! strndup (str, len) -! { -! char *result = malloc_or_else (len + 1); -! -! strncpy (result, str, len); -! result[len] = '\0'; -! return result; -! } - - /* - * sort by case-folded reversed domain ---- 263,277 ---- - * memory, appending a NUL to the copy. - */ - -! /* static char * */ -! /* strndup (str, len) */ -! /* { */ -! /* char *result = malloc_or_else (len + 1); */ -! -! /* strncpy (result, str, len); */ -! /* result[len] = '\0'; */ -! /* return result; */ -! /* } */ - - /* - * sort by case-folded reversed domain -*************** -*** 299,313 **** - { - char *at; - char *ptr; -! char *domain; - char tempbuf[1024]; -! char c; - - /* - * make sure there's room in the buffer. - */ - if (num_addrs >= num_addr_slots) { -! struct address *new; - - num_addr_slots += 1000; - if (address_list == NULL) ---- 302,316 ---- - { - char *at; - char *ptr; -! /* char *domain; */ - char tempbuf[1024]; -! /* char c; */ - - /* - * make sure there's room in the buffer. - */ - if (num_addrs >= num_addr_slots) { -! /* struct address *new; */ - - num_addr_slots += 1000; - if (address_list == NULL) -*************** -*** 903,909 **** - copy_message (out, in) - FILE *out, *in; - { -! int c; - char linebuf[32*1024]; - int has_valid_approved_hdr = 0; - int has_resent_to_hdr = 0; ---- 906,912 ---- - copy_message (out, in) - FILE *out, *in; - { -! /* int c; */ - char linebuf[32*1024]; - int has_valid_approved_hdr = 0; - int has_resent_to_hdr = 0; -*************** -*** 1077,1090 **** - */ - lines = 0; - while (fgets (linebuf, sizeof (linebuf), in) != NULL) { -! 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")) - saw_command = 1; - ++lines; - fputs (linebuf, out); ---- 1080,1093 ---- - */ - lines = 0; - while (fgets (linebuf, sizeof (linebuf), in) != NULL) { -! 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"))) - saw_command = 1; - ++lines; - fputs (linebuf, out); -*************** -*** 1181,1193 **** - int argc; - char *argv[]; - { -! int i; - FILE *fp; - FILE *tmp; - static char template[] = "/tmp/blkXXXXXX"; - char *tempname; -! int c; -! char buf[1024]; - - while (argc > 1 && (*argv[1] == '-' || *argv[1] == '+')) { - if (strcmp (argv[1], "-debug") == 0) ---- 1184,1196 ---- - int argc; - char *argv[]; - { -! /* int i; */ - FILE *fp; - FILE *tmp; - static char template[] = "/tmp/blkXXXXXX"; - char *tempname; -! /* int c; */ -! /* char buf[1024]; */ - - while (argc > 1 && (*argv[1] == '-' || *argv[1] == '+')) { - if (strcmp (argv[1], "-debug") == 0) -*************** -*** 1338,1341 **** ---- 1341,1345 ---- - - exit (EX_OK); - } -+ exit (EX_OK); - } +--- 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); + } |