Move acpica-unix-20050309 into the Attic
[dragonfly.git] / gnu / lib / libdialog / TESTS / input1.c
blob31d7883df52347d62f9fd2175d9667388a5ae16c
1 /*
2 * small test-driver for new dialog functionality
4 * Copyright (c) 1995, Jordan Hubbard
6 * All rights reserved.
8 * This source code may be used, modified, copied, distributed, and
9 * sold, in both source and binary form provided that the above
10 * copyright and these terms are retained, verbatim, as the first
11 * lines of this file. Under no circumstances is the author
12 * responsible for the proper functioning of the software nor does
13 * the author assume any responsibility for damages incurred with
14 * its use.
16 * $FreeBSD: src/gnu/lib/libdialog/TESTS/input1.c,v 1.5 2000/01/10 11:52:05 phantom Exp $
17 * $DragonFly: src/gnu/lib/libdialog/TESTS/input1.c,v 1.2 2003/06/17 04:25:44 dillon Exp $
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include <string.h>
23 #include <unistd.h>
24 #include <sys/wait.h>
25 #include <dialog.h>
27 /* Kick it off, James! */
28 int
29 main(int argc, char **argv)
31 int retval;
32 unsigned char result[128];
34 init_dialog();
36 strcpy(result, "not this!");
37 retval = dialog_inputbox("this is dialog_inputbox() in action, test #1",
38 "Enter something really profound below, please.",
39 -1, -1, result);
40 dialog_clear();
41 fprintf(stderr, "returned value for dialog_inputbox was %d (%s)\n", retval, result);
43 end_dialog();
44 return 0;