summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Alburquerque <jaalburqu@svn.gnome.org>2010-11-22 16:25:52 -0500
committerJosé Alburquerque <jaalburqu@svn.gnome.org>2010-11-22 16:25:52 -0500
commit9a534e4a3fbb57035cb5284c42bea02a91f80942 (patch)
tree122f85a17dc51d6d91735df86c46eeda7c92c24e
parent16f7ae7f1151ea2a2deeb2ad9544c78c09360b9f (diff)
downloadglibmm-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 '&lt;' and '>' instead of '&gt;' in the substitutions because otherwise the tags are not recognized.
-rw-r--r--ChangeLog12
-rw-r--r--tools/pm/DocsParser.pm26
2 files changed, 28 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 218ef88e..20db9c26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 '&lt;' and '>' instead of '&gt;' 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&nbsp;\%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"&lt;(/?)emphasis&gt;"<$1em>"g;
- s"&lt;(/?)literal&gt;"<$1tt>"g;
- s"&lt;(/?)function&gt;"<$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"&lt;/?programlisting&gt;""g;
- s"&lt;informalexample&gt;"\@code"g;
- s"&lt;/informalexample&gt;"\@endcode"g;
- s"&lt;!&gt;""g;
+ s"</?programlisting>""g;
+ s"<informalexample>"\@code"g;
+ s"</informalexample>"\@endcode"g;
+ s"<!>""g;
# Remove all link tags.
- s"&lt;/?u?link[^&]*&gt;""g;
+ s"</?u?link[^&]*>""g;
# Remove all para tags (from tmpl sgml files).
- s"&lt;/?para&gt;""g;
+ s"</?para>""g;
# Use our Doxygen @newin alias:
s/\bSince:\s*(\d+)\.(\d+)\b/\@newin{$1,$2}/g;
- s"\b-&gt;\b"->"g;
+ s"\b->\b"->"g;
# Doxygen is too dumb to handle &mdash;
s"&mdash;" \@htmlonly&mdash;\@endhtmlonly "g;