X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/17932f7aea1c21cf17738f47996345d9d0a6ce51..ff3060cefb460cce2174058eefff38b6e11ee2f1:/uip/mhparse.c?ds=inline diff --git a/uip/mhparse.c b/uip/mhparse.c index 08eaa9ab..5e35cbbf 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -11,8 +11,6 @@ #include #include #include -#include -#include #include #include #include @@ -346,7 +344,7 @@ get_content (FILE *in, char *file, int toplevel) hp = ct->c_first_hf; /* start at first header field */ while (hp) { /* Get MIME-Version field */ - if (!mh_strcasecmp (hp->name, VRSN_FIELD)) { + if (!strcasecmp (hp->name, VRSN_FIELD)) { int ucmp; char c, *cp, *dp; @@ -379,14 +377,14 @@ get_content (FILE *in, char *file, int toplevel) continue; c = *dp; *dp = '\0'; - ucmp = !mh_strcasecmp (cp, VRSN_VALUE); + ucmp = !strcasecmp (cp, VRSN_VALUE); *dp = c; if (!ucmp) { admonish (NULL, "message %s has unknown value for %s: field (%s)", ct->c_file, VRSN_FIELD, cp); } } - else if (!mh_strcasecmp (hp->name, TYPE_FIELD)) { + else if (!strcasecmp (hp->name, TYPE_FIELD)) { /* Get Content-Type field */ struct str2init *s2i; CI ci = &ct->c_ctinfo; @@ -407,14 +405,14 @@ get_content (FILE *in, char *file, int toplevel) * flag for this content type. */ for (s2i = str2cts; s2i->si_key; s2i++) - if (!mh_strcasecmp (ci->ci_type, s2i->si_key)) + if (!strcasecmp (ci->ci_type, s2i->si_key)) break; if (!s2i->si_key && !uprf (ci->ci_type, "X-")) s2i++; ct->c_type = s2i->si_val; ct->c_ctinitfnx = s2i->si_init; } - else if (!mh_strcasecmp (hp->name, ENCODING_FIELD)) { + else if (!strcasecmp (hp->name, ENCODING_FIELD)) { /* Get Content-Transfer-Encoding field */ char c, *cp, *dp; struct str2init *s2i; @@ -444,7 +442,7 @@ get_content (FILE *in, char *file, int toplevel) * for this transfer encoding. */ for (s2i = str2ces; s2i->si_key; s2i++) - if (!mh_strcasecmp (cp, s2i->si_key)) + if (!strcasecmp (cp, s2i->si_key)) break; if (!s2i->si_key && !uprf (cp, "X-")) s2i++; @@ -455,7 +453,7 @@ get_content (FILE *in, char *file, int toplevel) if (s2i->si_init && (*s2i->si_init) (ct) == NOTOK) goto out; } - else if (!mh_strcasecmp (hp->name, MD5_FIELD)) { + else if (!strcasecmp (hp->name, MD5_FIELD)) { /* Get Content-MD5 field */ char *cp, *dp, *ep; @@ -495,15 +493,15 @@ get_content (FILE *in, char *file, int toplevel) free (ep); ct->c_digested++; } - else if (!mh_strcasecmp (hp->name, ID_FIELD)) { + else if (!strcasecmp (hp->name, ID_FIELD)) { /* Get Content-ID field */ ct->c_id = add (hp->value, ct->c_id); } - else if (!mh_strcasecmp (hp->name, DESCR_FIELD)) { + else if (!strcasecmp (hp->name, DESCR_FIELD)) { /* Get Content-Description field */ ct->c_descr = add (hp->value, ct->c_descr); } - else if (!mh_strcasecmp (hp->name, DISPO_FIELD)) { + else if (!strcasecmp (hp->name, DISPO_FIELD)) { /* Get Content-Disposition field */ ct->c_dispo = add (hp->value, ct->c_dispo); } @@ -972,7 +970,7 @@ InitText (CT ct) /* match subtype */ for (kv = SubText; kv->kv_key; kv++) - if (!mh_strcasecmp (ci->ci_subtype, kv->kv_key)) + if (!strcasecmp (ci->ci_subtype, kv->kv_key)) break; ct->c_subtype = kv->kv_value; @@ -983,7 +981,7 @@ InitText (CT ct) /* scan for charset parameter */ for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++) - if (!mh_strcasecmp (*ap, "charset")) + if (!strcasecmp (*ap, "charset")) break; /* check if content specified a character set */ @@ -1056,7 +1054,7 @@ InitMultiPart (CT ct) /* match subtype */ for (kv = SubMultiPart; kv->kv_key; kv++) - if (!mh_strcasecmp (ci->ci_subtype, kv->kv_key)) + if (!strcasecmp (ci->ci_subtype, kv->kv_key)) break; ct->c_subtype = kv->kv_value; @@ -1066,7 +1064,7 @@ InitMultiPart (CT ct) */ bp = 0; for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++) { - if (!mh_strcasecmp (*ap, "boundary")) { + if (!strcasecmp (*ap, "boundary")) { bp = *ep; break; } @@ -1268,7 +1266,7 @@ InitMessage (CT ct) /* match subtype */ for (kv = SubMessage; kv->kv_key; kv++) - if (!mh_strcasecmp (ci->ci_subtype, kv->kv_key)) + if (!strcasecmp (ci->ci_subtype, kv->kv_key)) break; ct->c_subtype = kv->kv_value; @@ -1287,11 +1285,11 @@ InitMessage (CT ct) /* scan for parameters "id", "number", and "total" */ for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++) { - if (!mh_strcasecmp (*ap, "id")) { + if (!strcasecmp (*ap, "id")) { p->pm_partid = add (*ep, NULL); continue; } - if (!mh_strcasecmp (*ap, "number")) { + if (!strcasecmp (*ap, "number")) { if (sscanf (*ep, "%d", &p->pm_partno) != 1 || p->pm_partno < 1) { invalid_param: @@ -1303,7 +1301,7 @@ invalid_param: } continue; } - if (!mh_strcasecmp (*ap, "total")) { + if (!strcasecmp (*ap, "total")) { if (sscanf (*ep, "%d", &p->pm_maxno) != 1 || p->pm_maxno < 1) goto invalid_param; @@ -1425,12 +1423,12 @@ params_external (CT ct, int composing) ct->c_ceopenfnx = NULL; for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++) { - if (!mh_strcasecmp (*ap, "access-type")) { + if (!strcasecmp (*ap, "access-type")) { struct str2init *s2i; CT p = e->eb_content; for (s2i = str2methods; s2i->si_key; s2i++) - if (!mh_strcasecmp (*ep, s2i->si_key)) + if (!strcasecmp (*ep, s2i->si_key)) break; if (!s2i->si_key) { e->eb_access = *ep; @@ -1447,39 +1445,39 @@ params_external (CT ct, int composing) return NOTOK; continue; } - if (!mh_strcasecmp (*ap, "name")) { + if (!strcasecmp (*ap, "name")) { e->eb_name = *ep; continue; } - if (!mh_strcasecmp (*ap, "permission")) { + if (!strcasecmp (*ap, "permission")) { e->eb_permission = *ep; continue; } - if (!mh_strcasecmp (*ap, "site")) { + if (!strcasecmp (*ap, "site")) { e->eb_site = *ep; continue; } - if (!mh_strcasecmp (*ap, "directory")) { + if (!strcasecmp (*ap, "directory")) { e->eb_dir = *ep; continue; } - if (!mh_strcasecmp (*ap, "mode")) { + if (!strcasecmp (*ap, "mode")) { e->eb_mode = *ep; continue; } - if (!mh_strcasecmp (*ap, "size")) { + if (!strcasecmp (*ap, "size")) { sscanf (*ep, "%lu", &e->eb_size); continue; } - if (!mh_strcasecmp (*ap, "server")) { + if (!strcasecmp (*ap, "server")) { e->eb_server = *ep; continue; } - if (!mh_strcasecmp (*ap, "subject")) { + if (!strcasecmp (*ap, "subject")) { e->eb_subject = *ep; continue; } - if (!mh_strcasecmp (*ap, "url")) { + if (!strcasecmp (*ap, "url")) { /* * According to RFC 2017, we have to remove all whitespace from * the URL @@ -1496,7 +1494,7 @@ params_external (CT ct, int composing) *u = '\0'; continue; } - if (composing && !mh_strcasecmp (*ap, "body")) { + if (composing && !strcasecmp (*ap, "body")) { e->eb_body = getcpy (*ep); continue; } @@ -1525,7 +1523,7 @@ InitApplication (CT ct) /* match subtype */ for (kv = SubApplication; kv->kv_key; kv++) - if (!mh_strcasecmp (ci->ci_subtype, kv->kv_key)) + if (!strcasecmp (ci->ci_subtype, kv->kv_key)) break; ct->c_subtype = kv->kv_value; @@ -2342,7 +2340,7 @@ openFile (CT ct, char **file) return NOTOK; } - if ((!e->eb_permission || mh_strcasecmp (e->eb_permission, "read-write")) + if ((!e->eb_permission || strcasecmp (e->eb_permission, "read-write")) && find_cache (NULL, wcachesw, &cachetype, e->eb_content->c_id, cachefile, sizeof(cachefile)) != NOTOK) { int mask; @@ -2488,7 +2486,7 @@ openFTP (CT ct, char **file) ce->ce_unlink = (*file == NULL); caching = 0; cachefile[0] = '\0'; - if ((!e->eb_permission || mh_strcasecmp (e->eb_permission, "read-write")) + 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) { @@ -2521,7 +2519,7 @@ openFTP (CT ct, char **file) vec[vecp++] = e->eb_dir; vec[vecp++] = e->eb_name; vec[vecp++] = ce->ce_file, - vec[vecp++] = e->eb_mode && !mh_strcasecmp (e->eb_mode, "ascii") + vec[vecp++] = e->eb_mode && !strcasecmp (e->eb_mode, "ascii") ? "ascii" : "binary"; vec[vecp] = NULL; @@ -3129,7 +3127,7 @@ ce_str (int encoding) { case CE_BASE64: return "base64"; case CE_QUOTED: - return "quoted"; + return "quoted-printable"; case CE_8BIT: return "8bit"; case CE_7BIT: