Commit 7e9d7f78 authored by Michal Privoznik's avatar Michal Privoznik

generate-api-docs: Adapt to new comments style

Previously, it assumed that there's only one star at the
beginning of the comment block and one at the end. The usual C
comment style. Now that I reformatted the comments every line
starts with a star. Update the docs generator to reflect this.
Signed-off-by: 's avatarMichal Privoznik <mprivozn@redhat.com>
parent fbf672a5
......@@ -32,10 +32,18 @@ void bail_error(const char *fmt, ...)
char *ltrim_string(char *str)
{
while (*str++ == ' ') ;
/* Skip initial comment indentation */
if (strncmp(str, " * ", 3) == 0)
str += 3;
/* Now skip spaces */
while (*str == ' ')
str++;
/* TABs are not acceptable! */
if (*str == '\t')
while (*str++ == '\t')
if (*str != '\t') break;
bail_error("Indent with spaces, not TABs");
return str;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment