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