fix patch to apply
This commit is contained in:
parent
1715b1ed06
commit
280531b155
@ -1,27 +1,27 @@
|
|||||||
--- 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.man-xrefs 2007-04-18 23:05:11.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 2007-04-18 23:11:46.000000000 -0400
|
||||||
@@ -339,6 +339,20 @@
|
@@ -339,6 +339,20 @@
|
||||||
else
|
else
|
||||||
parser->ins = parser_append_node (parser, b);
|
parser->ins = parser_append_node (parser, b);
|
||||||
|
|
||||||
+ if (ptr->next) {
|
+ if (ptr->next) {
|
||||||
+ gchar *tmp = ptr->next->data;
|
+ gchar *tmp = ptr->next->data;
|
||||||
+
|
+
|
||||||
+ if (tmp[0] == '(' && g_ascii_isdigit (tmp[1]) &&
|
+ if (tmp[0] == '(' && g_ascii_isdigit (tmp[1]) &&
|
||||||
+ (tmp[2] == ')' || (g_ascii_isalpha (tmp[2]) && tmp[3] == ')'))) {
|
+ (tmp[2] == ')' || (g_ascii_isalpha (tmp[2]) && tmp[3] == ')'))) {
|
||||||
+ tmp = g_strconcat (ptr->data, " ", tmp, NULL);
|
+ tmp = g_strconcat (ptr->data, " ", tmp, NULL);
|
||||||
+ parser_append_given_text_handle_escapes (parser, tmp, TRUE);
|
+ parser_append_given_text_handle_escapes (parser, tmp, TRUE);
|
||||||
+ g_free (tmp);
|
+ g_free (tmp);
|
||||||
+ parser->ins = parser->ins->parent;
|
+ parser->ins = parser->ins->parent;
|
||||||
+ ptr = ptr->next->next;
|
+ ptr = ptr->next->next;
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
parser_append_given_text_handle_escapes (parser, ptr->data, TRUE);
|
parser_append_given_text_handle_escapes (parser, ptr->data, TRUE);
|
||||||
parser->ins = parser->ins->parent;
|
parser->ins = parser->ins->parent;
|
||||||
|
|
||||||
@@ -1554,15 +1568,18 @@
|
@@ -1554,25 +1568,36 @@
|
||||||
}
|
}
|
||||||
else if ((make_links) && (*ptr == '(')) {
|
else if ((make_links) && (*ptr == '(')) {
|
||||||
gchar *space_pos;
|
gchar *space_pos;
|
||||||
@ -34,62 +34,61 @@
|
|||||||
|
|
||||||
space_pos = ptr;
|
space_pos = ptr;
|
||||||
|
|
||||||
while (space_pos != anc && *(space_pos - 1) == ' ') {
|
+ while (space_pos != anc && *(space_pos - 1) == ' ') {
|
||||||
space_pos--;
|
+ space_pos--;
|
||||||
}
|
+ }
|
||||||
+ name_end = space_pos;
|
+ name_end = space_pos;
|
||||||
|
+
|
||||||
while (space_pos != anc && *(space_pos - 1) != ' ') {
|
while (space_pos != anc && *(space_pos - 1) != ' ') {
|
||||||
space_pos--;
|
space_pos--;
|
||||||
@@ -1570,13 +1587,18 @@
|
}
|
||||||
|
|
||||||
if (space_pos != ptr &&
|
if (space_pos != ptr &&
|
||||||
g_ascii_isdigit(*(ptr+1)) &&
|
g_ascii_isdigit(*(ptr+1)) &&
|
||||||
- *(ptr+2) == ')') {
|
- *(ptr+2) == ')') {
|
||||||
-
|
-
|
||||||
+ (*(ptr+2) == ')' || (g_ascii_isalpha (*(ptr+2)) && *(ptr+3) == ')'))) {
|
+ (*(ptr+2) == ')' || (g_ascii_isalpha (*(ptr+2)) && *(ptr+3) == ')'))) {
|
||||||
+ num_start = ptr;
|
+ num_start = ptr;
|
||||||
+ if (*(ptr+2) == ')')
|
+ if (*(ptr+2) == ')')
|
||||||
+ num_end = ptr + 2;
|
+ num_end = ptr + 2;
|
||||||
+ else
|
+ else
|
||||||
+ num_end = ptr + 3;
|
+ num_end = ptr + 3;
|
||||||
+
|
+
|
||||||
+ g_print ("text %s\n", anc);
|
|
||||||
ptr+=3;
|
ptr+=3;
|
||||||
|
-
|
||||||
|
+
|
||||||
parser_ensure_P (parser);
|
parser_ensure_P (parser);
|
||||||
|
|
||||||
- tmp_cur = ptr;
|
- tmp_cur = ptr;
|
||||||
ptr = space_pos;
|
ptr = space_pos;
|
||||||
|
|
||||||
c = (*ptr);
|
c = (*ptr);
|
||||||
@@ -1584,13 +1606,15 @@
|
@@ -1580,13 +1605,13 @@
|
||||||
parser_append_given_text (parser, anc);
|
parser_append_given_text (parser, anc);
|
||||||
*ptr = c;
|
*ptr = c;
|
||||||
anc = ptr;
|
anc = ptr;
|
||||||
+ ptr = num_start;
|
+ ptr = num_start;
|
||||||
|
|
||||||
- ptr = tmp_cur;
|
- ptr = tmp_cur;
|
||||||
-
|
-
|
||||||
- c = *(ptr);
|
- c = *(ptr);
|
||||||
- *(ptr) = '\0';
|
- *(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';
|
+ c = *name_end;
|
||||||
|
+ *name_end = '\0';
|
||||||
+ *num_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);
|
||||||
+ 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, "UR");
|
||||||
|
|
||||||
parser->ins = parser_append_node (parser, "URI");
|
parser->ins = parser_append_node (parser, "URI");
|
||||||
@@ -1600,7 +1624,8 @@
|
@@ -1596,7 +1621,8 @@
|
||||||
parser_append_given_text (parser, anc);
|
parser_append_given_text (parser, anc);
|
||||||
parser->ins = parser->ins->parent;
|
parser->ins = parser->ins->parent;
|
||||||
|
|
||||||
- *(ptr) = c;
|
- *(ptr) = c;
|
||||||
+ *name_end = c;
|
+ *name_end = c;
|
||||||
+ *num_end = ')';
|
+ *num_end = ')';
|
||||||
anc = ptr;
|
anc = ptr;
|
||||||
|
|
||||||
|
13
yelp.spec
13
yelp.spec
@ -30,12 +30,11 @@ Patch3: yelp-2.15.91-use-pango.patch
|
|||||||
Patch5: yelp-2.16.0-apropos.patch
|
Patch5: yelp-2.16.0-apropos.patch
|
||||||
# http://bugzilla.gnome.org/show_bug.cgi?id=430365
|
# http://bugzilla.gnome.org/show_bug.cgi?id=430365
|
||||||
Patch6: yelp-2.18.1-info-bc-crash.patch
|
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
|
# 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
|
# http://bugzilla.gnome.org/show_bug.cgi?id=431078
|
||||||
Patch8: yelp-2.18.1-man-xrefs.patch
|
Patch9: yelp-2.18.1-man-xrefs.patch
|
||||||
# http://bugzilla.gnome.org/show_bug.cgi?id=430365
|
|
||||||
Patch9: yelp-2.18.1-info-gnutls.patch
|
|
||||||
|
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -94,9 +93,9 @@ one central tool.
|
|||||||
%patch3 -p1 -b .use-pango
|
%patch3 -p1 -b .use-pango
|
||||||
%patch5 -p1 -b .apropos
|
%patch5 -p1 -b .apropos
|
||||||
%patch6 -p1 -b .info-bc-crash
|
%patch6 -p1 -b .info-bc-crash
|
||||||
%patch7 -p1 -b .posix-man
|
%patch7 -p1 -b .info-gnutls
|
||||||
%patch8 -p1 -b .man-xrefs
|
%patch8 -p1 -b .posix-man
|
||||||
%patch9 -p1 -b .info-gnutls
|
%patch9 -p1 -b .man-xrefs
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%configure \
|
||||||
|
Loading…
Reference in New Issue
Block a user