[w3m-dev 03564] clean up displayBuffer()

* display.c (delayed_msg): static
	(drawAnchorCursor): static
	(redrawBuffer): define
	(redrawNLine): static
	(redrawLine): static
	(redrawLineRegion): static
	(do_effects): static
	(do_color): static
	(make_lastline_link): added
	(make_lastline_message): added
	(displayBuffer): rewrite with make_lastline_message()
	(drawAnchorCursor0): added
	(drawAnchorCursor): added
* main.c (main): remove onA()
	(keyPressEventProc): remove onA()
	(disp_srchresult): static
		disp_message TRUE
	(isrch): remove onA()
	(srch): displayBuffer
		remove onA()
	(srch_nxtprv): remove onA()
	(pipeBuf): disp_message TRUE
	(pipesh): disp_message TRUE
	(readsh): disp_message TRUE
	(_mark): dispBuffer
	(_followForm): break, always dispBuffer
	(drawAnchorCursor0): deleted
	(drawAnchorCursor): deleted
	(onA): deleted
	(anchorMn): delete onA()
	(svBuf): displayBuffer B_NORMAL
	(reload): disp_err_message TRUE
		displayBuffer
	(rFrame): displayBuffer
	(invoke_browser): displayBuffer
	(extbrz): disp_err_message TRUE
	(process_mouse): onA -> displayBuffer
	(movMs): delete onA()
	(menuMs): onA -> displayBuffer
	(closeTMs): disp_message TRUE
	(wrapToggle): disp_message TRUE
	(execdict): disp_message TRUE
	(SigAlarm): displayBuffer, delete onA
	(reinit): displayBuffer
* map.c (getCurrentMapLabel): deleted
	(retrieveCurrentMapArea): added
* proto.h (redrawBuffer): deleted
	(redrawNLine): deleted
	(redrawLine): deleted
	(redrawLineRegion): deleted
	(do_effects): deleted
	(do_color): deleted
	(message_list): deleted
	(getCurrentMapLabel): deleted
	(retrieveCurrentMapArea): added
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2002-12-13 02:19:01 +00:00
parent 0b9f61c039
commit e0ae7b688b
5 changed files with 327 additions and 252 deletions

23
map.c
View File

@@ -1,4 +1,4 @@
/* $Id: map.c,v 1.21 2002/12/09 15:51:09 ukai Exp $ */
/* $Id: map.c,v 1.22 2002/12/13 02:19:01 ukai Exp $ */
/*
* client-side image maps
*/
@@ -128,8 +128,8 @@ searchMapArea(Buffer *buf, MapList *ml, Anchor *a_img)
return n;
}
Str
getCurrentMapLabel(Buffer *buf)
MapArea *
retrieveCurrentMapArea(Buffer *buf)
{
Anchor *a_img, *a_form;
FormItemList *fi;
@@ -137,7 +137,6 @@ getCurrentMapLabel(Buffer *buf)
ListItem *al;
MapArea *a;
int i, n;
Str s = NULL;
a_img = retrieveCurrentImg(buf);
if (!(a_img && a_img->image && a_img->image->map))
@@ -157,20 +156,8 @@ getCurrentMapLabel(Buffer *buf)
return NULL;
for (i = 0, al = ml->area->first; al != NULL; i++, al = al->next) {
a = (MapArea *) al->ptr;
if (!(a && i == n))
continue;
if (*a->alt)
s = Sprintf("[%s]", a->alt);
if (*a->url) {
ParsedURL pu;
parseURL2(a->url, &pu, baseURL(buf));
if (s)
Strcat_char(s, ' ');
else
s = Strnew();
Strcat(s, parsedURL2Str(&pu));
}
return s;
if (a && i == n)
return a;
}
return NULL;
}