X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Finsdelln.c;h=84fc9996dcca36a48dd6c833cd26b1b3c7a826a6;hp=34fb388db7f60fe5e75f87e8e4d71c9ef055734a;hb=a8e3f06ac309504143cd56ac9ec55889bfdf4914;hpb=73b54c0812e4b8dfddcf87f59c7488bb3c10e10d diff --git a/test/insdelln.c b/test/insdelln.c index 34fb388d..84fc9996 100644 --- a/test/insdelln.c +++ b/test/insdelln.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2008-2012,2014 Free Software Foundation, Inc. * + * Copyright (c) 2008-2014,2017 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 * @@ -26,12 +26,13 @@ * authorization. * ****************************************************************************/ /* - * $Id: insdelln.c,v 1.9 2014/08/02 23:09:32 tom Exp $ + * $Id: insdelln.c,v 1.10 2017/04/15 17:40:11 tom Exp $ * * test-driver for deleteln, wdeleteln, insdelln, winsdelln, insertln, winsertln */ #include +#include #define SHOW(n) ((n) == ERR ? "ERR" : "OK") #define COLOR_DEFAULT (-1) @@ -217,19 +218,10 @@ show_help(WINDOW *win) ,"q quit" ,"= resets count to zero." ,"? shows this help-window" - ,"" - ,"" + ,0 }; - int y_max, x_max; - int row; - - getmaxyx(win, y_max, x_max); - for (row = 0; row < (int) SIZEOF(table) && row < y_max; ++row) { - MvWPrintw(win, row, 0, "%.*s", x_max, table[row]); - } - while (wgetch(win) != 'q') - beep(); + popup_msg(win, table); } static void @@ -279,8 +271,8 @@ update_status(WINDOW *win, STATUS * sp) sp->count = 0; show_status(win, sp); break; - case '?': - do_subwindow(win, sp, show_help); + case HELP_KEY_1: + show_help(win); break; default: if (isdigit(sp->ch)) {