changeset 1394:bba74a50dedf

Improve Cygwin support On Cygwin, isprint() isn't enough so we consider that key codes between 161 and 255 are printable.
author Mikael Berthe <mikael@lilotux.net>
date Sun, 09 Dec 2007 19:26:37 +0100
parents 216b4da93e08
children d431cd75eb53
files mcabber/src/screen.c
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/screen.c	Sun Dec 09 19:17:42 2007 +0100
+++ b/mcabber/src/screen.c	Sun Dec 09 19:26:37 2007 +0100
@@ -3773,7 +3773,19 @@
 
 display:
   if (display_char) {
-    if (kcode.utf8 ? iswprint(key) : (isprint(key) && !is_speckey(key))) {
+    guint printable;
+
+    if (kcode.utf8) {
+      printable = iswprint(key);
+    } else {
+#ifdef __CYGWIN__
+      printable = (isprint(key) || (key >= 161 && key <= 255))
+                  && !is_speckey(key);
+#else
+      printable = isprint(key) && !is_speckey(key);
+#endif
+    }
+    if (printable) {
       char tmpLine[INPUTLINE_LENGTH+1];
 
       // Check the line isn't too long