X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=test%2Frain.c;h=f5ec33ac74aaff25d0da6d249bee633b568da92d;hb=5e1e572b71ae31a6071daa24e2460a68a6f1003c;hp=0f123ba87b51f522e7220c09618a2ff60c2e3beb;hpb=a924c24b2535cccdc0f5f991cd8ddcadcfa1f0d2;p=ncurses.git diff --git a/test/rain.c b/test/rain.c index 0f123ba8..f5ec33ac 100644 --- a/test/rain.c +++ b/test/rain.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2012,2014 Free Software Foundation, Inc. * + * Copyright (c) 1998-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,9 +26,10 @@ * authorization. * ****************************************************************************/ /* - * $Id: rain.c,v 1.41 2014/08/02 17:24:07 tom Exp $ + * $Id: rain.c,v 1.42 2017/04/15 19:32:33 tom Exp $ */ #include +#include /* rain 11/3/1980 EPS/CITHEP */ @@ -292,6 +293,16 @@ int main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) { + static const char *help[] = + { + "Commands:", + " q/Q exit the program", + " s do single-step", + " undo single-step", + "", + 0 + }; + bool done = FALSE; DATA drop; #ifndef USE_PTHREADS @@ -373,6 +384,11 @@ main(int argc GCC_UNUSED, case (KEY_RESIZE): break; #endif + case HELP_KEY_1: + popup_msg(stdscr, help); + break; + default: + beep(); } napms(50); }