FILE *fp;
CT ct;
size_t n;
+ struct stat statbuf;
bogus_mp_content = 0;
return NULL;
}
fseek (fp, 0L, SEEK_SET);
+ } else if (lstat (file, &statbuf) == NOTOK) {
+ advise (file, "unable to lstat");
+ return NULL;
+ } else if (S_ISDIR(statbuf.st_mode)) {
+ /* Don't try to parse a directory. */
+ advise (NULL, "%s is a directory", file);
+ return NULL;
} else if ((fp = fopen (file, "r")) == NULL) {
advise (file, "unable to read");
return NULL;
TYPE_FIELD, ct->c_file);
return NOTOK;
}
- ToLower(ci->ci_type);
+ to_lower(ci->ci_type);
while (isspace ((unsigned char) *cp))
cp++;
TYPE_FIELD, ct->c_file, ci->ci_type);
return NOTOK;
}
- ToLower(ci->ci_subtype);
+ to_lower(ci->ci_subtype);
magic_skip:
while (isspace ((unsigned char) *cp))
case '(':
i++;
- /* and fall... */
+ /* FALLTHRU */
default:
*bp++ = c;
continue;
case CT_MESSAGE:
if (p->c_subtype != MESSAGE_RFC822)
break;
- /* else fall... */
+ /* FALLTHRU */
default:
e->eb_partno = ct->c_partno;
if (p->c_ctinitfnx)
case '\\':
if (*++cp == '\0')
goto bad_quote;
- /* FALL THROUGH */
+ /* FALLTHRU */
default:
len++;
continue;
case '\\':
len++;
maxfit--;
- /* FALL THROUGH */
+ /* FALLTHRU */
default:
len++;
maxfit--;
case '"':
*output++ = '\\';
outlen++;
+ /* FALLTHRU */
default:
*output++ = *p++;
outlen++;