X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-ui%2Fresize.c;fp=lib-ui%2Fresize.c;h=0000000000000000000000000000000000000000;hb=c9b049f668148dab6ae90f32de6a4981f673bfa1;hp=fe0e9655ed7fae74f5410bffb4fa109db390d86a;hpb=84bc6d1930165b21919541b3b24294a9d99c3541;p=apps%2Fmadmutt.git diff --git a/lib-ui/resize.c b/lib-ui/resize.c deleted file mode 100644 index fe0e965..0000000 --- a/lib-ui/resize.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright notice from original mutt: - * Copyright (C) 1996-2000 Michael R. Elkins - * - * This file is part of mutt-ng, see http://www.muttng.org/. - * It's licensed under the GNU General Public License, - * please see the file GPL in the top level source directory. - */ - -#include - -#if defined(HAVE_RESIZETERM) - -#include -#ifdef HAVE_SYS_IOCTL_H -# include -#elif defined(HAVE_IOCTL_H) -# include -#endif - -#include -#include "mutt.h" - -/* this routine should be called after receiving SIGWINCH */ -void mutt_resize_screen (void) -{ - char *cp; - int fd; - struct winsize w; - - int rows, cols; - - rows = -1; - cols = -1; - if ((fd = open ("/dev/tty", O_RDONLY)) != -1) { - if (ioctl (fd, TIOCGWINSZ, &w) != -1) { - rows = w.ws_row; - cols = w.ws_col; - } - close (fd); - } - if (rows <= 0) { - if ((cp = getenv ("LINES")) != NULL) { - rows = atoi (cp); - } - else - rows = 24; - } - if (cols <= 0) { - if ((cp = getenv ("COLUMNS")) != NULL) - cols = atoi (cp); - else - cols = 80; - } - resizeterm (rows, cols); -} - -#endif /* defined(HAVE_RESIZETERM) */