From e954d689b5adafa4ec74e7dbd1e087dbf998f6d6 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Wed, 21 Mar 2012 15:59:09 +0100 Subject: [PATCH] Made the RPATHS config option the default and removed the #ifdefs. --- acconfig.h | 8 -------- h/prototypes.h | 3 --- sbr/m_getfld.c | 18 ------------------ uip/scansbr.c | 5 ----- uip/slocal.c | 4 ---- 5 files changed, 38 deletions(-) diff --git a/acconfig.h b/acconfig.h index f4ca2dd..581f6ad 100644 --- a/acconfig.h +++ b/acconfig.h @@ -54,14 +54,6 @@ */ #define FIX_NON_Y2K_COMPLIANT_MUA_DATES 1 -/* - * Directs inc/slocal to extract the envelope sender from "From " - * line. If inc/slocal is saving message to folder, then this - * sender information is then used to create a Return-Path - * header which is then added to the message. - */ -#define RPATHS 1 - /***** END USER CONFIGURATION SECTION *****/ @TOP@ diff --git a/h/prototypes.h b/h/prototypes.h index ff38dd3..4a74bec 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -118,10 +118,7 @@ int unputenv(char *); int uprf(char *, char *); int vfgets(FILE *, char **); char *write_charset_8bit(void); - -#ifdef RPATHS int get_returnpath(char *, int, char *, int); -#endif /* ** prototypes for compatibility functions in library diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index d64457f..534f896 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -615,10 +615,7 @@ finish: return (state); } - -#ifdef RPATHS static char unixbuf[BUFSIZ] = ""; -#endif /* RPATHS */ void m_unknown(FILE *iob) @@ -648,15 +645,10 @@ m_unknown(FILE *iob) && strncmp(text, "From ", 5) == 0) { msg_style = MS_MBOX; delimstr = "\nFrom "; -#ifndef RPATHS - while ((c = getc(iob)) != '\n' && c >= 0) - ; -#else /* RPATHS */ cp = unixbuf; while ((c = getc(iob)) != '\n' && cp - unixbuf < BUFSIZ - 1) *cp++ = c; *cp = 0; -#endif /* RPATHS */ } else { /* not a Unix style maildrop */ adios(NULL, "No Unix style (mbox) maildrop."); @@ -696,9 +688,7 @@ m_Eom(int c, FILE *iob) register long pos = 0L; register int i; char text[10]; -#ifdef RPATHS register char *cp; -#endif /* RPATHS */ pos = ftell(iob); if ((i = fread(text, sizeof *text, edelimlen, iob)) != edelimlen @@ -716,23 +706,16 @@ m_Eom(int c, FILE *iob) } if (msg_style == MS_MBOX) { -#ifndef RPATHS - while ((c = getc(iob)) != '\n') - if (c < 0) - break; -#else /* RPATHS */ cp = unixbuf; while ((c = getc(iob)) != '\n' && c >= 0 && cp - unixbuf < BUFSIZ - 1) *cp++ = c; *cp = 0; -#endif /* RPATHS */ } return 1; } -#ifdef RPATHS /* ** Return the Return-Path and Delivery-Date ** header information. @@ -790,7 +773,6 @@ get_returnpath(char *rp, int rplen, char *dd, int ddlen) unixbuf[0] = 0; return 1; } -#endif /* RPATHS */ static unsigned char * diff --git a/uip/scansbr.c b/uip/scansbr.c index fdfe4cd..75dec1c 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -80,11 +80,8 @@ scan(FILE *inb, int innum, int outnum, char *fmtstr, int width, int curflg, FILE *scnout = NULL; char name[NAMESZ]; static int rlwidth, slwidth; - -#ifdef RPATHS char returnpath[BUFSIZ]; char deliverydate[BUFSIZ]; -#endif /* first-time only initialization */ if (!scanl) { @@ -152,7 +149,6 @@ scan(FILE *inb, int innum, int outnum, char *fmtstr, int width, int curflg, } if ((scnout = fopen(scnmsg, "w")) == NULL) adios(scnmsg, "unable to write"); -#ifdef RPATHS /* ** Add the Return-Path and Delivery-Date ** header fields to message. @@ -164,7 +160,6 @@ scan(FILE *inb, int innum, int outnum, char *fmtstr, int width, int curflg, FPUTS("Delivery-Date: "); FPUTS(deliverydate); } -#endif /* RPATHS */ } /* scan - main loop */ diff --git a/uip/slocal.c b/uip/slocal.c index 813a3b5..3713954 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -1318,16 +1318,13 @@ you_lose: if (first) { first = 0; if (strncmp(buffer, "From ", i)==0) { -#ifdef RPATHS char *fp, *cp, *hp, *ep; -#endif /* ** get copy of envelope information ** ("From " line) */ envelope = getcpy(buffer); -#ifdef RPATHS /* ** Now create a "Return-Path:" line ** from the "From " line. @@ -1359,7 +1356,6 @@ you_lose: if (ferror(ffp)) { goto fputs_error; } -#endif /* Put the delivery date in message */ fputs(ddate, ffp); if (ferror(ffp)) { -- 1.7.10.4