diff --git a/xyntax.c b/xyntax.c index 8cc5968..2defdd3 100644 --- a/xyntax.c +++ b/xyntax.c @@ -144,28 +144,28 @@ void syntax_define_separators (char * separator) { syntax_separator = separator; } -void syntax_define_default (int string_colour, int string_effect, int number_colour, int number_effect) { +void syntax_define_default (int case_sensitive, int string_colour, int string_effect, int number_colour, int number_effect) { (void) syntax_insert (1, 0, " \t\r\n", "", '\0', COLOUR_WHITE, EFFECT_BOLD); (void) syntax_insert (0, 0, "\"", "\"", '\\', string_colour, string_effect); (void) syntax_insert (1, 1, "0123456789", syntax_separator, '\0', number_colour, number_effect); -} - -void syntax_define_words (int case_sensitive, char * * word_array, int word_count, int word_colour, int word_effect) { - int word = 0; - - for (word = 0; word != word_count; ++word) { - (void) syntax_insert (0, 1, word_array [word], syntax_separator, '\0', word_colour, word_effect); - } if (case_sensitive != 0) { (void) syntax_insert (1, 1, "abcdefghijklmnopqrstuvwxyz", syntax_separator, '\0', COLOUR_WHITE, EFFECT_NORMAL); (void) syntax_insert (1, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", syntax_separator, '\0', COLOUR_WHITE, EFFECT_BOLD); - (void) syntax_insert (1, 1, "_", syntax_separator, '\0', COLOUR_PINK, EFFECT_BOLD); + (void) syntax_insert (1, 1, "_", syntax_separator, '\0', COLOUR_GREY, EFFECT_BOLD); } else { (void) syntax_insert (1, 1, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_", syntax_separator, '\0', COLOUR_WHITE, EFFECT_NORMAL); } } +void syntax_define_words (char * * word_array, int word_count, int word_colour, int word_effect) { + int word = 0; + + for (word = 0; word != word_count; ++word) { + (void) syntax_insert (0, 1, word_array [word], syntax_separator, '\0', word_colour, word_effect); + } +} + void syntax_define_range (char * range_begin, char * range_end, char range_escape, int range_colour, int range_effect) { (void) syntax_insert (0, 0, range_begin, range_end, range_escape, range_colour, range_effect); } diff --git a/xyntax.h b/xyntax.h index 69accd6..1e8ceab 100644 --- a/xyntax.h +++ b/xyntax.h @@ -33,9 +33,9 @@ extern void syntax_define_style (int *, int *); extern void syntax_define_separators (char *); -extern void syntax_define_default (int, int, int, int); +extern void syntax_define_default (int, int, int, int, int); -extern void syntax_define_words (int, char * *, int, int, int); +extern void syntax_define_words (char * *, int, int, int); extern void syntax_define_range (char *, char *, char, int, int);