pop_auth.o pop_lib.o postpone.o query.o recvattach.o recvcmd.o \
rfc1524.o rfc2047.o rfc2231.o rfc3676.o address.o \
safe_asprintf.o score.o send.o sendlib.o sidebar.o mutt_signal.o \
- smtp.o sort.o state.o status.o system.o thread.o url.o \
+ resize.o smtp.o sort.o state.o status.o system.o thread.o url.o \
version.o
@if !HAVE_WCSCASECMP
NEOMUTTOBJS+= wcscasecmp.o
@endif
-@if HAVE_RESIZE
-NEOMUTTOBJS+= resize.o
-@endif
@if USE_NOTMUCH
NEOMUTTOBJS+= mutt_notmuch.o
@endif
if {![cc-check-function-in-lib tgetent $ncurses_lib]} {
cc-check-function-in-lib tgetent tinfo
}
- foreach f {start_color typeahead bkgdset curs_set meta use_default_colors resizeterm} {
+ foreach f {start_color typeahead bkgdset curs_set meta use_default_colors} {
cc-check-function-in-lib $f $ncurses_lib
}
cc-check-functions use_extended_names
- if {[have-feature RESIZETERM]} {
- define-feature RESIZE
- }
}
if {[have-feature start_color]} {
}
define USE_SLANG_CURSES
define-feature COLOR
- define-feature RESIZE
}
default {
do
{
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
if (SigWinch)
{
SigWinch = 0;
clearok(stdscr, TRUE);
mutt_current_menu_redraw();
}
-#endif
mutt_window_clearline(MuttMessageWindow, 0);
SETCOLOR(MT_COLOR_PROMPT);
addstr((char *) field); /* cast to get around bad prototypes */
mutt_error(_("Error running \"%s\"!"), cmd);
mutt_sleep(2);
}
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
/* the terminal may have been resized while the editor owned it */
mutt_resize_screen();
-#endif
keypad(stdscr, true);
clearok(stdscr, true);
}
if (redraw || SigWinch)
{
redraw = false;
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
if (SigWinch)
{
SigWinch = 0;
clearok(stdscr, TRUE);
mutt_current_menu_redraw();
}
-#endif
if (MuttMessageWindow->cols)
{
prompt_lines = (msg_wid + answer_string_wid + MuttMessageWindow->cols - 1) /
if (redraw || SigWinch)
{
redraw = false;
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
if (SigWinch)
{
SigWinch = 0;
clearok(stdscr, TRUE);
mutt_current_menu_redraw();
}
-#endif
if (MuttMessageWindow->cols)
{
prompt_lines = (mutt_strwidth(prompt) + MuttMessageWindow->cols - 1) /
MuttIndexWindow->cols - 1);
mutt_refresh();
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
if (SigWinch)
{
mutt_flushinp();
clearok(stdscr, true);
continue;
}
-#endif
op = km_dokey(MENU_MAIN);
struct EnterState *es = mutt_new_enter_state();
do
{
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
if (SigWinch)
{
SigWinch = 0;
mutt_resize_screen();
clearok(stdscr, TRUE);
}
-#endif
rc = mutt_enter_string_full(buf, buflen, col, flags, 0, NULL, NULL, es);
} while (rc == 1);
mutt_free_enter_state(&es);
void menu_redraw_full(struct Menu *menu)
{
-#if !(defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM))
mutt_reflow_windows();
-#endif
NORMAL_COLOR;
/* clear() doesn't optimize screen redraws */
move(0, 0);
mutt_curs_set(1);
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
if (SigWinch)
{
mutt_resize_screen();
SigWinch = 0;
clearok(stdscr, true); /* force complete redraw */
}
-#endif
if (i < 0)
{
sigaction(SIGCONT, &act, NULL);
sigaction(SIGTSTP, &act, NULL);
sigaction(SIGINT, &act, NULL);
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
sigaction(SIGWINCH, &act, NULL);
-#endif
/* POSIX doesn't allow us to ignore SIGCHLD,
* so we just install a dummy handler for it */
sigaddset(&Sigset, SIGHUP);
sigaddset(&Sigset, SIGTSTP);
sigaddset(&Sigset, SIGINT);
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
sigaddset(&Sigset, SIGWINCH);
-#endif
sigprocmask(SIG_BLOCK, &Sigset, 0);
SignalsBlocked = true;
}
if (!IsEndwin)
refresh();
mutt_curs_set(-1);
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
/* We don't receive SIGWINCH when suspended; however, no harm is done by
* just assuming we received one, and triggering the 'resize' anyway. */
SigWinch = 1;
-#endif
break;
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
case SIGWINCH:
SigWinch = 1;
break;
-#endif
case SIGINT:
SigInt = 1;
static short InHelp = 0;
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
/**
* struct Resize - Keep track of screen resizing
*/
int search_compiled;
int search_back;
} *Resize = NULL;
-#endif
#define NUM_SIG_LINES 4
struct PagerRedrawData *rd = pager_menu->redraw_data;
int i, j;
char buffer[LONG_STRING];
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
int err;
-#endif
if (!rd)
return;
if (pager_menu->redraw & REDRAW_FULL)
{
-#if !(defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM))
mutt_reflow_windows();
-#endif
NORMAL_COLOR;
/* clear() doesn't optimize screen redraws */
move(0, 0);
NORMAL_COLOR;
}
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
if (Resize)
{
rd->search_compiled = Resize->search_compiled;
FREE(&Resize);
}
-#endif
if (IsHeader(rd->extra) && PagerIndexLines)
{
}
}
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
if (SigWinch)
{
SigWinch = 0;
}
continue;
}
-#endif
+
if (ch < 0)
{
ch = 0;
const char *cp = NULL;
int fd;
struct winsize w;
-#ifdef HAVE_RESIZETERM
+#if !defined(USE_SLANG_CURSES)
int SLtt_Screen_Rows, SLtt_Screen_Cols;
#endif
if (!IsEndwin)
refresh();
mutt_curs_set(-1);
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
/* We don't receive SIGWINCH when suspended; however, no harm is done by
* just assuming we received one, and triggering the 'resize' anyway. */
SigWinch = 1;
-#endif
break;
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
case SIGWINCH:
SigWinch = 1;
break;
-#endif
case SIGINT:
SigInt = 1;
sigaction(SIGCONT, &act, NULL);
sigaction(SIGTSTP, &act, NULL);
sigaction(SIGINT, &act, NULL);
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
sigaction(SIGWINCH, &act, NULL);
-#endif
/* POSIX doesn't allow us to ignore SIGCHLD,
* so we just install a dummy handler for it
sigaddset(&Sigset, SIGHUP);
sigaddset(&Sigset, SIGTSTP);
sigaddset(&Sigset, SIGINT);
-#if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM)
sigaddset(&Sigset, SIGWINCH);
-#endif
sigprocmask(SIG_BLOCK, &Sigset, 0);
OPT_SIGNALS_BLOCKED = true;
}
#else
{ "pgp", 0 },
#endif
-#ifdef HAVE_RESIZETERM
- { "resizeterm", 1 },
-#else
- { "resizeterm", 0 },
-#endif
#ifdef USE_SASL
{ "sasl", 1 },
#else
#ifdef NCURSES_VERSION
printf("\nncurses: %s (compiled with %s)", curses_version(), NCURSES_VERSION);
#elif defined(USE_SLANG_CURSES)
- printf("\nslang: %d", SLANG_VERSION);
+ printf("\nslang: %s", SLANG_VERSION_STRING);
#endif
#ifdef _LIBICONV_VERSION