diff options
-rw-r--r-- | ChangeLog | 22 | ||||
-rw-r--r-- | file.c | 24 | ||||
-rw-r--r-- | fm.h | 3 | ||||
-rw-r--r-- | html.c | 10 | ||||
-rw-r--r-- | html.h | 10 | ||||
-rw-r--r-- | rc.c | 6 | ||||
-rw-r--r-- | table.c | 18 | ||||
-rw-r--r-- | table.h | 5 | ||||
-rw-r--r-- | tagtable.tab | 8 |
9 files changed, 79 insertions, 27 deletions
@@ -1,5 +1,25 @@ 2002-12-07 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 03536] <del>, <s> + * file.c (HTMLtagproc1): <s>..</s> is [S:...:S] + (HTMLtagproc0): <del> will delete <table> + * fm.h (RB_S): added + * html.c (TagMAP): <s>,</s> + move <internal>, </internal> + * html.h (HTML_S): added + (HTML_N_S): added + (HTML_INTERNAL): renumed + (HTML_N_INTERNAL): ditto + (MAX_HTMLTAG): add 2 + * rc.c (CMT_DISP_INS_DEL): update + * table.c (feed_table_tag): add HTML_S, HTML_N_S + * table.h (TBLM_S): added + (TBLM_ANCHOR): renum + * tagtable.tab: (strike, s): HTML_S + (/strike, /s): HTML_N_S + +2002-12-07 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 03535] close anchor, quote < * file.c (HTMLtagproc1): close_anchor * frame.c (createFrameFile): quote < @@ -5563,4 +5583,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.598 2002/12/06 16:37:42 ukai Exp $ +$Id: ChangeLog,v 1.599 2002/12/06 16:49:18 ukai Exp $ @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.150 2002/12/06 16:37:54 ukai Exp $ */ +/* $Id: file.c,v 1.151 2002/12/06 16:49:49 ukai Exp $ */ #include "fm.h" #include <sys/types.h> #include "myctype.h" @@ -4756,6 +4756,18 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) else obuf->flag &= ~RB_DEL; return 1; + case HTML_S: + if (displayInsDel) + HTMLlineproc1("<U>[S:</U>", h_env); + else + obuf->flag |= RB_S; + return 1; + case HTML_N_S: + if (displayInsDel) + HTMLlineproc1("<U>:S]</U>", h_env); + else + obuf->flag &= ~RB_S; + return 1; case HTML_INS: if (displayInsDel) HTMLlineproc1("<U>[INS:</U>", h_env); @@ -4765,17 +4777,17 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) HTMLlineproc1("<U>:INS]</U>", h_env); return 1; case HTML_SUP: - if (!(obuf->flag & RB_DEL)) + if (!(obuf->flag & (RB_DEL | RB_S))) HTMLlineproc1("^", h_env); return 1; case HTML_N_SUP: return 1; case HTML_SUB: - if (!(obuf->flag & RB_DEL)) + if (!(obuf->flag & (RB_DEL | RB_S))) HTMLlineproc1("[", h_env); return 1; case HTML_N_SUB: - if (!(obuf->flag & RB_DEL)) + if (!(obuf->flag & (RB_DEL | RB_S))) HTMLlineproc1("]", h_env); return 1; case HTML_FONT: @@ -5667,6 +5679,8 @@ HTMLlineproc0(char *line, struct html_feed_environ *h_env, int internal) continue; /* continue to the next */ } + if (obuf->flag & RB_DEL) + continue; /* all tables have been read */ if (tbl->vspace > 0 && !(obuf->flag & RB_IGNORE_P)) { int indent = h_env->envs[h_env->envc].indent; @@ -5718,7 +5732,7 @@ HTMLlineproc0(char *line, struct html_feed_environ *h_env, int internal) continue; } - if (obuf->flag & RB_DEL) + if (obuf->flag & (RB_DEL | RB_S)) continue; while (*str) { mode = get_mctype(str); @@ -1,4 +1,4 @@ -/* $Id: fm.h,v 1.93 2002/12/05 16:29:06 ukai Exp $ */ +/* $Id: fm.h,v 1.94 2002/12/06 16:50:13 ukai Exp $ */ /* * w3m: WWW wo Miru utility * @@ -582,6 +582,7 @@ struct readbuffer { #define RB_FILL 0x80000 #endif /* FORMAT_NICE */ #define RB_DEL 0x100000 +#define RB_S 0x200000 #define RB_GET_ALIGN(obuf) ((obuf)->flag&RB_ALIGN) #define RB_SET_ALIGN(obuf,align) {(obuf)->flag &= ~RB_ALIGN; (obuf)->flag |= (align); } @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.19 2002/12/05 16:29:07 ukai Exp $ */ +/* $Id: html.c,v 1.20 2002/12/06 16:50:19 ukai Exp $ */ #include "html.h" /* Define HTML Tag Infomation Table */ @@ -226,11 +226,11 @@ TagInfo TagMAP[MAX_HTMLTAG] = { {"sub", NULL, 0, 0}, /* 102 HTML_SUB */ {"/sub", NULL, 0, 0}, /* 103 HTML_N_SUB */ {"link", ALST_LINK, MAXA_LINK, 0}, /* 104 HTML_LINK */ - {NULL, NULL, 0, 0}, /* 105 Undefined */ + {"s", NULL, 0, 0}, /* 105 HTML_S */ + {"/s", NULL, 0, TFLG_END}, /* 106 HTML_N_S */ + {NULL, NULL, 0, 0}, /* 107 Undefined */ /* pseudo tag */ - {"internal", NULL, 0, TFLG_INT}, /* 106 HTML_INTERNAL */ - {"/internal", NULL, 0, TFLG_INT | TFLG_END}, /* 107 HTML_N_INTERNAL */ {"select_int", ALST_SELECT_INT, MAXA_SELECT_INT, TFLG_INT}, /* 108 HTML_SELECT_INT */ {"/select_int", NULL, 0, TFLG_INT | TFLG_END}, /* 109 HTML_N_SELECT_INT */ {"option_int", ALST_OPTION, MAXA_OPTION, TFLG_INT}, /* 110 HTML_OPTION_INT */ @@ -252,6 +252,8 @@ TagInfo TagMAP[MAX_HTMLTAG] = { {" ", ALST_NOP, MAXA_NOP, TFLG_INT}, /* 126 HTML_NOP */ {"pre_plain", NULL, 0, TFLG_INT}, /* 127 HTML_PRE_PLAIN */ {"/pre_plain", NULL, 0, TFLG_INT | TFLG_END}, /* 128 HTML_N_PRE_PLAIN */ + {"internal", NULL, 0, TFLG_INT}, /* 129 HTML_INTERNAL */ + {"/internal", NULL, 0, TFLG_INT | TFLG_END}, /* 130 HTML_N_INTERNAL */ }; TagAttrInfo AttrMAP[MAX_TAGATTR] = { @@ -1,4 +1,4 @@ -/* $Id: html.h,v 1.13 2002/12/05 16:29:08 ukai Exp $ */ +/* $Id: html.h,v 1.14 2002/12/06 16:50:28 ukai Exp $ */ #ifndef _HTML_H #define _HTML_H #ifdef USE_SSL @@ -191,10 +191,10 @@ typedef struct { #define HTML_SUB 102 #define HTML_N_SUB 103 #define HTML_LINK 104 +#define HTML_S 105 +#define HTML_N_S 106 /* pseudo tag */ -#define HTML_INTERNAL 106 -#define HTML_N_INTERNAL 107 #define HTML_SELECT_INT 108 #define HTML_N_SELECT_INT 109 #define HTML_OPTION_INT 110 @@ -216,8 +216,10 @@ typedef struct { #define HTML_NOP 126 #define HTML_PRE_PLAIN 127 #define HTML_N_PRE_PLAIN 128 +#define HTML_INTERNAL 129 +#define HTML_N_INTERNAL 130 -#define MAX_HTMLTAG 129 +#define MAX_HTMLTAG 131 /* Tag attribute */ @@ -1,4 +1,4 @@ -/* $Id: rc.c,v 1.69 2002/12/04 17:00:51 ukai Exp $ */ +/* $Id: rc.c,v 1.70 2002/12/06 16:50:34 ukai Exp $ */ /* * Initialization file etc. */ @@ -81,7 +81,7 @@ static char *config_file = NULL; #define CMT_MULTICOL "ファイル名のマルチカラム表示" #define CMT_ALT_ENTITY "エンティティを ASCII の代替表現で表す" #define CMT_FOLD_TEXTAREA "TEXTAREA の行を折り返して表示" -#define CMT_DISP_INS_DEL "DEL タグの内容を表示する。" +#define CMT_DISP_INS_DEL "DEL, S, STRIKE 要素の内容を表示する。" #define CMT_COLOR "カラー表示" #define CMT_B_COLOR "文字の色" #define CMT_A_COLOR "アンカーの色" @@ -236,7 +236,7 @@ static char *config_file = NULL; #define CMT_MULTICOL "Display file names in multi-column format" #define CMT_ALT_ENTITY "Use ASCII equivalents to display entities" #define CMT_FOLD_TEXTAREA "Fold lines in TEXTAREA" -#define CMT_DISP_INS_DEL "Display INS and DEL tag" +#define CMT_DISP_INS_DEL "Display DEL, S and STRIKE element" #define CMT_COLOR "Display with color" #define CMT_B_COLOR "Color of normal character" #define CMT_A_COLOR "Color of anchor" @@ -1,4 +1,4 @@ -/* $Id: table.c,v 1.35 2002/12/04 17:00:53 ukai Exp $ */ +/* $Id: table.c,v 1.36 2002/12/06 16:50:41 ukai Exp $ */ /* * HTML table */ @@ -2980,6 +2980,18 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode, else mode->pre_mode &= ~TBLM_DEL; break; + case HTML_S: + if (displayInsDel) + feed_table_inline_tag(tbl, line, mode, 3); /* [S: */ + else + mode->pre_mode |= TBLM_S; + break; + case HTML_N_S: + if (displayInsDel) + feed_table_inline_tag(tbl, line, mode, 3); /* :S] */ + else + mode->pre_mode &= ~TBLM_S; + break; case HTML_INS: case HTML_N_INS: if (displayInsDel) @@ -2988,7 +3000,7 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode, case HTML_SUP: case HTML_SUB: case HTML_N_SUB: - if (!(mode->pre_mode & TBLM_DEL)) + if (!(mode->pre_mode & (TBLM_DEL | TBLM_S))) feed_table_inline_tag(tbl, line, mode, 1); /* ^, [, ] */ break; case HTML_N_SUP: @@ -3118,7 +3130,7 @@ feed_table(struct table *tbl, char *line, struct table_mode *mode, } } else { - if (mode->pre_mode & TBLM_DEL) + if (mode->pre_mode & (TBLM_DEL | TBLM_S)) return -1; } if (mode->caption) { @@ -1,4 +1,4 @@ -/* $Id: table.h,v 1.10 2002/12/04 17:00:54 ukai Exp $ */ +/* $Id: table.h,v 1.11 2002/12/06 16:50:49 ukai Exp $ */ #if (defined(MESCHACH) && !defined(MATRIX)) #define MATRIX #endif /* (defined(MESCHACH) && !defined(MATRIX)) */ @@ -125,7 +125,8 @@ struct table { #define TBLM_PREMODE (TBLM_PRE | TBLM_PRE_INT | TBLM_SCRIPT | TBLM_STYLE | TBLM_PLAIN | TBLM_INTXTA) #define TBLM_SPECIAL (TBLM_PRE | TBLM_PRE_INT | TBLM_SCRIPT | TBLM_STYLE | TBLM_PLAIN | TBLM_NOBR) #define TBLM_DEL RB_DEL -#define TBLM_ANCHOR 0x200000 +#define TBLM_S RB_S +#define TBLM_ANCHOR 0x1000000 #define uchar unsigned char #define ushort unsigned short diff --git a/tagtable.tab b/tagtable.tab index a4c95aa..f421aa0 100644 --- a/tagtable.tab +++ b/tagtable.tab @@ -104,10 +104,10 @@ script HTML_SCRIPT base HTML_BASE del HTML_DEL /del HTML_N_DEL -strike HTML_DEL -/strike HTML_N_DEL -s HTML_DEL -/s HTML_N_DEL +strike HTML_S +/strike HTML_N_S +s HTML_S +/s HTML_N_S ins HTML_INS /ins HTML_N_INS u HTML_U |