char *scanl = NULL; /* text of most recent scanline */
#define FPUTS(buf) {\
- if (fputs(buf,scnout) == EOF)\
+ if (fputs(buf, scnout) == EOF)\
adios(scnmsg, "write error on");\
}
char returnpath[BUFSIZ];
char deliverydate[BUFSIZ];
int incing = (outnum > 0);
- int ismbox = (outnum != 0);
+ int scanfolder = (outnum == 0);
/* first-time only initialization */
if (!scanl) {
compnum++;
if (incing) {
FPUTS(name);
- if (putc(':', scnout) == EOF)
- adios(scnmsg, "write error on");
+ FPUTS(":");
FPUTS(tmpbuf);
}
/*
state = FILEEOF; /* stop here if scan cmd */
goto finished;
}
- if (putc('\n', scnout) == EOF)
- adios(scnmsg, "write error on");
+ FPUTS("\n");
FPUTS(tmpbuf);
/*
** performance hack: some people like to run "inc"
if (incing) {
FPUTS("\n\nBAD MSG:\n");
FPUTS(name);
- if (putc('\n', scnout) == EOF)
- adios(scnmsg, "write error on");
- }
- if (ismbox) {
+ FPUTS("\n");
state = BODY;
goto body;
}
- /* fall through */
+ /* fall through if we scan only */
case FILEEOF:
goto finished;
adios(scnmsg, "write error on");
}
- if ((datecomp && !datecomp->c_text) || !ismbox) {
+ if ((datecomp && !datecomp->c_text) || scanfolder) {
struct stat st;
fstat(fileno(inb), &st);
- if (!ismbox)
+ if (scanfolder)
dat[2] = st.st_size;
if (datecomp) {
- if (! datecomp->c_text) {
+ if (!datecomp->c_text) {
if (datecomp->c_tws == NULL)
datecomp->c_tws = (struct tws *) calloc((size_t) 1, sizeof(*datecomp->c_tws));
if (datecomp->c_tws == NULL)