+/**
+ * resizable string buffer
+ *
+ * (c) 2017-2020 Steve Bennett <steveb@workware.net.au>
+ *
+ * See utf8.c for licence details.
+ */
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <assert.h>
+#ifndef STRINGBUF_H
#include "stringbuf.h"
+#endif
#ifdef USE_UTF8
+#ifndef UTF8_UTIL_H
#include "utf8.h"
#endif
+#endif
#define SB_INCREMENT 200
void sb_append_len(stringbuf *sb, const char *str, int len)
{
- int utf8_strlen(const char *str, int bytelen);
if (sb->remaining < len + 1) {
sb_realloc(sb, sb->last + len + 1 + SB_INCREMENT);
}