Simplify, CONT_LINE is always defined, remove all #ifdefs
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
parent
f67ed6934a
commit
98f498595c
@ -530,8 +530,6 @@ static char sccsid[] __attribute__((unused)) =
|
|||||||
#define TIMERINTVL 30 /* interval for checking flush, mark */
|
#define TIMERINTVL 30 /* interval for checking flush, mark */
|
||||||
#define RCVBUF_MINSIZE (80 * 1024) /* minimum size of dgram rcv buffer */
|
#define RCVBUF_MINSIZE (80 * 1024) /* minimum size of dgram rcv buffer */
|
||||||
|
|
||||||
#define CONT_LINE 1 /* Allow continuation lines */
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
@ -2548,12 +2546,8 @@ void init(void)
|
|||||||
struct filed *f;
|
struct filed *f;
|
||||||
unsigned int Forwarding = 0;
|
unsigned int Forwarding = 0;
|
||||||
FILE *cf;
|
FILE *cf;
|
||||||
#ifdef CONT_LINE
|
|
||||||
char cbuf[BUFSIZ];
|
char cbuf[BUFSIZ];
|
||||||
char *cline;
|
char *cline;
|
||||||
#else
|
|
||||||
char cline[BUFSIZ];
|
|
||||||
#endif
|
|
||||||
char *p;
|
char *p;
|
||||||
int i, lognum;
|
int i, lognum;
|
||||||
|
|
||||||
@ -2661,12 +2655,8 @@ void init(void)
|
|||||||
/*
|
/*
|
||||||
* Foreach line in the conf table, open that file.
|
* Foreach line in the conf table, open that file.
|
||||||
*/
|
*/
|
||||||
#if CONT_LINE
|
|
||||||
cline = cbuf;
|
cline = cbuf;
|
||||||
while (fgets(cline, sizeof(cbuf) - (cline - cbuf), cf) != NULL) {
|
while (fgets(cline, sizeof(cbuf) - (cline - cbuf), cf) != NULL) {
|
||||||
#else
|
|
||||||
while (fgets(cline, sizeof(cline), cf) != NULL) {
|
|
||||||
#endif
|
|
||||||
/*
|
/*
|
||||||
* check for end-of-section, comments, strip off trailing
|
* check for end-of-section, comments, strip off trailing
|
||||||
* spaces and newline character.
|
* spaces and newline character.
|
||||||
@ -2675,12 +2665,11 @@ void init(void)
|
|||||||
;
|
;
|
||||||
if (*p == '\0' || *p == '#')
|
if (*p == '\0' || *p == '#')
|
||||||
continue;
|
continue;
|
||||||
#if CONT_LINE
|
|
||||||
memmove(cline, p, strlen(p) + 1);
|
memmove(cline, p, strlen(p) + 1);
|
||||||
#endif
|
|
||||||
for (p = strchr(cline, '\0'); isspace(*--p);)
|
for (p = strchr(cline, '\0'); isspace(*--p);)
|
||||||
;
|
;
|
||||||
#if CONT_LINE
|
|
||||||
if (*p == '\\') {
|
if (*p == '\\') {
|
||||||
if ((p - cbuf) > BUFSIZ - 30) {
|
if ((p - cbuf) > BUFSIZ - 30) {
|
||||||
/* Oops the buffer is full - what now? */
|
/* Oops the buffer is full - what now? */
|
||||||
@ -2692,7 +2681,7 @@ void init(void)
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
cline = cbuf;
|
cline = cbuf;
|
||||||
#endif
|
|
||||||
*++p = '\0';
|
*++p = '\0';
|
||||||
#ifndef SYSV
|
#ifndef SYSV
|
||||||
f = (struct filed *)calloc(1, sizeof(*f));
|
f = (struct filed *)calloc(1, sizeof(*f));
|
||||||
@ -2701,11 +2690,8 @@ void init(void)
|
|||||||
#endif
|
#endif
|
||||||
allocate_log();
|
allocate_log();
|
||||||
f = &Files[lognum++];
|
f = &Files[lognum++];
|
||||||
#if CONT_LINE
|
|
||||||
cfline(cbuf, f);
|
cfline(cbuf, f);
|
||||||
#else
|
|
||||||
cfline(cline, f);
|
|
||||||
#endif
|
|
||||||
if (f->f_type == F_FORW || f->f_type == F_FORW_SUSP || f->f_type == F_FORW_UNKN) {
|
if (f->f_type == F_FORW || f->f_type == F_FORW_SUSP || f->f_type == F_FORW_UNKN) {
|
||||||
Forwarding++;
|
Forwarding++;
|
||||||
}
|
}
|
||||||
@ -2798,7 +2784,6 @@ void init(void)
|
|||||||
}
|
}
|
||||||
#if FALSE
|
#if FALSE
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} /* balance parentheses for emacs */
|
} /* balance parentheses for emacs */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user