From: Pierre Habouzit Date: Thu, 30 Nov 2006 21:25:35 +0000 (+0100) Subject: cosmetics X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=dd531b757dd6a43494d5cde51b2f0f24c6606a0e cosmetics Signed-off-by: Pierre Habouzit --- diff --git a/attach.c b/attach.c index ccc0a8d..8077ecf 100644 --- a/attach.c +++ b/attach.c @@ -52,9 +52,9 @@ int mutt_get_tmp_attachment (BODY * a) if (a->stamp >= st.st_mtime) mutt_stamp_attachment (a); - } - else + } else { mutt_perror(fpin ? tempfile : a->filename); + } m_fclose(&fpin); m_fclose(&fpout); @@ -87,19 +87,18 @@ int mutt_compose_attachment (BODY * a) if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) != M_YES) goto bailout; - } - else + } else { unlink_newfile = 1; - } - else + } + } else { m_strcpy(newfile, sizeof(newfile), a->filename); + } if (rfc1524_expand_command (a, newfile, type, command, sizeof (command))) { /* For now, editing requires a file, no piping */ mutt_error _("Mailcap compose entry requires %%s"); - } - else { + } else { int r; mutt_endwin (NULL); @@ -159,8 +158,7 @@ int mutt_compose_attachment (BODY * a) } } } - } - else { + } else { rfc1524_entry_delete(&entry); mutt_message (_("No mailcap compose entry for %s, creating empty file."), type); @@ -207,20 +205,19 @@ int mutt_edit_attachment (BODY * a) if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) != M_YES) goto bailout; - } - else + } else { unlink_newfile = 1; - } - else + } + } else { m_strcpy(newfile, sizeof(newfile), a->filename); + } if (rfc1524_expand_command (a, newfile, type, command, sizeof (command))) { /* For now, editing requires a file, no piping */ mutt_error _("Mailcap Edit entry requires %%s"); goto bailout; - } - else { + } else { mutt_endwin (NULL); if (mutt_system (command) == -1) { mutt_error (_("Error running \"%s\"!"), command); @@ -232,8 +229,7 @@ int mutt_edit_attachment (BODY * a) else if (a->type == TYPETEXT) { /* On text, default to editor */ mutt_edit_file (NONULL (Editor), a->filename); - } - else { + } else { rfc1524_entry_delete(&entry); mutt_error (_("No mailcap edit entry for %s"), type); return 0; @@ -269,13 +265,11 @@ static int is_mmnoask (const char *buf) if (*(q + 1) == '*') { if (ascii_strncasecmp (buf, p, q - p) == 0) return (1); - } - else { + } else { if (ascii_strcasecmp (buf, p) == 0) return (1); } - } - else { + } else { lng = m_strlen(p); if (buf[lng] == '/' && m_strncasecmp(buf, p, lng) == 0) return (1); @@ -330,7 +324,7 @@ int mutt_is_autoview (BODY * b, const char *type) int i; if (!type) - snprintf (_type, sizeof (_type), "%s/%s", TYPE (b), b->subtype); + snprintf(_type, sizeof(_type), "%s/%s", TYPE(b), b->subtype); else m_strcpy(_type, sizeof(_type), type);