lib

morphux C utility library
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/lib

commit 34189edd7a243137c89a74947c6d3a2f26c5859f
parent c45657ea6b595f08c042e693dac80f46079ce21e
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Tue, 24 Jan 2017 15:15:20 +0100

Fix(m_args, m_print): _exit -> exit:

For coverage and standard issues

Diffstat:
Minc/m_args.h | 1+
Minc/m_print.h | 1+
Msrc/m_args.c | 4++--
Msrc/m_print.c | 4++--
4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/inc/m_args.h b/inc/m_args.h @@ -18,6 +18,7 @@ # define M_ARGS_H # include <stdbool.h> +# include <stdlib.h> # include <m_types.h> # include <m_print.h> # include <m_infos.h> diff --git a/inc/m_print.h b/inc/m_print.h @@ -19,6 +19,7 @@ # include <stdarg.h> # include <stdio.h> +# include <stdlib.h> # include <fcntl.h> # include <string.h> # include <unistd.h> diff --git a/src/m_args.c b/src/m_args.c @@ -160,7 +160,7 @@ void opt_help(const margs_t *args, u8_t ret) { m_info("If an argument requires a value, you can set it two ways:\n"); m_info("\t-o value\n"); m_info("\t--option=value\n"); - _exit(ret); + exit(ret); } /*! @@ -171,5 +171,5 @@ void p_version(u8_t ret) { m_info("Program: %s\n", get_program_name()); m_info("Version: %s\n", get_version()); m_info("%s\n", get_maintainer()); - _exit(ret); + exit(ret); } diff --git a/src/m_print.c b/src/m_print.c @@ -17,7 +17,7 @@ #include <m_print.h> /*! - * \brief Print a string in an error fomat, then call _exit with 1 + * \brief Print a string in an error fomat, then call exit with 1 * \note Support printf format */ void m_panic(const char *str, ...) { @@ -29,7 +29,7 @@ void m_panic(const char *str, ...) { va_end(ap); if (str[strlen(str) - 1] != '\n') fprintf(stderr, "\n"); - _exit(1); + exit(1); } /*!