|
|
@@ -144,9 +144,9 @@ static void highlight_cpp (void) { |
|
|
|
|
|
|
|
highlighted = 1; |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
static void highlight_python (void) { |
|
|
|
char * separators = ".,:<=>+-*/%!&~^?|()[]'\" \t\r\n"; |
|
|
|
char * separators = ".,:<=>+*-/%!&~^?|()[]'\" \t\r\n"; |
|
|
|
|
|
|
|
char * keywords [35] = { |
|
|
|
"False", "await", "else", "import", "pass", "None", "break", "except", |
|
|
@@ -173,7 +173,7 @@ static void highlight_python (void) { |
|
|
|
|
|
|
|
highlighted = 1; |
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
int main (int argc, char * * argv) { |
|
|
|
int offset = 0; |
|
|
|
int select = 0; |
|
|
@@ -215,14 +215,14 @@ int main (int argc, char * * argv) { |
|
|
|
select = syntax_select (& buffer [offset], & length); |
|
|
|
|
|
|
|
if (select >= syntax_count) { |
|
|
|
terminal_style (EFFECT_REVERSE, COLOUR_RED); |
|
|
|
terminal_colour (COLOUR_RED, EFFECT_REVERSE); |
|
|
|
} else { |
|
|
|
terminal_style (syntax_effect [select], syntax_colour [select]); |
|
|
|
terminal_colour (syntax_colour [select], syntax_effect [select]); |
|
|
|
} |
|
|
|
|
|
|
|
out (& buffer [offset], length); |
|
|
|
|
|
|
|
terminal_style (-1, -1); |
|
|
|
terminal_cancel (); |
|
|
|
} |
|
|
|
|
|
|
|
buffer = deallocate (buffer); |
|
|
|