aboutsummaryrefslogtreecommitdiffstats
path: root/display.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-11-19 17:40:30 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-11-19 17:40:30 +0000
commita17f5fe8175ccab8f52513f0b8141f7fd6ef393a (patch)
tree37251032522383ab060e7a9faad9afcced46b353 /display.c
parent[w3m-dev 03450] Re: cygwin console on Win9X (diff)
downloadw3m-a17f5fe8175ccab8f52513f0b8141f7fd6ef393a.tar.gz
w3m-a17f5fe8175ccab8f52513f0b8141f7fd6ef393a.zip
[w3m-dev 03452] image map
* display.c (displayBuffer): use getCurrentMapLabel() * fm.h (MapArea): delete ifdef MENU_MAP (image_map_list): added * main.c (followA): don't call retrieveCurrentImg() ifdef USE_IMAGE use retrieveCurrentMap() ifndef USE_IMAGE (_followForm): indent (drawAnchorCursor0): add AnchorList (drawAnchorCuror): pass AnchorList to drawAnchorCursor0 (follow_map): follow_map_panel * map.c (searchMapList): added (nearestMapArea): n, min default value to -1 (searchMapArea): added (getCurrentMapLabel): added (getMapXY): moved (retrieveCurrentMap): added (follow_map_menu): parsed_tagarg -> name rewrite to search map list/area (follow_map_panel): parsed_tagarg -> name rewrite to search map list/area (newMapArea): delete ifdef MENU_MAP (append_map_info): added (page_info_panel): append_map_info * proto.h (follow_map_menu): parsed_tagarg -> name (follow_map_panel): parsed_tagarg -> name (getCurrentMapLabel): added (retrieveCurrentMap): added * rc.c (CMT_IMAGE_MAP_LIST): added (image_map_list): added From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'display.c')
-rw-r--r--display.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/display.c b/display.c
index dbd9c18..9936b55 100644
--- a/display.c
+++ b/display.c
@@ -1,4 +1,4 @@
-/* $Id: display.c,v 1.33 2002/11/18 16:42:25 ukai Exp $ */
+/* $Id: display.c,v 1.34 2002/11/19 17:40:31 ukai Exp $ */
#include <signal.h>
#include "fm.h"
@@ -226,7 +226,7 @@ void
displayBuffer(Buffer *buf, int mode)
{
Str msg;
- Anchor *aa = NULL;
+ Str s = NULL;
int ny = 0;
if (buf->topLine == NULL && readBufferCache(buf) == 0) { /* clear_buffer */
@@ -341,14 +341,22 @@ displayBuffer(Buffer *buf, int mode)
#endif
Strcat_charp(msg, " <");
Strcat_charp(msg, buf->buffername);
- if (displayLink)
- aa = retrieveCurrentAnchor(buf);
- if (aa) {
- ParsedURL url;
- Str s;
+ if (displayLink) {
+#ifdef USE_IMAGE
+ s = getCurrentMapLabel(buf);
+ if (!s)
+#endif
+ {
+ Anchor *a = retrieveCurrentAnchor(buf);
+ if (a) {
+ ParsedURL pu;
+ parseURL2(a->url, &pu, baseURL(buf));
+ s = parsedURL2Str(&pu);
+ }
+ }
+ }
+ if (s) {
int l;
- parseURL2(aa->url, &url, baseURL(buf));
- s = parsedURL2Str(&url);
l = buf->width - 2;
if (s->length > l) {
if (l >= 4) {