diff options
author | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2014-12-01 18:36:23 +0100 |
---|---|---|
committer | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2014-12-01 18:36:23 +0100 |
commit | 2a21d3c3d15e55bd541ce8c4b69f04a022da2340 (patch) | |
tree | 4c612b783a7c20ca2a85a3e21d2fc1ac4538274f /tools/pm/Output.pm | |
parent | e241f1593580314ea7215769eea2a0dc0b83feea (diff) | |
download | glibmm-2a21d3c3d15e55bd541ce8c4b69f04a022da2340.tar.gz |
gmmproc: Tidy up the generation of enum docs
* tools/m4/gerror.m4: Add "/** " at the start of the documentation,
like enum.m4 does.
* tools/pm/DocsParser.pm: lookup_enum_documentation(): Don't add "/** "
which is deleted by the caller. Add "\n * " with the right indentation.
* tools/pm/Output.pm: output_wrap_enum(), output_wrap_enum_docs_only(),
output_wrap_gerror(): Don't delete "/** ". Don't change indentation.
Diffstat (limited to 'tools/pm/Output.pm')
-rw-r--r-- | tools/pm/Output.pm | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/tools/pm/Output.pm b/tools/pm/Output.pm index 3eff0977..de13f5ea 100644 --- a/tools/pm/Output.pm +++ b/tools/pm/Output.pm @@ -676,14 +676,7 @@ sub output_wrap_enum($$$$$$$) # Get the enum documentation from the parsed docs. my $enum_docs = - DocsParser::lookup_enum_documentation("$c_type", "$cpp_type", \@flags); - - # Remove initial Doxygen comment block start ('/**') from the enum docs - # to merge the passed in Doxygen comment block. - $enum_docs =~ s/\/\*\*\s+//g; - - # Make sure indentation of passed in comment is correct. - $comment =~ s/\n\s*\*/\n */g; + DocsParser::lookup_enum_documentation("$c_type", "$cpp_type", " ", \@flags); # Merge the passed in comment to the existing enum documentation. $comment = $comment . "\n * " . $enum_docs; @@ -707,7 +700,7 @@ sub output_wrap_enum_docs_only($$$$$$$) # Get the existing enum description from the parsed docs. my $enum_docs = - DocsParser::lookup_enum_documentation("$c_type", "$cpp_type", \@flags); + DocsParser::lookup_enum_documentation("$c_type", "$cpp_type", " ", \@flags); if($enum_docs eq "") { @@ -718,15 +711,8 @@ sub output_wrap_enum_docs_only($$$$$$$) # Include the enum docs in the module's enum docs group. $enum_docs .= "\n * \@ingroup ${module_canonical}Enums\n"; - # Remove initial Doxygen comment block start ('/**') from the enum docs - # to merge the passed in Doxygen comment block. - $enum_docs =~ s/\/\*\*\s+//g; - # Merge the passed in comment to the existing enum documentation. - $comment = "\/\*\* " . $comment . "\n * " . $enum_docs . "\n */\n"; - - # Make sure indentation of passed in comment is correct. - $comment =~ s/\n\s*\*/\n */g; + $comment = "/** " . $comment . "\n * " . $enum_docs . "\n */\n"; $self->append($comment); } @@ -762,10 +748,7 @@ sub output_wrap_gerror($$$$$$$) # Get the enum documentation from the parsed docs. my $enum_docs = - DocsParser::lookup_enum_documentation("$c_enum", "Code", \@flags); - - # Make sure indentation of enum documentation is correct. - $enum_docs =~ s/\n\s*\*/\n \*/g; + DocsParser::lookup_enum_documentation("$c_enum", "Code", " ", \@flags); # Prevent Doxygen from auto-linking to a class called Error. $enum_docs =~ s/([^%])(Error code)/$1%$2/g; |