diff options
author | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-07-19 23:33:59 +0000 |
---|---|---|
committer | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-07-19 23:33:59 +0000 |
commit | 715e1bc1759a70d97106640402899f41f6f1111c (patch) | |
tree | fda878959486bdbec1e49dc2fbec1acc978957d9 /main.c | |
parent | * [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org (diff) | |
download | w3m-715e1bc1759a70d97106640402899f41f6f1111c.tar.gz w3m-715e1bc1759a70d97106640402899f41f6f1111c.zip |
* [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org
* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=329862#20
* table.c (feed_table_tag): check displayLinkNumber.
* proto.h: add getLinkNumberStr().
* main.c (do_dump): check displayLinkNumber.
* fm.h: add global variable displayLinkNumber.
* file.c
(getLinkNumberStr): added.
(process_input, process_select, HTMLtagproc1): check displayLinkNumber.
Diffstat (limited to '')
-rw-r--r-- | main.c | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.262 2010/07/19 12:08:41 htrb Exp $ */ +/* $Id: main.c,v 1.263 2010/07/19 23:34:01 htrb Exp $ */ #define MAINPROGRAM #include "fm.h" #include <signal.h> @@ -1282,8 +1282,25 @@ do_dump(Buffer *buf) dump_head(buf); if (w3m_dump & DUMP_SOURCE) dump_source(buf); - if (w3m_dump == DUMP_BUFFER) + if (w3m_dump == DUMP_BUFFER) { + int i; saveBuffer(buf, stdout, FALSE); + if (displayLinkNumber && buf->href) { + printf("\nReferences:\n\n"); + for (i = 0; i < buf->href->nanchor; i++) { + ParsedURL pu; + static Str s = NULL; + if (buf->href->anchors[i].slave) + continue; + parseURL2(buf->href->anchors[i].url, &pu, baseURL(buf)); + s = parsedURL2Str(&pu); + if (DecodeURL) + s = Strnew_charp(url_unquote_conv + (s->ptr, Currentbuf->document_charset)); + printf("[%d] %s\n", buf->href->anchors[i].hseq + 1, s->ptr); + } + } + } mySignal(SIGINT, prevtrap); } |