From 13cc42ce135155f0437298540b0bc5a821d7a644 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 20 May 2019 11:56:28 +0200 Subject: cleanup: remove overly excessive comments Signed-off-by: David Oberhollenzer --- include/util.h | 67 +++++++++++++++++++++++----------------------------------- 1 file changed, 27 insertions(+), 40 deletions(-) (limited to 'include/util.h') diff --git a/include/util.h b/include/util.h index 4857539..f618f81 100644 --- a/include/util.h +++ b/include/util.h @@ -4,54 +4,41 @@ #include -/** - * @brief Turn a file path to a more usefull form - * - * Removes all preceeding and trailing slashes, shortens all sequences of - * slashes to a single slash and returns failure state if one of the path - * components is '..' or '.'. - * - * @param filename A pointer to the path to work on - * - * @return Zero on success, -1 on failure - */ +/* + Removes all preceeding and trailing slashes, shortens all sequences of + slashes to a single slash and returns failure state if one of the path + components is '..' or '.'. + + Returns 0 on success. +*/ int canonicalize_name(char *filename); -/** - * @brief Write data to a file - * - * This is a wrapper around the Unix write() system call. It retries the write - * if it is interrupted by a signal or only part of the data was written. - */ +/* + A wrapper around the write() system call. It retries the write if it is + interrupted by a signal or only part of the data was written. +*/ ssize_t write_retry(int fd, void *data, size_t size); -/** - * @brief Read data from a file - * - * This is a wrapper around the Unix read() system call. It retries the read - * if it is interrupted by a signal or less than the desired size was read. - */ +/* + A wrapper around the read() system call. It retries the read if it is + interrupted by a signal or less than the desired size was read. +*/ ssize_t read_retry(int fd, void *buffer, size_t size); -/** - * @brief A common implementation of the '--version' command line argument - * - * Prints out version information. The program name is extracted from the - * BSD style __progname global variable. - */ +/* + A common implementation of the '--version' command line flag. + + Prints out version information. The program name is extracted from the + BSD style __progname global variable. +*/ void print_version(void); -/** - * @brief Create a directory and all its parents - * - * This is a wrapper around mkdir() that behaves like 'mkdir -p'. It tries to - * create every component of the given path and treats already existing entries - * as success. - * - * @param path A path to create - * - * @return Zero on success, -1 on failure - */ +/* + A wrapper around mkdir() that behaves like 'mkdir -p'. It tries to create + every component of the given path and skips already existing entries. + + Returns 0 on success. +*/ int mkdir_p(const char *path); #endif /* UTIL_H */ -- cgit v1.2.3