fix patch to apply

This commit is contained in:
Matthias Clasen 2007-04-19 03:28:34 +00:00
parent 1715b1ed06
commit 280531b155
2 changed files with 41 additions and 43 deletions

View File

@ -1,5 +1,5 @@
--- yelp-2.18.1/src/yelp-man-parser.c.man-xrefs 2007-04-18 13:33:14.000000000 -0400
+++ yelp-2.18.1/src/yelp-man-parser.c 2007-04-18 13:33:19.000000000 -0400
--- yelp-2.18.1/src/yelp-man-parser.c.man-xrefs 2007-04-18 23:05:11.000000000 -0400
+++ yelp-2.18.1/src/yelp-man-parser.c 2007-04-18 23:11:46.000000000 -0400
@@ -339,6 +339,20 @@
else
parser->ins = parser_append_node (parser, b);
@ -21,7 +21,7 @@
parser_append_given_text_handle_escapes (parser, ptr->data, TRUE);
parser->ins = parser->ins->parent;
@@ -1554,15 +1568,18 @@
@@ -1554,25 +1568,36 @@
}
else if ((make_links) && (*ptr == '(')) {
gchar *space_pos;
@ -34,14 +34,14 @@
space_pos = ptr;
while (space_pos != anc && *(space_pos - 1) == ' ') {
space_pos--;
}
+ while (space_pos != anc && *(space_pos - 1) == ' ') {
+ space_pos--;
+ }
+ name_end = space_pos;
+
while (space_pos != anc && *(space_pos - 1) != ' ') {
space_pos--;
@@ -1570,13 +1587,18 @@
}
if (space_pos != ptr &&
g_ascii_isdigit(*(ptr+1)) &&
@ -54,16 +54,16 @@
+ else
+ num_end = ptr + 3;
+
+ g_print ("text %s\n", anc);
ptr+=3;
-
+
parser_ensure_P (parser);
- tmp_cur = ptr;
ptr = space_pos;
c = (*ptr);
@@ -1584,13 +1606,15 @@
@@ -1580,13 +1605,13 @@
parser_append_given_text (parser, anc);
*ptr = c;
anc = ptr;
@ -73,18 +73,17 @@
-
- c = *(ptr);
- *(ptr) = '\0';
- url = g_strdup_printf ("man:%s(%c)", anc, *(ptr - 1));
- url = g_strdup_printf ("man:%s", anc);
-
+ c = *name_end;
+ *name_end = '\0';
+ *num_end = '\0';
+ g_print ("name part %s, num %s\n", anc, num_start + 1);
+ url = g_strdup_printf ("man:%s(%s)", anc, num_start + 1);
+ g_print ("link %s\n", url);
+
parser->ins = parser_append_node (parser, "UR");
parser->ins = parser_append_node (parser, "URI");
@@ -1600,7 +1624,8 @@
@@ -1596,7 +1621,8 @@
parser_append_given_text (parser, anc);
parser->ins = parser->ins->parent;

View File

@ -30,12 +30,11 @@ Patch3: yelp-2.15.91-use-pango.patch
Patch5: yelp-2.16.0-apropos.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=430365
Patch6: yelp-2.18.1-info-bc-crash.patch
Patch7: yelp-2.18.1-info-gnutls.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=431077
Patch7: yelp-2.18.1-posix-man.patch
Patch8: yelp-2.18.1-posix-man.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=431078
Patch8: yelp-2.18.1-man-xrefs.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=430365
Patch9: yelp-2.18.1-info-gnutls.patch
Patch9: yelp-2.18.1-man-xrefs.patch
License: GPL
Group: Applications/System
@ -94,9 +93,9 @@ one central tool.
%patch3 -p1 -b .use-pango
%patch5 -p1 -b .apropos
%patch6 -p1 -b .info-bc-crash
%patch7 -p1 -b .posix-man
%patch8 -p1 -b .man-xrefs
%patch9 -p1 -b .info-gnutls
%patch7 -p1 -b .info-gnutls
%patch8 -p1 -b .posix-man
%patch9 -p1 -b .man-xrefs
%build
%configure \