Changed definitions...

This commit is contained in:
Ognjen Milan Robovic 2023-10-07 02:45:38 -04:00
parent 55709e823a
commit 10b97692d0
2 changed files with 12 additions and 12 deletions

View File

@ -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);
}

View File

@ -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);