+ p = m_strchrnul(fmt, '?');
+ m_strncpy(elstr, ssizeof(elstr), fmt, p - fmt);
+ fmt = p;
+
+ if (!*fmt++) /* move past the trailing `?' */
+ break; /* bad format */
+ }
+
+ switch (ch) {
+ char lower, nodots, buf[LONG_STRING];
+
+ case '>': /* right justify to EOL */
+ width -= mutt_strwidth(dst);
+
+ ch = *fmt++; /* pad char */
+
+ if (width > 0) {
+ m_strformat(buf, sizeof(buf), 0, fmt, callback, cdata, flags);
+ width -= mutt_strwidth(buf);
+ pos += m_strpad(dst + pos, dlen - pos, ch, width);
+ pos += m_strcpy(dst + pos, dlen - pos, buf);
+ }
+ return pos; /* skip rest of input */
+
+ case '|': /* pad to EOL */
+ width -= mutt_strwidth(dst);
+ return pos + m_strpad(dst + pos, dlen - pos, *fmt, width);
+
+ default:
+ lower = nodots = 0;
+
+ while (ch == '_' || ch == ':') {
+ lower |= ch == '_';
+ nodots |= ch == ':';
+ ch = *fmt++;
+ }
+
+ /* use callback function to handle this case */
+ fmt = callback(buf, sizeof (buf), ch, fmt, prefix,
+ ifstr, elstr, cdata, flags);
+
+ if (lower)
+ m_strtolower(buf);
+
+ if (nodots) {
+ char *p;
+
+ for (p = buf; *p; p++) {
+ if (*p == '.')
+ *p = '_';
+ }
+ }
+
+ pos += m_strcpy(dst + pos, dlen - pos, buf);
+ break;
+ }
+ continue;