aboutsummaryrefslogtreecommitdiff
path: root/examples_library/infobox.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples_library/infobox.c')
-rw-r--r--examples_library/infobox.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/examples_library/infobox.c b/examples_library/infobox.c
index 74f34bba91e1..c022fa755fc6 100644
--- a/examples_library/infobox.c
+++ b/examples_library/infobox.c
@@ -18,15 +18,22 @@ int main()
int output;
struct bsddialog_conf conf;
+ if (bsddialog_init() == BSDDIALOG_ERROR) {
+ printf("Error: %s\n", bsddialog_geterror());
+ return (1);
+ }
+
bsddialog_initconf(&conf);
conf.title = "infobox";
-
- if (bsddialog_init() < 0)
- return -1;
-
- output = bsddialog_infobox(&conf, "Example", 7, 20);
+ conf.sleep = 3;
+ output = bsddialog_infobox(&conf, "Example\n(3 seconds)", 7, 20);
bsddialog_end();
- return output;
-}
+ if (output == BSDDIALOG_ERROR) {
+ printf("Error: %s\n", bsddialog_geterror());
+ return (1);
+ }
+
+ return (output);
+} \ No newline at end of file