From: Thomas E. Dickey Date: Sun, 12 Dec 2010 01:44:54 +0000 (+0000) Subject: ncurses 5.7 - patch 20101211 X-Git-Tag: v5.8~9 X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=aa4fd77b765d528af776d42ea6e98a7405e18b40;ds=sidebyside ncurses 5.7 - patch 20101211 + suppress ncv in screen entry, allowing underline (patch by Alejandro R Sedeno). + also suppress ncv in konsole-base -TD + fixes in wins_nwstr() and related functions to ensure that special characters, i.e., control characters are handled properly with the wide-character configuration. + correct a comparison in wins_nwstr() (Redhat #661506). + correct help-messages in some of the test-programs, which still referred to quitting with 'q'. --- diff --git a/NEWS b/NEWS index 6955d2f7..0dacd15c 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1617 2010/12/04 20:21:40 tom Exp $ +-- $Id: NEWS,v 1.1621 2010/12/11 23:42:36 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,17 @@ See the AUTHORS file for the corresponding full names. Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20101211 + + suppress ncv in screen entry, allowing underline (patch by Alejandro + R Sedeno). + + also suppress ncv in konsole-base -TD + + fixes in wins_nwstr() and related functions to ensure that special + characters, i.e., control characters are handled properly with the + wide-character configuration. + + correct a comparison in wins_nwstr() (Redhat #661506). + + correct help-messages in some of the test-programs, which still + referred to quitting with 'q'. + 20101204 + add special case to _nc_infotocap() to recognize the setaf/setab strings from xterm+256color and xterm+88color, and provide a reduced diff --git a/dist.mk b/dist.mk index 5944dabd..5e004ee7 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.784 2010/12/04 16:06:24 tom Exp $ +# $Id: dist.mk,v 1.785 2010/12/11 17:04:22 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,7 +37,7 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 5 NCURSES_MINOR = 7 -NCURSES_PATCH = 20101204 +NCURSES_PATCH = 20101211 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/misc/terminfo.src b/misc/terminfo.src index cca518fb..458d4733 100644 --- a/misc/terminfo.src +++ b/misc/terminfo.src @@ -6,8 +6,8 @@ # Report bugs and new terminal descriptions to # bug-ncurses@gnu.org # -# $Revision: 1.380 $ -# $Date: 2010/12/04 18:38:55 $ +# $Revision: 1.381 $ +# $Date: 2010/12/11 23:39:36 $ # # The original header is preserved below for reference. It is noted that there # is a "newer" version which differs in some cosmetic details (but actually @@ -3912,6 +3912,7 @@ kvt|KDE terminal, # detail, but it is unclear which copies the other. konsole-base|KDE console window, bce, km@, npc, XT, + ncv@, bel@, blink=\E[5m, civis=\E[?25l, cnorm=\E[?25h, ech=\E[%p1%dX, flash=\E[?5h$<100/>\E[?5l, hpa=\E[%i%p1%dG, indn=\E[%p1%dS, kbs=\177, kdch1@, @@ -4665,7 +4666,7 @@ eterm-color|Emacs term.el terminal emulator term-protocol-version 0.96, # tested with screen 3.09.08 screen|VT 100/ANSI X3.64 virtual terminal, OTbs, OTpt, am, km, mir, msgr, xenl, G0, - colors#8, cols#80, it#8, lines#24, pairs#64, + colors#8, cols#80, it#8, lines#24, ncv@, pairs#64, acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=^M, @@ -22336,4 +22337,8 @@ v3220|LANPAR Vision II model 3220/3221/3222, # 2010-11-27 # * fix typo in rmso for tek4106 -Goran Weinholt # +# 2010-12-11 +# * suppress ncv in screen entry, allowing underline -Alejandro R. Sedeno +# * also suppress ncv in konsole-base -TD +# ######## SHANTIH! SHANTIH! SHANTIH! diff --git a/ncurses/widechar/lib_ins_wch.c b/ncurses/widechar/lib_ins_wch.c index e44f091b..4f62d365 100644 --- a/ncurses/widechar/lib_ins_wch.c +++ b/ncurses/widechar/lib_ins_wch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002-2005,2009 Free Software Foundation, Inc. * + * Copyright (c) 2002-2009,2010 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 * @@ -39,7 +39,7 @@ #include -MODULE_ID("$Id: lib_ins_wch.c,v 1.11 2009/10/24 22:43:14 tom Exp $") +MODULE_ID("$Id: lib_ins_wch.c,v 1.15 2010/12/11 19:58:39 tom Exp $") /* * Insert the given character, updating the current location to simplify @@ -50,28 +50,33 @@ _nc_insert_wch(WINDOW *win, const cchar_t *wch) { int cells = wcwidth(CharOf(CHDEREF(wch))); int cell; + int code = OK; + + if (cells < 0) { + code = winsch(win, CharOf(CHDEREF(wch))); + } else { + if (cells == 0) + cells = 1; + + if (win->_curx <= win->_maxx) { + struct ldat *line = &(win->_line[win->_cury]); + NCURSES_CH_T *end = &(line->text[win->_curx]); + NCURSES_CH_T *temp1 = &(line->text[win->_maxx]); + NCURSES_CH_T *temp2 = temp1 - cells; + + CHANGED_TO_EOL(line, win->_curx, win->_maxx); + while (temp1 > end) + *temp1-- = *temp2--; + + *temp1 = _nc_render(win, *wch); + for (cell = 1; cell < cells; ++cell) { + SetWidecExt(temp1[cell], cell); + } - if (cells <= 0) - cells = 1; - - if (win->_curx <= win->_maxx) { - struct ldat *line = &(win->_line[win->_cury]); - NCURSES_CH_T *end = &(line->text[win->_curx]); - NCURSES_CH_T *temp1 = &(line->text[win->_maxx]); - NCURSES_CH_T *temp2 = temp1 - cells; - - CHANGED_TO_EOL(line, win->_curx, win->_maxx); - while (temp1 > end) - *temp1-- = *temp2--; - - *temp1 = _nc_render(win, *wch); - for (cell = 1; cell < cells; ++cell) { - SetWidecExt(temp1[cell], cell); + win->_curx++; } - - win->_curx++; } - return OK; + return code; } NCURSES_EXPORT(int) @@ -120,7 +125,7 @@ wins_nwstr(WINDOW *win, const wchar_t *wstr, int n) for (cp = wstr; *cp && ((cp - wstr) < n); cp++) { int len = wcwidth(*cp); - if (len != 1 || !is8bits(*cp)) { + if ((len >= 0 && len != 1) || !is7bits(*cp)) { cchar_t tmp_cchar; wchar_t tmp_wchar = *cp; memset(&tmp_cchar, 0, sizeof(tmp_cchar)); diff --git a/test/ins_wide.c b/test/ins_wide.c index 60de9249..87deb1a1 100644 --- a/test/ins_wide.c +++ b/test/ins_wide.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: ins_wide.c,v 1.13 2010/11/13 23:40:32 tom Exp $ + * $Id: ins_wide.c,v 1.15 2010/12/12 00:20:14 tom Exp $ * * Demonstrate the wins_wstr() and wins_wch functions. * Thomas Dickey - 2002/11/23 @@ -74,7 +74,7 @@ static int n_opt = -1; static void legend(WINDOW *win, int level, Options state, wchar_t *buffer, int length) { - NCURSES_CONST char *showstate; + const char *showstate; switch (state) { default: @@ -96,7 +96,7 @@ legend(WINDOW *win, int level, Options state, wchar_t *buffer, int length) wprintw(win, "The Strings/Chars displays should match. Enter any characters, except:\n"); wprintw(win, - "down-arrow or ^N to repeat on next line, 'w' for inner window, 'q' to exit.\n"); + "down-arrow or ^N to repeat on next line, ^W for inner window, ESC to exit.\n"); wclrtoeol(win); wprintw(win, "Level %d,%s inserted %d characters <", level, showstate, length); diff --git a/test/inserts.c b/test/inserts.c index 308793e0..a12fa401 100644 --- a/test/inserts.c +++ b/test/inserts.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: inserts.c,v 1.21 2010/05/01 19:12:26 tom Exp $ + * $Id: inserts.c,v 1.23 2010/12/12 00:19:55 tom Exp $ * * Demonstrate the winsstr() and winsch functions. * Thomas Dickey - 2002/10/19 @@ -68,7 +68,7 @@ static int n_opt = -1; static void legend(WINDOW *win, int level, Options state, char *buffer, int length) { - NCURSES_CONST char *showstate; + const char *showstate; switch (state) { default: @@ -90,7 +90,7 @@ legend(WINDOW *win, int level, Options state, char *buffer, int length) wprintw(win, "The Strings/Chars displays should match. Enter any characters, except:\n"); wprintw(win, - "down-arrow or ^N to repeat on next line, 'w' for inner window, 'q' to exit.\n"); + "down-arrow or ^N to repeat on next line, ^W for inner window, ESC to exit.\n"); wclrtoeol(win); wprintw(win, "Level %d,%s inserted %d characters <%s>", level, showstate, length, buffer); diff --git a/test/newdemo.c b/test/newdemo.c index 72e1d093..75626a90 100644 --- a/test/newdemo.c +++ b/test/newdemo.c @@ -2,7 +2,7 @@ * newdemo.c - A demo program using PDCurses. The program illustrate * the use of colours for text output. * - * $Id: newdemo.c,v 1.34 2010/11/13 23:33:42 tom Exp $ + * $Id: newdemo.c,v 1.35 2010/12/12 00:19:15 tom Exp $ */ #include @@ -33,7 +33,7 @@ static CONST_MENUS char *AusMap[16] = */ #define NMESSAGES 6 -static NCURSES_CONST char *messages[] = +static const char *messages[] = { "Hello from the Land Down Under", "The Land of crocs. and a big Red Rock", diff --git a/test/test_add_wchstr.c b/test/test_add_wchstr.c index 3413a37b..08ff6ee0 100644 --- a/test/test_add_wchstr.c +++ b/test/test_add_wchstr.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_add_wchstr.c,v 1.9 2010/11/13 21:14:50 tom Exp $ + * $Id: test_add_wchstr.c,v 1.12 2010/12/12 00:17:13 tom Exp $ * * Demonstrate the waddwchstr() and wadd_wch functions. * Thomas Dickey - 2009/9/12 @@ -73,6 +73,7 @@ typedef enum { } Options; static bool m_opt = FALSE; +static bool pass_ctls = FALSE; static bool w_opt = FALSE; static int n_opt = -1; @@ -81,6 +82,7 @@ static size_t temp_length; #define TempBuffer(source_len, source_cast) \ if (source != 0) { \ + const char *temp; \ size_t need = source_len + 1; \ wchar_t have[2]; \ int n = 0; \ @@ -93,7 +95,18 @@ static size_t temp_length; have[1] = 0; \ do { \ have[0] = source_cast; \ - setcchar(&temp_buffer[n++], have, A_NORMAL, 0, NULL); \ + if (!pass_ctls \ + && have[0] != 0 \ + && have[0] < 256 \ + && (temp = unctrl((chtype) have[0])) != 0 \ + && strlen(temp) > 1) { \ + while (*temp != '\0') { \ + have[0] = *temp++; \ + setcchar(&temp_buffer[n++], have, A_NORMAL, 0, NULL); \ + } \ + } else { \ + setcchar(&temp_buffer[n++], have, A_NORMAL, 0, NULL); \ + } \ } while (have[0] != 0); \ } else if (temp_buffer != 0) { \ free(temp_buffer); \ @@ -102,6 +115,26 @@ static size_t temp_length; } \ return temp_buffer; +static size_t +ChWLen(const wchar_t *source) +{ + size_t result = wcslen(source); + + if (!pass_ctls) { + size_t adjust = 0; + size_t n; + char *s; + + for (n = 0; n < result; ++n) { + if (source[n] < 256 && (s = unctrl((chtype) source[n])) != 0) { + adjust += (strlen(s) - 1); + } + } + result += adjust; + } + return result; +} + static cchar_t * ChStr(const char *source) { @@ -111,13 +144,13 @@ ChStr(const char *source) static cchar_t * ChWStr(const wchar_t *source) { - TempBuffer(wcslen(source), *source++); + TempBuffer(ChWLen(source), *source++); } static void legend(WINDOW *win, int level, Options state, wchar_t *buffer, int length) { - NCURSES_CONST char *showstate; + const char *showstate; switch (state) { default: @@ -139,7 +172,7 @@ legend(WINDOW *win, int level, Options state, wchar_t *buffer, int length) wprintw(win, "The Strings/Chars displays should match. Enter any characters, except:\n"); wprintw(win, - "down-arrow or ^N to repeat on next line, 'w' for inner window, 'q' to exit.\n"); + "down-arrow or ^N to repeat on next line, ^W for inner window, ESC to exit.\n"); wclrtoeol(win); wprintw(win, "Level %d,%s added %d characters <", level, showstate, length); @@ -499,6 +532,7 @@ usage(void) ," -f FILE read data from given file" ," -n NUM limit string-adds to NUM bytes on ^N replay" ," -m perform wmove/move separately from add-functions" + ," -p pass-thru control characters without using unctrl()" ," -w use window-parameter even when stdscr would be implied" }; unsigned n; @@ -514,7 +548,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "f:mn:w")) != -1) { + while ((ch = getopt(argc, argv, "f:mn:pw")) != -1) { switch (ch) { case 'f': init_linedata(optarg); @@ -527,6 +561,9 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) if (n_opt == 0) n_opt = -1; break; + case 'p': + pass_ctls = TRUE; + break; case 'w': w_opt = TRUE; break; diff --git a/test/test_addchstr.c b/test/test_addchstr.c index 3cb43135..815ccc59 100644 --- a/test/test_addchstr.c +++ b/test/test_addchstr.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_addchstr.c,v 1.6 2010/05/01 19:13:46 tom Exp $ + * $Id: test_addchstr.c,v 1.13 2010/12/12 01:28:24 tom Exp $ * * Demonstrate the waddchstr() and waddch functions. * Thomas Dickey - 2009/9/12 @@ -61,31 +61,59 @@ typedef enum { } Options; static bool m_opt = FALSE; +static bool pass_ctls = FALSE; static bool w_opt = FALSE; static int n_opt = -1; +static attr_t show_attr; static chtype *temp_buffer; static size_t temp_length; #define TempBuffer(source_cast) +static size_t +ChLen(const char *source) +{ + size_t result = strlen(source); + + if (!pass_ctls) { + size_t adjust = 0; + size_t n; + + for (n = 0; n < result; ++n) { + const char *s = unctrl(UChar(source[n])); + if (s != 0) { + adjust += (strlen(s) - 1); + } + } + result += adjust; + } + return result; +} + static chtype * ChStr(const char *source) { if (source != 0) { - size_t need = strlen(source) + 1; - wchar_t have[2]; + size_t need = ChLen(source) + 1; int n = 0; if (need > temp_length) { temp_length = need * 2; temp_buffer = typeRealloc(chtype, temp_length, temp_buffer); } - have[0] = 0; - have[1] = 0; do { - temp_buffer[n++] = UChar(*source++); - } while (have[0] != 0); + const char *s; + chtype ch = UChar(*source++); + if (!pass_ctls && (s = unctrl(ch)) != 0) { + while (*s != '\0') { + temp_buffer[n++] = UChar(*s++); + } + } else { + temp_buffer[n++] = ch; + } + } while (source[0] != 0); + temp_buffer[n] = 0; } else if (temp_buffer != 0) { free(temp_buffer); temp_buffer = 0; @@ -94,10 +122,23 @@ ChStr(const char *source) return temp_buffer; } +/* color the strings drawn in the workspace */ +static chtype * +ChStr2(const char *source) +{ + size_t len = ChLen(source); + size_t n; + chtype *result = ChStr(source); + for (n = 0; n < len; ++n) { + result[n] |= show_attr; + } + return result; +} + static void legend(WINDOW *win, int level, Options state, char *buffer, int length) { - NCURSES_CONST char *showstate; + const char *showstate; switch (state) { default: @@ -119,7 +160,7 @@ legend(WINDOW *win, int level, Options state, char *buffer, int length) wprintw(win, "The Strings/Chars displays should match. Enter any characters, except:\n"); wprintw(win, - "down-arrow or ^N to repeat on next line, 'w' for inner window, 'q' to exit.\n"); + "down-arrow or ^N to repeat on next line, ^W for inner window, ESC to exit.\n"); wclrtoeol(win); wprintw(win, "Level %d,%s added %d characters <%s>", level, showstate, length, buffer); @@ -236,7 +277,10 @@ test_adds(int level) if (has_colors()) { start_color(); init_pair(1, COLOR_WHITE, COLOR_BLUE); - wbkgdset(work, COLOR_PAIR(1) | ' '); + show_attr = COLOR_PAIR(1); + wbkgdset(work, show_attr | ' '); + } else { + show_attr = A_STANDOUT; } while ((ch = read_linedata(work)) != ERR && !isQUIT(ch)) { @@ -266,12 +310,12 @@ test_adds(int level) for (col = 0; col < length; col += n_opt) { col2 = ColOf(buffer, col, margin); if (move(row, col2) != ERR) { - AddNStr(ChStr(buffer + col), LEN(col)); + AddNStr(ChStr2(buffer + col), LEN(col)); } } } else { if (move(row, col2) != ERR) { - AddStr(ChStr(buffer)); + AddStr(ChStr2(buffer)); } } break; @@ -279,10 +323,10 @@ test_adds(int level) if (n_opt > 1) { for (col = 0; col < length; col += n_opt) { col2 = ColOf(buffer, col, margin); - MvAddNStr(row, col2, ChStr(buffer + col), LEN(col)); + MvAddNStr(row, col2, ChStr2(buffer + col), LEN(col)); } } else { - MvAddStr(row, col2, ChStr(buffer)); + MvAddStr(row, col2, ChStr2(buffer)); } break; case oWindow: @@ -290,12 +334,12 @@ test_adds(int level) for (col = 0; col < length; col += n_opt) { col2 = ColOf(buffer, col, margin); if (wmove(work, row, col2) != ERR) { - WAddNStr(work, ChStr(buffer + col), LEN(col)); + WAddNStr(work, ChStr2(buffer + col), LEN(col)); } } } else { if (wmove(work, row, col2) != ERR) { - WAddStr(work, ChStr(buffer)); + WAddStr(work, ChStr2(buffer)); } } break; @@ -303,11 +347,11 @@ test_adds(int level) if (n_opt > 1) { for (col = 0; col < length; col += n_opt) { col2 = ColOf(buffer, col, margin); - MvWAddNStr(work, row, col2, ChStr(buffer + col), + MvWAddNStr(work, row, col2, ChStr2(buffer + col), LEN(col)); } } else { - MvWAddStr(work, row, col2, ChStr(buffer)); + MvWAddStr(work, row, col2, ChStr2(buffer)); } break; } @@ -355,19 +399,19 @@ test_adds(int level) switch (option) { case oDefault: if (move(row, col) != ERR) { - AddStr(ChStr(buffer + length - 1)); + AddStr(ChStr2(buffer + length - 1)); } break; case oMove: - MvAddStr(row, col, ChStr(buffer + length - 1)); + MvAddStr(row, col, ChStr2(buffer + length - 1)); break; case oWindow: if (wmove(work, row, col) != ERR) { - WAddStr(work, ChStr(buffer + length - 1)); + WAddStr(work, ChStr2(buffer + length - 1)); } break; case oMoveWindow: - MvWAddStr(work, row, col, ChStr(buffer + length - 1)); + MvWAddStr(work, row, col, ChStr2(buffer + length - 1)); break; } @@ -418,6 +462,7 @@ usage(void) ," -f FILE read data from given file" ," -n NUM limit string-adds to NUM bytes on ^N replay" ," -m perform wmove/move separately from add-functions" + ," -p pass-thru control characters without using unctrl()" ," -w use window-parameter even when stdscr would be implied" }; unsigned n; @@ -433,7 +478,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "f:mn:w")) != -1) { + while ((ch = getopt(argc, argv, "f:mn:pw")) != -1) { switch (ch) { case 'f': init_linedata(optarg); @@ -446,6 +491,9 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) if (n_opt == 0) n_opt = -1; break; + case 'p': + pass_ctls = TRUE; + break; case 'w': w_opt = TRUE; break; diff --git a/test/test_addstr.c b/test/test_addstr.c index ea3f5c9c..5cc184a2 100644 --- a/test/test_addstr.c +++ b/test/test_addstr.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_addstr.c,v 1.4 2010/05/01 19:13:46 tom Exp $ + * $Id: test_addstr.c,v 1.6 2010/12/12 00:17:37 tom Exp $ * * Demonstrate the waddstr() and waddch functions. * Thomas Dickey - 2009/9/12 @@ -62,7 +62,7 @@ static int n_opt = -1; static void legend(WINDOW *win, int level, Options state, char *buffer, int length) { - NCURSES_CONST char *showstate; + const char *showstate; switch (state) { default: @@ -84,7 +84,7 @@ legend(WINDOW *win, int level, Options state, char *buffer, int length) wprintw(win, "The Strings/Chars displays should match. Enter any characters, except:\n"); wprintw(win, - "down-arrow or ^N to repeat on next line, 'w' for inner window, 'q' to exit.\n"); + "down-arrow or ^N to repeat on next line, ^W for inner window, ESC to exit.\n"); wclrtoeol(win); wprintw(win, "Level %d,%s added %d characters <%s>", level, showstate, length, buffer); diff --git a/test/test_addwstr.c b/test/test_addwstr.c index 5a45a9c1..92334aee 100644 --- a/test/test_addwstr.c +++ b/test/test_addwstr.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_addwstr.c,v 1.4 2010/11/13 21:13:53 tom Exp $ + * $Id: test_addwstr.c,v 1.6 2010/12/12 00:18:00 tom Exp $ * * Demonstrate the waddwstr() and wadd_wch functions. * Thomas Dickey - 2009/9/12 @@ -79,7 +79,7 @@ static int n_opt = -1; static void legend(WINDOW *win, int level, Options state, wchar_t *buffer, int length) { - NCURSES_CONST char *showstate; + const char *showstate; switch (state) { default: @@ -101,7 +101,7 @@ legend(WINDOW *win, int level, Options state, wchar_t *buffer, int length) wprintw(win, "The Strings/Chars displays should match. Enter any characters, except:\n"); wprintw(win, - "down-arrow or ^N to repeat on next line, 'w' for inner window, 'q' to exit.\n"); + "down-arrow or ^N to repeat on next line, ^W for inner window, ESC to exit.\n"); wclrtoeol(win); wprintw(win, "Level %d,%s inserted %d characters <", level, showstate, length);