Commit 248c2ee8 authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Clean up code indentation.

These are mostly automated changes corresponding to the emacs
settings:
  (c-set-style "linux")
  (setq c-basic-offset 2)
  (c-set-offset 'case-label '+)

Most of the code follows the convention:
  (add-to-list 'c-cleanup-list 'space-before-funcall)
but this is not enforced by this indentation cleanup.

Also, I personally dislike tabs, so I have:
  (setq-default indent-tabs-mode nil)
in my own configuration.  However I have no desire to change every line
just for that effect.  So this cleanup does nothing about the mix issue.

Some of the secondary files (e.g. regex.c) have been skipped.

I've also skipped crypt-gpgme.c, because I need to think about that
file.  Werner Koch and the GnuPG team contributed most it, and it
follows the Gnu indentation settings.  It should probably be made
uniform with Mutt, but I don't want to discourage future GnuPG
contribution to the file.

I manually reverted a few unsightly cleanups, and added a few tweeks
when I saw things that could be improved.
parent 085a6f74
Pipeline #42197293 passed with stages
in 2 minutes and 59 seconds
......@@ -280,7 +280,7 @@ char* mutt_account_getoauthbearer (ACCOUNT* account)
one of your $*_authenticators and (2) you do not have the corresponding
$*_oauth_refresh_command defined. So the message does not mean "None of
your $*_oauth_refresh_command's are defined."
*/
*/
mutt_error (_("mutt_account_getoauthbearer: No OAUTH refresh command defined"));
return NULL;
}
......@@ -310,8 +310,8 @@ char* mutt_account_getoauthbearer (ACCOUNT* account)
oauthbearer = safe_malloc (oalen);
snprintf (oauthbearer, oalen,
"n,a=%s,\001host=%s\001port=%d\001auth=Bearer %s\001\001",
account->login, account->host, account->port, token);
"n,a=%s,\001host=%s\001port=%d\001auth=Bearer %s\001\001",
account->login, account->host, account->port, token);
FREE (&token);
......
......@@ -177,7 +177,7 @@ new_aliases:
if ((SortAlias & SORT_MASK) != SORT_ORDER)
{
qsort (AliasTable, i, sizeof (ALIAS *),
(SortAlias & SORT_MASK) == SORT_ADDRESS ? alias_SortAddress : alias_SortAlias);
(SortAlias & SORT_MASK) == SORT_ADDRESS ? alias_SortAddress : alias_SortAlias);
}
for (i=0; i<menu->max; i++) AliasTable[i]->num = i;
......
......@@ -388,7 +388,7 @@ retry_name:
return;
fseek_err:
fseek_err:
mutt_perror (_("Error seeking in alias file"));
safe_fclose (&rc);
return;
......@@ -411,7 +411,7 @@ int mutt_check_alias_name (const char *s, char *dest, size_t destlen)
if (!dry)
destlen--;
for (; s && *s && (dry || destlen) &&
(l = mbrtowc (&wc, s, MB_CUR_MAX, &mb)) != 0;
(l = mbrtowc (&wc, s, MB_CUR_MAX, &mb)) != 0;
s += l, destlen -= l)
{
bad = l == (size_t)(-1) || l == (size_t)(-2); /* conversion error */
......@@ -447,7 +447,7 @@ int mutt_check_alias_name (const char *s, char *dest, size_t destlen)
ADDRESS *alias_reverse_lookup (ADDRESS *a)
{
if (!a || !a->mailbox)
return NULL;
return NULL;
return hash_find (ReverseAlias, a->mailbox);
}
......
......@@ -202,7 +202,7 @@ int mutt_compose_attachment (BODY *a)
else
{
mutt_message (_("No mailcap compose entry for %s, creating empty file."),
type);
type);
rc = 1;
goto bailout;
}
......@@ -295,7 +295,7 @@ int mutt_edit_attachment (BODY *a)
rc = 1;
bailout:
bailout:
if(unlink_newfile)
unlink(mutt_b2s (newfile));
......@@ -313,32 +313,34 @@ void mutt_check_lookup_list (BODY *b, char *type, int len)
LIST *t = MimeLookupList;
int i;
for (; t; t = t->next) {
for (; t; t = t->next)
{
i = mutt_strlen (t->data) - 1;
if ((i > 0 && t->data[i-1] == '/' && t->data[i] == '*' &&
ascii_strncasecmp (type, t->data, i) == 0) ||
ascii_strcasecmp (type, t->data) == 0) {
BODY tmp = {0};
int n;
if ((n = mutt_lookup_mime_type (&tmp, b->filename)) != TYPEOTHER) {
snprintf (type, len, "%s/%s",
n == TYPEAUDIO ? "audio" :
n == TYPEAPPLICATION ? "application" :
n == TYPEIMAGE ? "image" :
n == TYPEMESSAGE ? "message" :
n == TYPEMODEL ? "model" :
n == TYPEMULTIPART ? "multipart" :
n == TYPETEXT ? "text" :
n == TYPEVIDEO ? "video" : "other",
tmp.subtype);
dprint(1, (debugfile, "mutt_check_lookup_list: \"%s\" -> %s\n",
b->filename, type));
}
if (tmp.subtype)
FREE (&tmp.subtype);
if (tmp.xtype)
FREE (&tmp.xtype);
ascii_strcasecmp (type, t->data) == 0)
{
BODY tmp = {0};
int n;
if ((n = mutt_lookup_mime_type (&tmp, b->filename)) != TYPEOTHER)
{
snprintf (type, len, "%s/%s",
n == TYPEAUDIO ? "audio" :
n == TYPEAPPLICATION ? "application" :
n == TYPEIMAGE ? "image" :
n == TYPEMESSAGE ? "message" :
n == TYPEMODEL ? "model" :
n == TYPEMULTIPART ? "multipart" :
n == TYPETEXT ? "text" :
n == TYPEVIDEO ? "video" : "other",
tmp.subtype);
dprint(1, (debugfile, "mutt_check_lookup_list: \"%s\" -> %s\n",
b->filename, type));
}
if (tmp.subtype)
FREE (&tmp.subtype);
if (tmp.xtype)
FREE (&tmp.xtype);
}
}
}
......@@ -371,7 +373,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr,
command = mutt_buffer_pool_get ();
use_mailcap = (flag == MUTT_MAILCAP ||
(flag == MUTT_REGULAR && mutt_needs_mailcap (a)));
(flag == MUTT_REGULAR && mutt_needs_mailcap (a)));
snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype);
if (use_mailcap)
......@@ -582,7 +584,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr,
strfcpy (descrip, a->description, sizeof (descrip));
else if (a->filename)
snprintf (descrip, sizeof (descrip), _("---Attachment: %s: %s"),
a->filename, type);
a->filename, type);
else
snprintf (descrip, sizeof (descrip), _("---Attachment: %s"), type);
}
......@@ -607,7 +609,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr,
else
rc = 0;
return_error:
return_error:
if (entry)
rfc1524_free_entry (&entry);
......@@ -739,10 +741,10 @@ int mutt_save_attachment (FILE *fp, BODY *m, const char *path, int flags, HEADER
/* recv mode */
if(hdr &&
m->hdr &&
m->encoding != ENCBASE64 &&
m->encoding != ENCQUOTEDPRINTABLE &&
mutt_is_message_type(m->type, m->subtype))
m->hdr &&
m->encoding != ENCBASE64 &&
m->encoding != ENCQUOTEDPRINTABLE &&
mutt_is_message_type(m->type, m->subtype))
{
/* message type attachments are written to mail folders. */
......
......@@ -157,7 +157,7 @@ FILE* mutt_bcache_put(body_cache_t *bcache, const char *id, int tmp)
s = strchr (s + 1, '/');
}
out:
out:
dprint (3, (debugfile, "bcache: put: '%s'\n", path));
return fp;
......
......@@ -226,9 +226,15 @@ folder_format_str (char *dest, size_t destlen, size_t col, int cols, char op, co
s = NONULL (folder->ff->name);
snprintf (fn, sizeof (fn), "%s%s", s,
folder->ff->local ? (S_ISLNK (folder->ff->mode) ? "@" :
(S_ISDIR (folder->ff->mode) ? "/" :
((folder->ff->mode & S_IXUSR) != 0 ? "*" : ""))) : "");
folder->ff->local ?
(S_ISLNK (folder->ff->mode) ?
"@" :
(S_ISDIR (folder->ff->mode) ?
"/" :
((folder->ff->mode & S_IXUSR) != 0 ?
"*" :
""))) :
"");
mutt_format_s (dest, destlen, fmt, fn);
break;
......@@ -580,7 +586,7 @@ static void folder_entry (char *s, size_t slen, MUTTMENU *menu, int num)
folder.num = num;
mutt_FormatString (s, slen, 0, MuttIndexWindow->cols, NONULL(FolderFormat), folder_format_str,
(unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
(unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
}
static void init_menu (struct browser_state *state, MUTTMENU *menu, char *title,
......@@ -606,13 +612,13 @@ static void init_menu (struct browser_state *state, MUTTMENU *menu, char *title,
strfcpy (path, LastDir, sizeof (path));
mutt_pretty_mailbox (path, sizeof (path));
#ifdef USE_IMAP
if (state->imap_browse && option (OPTIMAPLSUB))
snprintf (title, titlelen, _("Subscribed [%s], File mask: %s"),
path, NONULL (Mask.pattern));
else
if (state->imap_browse && option (OPTIMAPLSUB))
snprintf (title, titlelen, _("Subscribed [%s], File mask: %s"),
path, NONULL (Mask.pattern));
else
#endif
snprintf (title, titlelen, _("Directory [%s], File mask: %s"),
path, NONULL(Mask.pattern));
snprintf (title, titlelen, _("Directory [%s], File mask: %s"),
path, NONULL(Mask.pattern));
}
menu->redraw = REDRAW_FULL;
}
......@@ -668,35 +674,35 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
else
{
#endif
for (i = mutt_strlen (f) - 1; i > 0 && f[i] != '/' ; i--);
if (i > 0)
{
if (f[0] == '/')
for (i = mutt_strlen (f) - 1; i > 0 && f[i] != '/' ; i--);
if (i > 0)
{
if (i > sizeof (LastDir) - 1) i = sizeof (LastDir) - 1;
strncpy (LastDir, f, i);
LastDir[i] = 0;
if (f[0] == '/')
{
if (i > sizeof (LastDir) - 1) i = sizeof (LastDir) - 1;
strncpy (LastDir, f, i);
LastDir[i] = 0;
}
else
{
getcwd (LastDir, sizeof (LastDir));
safe_strcat (LastDir, sizeof (LastDir), "/");
safe_strncat (LastDir, sizeof (LastDir), f, i);
}
}
else
{
getcwd (LastDir, sizeof (LastDir));
safe_strcat (LastDir, sizeof (LastDir), "/");
safe_strncat (LastDir, sizeof (LastDir), f, i);
if (f[0] == '/')
strcpy (LastDir, "/"); /* __STRCPY_CHECKED__ */
else
getcwd (LastDir, sizeof (LastDir));
}
}
else
{
if (f[0] == '/')
strcpy (LastDir, "/"); /* __STRCPY_CHECKED__ */
else
getcwd (LastDir, sizeof (LastDir));
}
if (i <= 0 && f[0] != '/')
strfcpy (prefix, f, sizeof (prefix));
else
strfcpy (prefix, f + i + 1, sizeof (prefix));
killPrefix = 1;
if (i <= 0 && f[0] != '/')
strfcpy (prefix, f, sizeof (prefix));
else
strfcpy (prefix, f + i + 1, sizeof (prefix));
killPrefix = 1;
#ifdef USE_IMAP
}
#endif
......@@ -736,10 +742,10 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
}
else
#ifdef USE_IMAP
if (!state.imap_browse)
if (!state.imap_browse)
#endif
if (examine_directory (NULL, &state, LastDir, prefix) == -1)
goto bail;
if (examine_directory (NULL, &state, LastDir, prefix) == -1)
goto bail;
menu = mutt_new_menu (MENU_FOLDER);
menu->make_entry = folder_entry;
......@@ -750,7 +756,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
menu->tag = file_tag;
menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_FOLDER,
FolderHelp);
FolderHelp);
mutt_push_current_menu (menu);
init_menu (&state, menu, title, sizeof (title), buffy);
......@@ -769,11 +775,11 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
if (S_ISDIR (state.entry[menu->current].mode) ||
(S_ISLNK (state.entry[menu->current].mode) &&
link_is_dir (LastDir, state.entry[menu->current].name))
link_is_dir (LastDir, state.entry[menu->current].name))
#ifdef USE_IMAP
|| state.entry[menu->current].inferiors
#endif
)
)
{
/* make sure this isn't a MH or maildir mailbox */
if (buffy)
......@@ -792,7 +798,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
if ((mx_get_magic (buf) <= 0)
#ifdef USE_IMAP
|| state.entry[menu->current].inferiors
|| state.entry[menu->current].inferiors
#endif
)
{
......@@ -832,7 +838,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
ciss_url_t url;
strfcpy (LastDir, state.entry[menu->current].name,
sizeof (LastDir));
sizeof (LastDir));
/* tack on delimiter here */
n = strlen (LastDir)+1;
......@@ -872,16 +878,16 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
}
else
#endif
if (examine_directory (menu, &state, LastDir, prefix) == -1)
{
/* try to restore the old values */
strfcpy (LastDir, OldLastDir, sizeof (LastDir));
if (examine_directory (menu, &state, LastDir, prefix) == -1)
{
strfcpy (LastDir, NONULL(Homedir), sizeof (LastDir));
goto bail;
}
}
if (examine_directory (menu, &state, LastDir, prefix) == -1)
{
/* try to restore the old values */
strfcpy (LastDir, OldLastDir, sizeof (LastDir));
if (examine_directory (menu, &state, LastDir, prefix) == -1)
{
strfcpy (LastDir, NONULL(Homedir), sizeof (LastDir));
goto bail;
}
}
menu->current = 0;
menu->top = 0;
init_menu (&state, menu, title, sizeof (title), buffy);
......@@ -1009,7 +1015,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
}
break;
case OP_DELETE_MAILBOX:
case OP_DELETE_MAILBOX:
if (!state.entry[menu->current].imap)
mutt_error (_("Delete is only supported for IMAP mailboxes"));
else
......@@ -1025,7 +1031,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
break;
}
snprintf (msg, sizeof (msg), _("Really delete mailbox \"%s\"?"),
mx.mbox);
mx.mbox);
if (mutt_yesorno (msg, MUTT_NO) == MUTT_YES)
{
if (!imap_delete_mailbox (Context, mx))
......@@ -1036,7 +1042,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
/* and move all other entries up */
if (nentry+1 < state.entrylen)
memmove (state.entry + nentry, state.entry + nentry + 1,
sizeof (struct folder_file) * (state.entrylen - (nentry+1)));
sizeof (struct folder_file) * (state.entrylen - (nentry+1)));
memset (&state.entry[state.entrylen - 1], 0,
sizeof (struct folder_file));
state.entrylen--;
......@@ -1172,13 +1178,13 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
}
else
#endif
if (examine_directory (menu, &state, LastDir, NULL) == 0)
init_menu (&state, menu, title, sizeof (title), buffy);
else
{
mutt_error _("Error scanning directory.");
goto bail;
}
if (examine_directory (menu, &state, LastDir, NULL) == 0)
init_menu (&state, menu, title, sizeof (title), buffy);
else
{
mutt_error _("Error scanning directory.");
goto bail;
}
killPrefix = 0;
if (!state.entrylen)
{
......@@ -1192,52 +1198,52 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
case OP_SORT:
case OP_SORT_REVERSE:
{
int resort = 1;
int reverse = (i == OP_SORT_REVERSE);
switch (mutt_multi_choice ((reverse) ?
_("Reverse sort by (d)ate, (a)lpha, si(z)e, (c)ount, (u)nread, or do(n)'t sort? ") :
_("Sort by (d)ate, (a)lpha, si(z)e, (c)ount, (u)nread, or do(n)'t sort? "),
_("dazcun")))
{
case -1: /* abort */
resort = 0;
break;
case 1: /* (d)ate */
BrowserSort = SORT_DATE;
break;
case 2: /* (a)lpha */
BrowserSort = SORT_SUBJECT;
break;
case 3: /* si(z)e */
BrowserSort = SORT_SIZE;
break;
case 4: /* (c)ount */
BrowserSort = SORT_COUNT;
break;
case 5: /* (u)nread */
BrowserSort = SORT_UNREAD;
break;
{
int resort = 1;
int reverse = (i == OP_SORT_REVERSE);
case 6: /* do(n)'t sort */
BrowserSort = SORT_ORDER;
resort = 0;
break;
}
if (resort)
{
BrowserSort |= reverse ? SORT_REVERSE : 0;
browser_sort (&state);
menu->redraw = REDRAW_FULL;
}
break;
}
switch (mutt_multi_choice ((reverse) ?
_("Reverse sort by (d)ate, (a)lpha, si(z)e, (c)ount, (u)nread, or do(n)'t sort? ") :
_("Sort by (d)ate, (a)lpha, si(z)e, (c)ount, (u)nread, or do(n)'t sort? "),
_("dazcun")))
{
case -1: /* abort */
resort = 0;
break;
case 1: /* (d)ate */
BrowserSort = SORT_DATE;
break;
case 2: /* (a)lpha */
BrowserSort = SORT_SUBJECT;
break;
case 3: /* si(z)e */
BrowserSort = SORT_SIZE;
break;
case 4: /* (c)ount */
BrowserSort = SORT_COUNT;
break;
case 5: /* (u)nread */
BrowserSort = SORT_UNREAD;
break;
case 6: /* do(n)'t sort */
BrowserSort = SORT_ORDER;
resort = 0;
break;
}
if (resort)
{
BrowserSort |= reverse ? SORT_REVERSE : 0;
browser_sort (&state);
menu->redraw = REDRAW_FULL;
}
break;
}
case OP_TOGGLE_MAILBOXES:
buffy = 1 - buffy;
......@@ -1298,33 +1304,33 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
}
else
#endif
if (S_ISDIR (state.entry[menu->current].mode) ||
(S_ISLNK (state.entry[menu->current].mode) &&
link_is_dir (LastDir, state.entry[menu->current].name)))
{
mutt_error _("Can't view a directory");
break;
}
else
{
BODY *b;
char buf[_POSIX_PATH_MAX];
if (S_ISDIR (state.entry[menu->current].mode) ||
(S_ISLNK (state.entry[menu->current].mode) &&
link_is_dir (LastDir, state.entry[menu->current].name)))
{
mutt_error _("Can't view a directory");
break;
}
else
{
BODY *b;
char buf[_POSIX_PATH_MAX];
mutt_concat_path (buf, LastDir, state.entry[menu->current].name, sizeof (buf));
b = mutt_make_file_attach (buf);
if (b != NULL)
{
mutt_view_attachment (NULL, b, MUTT_REGULAR, NULL, NULL);
mutt_free_body (&b);
menu->redraw = REDRAW_FULL;
}
else
mutt_error _("Error trying to view file");
}
mutt_concat_path (buf, LastDir, state.entry[menu->current].name, sizeof (buf));
b = mutt_make_file_attach (buf);
if (b != NULL)
{
mutt_view_attachment (NULL, b, MUTT_REGULAR, NULL, NULL);
mutt_free_body (&b);
menu->redraw = REDRAW_FULL;
}
else
mutt_error _("Error trying to view file");
}
}
}
bail:
bail:
if (menu)
{
......
......@@ -55,9 +55,9 @@ void mutt_buffer_free (BUFFER **p)
if (!p || !*p)
return;
FREE (&(*p)->data);
/* dptr is just an offset to data and shouldn't be freed */
FREE (p); /* __FREE_CHECKED__ */
FREE (&(*p)->data);
/* dptr is just an offset to data and shouldn't be freed */
FREE (p); /* __FREE_CHECKED__ */
}
void mutt_buffer_clear (BUFFER *b)
......
......@@ -586,16 +586,16 @@ int mutt_buffy_check (int force)
tmp->magic = MUTT_POP;
else
#endif
if (stat (tmp->path, &sb) != 0 || (S_ISREG(sb.st_mode) && sb.st_size == 0) ||
(!tmp->magic && (tmp->magic = mx_get_magic (tmp->path)) <= 0))
{
/* if the mailbox still doesn't exist, set the newly created flag to
* be ready for when it does. */
tmp->newly_created = 1;
tmp->magic = 0;
tmp->size = 0;
continue;
}
if (stat (tmp->path, &sb) != 0 || (S_ISREG(sb.st_mode) && sb.st_size == 0) ||
(!tmp->magic && (tmp->magic = mx_get_magic (tmp->path)) <= 0))
{
/* if the mailbox still doesn't exist, set the newly created flag to
* be ready for when it does. */
tmp->newly_created = 1;
tmp->magic = 0;
tmp->size = 0;
continue;
}
}
/* check to see if the folder is the currently selected folder
......
......@@ -269,8 +269,8 @@ int mutt_alloc_color (int fg, int bg)
SLtt_set_color (i, NULL, get_color_name (fgc, sizeof (fgc), fg), get_color_name (bgc, sizeof (bgc), bg));
else
#elif defined (HAVE_USE_DEFAULT_COLORS)
if (fg == COLOR_DEFAULT)
fg = -1;
if (fg == COLOR_DEFAULT)
fg = -1;
if (bg == COLOR_DEFAULT)
bg = -1;
#endif
......@@ -297,7 +297,7 @@ void mutt_free_color (int fg, int bg)
UserColors--;
dprint(1,(debugfile,"mutt_free_color(): Color pairs used so far: %d\n",
UserColors));
UserColors));
if (p == ColorList)
{
......@@ -404,7 +404,7 @@ parse_color_name (const char *s, int *col, int *attr, int is_fg, BUFFER *err)
static int
_mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err,
short parse_uncolor);
short parse_uncolor);
#ifdef HAVE_COLOR
......@@ -462,19 +462,19 @@ static int _mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data,
return (-1);
}
if(
if (
#ifdef HAVE_COLOR
/* we're running without curses */
option (OPTNOCURSES)
|| /* we're parsing an uncolor command, and have no colors */
(parse_uncolor && !has_colors())
/* we're parsing an unmono command, and have colors */
|| (!parse_uncolor && has_colors())
/* we're running without curses */
option (OPTNOCURSES)
|| /* we're parsing an uncolor command, and have no colors */
(parse_uncolor && !has_colors())
/* we're parsing an unmono command, and have colors */
|| (!parse_uncolor && has_colors())
#else
/* We don't even have colors compiled in */
parse_uncolor
/* We don't even have colors compiled in */
parse_uncolor
#endif
)
)
{
/* just eat the command, but don't do anything real about it */
do
......@@ -508,7 +508,7 @@ static int _mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data,
if (!do_cache)
do_cache = 1;
dprint(1,(debugfile,"Freeing pattern \"%s\" from color list\n",
tmp->pattern));
tmp->pattern));
if (last)
last->next = tmp->next;
else
......@@ -805,9 +805,9 @@ _mutt_parse_color (BUFFER *buf, BUFFER *s, BUFFER *err,
#ifdef HAVE_COLOR
# ifdef HAVE_USE_DEFAULT_COLORS
if (!option (OPTNOCURSES) && has_colors()
/* delay use_default_colors() until needed, since it initializes things */
&& (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT)
&& use_default_colors () != OK)
/* delay use_default_colors() until needed, since it initializes things */
&& (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT)
&& use_default_colors () != OK)
{
strfcpy (err->data, _("default colors not supported"), err->dsize);
return (-1);
......
......@@ -223,7 +223,8 @@ int mutt_display_message (HEADER *cur)
}
res = mutt_copy_message (fpout, Context, cur, cmflags,
(option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_DISPLAY);
(option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) |