libmpm

morphux C package management library
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/libmpm

commit 321bca70a4df5ffa3784f7c1350ef8b7a4ff96d8
parent 9d3a444bf01ba87255c7ac4a667b950e32233ac8
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Mon,  6 Mar 2017 19:40:56 +0100

Fix(Comment style): flags.{c,h}

Diffstat:
Minc/files.h | 10+++++++++-
Minc/flags.h | 15+++++++++++++++
Msrc/flags.c | 14--------------
3 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/inc/files.h b/inc/files.h @@ -45,8 +45,16 @@ typedef struct file_s { char *hash; } file_t; - +/*! + * \brief Initialize a file_t structure + * \param ptr Structure to initialize + */ void mpm_file_init(file_t *ptr); + +/*! + * \brief Free a file_t entry + * \note Can be called as a callback of list_free + */ int mpm_file_free(void *tmp); # include <package.h> diff --git a/inc/flags.h b/inc/flags.h @@ -23,7 +23,22 @@ typedef enum flag_index_e { MPM_LAST /* Always keep this one last */ } flag_index_t; +/*! + * \brief Set an internal flag + * \param flag Flag number (see enum in flags.h) + * \param val Value to assign + * \note If the flag is greater than MPM_LAST value this function won't do + * anything + */ void mpm_set_flag(flag_index_t flag, u8_t val); + +/*! + * \brief Get an internal flag + * \param flag Flag number (see enum in flags.h) + * \return The flag value + * \note If the value asked by the caller is higher than MPM_LAST, this function + * will raiser an assertion. + */ u8_t mpm_get_flag(flag_index_t flag); #endif /* FLAGS_H */ diff --git a/src/flags.c b/src/flags.c @@ -18,25 +18,11 @@ static u8_t mpm_flags[MPM_LAST] = {0}; -/*! - * \brief Set an internal flag - * \param flag Flag number (see enum in flags.h) - * \param val Value to assign - * \note If the flag is greater than MPM_LAST value this function won't do - * anything - */ void mpm_set_flag(flag_index_t flag, u8_t val) { if (flag < MPM_LAST) mpm_flags[flag] = val; } -/*! - * \brief Get an internal flag - * \param flag Flag number (see enum in flags.h) - * \return The flag value - * \note If the value asked by the caller is higher than MPM_LAST, this function - * will raiser an assertion. - */ u8_t mpm_get_flag(flag_index_t flag) { assert(flag < MPM_LAST); return mpm_flags[flag];