delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/01/20:19:06

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Tue, 2 Jan 2001 02:18:42 +0100 (MET)
From: lw AT computerwuerfel DOT de
Message-Id: <200101020118.CAA12604@post.webmailer.de>
Subject: CYGWIN=codepage:oem read() patch
To: cygwin AT sourceware DOT cygnus DOT com

Hi cygwin developers,

thank you very very much for the cygwin=codepage:oem option.

The display is ok now, but when you getchar() resp. read() special characters
from the console, you get false results.

In winsup/cygwin/fhandler_console.cc, function fhandler_console::read,
every character > 127 is translated to ansi codepage.

My suggestion to fix this follows at the end of this mail.
It ist based on cygwin-1.1.7-1 without any snapshot.

Best regards.

- Lars A. Wuerfel

------------------------------------------------------------------------------
*** //C/TEMP/FHANDL~2.CC        Tue Jan  2 01:31:21 2001
--- fhandler_console.cc Tue Jan  2 01:31:30 2001
*************** fhandler_console::read (void *pv, size_t
*** 219,226 ****
--- 219,228 ----
              tmp[1] = ich;
              /* Need this check since US code page seems to have a bug when
                 converting a CTRL-U. */
+           if (current_codepage == ansi_cp) {  
              if ((unsigned char)ich > 0x7f)
                OemToCharBuff (tmp + 1, tmp + 1, 1);
+           }
              if (!(input_rec.Event.KeyEvent.dwControlKeyState & LEFT_ALT_PRESSED))
                toadd = tmp + 1;
              else
------------------------------------------------------------------------------


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019