- case BODY:
- case FILEEOF:
- row = column = 0;
- for (c1 = fmthd; c1; c1 = c1->c_next) {
- if (c1->c_flags & CLEARTEXT) {
- putcomp(c1, c1, ONECOMP);
- continue;
- }
- if (!mh_strcasecmp(c1->c_name, "messagename")) {
- holder.c_text = concat("(Message ", mname, ")\n",
- NULL);
- putcomp(c1, &holder, ONECOMP);
- free(holder.c_text);
- holder.c_text = NULL;
- continue;
- }
- if (!mh_strcasecmp(c1->c_name, "extras")) {
- for (c2 = msghd; c2; c2 = c2->c_next)
- if (c2->c_flags & EXTRA)
- putcomp(c1, c2, TWOCOMP);
- continue;
- }
- if (dobody && !mh_strcasecmp(c1->c_name, "body")) {
- holder.c_text = mh_xmalloc(sizeof(buf));
- strncpy(holder.c_text, buf, sizeof(buf));
- while (state == BODY) {
- putcomp(c1, &holder, BODYCOMP);
- state = m_getfld(state, name, holder.c_text, sizeof(buf), fp);
- }
- free(holder.c_text);
- holder.c_text = NULL;
- continue;
+ for (c2 = fmthd; c2; c2 = c2->c_next)
+ if (!mh_strcasecmp(c2->c_name, name))
+ break;
+ c1 = NULL;
+ if (!((c3 = c2 ? c2 : &global)->c_flags & SPLIT))
+ for (c1 = msghd; c1; c1 = c1->c_next)
+ if (!mh_strcasecmp(c1->c_name,
+ c3->c_name)) {
+ c1->c_text = mcomp_add(c1->c_flags, buf, c1->c_text);
+ break;