--- a/src/javacodegen.c Tue Aug 23 15:28:56 2016 +0200 +++ b/src/javacodegen.c Tue Aug 23 15:55:02 2016 +0200 @@ -41,18 +41,10 @@ "volatile", "const", "float", "native", "super", "while", NULL }; -int check_jtype(char *word, size_t len) { - return isupper(word[0]); -} - -int check_jdirective(char *word) { - return word[0] == '@'; -} - #define memcpy_const(darr,doff,str) memcpy(&(darr[doff]), str, sizeof(str)-1); \ dp += sizeof(str)-1 -void jparseline(char *src, UcxBuffer *destbuf, highlighter_t *hltr) { +void jparseline(char *src, UcxBuffer *destbuf, HighlighterData *hltr) { /* TODO: workaround for using old code with UcxBuffer */ char *dest = destbuf->space + destbuf->pos; @@ -119,13 +111,13 @@ /* interpret word int_t */ if (wp > 0 && wp < WORDBUF_SIZE) { int closespan = 1; - if (check_keyword(hltr->word, hltr->keywords)) { + if (check_keyword(hltr->word, jkeywords)) { memcpy_const(dest, dp, "<span class=\"c2html-keyword\">"); - } else if (hltr->istype(hltr->word, wp)) { + } else if (isupper(hltr->word[0])) { memcpy_const(dest, dp, "<span class=\"c2html-type\">"); - } else if (hltr->isdirective(hltr->word)) { + } else if (hltr->word[0] == '@') { memcpy_const(dest, dp, "<span class=\"c2html-directive\">"); } else if (check_capsonly(hltr->word, wp)) {