summaryrefslogtreecommitdiff
path: root/test/editor.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2010-11-14 15:57:49 +0000
committerMatthias Melcher <fltk@matthiasm.com>2010-11-14 15:57:49 +0000
commit917e5991db9d12f7428e4f8869b94dcfd1e104ef (patch)
tree058a1c4c255d55241a0b8cc1ceead44e5769a6b7 /test/editor.cxx
parent1725a8546852cc52196e49eca2aae8c847c1f834 (diff)
Removed UTF-8 codes that would make the SGI compiler crash. STR 2439.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7828 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test/editor.cxx')
-rw-r--r--test/editor.cxx70
1 files changed, 7 insertions, 63 deletions
diff --git a/test/editor.cxx b/test/editor.cxx
index cd4efa86e..6f4b15b59 100644
--- a/test/editor.cxx
+++ b/test/editor.cxx
@@ -65,14 +65,13 @@ Fl_Text_Buffer *textbuf = 0;
Fl_Text_Buffer *stylebuf = 0;
Fl_Text_Display::Style_Table_Entry
styletable[] = { // Style table
- { 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
- { FL_BLUE, FL_COURIER, TS }, // D - Strings
- { 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
- { FL_MAGENTA, FL_HELVETICA, TS-2 } // H - Font height test
+ { 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
+ { FL_BLUE, FL_COURIER, TS }, // D - Strings
+ { 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
};
const char *code_keywords[] = { // List of known C/C++ keywords...
"and",
@@ -201,8 +200,6 @@ style_parse(const char *text,
if (length == 0) break;
} else if (strncmp(text, "/*", 2) == 0) {
current = 'C';
- } else if (strncmp(text, "[", 1) == 0) {
- current = 'H';
} else if (strncmp(text, "\\\"", 2) == 0) {
// Quoted quote...
*style++ = current;
@@ -264,14 +261,6 @@ style_parse(const char *text,
current = 'A';
col += 2;
continue;
- } else if (current == 'H' && strncmp(text, "]", 1) == 0) {
- // Close a font test style
- *style++ = current;
- text ++;
- length --;
- current = 'A';
- col += 1;
- continue;
} else if (current == 'D') {
// Continuing in string...
if (strncmp(text, "\\\"", 2) == 0) {
@@ -805,51 +794,6 @@ Fl_Window* new_view() {
int main(int argc, char **argv) {
textbuf = new Fl_Text_Buffer;
-#if 1
- textbuf->text(
- "void saveas_cb() {\n"
- " Fl_Native_File_Chooser fnfc;\n"
- " fnfc.title(\"Save File As?\");\n"
- " fnfc.type(Fl_Native_File_Chooser::BROWSE_SAVE_FILE);\n"
- " if ( fnfc.show() ) return;\n"
- " save_file(fnfc.filename());\n"
- "}\n\n"
- " 2 4 6 8 0 2 4 6 8 0 2 4 6 8 0 2 4 6 8 0\n\n"
- "// Falsches Üben von Xylophonmusik quält jeden größeren Zwerg\n"
- "// (= Wrongful practicing of xylophone music tortures every larger dwarf)\n"
- "\n"
- "// Zwölf Boxkämpfer jagten Eva quer über den Sylter Deich\n"
- "// (= Twelve boxing fighters hunted Eva across the dike of Sylt)\n"
- "\n"
- "Heizöl/*rückstoß*/abdämpfung\n"
- "(= fuel oil recoil absorber)\n"
- "\n"
- "Hiragana: //(Iroha)\n"
- "\n"
- "いろはにほへとちりぬるを\n"
- "わかよたれそつねならむ\n"
- "うゐのおくやまけふこえて\n"
- "あさきゆめみしゑひもせす\n"
- "\n"
- "Katakana:\n"
- "\n"
- "イロハニホヘト チ/*リヌルヲ ワカヨタ*/レソ ツネナラム\n"
- "ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン\n"
- "\n"
- "Right-to-left script does not work yet:\n"
- "? דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה\n"
- "\n"
- "// いろはにほへと ちりぬるを わかよ\n"
- "/* たれそ つねならむ うゐのおくやま */\n"
- "けふこえて あさきゆめみし ゑひも\n"
- "せす\n\n"
- "Even colours and [sweet perfume] / Will eventually fade / "
- "Even our world / Is not eternal / "
- "The deep mountains of vanity / Cross them today / "
- "And superficial dreams / Shall no longer delude you.\n"
- "(from Iroha-uta)"
- );
-#endif
style_init();
Fl_Window* window = new_view();