src/codegens.h

changeset 47
c39ecbbca7c0
parent 46
534a4ef4143d
child 48
b2724c711203
--- a/src/codegens.h	Tue Aug 23 15:55:02 2016 +0200
+++ b/src/codegens.h	Tue Aug 23 16:34:02 2016 +0200
@@ -31,26 +31,21 @@
 #define	CODEGENS_H
 
 #include <stdio.h>
+#include "ucx/string.h"
 #include "ucx/buffer.h"
 
 #ifdef	__cplusplus
 extern "C" {
 #endif
 
-#define WORDBUF_SIZE 64
+#define WORDBUF_SIZE 256
 
-typedef struct {
-    int iscommentml;
-    char word[WORDBUF_SIZE];
-    char includefile[FILENAME_MAX];
-} HighlighterData;
-
-typedef void(*highlighter_func)(char*,UcxBuffer*,HighlighterData*);
+typedef void(*highlighter_func)(char*,UcxBuffer*,int*);
 
 #define iswordcharacter(c) (isalnum(c) || c=='_' || c=='#' || c=='@')
 size_t writeescapedchar(char *dest, size_t dp, char c);
-int check_keyword(char *word, const char** keywords);
-int check_capsonly(char *word, size_t wp);
+int check_keyword(sstr_t word, const char** keywords);
+int check_capsonly(sstr_t word);
 
 
 #ifdef	__cplusplus

mercurial