summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralejandro-colomar <colomar.6.4.3@gmail.com>2019-08-09 23:31:15 +0200
committeralejandro-colomar <colomar.6.4.3@gmail.com>2019-08-09 23:31:15 +0200
commit2d34ea4f35a93ab9a9ee9ccc504caa298ed34559 (patch)
treef95bf11749b346570f8030d229a3656cdbad8b81
parent4f78e1f03d56a837b40cd5301d77feccd3a9b1dd (diff)
Use alx_perror()
-rwxr-xr-xsrc/menu/clui.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/menu/clui.c b/src/menu/clui.c
index 3a6539b..c62280f 100755
--- a/src/menu/clui.c
+++ b/src/menu/clui.c
@@ -13,8 +13,9 @@
#include <stdio.h>
#include <stdlib.h>
-#include "libalx/base/compiler/size.h"
-#include "libalx/base/stdio/get.h"
+#include <libalx/base/compiler/size.h>
+#include <libalx/base/errno/error.h>
+#include <libalx/base/stdio/get.h>
#include "mine-sweeper/about/about.h"
#include "mine-sweeper/ctrl/start.h"
@@ -107,10 +108,10 @@ void menu_clui (void)
err_fgets:
- printf("fgets() error\n");
+ alx_perror("fgets() error\n");
exit(EXIT_FAILURE);
err_sscanf:
- printf("sscanf() error\n");
+ alx_perror(buff);
exit(EXIT_FAILURE);
}
@@ -169,10 +170,10 @@ static void menu_clui_rand (void)
err_fgets:
- printf("fgets() error\n");
+ alx_perror("fgets() error\n");
exit(EXIT_FAILURE);
err_sscanf:
- printf("sscanf() error\n");
+ alx_perror(buff);
exit(EXIT_FAILURE);
}
@@ -230,10 +231,10 @@ static void menu_clui_start (void)
err_fgets:
- printf("fgets() error\n");
+ alx_perror("fgets() error\n");
exit(EXIT_FAILURE);
err_sscanf:
- printf("sscanf() error\n");
+ alx_perror(buff);
exit(EXIT_FAILURE);
}