From 0c970511cc230abd19c1a30058174cbf03222648 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Tue, 28 Apr 2009 14:30:34 +1000 Subject: libbb/xfuncs.c: fix get_terminal_width_height() to 80x25 --- libbb/xfuncs.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'libbb') 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) /* It is perfectly ok to pass in a NULL for either width or for * height, in which case that value will not be set. */ -#ifndef __MINGW32__ +#ifdef __MINGW32__ +int get_terminal_width_height(const int fd, int *width, int *height) +{ + /* FIXME: support for Windows console */ + if (width) + *width = 80; + if (height) + *height = 25; +} +#else int get_terminal_width_height(const int fd, int *width, int *height) { struct winsize win = { 0, 0, 0, 0 }; -- cgit v1.2.3-55-g6feb