mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
docs: Allow enhanced comments for macros (ie. #define).
This commit is contained in:
@@ -245,13 +245,19 @@ foreach $dir (@dirs) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
# First line tells us if this is a struct
|
||||
# or function.
|
||||
# First line tells us if this is a struct,
|
||||
# define or function.
|
||||
if (/^struct ([\w_]+) \{$/) {
|
||||
$thing = "Structure";
|
||||
$name = $1;
|
||||
$end = "};";
|
||||
}
|
||||
elsif (/^#define ([\w_]+)/) {
|
||||
$thing = "Definition";
|
||||
$name = $1;
|
||||
$found_end = 1;
|
||||
last;
|
||||
}
|
||||
else {
|
||||
$thing = "Function";
|
||||
$end = "{";
|
||||
@@ -276,6 +282,10 @@ foreach $dir (@dirs) {
|
||||
push @defn, "};"
|
||||
}
|
||||
|
||||
if ($thing eq "Definition") {
|
||||
@defn = ( "#define $name" )
|
||||
}
|
||||
|
||||
# Print the definition, followed by the comment.
|
||||
print OUTPUT "=head4 $thing C<$input:$name>\n\n";
|
||||
print OUTPUT " ", join ("\n ", @defn), "\n";
|
||||
|
||||
Reference in New Issue
Block a user