aboutsummaryrefslogtreecommitdiff
path: root/examples_library/pause.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples_library/pause.c')
-rw-r--r--examples_library/pause.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/examples_library/pause.c b/examples_library/pause.c
index eb693325a18d..62c35afb0192 100644
--- a/examples_library/pause.c
+++ b/examples_library/pause.c
@@ -18,12 +18,13 @@ 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 = "pause";
-
- if (bsddialog_init() < 0)
- return -1;
-
output = bsddialog_pause(&conf, "Example", 8, 50, 10);
bsddialog_end();
@@ -32,9 +33,6 @@ int main()
case BSDDIALOG_OK:
printf("OK\n");
break;
- case BSDDIALOG_ESC:
- printf("ESC\n");
- break;
case BSDDIALOG_CANCEL:
printf("Cancel\n");
break;
@@ -46,5 +44,5 @@ int main()
break;
}
- return output;
-}
+ return (output);
+} \ No newline at end of file