diff options
author | José Alburquerque <jaalburqu@svn.gnome.org> | 2010-11-22 16:25:52 -0500 |
---|---|---|
committer | José Alburquerque <jaalburqu@svn.gnome.org> | 2010-11-22 16:25:52 -0500 |
commit | 9a534e4a3fbb57035cb5284c42bea02a91f80942 (patch) | |
tree | 122f85a17dc51d6d91735df86c46eeda7c92c24e | |
parent | 16f7ae7f1151ea2a2deeb2ad9544c78c09360b9f (diff) | |
download | glibmm-9a534e4a3fbb57035cb5284c42bea02a91f80942.tar.gz |
gmmproc: Some conversion fixes.
* tools/pm/DocsParser.pm (convert_docs_to_cpp): Convert occurances of
'`' to the variable '__BT__' defined in base.m4 which safely produces
the same character without causing M4 processing errors.
(convert_tags_to_doxygen): Add a substition for the
<constant></constant> gtk-doc tag to the equivalent Doxygen <tt></tt>
tag. Also use '<' instead of '<' and '>' instead of '>' in the
substitutions because otherwise the tags are not recognized.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | tools/pm/DocsParser.pm | 26 |
2 files changed, 28 insertions, 10 deletions
@@ -1,5 +1,17 @@ 2010-11-22 José Alburquerque <jaalburqu@svn.gnome.org> + gmmproc: Some conversion fixes. + + * tools/pm/DocsParser.pm (convert_docs_to_cpp): Convert occurances of + '`' to the variable '__BT__' defined in base.m4 which safely produces + the same character without causing M4 processing errors. + (convert_tags_to_doxygen): Add a substition for the + <constant></constant> gtk-doc tag to the equivalent Doxygen <tt></tt> + tag. Also use '<' instead of '<' and '>' instead of '>' in the + substitutions because otherwise the tags are not recognized. + +2010-11-22 José Alburquerque <jaalburqu@svn.gnome.org> + Gio::DBusConnection: Add emit_signal(). * gio/src/dbusconnection.{ccg,hg}: Add emit_signal() wrapping diff --git a/tools/pm/DocsParser.pm b/tools/pm/DocsParser.pm index 430cacb4..ba178fe4 100644 --- a/tools/pm/DocsParser.pm +++ b/tools/pm/DocsParser.pm @@ -335,6 +335,11 @@ sub convert_docs_to_cpp($$) $$text =~ s/\bX\s+Window\b/X \%Window/g; $$text =~ s/\bWindow\s+manager/\%Window manager/g; + + # This is so that if there is a '`' in the docs it doesn't cause a + # problem when M4 processing occurs. __BT__ is a variable defined in the + # base.m4 file that produces a '`' without M4 errors. + $$text =~ s/`/__BT__/g; # } } @@ -346,9 +351,10 @@ sub convert_tags_to_doxygen($) for($$text) { # Replace format tags. - s"<(/?)emphasis>"<$1em>"g; - s"<(/?)literal>"<$1tt>"g; - s"<(/?)function>"<$1tt>"g; + s"<(/?)emphasis>"<$1em>"g; + s"<(/?)literal>"<$1tt>"g; + s"<(/?)constant>"<$1tt>"g; + s"<(/?)function>"<$1tt>"g; # Some argument names are suffixed by "_" -- strip this. # gtk-doc uses @thearg, but doxygen uses @a thearg. @@ -359,21 +365,21 @@ sub convert_tags_to_doxygen($) s" \@a (throws|param)" \@$1"g; s"^Note ?\d?: "\@note "mg; - s"</?programlisting>""g; - s"<informalexample>"\@code"g; - s"</informalexample>"\@endcode"g; - s"<!>""g; + s"</?programlisting>""g; + s"<informalexample>"\@code"g; + s"</informalexample>"\@endcode"g; + s"<!>""g; # Remove all link tags. - s"</?u?link[^&]*>""g; + s"</?u?link[^&]*>""g; # Remove all para tags (from tmpl sgml files). - s"</?para>""g; + s"</?para>""g; # Use our Doxygen @newin alias: s/\bSince:\s*(\d+)\.(\d+)\b/\@newin{$1,$2}/g; - s"\b->\b"->"g; + s"\b->\b"->"g; # Doxygen is too dumb to handle — s"—" \@htmlonly—\@endhtmlonly "g; |