The existing LEN() uses sizeof.
attach_head = attach_tail = entry;
}
} else if (strncasecmp(MHBUILD_FILE_PSEUDOHEADER, np,
attach_head = attach_tail = entry;
}
} else if (strncasecmp(MHBUILD_FILE_PSEUDOHEADER, np,
- strlen (MHBUILD_FILE_PSEUDOHEADER)) == 0) {
+ LEN(MHBUILD_FILE_PSEUDOHEADER)) == 0) {
/* E.g.,
* Nmh-mhbuild-file-text/calendar: /home/user/Mail/inbox/9
*/
/* E.g.,
* Nmh-mhbuild-file-text/calendar: /home/user/Mail/inbox/9
*/
- char *type = np + strlen (MHBUILD_FILE_PSEUDOHEADER);
+ char *type = np + LEN(MHBUILD_FILE_PSEUDOHEADER);
char *filename = vp;
/* vp should begin with a space because m_getfld2()
char *filename = vp;
/* vp should begin with a space because m_getfld2()
free (vp);
free (np);
} else if (strncasecmp(MHBUILD_ARGS_PSEUDOHEADER, np,
free (vp);
free (np);
} else if (strncasecmp(MHBUILD_ARGS_PSEUDOHEADER, np,
- strlen (MHBUILD_ARGS_PSEUDOHEADER)) == 0) {
+ LEN(MHBUILD_ARGS_PSEUDOHEADER)) == 0) {
/* E.g.,
* Nmh-mhbuild-args-text/calendar: -reply accept
*/
/* E.g.,
* Nmh-mhbuild-args-text/calendar: -reply accept
*/
- char *type = np + strlen (MHBUILD_ARGS_PSEUDOHEADER);
+ char *type = np + LEN(MHBUILD_ARGS_PSEUDOHEADER);
char *argstring = vp;
/* vp should begin with a space because m_getfld2()
char *argstring = vp;
/* vp should begin with a space because m_getfld2()
int i;
if (headers >= 0 && do_direct() && uprf (buffer, DESCR_FIELD)
int i;
if (headers >= 0 && do_direct() && uprf (buffer, DESCR_FIELD)
- && buffer[i = strlen (DESCR_FIELD)] == ':') {
+ && buffer[i = LEN(DESCR_FIELD)] == ':') {
headers = 1;
again_descr:
headers = 1;
again_descr:
}
if (headers >= 0 && do_direct() && uprf (buffer, DISPO_FIELD)
}
if (headers >= 0 && do_direct() && uprf (buffer, DISPO_FIELD)
- && buffer[i = strlen (DISPO_FIELD)] == ':') {
+ && buffer[i = LEN(DISPO_FIELD)] == ':') {
headers = 1;
again_dispo:
headers = 1;
again_dispo:
vp = concat (" ", ci->ci_type, "/", ci->ci_subtype, NULL);
/* keep track of length of line */
vp = concat (" ", ci->ci_type, "/", ci->ci_subtype, NULL);
/* keep track of length of line */
- len = strlen (TYPE_FIELD) + strlen (ci->ci_type)
+ len = LEN(TYPE_FIELD) + strlen (ci->ci_type)
+ strlen (ci->ci_subtype) + 3;
extbody = ct->c_type == CT_MESSAGE && ct->c_subtype == MESSAGE_EXTERNAL;
+ strlen (ci->ci_subtype) + 3;
extbody = ct->c_type == CT_MESSAGE && ct->c_subtype == MESSAGE_EXTERNAL;
add_header (ct, np, vp);
} else if (ct->c_dispo_type) {
vp = concat (" ", ct->c_dispo_type, NULL);
add_header (ct, np, vp);
} else if (ct->c_dispo_type) {
vp = concat (" ", ct->c_dispo_type, NULL);
- len = strlen(DISPO_FIELD) + strlen(vp) + 1;
+ len = LEN(DISPO_FIELD) + strlen(vp) + 1;
np = output_params(len, ct->c_dispo_first, NULL, 0);
vp = add(np, vp);
vp = add("\n", vp);
np = output_params(len, ct->c_dispo_first, NULL, 0);
vp = add(np, vp);
vp = add("\n", vp);
buffer[statbuf.st_size] = '\0';
/* Look for a header in the convert reply. */
buffer[statbuf.st_size] = '\0';
/* Look for a header in the convert reply. */
- if (strncasecmp (buffer, TYPE_FIELD, strlen (TYPE_FIELD)) == 0 &&
- buffer[strlen (TYPE_FIELD)] == ':') {
+ if (strncasecmp (buffer, TYPE_FIELD, LEN(TYPE_FIELD)) == 0 &&
+ buffer[LEN(TYPE_FIELD)] == ':') {
if ((end_of_header = strstr (buffer, "\r\n\r\n"))) {
end_of_header += 2;
found_header = 1;
if ((end_of_header = strstr (buffer, "\r\n\r\n"))) {
end_of_header += 2;
found_header = 1;
new_ctline = concat(" ", ct->c_ctinfo.ci_type, "/",
ct->c_ctinfo.ci_subtype, NULL);
new_ctline = concat(" ", ct->c_ctinfo.ci_type, "/",
ct->c_ctinfo.ci_subtype, NULL);
- new_params = output_params(strlen(TYPE_FIELD) +
+ new_params = output_params(LEN(TYPE_FIELD) +
strlen(new_ctline) + 1,
ct->c_ctinfo.ci_first_pm, NULL, 0);
fprintf (fpout, "%s:%s%s\n", np, new_ctline,
strlen(new_ctline) + 1,
ct->c_ctinfo.ci_first_pm, NULL, 0);
fprintf (fpout, "%s:%s%s\n", np, new_ctline,
}
if (! strncasecmp (name, ENCODING_FIELD,
}
if (! strncasecmp (name, ENCODING_FIELD,
- strlen (ENCODING_FIELD))) {
+ LEN(ENCODING_FIELD))) {
char *prefix = "Nmh-REPLACED-INVALID-";
HF h;
char *prefix = "Nmh-REPLACED-INVALID-";
HF h;
while (hp) {
HF next = hp->next;
while (hp) {
HF next = hp->next;
- if (strncasecmp (XXX_FIELD_PRF, hp->name, strlen (XXX_FIELD_PRF))) {
+ if (strncasecmp (XXX_FIELD_PRF, hp->name, LEN(XXX_FIELD_PRF))) {
if (hp == old->c_last_hf) {
if (hp == old->c_first_hf) {
old->c_last_hf = old->c_first_hf = NULL;
if (hp == old->c_last_hf) {
if (hp == old->c_first_hf) {
old->c_last_hf = old->c_first_hf = NULL;
len = 0;
fprintf (ce->ce_fp, "%s: %s/%s", TYPE_FIELD, ci->ci_type, ci->ci_subtype);
len = 0;
fprintf (ce->ce_fp, "%s: %s/%s", TYPE_FIELD, ci->ci_type, ci->ci_subtype);
- len += strlen (TYPE_FIELD) + 2 + strlen (ci->ci_type)
+ len += LEN(TYPE_FIELD) + 2 + strlen (ci->ci_type)
+ 1 + strlen (ci->ci_subtype);
buffer = output_params(len, ci->ci_first_pm, &len, 0);
+ 1 + strlen (ci->ci_subtype);
buffer = output_params(len, ci->ci_first_pm, &len, 0);
replace_param(&ct->c_ctinfo.ci_first_pm,
&ct->c_ctinfo.ci_last_pm, "charset",
dest_charset, 0);
replace_param(&ct->c_ctinfo.ci_first_pm,
&ct->c_ctinfo.ci_last_pm, "charset",
dest_charset, 0);
- outline = output_params(strlen(TYPE_FIELD) + 1 + strlen(ctline),
+ outline = output_params(LEN(TYPE_FIELD) + 1 + strlen(ctline),
ct->c_ctinfo.ci_first_pm, NULL, 0);
if (outline) {
ctline = add(outline, ctline);
ct->c_ctinfo.ci_first_pm, NULL, 0);
if (outline) {
ctline = add(outline, ctline);