diff options
| -rw-r--r-- | src/fl_draw.cxx | 6 | ||||
| -rw-r--r-- | src/fl_shortcut.cxx | 12 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx index 637744c4f..762a33b47 100644 --- a/src/fl_draw.cxx +++ b/src/fl_draw.cxx @@ -95,7 +95,11 @@ expand(const char* from, char* buf, double maxw, int& n, double &width, } else if (c < ' ' || c == 127) { // ^X *o++ = '^'; *o++ = c ^ 0x40; - } else if (c == 0xA0) { // non-breaking space +#ifdef __APPLE__ + } else if (c == 0xCA) { // non-breaking space in MacRoman +#else + } else if (c == 0xA0) { // non-breaking space in ISO 8859 +#endif *o++ = ' '; } else if (c == '@' && draw_symbols) { // Symbol??? if (p[1] && p[1] != '@') break; diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx index 69e11ede5..8742b7460 100644 --- a/src/fl_shortcut.cxx +++ b/src/fl_shortcut.cxx @@ -55,7 +55,11 @@ int Fl::test_shortcut(int shortcut) { if (!shortcut) return 0; int v = shortcut & 0xffff; - if (v > 32 && v < 0x7f || v > 0xa0 && v <= 0xff) { +#ifdef __APPLE__ + if (v > 32 && v < 0x7f || v >= 0x80 && v <= 0xff) { +#else + if (v > 32 && v < 0x7f || v >= 0xa0 && v <= 0xff) { +#endif if (isupper(v)) { shortcut |= FL_SHIFT; } @@ -127,7 +131,11 @@ const char * fl_shortcut_label(int shortcut) { if (!shortcut) {*p = 0; return buf;} // fix upper case shortcuts int v = shortcut & 0xffff; - if (v > 32 && v < 0x7f || v > 0xa0 && v <= 0xff) { +#ifdef __APPLE__ + if (v > 32 && v < 0x7f || v >= 0x80 && v <= 0xff) { +#else + if (v > 32 && v < 0x7f || v >= 0xa0 && v <= 0xff) { +#endif if (isupper(v)) { shortcut |= FL_SHIFT; } |
