{
struct stat st;
- mutt_buffer_strcpy (fname, path);
- if (access (mutt_b2s (fname), F_OK) != 0)
+ mutt_buffer_strcpy(fname, path);
+ if (access(mutt_b2s(fname), F_OK) != 0)
return 0;
- if (stat (mutt_b2s (fname), &st) != 0)
+ if (stat(mutt_b2s(fname), &st) != 0)
return -1;
if (S_ISDIR(st.st_mode))
{
(_("File is a directory, save under it: (y)es, (n)o, (a)ll?"), _("yna")))
{
case 3: /* all */
- mutt_str_replace (directory, mutt_b2s (fname));
+ mutt_str_replace(directory, mutt_b2s(fname));
break;
case 1: /* yes */
FREE(directory);
else if ((ans = mutt_yesorno(_("File is a directory, save under it?"), MUTT_YES)) != MUTT_YES)
return (ans == MUTT_NO) ? 1 : -1;
- struct Buffer *tmp = mutt_buffer_pool_get ();
- mutt_buffer_strcpy (tmp, mutt_path_basename (NONULL (attname)));
- if (mutt_get_field (_("File under directory: "), tmp->data, tmp->dsize,
- MUTT_FILE | MUTT_CLEAR) != 0)
+ struct Buffer *tmp = mutt_buffer_pool_get();
+ mutt_buffer_strcpy(tmp, mutt_path_basename(NONULL(attname)));
+ if (mutt_get_field(_("File under directory: "), tmp->data, tmp->dsize,
+ MUTT_FILE | MUTT_CLEAR) != 0)
{
- mutt_buffer_pool_release (&tmp);
+ mutt_buffer_pool_release(&tmp);
return -1;
}
- mutt_buffer_fix_dptr (tmp);
+ mutt_buffer_fix_dptr(tmp);
if (mutt_buffer_is_empty(tmp))
{
- mutt_buffer_pool_release (&tmp);
+ mutt_buffer_pool_release(&tmp);
return (-1);
}
- mutt_buffer_concat_path (fname, path, mutt_b2s (tmp));
- mutt_buffer_pool_release (&tmp);
+ mutt_buffer_concat_path(fname, path, mutt_b2s(tmp));
+ mutt_buffer_pool_release(&tmp);
}
if ((*opt == MUTT_SAVE_NO_FLAGS) && (access(mutt_b2s(fname), F_OK) == 0))
FILE *fp_out = NULL;
int saved_attachments = 0;
- struct Buffer *buf = mutt_buffer_pool_get ();
- struct Buffer *tfile = mutt_buffer_pool_get ();
+ struct Buffer *buf = mutt_buffer_pool_get();
+ struct Buffer *tfile = mutt_buffer_pool_get();
for (int i = 0; !tag || (i < actx->idxlen); i++)
{
{
if (!C_AttachSplit)
{
- if (mutt_buffer_is_empty (buf))
+ if (mutt_buffer_is_empty(buf))
{
enum SaveAttach opt = MUTT_SAVE_NO_FLAGS;
- mutt_buffer_strcpy (buf, mutt_path_basename (NONULL (top->filename)));
+ mutt_buffer_strcpy(buf, mutt_path_basename(NONULL(top->filename)));
prepend_savedir(buf);
- if (mutt_get_field (_("Save to file: "), buf->data, buf->dsize, MUTT_FILE | MUTT_CLEAR) != 0)
+ if (mutt_get_field(_("Save to file: "), buf->data, buf->dsize,
+ MUTT_FILE | MUTT_CLEAR) != 0)
{
goto cleanup;
}
- mutt_buffer_fix_dptr (buf);
- if (mutt_buffer_is_empty (buf))
- goto cleanup;
- mutt_buffer_expand_path (buf);
- if (mutt_check_overwrite (top->filename, mutt_b2s (buf), tfile, &opt, NULL))
+ mutt_buffer_fix_dptr(buf);
+ if (mutt_buffer_is_empty(buf))
+ goto cleanup;
+ mutt_buffer_expand_path(buf);
+ if (mutt_check_overwrite(top->filename, mutt_b2s(buf), tfile, &opt, NULL))
goto cleanup;
- rc = mutt_save_attachment (fp, top, mutt_b2s (tfile), opt, e);
+ rc = mutt_save_attachment(fp, top, mutt_b2s(tfile), opt, e);
if ((rc == 0) && C_AttachSep && (fp_out = fopen(mutt_b2s(tfile), "a")))
{
fprintf(fp_out, "%s", C_AttachSep);
}
else
{
- rc = mutt_save_attachment (fp, top, mutt_b2s (tfile), MUTT_SAVE_APPEND, e);
+ rc = mutt_save_attachment(fp, top, mutt_b2s(tfile), MUTT_SAVE_APPEND, e);
if ((rc == 0) && C_AttachSep && (fp_out = fopen(mutt_b2s(tfile), "a")))
{
fprintf(fp_out, "%s", C_AttachSep);
}
cleanup:
- mutt_buffer_pool_release (&buf);
- mutt_buffer_pool_release (&tfile);
+ mutt_buffer_pool_release(&buf);
+ mutt_buffer_pool_release(&tfile);
}
/**