Remove ioctl checks

Ended up not using terminal size after all.
This commit is contained in:
Behdad Esfahbod 2012-05-13 13:03:44 +02:00
parent db0de7cd61
commit 50f630c17c
2 changed files with 1 additions and 12 deletions

View File

@ -53,7 +53,7 @@ dnl GTK_DOC_CHECK([1.15],[--flavour no-tmpl])
# Functions and headers
AC_CHECK_FUNCS(mprotect sysconf getpagesize mmap _setmode isatty)
AC_CHECK_HEADERS(unistd.h sys/mman.h io.h sys/ioctl.h)
AC_CHECK_HEADERS(unistd.h sys/mman.h io.h)
# Compiler flags
AC_CANONICAL_HOST

View File

@ -40,9 +40,6 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for isatty() */
#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#define MIN(a,b) ((a) < (b) ? (a) : (b))
@ -377,14 +374,6 @@ ansi_print_image_rgb24 (const uint32_t *data,
unsigned int height,
unsigned int stride)
{
/* Get screen size */
struct winsize w;
if (ioctl(1, TIOCGWINSZ, &w)) /* Ought to be stdout, right? */
{
w.ws_row = 25;
w.ws_col = 80;
}
image_t image (width, height, data, stride);
unsigned int rows = (height + CELL_H - 1) / CELL_H;