]> git.lizzy.rs Git - linenoise.git/blobdiff - stringbuf.c
Accept linefeed as enter
[linenoise.git] / stringbuf.c
index acac04c9d3d95974192fec0a36ad6115829cedd8..f83c1b8d54fee7c3964ad68a208c7f0f68db1905 100644 (file)
@@ -4,7 +4,9 @@
 #include <ctype.h>
 #include <assert.h>
 
+#ifndef STRINGBUF_H
 #include "stringbuf.h"
+#endif
 #ifdef USE_UTF8
 #include "utf8.h"
 #endif
@@ -45,7 +47,6 @@ void sb_append(stringbuf *sb, const char *str)
 
 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);
        }