fixed highlighting for java

Wed, 10 Jul 2013 18:12:13 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 10 Jul 2013 18:12:13 +0200
changeset 18
5085b57e3fd6
parent 17
7ea86024aef0
child 19
2e812df2b231

fixed highlighting for java

src/c2html.c file | annotate | diff | comparison | revisions
--- a/src/c2html.c	Wed Jul 10 17:57:03 2013 +0200
+++ b/src/c2html.c	Wed Jul 10 18:12:13 2013 +0200
@@ -35,7 +35,7 @@
 #include <ctype.h>
 
 #define INPUTBUF_SIZE 2048
-#define WORDBUF_SIZE 16
+#define WORDBUF_SIZE 64
 
 const char* ckeywords[] = {
   "auto", "break", "case", "char", "const", "continue", "default", "do", 
@@ -55,6 +55,8 @@
   "volatile", "const", "float", "native", "super", "while", NULL
 };
 
+#define iswordcharacter(c) (isalnum(c) || c=='_' || c=='#' || c=='@')
+
 int isctype(char *word, size_t len) {
   return (word[len-2] == '_' && word[len-1] == 't');
 }
@@ -288,7 +290,7 @@
       } else {
         if (isstring) {
           dp = writeescapedchar(dest, dp, c);
-        } else if (!isalnum(c) && c!='_' && c!='#' && c!='.' && c!='@') {
+        } else if (!iswordcharacter(c)) {
           /* interpret word int_t */
           if (wp > 0 && wp < WORDBUF_SIZE) {
             int closespan = 1;

mercurial