X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Finch_wide.c;h=82e95f80ac8738466087b89261c7ddc5920223ef;hp=3d31f1787fa2e84b645698b8c01b5e8f1c2da678;hb=5e1e572b71ae31a6071daa24e2460a68a6f1003c;hpb=a924c24b2535cccdc0f5f991cd8ddcadcfa1f0d2 diff --git a/test/inch_wide.c b/test/inch_wide.c index 3d31f178..82e95f80 100644 --- a/test/inch_wide.c +++ b/test/inch_wide.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2007,2010 Free Software Foundation, Inc. * + * Copyright (c) 2007-2010,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,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: inch_wide.c,v 1.7 2010/05/01 19:13:46 tom Exp $ + * $Id: inch_wide.c,v 1.8 2017/04/15 18:52:39 tom Exp $ */ /* int in_wch(cchar_t *wcval); @@ -44,6 +44,7 @@ */ #include +#include #if USE_WIDEC_SUPPORT @@ -59,6 +60,17 @@ Quit(int ch) static int test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) { + static const char *help[] = + { + "Test input from screen using inch(), etc., in a moveable viewport.", + "", + "Commands:", + " ESC/^Q - quit", + " h,j,k,l (and arrow-keys) - move viewport", + " w - recur to new window", + 0 + }; + WINDOW *txtbox = 0; WINDOW *txtwin = 0; FILE *fp; @@ -148,6 +160,9 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) wnoutrefresh(txtwin); } break; + case HELP_KEY_1: + popup_msg(txtwin, help); + break; default: beep(); break;