src/c2html.c

changeset 70
60cecca5e484
parent 67
5da2cb5aea6b
child 71
d5af9261231d
--- a/src/c2html.c	Sun Jun 11 14:05:28 2023 +0200
+++ b/src/c2html.c	Sun Jun 11 15:16:48 2023 +0200
@@ -31,6 +31,7 @@
 
 #include <cx/array_list.h>
 #include <cx/printf.h>
+#include <string.h>
 
 size_t c2html_format(
         CxList const *lines,
@@ -92,15 +93,15 @@
     return written;
 }
 
-size_t c2html_bformat(
+size_t c2html_textformat(
         char const *inputbuffer,
-        size_t inputbuflen,
         void *outbuf,
         cx_write_func wfnc,
         c2html_highlighter_func highlighter,
         int showln
 ) {
     /* a rough estimate for the number of lines */
+    size_t inputbuflen = strlen(inputbuffer);
     size_t est_cap = 16 + inputbuflen / 40;
 
     /* create the line pointer array */

mercurial