diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/editor.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/editor.cxx b/test/editor.cxx index eb45de7aa..478bd3ebe 100644 --- a/test/editor.cxx +++ b/test/editor.cxx @@ -57,6 +57,15 @@ const int line_num_width = 75; Fl_Text_Buffer *stylebuf = 0; Fl_Text_Display::Style_Table_Entry styletable[] = { // Style table +#ifdef TESTING_ATTRIBUTES + { FL_BLACK, FL_COURIER, TS }, // A - Plain + { FL_DARK_GREEN, FL_HELVETICA_ITALIC, TS, Fl_Text_Display::ATTR_BGCOLOR, FL_LIGHT2 }, // B - Line comments + { FL_DARK_GREEN, FL_HELVETICA_ITALIC, TS, Fl_Text_Display::ATTR_BGCOLOR_EXT, FL_LIGHT2 }, // C - Block comments + { FL_BLUE, FL_COURIER, TS, Fl_Text_Display::ATTR_UNDERLINE }, // D - Strings + { FL_DARK_RED, FL_COURIER, TS, Fl_Text_Display::ATTR_GRAMMAR }, // E - Directives + { FL_DARK_RED, FL_COURIER_BOLD, TS, Fl_Text_Display::ATTR_STRIKE_THROUGH }, // F - Types + { FL_BLUE, FL_COURIER_BOLD, TS, Fl_Text_Display::ATTR_SPELLING }, // G - Keywords +#else { FL_BLACK, FL_COURIER, TS }, // A - Plain { FL_DARK_GREEN, FL_HELVETICA_ITALIC, TS }, // B - Line comments { FL_DARK_GREEN, FL_HELVETICA_ITALIC, TS }, // C - Block comments @@ -64,6 +73,7 @@ Fl_Text_Display::Style_Table_Entry { FL_DARK_RED, FL_COURIER, TS }, // E - Directives { FL_DARK_RED, FL_COURIER_BOLD, TS }, // F - Types { FL_BLUE, FL_COURIER_BOLD, TS }, // G - Keywords +#endif }; const char *code_keywords[] = { // List of known C/C++ keywords... "and", @@ -188,7 +198,6 @@ style_parse(const char *text, } else if (strncmp(text, "//", 2) == 0) { current = 'B'; for (; length > 0 && *text != '\n'; length --, text ++) *style++ = 'B'; - if (length == 0) break; } else if (strncmp(text, "/*", 2) == 0) { current = 'C'; |
