Mercurial > mxe-octave
annotate src/readline-1-input.patch @ 3829:2a48f5ac37e1
dist-files.mk: include mingw-osmesa-1-fixes.patch in the list
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 04 Mar 2015 09:32:38 -0500 |
parents | 2cf09b449d88 |
children |
rev | line source |
---|---|
2980
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
1 diff -uNr a/input.c b/input.c |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
2 --- a/input.c 2010-05-30 18:33:01.000000000 -0400 |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
3 +++ b/input.c 2013-04-17 23:50:34.759675631 -0400 |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
4 @@ -466,7 +466,12 @@ |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
5 |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
6 #if defined (__MINGW32__) |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
7 if (isatty (fileno (stream))) |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
8 - return (getch ()); |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
9 + { |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
10 + int c = _getch (); |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
11 + if (c == 0xe0) |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
12 + rl_execute_next (_getch ()); |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
13 + return (c); |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
14 + } |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
15 #endif |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
16 result = read (fileno (stream), &c, sizeof (unsigned char)); |
2cf09b449d88
readline patches for windows from goffioul
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
17 |