Skip to content

Commit

Permalink
TEST: reverting the testing changes for QUERY on input port on Posix …
Browse files Browse the repository at this point in the history
…platform
  • Loading branch information
Oldes committed Dec 18, 2018
1 parent be97e5d commit a21eecc
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions src/os/posix/dev-stdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@ static void Close_Stdio(void)
**
***********************************************************************/
{
//#ifdef TIOCGWINSZ
puts("========================= USING TIOCGWINSZ");
#ifdef TIOCGWINSZ
struct winsize w;
if (ioctl(Std_Out, TIOCGWINSZ, &w) != 0) {
req->error = errno;
Expand All @@ -283,19 +282,19 @@ static void Close_Stdio(void)
req->console.buffer_rows = w.ws_row;
req->console.window_cols =
req->console.buffer_cols = w.ws_col;
//#else
//#ifdef WIOCGETD
// struct uwdata w;
// if (ioctl(Std_Out, WIOCGETD, &w) != 0) {
// req->error = errno;
// return DR_ERROR;
// }
// req->console.window_rows =
// req->console.buffer_rows = w.uw_height / w.uw_vs;
// req->console.window_cols =
// req->console.buffer_cols = w.uw_width / w.uw_hs;
//#endif
//#endif
#else
#ifdef WIOCGETD
struct uwdata w;
if (ioctl(Std_Out, WIOCGETD, &w) != 0) {
req->error = errno;
return DR_ERROR;
}
req->console.window_rows =
req->console.buffer_rows = w.uw_height / w.uw_vs;
req->console.window_cols =
req->console.buffer_cols = w.uw_width / w.uw_hs;
#endif
#endif
return DR_DONE;
}

Expand Down

0 comments on commit a21eecc

Please sign in to comment.