aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-10-26 08:10:43 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-10-26 08:10:43 +0000
commit9726b596a71c97a891df6fcf98ff3f55d1aafc8f (patch)
tree6d6061a6d0998aa0a5951029c0bfeb324d866b8d
parent* [w3m-dev-en 00781] "Clemens Fischer" <ino-waiting@gmx.net> (diff)
downloadw3m-9726b596a71c97a891df6fcf98ff3f55d1aafc8f.tar.gz
w3m-9726b596a71c97a891df6fcf98ff3f55d1aafc8f.zip
[w3m-dev-en 00783] hsaka@mth.biglobe.ne.jp (Hironori SAKAMOTO)
add display_lineinfo option * display.c (displayBuffer): check displayLineInfo * fm.h (displayLineInfo): added * rc.c (CMT_DISPLINEINFO): added (display_lineinfo): added * NEWS (rc: display_lineinfo): add From: Fumitoshi UKAI <ukai@debian.or.jp>
-rw-r--r--ChangeLog12
-rw-r--r--NEWS3
-rw-r--r--display.c17
-rw-r--r--fm.h3
-rw-r--r--rc.c6
5 files changed, 29 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 6f48968..b0af1b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2002-10-26 Fumitoshi UKAI <ukai@debian.or.jp>
+ * [w3m-dev-en 00783] hsaka@mth.biglobe.ne.jp (Hironori SAKAMOTO)
+ add display_lineinfo option
+ * display.c (displayBuffer): check displayLineInfo
+ * fm.h (displayLineInfo): added
+ * rc.c (CMT_DISPLINEINFO): added
+ (display_lineinfo): added
+ * NEWS (rc: display_lineinfo): add
+
+2002-10-26 Fumitoshi UKAI <ukai@debian.or.jp>
+
* [w3m-dev-en 00781] "Clemens Fischer" <ino-waiting@gmx.net>
zope doesn't recognize implied *LWS in accept-language
* rc.c (sync_with_option): remove optional LWS
@@ -3969,4 +3979,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.448 2002/10/25 20:02:30 ukai Exp $
+$Id: ChangeLog,v 1.449 2002/10/26 08:10:43 ukai Exp $
diff --git a/NEWS b/NEWS
index 219ff9c..60f6617 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
-w3m 0.4?
+w3m 0.3.2 (release candidate)
+* rc: display_lineinfo: display current line number
* rc: passwd_file: passwd file for HTTP auth
* func: MARK_WORD
* rc: imgsize: obsoleted
diff --git a/display.c b/display.c
index 02a2db3..c50cb74 100644
--- a/display.c
+++ b/display.c
@@ -1,4 +1,4 @@
-/* $Id: display.c,v 1.23 2002/10/25 19:59:51 ukai Exp $ */
+/* $Id: display.c,v 1.24 2002/10/26 08:10:43 ukai Exp $ */
#include <signal.h>
#include "fm.h"
@@ -318,13 +318,14 @@ displayBuffer(Buffer *buf, int mode)
else
#endif /* not USE_MOUSE */
msg = Strnew();
- Strcat_charp(msg, "Viewing");
- if (buf->currentLine != NULL && buf->lastLine != NULL)
- Strcat(msg, Sprintf(" %3d%%",
- (int)((double)buf->currentLine->real_linenumber
- * 100.0 /
- (double)buf->lastLine->real_linenumber
- + 0.5)));
+ if (displayLineInfo && buf->currentLine != NULL && buf->lastLine != NULL) {
+ int cl = buf->currentLine->real_linenumber;
+ int ll = buf->lastLine->real_linenumber;
+ int r = (int)((double)cl * 100.0 / (double)ll + 0.5);
+ Strcat(msg, Sprintf("%d/%d (%3d%%)", cl, ll, r));
+ }
+ else
+ Strcat_charp(msg, "Viewing");
#ifdef USE_SSL
if (buf->ssl_certificate)
Strcat_charp(msg, "[SSL]");
diff --git a/fm.h b/fm.h
index a28a246..54880a7 100644
--- a/fm.h
+++ b/fm.h
@@ -1,4 +1,4 @@
-/* $Id: fm.h,v 1.64 2002/09/11 14:54:33 ukai Exp $ */
+/* $Id: fm.h,v 1.65 2002/10/26 08:10:43 ukai Exp $ */
/*
* w3m: WWW wo Miru utility
*
@@ -817,6 +817,7 @@ global int nextpage_topline init(FALSE);
#endif
global char *displayTitleTerm init(NULL);
global int displayLink init(FALSE);
+global int displayLineInfo init(FALSE);
global int retryAsHttp init(TRUE);
global int showLineNum init(FALSE);
global int show_srch_str init(TRUE);
diff --git a/rc.c b/rc.c
index c85601c..862f0ac 100644
--- a/rc.c
+++ b/rc.c
@@ -1,4 +1,4 @@
-/* $Id: rc.c,v 1.50 2002/10/25 20:02:41 ukai Exp $ */
+/* $Id: rc.c,v 1.51 2002/10/26 08:10:43 ukai Exp $ */
/*
* Initialization file etc.
*/
@@ -66,6 +66,7 @@ static char *config_file = NULL;
#define CMT_ARGV_IS_URL "scheme のない引数も URL とみなす"
#define CMT_TSELF "targetが未指定の場合に_selfを使用する"
#define CMT_DISPLINK "リンク先の自動表示"
+#define CMT_DISPLINEINFO "現在の行番号の表示"
#ifdef USE_IMAGE
#define CMT_DISP_IMAGE "インライン画像を表示"
#define CMT_AUTO_IMAGE "インライン画像を自動で読み込む"
@@ -208,6 +209,7 @@ static char *config_file = NULL;
#define CMT_ARGV_IS_URL "Treat argument without scheme as URL"
#define CMT_TSELF "Use _self as default target"
#define CMT_DISPLINK "Display link URL automatically"
+#define CMT_DISPLINEINFO "Display current line number"
#ifdef USE_IMAGE
#define CMT_DISP_IMAGE "Display inline images"
#define CMT_AUTO_IMAGE "Load inline images automatically"
@@ -465,6 +467,8 @@ struct param_ptr params1[] = {
{"target_self", P_CHARINT, PI_ONOFF, (void *)&TargetSelf, CMT_TSELF, NULL},
{"display_link", P_INT, PI_ONOFF, (void *)&displayLink, CMT_DISPLINK,
NULL},
+ {"display_lineinfo", P_INT, PI_ONOFF, (void *)&displayLineInfo,
+ CMT_DISPLINEINFO, NULL},
{"ext_dirlist", P_INT, PI_ONOFF, (void *)&UseExternalDirBuffer,
CMT_EXT_DIRLIST, NULL},
{"dirlist_cmd", P_STRING, PI_TEXT, (void *)&DirBufferCommand,