/****************************************************************************
- * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
-$Id: ncurses.c,v 1.502 2017/11/02 20:46:06 tom Exp $
+$Id: ncurses.c,v 1.508 2018/09/22 21:21:43 tom Exp $
***************************************************************************/
#define Get_wchar(result) wGet_wchar(stdscr, result)
/* replaces wgetn_wstr(), since we want to be able to edit values */
+#if USE_SOFTKEYS
static void
wGet_wstring(WINDOW *win, wchar_t *buffer, int limit)
{
wmove(win, y0, x0);
noecho();
}
+#endif /* USE_SOFTKEYS */
-#endif
+#endif /* USE_WIDEC_SUPPORT */
static void
Pause(void)
addstr("Shelling out...");
def_prog_mode();
endwin();
-#ifdef __MINGW32__
+#ifdef _WIN32
system("cmd.exe");
#else
IGNORE_RC(system("sh"));
int shift = 0, last_refresh = -1;
int state, flavor[OVERLAP_FLAVORS];
- if ((win1 = make_overlap(0)) == 0
- || (win2 = make_overlap(1)) == 0)
+ if ((win1 = make_overlap(0)) == 0) {
return ERR;
+ } else if ((win2 = make_overlap(1)) == 0) {
+ delwin(win1);
+ return ERR;
+ }
curs_set(0);
raw();
int shift = 0, last_refresh = -1;
int state, flavor[OVERLAP_FLAVORS];
- if ((win1 = make_overlap(0)) == 0
- || (win2 = make_overlap(1)) == 0)
+ if ((win1 = make_overlap(0)) == 0) {
+ return ERR;
+ } else if ((win2 = make_overlap(1)) == 0) {
+ delwin(win1);
return ERR;
+ }
curs_set(0);
raw();
#if USE_LIBPANEL
," -s msec specify nominal time for panel-demo (default: 1, to hold)"
#endif
-#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(__MINGW32__)
+#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(_WIN32)
," -T call use_tioctl(TRUE) to allow SIGWINCH to override environment"
#endif
#ifdef TRACE
#if USE_LIBMENU
CMDS(TRUE, ONLY(menu_test), 'm', "exercise menu library"),
#endif
-#if USE_LIBMENU
+#if USE_LIBPANEL
CMDS(TRUE, BOTH(panel_test), 'o', "exercise panel library"),
#endif
#if HAVE_NEWPAD
if (read(fileno(stdin), &ch, (size_t) 1) <= 0) {
if (command == 0)
command = 'q';
+ if (errno == EINTR) {
+ clearerr(stdin);
+ continue;
+ }
break;
} else if (command == 0 && !isspace(UChar(ch))) {
command = ch;
nap_msec = (int) atol(optarg);
break;
#endif
-#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(__MINGW32__)
+#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(_WIN32)
case 'T':
use_tioctl(TRUE);
break;