Skip to content

Commit

Permalink
Add doxygen function headers
Browse files Browse the repository at this point in the history
  • Loading branch information
etag4048 committed Nov 4, 2024
1 parent 96b28fa commit 1898081
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,24 @@
#include <stdio.h>
#include <stdarg.h>


/**
* @description Wrapper around getenv(3), allowing to set a default value
* @param name The name of the environment variable
* @param dflt The default value to set if the variable is not present.
* @return default value or value of environment variable.
*/
const char *getenv_default(const char *name, const char *dflt)
{
return getenv(name) ? : dflt;
}


/**
* @description Centralized exit point, called due to an error
* @param msg The message to display on stderr before killing the program
* @param ... Values for the format string.
*/
void die(const char *msg, ...)
{
va_list args;
Expand Down

0 comments on commit 1898081

Please sign in to comment.