bool suppress_multiple_mime_version_warning = true;
/* list of preferred type/subtype pairs, for -prefer */
bool suppress_multiple_mime_version_warning = true;
/* list of preferred type/subtype pairs, for -prefer */
ct->c_id = NULL;
if (!(dp = strchr(ct->c_id = ++cp, '>'))) {
inform("invalid ID in message %s", ct->c_file);
ct->c_id = NULL;
if (!(dp = strchr(ct->c_id = ++cp, '>'))) {
inform("invalid ID in message %s", ct->c_file);
inform("\"%s/%s\" type in message %s must be encoded in\n"
"7bit, 8bit, or binary, per RFC 2045 (6.4). "
inform("\"%s/%s\" type in message %s must be encoded in\n"
"7bit, 8bit, or binary, per RFC 2045 (6.4). "
{
struct multipart *m = (struct multipart *) ct->c_ctparams;
struct part *part, *prev, *head, *nhead, *ntail;
{
struct multipart *m = (struct multipart *) ct->c_ctparams;
struct part *part, *prev, *head, *nhead, *ntail;
- if (!strcasecmp(ci->ci_type, type) &&
- (!subtype || !strcasecmp(ci->ci_subtype, subtype))) {
+ if (!strcasecmp(ci->ci_type, pref->type) &&
+ (!pref->subtype ||
+ !strcasecmp(ci->ci_subtype, pref->subtype))) {
- for (i = npreferred-1; i >= 0; i--)
- move_preferred_part(ct, preferred_types[i], preferred_subtypes[i]);
+ for (i = 0; i < npreferred; i++)
+ move_preferred_part(ct, mime_preference + i);
example, a text/plain part before a text/html part in a
multipart/alternative part, for example, where it belongs. */
void
example, a text/plain part before a text/html part in a
multipart/alternative part, for example, where it belongs. */
void
if (fstat (fd, &st) != NOTOK)
size = (long) st.st_size;
if (fstat (fd, &st) != NOTOK)
size = (long) st.st_size;
char *cp, *buffer = NULL;
/* sbeck -- handle suffixes */
CI ci;
char *cp, *buffer = NULL;
/* sbeck -- handle suffixes */
CI ci;
if (ce->ce_unlink) {
/* Create temporary file with filename extension. */
if ((ce->ce_file = m_mktemps(invo_name, cp, NULL, NULL)) == NULL) {
if (ce->ce_unlink) {
/* Create temporary file with filename extension. */
if ((ce->ce_file = m_mktemps(invo_name, cp, NULL, NULL)) == NULL) {
} else if (*file == NULL) {
char *tempfile;
if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
} else if (*file == NULL) {
char *tempfile;
if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
- int cc, digested, len, quoted, own_ct_fp = 0;
+ int cc, digested, len, quoted;
+ bool own_ct_fp = false;
if (ce->ce_unlink) {
/* Create temporary file with filename extension. */
if ((ce->ce_file = m_mktemps(invo_name, cp, NULL, NULL)) == NULL) {
if (ce->ce_unlink) {
/* Create temporary file with filename extension. */
if ((ce->ce_file = m_mktemps(invo_name, cp, NULL, NULL)) == NULL) {
} else if (*file == NULL) {
char *tempfile;
if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
} else if (*file == NULL) {
char *tempfile;
if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
if (! ct->c_fp) {
if ((ct->c_fp = fopen (ct->c_file, "r")) == NULL) {
content_error (ct->c_file, ct, "unable to open for reading");
return NOTOK;
}
if (! ct->c_fp) {
if ((ct->c_fp = fopen (ct->c_file, "r")) == NULL) {
content_error (ct->c_file, ct, "unable to open for reading");
return NOTOK;
}
unsigned char digest[16];
MD5Final (digest, &mdContext);
unsigned char digest[16];
MD5Final (digest, &mdContext);
if (ce->ce_unlink) {
/* Create temporary file with filename extension. */
if ((ce->ce_file = m_mktemps(invo_name, cp, NULL, NULL)) == NULL) {
if (ce->ce_unlink) {
/* Create temporary file with filename extension. */
if ((ce->ce_file = m_mktemps(invo_name, cp, NULL, NULL)) == NULL) {
} else if (*file == NULL) {
char *tempfile;
if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
} else if (*file == NULL) {
char *tempfile;
if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
if (! ct->c_fp) {
if ((ct->c_fp = fopen (ct->c_file, "r")) == NULL) {
content_error (ct->c_file, ct, "unable to open for reading");
return NOTOK;
}
if (! ct->c_fp) {
if ((ct->c_fp = fopen (ct->c_file, "r")) == NULL) {
content_error (ct->c_file, ct, "unable to open for reading");
return NOTOK;
}
int len, buflen;
char *bp, *ftp, *user, *pass;
char buffer[BUFSIZ], cachefile[BUFSIZ];
int len, buflen;
char *bp, *ftp, *user, *pass;
char buffer[BUFSIZ], cachefile[BUFSIZ];
cachefile[0] = '\0';
if ((!e->eb_permission || strcasecmp (e->eb_permission, "read-write"))
&& find_cache (NULL, wcachesw, &cachetype, e->eb_content->c_id,
cachefile, sizeof(cachefile)) != NOTOK) {
if (*file == NULL) {
ce->ce_unlink = 0;
cachefile[0] = '\0';
if ((!e->eb_permission || strcasecmp (e->eb_permission, "read-write"))
&& find_cache (NULL, wcachesw, &cachetype, e->eb_content->c_id,
cachefile, sizeof(cachefile)) != NOTOK) {
if (*file == NULL) {
ce->ce_unlink = 0;
else {
char *tempfile;
if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
else {
char *tempfile;
if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
int len, buflen;
char *bp, buffer[BUFSIZ], *vec[7];
struct exbody *e = ct->c_ctexbody;
int len, buflen;
char *bp, buffer[BUFSIZ], *vec[7];
struct exbody *e = ct->c_ctexbody;
if (*file == NULL) {
char *tempfile;
if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
if (*file == NULL) {
char *tempfile;
if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
ct->c_showproc = mh_xstrdup("true");
fseek (ce->ce_fp, 0L, SEEK_SET);
ct->c_showproc = mh_xstrdup("true");
fseek (ce->ce_fp, 0L, SEEK_SET);
cachefile[0] = '\0';
if (find_cache(NULL, wcachesw, &cachetype, e->eb_content->c_id,
cachefile, sizeof(cachefile)) != NOTOK) {
if (*file == NULL) {
ce->ce_unlink = 0;
cachefile[0] = '\0';
if (find_cache(NULL, wcachesw, &cachetype, e->eb_content->c_id,
cachefile, sizeof(cachefile)) != NOTOK) {
if (*file == NULL) {
ce->ce_unlink = 0;
else {
char *tempfile;
if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
else {
char *tempfile;
if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
execvp(program, args.msgs);
fprintf(stderr, "Unable to exec ");
perror(program);
execvp(program, args.msgs);
fprintf(stderr, "Unable to exec ");
perror(program);
while (*cp == ';') {
char *dp, *vp, *up, *nameptr, *valptr, *charset = NULL, *lang = NULL;
while (*cp == ';') {
char *dp, *vp, *up, *nameptr, *valptr, *charset = NULL, *lang = NULL;
inform("missing language tag in message %s's %s: field\n"
" (parameter %s)", filename, fieldname, nameptr);
free(nameptr);
inform("missing language tag in message %s's %s: field\n"
" (parameter %s)", filename, fieldname, nameptr);
free(nameptr);
inform("invalid encoded sequence in message %s's %s: field\n"
" (parameter %s)", filename, fieldname, nameptr);
free(nameptr);
inform("invalid encoded sequence in message %s's %s: field\n"
" (parameter %s)", filename, fieldname, nameptr);
free(nameptr);
inform("invalid quoted-string in message %s's %s: field\n"
" (parameter %s)", filename, fieldname, nameptr);
free(nameptr);
inform("invalid quoted-string in message %s's %s: field\n"
" (parameter %s)", filename, fieldname, nameptr);
free(nameptr);
char *ret_charset = NULL;
ret_charset = get_param(ct->c_ctinfo.ci_first_pm, "charset", '?', 0);
char *ret_charset = NULL;
ret_charset = get_param(ct->c_ctinfo.ci_first_pm, "charset", '?', 0);
if (strlen(params->pm_name) > CPERLIN) {
inform("Parameter name \"%s\" is too long", params->pm_name);
if (strlen(params->pm_name) > CPERLIN) {
inform("Parameter name \"%s\" is too long", params->pm_name);
if (! pm->pm_charset) {
pm->pm_charset = mh_xstrdup(write_charset_8bit());
if (strcasecmp(pm->pm_charset, "US-ASCII") == 0)
if (! pm->pm_charset) {
pm->pm_charset = mh_xstrdup(write_charset_8bit());
if (strcasecmp(pm->pm_charset, "US-ASCII") == 0)