diff -r f86f0b054464 -r 17408c3607ce src/c2html.c
--- a/src/c2html.c Tue Aug 23 17:31:15 2016 +0200
+++ b/src/c2html.c Thu Aug 25 11:30:30 2016 +0200
@@ -53,7 +53,7 @@
ucx_buffer_putc(dest, '\n');
}
-int formatlines(highlighter_func highlighter,
+void formatlines(highlighter_func highlighter,
UcxList *in, write_func out, void *stream, int showlineno) {
/* compute width of line numbering */
@@ -68,7 +68,8 @@
/* allocate line buffer */
UcxBuffer *line = ucx_buffer_new(NULL, 1024, UCX_BUFFER_AUTOEXTEND);
if(!line) {
- return 1;
+ perror("Error allocating line buffer for output");
+ return;
}
/* start monospace formatting */
@@ -93,7 +94,7 @@
/* process code line */
highlighter(sourceline->data, line, &multiline_comment);
- /* write code line and reset buffer */
+ /* write code line */
out(line->space, 1, line->size, stream);
}
@@ -102,7 +103,6 @@
/* cleanup and return */
ucx_buffer_free(line);
- return 0;
}
#define FILEBUF_SIZE 4096