diff options
author | Alfonso Siciliano <alfsiciliano@gmail.com> | 2022-01-28 08:14:55 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2022-01-28 08:14:55 +0000 |
commit | 02db4a1234b3bd9cf153e567827fd387cf91bfb2 (patch) | |
tree | 6a8d148a11a4a9d58ba1adb078d72e491339652b /examples_library/infobox.c | |
parent | 77a55d2c3b4dd48a9a608736a9ba7ebce700bae1 (diff) |
Diffstat (limited to 'examples_library/infobox.c')
-rw-r--r-- | examples_library/infobox.c | 21 |
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 |