src/c2html.c

changeset 47
c39ecbbca7c0
parent 46
534a4ef4143d
child 48
b2724c711203
--- a/src/c2html.c	Tue Aug 23 15:55:02 2016 +0200
+++ b/src/c2html.c	Tue Aug 23 16:34:02 2016 +0200
@@ -48,7 +48,7 @@
 }
 
 /* TODO: remove this workaround after refactoring highlighter structure */
-static void plainparseline(char *src, UcxBuffer *dest, HighlighterData* hltr) {
+static void plainparseline(char *src, UcxBuffer *dest, int* x) {
     size_t dp = 0;
     char *buf = dest->space + dest->pos;
     while (*src && *src != '\n') {
@@ -84,8 +84,7 @@
 
     /* process lines */
     size_t lineno = 0;
-    HighlighterData highlighter_data;
-    memset(&highlighter_data, 0, sizeof(HighlighterData));
+    int multiline_comment = 0;
     
     UCX_FOREACH(sourceline, in) {
         /* increase line number and clean line buffer */
@@ -100,7 +99,7 @@
         }
         
         /* process code line */
-        highlighter(sourceline->data, line, &highlighter_data);
+        highlighter(sourceline->data, line, &multiline_comment);
         
         /* write code line */
         out(line->space, 1, line->size, stream);
@@ -174,7 +173,7 @@
         printhelp();
         return EXIT_FAILURE;
     } else {
-        /* Configure highlighter */
+        /* Choose highlighter */
         highlighter_func hltr = NULL;
         switch (sourcetype) {
             case SOURCE_C:

mercurial