aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-04-28 14:30:34 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-04-28 14:31:59 +1000
commit0c970511cc230abd19c1a30058174cbf03222648 (patch)
tree97e45d325693660083dead7b09456be336ead8c5
parent6f2abbc7688fc00d11fa449df83fc1e2303e06e5 (diff)
downloadbusybox-w32-0c970511cc230abd19c1a30058174cbf03222648.tar.gz
busybox-w32-0c970511cc230abd19c1a30058174cbf03222648.tar.bz2
busybox-w32-0c970511cc230abd19c1a30058174cbf03222648.zip
libbb/xfuncs.c: fix get_terminal_width_height() to 80x25
-rw-r--r--libbb/xfuncs.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 3d0bec7ac..3738d6bcf 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -625,7 +625,16 @@ void selinux_or_die(void)
625 625
626/* It is perfectly ok to pass in a NULL for either width or for 626/* It is perfectly ok to pass in a NULL for either width or for
627 * height, in which case that value will not be set. */ 627 * height, in which case that value will not be set. */
628#ifndef __MINGW32__ 628#ifdef __MINGW32__
629int get_terminal_width_height(const int fd, int *width, int *height)
630{
631 /* FIXME: support for Windows console */
632 if (width)
633 *width = 80;
634 if (height)
635 *height = 25;
636}
637#else
629int get_terminal_width_height(const int fd, int *width, int *height) 638int get_terminal_width_height(const int fd, int *width, int *height)
630{ 639{
631 struct winsize win = { 0, 0, 0, 0 }; 640 struct winsize win = { 0, 0, 0, 0 };