Initial import from FreeBSD RELENG_4:
[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  */
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         use_helpfile("ftree2.test");
26         use_helpline("Press Arrows, Tab, Enter or F1");
27         retval = dialog_ftree("ftree2.test", '\t',
28                 "ftree dialog box example",
29                 "xterm widget tree from preprocess editres(1) dump", 
30                 -1, -1, 15,
31                             &tresult);
32
33         dialog_update();
34         
35         dialog_clear();
36         
37         end_dialog();
38
39         if (!retval)
40         {
41                 puts(tresult);
42                 free(tresult);
43         }
44         
45         exit(retval);
46 }