X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdemo_forms.c;h=a4b0724f601a4145a8690766d2b359806a6395bc;hp=7c0de1b9e3c392af3d05a352a04dac19f02214b3;hb=4ae6d1c18d0dec956b814865893812655ec3a22c;hpb=027ae42953e3186daed8f3882da73de48291b606;ds=sidebyside diff --git a/test/demo_forms.c b/test/demo_forms.c index 7c0de1b9..a4b0724f 100644 --- a/test/demo_forms.c +++ b/test/demo_forms.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2003-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 2003-2006,2007 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: demo_forms.c,v 1.22 2006/12/10 00:30:24 tom Exp $ + * $Id: demo_forms.c,v 1.24 2007/07/21 17:45:09 tom Exp $ * * Demonstrate a variety of functions from the form library. * Thomas Dickey - 2003/4/26 @@ -322,6 +322,10 @@ demo_forms(void) int pg; WINDOW *also; +#ifdef NCURSES_MOUSE_VERSION + mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0); +#endif + help_edit_field(); mvaddstr(4, 57, "Forms Entry Test"); @@ -423,6 +427,10 @@ demo_forms(void) free_field(f[c]); noraw(); nl(); + +#ifdef NCURSES_MOUSE_VERSION + mousemask(0, (mmask_t *) 0); +#endif } static void @@ -451,7 +459,7 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "dj:m:o:t:")) != EOF) { + while ((ch = getopt(argc, argv, "dj:m:o:t:")) != -1) { switch (ch) { case 'd': d_option = TRUE;