aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/test/testscanw.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
commit7a69bbfb278952228c9aa1eca241e65fcdef425e (patch)
treee83b2ef47811e687a6c54035c9af6d4a2b7f14e1 /contrib/ncurses/test/testscanw.c
parent18259542b2f8fa7e3f76f4bb0dd37995dfd424aa (diff)
downloadsrc-7a69bbfb278952228c9aa1eca241e65fcdef425e.tar.gz
src-7a69bbfb278952228c9aa1eca241e65fcdef425e.zip
Import ncurses-5.2-20010512 onto the vendor branch
Obtained from: ftp://dickey.his.com/ncurses/
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=76726
Diffstat (limited to 'contrib/ncurses/test/testscanw.c')
-rw-r--r--contrib/ncurses/test/testscanw.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/contrib/ncurses/test/testscanw.c b/contrib/ncurses/test/testscanw.c
index 8420ea0fc55a..c9a16232f3c4 100644
--- a/contrib/ncurses/test/testscanw.c
+++ b/contrib/ncurses/test/testscanw.c
@@ -2,37 +2,38 @@
* Date: 1997/03/17
* From: bayern@morpheus.cis.yale.edu
*
- * $Id: testscanw.c,v 1.5 1997/09/20 14:16:20 tom Exp $
+ * $Id: testscanw.c,v 1.6 2000/11/04 23:32:56 tom Exp $
*/
#include <test.priv.h>
#include <ctype.h>
-int main(int argc, char *argv[])
+int
+main(int argc, char *argv[])
{
- long badanswer = 1;
- long *response = &badanswer;
+ long badanswer = 1;
+ long *response = &badanswer;
- initscr();
- scrollok(stdscr, TRUE);
- idlok(stdscr, TRUE);
- echo();
+ initscr();
+ scrollok(stdscr, TRUE);
+ idlok(stdscr, TRUE);
+ echo();
#if 0
- trace(TRACE_UPDATE|TRACE_CALLS);
+ trace(TRACE_UPDATE | TRACE_CALLS);
#endif
- while (argc > 1) {
- if (isdigit(*argv[1]))
- move(atoi(argv[1]), 0);
- else if (!strcmp(argv[1], "-k"))
- keypad(stdscr, TRUE);
- argc--, argv++;
- }
+ while (argc > 1) {
+ if (isdigit(CharOf(*argv[1])))
+ move(atoi(argv[1]), 0);
+ else if (!strcmp(argv[1], "-k"))
+ keypad(stdscr, TRUE);
+ argc--, argv++;
+ }
- while (badanswer) {
- printw("Enter a number (0 to quit):\n");
- printw("--> ");
- scanw("%20ld", response); /* yes, it's a pointer */
- }
- endwin();
- return EXIT_SUCCESS;
+ while (badanswer) {
+ printw("Enter a number (0 to quit):\n");
+ printw("--> ");
+ scanw("%20ld", response); /* yes, it's a pointer */
+ }
+ endwin();
+ return EXIT_SUCCESS;
}