Improve man page handling
This commit is contained in:
parent
7373e5f869
commit
d9c2bdcfaa
66
hp.patch
Normal file
66
hp.patch
Normal file
@ -0,0 +1,66 @@
|
||||
--- yelp-2.20.0/src/yelp-man.c 2007-09-17 16:49:09.000000000 -0400
|
||||
+++ hacked/src/yelp-man.c 2007-11-16 22:21:32.000000000 -0500
|
||||
@@ -463,6 +463,16 @@
|
||||
yelp_document_error_pending (document, error);
|
||||
}
|
||||
|
||||
+#if 0
|
||||
+ {
|
||||
+ xmlChar *text;
|
||||
+ int len;
|
||||
+ xmlDocDumpFormatMemory (priv->xmldoc, &text, &len, 1);
|
||||
+ g_print (text);
|
||||
+ xmlFree (text);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
g_mutex_lock (priv->mutex);
|
||||
if (priv->state == MAN_STATE_STOP) {
|
||||
g_mutex_unlock (priv->mutex);
|
||||
--- yelp-2.20.0/src/yelp-man-parser.c 2007-09-17 16:49:09.000000000 -0400
|
||||
+++ hacked/src/yelp-man-parser.c 2007-11-16 20:00:34.000000000 -0500
|
||||
@@ -501,7 +501,12 @@
|
||||
static void
|
||||
macro_hanging_paragraph_handler (YelpManParser *parser, gchar *macro, GSList *args)
|
||||
{
|
||||
- parser_stack_pop_node (parser, "IP");
|
||||
+ xmlNodePtr tmpNode;
|
||||
+
|
||||
+ tmpNode = parser_stack_pop_node (parser, "HP");
|
||||
+
|
||||
+ if (tmpNode != NULL)
|
||||
+ parser->ins = tmpNode->parent;
|
||||
|
||||
parser->ins = parser_append_node (parser, macro);
|
||||
|
||||
@@ -510,6 +515,8 @@
|
||||
parser_append_given_text (parser, args->data);
|
||||
parser->ins = parser->ins->parent;
|
||||
}
|
||||
+
|
||||
+ parser_stack_push_node (parser, parser->ins);
|
||||
}
|
||||
|
||||
/* BSD mandoc macros
|
||||
--- yelp-2.20.0/stylesheets/man2html.xsl 2007-09-17 16:49:10.000000000 -0400
|
||||
+++ hacked/stylesheets/man2html.xsl 2007-11-16 22:19:34.000000000 -0500
|
||||
@@ -85,6 +85,8 @@
|
||||
span[class~="Section"] { margin-left: 0.4em; }
|
||||
|
||||
dd { padding-bottom: 10px; }
|
||||
+
|
||||
+ p[class~="HP"] { text-indent: -2em; margin-left: 2em; }
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
@@ -204,6 +206,10 @@
|
||||
<p><xsl:apply-templates/></p>
|
||||
</xsl:template>
|
||||
|
||||
+<xsl:template match="HP">
|
||||
+ <p class="HP"><xsl:apply-templates/></p>
|
||||
+</xsl:template>
|
||||
+
|
||||
<xsl:template match="ROW">
|
||||
<tr><xsl:apply-templates/></tr>
|
||||
</xsl:template>
|
@ -20,7 +20,7 @@
|
||||
Summary: A system documentation reader from the Gnome project
|
||||
Name: yelp
|
||||
Version: 2.20.0
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Source: http://ftp.gnome.org/pub/GNOME/sources/yelp/2.19/%{name}-%{version}.tar.bz2
|
||||
URL: http://live.gnome.org/Yelp
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=319096
|
||||
@ -31,6 +31,8 @@ Patch3: yelp-2.15.91-use-pango.patch
|
||||
Patch4: rarian-crash.patch
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=493751
|
||||
Patch5: search-crash.patch
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=497559
|
||||
Patch6: hp.patch
|
||||
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=431077
|
||||
# XXX Does this no longer apply to yelp >= 2.19.1 ?
|
||||
@ -91,6 +93,7 @@ one central tool.
|
||||
%patch3 -p1 -b .use-pango
|
||||
%patch4 -p1 -b .rarian-crash
|
||||
%patch5 -p1 -b .search-crash
|
||||
%patch6 -p1 -b .hp
|
||||
#%patch8 -p1 -b .posix-man
|
||||
|
||||
%build
|
||||
@ -155,6 +158,9 @@ update-desktop-database &> /dev/null ||:
|
||||
%{_datadir}/yelp
|
||||
|
||||
%changelog
|
||||
* Fri Nov 16 2007 Matthias Clasen <mclasen@redhat.com> - 2.20.0-7
|
||||
- Handle .HP tags in man pages
|
||||
|
||||
* Fri Nov 09 2007 Matthew Barnes <mbarnes@redhat.com> - 2.20.0-6
|
||||
- Rebuild against gecko-libs 1.8.1.9.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user