strbuf: export strbuf_addchars()

Move strbuf_addchars() to strbuf.c, where it belongs, and make it
available for other callers.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe
2014-09-07 09:03:32 +02:00
committed by Junio C Hamano
parent e6aaa39347
commit d07235a027
4 changed files with 12 additions and 7 deletions

7
utf8.c
View File

@ -302,13 +302,6 @@ int is_utf8(const char *text)
return 1;
}
static void strbuf_addchars(struct strbuf *sb, int c, size_t n)
{
strbuf_grow(sb, n);
memset(sb->buf + sb->len, c, n);
strbuf_setlen(sb, sb->len + n);
}
static void strbuf_add_indented_text(struct strbuf *buf, const char *text,
int indent, int indent2)
{