- snprintf(buffer, sizeof(buffer), "#forw [forwarded message%s] +%s",
- mp->numsel == 1 ? "" : "s", mp->foldpath);
- write(out, buffer, strlen(buffer));
- for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++)
- if (is_selected(mp, msgnum)) {
- snprintf(buffer, sizeof(buffer), " %s",
- m_name(msgnum));
- write(out, buffer, strlen(buffer));
+ snprintf(buffer, sizeof(buffer), "+%s", mp->foldpath);
+ for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
+ if (!is_selected(mp, msgnum)) {
+ continue;