1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-13 23:36:08 +00:00
freebsd-ports/mail/bulk_mailer/files/patch-ab
James FitzGibbon b7999ad641 Import of bulk-mailer v1.5, a program for speeding up batched e-mail delivery to a mailing list.
Reviewed by:	James FitzGibbon <jfitz@FreeBSD.ORG>
Submitted by:	dlowe@saturn5.com
1997-03-26 02:14:02 +00:00

166 lines
3.6 KiB
Plaintext

*** 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);
}