src/codegens.h

changeset 47
c39ecbbca7c0
parent 46
534a4ef4143d
child 48
b2724c711203
     1.1 --- a/src/codegens.h	Tue Aug 23 15:55:02 2016 +0200
     1.2 +++ b/src/codegens.h	Tue Aug 23 16:34:02 2016 +0200
     1.3 @@ -31,26 +31,21 @@
     1.4  #define	CODEGENS_H
     1.5  
     1.6  #include <stdio.h>
     1.7 +#include "ucx/string.h"
     1.8  #include "ucx/buffer.h"
     1.9  
    1.10  #ifdef	__cplusplus
    1.11  extern "C" {
    1.12  #endif
    1.13  
    1.14 -#define WORDBUF_SIZE 64
    1.15 +#define WORDBUF_SIZE 256
    1.16  
    1.17 -typedef struct {
    1.18 -    int iscommentml;
    1.19 -    char word[WORDBUF_SIZE];
    1.20 -    char includefile[FILENAME_MAX];
    1.21 -} HighlighterData;
    1.22 -
    1.23 -typedef void(*highlighter_func)(char*,UcxBuffer*,HighlighterData*);
    1.24 +typedef void(*highlighter_func)(char*,UcxBuffer*,int*);
    1.25  
    1.26  #define iswordcharacter(c) (isalnum(c) || c=='_' || c=='#' || c=='@')
    1.27  size_t writeescapedchar(char *dest, size_t dp, char c);
    1.28 -int check_keyword(char *word, const char** keywords);
    1.29 -int check_capsonly(char *word, size_t wp);
    1.30 +int check_keyword(sstr_t word, const char** keywords);
    1.31 +int check_capsonly(sstr_t word);
    1.32  
    1.33  
    1.34  #ifdef	__cplusplus

mercurial