diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-01-12 14:55:02 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-01-12 14:55:02 +0000 |
commit | 3d4e8889889e5e36302454225999f7e146d3219c (patch) | |
tree | fa315b999f531039df54ab7af8e99f7e8daad77c /gnu/lib/libodialog/TESTS/ftree1.c | |
parent | b905920a72950a63c9782b4911d252bfac08db6e (diff) | |
download | FreeBSD-src-3d4e8889889e5e36302454225999f7e146d3219c.zip FreeBSD-src-3d4e8889889e5e36302454225999f7e146d3219c.tar.gz |
Update dialog to version 20100428. This changes the license under which
dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new
features and a new and better libdialog API. The existing libdialog will
be kept temporarily as libodialog for compatibility purposes until sade,
sysinstall and tzsetup have been either updated or replaced.
__FreeBSD_version is now 900030.
Discussed on: -current
Approved by: core
Obtained from: http://invisible-island.net/dialog
Diffstat (limited to 'gnu/lib/libodialog/TESTS/ftree1.c')
-rw-r--r-- | gnu/lib/libodialog/TESTS/ftree1.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gnu/lib/libodialog/TESTS/ftree1.c b/gnu/lib/libodialog/TESTS/ftree1.c new file mode 100644 index 0000000..f21e0e5 --- /dev/null +++ b/gnu/lib/libodialog/TESTS/ftree1.c @@ -0,0 +1,45 @@ +/* + * ftree1.c + * + * small test-driver for new dialog functionality + * + * Copyright (c) 1998, Anatoly A. Orehovsky + * + * file ./ftree1.test with xterm widget tree from + * direct editres(1) dump needed !!! + */ + +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + +#include <stdio.h> +#include <stdlib.h> +#include <dialog.h> + +int +main(int argc, char **argv) +{ + int retval; + unsigned char *tresult; + + init_dialog(); + retval = dialog_ftree("ftree1.test", '\t', + "ftree dialog box example", + "xterm widget tree from direct editres(1) dump", + -1, -1, 15, + &tresult); + + dialog_update(); + + dialog_clear(); + + end_dialog(); + + if (!retval) + { + puts(tresult); + free(tresult); + } + + exit(retval); +} |