}
else
{
- mutt_buffer_add(&buf, s, holelen);
+ mutt_buffer_addstr_n(&buf, s, holelen);
}
}
s += holelen;
}
/**
- * mutt_buffer_add - Add a string to a Buffer, expanding it if necessary
+ * mutt_buffer_addstr_n - Add a string to a Buffer, expanding it if necessary
* @param buf Buffer to add to
* @param s String to add
* @param len Length of the string
* Always one byte bigger than necessary for the null terminator, and the
* buffer is always NUL-terminated
*/
-size_t mutt_buffer_add(struct Buffer *buf, const char *s, size_t len)
+size_t mutt_buffer_addstr_n(struct Buffer *buf, const char *s, size_t len)
{
if (!buf || !s)
return 0;
{
if (!buf || !s)
return 0;
- return mutt_buffer_add(buf, s, mutt_str_strlen(s));
+ return mutt_buffer_addstr_n(buf, s, mutt_str_strlen(s));
}
/**
{
if (!buf)
return 0;
- return mutt_buffer_add(buf, &c, 1);
+ return mutt_buffer_addstr_n(buf, &c, 1);
}
/**
#define MoreArgs(buf) (*buf->dptr && (*buf->dptr != ';') && (*buf->dptr != '#'))
-size_t mutt_buffer_add (struct Buffer *buf, const char *s, size_t len);
size_t mutt_buffer_addch (struct Buffer *buf, char c);
size_t mutt_buffer_addstr (struct Buffer *buf, const char *s);
+size_t mutt_buffer_addstr_n (struct Buffer *buf, const char *s, size_t len);
int mutt_buffer_add_printf (struct Buffer *buf, const char *fmt, ...);
struct Buffer *mutt_buffer_alloc (size_t size);
void mutt_buffer_fix_dptr (struct Buffer *buf);