#define FMTERR (-3) /* Message Format error */
#define FLD 0 /* Field returned */
#define FLDPLUS 1 /* Field returned with more to come */
-#define FLDEOF 2 /* Field returned ending at eom */
#define BODY 3 /* Body returned with more to come */
-#define BODYEOF 4 /* Body returned ending at eom */
#define FILEEOF 5 /* Reached end of input file */
extern int msg_count; /* m_getfld() indicators (That's a hack!) */
}
switch (state) {
- case FLDEOF:
- case BODYEOF:
case FLD:
if (c == '\n' || c == '-') {
/* we hit the header/body separator */
ib)) {
case FLD:
case FLDPLUS:
- case FLDEOF:
np = (struct node *) mh_xmalloc(sizeof(*np));
*npp = np;
*(npp = &np->n_next) = NULL;
*ps->procnaddr = np->n_field;
break;
}
- if (state == FLDEOF)
- break;
continue;
case BODY:
- case BODYEOF:
adios(EX_CONFIG, NULL, "no blank lines are permitted in %s",
file);
fp)) {
case FLD:
case FLDPLUS:
- case FLDEOF:
if (state == FLDPLUS) {
cp = getcpy(field);
while (state == FLDPLUS) {
} else {
seq_init(mp, getcpy(name), trimcpy(field));
}
- if (state == FLDEOF)
- break;
continue;
case BODY:
- case BODYEOF:
adios(EX_CONFIG, NULL, "no blank lines are permitted in %s",
seqfile);
/* fall */
ifp)) {
case FLD:
case FLDPLUS:
- case FLDEOF:
if (!uprf(name, "resent")) {
advise(NULL, "Please re-edit draft to remove the ``%s'' header.", name);
goto leave_bad;
resent = add(buffer, resent);
fputs(buffer, ofp);
}
- if (state == FLDEOF) {
- goto process;
- }
break;
case BODY:
- case BODYEOF:
for (dp = buffer; *dp; dp++) {
if (!isspace(*dp)) {
advise(NULL, "Please re-edit draft to consist of headers only.");
switch (state) {
case FLD:
case FLDPLUS:
- case FLDEOF:
if (uprf(name, "resent")) {
fprintf(ofp, "Prev-");
}
sizeof buffer, ifp);
fputs(buffer, ofp);
}
- if (state == FLDEOF) {
- goto process;
- }
break;
case BODY:
- case BODYEOF:
fclose(ofp);
cp = m_mktemp2(NULL, "dist", &txtfd, NULL);
switch (state = m_getfld(state, name, buf, sizeof(buf), in)) {
case FLD:
case FLDPLUS:
- case FLDEOF:
compnum++;
/* abort if draft has Mime-Version header field */
while (state == FLDPLUS)
state = m_getfld(state, name, buf,
sizeof(buf), in);
- goto finish_field;
+ continue;
}
/* get copies of the buffers */
/* Now add the header data to the list */
add_header(ct, np, vp);
-finish_field:
- /* if this wasn't the last hdr field, then continue */
- if (state != FLDEOF)
- continue;
- /* else fall... */
+ continue;
case FILEEOF:
adios(EX_CONFIG, NULL, "draft has empty body -- no directives!");
/* NOTREACHED */
case BODY:
- case BODYEOF:
fseek(in, (long) (-strlen(buf)), SEEK_CUR);
break;
switch (state = m_getfld(state, name, buf, sizeof(buf), in)) {
case FLD:
case FLDPLUS:
- case FLDEOF:
compnum++;
/* get copies of the buffers */
/* Now add the header data to the list */
add_header(ct, np, vp);
- /* continue, if this isn't the last header field */
- if (state != FLDEOF) {
- ct->c_begin = ftell(in) + 1;
- continue;
- }
- /* else fall... */
+ ct->c_begin = ftell(in) + 1;
+ continue;
case BODY:
- case BODYEOF:
ct->c_begin = ftell(in) - strlen(buf);
break;
fp)) {
case FLD:
case FLDPLUS:
- case FLDEOF:
if (state == FLDPLUS) {
cp = getcpy(field);
while (state == FLDPLUS) {
}
}
- if (state == FLDEOF)
- break;
continue;
case BODY:
- case BODYEOF:
adios(EX_DATAERR, NULL, "no blank lines are permitted in %s",
seqfile);
/* fall */
for (state = FLD, bp = NULL;;) {
switch (state = m_getfld(state, name, buf, sizeof buf, fp)) {
case FLD:
- case FLDEOF:
case FLDPLUS:
if (bp != NULL) {
free(bp);
}
if (!mh_strcasecmp(name, n->n_datef))
break;
- if (state != FLDEOF)
- continue;
+ continue;
case BODY:
- case BODYEOF:
case FILEEOF:
case LENERR:
case FMTERR:
switch (state = m_getfld(state, name, field, sizeof(field),
in)) {
case FLD:
- case FLDEOF:
case FLDPLUS:
/*
** Check if the value of field contains
}
}
- if (state == FLDEOF) { /* moby hack */
- /* draft has no body separator; only headers */
- fprintf(out, "--------\n");
- if (!qbody)
- break;
- printf("--------\n");
- goto has_no_body;
- }
continue;
case BODY:
- case BODYEOF:
case FILEEOF:
fprintf(out, "--------\n");
if (qbody) {
switch (state = m_getfld(state, name, field, sizeof(field),
in)) {
case FLD:
- case FLDEOF:
case FLDPLUS:
lp = getcpy(field);
while (state == FLDPLUS) {
p++, i++;
p->p_name = NULL;
}
- if (state != FLDEOF) {
- continue;
- }
- break;
+ continue;
case BODY:
- case BODYEOF:
case FILEEOF:
break;
for (compnum = 1, state = FLD;;) {
switch (state = m_getfld(state, nam, buf, sizeof(buf), in)) {
case FLD:
- case FLDEOF:
case FLDPLUS:
compnum++;
if (!mh_strcasecmp(nam, datesw)) {
continue;
case BODY:
- case BODYEOF:
case FILEEOF:
break;