$B:4!9LZ(B@$B<+Bp$G$9!#(B
# $B:rF|$O;vL3=j$N%l%$%"%&%HJQ99$N4X78$G?&>l$NJ}$N(B mail $B4D6-$O(B
# $B0l@Z;_$^$C$F$*$j!$5"$C$F$+$i$bHh$l$-$C$F$$$?$*$+$2$G2H$G$b(B
# mail $B$r8+$F$$$^$;$s$G$7$?!#(B
From: Yamate Keiichirou <yamate@ebina.hitachi.co.jp>
Subject: [w3m-dev 00614] Re: ID_EXT
Date: Sat, 20 May 2000 22:57:16 +0900
> > 2. HTMLtagproc1$B$O:F5"E*$K8F$S=P$5$l$k(B
>
> $B$O!D!D$A$g$C$HJ}K!$r;W$$$D$+$J$$$s$G$9$1$I!#$I$&$9$l$P$$$$$N$G$7$g$&!#(B
> HTMLlineproc2body$B$G$4$^$+$7$F$b$-$C$H(Bframeset rendering$B$G0z$C3]$+$k$+(B
> $B$i!"85(Btag$B$+$i(BID$B$r0z$C$3H4$/$7$+<j$O$J$$$H;W$&$N$G$9$,!D!D(B
$B$3$l$OBg85$N(B patch $B$r=q$$$?;~E@$G5$$,$D$$$F$$$?$N$G$9$,!$(B
<table>$B$NCf$G$N1F6A$r$-$A$s$H8+@Q$b$l$F$$$J$+$C$?$_$?$$$G$9!#(B
$B$"$l$+$i>/$79M$($F!$%@%_!<$N%?%0$rF3F~$9$k$N$,0lHVAGD>$K(B
$B2r7h$G$-$k$H$$$&5$$,$7$F$-$?$N$G$=$N$h$&$J(B patch $B$r:n$j$^$7$?!#(B
# $B$d$^$F$5$s$N(B patch $B$H$OFHN)$K$J$C$F$7$^$$$^$9$,(B...(--;) $B$*$*$b$H$N(B
# w3m-0.1.10-pre $B$K$bE,MQ$G$-$^$9!#(B
$B:4!9LZ(B $B7r(B (SASAKI Takeshi)
mailto: sasaki@ct.sakura.ne.jp (private)
sasaki@sysrap.cs.fujitsu.co.jp (office)
diff -cr w3m-0.1.10-pre+/file.c w3m/file.c
*** w3m-0.1.10-pre+/file.c Thu May 18 23:56:46 2000
--- w3m/file.c Fri May 19 00:43:59 2000
***************
*** 2364,2383 ****
Str id = NULL;
/*
! * HTML_TABLE is handled by the other process.
*/
! if (cmd == HTML_TABLE)
return;
for (; t; t = t->next) {
- if (!strcasecmp(t->arg, "name") && (cmd == HTML_A))
- return;
if (!strcasecmp(t->arg, "id"))
! id = Sprintf("<a name=\"%s\">", t->value);
}
if (id == NULL)
return;
! push_tag(obuf, id->ptr, HTML_A);
}
#endif /* ID_EXT */
--- 2364,2381 ----
Str id = NULL;
/*
! * HTML_TABLE, HTML_A and HTML_DUMMY_A are handled by the other process.
*/
! if (cmd == HTML_TABLE || cmd == HTML_A || cmd == HTML_DUMMY_A)
return;
for (; t; t = t->next) {
if (!strcasecmp(t->arg, "id"))
! id = Sprintf("<dummy_a name=\"%s\">", t->value);
}
if (id == NULL)
return;
! push_tag(obuf, id->ptr, HTML_DUMMY_A);
}
#endif /* ID_EXT */
***************
*** 2959,2964 ****
--- 2957,2967 ----
case HTML_N_A:
CLOSE_ANCHOR
return 1;
+ #ifdef ID_EXT
+ case HTML_DUMMY_A:
+ /* do nothing */
+ return 1;
+ #endif
case HTML_IMG:
tmp = process_img(parse_tag(h_env->tagbuf->ptr));
HTMLlineproc1(tmp->ptr, h_env);
***************
*** 3068,3074 ****
tables[obuf->table_level] = begin_table(w, x, y);
#ifdef ID_EXT
if (id != NULL)
! Strcopy(tables[obuf->table_level]->id, id);
#endif /* ID_EXT */
#ifdef TABLE_EXPAND
if (obuf->table_level == 0)
--- 3071,3077 ----
tables[obuf->table_level] = begin_table(w, x, y);
#ifdef ID_EXT
if (id != NULL)
! tables[obuf->table_level]->id = Strdup(id);
#endif /* ID_EXT */
#ifdef TABLE_EXPAND
if (obuf->table_level == 0)
***************
*** 3468,3478 ****
--- 3471,3488 ----
effect &= ~PE_UNDER;
break;
case HTML_A:
+ #ifdef ID_EXT
+ case HTML_DUMMY_A:
+ #endif /* ID_EXT */
t_arg = parse_tag(tagbuf->ptr);
p = q = r = s = NULL;
hseq = 0;
for (t = t_arg; t; t = t->next) {
+ #ifdef ID_EXT
+ if ((!strcasecmp(t->arg, "name") || !strcasecmp(t->arg, "id")) && t->value) {
+ #else
if (!strcasecmp(t->arg, "name") && t->value) {
+ #endif /* ID_EXT */
p = t->value;
}
else if (!strcasecmp(t->arg, "href") && t->value) {
diff -cr w3m-0.1.10-pre+/html.h w3m/html.h
*** w3m-0.1.10-pre+/html.h Thu May 18 23:55:59 2000
--- w3m/html.h Thu May 18 23:22:23 2000
***************
*** 197,202 ****
--- 197,203 ----
#define HTML_N_IMG_ALT 125
#define HTML_EOL 126
#define HTML_NOP 127
+ #define HTML_DUMMY_A 128
struct environment {
char env;
diff -cr w3m-0.1.10-pre+/table.c w3m/table.c
*** w3m-0.1.10-pre+/table.c Thu May 18 23:55:59 2000
--- w3m/table.c Thu May 18 23:18:09 2000
***************
*** 318,324 ****
t->suspended_input = Strnew();
t->caption = Strnew();
#ifdef ID_EXT
! t->id = Strnew();
#endif
return t;
}
--- 318,324 ----
t->suspended_input = Strnew();
t->caption = Strnew();
#ifdef ID_EXT
! t->id = NULL;
#endif
return t;
}
***************
*** 1630,1636 ****
HTMLlineproc1("<pre for_table>", h_env);
#ifdef ID_EXT
if (t->id != NULL) {
! idtag = Sprintf("<a name=\"%s\">", (t->id)->ptr);
HTMLlineproc1(idtag->ptr, h_env);
}
#endif /* ID_EXT */
--- 1630,1636 ----
HTMLlineproc1("<pre for_table>", h_env);
#ifdef ID_EXT
if (t->id != NULL) {
! idtag = Sprintf("<dummy_a name=\"%s\">", (t->id)->ptr);
HTMLlineproc1(idtag->ptr, h_env);
}
#endif /* ID_EXT */
***************
*** 1673,1679 ****
Strcat(renderbuf, vrulea);
#ifdef ID_EXT
if (t->tridvalue[r] != NULL && h == 0) {
! idtag = Sprintf("<a name=\"%s\">", (t->tridvalue[r])->ptr);
Strcat(renderbuf, idtag);
}
#endif /* ID_EXT */
--- 1673,1679 ----
Strcat(renderbuf, vrulea);
#ifdef ID_EXT
if (t->tridvalue[r] != NULL && h == 0) {
! idtag = Sprintf("<dummy_a name=\"%s\">", (t->tridvalue[r])->ptr);
Strcat(renderbuf, idtag);
}
#endif /* ID_EXT */
***************
*** 1681,1687 ****
check_row(t, r);
#ifdef ID_EXT
if (t->tabidvalue[r][i] != NULL && h == 0) {
! idtag = Sprintf("<a name=\"%s\">", (t->tabidvalue[r][i])->ptr);
Strcat(renderbuf, idtag);
}
#endif /* ID_EXT */
--- 1681,1687 ----
check_row(t, r);
#ifdef ID_EXT
if (t->tabidvalue[r][i] != NULL && h == 0) {
! idtag = Sprintf("<dummy_a name=\"%s\">", (t->tabidvalue[r][i])->ptr);
Strcat(renderbuf, idtag);
}
#endif /* ID_EXT */
diff -cr w3m-0.1.10-pre+/tagtable.tab w3m/tagtable.tab
*** w3m-0.1.10-pre+/tagtable.tab Thu May 18 23:55:59 2000
--- w3m/tagtable.tab Thu May 18 23:18:53 2000
***************
*** 148,150 ****
--- 148,151 ----
bgsound HTML_BGSOUND
applet HTML_APPLET
embed HTML_EMBED
+ dummy_a HTML_DUMMY_A
This archive was generated by hypermail 2b29 : Wed Jul 19 2000 - 10:30:55 CDT