* fhandler_console.cc (fhandler_console::open): Always default to binmode.
(fhandler_console::write_normal): Don't honor binmode setting. There is already a termios setting for this. (fhandler_console::init): Correct argument order in init call.
This commit is contained in:
parent
8461f41ec0
commit
de86e35bc4
|
@ -1,3 +1,11 @@
|
||||||
|
2002-05-31 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* fhandler_console.cc (fhandler_console::open): Always default to
|
||||||
|
binmode.
|
||||||
|
(fhandler_console::write_normal): Don't honor binmode setting. There
|
||||||
|
is already a termios setting for this.
|
||||||
|
(fhandler_console::init): Correct argument order in init call.
|
||||||
|
|
||||||
2002-05-31 Christopher Faylor <cgf@redhat.com>
|
2002-05-31 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* fhandler.cc (fhandler_base::open): Make default open mode == binmode.
|
* fhandler.cc (fhandler_base::open): Make default open mode == binmode.
|
||||||
|
|
|
@ -547,7 +547,8 @@ fhandler_console::open (path_conv *, int flags, mode_t)
|
||||||
set_io_handle (INVALID_HANDLE_VALUE);
|
set_io_handle (INVALID_HANDLE_VALUE);
|
||||||
set_output_handle (INVALID_HANDLE_VALUE);
|
set_output_handle (INVALID_HANDLE_VALUE);
|
||||||
|
|
||||||
set_flags (flags);
|
set_w_binary (1);
|
||||||
|
set_r_binary (1);
|
||||||
|
|
||||||
/* Open the input handle as handle_ */
|
/* Open the input handle as handle_ */
|
||||||
h = CreateFileA ("CONIN$", GENERIC_READ|GENERIC_WRITE,
|
h = CreateFileA ("CONIN$", GENERIC_READ|GENERIC_WRITE,
|
||||||
|
@ -1443,21 +1444,19 @@ fhandler_console::write_normal (const unsigned char *src,
|
||||||
case ESC:
|
case ESC:
|
||||||
state_ = gotesc;
|
state_ = gotesc;
|
||||||
break;
|
break;
|
||||||
case DWN: /* WriteFile ("\n") always adds CR... */
|
case DWN:
|
||||||
cursor_get (&x, &y);
|
cursor_get (&x, &y);
|
||||||
if (y >= srBottom)
|
if (y >= srBottom)
|
||||||
{
|
{
|
||||||
if (y < info.winBottom || scroll_region.Top)
|
if (y >= info.winBottom && !scroll_region.Top)
|
||||||
|
WriteFile (get_output_handle (), "\n", 1, &done, 0);
|
||||||
|
else
|
||||||
{
|
{
|
||||||
scroll_screen (0, srTop + 1, -1, srBottom, 0, srTop);
|
scroll_screen (0, srTop + 1, -1, srBottom, 0, srTop);
|
||||||
y--;
|
y--;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
WriteFile (get_output_handle (), "\n", 1, &done, 0);
|
|
||||||
}
|
}
|
||||||
if (!get_w_binary ())
|
cursor_set (FALSE, ((tc->ti.c_oflag & ONLCR) ? 0 : x), y + 1);
|
||||||
x = 0;
|
|
||||||
cursor_set (FALSE, x, y + 1);
|
|
||||||
break;
|
break;
|
||||||
case BAK:
|
case BAK:
|
||||||
cursor_rel (-1, 0);
|
cursor_rel (-1, 0);
|
||||||
|
@ -1698,7 +1697,7 @@ get_nonascii_key (INPUT_RECORD& input_rec, char *tmp)
|
||||||
void
|
void
|
||||||
fhandler_console::init (HANDLE f, DWORD a, mode_t bin)
|
fhandler_console::init (HANDLE f, DWORD a, mode_t bin)
|
||||||
{
|
{
|
||||||
this->fhandler_termios::init (f, bin, a);
|
this->fhandler_termios::init (f, a, bin);
|
||||||
|
|
||||||
/* Ensure both input and output console handles are open */
|
/* Ensure both input and output console handles are open */
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
|
|
Loading…
Reference in New Issue