doc: initial effort to enable doxygen

Framework from libuEv.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2021-10-03 19:08:40 +02:00
1 parent 03598fc01e
commit 6537b11e34
33 files changed
+3781 -275

No files matched your search

+11 -5
View File
@@ -15,19 +15,25 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/**
* @file chomp.c
* @author Joachim Wiberg
* @date 2014-2021
* @copyright ISC License
*/
#include <errno.h>
#include <string.h>
/**
* chomp - Perl like chomp function, chop off last char(s) if newline.
* @str: String to chomp
* Perl like chomp function, chop off last char(s) if newline.
* @param str String to chomp
*
* This function is like Perl chomp, but it's set to chop of all
* trailing newlines. Useful in combination with fgets().
*
* Returns:
* If @str is a valid pointer this function returns @str, otherwise
* @errno is set to %EINVAL and this function returns %NULL.
* @returns @a str, or @c NULL with @a errno set, if @a str is not a valid pointer.
* @exception EINVAL if the input argument is not a valid pointer.
*/
char *chomp(char *str)
{