]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/ins_wide.c
ncurses 5.8 - patch 20110305
[ncurses.git] / test / ins_wide.c
index 157a602c42d44bae2b56be405363a9b71c91419b..87deb1a14d53b75eb8cb102399c9437452666045 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: ins_wide.c,v 1.12 2010/05/01 19:12:26 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);
@@ -146,7 +146,7 @@ ConvertCh(chtype source, cchar_t *target)
 {
     wchar_t tmp_wchar[2];
 
-    tmp_wchar[0] = source;
+    tmp_wchar[0] = (wchar_t) source;
     tmp_wchar[1] = 0;
     if (setcchar(target, tmp_wchar, A_NORMAL, 0, (void *) 0) == ERR) {
        beep();
@@ -412,19 +412,19 @@ test_inserts(int level)
            switch (option) {
            case oDefault:
                if (move(limit + row, col) != ERR) {
-                   InsCh(ch);
+                   InsCh((chtype) ch);
                }
                break;
            case oMove:
-               MvInsCh(limit + row, col, ch);
+               MvInsCh(limit + row, col, (chtype) ch);
                break;
            case oWindow:
                if (wmove(work, limit + row, col) != ERR) {
-                   WInsCh(work, ch);
+                   WInsCh(work, (chtype) ch);
                }
                break;
            case oMoveWindow:
-               MvWInsCh(work, limit + row, col, ch);
+               MvWInsCh(work, limit + row, col, (chtype) ch);
                break;
            }