Initial import from FreeBSD RELENG_4:
[dragonfly.git] / gnu / lib / libdialog / TESTS / fselect.c
1 /*
2  * small test-driver for new dialog functionality
3  *
4  * Copyright (c) 1995, Jordan Hubbard
5  *
6  * All rights reserved.
7  *
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.
15  *
16  * $FreeBSD: src/gnu/lib/libdialog/TESTS/fselect.c,v 1.5 2000/01/10 11:52:04 phantom Exp $
17  */
18
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include <string.h>
22 #include <unistd.h>
23 #include <sys/wait.h>
24 #include <dialog.h>
25
26 /* Kick it off, James! */
27 int
28 main(int argc, char **argv)
29 {
30   char *retval;
31
32   init_dialog();
33
34   retval = dialog_fselect(".", "*.[ch]");
35   dialog_clear();
36   if (retval)
37     fprintf(stderr, "returned value for dialog_fselect was %s\n", retval);
38   else
39     fprintf(stderr, "returned value for dialog_fselect was NULL\n");
40
41   end_dialog();
42   return 0;
43 }