2 * Copyright (C) 2010 Diego Hernan Borghetti.
8 typedef struct _E_Syntax_Word
{
9 struct _E_Syntax_Word
*next
;
10 struct _E_Syntax_Word
*prev
;
12 /* the character's for this word (or only one). */
15 /* number of characters. */
18 /* color to apply, foreground and background. */
23 typedef struct _E_Syntax_Char
{
24 struct _E_Syntax_Char
*next
;
25 struct _E_Syntax_Char
*prev
;
30 /* color to apply, foreground and background. */
35 typedef struct _E_Syntax
{
36 struct _E_Syntax
*next
;
37 struct _E_Syntax
*prev
;
42 /* Function to check the file type.
43 * The argument is the file extension or NULL!
44 * return zero on success or different that zero otherwise.
46 int (*check_type
)(char *);
48 /* the dictionary of word's. */
51 /* and only character, for second round. */
55 E_Syntax
*e_syntax_search(char *ext
);
56 void e_syntax_add(E_Syntax
*sy
);
57 void e_syntax_rem(E_Syntax
*sy
);
58 E_Syntax
*e_syntax_new(void);
59 void e_syntax_free(E_Syntax
*sy
);
60 void e_syntax_word_add(E_Syntax
*sy
, char *word
, char fg
, char bg
);
61 void e_syntax_char_add(E_Syntax
*sy
, char ch
, char fg
, char bg
);
62 void e_syntax_apply(E_Syntax
*sy
, E_ScreenLine
*ln
, int ncol
);
64 #endif /* _ECO_SYNTAX_H */