From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23010 invoked by alias); 12 Jun 2005 09:27:54 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22778 invoked by uid 22791); 12 Jun 2005 09:27:45 -0000 Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 12 Jun 2005 09:27:45 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j5C9QKZ7006876; Sun, 12 Jun 2005 11:26:20 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id j5C9QKQl003280; Sun, 12 Jun 2005 11:26:20 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id j5C9QKHn014593; Sun, 12 Jun 2005 11:26:20 +0200 (CEST) Date: Sun, 12 Jun 2005 09:27:00 -0000 Message-Id: <200506120926.j5C9QKHn014593@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: eliz@gnu.org CC: mark.kettenis@xs4all.nl, mark@codesourcery.com, gdb-patches@sources.redhat.com, bug-readline@gnu.org In-reply-to: (message from Eli Zaretskii on Sun, 12 Jun 2005 11:42:46 +0300) Subject: Re: PATCH: Readline for MinGW References: <200506081742.j58Hg6O0017392@sethra.codesourcery.com> <200506120731.j5C7VMNO030966@elgar.sibelius.xs4all.nl> X-SW-Source: 2005-06/txt/msg00124.txt.bz2 Date: Sun, 12 Jun 2005 11:42:46 +0300 From: Eli Zaretskii > + #ifdef __MINGW32__ > + /* Under Windows, when an extend key (like an arrow key) is > + pressed, getch() will return 0xE0 followed by a code for the > + extended key. We use macros to transform those into the normal > + UNIX sequences for these keys. */ > + > + /* Up arrow. */ > + rl_macro_bind ("\340H", "\033[A", map); > + /* Left arrow. */ > + rl_macro_bind ("\340K", "\033[D", map); > + /* Right arrow. */ > + rl_macro_bind ("\340M", "\033[C", map); > + /* Down arrow. */ > + rl_macro_bind ("\340P", "\033[B", map); > + #endif > > It has "\34" and "\033" on the same line so I get confused whether > "\34" is octal or not... That's not "\34", that's "\340". Which I guess explains the other confusion: > Also, I don't see any trace of the 0xE0 you mention in the comment. 340 in octal is E0 in hex. I.e., the up arrow, for example, produces two characters: 0xE0 followed by H. Duh! Thanks Eli. Mark