diff --git a/Doxyfile b/Doxyfile index 2d3212d..fe041d7 100644 --- a/Doxyfile +++ b/Doxyfile @@ -756,13 +756,13 @@ WARN_IF_DOC_ERROR = YES # parameter documentation, but not about the absence of documentation. # The default value is: NO. -WARN_NO_PARAMDOC = NO +WARN_NO_PARAMDOC = YES # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. # The default value is: NO. -WARN_AS_ERROR = NO +WARN_AS_ERROR = YES # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which diff --git a/src/main/c/util/pipe.c b/src/main/c/util/pipe.c index 92a8f79..7420c48 100644 --- a/src/main/c/util/pipe.c +++ b/src/main/c/util/pipe.c @@ -2,6 +2,7 @@ #define _HDR_HYPERBUILD_UTIL_PIPE #include +#include #include "hbchar.h" #include "../error/error.c" #include "buffer.c" @@ -315,7 +316,7 @@ size_t hbu_pipe_matches_line_terminator(hbu_pipe_t pipe) { * Will cause an error if already at end. * * @param pipe pipe - * @param c character to match + * @return next character */ hb_char_t hbu_pipe_accept(hbu_pipe_t pipe) { hb_eod_char_t c = _hbu_pipe_read_from_buffer_or_input(pipe); @@ -334,7 +335,7 @@ hb_char_t hbu_pipe_accept(hbu_pipe_t pipe) { * Requires at least count characters remaining. * * @param pipe pipe - * @param c character to match + * @param count amount of characters */ void hbu_pipe_accept_count(hbu_pipe_t pipe, size_t count) { for (size_t i = 0; i < count; i++) { @@ -387,19 +388,16 @@ int hbu_pipe_accept_if_matches(hbu_pipe_t pipe, const char *match) { * Won't cause an error if insufficient amount of characters left. * * @param pipe pipe - * @param pred predicate - * @return 0 if nothing was accepted, 1 otherwise + * @return amount of characters matched */ -int hbu_pipe_accept_if_matches_line_terminator(hbu_pipe_t pipe) { +size_t hbu_pipe_accept_if_matches_line_terminator(hbu_pipe_t pipe) { size_t matchedlen = hbu_pipe_matches_line_terminator(pipe); - int matched = matchedlen > 0; - - if (matched) { + if (matchedlen) { hbu_pipe_accept_count(pipe, matchedlen); } - return matched; + return matchedlen; } /** @@ -545,7 +543,9 @@ hb_char_t hbu_pipe_require_skip(hbu_pipe_t pipe, hb_char_t c) { * If not matched, the error message will describe the expected output using name. * * @param pipe pipe - * @param match sequence of characters to require + * @param pred predicate + * @param name what to output in the error message to describe the requirement + * @return required character */ hb_char_t hbu_pipe_require_predicate(hbu_pipe_t pipe, hbu_pipe_predicate_t pred, const char *name) { hb_char_t n = hbu_pipe_accept(pipe);