$B$d$^$F$G$9!#(B
> $B$3$l!"<B$O!"8=>]$O:3:Y$J$N$G$9$,!"Cn$O:3:Y$H$O$$$($^$;$s!#(Brender$B0J2<(B
> $BN,(B
$B$r=q$-$^$7$?!#8+$F$NDL$j(Bread_token & gethtmlcmd$B%Y!<%9$K$J$C$F$$$^$9!#(B
pre$B$b:o$l$?$N$G!"8D?ME*$K$O!D!D9,$;$G$9!#$J$K$h$j%3!<%I$b>.$5$/$J$C$?(B
$B$7!#(B
$B$G!"$A$g$C$HIT;W5D$K;W$C$?$N$,!"(Bread_token$B$,(B<!-- -->$B$rFI$_9~$`$H$-$N(B
$BF0:n$G$9!#$3$l$K$h$k$H!"(Bappend$B$N$H$-$K(B<!-- -->$B$rFI$_9~$`$H!"(Btoken$B$K$O(B
"<"$B$,F~$j$^$9!#$I$N$h$&$J0U?^$G$3$&$J$C$F$$$k$N$G$7$g$&$+!#(B
$B$A$J$_$K!"(Bframe$B$N%F%9%H$O0J2<$N%Z!<%8$G9T$C$F$$$^$9!#(B
$B<+:n(B
a<!--\n-->b
Chandra ML -> $BE,Ev$J%a!<%k(B
http://kbic.ardour.co.jp:8080/~ritchy/chandra/ml/
frame$B$K(BID$BBG$C$F$h$+$C$?(B ($B<B$OM}M3$,8eIU$1(B)
keith303 -> music, 1999
http://www.cmpages.de/keith303/
hunz
http://www.globec.com.au/~hunz/
$B$b$C$H$b$$$d$C$]$$I=<($N%Z!<%8(B
tito -> track, guest
http://hem.passagen.se/althoff
first&fast -> BBS
http://www.cds-co.com/ff/
TODAY'S REMARK
http://www.tomoya.com/
refresh$B$N5-=R$,$$$d$C$]$$%Z!<%8!#$=$l$O$J$$$G$7$g!D!D(B
$B5$>]D#H/I=E75$M=Js(B -> $B4XEl(B
http://tenki.or.jp/all.html
$B;~9oI=%j%s%/(B -> $B?@F`@n(B -> $B?ALn=BBt;~9oI=(B -> $BE,Ev(B
http://www.jikoku.com/
$BK?<R%o!<%/%U%m!<$N(BWeb$BHG(B
$B%F%9%H$K$b$C$F$3$$$N$$$d!<$s$J(Bframeset HTML$B$N%Z!<%8Jg=8Cf$G$9!#(B
$B:G8e$N(Bw3mhelperpanel$B$X$N%Q%C%A$O$40&7I!#(B
--- $B$d$^$F(B
diff -rNU3 -x [.#]* -x gc -x *.[~aol~] -x *.out -x config.* -x *.core -x *.orig -x *.rej -x XXMakefile -x mktable -x tagtable.c -x zzz* -x w3m -x w3mbookmark -x w3mhelperpanel -x w3m.prof -x conv* w3m.current/frame.c w3m.new/frame.c --- w3m.current/frame.c Wed May 24 16:09:02 2000 +++ w3m.new/frame.c Thu May 25 17:35:38 2000 @@ -351,19 +351,6 @@ } } -static char *prohibit_tags[] = -{ - "html", "head", "body", "/html", "/head", "/body", - "meta", "doctype", "base", - NULL -}; - -static char *table_tags[] = -{ - "td", "/td", "tr", "/tr", "th", "/th", - NULL -}; - static struct frameset * frame_download_source(struct frame_body *b, ParsedURL *currentURL, ParsedURL *baseURL) { @@ -423,27 +410,22 @@ static int createFrameFile(struct frameset *f, FILE * f1, Buffer * current, int level) { - int r, - c, - status, - pre, - a_target, - is_anchor, - t_stack; - FILE *f2; - Str tmp, - tok, - continuation; + int r, + c, + status, + t_stack; + FILE *f2; + Str tmp, + tok; #ifdef JP_CHARSET - char code, ic; + char code, ic; #endif /* JP_CHARSET */ - char *p, - *d_target, - *p_target, - *s_target, - *t_target; - ParsedURL *currentURL, - base; + char *d_target, + *p_target, + *s_target, + *t_target; + ParsedURL *currentURL, + base; MySignalHandler(*prevtrap) (SIGNAL_ARG) = NULL; if (f == NULL) @@ -478,15 +460,14 @@ currentURL = f->currentURL ? f->currentURL : ¤t->currentURL; tok = Strnew(); - continuation = Strnew(); status = R_ST_NORMAL; - pre = 0; for (r = 0; r < f->row; r++) { fputs("<tr>\n", f1); for (c = 0; c < f->col; c++) { union frameset_element frame; struct frameset *f_frameset; int i = c + r * f->col; + char *p = ""; frame = f->frame[i]; @@ -541,185 +522,188 @@ #endif /* JP_CHARSET */ t_stack = 0; while (1) { - tmp = Strmyfgets(f2); - if (tmp->length == 0) - break; + do { + if (*p == '\0') { + tmp = Strmyfgets(f2); + if (tmp->length == 0) + break; #ifdef JP_CHARSET - if ((ic = checkShiftCode(tmp->ptr, code)) != '\0') - tmp = conv(tmp->ptr, (code = ic), InnerCode); + if ((ic = checkShiftCode(tmp->ptr, code)) != '\0') + tmp = conv(tmp->ptr, (code = ic), InnerCode); #endif /* JP_CHARSET */ - if (pre) - Strchop(tmp); - p = tmp->ptr; - while (read_token(tok, &p, &status, pre, 0)) { - if (continuation->length > 0) { - Strcat(continuation, tok); - tok = continuation; - continuation = Strnew(); + p = tmp->ptr; } - if (status != R_ST_NORMAL) { - if (Strlastchar(tok) == '\n') { - Strchop(tok); - } - if (ST_IS_REAL_TAG(status)) { - Strcat_char(tok, ' '); - } - continuation = tok; - tok = Strnew(); - break; + if (status == R_ST_NORMAL && + !strncmp(p, "<!", 2)) { + read_token(tok, &p, &status, 1, 1); + Strclear(tok); + continue; } - if (tok->ptr[0] == '<') { - struct parsed_tagarg *targ, - *t; - Str tagname = Strnew(); - int j; - ParsedURL url; - - for (j = 1; - j < tok->length && !IS_SPACE(tok->ptr[j]) && tok->ptr[j] != '>'; - j++) { - Strcat_char(tagname, tok->ptr[j]); - } - if (!strcasecmp(tagname->ptr, "base")) { - targ = parse_tag(tok->ptr); - for (t = targ; t; t = t->next) { - if (!strcasecmp(t->arg, "href") && - t->value) - parseURL(t->value, &base, NULL); - else if (!strcasecmp(t->arg, "target") && - t->value) { - if (!strcasecmp(t->value, "_self")) - d_target = s_target; - else if (!strcasecmp(t->value, - "_parent")) - d_target = p_target; - else - d_target = t->value; - } - } - } - if (!strcasecmp(tagname->ptr, "title")) { - fprintf(f1, "<!-- title:"); - continue; - } - else if (!strcasecmp(tagname->ptr, "/title")) { - fprintf(f1, "-->"); - continue; - } - else if (!strcasecmp(tagname->ptr, "table")) { - t_stack++; - } - else if (!strcasecmp(tagname->ptr, "/table")) { - if (--t_stack < 0) { - t_stack = 0; - fputs("<!-- /table -->", f1); - continue; - } - } - else { - int i; + read_token(tok, &p, &status, 1, 1); + } while (status != R_ST_NORMAL) ; - for (i = 0; prohibit_tags[i]; i++) { - if (!strcasecmp(tagname->ptr, - prohibit_tags[i])) { - Strshrinkfirst(tok, j); - Strshrink(tok, 1); - fprintf(f1, "<!-- %s %s -->", - tagname->ptr, tok->ptr); - break; - } - } - if (prohibit_tags[i]) - continue; + if (tok->length > 0 && tok->ptr[0] == '<') { + char *q = tok->ptr; + int cmd, + j, + is_anchor = 0, + a_target = 0; + struct parsed_tagarg *targ, + *t; + Str tagname = Strnew(); + ParsedURL url; + + cmd = gethtmlcmd(&q, &j); + targ = parse_tag(tok->ptr); + + for (j = 1; + j < tok->length && !IS_SPACE(tok->ptr[j]) && tok->ptr[j] != '>'; + j++) { + Strcat_char(tagname, tok->ptr[j]); + } - if (!t_stack) { - for (i = 0; table_tags[i]; i++) { - if (!strcasecmp(tagname->ptr, - table_tags[i])) { - fprintf(f1, "<!-- %s %s -->", - tagname->ptr, tok->ptr); - break; - } - } - if (table_tags[i]) - continue; + switch (cmd) { + case HTML_TITLE: + fputs("<!-- title:", f1); + goto token_end; + case HTML_N_TITLE: + fputs("-->", f1); + goto token_end; + case HTML_BASE: + for (t = targ; t; t = t->next) { + if (!strcasecmp(t->arg, "href") && + t->value) + parseURL(t->value, &base, NULL); + else if (!strcasecmp(t->arg, "target") && + t->value) { + if (!strcasecmp(t->value, "_self")) + d_target = s_target; + else if (!strcasecmp(t->value, + "_parent")) + d_target = p_target; + else + d_target = t->value; } } - targ = parse_tag(tok->ptr); - if (!strcasecmp(tagname->ptr, "pre")) { - pre = 1; - tmp = Strnew_charp(p); - Strchop(tmp); - p = tmp->ptr; + /* fall thru, "BASE" is prohibit tag */ + case HTML_HEAD: + case HTML_N_HEAD: + case HTML_BODY: + case HTML_N_BODY: + case HTML_META: + case HTML_DOCTYPE: + /* prohibit_tags */ + Strshrinkfirst(tok, 1); + Strshrink(tok, 1); + fprintf(f1, "<!-- %s -->", tok->ptr); + goto token_end; + case HTML_TABLE: + t_stack++; + break; + case HTML_N_TABLE: + t_stack--; + if (t_stack < 0) { + t_stack = 0; + Strshrinkfirst(tok, 1); + Strshrink(tok, 1); + fprintf(f1, + "<!-- table stack underflow: %s -->", + tok->ptr); + goto token_end; } - else if (!strcasecmp(tagname->ptr, "/pre")) - pre = 0; - - fprintf(f1, "<%s", tagname->ptr); - is_anchor = 0; - a_target = 0; - if (!strcasecmp(tagname->ptr, "a")) { - is_anchor = 1; - a_target = 2; - for (t = targ; t; t = t->next) { - if (a_target == 2 && !strcasecmp(t->arg, "href") && t->value) - a_target = 1; - else if (!strcasecmp(t->arg, "target") && t->value) { - a_target = 0; - if (!strcasecmp(t->value, "_self")) - t->value = s_target; - else if (!strcasecmp(t->value, "_parent")) - t->value = p_target; - break; - } - } + break; + case HTML_THEAD: + case HTML_N_THEAD: + case HTML_TBODY: + case HTML_N_TBODY: + case HTML_TFOOT: + case HTML_N_TFOOT: + case HTML_TD: + case HTML_N_TD: + case HTML_TR: + case HTML_N_TR: + case HTML_TH: + case HTML_N_TH: + /* table_tags MUST be in table stack */ + if (!t_stack) { + Strshrinkfirst(tok, 1); + Strshrink(tok, 1); + fprintf(f1, "<!-- %s -->", tok->ptr); + goto token_end; } - if (!strcasecmp(tagname->ptr, "form")) { - a_target = 1; - for (t = targ; t; t = t->next) { - if (!strcasecmp(t->arg, "target") && t->value) { - a_target = 0; - if (!strcasecmp(t->value, "_self")) - t->value = s_target; - else if (!strcasecmp(t->value, "_parent")) - t->value = p_target; - break; - } + break; + case HTML_A: + is_anchor = 1; + a_target = 2; + for (t = targ; t; t = t->next) { + if (a_target == 2 && + !strcasecmp(t->arg, "href") && + t->value) + a_target = 1; + else if (!strcasecmp(t->arg, "target") && + t->value) { + a_target = 0; + if (!strcasecmp(t->value, "_self")) + t->value = s_target; + else if (!strcasecmp(t->value, "_parent")) + t->value = p_target; } } + break; + case HTML_FORM: + a_target = 1; for (t = targ; t; t = t->next) { - if ((!strcasecmp(t->arg, "src") || - !strcasecmp(t->arg, "href") || - !strcasecmp(t->arg, "action")) && + if (!strcasecmp(t->arg, "target") && t->value) { - if (strncasecmp(t->value, "mailto:", 7) != 0) { - parseURL2(t->value, &url, &base); - t->value = htmlquote_str(parsedURL2Str(&url)->ptr); + a_target = 0; + if (!strcasecmp(t->value, "_self")) + t->value = s_target; + else if (!strcasecmp(t->value, "_parent")) + t->value = p_target; + break; + } + } + break; + default: + break; + } + fputs("<", f1); + fputs(tagname->ptr, f1); + for (t = targ; t; t = t->next) { + if ((!strcasecmp(t->arg, "src") || + !strcasecmp(t->arg, "href") || + !strcasecmp(t->arg, "action")) && + t->value) { + if (strncasecmp(t->value, "mailto:", 7) != 0) { + parseURL2(t->value, &url, &base); + t->value = htmlquote_str(parsedURL2Str(&url)->ptr); #ifdef JP_CHARSET - if (ic != '\0') - fprintf(f1, " CHARSET=\"%c\"", ic); + if (ic != '\0') + fprintf(f1, " CHARSET=\"%c\"", ic); #endif /* JP_CHARSET */ - } } - fprintf(f1, " %s", t->arg); - if (t->value) - fprintf(f1, "=\"%s\"", t->value); } - if (a_target == 1) { - /* there is HREF attribute and no - * TARGET attribute */ - fprintf(f1, " TARGET=\"%s\"", d_target); - } - if (is_anchor) - fprintf(f1, " REFERER=\"%s\"", - htmlquote_str(parsedURL2Str(&base)->ptr)); - fprintf(f1, ">"); + fprintf(f1, " %s", t->arg); + if (t->value) + fprintf(f1, "=\"%s\"", t->value); } - else { - fputs(tok->ptr, f1); + if (a_target == 1) { + /* there is HREF attribute and no + * TARGET attribute */ + fprintf(f1, " TARGET=\"%s\"", d_target); } + if (is_anchor) + fprintf(f1, " REFERER=\"%s\"", + htmlquote_str(parsedURL2Str(&base)->ptr)); + fputs(">", f1); + } + else { + fputs(tok->ptr, f1); } - fputc('\n', f1); + token_end: + if (tmp->length == 0) + break; + Strclear(tok); } while (t_stack--) fputs("</TABLE>\n", f1); diff -rNU3 -x [.#]* -x gc -x *.[~aol~] -x *.out -x config.* -x *.core -x *.orig -x *.rej -x XXMakefile -x mktable -x tagtable.c -x zzz* -x w3m -x w3mbookmark -x w3mhelperpanel -x w3m.prof -x conv* w3m.current/html.h w3m.new/html.h --- w3m.current/html.h Tue May 23 21:15:50 2000 +++ w3m.new/html.h Thu May 25 16:03:20 2000 @@ -180,6 +180,9 @@ #define HTML_APPLET 92 #define HTML_EMBED 93 #define HTML_N_OPTION 94 +#define HTML_HEAD 95 +#define HTML_N_HEAD 96 +#define HTML_DOCTYPE 97 /* pseudo tag */ #define HTML_DUMMY_TABLE 113 diff -rNU3 -x [.#]* -x gc -x *.[~aol~] -x *.out -x config.* -x *.core -x *.orig -x *.rej -x XXMakefile -x mktable -x tagtable.c -x zzz* -x w3m -x w3mbookmark -x w3mhelperpanel -x w3m.prof -x conv* w3m.current/proto.h w3m.new/proto.h --- w3m.current/proto.h Wed May 24 16:04:45 2000 +++ w3m.new/proto.h Wed May 24 18:54:24 2000 @@ -322,7 +322,7 @@ extern char *GetSICode(char key); extern char *GetSOCode(char key); extern Str conv(char *is, char fc, char tc); -extern char checkShiftCode(char *buf, char hint); +extern char checkShiftCode(char *buf, unsigned char hint); #endif /* JP_CHARSET */ extern ParsedURL *baseURL(Buffer * buf); extern int openSocket(char *hostname, char *remoteport_name, unsigned short remoteport_num); diff -rNU3 -x [.#]* -x gc -x *.[~aol~] -x *.out -x config.* -x *.core -x *.orig -x *.rej -x XXMakefile -x mktable -x tagtable.c -x zzz* -x w3m -x w3mbookmark -x w3mhelperpanel -x w3m.prof -x conv* w3m.current/tagtable.tab w3m.new/tagtable.tab --- w3m.current/tagtable.tab Tue May 23 21:15:52 2000 +++ w3m.new/tagtable.tab Thu May 25 15:27:07 2000 @@ -112,10 +112,13 @@ style HTML_STYLE /style HTML_N_STYLE wbr HTML_WBR +head HTML_HEAD +/head HTML_N_HEAD body HTML_BODY /body HTML_N_BODY html HTML_BODY /html HTML_N_BODY +doctype HTML_DOCTYPE tr HTML_TR /tr HTML_N_TR td HTML_TD diff -rNU3 -x [.#]* -x gc -x *.[~aol~] -x *.out -x config.* -x *.core -x *.orig -x *.rej -x XXMakefile -x mktable -x tagtable.c -x zzz* -x w3m -x w3mbookmark -x w3mhelperpanel -x w3m.prof -x conv* w3m.current/w3mhelperpanel.c w3m.new/w3mhelperpanel.c --- w3m.current/w3mhelperpanel.c Wed May 24 16:04:28 2000 +++ w3m.new/w3mhelperpanel.c Wed May 24 16:36:56 2000 @@ -17,7 +17,7 @@ #define MSG_REGISTER "ÅÐÏ¿" #define MSG_DELETE "ºï½ü" #define MSG_DOIT "¼Â¹Ô" -#else /* LANG != JP */ +#else /* LANG != JA */ #define MSG_TITLE "External Viewers" #define MSG_NEW_ENTRY "New Entry" #define MSG_TYPE "Type" @@ -25,7 +25,7 @@ #define MSG_REGISTER "Register" #define MSG_DELETE "Delete" #define MSG_DOIT "Do it" -#endif /* LANG != JP */ +#endif /* LANG != JA */ void extractMailcapEntry(char *mcap_entry, char **type, char **cmd)
This archive was generated by hypermail 2b29 : Wed Jul 19 2000 - 10:30:56 CDT