Revert "Add a temporal debugging code"
This reverts commit 5bd144c1bb20e22e4d9f5e5e0264820fd3ef8137.
This commit is contained in:
parent
42b1eaf234
commit
3face42d8a
@ -824,14 +824,7 @@ console_winsize(VALUE io)
|
|||||||
{
|
{
|
||||||
rb_console_size_t ws;
|
rb_console_size_t ws;
|
||||||
int fd = GetWriteFD(io);
|
int fd = GetWriteFD(io);
|
||||||
#if defined TIOCGWINSZ
|
|
||||||
// temporal debugging code
|
|
||||||
int ret = ioctl(fd, TIOCGWINSZ, &ws);
|
|
||||||
if (ret == -1) sys_fail(io);
|
|
||||||
if (ret != 0) rb_bug("ioctl(TIOCGWINSZ) returned %d", ret);
|
|
||||||
#else
|
|
||||||
if (!getwinsize(fd, &ws)) sys_fail(io);
|
if (!getwinsize(fd, &ws)) sys_fail(io);
|
||||||
#endif
|
|
||||||
return rb_assoc_new(INT2NUM(winsize_row(&ws)), INT2NUM(winsize_col(&ws)));
|
return rb_assoc_new(INT2NUM(winsize_row(&ws)), INT2NUM(winsize_col(&ws)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user