From 50f630c17ced1bd59b4da4f27728dcfbb876400a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 13 May 2012 13:03:44 +0200 Subject: [PATCH] Remove ioctl checks Ended up not using terminal size after all. --- configure.ac | 2 +- util/ansi-print.cc | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 6c5959a61..853d08348 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/util/ansi-print.cc b/util/ansi-print.cc index 3e418cf10..145181969 100644 --- a/util/ansi-print.cc +++ b/util/ansi-print.cc @@ -40,9 +40,6 @@ #ifdef HAVE_UNISTD_H #include /* for isatty() */ #endif -#ifdef HAVE_SYS_IOCTL_H -#include -#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;