tools: Update note about first line of a block

When checking the first line of a block, the returned value is
incremented by one.

This commit updates doc to explain why.

Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
This commit is contained in:
Jiri Vlasak
2026-05-11 07:00:04 +02:00
committed by Xiang Xiao
parent c238871739
commit f8289b2e29
+7 -1
View File
@@ -1036,7 +1036,13 @@ static int block_comment_width(char *line)
if (strncmp(&line[b], "/***", 4) == 0 &&
strncmp(&line[e - 2], "***", 3) == 0)
{
/* Return the length of the line up to the final '*' */
/* Return the length of the line up to the final '*'.
*
* Please note, that here we lie. We return the length of the line plus
* one--the leading '/' plus the number of '*' plus 1. The reason is to
* fit the length of the last line of a block--the leading space ' '
* plus the number of '*' plus closing '/'.
*/
return e + 1;
}