docs: improve doxygen documentation

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2017-11-13 23:27:12 +00:00
parent 887845df2a
commit c687f38ed6
No known key found for this signature in database
GPG key ID: A9553245FDE9B739
7 changed files with 111 additions and 58 deletions

View file

@ -81,6 +81,9 @@ enum count_status_t {
COLOR_RESET
};
/*! \var color_tags
* \brief Array of stings that make colors to start and end in different
* schemas per array column. */
static const char *color_tags[][NUM_OF_OUT_FORMS] = {
[STATUS_OK] = { "", "" },
[STATUS_WARN] = { "\033[1;33m", " style=\"color:magenta;font-style:italic\"" },
@ -90,7 +93,8 @@ static const char *color_tags[][NUM_OF_OUT_FORMS] = {
[COLOR_RESET] = { "\033[0m", "" }
};
/*! \brief Calculate range percentages and such. */
/*! \brief Calculate range percentages and such.
* \return Indicator if the entry should be skipped from output. */
int range_output_helper(struct conf_t *state, struct output_helper_t *oh,
struct range_t *range_p)
{
@ -127,7 +131,8 @@ int range_output_helper(struct conf_t *state, struct output_helper_t *oh,
return 0;
}
/*! \brief Calculate shared network percentages and such. */
/*! \brief Calculate shared network percentages and such.
* \return Indicator if the entry should be skipped from output. */
int shnet_output_helper(struct conf_t *state, struct output_helper_t *oh,
struct shared_network_t *shared_p)
{
@ -170,6 +175,8 @@ int shnet_output_helper(struct conf_t *state, struct output_helper_t *oh,
}
/*! \brief Output a color based on output_helper_t status.
* \return Indicator whether coloring was started or not. */
static int start_color(struct conf_t *state, struct output_helper_t *oh, FILE *outfile)
{
if (oh->status == STATUS_OK) {
@ -179,6 +186,8 @@ static int start_color(struct conf_t *state, struct output_helper_t *oh, FILE *o
return 1;
}
/*! \brief Helper function to open a output file.
* \return The outfile in all of the output functions. */
static FILE *open_outfile(struct conf_t *state)
{
FILE *outfile;
@ -194,6 +203,8 @@ static FILE *open_outfile(struct conf_t *state)
return outfile;
}
/*! \brief Helper function to close outfile. */
static void close_outfile(FILE *outfile)
{
if (outfile == stdout) {