]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - gnu/lib/libodialog/TESTS/gauge.c
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / gnu / lib / libodialog / TESTS / gauge.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
17 #include <sys/cdefs.h>
18 __FBSDID("$FreeBSD$");
19
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include <string.h>
23 #include <unistd.h>
24 #include <sys/wait.h>
25 #include <dialog.h>
26
27 /* Kick it off, James! */
28 int
29 main(int argc, char **argv)
30 {
31   int i;
32
33   init_dialog();
34
35   for (i = 0; i <= 100; i++) {
36     dialog_gauge("Gas tank", "When this gets 100% full, you'd better yank out the nozzle!", 10, 1, 7, 70, i);
37     usleep(30000);
38   }
39   end_dialog();
40   return 0;
41 }