diff options
author | Kevin McCarthy <kevin@8t8.us> | 2019-09-19 18:52:24 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2019-09-19 19:14:03 -0700 |
commit | 192a6d0ebe7d303b5a340a5334ada58bd5e509a6 (patch) | |
tree | e4deaa91bcb4cea9065460fbb1fae14bbd002c74 /buffer.c | |
parent | a4b53e19ef471efc1938348d1623b811354f1c93 (diff) |
Convert mutt_complete() to use the buffer pool.
Add helper functions mutt_buffer_substrcpy() and
mutt_buffer_concatn_path().
Remove mutt_concatn_path() because mutt_complete() was the only
caller.
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -208,6 +208,12 @@ void mutt_buffer_strcpy_n (BUFFER *buf, const char *s, size_t len) mutt_buffer_addstr_n (buf, s, len); } +void mutt_buffer_substrcpy (BUFFER *buf, const char *beg, const char *end) +{ + mutt_buffer_clear (buf); + if (end > beg) + mutt_buffer_strcpy_n (buf, beg, end - beg); +} static void increase_buffer_pool (void) { |