aboutsummaryrefslogtreecommitdiffstats
path: root/html.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-12-05 16:29:02 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-12-05 16:29:02 +0000
commitd02a0802cd226cbbf73470dc76a1384f19f10199 (patch)
tree8d057025083179d6685b8480be7d7ba9ba1395eb /html.c
parent[w3m-dev 03528] area without alt (diff)
downloadw3m-d02a0802cd226cbbf73470dc76a1384f19f10199.tar.gz
w3m-d02a0802cd226cbbf73470dc76a1384f19f10199.zip
[w3m-dev 03529] Support of title, accesskey of anchor
* anchor.c (putAnchor): arg title, key initialize slave (registerHref): arg title, key (registerName): title = NULL, key = '\0' (registerForm): title = NULL, key = '\0' (_put_anchor_news): title = NULL, key = '\0' (_put_anchor_all): title = NULL, key = '\0' (addMultirowsImg): register title, accesskey (addMultirowsForm): title = NULL, key = '\0' (getAnchorText): added * display.c (displayBuffer): show title if any * file.c (set_breakpoint): use bcopy (back_to_breakpoint): use bcopy (flushline): s/anchor/anchor.url/ s/anchor_hseq/anchor.hseq/ s/anchor_target/anchor.target/ add anchor.* (close_effect0): s/anchor/anchor.url/ s/anchor_hseq/anchor.hseq/ (close_anchor): use bzero (process_img): ATTR_TITLE, (HTMLtagproc1): s/anchor/anchor.url/ target, referer, title, accesskey, hseq (HTMLlineproc2body): ATTR_TITLE, ATTR_ACCESSKEY (init_henv): use bzero * fm.h (Anchor): add title, accesskey, slave (Breakpoint): use Anchor (struct readbuffer): use Anchor * funcname.tab (ACCESSKEY): added (LINK_MENU): added * html.c (ALST_A): add ATTR_TITLE, ATTR_ACCESSKEY (ALST_IMG): add ATTR_TITLE (ALST_IMG_ALT): add ATTR_TITLE (AttrMAP): add accesskey, renum * html.h (ATTR_ACCESSKEY): added (ATTR_*): renum 50->60 * main.c (linkMn): added (accessKey): added * menu.c (LinkMenu): deleted (LinkV): deleted (initLinkMenu): deleted (lmGoURL): deleted (popupMenu): delete initLinkMenu() (initMenu): delete Link (link_menu): added (accesskey_menu): added * proto.h (linkMn): added (link_menu): added (accessKey): added (accesskey_menu): added (putAnchor): arg title, key (registerHref): arg title, key (registerImg): arg title (getAnchorText): added * doc/README.func (ACCESSKEY): added (LINK_MENU): added * doc-jp/README.func (ACCESSKEY): added (LINK_MENU): added * scripts/w3mhelp.cgi.in (Hyperlink operation): add linkMn accessKey From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r--html.c53
1 files changed, 32 insertions, 21 deletions
diff --git a/html.c b/html.c
index 0e5541a..67a9319 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.18 2002/12/03 15:35:10 ukai Exp $ */
+/* $Id: html.c,v 1.19 2002/12/05 16:29:07 ukai Exp $ */
#include "html.h"
/* Define HTML Tag Infomation Table */
@@ -7,9 +7,9 @@
#define MAXA_CORE 1
unsigned char ALST_A[] = {
ATTR_NAME, ATTR_HREF, ATTR_TARGET, ATTR_HSEQ, ATTR_REFERER,
- ATTR_FRAMENAME, ATTR_CORE
+ ATTR_FRAMENAME, ATTR_TITLE, ATTR_ACCESSKEY, ATTR_CORE
};
-#define MAXA_A MAXA_CORE + 6
+#define MAXA_A MAXA_CORE + 8
unsigned char ALST_P[] = { ATTR_ALIGN, ATTR_CORE };
#define MAXA_P MAXA_CORE + 1
unsigned char ALST_UL[] = { ATTR_START, ATTR_TYPE, ATTR_CORE };
@@ -28,9 +28,9 @@ unsigned char ALST_PRE[] = { ATTR_FOR_TABLE, ATTR_CORE };
#define MAXA_PRE MAXA_CORE + 1
unsigned char ALST_IMG[] =
{ ATTR_SRC, ATTR_ALT, ATTR_WIDTH, ATTR_HEIGHT, ATTR_ALIGN, ATTR_USEMAP,
- ATTR_ISMAP, ATTR_CORE
+ ATTR_ISMAP, ATTR_TITLE, ATTR_CORE
};
-#define MAXA_IMG MAXA_CORE + 7
+#define MAXA_IMG MAXA_CORE + 8
unsigned char ALST_TABLE[] =
{ ATTR_BORDER, ATTR_WIDTH, ATTR_HBORDER, ATTR_CELLSPACING,
ATTR_CELLPADDING, ATTR_VSPACE, ATTR_CORE
@@ -112,9 +112,10 @@ unsigned char ALST_INPUT_ALT[] =
#define MAXA_INPUT_ALT 16
unsigned char ALST_IMG_ALT[] =
{ ATTR_SRC, ATTR_WIDTH, ATTR_HEIGHT, ATTR_USEMAP, ATTR_ISMAP, ATTR_HSEQ,
- ATTR_XOFFSET, ATTR_YOFFSET, ATTR_TOP_MARGIN, ATTR_BOTTOM_MARGIN
+ ATTR_XOFFSET, ATTR_YOFFSET, ATTR_TOP_MARGIN, ATTR_BOTTOM_MARGIN,
+ ATTR_TITLE
};
-#define MAXA_IMG_ALT 10
+#define MAXA_IMG_ALT 11
unsigned char ALST_NOP[] = { ATTR_CORE };
#define MAXA_NOP MAXA_CORE
@@ -304,20 +305,30 @@ TagAttrInfo AttrMAP[MAX_TAGATTR] = {
{"rel", VTYPE_STR, 0}, /* 47 ATTR_REL */
{"rev", VTYPE_STR, 0}, /* 48 ATTR_REV */
{"title", VTYPE_STR, 0}, /* 49 ATTR_TITLE */
+ {"accesskey", VTYPE_STR, 0}, /* 50 ATTR_ACCESSKEY */
+ {NULL, VTYPE_NONE, 0}, /* 51 Undefined */
+ {NULL, VTYPE_NONE, 0}, /* 52 Undefined */
+ {NULL, VTYPE_NONE, 0}, /* 53 Undefined */
+ {NULL, VTYPE_NONE, 0}, /* 54 Undefined */
+ {NULL, VTYPE_NONE, 0}, /* 55 Undefined */
+ {NULL, VTYPE_NONE, 0}, /* 56 Undefined */
+ {NULL, VTYPE_NONE, 0}, /* 57 Undefined */
+ {NULL, VTYPE_NONE, 0}, /* 58 Undefined */
+ {NULL, VTYPE_NONE, 0}, /* 59 Undefined */
/* Internal attribute */
- {"xoffset", VTYPE_NUMBER, AFLG_INT}, /* 50 ATTR_XOFFSET */
- {"yoffset", VTYPE_NUMBER, AFLG_INT}, /* 51 ATTR_YOFFSET */
- {"top_margin", VTYPE_NUMBER, AFLG_INT}, /* 52 ATTR_TOP_MARGIN, */
- {"bottom_margin", VTYPE_NUMBER, AFLG_INT}, /* 53 ATTR_BOTTOM_MARGIN, */
- {"tid", VTYPE_NUMBER, AFLG_INT}, /* 54 ATTR_TID */
- {"fid", VTYPE_NUMBER, AFLG_INT}, /* 55 ATTR_FID */
- {"for_table", VTYPE_NONE, AFLG_INT}, /* 56 ATTR_FOR_TABLE */
- {"framename", VTYPE_STR, AFLG_INT}, /* 57 ATTR_FRAMENAME */
- {"hborder", VTYPE_NONE, 0}, /* 58 ATTR_HBORDER */
- {"hseq", VTYPE_NUMBER, AFLG_INT}, /* 59 ATTR_HSEQ */
- {"no_effect", VTYPE_NONE, AFLG_INT}, /* 60 ATTR_NO_EFFECT */
- {"referer", VTYPE_STR, AFLG_INT}, /* 61 ATTR_REFERER */
- {"selectnumber", VTYPE_NUMBER, AFLG_INT}, /* 62 ATTR_SELECTNUMBER */
- {"textareanumber", VTYPE_NUMBER, AFLG_INT}, /* 63 ATTR_TEXTAREANUMBER */
+ {"xoffset", VTYPE_NUMBER, AFLG_INT}, /* 60 ATTR_XOFFSET */
+ {"yoffset", VTYPE_NUMBER, AFLG_INT}, /* 61 ATTR_YOFFSET */
+ {"top_margin", VTYPE_NUMBER, AFLG_INT}, /* 62 ATTR_TOP_MARGIN, */
+ {"bottom_margin", VTYPE_NUMBER, AFLG_INT}, /* 63 ATTR_BOTTOM_MARGIN, */
+ {"tid", VTYPE_NUMBER, AFLG_INT}, /* 64 ATTR_TID */
+ {"fid", VTYPE_NUMBER, AFLG_INT}, /* 65 ATTR_FID */
+ {"for_table", VTYPE_NONE, AFLG_INT}, /* 66 ATTR_FOR_TABLE */
+ {"framename", VTYPE_STR, AFLG_INT}, /* 67 ATTR_FRAMENAME */
+ {"hborder", VTYPE_NONE, 0}, /* 68 ATTR_HBORDER */
+ {"hseq", VTYPE_NUMBER, AFLG_INT}, /* 69 ATTR_HSEQ */
+ {"no_effect", VTYPE_NONE, AFLG_INT}, /* 70 ATTR_NO_EFFECT */
+ {"referer", VTYPE_STR, AFLG_INT}, /* 71 ATTR_REFERER */
+ {"selectnumber", VTYPE_NUMBER, AFLG_INT}, /* 72 ATTR_SELECTNUMBER */
+ {"textareanumber", VTYPE_NUMBER, AFLG_INT}, /* 73 ATTR_TEXTAREANUMBER */
};