diff --git a/liblwgeom/stringbuffer.c b/liblwgeom/stringbuffer.c index d6d68c902..bd65099be 100644 --- a/liblwgeom/stringbuffer.c +++ b/liblwgeom/stringbuffer.c @@ -114,32 +114,16 @@ char stringbuffer_lastchar(stringbuffer_t *s) return *(s->str_end - 1); } -/** -* Append the specified string to the stringbuffer_t, using the given length -*/ -void stringbuffer_append_with_size(stringbuffer_t *s, const char *a, size_t alen) -{ - int alen0 = alen + 1; /* Length including null terminator */ - stringbuffer_makeroom(s, alen0); - memcpy(s->str_end, a, alen0); - s->str_end += alen; -} - /** * Append the specified string to the stringbuffer_t. */ void stringbuffer_append(stringbuffer_t *s, const char *a) { int alen = strlen(a); /* Length of string to append */ - stringbuffer_append_with_size(s, a, alen); -} - -/** -* Append the specified single character to the stringbuffer_t. -*/ -void stringbuffer_append_char(stringbuffer_t *s, const char *a) -{ - stringbuffer_append_with_size(s, a, 1); + int alen0 = alen + 1; /* Length including null terminator */ + stringbuffer_makeroom(s, alen0); + memcpy(s->str_end, a, alen0); + s->str_end += alen; } /** diff --git a/liblwgeom/stringbuffer.h b/liblwgeom/stringbuffer.h index 127d421a2..e6348692f 100644 --- a/liblwgeom/stringbuffer.h +++ b/liblwgeom/stringbuffer.h @@ -59,8 +59,6 @@ extern void stringbuffer_clear(stringbuffer_t *sb); void stringbuffer_set(stringbuffer_t *sb, const char *s); void stringbuffer_copy(stringbuffer_t *sb, stringbuffer_t *src); extern void stringbuffer_append(stringbuffer_t *sb, const char *s); -extern void stringbuffer_append_char(stringbuffer_t *s, const char *a); -extern void stringbuffer_append_with_size(stringbuffer_t *sb, const char *s, size_t s_size); extern int stringbuffer_aprintf(stringbuffer_t *sb, const char *fmt, ...); extern const char *stringbuffer_getstring(stringbuffer_t *sb); extern char *stringbuffer_getstringcopy(stringbuffer_t *sb);