-void mutt_make_help (char *d, size_t dlen, char *txt, int menu, int op)
-{
- char buf[SHORT_STRING];
-
- if (km_expand_key (buf, sizeof (buf), km_find_func (menu, op)) ||
- km_expand_key (buf, sizeof (buf), km_find_func (MENU_GENERIC, op)))
- snprintf (d, dlen, "%s:%s", buf, txt);
- else
- d[0] = 0;
-}
-
-char *mutt_compile_help (char *buf, size_t buflen, int menu,
- struct mapping_t *items)
-{
- int i;
- size_t len;
- char *pbuf = buf;
-
- for (i = 0; items[i].name && buflen > 2; i++) {
- if (i) {
- *pbuf++ = ' ';
- *pbuf++ = ' ';
- buflen -= 2;
- }
- mutt_make_help (pbuf, buflen, _(items[i].name), menu, items[i].value);
- len = m_strlen(pbuf);
- pbuf += len;
- buflen -= len;
- }
- return buf;
-}
-