projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
get rid of slang
[apps/madmutt.git]
/
lib-ui
/
resize.c
diff --git
a/lib-ui/resize.c
b/lib-ui/resize.c
index
74cd58c
..
fe0e965
100644
(file)
--- a/
lib-ui/resize.c
+++ b/
lib-ui/resize.c
@@
-9,7
+9,7
@@
#include <lib-lib/lib-lib.h>
#include <lib-lib/lib-lib.h>
-#if defined(
USE_SLANG_CURSES) || defined(
HAVE_RESIZETERM)
+#if defined(HAVE_RESIZETERM)
#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
@@
-28,41
+28,31
@@
void mutt_resize_screen (void)
int fd;
struct winsize w;
int fd;
struct winsize w;
-#ifdef HAVE_RESIZETERM
- int SLtt_Screen_Rows, SLtt_Screen_Cols;
-#endif
+ int rows, cols;
-
SLtt_Screen_R
ows = -1;
-
SLtt_Screen_C
ols = -1;
+
r
ows = -1;
+
c
ols = -1;
if ((fd = open ("/dev/tty", O_RDONLY)) != -1) {
if (ioctl (fd, TIOCGWINSZ, &w) != -1) {
if ((fd = open ("/dev/tty", O_RDONLY)) != -1) {
if (ioctl (fd, TIOCGWINSZ, &w) != -1) {
-
SLtt_Screen_R
ows = w.ws_row;
-
SLtt_Screen_C
ols = w.ws_col;
+
r
ows = w.ws_row;
+
c
ols = w.ws_col;
}
close (fd);
}
}
close (fd);
}
- if (
SLtt_Screen_R
ows <= 0) {
+ if (
r
ows <= 0) {
if ((cp = getenv ("LINES")) != NULL) {
if ((cp = getenv ("LINES")) != NULL) {
-
SLtt_Screen_R
ows = atoi (cp);
+
r
ows = atoi (cp);
}
else
}
else
-
SLtt_Screen_R
ows = 24;
+
r
ows = 24;
}
}
- if (
SLtt_Screen_C
ols <= 0) {
+ if (
c
ols <= 0) {
if ((cp = getenv ("COLUMNS")) != NULL)
if ((cp = getenv ("COLUMNS")) != NULL)
-
SLtt_Screen_C
ols = atoi (cp);
+
c
ols = atoi (cp);
else
else
-
SLtt_Screen_C
ols = 80;
+
c
ols = 80;
}
}
-#ifdef USE_SLANG_CURSES
- delwin (stdscr);
- SLsmg_reset_smg ();
- SLsmg_init_smg ();
- stdscr = newwin (0, 0, 0, 0);
- keypad (stdscr, TRUE);
-#else
- resizeterm (SLtt_Screen_Rows, SLtt_Screen_Cols);
-#endif
+ resizeterm (rows, cols);
}
}
-#endif /* defined(
USE_SLANG_CURSES) || defined(
HAVE_RESIZETERM) */
+#endif /* defined(HAVE_RESIZETERM) */