Skip to content

Commit a08308b

Browse files
committed
Revert "Make requested console reports work"
This fixes git-for-windows/git#711 This reverts commit 7346568. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent dfe4fec commit a08308b

File tree

3 files changed

+4
-30
lines changed

3 files changed

+4
-30
lines changed

winsup/cygwin/fhandler.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,8 +1352,6 @@ class dev_console
13521352
bool ext_mouse_mode15;
13531353
bool use_focus;
13541354
bool raw_win32_keyboard_mode;
1355-
char cons_rabuf[40]; // cannot get longer than char buf[40] in char_command
1356-
char *cons_rapoi;
13571355

13581356
inline UINT get_console_cp ();
13591357
DWORD con_to_str (char *d, int dlen, WCHAR w);
@@ -1451,10 +1449,6 @@ class fhandler_console: public fhandler_termios
14511449
int init (HANDLE, DWORD, mode_t);
14521450
bool mouse_aware (MOUSE_EVENT_RECORD& mouse_event);
14531451
bool focus_aware () {return shared_console_info->con.use_focus;}
1454-
bool get_cons_readahead_valid ()
1455-
{
1456-
return shared_console_info->con.cons_rapoi != NULL;
1457-
}
14581452

14591453
select_record *select_read (select_stuff *);
14601454
select_record *select_write (select_stuff *);

winsup/cygwin/fhandler_console.cc

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ fhandler_console::setup ()
194194
con.meta_mask |= RIGHT_ALT_PRESSED;
195195
con.set_default_attr ();
196196
con.backspace_keycode = CERASE;
197-
con.cons_rapoi = NULL;
198197
shared_console_info->tty_min_state.is_console = true;
199198
}
200199
}
@@ -309,14 +308,6 @@ fhandler_console::read (void *pv, size_t& buflen)
309308
int ch;
310309
set_input_state ();
311310

312-
/* Check console read-ahead buffer filled from terminal requests */
313-
if (con.cons_rapoi && *con.cons_rapoi)
314-
{
315-
*buf = *con.cons_rapoi++;
316-
buflen = 1;
317-
return;
318-
}
319-
320311
int copied_chars = get_readahead_into_buffer (buf, buflen);
321312

322313
if (copied_chars)
@@ -1904,11 +1895,8 @@ fhandler_console::char_command (char c)
19041895
strcpy (buf, "\033[?6c");
19051896
/* The generated report needs to be injected for read-ahead into the
19061897
fhandler_console object associated with standard input.
1907-
So puts_readahead does not work.
1908-
Use a common console read-ahead buffer instead. */
1909-
con.cons_rapoi = NULL;
1910-
strcpy (con.cons_rabuf, buf);
1911-
con.cons_rapoi = con.cons_rabuf;
1898+
The current call does not work. */
1899+
puts_readahead (buf);
19121900
break;
19131901
case 'n':
19141902
switch (con.args[0])
@@ -1918,11 +1906,9 @@ fhandler_console::char_command (char c)
19181906
y -= con.b.srWindow.Top;
19191907
/* x -= con.b.srWindow.Left; // not available yet */
19201908
__small_sprintf (buf, "\033[%d;%dR", y + 1, x + 1);
1921-
con.cons_rapoi = NULL;
1922-
strcpy (con.cons_rabuf, buf);
1923-
con.cons_rapoi = con.cons_rabuf;
1909+
puts_readahead (buf);
19241910
break;
1925-
default:
1911+
default:
19261912
goto bad_escape;
19271913
}
19281914
break;

winsup/cygwin/select.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -844,12 +844,6 @@ peek_console (select_record *me, bool)
844844
if (!me->read_selected)
845845
return me->write_ready;
846846

847-
if (fh->get_cons_readahead_valid ())
848-
{
849-
select_printf ("cons_readahead");
850-
return me->read_ready = true;
851-
}
852-
853847
if (fh->get_readahead_valid ())
854848
{
855849
select_printf ("readahead");

0 commit comments

Comments
 (0)