}
/* buf comes from the buffer pool, so defaults to size LONG_STRING */
- if (mutt_get_field (_("Chdir to: "), buf->data, buf->dsize, MUTT_FILE) == 0 &&
- mutt_b2s (buf)[0])
+ if ((mutt_buffer_get_field (_("Chdir to: "), buf, MUTT_FILE) == 0) &&
+ mutt_buffer_len (buf))
{
- mutt_buffer_fix_dptr (buf);
buffy = 0;
mutt_buffer_expand_path (buf);
#ifdef USE_IMAP
mutt_buffer_strcpy (buf, NONULL(Mask.pattern));
/* buf comes from the buffer pool, so defaults to size LONG_STRING */
- if (mutt_get_field (_("File Mask: "), buf->data, buf->dsize, 0) == 0)
+ if (mutt_buffer_get_field (_("File Mask: "), buf, 0) == 0)
{
regex_t *rx = (regex_t *) safe_malloc (sizeof (regex_t));
const char *s = mutt_b2s (buf);
int not = 0, err;
- mutt_buffer_fix_dptr (buf);
-
buffy = 0;
/* assume that the user wants to see everything */
- if (!(mutt_b2s (buf)[0]))
+ if (!(mutt_buffer_len (buf)))
mutt_buffer_strcpy (buf, ".");
SKIPWS (s);
if (*s == '!')
mutt_buffer_printf (buf, "%s/", mutt_b2s (LastDir));
/* buf comes from the buffer pool, so defaults to size LONG_STRING */
- if (mutt_get_field (_("New file name: "), buf->data, buf->dsize, MUTT_FILE) == 0)
+ if (mutt_buffer_get_field (_("New file name: "), buf, MUTT_FILE) == 0)
{
- /* we're about to bail, so no need to fix buf->dptr */
mutt_buffer_strcpy (f, mutt_b2s (buf));
destroy_state (&state);
goto bail;
mutt_unget_event (ch.op ? 0 : ch.ch, ch.op ? ch.op : 0);
mutt_buffer_increase_size (fname, LONG_STRING);
- if (_mutt_get_field (pc, fname->data, fname->dsize,
- (buffy ? MUTT_EFILE : MUTT_FILE) | MUTT_CLEAR,
- multiple, files, numfiles) != 0)
+ if (_mutt_buffer_get_field (pc, fname,
+ (buffy ? MUTT_EFILE : MUTT_FILE) | MUTT_CLEAR,
+ multiple, files, numfiles) != 0)
mutt_buffer_clear (fname);
- else
- mutt_buffer_fix_dptr (fname);
FREE (&pc);
}
tmp = mutt_buffer_pool_get ();
mutt_buffer_strcpy (tmp, mutt_basename (NONULL (attname)));
- if (mutt_get_field (_("File under directory: "), tmp->data, tmp->dsize,
- MUTT_FILE | MUTT_CLEAR) != 0)
- {
- mutt_buffer_pool_release (&tmp);
- return -1;
- }
- mutt_buffer_fix_dptr (tmp);
- if (!mutt_buffer_len (tmp))
+ if ((mutt_buffer_get_field (_("File under directory: "), tmp,
+ MUTT_FILE | MUTT_CLEAR) != 0) ||
+ !mutt_buffer_len (tmp))
{
mutt_buffer_pool_release (&tmp);
return (-1);
buf = mutt_buffer_pool_get ();
mutt_buffer_strcpy (buf, NONULL (Context->pattern));
- if (mutt_get_field (prompt, buf->data, buf->dsize, MUTT_PATTERN | MUTT_CLEAR) != 0 ||
- !(mutt_b2s (buf)[0]))
+ if ((mutt_buffer_get_field (prompt, buf, MUTT_PATTERN | MUTT_CLEAR) != 0) ||
+ !mutt_buffer_len (buf))
{
mutt_buffer_pool_release (&buf);
return (-1);
}
- mutt_buffer_fix_dptr (buf);
mutt_message _("Compiling search pattern...");
prompt = _("Save to file: ");
while (prompt)
{
- if (mutt_get_field (prompt, buf->data, buf->dsize, MUTT_FILE | MUTT_CLEAR) != 0)
- {
- mutt_clear_error ();
- goto cleanup;
- }
- mutt_buffer_fix_dptr (buf);
- if (!mutt_buffer_len (buf))
+ if ((mutt_buffer_get_field (prompt, buf, MUTT_FILE | MUTT_CLEAR) != 0) ||
+ !mutt_buffer_len (buf))
goto cleanup;
prompt = NULL;
mutt_buffer_strcpy (buf, mutt_basename (NONULL (top->filename)));
prepend_curdir (buf);
- 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_len (buf))
- goto cleanup;
+ if ((mutt_buffer_get_field (_("Save to file: "), buf,
+ MUTT_FILE | MUTT_CLEAR) != 0) ||
+ !mutt_buffer_len (buf))
+ goto cleanup;
mutt_buffer_expand_path (buf);
if (mutt_check_overwrite (top->filename, mutt_b2s (buf), tfile,
&append, NULL))