X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Frain.c;h=f3f7aa495840885efde47664de92e50d91242906;hp=0f123ba87b51f522e7220c09618a2ff60c2e3beb;hb=ed646e3f683083e787c6ba773364401dc9fa9d40;hpb=73b54c0812e4b8dfddcf87f59c7488bb3c10e10d diff --git a/test/rain.c b/test/rain.c index 0f123ba8..f3f7aa49 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.43 2017/04/30 01:08:14 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,13 @@ main(int argc GCC_UNUSED, case (KEY_RESIZE): break; #endif + case HELP_KEY_1: + popup_msg(stdscr, help); + break; + case ERR: + break; + default: + beep(); } napms(50); }