Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: eliz@gnu.org
Cc: mark.kettenis@xs4all.nl, mark@codesourcery.com,
	gdb-patches@sources.redhat.com, bug-readline@gnu.org
Subject: Re: PATCH: Readline for MinGW
Date: Sun, 12 Jun 2005 09:27:00 -0000	[thread overview]
Message-ID: <200506120926.j5C9QKHn014593@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <umzpw6k55.fsf@gnu.org> (message from Eli Zaretskii on Sun, 12 Jun 2005 11:42:46 +0300)

   Date: Sun, 12 Jun 2005 11:42:46 +0300
   From: Eli Zaretskii <eliz@gnu.org>

   >    + #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


  reply	other threads:[~2005-06-12  9:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-08 17:43 Mark Mitchell
2005-06-12  7:33 ` Mark Kettenis
2005-06-12  8:43   ` Eli Zaretskii
2005-06-12  9:27     ` Mark Kettenis [this message]
2005-06-13  6:09   ` Mark Mitchell
2005-06-15 18:14   ` James Lemke
2005-06-22  1:22   ` Chet Ramey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200506120926.j5C9QKHn014593@elgar.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=bug-readline@gnu.org \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mark@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox