mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 14:58:13 +08:00
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:
+7
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user