comparison mcabber/src/screen.c @ 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 753a348c65c1
children f89844a0448a
comparison
equal deleted inserted replaced
1393:216b4da93e08 1394:bba74a50dedf
3771 display_char = TRUE; 3771 display_char = TRUE;
3772 } // switch 3772 } // switch
3773 3773
3774 display: 3774 display:
3775 if (display_char) { 3775 if (display_char) {
3776 if (kcode.utf8 ? iswprint(key) : (isprint(key) && !is_speckey(key))) { 3776 guint printable;
3777
3778 if (kcode.utf8) {
3779 printable = iswprint(key);
3780 } else {
3781 #ifdef __CYGWIN__
3782 printable = (isprint(key) || (key >= 161 && key <= 255))
3783 && !is_speckey(key);
3784 #else
3785 printable = isprint(key) && !is_speckey(key);
3786 #endif
3787 }
3788 if (printable) {
3777 char tmpLine[INPUTLINE_LENGTH+1]; 3789 char tmpLine[INPUTLINE_LENGTH+1];
3778 3790
3779 // Check the line isn't too long 3791 // Check the line isn't too long
3780 if (strlen(inputLine) + 4 > INPUTLINE_LENGTH) 3792 if (strlen(inputLine) + 4 > INPUTLINE_LENGTH)
3781 return; 3793 return;