48 } |
48 } |
49 |
49 |
50 #define memcpy_const(darr,doff,str) memcpy(&(darr[doff]), str, sizeof(str)-1); \ |
50 #define memcpy_const(darr,doff,str) memcpy(&(darr[doff]), str, sizeof(str)-1); \ |
51 dp += sizeof(str)-1 |
51 dp += sizeof(str)-1 |
52 |
52 |
53 void cparseline(char *src, char *dest, highlighter_t *hltr) { |
53 void cparseline(char *src, UcxBuffer *destbuf, highlighter_t *hltr) { |
|
54 /* TODO: workaround for using old code with UcxBuffer */ |
|
55 char *dest = destbuf->space + destbuf->pos; |
54 |
56 |
55 memset(hltr->word, 0, WORDBUF_SIZE); |
57 memset(hltr->word, 0, WORDBUF_SIZE); |
56 size_t wp = 0, ifp = 0, sp = (size_t)-1, dp = 0; |
58 size_t wp = 0, ifp = 0, sp = (size_t)-1, dp = 0; |
57 int isstring = 0, iscomment = 0, isinclude = 0, parseinclude = 0; |
59 int isstring = 0, iscomment = 0, isinclude = 0, parseinclude = 0; |
58 char quote = '\0'; |
60 char quote = '\0'; |