mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
network/w3m: Added various patches.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
parent
6e1757e710
commit
ce3950f8bd
6 changed files with 589 additions and 1 deletions
27
network/w3m/patches/w3m-0.5.2-gc72.patch
Normal file
27
network/w3m/patches/w3m-0.5.2-gc72.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
diff -Naurb w3m-0.5.2.orig/main.c w3m-0.5.2/main.c
|
||||
--- w3m-0.5.2.orig/main.c 2007-05-31 10:19:50.000000000 +0900
|
||||
+++ w3m-0.5.2/main.c 2009-11-09 08:20:02.184953443 +0900
|
||||
@@ -312,7 +312,11 @@
|
||||
lock = 0;
|
||||
}
|
||||
}
|
||||
+#if GC_VERSION_MAJOR >= 7 && GC_VERSION_MINOR >= 2
|
||||
+ else if (orig_GC_warn_proc = GC_get_warn_proc())
|
||||
+#else
|
||||
else if (orig_GC_warn_proc)
|
||||
+#endif
|
||||
orig_GC_warn_proc(msg, arg);
|
||||
else
|
||||
fprintf(stderr, msg, (unsigned long)arg);
|
||||
@@ -842,7 +846,11 @@
|
||||
mySignal(SIGPIPE, SigPipe);
|
||||
#endif
|
||||
|
||||
+#if GC_VERSION_MAJOR >= 7 && GC_VERSION_MINOR >= 2
|
||||
+ GC_set_warn_proc(wrap_GC_warn_proc);
|
||||
+#else
|
||||
orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
|
||||
+#endif
|
||||
err_msg = Strnew();
|
||||
if (load_argc == 0) {
|
||||
/* no URL specified */
|
439
network/w3m/patches/w3m-0.5.3-button.patch
Normal file
439
network/w3m/patches/w3m-0.5.3-button.patch
Normal file
|
@ -0,0 +1,439 @@
|
|||
Description: Support the button element as defined in HTML 4.01
|
||||
Origin: upstream, http://www.sic.med.tohoku.ac.jp/~satodai/w3m-dev/201009.month/4411.html
|
||||
Bug-Debian: http://bugs.debian.org/136810
|
||||
|
||||
Index: file.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/w3m/w3m/file.c,v
|
||||
retrieving revision 1.264
|
||||
diff -u -r1.264 file.c
|
||||
--- w3m.orig/file.c 3 Aug 2010 10:02:16 -0000 1.264
|
||||
+++ w3m/file.c 17 Sep 2010 12:18:55 -0000
|
||||
@@ -2467,6 +2467,7 @@
|
||||
bcopy((void *)&obuf->anchor, (void *)&obuf->bp.anchor,
|
||||
sizeof(obuf->anchor));
|
||||
obuf->bp.img_alt = obuf->img_alt;
|
||||
+ obuf->bp.input_alt = obuf->input_alt;
|
||||
obuf->bp.in_bold = obuf->in_bold;
|
||||
obuf->bp.in_italic = obuf->in_italic;
|
||||
obuf->bp.in_under = obuf->in_under;
|
||||
@@ -2484,6 +2485,7 @@
|
||||
bcopy((void *)&obuf->bp.anchor, (void *)&obuf->anchor,
|
||||
sizeof(obuf->anchor));
|
||||
obuf->img_alt = obuf->bp.img_alt;
|
||||
+ obuf->input_alt = obuf->bp.input_alt;
|
||||
obuf->in_bold = obuf->bp.in_bold;
|
||||
obuf->in_italic = obuf->bp.in_italic;
|
||||
obuf->in_under = obuf->bp.in_under;
|
||||
@@ -2727,7 +2729,7 @@
|
||||
Str line = obuf->line, pass = NULL;
|
||||
char *hidden_anchor = NULL, *hidden_img = NULL, *hidden_bold = NULL,
|
||||
*hidden_under = NULL, *hidden_italic = NULL, *hidden_strike = NULL,
|
||||
- *hidden_ins = NULL, *hidden = NULL;
|
||||
+ *hidden_ins = NULL, *hidden_input, *hidden = NULL;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (w3m_debug) {
|
||||
@@ -2759,6 +2761,12 @@
|
||||
hidden = hidden_img;
|
||||
}
|
||||
}
|
||||
+ if (obuf->input_alt.in) {
|
||||
+ if ((hidden_input = has_hidden_link(obuf, HTML_INPUT_ALT)) != NULL) {
|
||||
+ if (!hidden || hidden_input < hidden)
|
||||
+ hidden = hidden_input;
|
||||
+ }
|
||||
+ }
|
||||
if (obuf->in_bold) {
|
||||
if ((hidden_bold = has_hidden_link(obuf, HTML_B)) != NULL) {
|
||||
if (!hidden || hidden_bold < hidden)
|
||||
@@ -2810,6 +2818,8 @@
|
||||
Strcat_charp(line, "</a>");
|
||||
if (obuf->img_alt && !hidden_img)
|
||||
Strcat_charp(line, "</img_alt>");
|
||||
+ if (obuf->input_alt.in && !hidden_input)
|
||||
+ Strcat_charp(line, "</input_alt>");
|
||||
if (obuf->in_bold && !hidden_bold)
|
||||
Strcat_charp(line, "</b>");
|
||||
if (obuf->in_italic && !hidden_italic)
|
||||
@@ -3020,6 +3030,18 @@
|
||||
Strcat_charp(tmp, "\">");
|
||||
push_tag(obuf, tmp->ptr, HTML_IMG_ALT);
|
||||
}
|
||||
+ if (!hidden_input && obuf->input_alt.in) {
|
||||
+ Str tmp;
|
||||
+ if (obuf->input_alt.hseq > 0)
|
||||
+ obuf->input_alt.hseq = - obuf->input_alt.hseq;
|
||||
+ tmp = Sprintf("<INPUT_ALT hseq=\"%d\" fid=\"%d\" name=\"%s\" type=\"%s\" value=\"%s\">",
|
||||
+ obuf->input_alt.hseq,
|
||||
+ obuf->input_alt.fid,
|
||||
+ obuf->input_alt.name->ptr,
|
||||
+ obuf->input_alt.type->ptr,
|
||||
+ obuf->input_alt.value->ptr);
|
||||
+ push_tag(obuf, tmp->ptr, HTML_INPUT_ALT);
|
||||
+ }
|
||||
if (!hidden_bold && obuf->in_bold)
|
||||
push_tag(obuf, "<B>", HTML_B);
|
||||
if (!hidden_italic && obuf->in_italic)
|
||||
@@ -3730,6 +3752,63 @@
|
||||
}
|
||||
|
||||
Str
|
||||
+process_button(struct parsed_tag *tag)
|
||||
+{
|
||||
+ Str tmp = NULL;
|
||||
+ char *p, *q, *r, *qq = NULL;
|
||||
+ int qlen, v;
|
||||
+
|
||||
+ if (cur_form_id < 0) {
|
||||
+ char *s = "<form_int method=internal action=none>";
|
||||
+ tmp = process_form(parse_tag(&s, TRUE));
|
||||
+ }
|
||||
+ if (tmp == NULL)
|
||||
+ tmp = Strnew();
|
||||
+
|
||||
+ p = "submit";
|
||||
+ parsedtag_get_value(tag, ATTR_TYPE, &p);
|
||||
+ q = NULL;
|
||||
+ parsedtag_get_value(tag, ATTR_VALUE, &q);
|
||||
+ r = "";
|
||||
+ parsedtag_get_value(tag, ATTR_NAME, &r);
|
||||
+
|
||||
+ v = formtype(p);
|
||||
+ if (v == FORM_UNKNOWN)
|
||||
+ return NULL;
|
||||
+
|
||||
+ if (!q) {
|
||||
+ switch (v) {
|
||||
+ case FORM_INPUT_SUBMIT:
|
||||
+ case FORM_INPUT_BUTTON:
|
||||
+ q = "SUBMIT";
|
||||
+ break;
|
||||
+ case FORM_INPUT_RESET:
|
||||
+ q = "RESET";
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ if (q) {
|
||||
+ qq = html_quote(q);
|
||||
+ qlen = strlen(q);
|
||||
+ }
|
||||
+
|
||||
+ // Strcat_charp(tmp, "<pre_int>");
|
||||
+ Strcat(tmp, Sprintf("<input_alt hseq=\"%d\" fid=\"%d\" type=%s "
|
||||
+ "name=\"%s\" value=\"%s\">",
|
||||
+ cur_hseq++, cur_form_id, p, html_quote(r), qq));
|
||||
+ return tmp;
|
||||
+}
|
||||
+
|
||||
+Str
|
||||
+process_n_button(void)
|
||||
+{
|
||||
+ Str tmp = Strnew();
|
||||
+ Strcat_charp(tmp, "</input_alt>");
|
||||
+ // Strcat_charp(tmp, "</pre_int>");
|
||||
+ return tmp;
|
||||
+}
|
||||
+
|
||||
+Str
|
||||
process_select(struct parsed_tag *tag)
|
||||
{
|
||||
Str tmp = NULL;
|
||||
@@ -4859,7 +4938,35 @@
|
||||
if (i > obuf->bottom_margin)
|
||||
obuf->bottom_margin = i;
|
||||
}
|
||||
+ if (parsedtag_get_value(tag, ATTR_HSEQ, &hseq)) {
|
||||
+ obuf->input_alt.hseq = hseq;
|
||||
+ }
|
||||
+ if (parsedtag_get_value(tag, ATTR_FID, &i)) {
|
||||
+ obuf->input_alt.fid = i;
|
||||
+ }
|
||||
+ if (parsedtag_get_value(tag, ATTR_TYPE, &p)) {
|
||||
+ obuf->input_alt.type = Strnew_charp(p);
|
||||
+ }
|
||||
+ if (parsedtag_get_value(tag, ATTR_VALUE, &p)) {
|
||||
+ obuf->input_alt.value = Strnew_charp(p);
|
||||
+ }
|
||||
+ if (parsedtag_get_value(tag, ATTR_NAME, &p)) {
|
||||
+ obuf->input_alt.name = Strnew_charp(p);
|
||||
+ }
|
||||
+ obuf->input_alt.in = 1;
|
||||
return 0;
|
||||
+ case HTML_N_INPUT_ALT:
|
||||
+ if (obuf->input_alt.in) {
|
||||
+ if (!close_effect0(obuf, HTML_INPUT_ALT))
|
||||
+ push_tag(obuf, "</input_alt>", HTML_N_INPUT_ALT);
|
||||
+ obuf->input_alt.hseq = 0;
|
||||
+ obuf->input_alt.fid = -1;
|
||||
+ obuf->input_alt.in = 0;
|
||||
+ obuf->input_alt.type = NULL;
|
||||
+ obuf->input_alt.name = NULL;
|
||||
+ obuf->input_alt.value = NULL;
|
||||
+ }
|
||||
+ return 1;
|
||||
case HTML_TABLE:
|
||||
close_anchor(h_env, obuf);
|
||||
obuf->table_level++;
|
||||
@@ -4968,6 +5075,16 @@
|
||||
case HTML_INPUT:
|
||||
close_anchor(h_env, obuf);
|
||||
tmp = process_input(tag);
|
||||
+ if (tmp)
|
||||
+ HTMLlineproc1(tmp->ptr, h_env);
|
||||
+ return 1;
|
||||
+ case HTML_BUTTON:
|
||||
+ tmp = process_button(tag);
|
||||
+ if (tmp)
|
||||
+ HTMLlineproc1(tmp->ptr, h_env);
|
||||
+ return 1;
|
||||
+ case HTML_N_BUTTON:
|
||||
+ tmp = process_n_button();
|
||||
if (tmp)
|
||||
HTMLlineproc1(tmp->ptr, h_env);
|
||||
return 1;
|
||||
@@ -5680,6 +5797,21 @@
|
||||
putHmarker(buf->hmarklist, currentLn(buf),
|
||||
hpos, hseq - 1);
|
||||
}
|
||||
+ else if (hseq < 0) {
|
||||
+ int h = -hseq - 1;
|
||||
+ int hpos = pos;
|
||||
+ if (*str == '[')
|
||||
+ hpos++;
|
||||
+ if (buf->hmarklist &&
|
||||
+ h < buf->hmarklist->nmark &&
|
||||
+ buf->hmarklist->marks[h].invalid) {
|
||||
+ buf->hmarklist->marks[h].pos = hpos;
|
||||
+ buf->hmarklist->marks[h].line = currentLn(buf);
|
||||
+ buf->hmarklist->marks[h].invalid = 0;
|
||||
+ hseq = -hseq;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (!form->target)
|
||||
form->target = buf->baseTarget;
|
||||
if (a_textarea &&
|
||||
@@ -6747,6 +6879,12 @@
|
||||
obuf->nobr_level = 0;
|
||||
bzero((void *)&obuf->anchor, sizeof(obuf->anchor));
|
||||
obuf->img_alt = 0;
|
||||
+ obuf->input_alt.hseq = 0;
|
||||
+ obuf->input_alt.fid = -1;
|
||||
+ obuf->input_alt.in = 0;
|
||||
+ obuf->input_alt.type = NULL;
|
||||
+ obuf->input_alt.name = NULL;
|
||||
+ obuf->input_alt.value = NULL;
|
||||
obuf->in_bold = 0;
|
||||
obuf->in_italic = 0;
|
||||
obuf->in_under = 0;
|
||||
@@ -6782,6 +6920,15 @@
|
||||
push_tag(obuf, "</img_alt>", HTML_N_IMG_ALT);
|
||||
obuf->img_alt = NULL;
|
||||
}
|
||||
+ if (obuf->input_alt.in) {
|
||||
+ push_tag(obuf, "</input_alt>", HTML_N_INPUT_ALT);
|
||||
+ obuf->input_alt.hseq = 0;
|
||||
+ obuf->input_alt.fid = -1;
|
||||
+ obuf->input_alt.in = 0;
|
||||
+ obuf->input_alt.type = NULL;
|
||||
+ obuf->input_alt.name = NULL;
|
||||
+ obuf->input_alt.value = NULL;
|
||||
+ }
|
||||
if (obuf->in_bold) {
|
||||
push_tag(obuf, "</b>", HTML_N_B);
|
||||
obuf->in_bold = 0;
|
||||
Index: fm.h
|
||||
===================================================================
|
||||
RCS file: /cvsroot/w3m/w3m/fm.h,v
|
||||
retrieving revision 1.149
|
||||
diff -u -r1.149 fm.h
|
||||
--- w3m.orig/fm.h 20 Aug 2010 09:47:09 -0000 1.149
|
||||
+++ w3m/fm.h 17 Sep 2010 12:18:55 -0000
|
||||
@@ -562,6 +562,13 @@
|
||||
#define INIT_BUFFER_WIDTH ((_INIT_BUFFER_WIDTH > 0) ? _INIT_BUFFER_WIDTH : 0)
|
||||
#define FOLD_BUFFER_WIDTH (FoldLine ? (INIT_BUFFER_WIDTH + 1) : -1)
|
||||
|
||||
+struct input_alt_attr {
|
||||
+ int hseq;
|
||||
+ int fid;
|
||||
+ int in;
|
||||
+ Str type, name, value;
|
||||
+};
|
||||
+
|
||||
typedef struct {
|
||||
int pos;
|
||||
int len;
|
||||
@@ -569,6 +576,7 @@
|
||||
long flag;
|
||||
Anchor anchor;
|
||||
Str img_alt;
|
||||
+ struct input_alt_attr input_alt;
|
||||
char fontstat[FONTSTAT_SIZE];
|
||||
short nobr_level;
|
||||
Lineprop prev_ctype;
|
||||
@@ -591,6 +599,7 @@
|
||||
short nobr_level;
|
||||
Anchor anchor;
|
||||
Str img_alt;
|
||||
+ struct input_alt_attr input_alt;
|
||||
char fontstat[FONTSTAT_SIZE];
|
||||
char fontstat_stack[FONT_STACK_SIZE][FONTSTAT_SIZE];
|
||||
int fontstat_sp;
|
||||
Index: html.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/w3m/w3m/html.c,v
|
||||
retrieving revision 1.32
|
||||
diff -u -r1.32 html.c
|
||||
--- w3m.orig/html.c 14 Aug 2010 01:29:40 -0000 1.32
|
||||
+++ w3m/html.c 17 Sep 2010 12:18:55 -0000
|
||||
@@ -56,6 +56,9 @@
|
||||
ATTR_CORE
|
||||
};
|
||||
#define MAXA_INPUT MAXA_CORE + 12
|
||||
+unsigned char ALST_BUTTON[] =
|
||||
+ { ATTR_TYPE, ATTR_VALUE, ATTR_NAME, ATTR_CORE };
|
||||
+#define MAXA_BUTTON MAXA_CORE + 3
|
||||
unsigned char ALST_TEXTAREA[] =
|
||||
{ ATTR_COLS, ATTR_ROWS, ATTR_NAME, ATTR_READONLY, ATTR_CORE };
|
||||
#define MAXA_TEXTAREA MAXA_CORE + 4
|
||||
@@ -247,24 +250,24 @@
|
||||
{"/bdo", NULL, 0, TFLG_END}, /* 121 HTML_N_BDO */
|
||||
{"big", ALST_NOP, MAXA_NOP, 0}, /* 122 HTML_BIG */
|
||||
{"/big", NULL, 0, TFLG_END}, /* 123 HTML_N_BIG */
|
||||
- {"button", ALST_NOP, MAXA_NOP, 0}, /* 124 HTML_BUTTON */
|
||||
- {"fieldset", ALST_NOP, MAXA_NOP, 0}, /* 125 HTML_FIELDSET */
|
||||
- {"/fieldset", NULL, 0, TFLG_END}, /* 126 HTML_N_FIELDSET */
|
||||
- {"iframe", ALST_NOP, MAXA_NOP, 0}, /* 127 HTML_IFRAME */
|
||||
- {"label", ALST_NOP, MAXA_NOP, 0}, /* 128 HTML_LABEL */
|
||||
- {"/label", NULL, 0, TFLG_END}, /* 129 HTML_N_LABEL */
|
||||
- {"legend", ALST_NOP, MAXA_NOP, 0}, /* 130 HTML_LEGEND */
|
||||
- {"/legend", NULL, 0, TFLG_END}, /* 131 HTML_N_LEGEND */
|
||||
- {"noscript", ALST_NOP, MAXA_NOP, 0}, /* 132 HTML_NOSCRIPT */
|
||||
- {"/noscript", NULL, 0, TFLG_END}, /* 133 HTML_N_NOSCRIPT */
|
||||
- {"object", ALST_NOP, MAXA_NOP, 0}, /* 134 HTML_OBJECT */
|
||||
- {"optgroup", ALST_NOP, MAXA_NOP, 0}, /* 135 HTML_OPTGROUP */
|
||||
- {"/optgroup", NULL, 0, TFLG_END}, /* 136 HTML_N_OPTGROUP */
|
||||
- {"param", ALST_NOP, MAXA_NOP, 0}, /* 137 HTML_PARAM */
|
||||
- {"small", ALST_NOP, MAXA_NOP, 0}, /* 138 HTML_SMALL */
|
||||
- {"/small", NULL, 0, TFLG_END}, /* 139 HTML_N_SMALL */
|
||||
+ {"button", ALST_BUTTON, MAXA_BUTTON, 0}, /* 124 HTML_BUTTON */
|
||||
+ {"/button", NULL, 0, TFLG_END}, /* 125 HTML_N_BUTTON */
|
||||
+ {"fieldset", ALST_NOP, MAXA_NOP, 0}, /* 126 HTML_FIELDSET */
|
||||
+ {"/fieldset", NULL, 0, TFLG_END}, /* 127 HTML_N_FIELDSET */
|
||||
+ {"iframe", ALST_NOP, MAXA_NOP, 0}, /* 128 HTML_IFRAME */
|
||||
+ {"label", ALST_NOP, MAXA_NOP, 0}, /* 129 HTML_LABEL */
|
||||
+ {"/label", NULL, 0, TFLG_END}, /* 130 HTML_N_LABEL */
|
||||
+ {"legend", ALST_NOP, MAXA_NOP, 0}, /* 131 HTML_LEGEND */
|
||||
+ {"/legend", NULL, 0, TFLG_END}, /* 132 HTML_N_LEGEND */
|
||||
+ {"noscript", ALST_NOP, MAXA_NOP, 0}, /* 133 HTML_NOSCRIPT */
|
||||
+ {"/noscript", NULL, 0, TFLG_END}, /* 134 HTML_N_NOSCRIPT */
|
||||
+ {"object", ALST_NOP, MAXA_NOP, 0}, /* 135 HTML_OBJECT */
|
||||
+ {"optgroup", ALST_NOP, MAXA_NOP, 0}, /* 136 HTML_OPTGROUP */
|
||||
+ {"/optgroup", NULL, 0, TFLG_END}, /* 137 HTML_N_OPTGROUP */
|
||||
+ {"param", ALST_NOP, MAXA_NOP, 0}, /* 138 HTML_PARAM */
|
||||
+ {"small", ALST_NOP, MAXA_NOP, 0}, /* 139 HTML_SMALL */
|
||||
+ {"/small", NULL, 0, TFLG_END}, /* 140 HTML_N_SMALL */
|
||||
|
||||
- {NULL, NULL, 0, 0}, /* 140 Undefined */
|
||||
{NULL, NULL, 0, 0}, /* 141 Undefined */
|
||||
{NULL, NULL, 0, 0}, /* 142 Undefined */
|
||||
{NULL, NULL, 0, 0}, /* 143 Undefined */
|
||||
Index: html.h
|
||||
===================================================================
|
||||
RCS file: /cvsroot/w3m/w3m/html.h,v
|
||||
retrieving revision 1.31
|
||||
diff -u -r1.31 html.h
|
||||
--- w3m.orig/html.h 14 Aug 2010 01:29:40 -0000 1.31
|
||||
+++ w3m/html.h 17 Sep 2010 12:18:55 -0000
|
||||
@@ -214,21 +214,22 @@
|
||||
#define HTML_BIG 122
|
||||
#define HTML_N_BIG 123
|
||||
#define HTML_BUTTON 124
|
||||
-#define HTML_FIELDSET 125
|
||||
-#define HTML_N_FIELDSET 126
|
||||
-#define HTML_IFRAME 127
|
||||
-#define HTML_LABEL 128
|
||||
-#define HTML_N_LABEL 129
|
||||
-#define HTML_LEGEND 130
|
||||
-#define HTML_N_LEGEND 131
|
||||
-#define HTML_NOSCRIPT 132
|
||||
-#define HTML_N_NOSCRIPT 133
|
||||
-#define HTML_OBJECT 134
|
||||
-#define HTML_OPTGROUP 135
|
||||
-#define HTML_N_OPTGROUP 136
|
||||
-#define HTML_PARAM 137
|
||||
-#define HTML_SMALL 138
|
||||
-#define HTML_N_SMALL 139
|
||||
+#define HTML_N_BUTTON 125
|
||||
+#define HTML_FIELDSET 126
|
||||
+#define HTML_N_FIELDSET 127
|
||||
+#define HTML_IFRAME 128
|
||||
+#define HTML_LABEL 129
|
||||
+#define HTML_N_LABEL 130
|
||||
+#define HTML_LEGEND 131
|
||||
+#define HTML_N_LEGEND 132
|
||||
+#define HTML_NOSCRIPT 133
|
||||
+#define HTML_N_NOSCRIPT 134
|
||||
+#define HTML_OBJECT 135
|
||||
+#define HTML_OPTGROUP 136
|
||||
+#define HTML_N_OPTGROUP 137
|
||||
+#define HTML_PARAM 138
|
||||
+#define HTML_SMALL 139
|
||||
+#define HTML_N_SMALL 140
|
||||
|
||||
/* pseudo tag */
|
||||
#define HTML_SELECT_INT 160
|
||||
Index: proto.h
|
||||
===================================================================
|
||||
RCS file: /cvsroot/w3m/w3m/proto.h,v
|
||||
retrieving revision 1.104
|
||||
diff -u -r1.104 proto.h
|
||||
--- w3m.orig/proto.h 25 Jul 2010 09:55:05 -0000 1.104
|
||||
+++ w3m/proto.h 17 Sep 2010 12:18:55 -0000
|
||||
@@ -207,6 +207,8 @@
|
||||
extern Str process_img(struct parsed_tag *tag, int width);
|
||||
extern Str process_anchor(struct parsed_tag *tag, char *tagbuf);
|
||||
extern Str process_input(struct parsed_tag *tag);
|
||||
+extern Str process_button(struct parsed_tag *tag);
|
||||
+extern Str process_n_button(void);
|
||||
extern Str process_select(struct parsed_tag *tag);
|
||||
extern Str process_n_select(void);
|
||||
extern void feed_select(char *str);
|
||||
Index: table.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/w3m/w3m/table.c,v
|
||||
retrieving revision 1.58
|
||||
diff -u -r1.58 table.c
|
||||
--- w3m.orig/table.c 9 Aug 2010 11:59:19 -0000 1.58
|
||||
+++ w3m/table.c 17 Sep 2010 12:18:55 -0000
|
||||
@@ -2878,6 +2878,14 @@
|
||||
tmp = process_input(tag);
|
||||
feed_table1(tbl, tmp, mode, width);
|
||||
break;
|
||||
+ case HTML_BUTTON:
|
||||
+ tmp = process_button(tag);
|
||||
+ feed_table1(tbl, tmp, mode, width);
|
||||
+ break;
|
||||
+ case HTML_N_BUTTON:
|
||||
+ tmp = process_n_button();
|
||||
+ feed_table1(tbl, tmp, mode, width);
|
||||
+ break;
|
||||
case HTML_SELECT:
|
||||
tmp = process_select(tag);
|
||||
if (tmp)
|
||||
Index: tagtable.tab
|
||||
===================================================================
|
||||
RCS file: /cvsroot/w3m/w3m/tagtable.tab,v
|
||||
retrieving revision 1.14
|
||||
diff -u -r1.14 tagtable.tab
|
||||
--- w3m.orig/tagtable.tab 14 Aug 2010 01:29:40 -0000 1.14
|
||||
+++ w3m/tagtable.tab 17 Sep 2010 12:18:55 -0000
|
||||
@@ -176,6 +176,7 @@
|
||||
big HTML_BIG
|
||||
/big HTML_N_BIG
|
||||
button HTML_BUTTON
|
||||
+/button HTML_N_BUTTON
|
||||
fieldset HTML_FIELDSET
|
||||
/fieldset HTML_N_FIELDSET
|
||||
iframe HTML_IFRAME
|
46
network/w3m/patches/w3m-0.5.3-gdk-pixbuf.patch
Normal file
46
network/w3m/patches/w3m-0.5.3-gdk-pixbuf.patch
Normal file
|
@ -0,0 +1,46 @@
|
|||
--- a/w3mimg/x11/x11_w3mimg.c 2004-11-08 18:14:06.000000000 +0100
|
||||
+++ b/w3mimg/x11/x11_w3mimg.c 2012-05-19 06:31:08.908783927 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
#elif defined(USE_GDKPIXBUF)
|
||||
#if defined(USE_GTK2)
|
||||
#include <glib-object.h>
|
||||
-#include <gdk/gdk.h>
|
||||
+#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
|
||||
#else
|
||||
#include <gdk-pixbuf/gdk-pixbuf-xlib.h>
|
||||
--- a/w3mimg/fb/fb_gdkpixbuf.c 2004-11-08 18:14:06.000000000 +0100
|
||||
+++ b/w3mimg/fb/fb_gdkpixbuf.c 2012-05-20 05:06:07.744816661 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "config.h"
|
||||
#if defined(USE_GTK2)
|
||||
#include <glib-object.h>
|
||||
-#include <gdk/gdk.h>
|
||||
+#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#endif
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#include "fb.h"
|
||||
--- a/acinclude.m4 2011-01-04 10:22:18.000000000 +0100
|
||||
+++ b/acinclude.m4 2012-05-20 05:15:36.158981506 +0200
|
||||
@@ -705,8 +705,8 @@ AC_DEFUN([AC_W3M_IMAGE],
|
||||
IMGTARGETS="x11"
|
||||
AC_DEFINE(USE_GDKPIXBUF)
|
||||
AC_DEFINE(USE_GTK2)
|
||||
- IMGX11CFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`"
|
||||
- IMGX11LDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0`"
|
||||
+ IMGX11CFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0`"
|
||||
+ IMGX11LDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0`"
|
||||
elif test x"$have_gdkpixbuf" = xyes; then
|
||||
AC_DEFINE(USE_W3MIMG_X11)
|
||||
IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
|
||||
@@ -740,8 +740,8 @@ AC_DEFUN([AC_W3M_IMAGE],
|
||||
IMGTARGETS="${IMGTARGETS} fb"
|
||||
AC_DEFINE(USE_GDKPIXBUF)
|
||||
AC_DEFINE(USE_GTK2)
|
||||
- IMGFBCFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0 gtk+-2.0`"
|
||||
- IMGFBLDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0 gtk+-2.0`"
|
||||
+ IMGFBCFLAGS="`${PKG_CONFIG} --cflags gdk-pixbuf-2.0`"
|
||||
+ IMGFBLDFLAGS="`${PKG_CONFIG} --libs gdk-pixbuf-2.0`"
|
||||
elif test x"$have_gdkpixbuf" = xyes; then
|
||||
AC_DEFINE(USE_W3MIMG_FB)
|
||||
IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
|
58
network/w3m/patches/w3m-0.5.3-glibc214.patch
Normal file
58
network/w3m/patches/w3m-0.5.3-glibc214.patch
Normal file
|
@ -0,0 +1,58 @@
|
|||
--- a/istream.c.~1.27.~ 2011-01-04 18:22:22.000000000 +0900
|
||||
+++ a/istream.c 2011-06-24 08:15:23.522990618 +0900
|
||||
@@ -22,8 +22,8 @@
|
||||
static void basic_close(int *handle);
|
||||
static int basic_read(int *handle, char *buf, int len);
|
||||
|
||||
-static void file_close(struct file_handle *handle);
|
||||
-static int file_read(struct file_handle *handle, char *buf, int len);
|
||||
+static void file_close(struct afile_handle *handle);
|
||||
+static int file_read(struct afile_handle *handle, char *buf, int len);
|
||||
|
||||
static int str_read(Str handle, char *buf, int len);
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
stream = New(union input_stream);
|
||||
init_base_stream(&stream->base, STREAM_BUF_SIZE);
|
||||
stream->file.type = IST_FILE;
|
||||
- stream->file.handle = New(struct file_handle);
|
||||
+ stream->file.handle = New(struct afile_handle);
|
||||
stream->file.handle->f = f;
|
||||
if (closep)
|
||||
stream->file.handle->close = closep;
|
||||
@@ -658,13 +658,13 @@
|
||||
}
|
||||
|
||||
static void
|
||||
-file_close(struct file_handle *handle)
|
||||
+file_close(struct afile_handle *handle)
|
||||
{
|
||||
handle->close(handle->f);
|
||||
}
|
||||
|
||||
static int
|
||||
-file_read(struct file_handle *handle, char *buf, int len)
|
||||
+file_read(struct afile_handle *handle, char *buf, int len)
|
||||
{
|
||||
return fread(buf, 1, len, handle->f);
|
||||
}
|
||||
--- a/istream.h.~1.12.~ 2003-10-21 01:41:56.000000000 +0900
|
||||
+++ a/istream.h 2011-06-24 08:15:54.392991144 +0900
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
typedef struct stream_buffer *StreamBuffer;
|
||||
|
||||
-struct file_handle {
|
||||
+struct afile_handle {
|
||||
FILE *f;
|
||||
void (*close) ();
|
||||
};
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
struct file_stream {
|
||||
struct stream_buffer stream;
|
||||
- struct file_handle *handle;
|
||||
+ struct afile_handle *handle;
|
||||
char type;
|
||||
char iseos;
|
||||
int (*read) ();
|
15
network/w3m/patches/w3m-0.5.3-underlinking.patch
Normal file
15
network/w3m/patches/w3m-0.5.3-underlinking.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
Description: Explicitly link w3mimgdisplay with -lX11 to build with gcc 4.5
|
||||
Author: Martin Pitt <martin.pitt@ubuntu.com>
|
||||
Bug: https://sourceforge.net/tracker/?func=detail&aid=3126430&group_id=39518&atid=425441
|
||||
|
||||
--- w3m-0.5.3.orig/Makefile.in 2011-01-04 18:22:18.000000000 +0900
|
||||
+++ w3m-0.5.3/Makefile.in 2011-02-06 12:05:40.000000000 +0900
|
||||
@@ -199,7 +199,7 @@
|
||||
$(CC) $(CFLAGS) -DDUMMY -c -o $@ $?
|
||||
|
||||
$(IMGDISPLAY): w3mimgdisplay.o $(ALIB) w3mimg/w3mimg.a
|
||||
- $(IMGLINK) $(CFLAGS) -o $(IMGDISPLAY) w3mimgdisplay.o w3mimg/w3mimg.a $(LDFLAGS) $(LIBS) $(IMGLDFLAGS)
|
||||
+ $(IMGLINK) $(CFLAGS) -o $(IMGDISPLAY) w3mimgdisplay.o w3mimg/w3mimg.a $(LDFLAGS) $(LIBS) -lX11 $(IMGLDFLAGS)
|
||||
|
||||
w3mimgdisplay.o: w3mimgdisplay.c w3mimg/w3mimg.h
|
||||
$(CC) $(CFLAGS) $(IMGCFLAGS) -o $@ -c $(srcdir)/w3mimgdisplay.c
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
PRGNAM=w3m
|
||||
VERSION=${VERSION:-0.5.3}
|
||||
BUILD=${BUILD:-2}
|
||||
BUILD=${BUILD:-3}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
|
@ -68,6 +68,9 @@ find . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
# Thanks go to gentoo for these patches
|
||||
for i in $CWD/patches/* ; do patch -p1 < $i ; done
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
|
|
Loading…
Reference in a new issue