Add WARNS and set to 6.
[dragonfly.git] / gnu / lib / libdialog / TESTS / ftree2.c
1 /*
2  * ftree2.c
3  *
4  * small test-driver for new dialog functionality
5  *
6  * Copyright (c) 1998, Anatoly A. Orehovsky
7  *
8  * file ./ftree2.test with xterm widget tree from 
9  * preprocess editres(1) dump needed !!!
10  *
11  * $FreeBSD: src/gnu/lib/libdialog/TESTS/ftree2.c,v 1.2 2000/01/10 11:52:05 phantom Exp $
12  * $DragonFly: src/gnu/lib/libdialog/TESTS/ftree2.c,v 1.2 2003/06/17 04:25:44 dillon Exp $
13  */
14
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <dialog.h>
18
19 int
20 main(int argc, char **argv)
21 {
22         int retval;
23         unsigned char *tresult;
24
25         init_dialog();
26         use_helpfile("ftree2.test");
27         use_helpline("Press Arrows, Tab, Enter or F1");
28         retval = dialog_ftree("ftree2.test", '\t',
29                 "ftree dialog box example",
30                 "xterm widget tree from preprocess editres(1) dump", 
31                 -1, -1, 15,
32                             &tresult);
33
34         dialog_update();
35         
36         dialog_clear();
37         
38         end_dialog();
39
40         if (!retval)
41         {
42                 puts(tresult);
43                 free(tresult);
44         }
45         
46         exit(retval);
47 }