diff options
| author | Laurent Vivier <lvivier@redhat.com> | 2025-06-20 17:25:15 +0200 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-07-18 19:19:37 +0200 |
| commit | 3757ea36d8aa4f40119d66646a3ccaafc670d6b4 (patch) | |
| tree | 17e97518f64a77729f204a689f1d123bbb9fc498 /test/lib | |
| parent | 9e0423e13541e8da657f46dff71e841f40ee7391 (diff) | |
| download | passt-3757ea36d8aa4f40119d66646a3ccaafc670d6b4.tar passt-3757ea36d8aa4f40119d66646a3ccaafc670d6b4.tar.gz passt-3757ea36d8aa4f40119d66646a3ccaafc670d6b4.tar.bz2 passt-3757ea36d8aa4f40119d66646a3ccaafc670d6b4.tar.lz passt-3757ea36d8aa4f40119d66646a3ccaafc670d6b4.tar.xz passt-3757ea36d8aa4f40119d66646a3ccaafc670d6b4.tar.zst passt-3757ea36d8aa4f40119d66646a3ccaafc670d6b4.zip | |
style: Add parentheses to function names in comments
The commit updates the style of function comments by adding parentheses
to function names in the descriptions where they are missing.
Done with:
---------8<------ fix_function_name.awk ---------8<------
/^\/\*\*/ {
check_next = 1;
print $0
next
}
check_next == 1 && / \* struct/ {
check_next = 0
print $0
next
}
check_next == 1 && / \* enum/ {
check_next = 0
print $0
next
}
check_next == 1 && /^ \* [^ (]* -/ {
modified_line = gensub(/^ \* ([^ ]*) -(.*)$/, " * \\1() -\\2", "g", $0)
print modified_line
check_next = 0;
next
}
{
print $0
check_next = 0
}
---------8<------ fix_function_name.awk ---------8<------
Then
for file in *.[ch]; do
cp ${file} ${file}.tmp && \
awk -f fix_function_name.awk ${file}.tmp > ${file}
done
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/lib')
0 files changed, 0 insertions, 0 deletions
