{
m_strformat (s, slen, NONULL (AliasFmt), (format_t *)alias_format_str,
(unsigned long)((alias_t **)m->data)[num],
- M_FORMAT_ARROWCURSOR);
+ option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0);
}
static int alias_tag (MUTTMENU * menu, int n, int m)
#ifdef USE_NNTP
if (option (OPTNEWS))
- m_strformat (s, slen, NONULL (GroupFormat), newsgroup_format_str,
- (unsigned long) &folder, M_FORMAT_ARROWCURSOR);
+ m_strformat(s, slen, NONULL (GroupFormat), newsgroup_format_str,
+ (unsigned long)&folder,
+ option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0);
else
#endif
- m_strformat (s, slen, NONULL (FolderFormat), folder_format_str,
- (unsigned long) &folder, M_FORMAT_ARROWCURSOR);
+ m_strformat(s, slen, NONULL (FolderFormat), folder_format_str,
+ (unsigned long)&folder,
+ option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0);
}
static void init_menu (struct browser_state *state, MUTTMENU * menu,
int w=(COLS-SW)>blen?blen:COLS-SW;
m_strformat (b, w, NONULL (AttachFormat), mutt_attach_fmt,
(unsigned long) (((ATTACHPTR **) menu->data)[num]),
- M_FORMAT_STAT_FILE | M_FORMAT_ARROWCURSOR);
+ M_FORMAT_STAT_FILE | (option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0));
}
static void redraw_crypt_lines (HEADER * msg)
const char *p)
{
int w=(COLS-SW)>buflen?buflen:(COLS-SW);
- m_strformat (buf, w, p, compose_format_str,
- (unsigned long) menu, 0);
+ m_strformat(buf, w, p, compose_format_str, (unsigned long)menu, 0);
}
/* return values:
entry.key = key_table[num];
entry.num = num + 1;
- m_strformat (s, l, NONULL (PgpEntryFormat), crypt_entry_fmt,
- (unsigned long) &entry, M_FORMAT_ARROWCURSOR);
+ m_strformat(s, l, NONULL (PgpEntryFormat), crypt_entry_fmt,
+ (unsigned long) &entry,
+ option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0);
}
/* Compare two addresses and the keyid to be used for sorting. */
}
if (optional)
- m_strformat (dest, destlen, ifstring, _mutt_fmt_pgp_command, data,
- 0);
+ m_strformat(dest, destlen, ifstring, _mutt_fmt_pgp_command, data, 0);
else if (flags & M_FORMAT_OPTIONAL)
- m_strformat (dest, destlen, elsestring, _mutt_fmt_pgp_command, data,
- 0);
+ m_strformat(dest, destlen, elsestring, _mutt_fmt_pgp_command, data, 0);
return (src);
}
entry.uid = KeyTable[num];
entry.num = num + 1;
- m_strformat (s, l, NONULL (PgpEntryFormat), pgp_entry_fmt,
- (unsigned long) &entry, M_FORMAT_ARROWCURSOR);
+ m_strformat(s, l, NONULL (PgpEntryFormat), pgp_entry_fmt,
+ (unsigned long)&entry,
+ option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0);
}
static int _pgp_compare_address (const void *a, const void *b)
}
if (optional)
- m_strformat (dest, destlen, ifstring, _mutt_fmt_smime_command,
- data, 0);
+ m_strformat(dest, destlen, ifstring, _mutt_fmt_smime_command, data, 0);
else if (flags & M_FORMAT_OPTIONAL)
- m_strformat (dest, destlen, elsestring, _mutt_fmt_smime_command,
- data, 0);
+ m_strformat(dest, destlen, elsestring, _mutt_fmt_smime_command, data, 0);
return (src);
}
struct smime_command_context *cctx,
const char *fmt)
{
- m_strformat (d, dlen, NONULL (fmt), _mutt_fmt_smime_command,
- (unsigned long) cctx, 0);
+ m_strformat(d, dlen, NONULL (fmt), _mutt_fmt_smime_command,
+ (unsigned long)cctx, 0);
}
static pid_t smime_invoke (FILE ** smimein, FILE ** smimeout,
{
char expanded[_POSIX_PATH_MAX];
- m_strformat (expanded, sizeof (expanded), cmd,
- compresshook_format_str, (unsigned long) ctx, 0);
+ m_strformat(expanded, sizeof (expanded), cmd, compresshook_format_str,
+ (unsigned long)ctx, 0);
return m_strdup(expanded);
}
void index_make_entry (char *s, ssize_t l, struct menu_t * menu, int num)
{
- format_flag flag =
- M_FORMAT_MAKEPRINT | M_FORMAT_ARROWCURSOR | M_FORMAT_INDEX;
+ format_flag flag = M_FORMAT_MAKEPRINT | M_FORMAT_INDEX;
int edgemsgno, reverse = Sort & SORT_REVERSE;
HEADER *h = Context->hdrs[Context->v2r[num]];
THREAD *tmp;
+ if (option(OPTARROWCURSOR))
+ flag |= M_FORMAT_ARROWCURSOR;
+
if ((Sort & SORT_MASK) == SORT_THREADS && h->tree) {
flag |= M_FORMAT_TREE; /* display the thread tree */
if (h->display_subject)
}
if (optional)
- m_strformat (dest, destlen, ifstring, hdr_format_str,
- (unsigned long) hfi, flags);
+ m_strformat(dest, destlen, ifstring, hdr_format_str,
+ (unsigned long)hfi, flags);
else if (flags & M_FORMAT_OPTIONAL)
- m_strformat (dest, destlen, elsestring, hdr_format_str,
- (unsigned long) hfi, flags);
+ m_strformat(dest, destlen, elsestring, hdr_format_str,
+ (unsigned long)hfi, flags);
return (src);
#undef THREAD_NEW
hfi.hdr = hdr;
hfi.ctx = ctx;
- m_strformat (dest, destlen, s, hdr_format_str, (unsigned long) &hfi,
- flags);
+ m_strformat(dest, destlen, s, hdr_format_str, (unsigned long) &hfi, flags);
}
ssize_t m_strformat(char *dst, ssize_t dlen, const char *fmt,
format_t *callback, unsigned long data, format_flag flags)
{
- ssize_t pos = (flags & M_FORMAT_ARROWCURSOR && option (OPTARROWCURSOR)) ? 3 : 0;
+ ssize_t pos = flags & M_FORMAT_ARROWCURSOR ? 3 : 0;
while (*fmt) {
char ifstring[STRING], elsestring[STRING], prefix[STRING] = "";
}
return pos; /* skip rest of input */
- case '|':
- col = mutt_strwidth(dst);
-
- ch = *fmt++;
- /* pad to EOL */
- pos += m_strpad(dst + pos, dlen - pos, ch, COLS - SW - col);
- return pos; /* skip rest of input */
+ case '|': /* pad to EOL */
+ return pos + m_strpad(dst + pos, dlen - pos, *fmt,
+ COLS - SW - mutt_strwidth(dst));
default:
lower = nodots = 0;
CONTEXT *ctx = (CONTEXT *) menu->data;
_mutt_make_string (s, slen, NONULL (HdrFmt), ctx, ctx->hdrs[entry],
- M_FORMAT_ARROWCURSOR);
+ option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0);
}
static HEADER *select_msg (void)
_mutt_make_string (s, sizeof (s), MsgFmt, NULL, aptr->content->hdr,
M_FORMAT_FORCESUBJ | M_FORMAT_MAKEPRINT |
- M_FORMAT_ARROWCURSOR);
+ (option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0));
if (*s) {
mutt_format_s (dest, destlen, prefix, s);
break;
int w=(COLS-SW)>blen?blen:(COLS-SW);
m_strformat (b, w, NONULL (AttachFormat), mutt_attach_fmt,
(unsigned long) (((ATTACHPTR **) menu->data)[num]),
- M_FORMAT_ARROWCURSOR);
+ option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0);
}
int mutt_tag_attach (MUTTMENU * menu, int n, int m)
remailer_t **type2_list = (remailer_t **) menu->data;
int w = (COLS-SW) > blen ? blen : (COLS-SW);
- m_strformat (b, w, NONULL (MixEntryFormat), mix_entry_fmt,
- (unsigned long) type2_list[num], M_FORMAT_ARROWCURSOR);
+ m_strformat(b, w, NONULL (MixEntryFormat), mix_entry_fmt,
+ (unsigned long) type2_list[num],
+ option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0);
}
static int mix_chain_add (mixchain_t * chain, const char *s,