diff options
Diffstat (limited to 'src/b_sqb.c')
-rw-r--r-- | src/b_sqb.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/b_sqb.c b/src/b_sqb.c index fb52e00..a5a0fd5 100644 --- a/src/b_sqb.c +++ b/src/b_sqb.c @@ -14,6 +14,7 @@ #include <stdint.h> #include <unistd.h> +#include "b_sqb_err.h" #include "b_sqb_file.h" #include "b_sqb_nbr.h" #include "b_sqb_str.h" @@ -21,12 +22,6 @@ #include "s_struct.h" #include "u_utils.h" -static void - b_sqb_unexpected_operator(const char op[]) -{ - ft_dprintf(STDERR_FILENO, "[: %s: unexpected operator\n", op); -} - static uint8_t b_get_sqb_id(char *argv[], t_msh *msh) @@ -61,10 +56,11 @@ static uint8_t id = b_get_sqb_id(argv, msh); if (id == FT_ID_SQB_COUNT) { - b_sqb_unexpected_operator(argv[0]); + ft_dprintf(STDERR_FILENO, "[: %s: unexpected operator\n", argv[0]); return (2); } - /* TODO: check errors */ + if (b_sqb_err_check(id, argv) != 0) + return (2); ret = 0; if (id < FT_ID_SQB_NT && id != FT_ID_SQB_Z && id != FT_ID_SQB_N) ret = b_sqb_file_tests(id, argv); |