src/ccodegen.c

changeset 31
50ae611a785c
parent 29
ec6e97454e64
child 35
abaf2489c549
     1.1 --- a/src/ccodegen.c	Fri May 29 14:32:02 2015 +0200
     1.2 +++ b/src/ccodegen.c	Wed Feb 10 12:34:31 2016 +0100
     1.3 @@ -51,18 +51,14 @@
     1.4                                      dp += sizeof(str)-1
     1.5  
     1.6  void cparseline(char *src, char *dest, highlighter_t *hltr) {
     1.7 -    size_t sp = 0, dp = 0;
     1.8 -    /* indent */
     1.9 -    while (isspace(src[sp])) {
    1.10 -        dest[dp++] = src[sp++];
    1.11 -    }
    1.12  
    1.13      memset(hltr->word, 0, WORDBUF_SIZE);
    1.14 -    size_t wp = 0, ifp = 0;
    1.15 +    size_t wp = 0, ifp = 0, sp = 0, dp = 0;
    1.16      int isstring = 0, iscomment = 0, isinclude = 0, parseinclude = 0;
    1.17      char quote = '\0';
    1.18      int isescaping = 0;
    1.19 -
    1.20 +    
    1.21 +    /* continue a multi line comment highlighting */
    1.22      if (hltr->iscommentml) {
    1.23          iscomment = 1;
    1.24          memcpy_const(dest, dp, "<span class=\"c2html-comment\">");

mercurial