I forgot what I changed...
This commit is contained in:
parent
faeb775aeb
commit
03be30aef6
46
xighlight.c
46
xighlight.c
@ -67,7 +67,7 @@ static void highlight_c (void) {
|
||||
|
||||
syntax_define_operators (".,:;<=>+*-/%!&~^?|()[]{}", COLOUR_BLUE, EFFECT_BOLD);
|
||||
|
||||
syntax_define_words (keywords, 32, COLOUR_BLUE, EFFECT_NORMAL);
|
||||
syntax_define_words (1, keywords, 32, COLOUR_BLUE, EFFECT_NORMAL);
|
||||
|
||||
highlighted = 1;
|
||||
}
|
||||
@ -101,7 +101,7 @@ static void highlight_ada (void) {
|
||||
|
||||
syntax_define_operators (".,:;<=>+-*/&|()'", COLOUR_BLUE, EFFECT_BOLD);
|
||||
|
||||
syntax_define_words (keywords, 73, COLOUR_BLUE, EFFECT_NORMAL);
|
||||
syntax_define_words (0, keywords, 73, COLOUR_BLUE, EFFECT_NORMAL);
|
||||
|
||||
highlighted = 1;
|
||||
}
|
||||
@ -140,7 +140,7 @@ static void highlight_cpp (void) {
|
||||
|
||||
syntax_define_operators (".,:;<=>+*-/%!&~^?|()[]{}", COLOUR_BLUE, EFFECT_BOLD);
|
||||
|
||||
syntax_define_words (keywords, 102, COLOUR_BLUE, EFFECT_NORMAL);
|
||||
syntax_define_words (1, keywords, 102, COLOUR_BLUE, EFFECT_NORMAL);
|
||||
|
||||
highlighted = 1;
|
||||
}
|
||||
@ -169,22 +169,50 @@ static void highlight_python (void) {
|
||||
|
||||
syntax_define_operators (".,:<=>+*-/%!&~^?|()[]", COLOUR_BLUE, EFFECT_BOLD);
|
||||
|
||||
syntax_define_words (keywords, 35, COLOUR_BLUE, EFFECT_NORMAL);
|
||||
syntax_define_words (0, keywords, 35, COLOUR_BLUE, EFFECT_NORMAL);
|
||||
|
||||
highlighted = 1;
|
||||
}
|
||||
*/
|
||||
static void highlight_valgrind (void) {
|
||||
char * separators = "./-=?() \t\r\n";
|
||||
|
||||
char * keywords [1] = {
|
||||
"Invalid"
|
||||
};
|
||||
|
||||
if (highlighted != 0) {
|
||||
syntax_delete ();
|
||||
}
|
||||
|
||||
syntax_define_separators (separators);
|
||||
|
||||
syntax_define_default (COLOUR_RED, EFFECT_NORMAL, COLOUR_CYAN, EFFECT_BOLD);
|
||||
|
||||
syntax_define_range ("==", "==", '\0', COLOUR_GREY, EFFECT_BOLD);
|
||||
syntax_define_range ("(", ")", '\0', COLOUR_PINK, EFFECT_NORMAL);
|
||||
syntax_define_range ("???", "\n", '\0', COLOUR_RED, EFFECT_BOLD);
|
||||
|
||||
syntax_define_operators ("./-:", COLOUR_BLUE, EFFECT_BOLD);
|
||||
|
||||
syntax_define_words (0, keywords, 1, COLOUR_BLUE, EFFECT_NORMAL);
|
||||
|
||||
highlighted = 1;
|
||||
}
|
||||
|
||||
int main (int argc, char * * argv) {
|
||||
int offset = 0;
|
||||
int select = 0;
|
||||
int length = 0;
|
||||
char * buffer = NULL;
|
||||
|
||||
argument_define ("-v", "--version", echo_version);
|
||||
argument_define ("-l", "--license", echo_license);
|
||||
argument_define ("-c", "--c", highlight_c);
|
||||
argument_define ("-a", "--ada", highlight_ada);
|
||||
argument_define ("-C", "--c++", highlight_cpp);
|
||||
argument_define ("-v", "--version", echo_version);
|
||||
argument_define ("-l", "--license", echo_license);
|
||||
argument_define ("-c", "--c", highlight_c);
|
||||
argument_define ("-a", "--ada", highlight_ada);
|
||||
argument_define ("-C", "--c++", highlight_cpp);
|
||||
/*argument_define ("-p", "--python", highlight_python);*/
|
||||
argument_define ("-V", "--valgrind", highlight_valgrind);
|
||||
|
||||
if (argc != 1) {
|
||||
argument_select (argc, argv);
|
||||
|
Loading…
Reference in New Issue
Block a user