commit 0cf30decc7bd0a6558d56932f69d63aab8928a57
parent bdf12dedd649b746a7a947e71e4e9e91e64fde28
Author: htrb <htrb>
Date: Sun, 8 Aug 2010 09:53:42 +0000
[w3m-dev 04360] Re: "important" bugs from bugs.debian.org
Diffstat:
4 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,11 @@
+2010-08-08 d+w3m@vdr.jp
+
+ * [w3m-dev 04360] Re: "important" bugs from bugs.debian.org
+ * main.c (main): use DEFAULT_COLS
+ (main): the maximum value of the -cols option is MAXIMUM_COLS
+ * backend.c (backend): use DEFAULT_COLS
+ * fm.h (MAXIMUM_COLS, DEFAULT_COLS): added
+
2010-08-04 Ito Hiroyuki <ZXB01226@nifty.com>
* [w3m-dev 04369] Re: w3m's bugs from bugs.debian.org
diff --git a/backend.c b/backend.c
@@ -294,7 +294,7 @@ backend(void)
w3m_dump = 0;
if (COLS == 0)
- COLS = 80;
+ COLS = DEFAULT_COLS;
#ifdef USE_MOUSE
use_mouse = FALSE;
#endif /* USE_MOUSE */
diff --git a/fm.h b/fm.h
@@ -101,6 +101,9 @@ void bzero(void *, int);
#define LINELEN 256 /* Initial line length */
#define PAGER_MAX_LINE 10000 /* Maximum line kept as pager */
+#define MAXIMUM_COLS 1024
+#define DEFAULT_COLS 80
+
#ifdef USE_IMAGE
#define MAX_IMAGE 1000
#define MAX_IMAGE_SIZE 2048
diff --git a/main.c b/main.c
@@ -626,6 +626,9 @@ main(int argc, char **argv, char **envp)
if (++i >= argc)
usage();
COLS = atoi(argv[i]);
+ if (COLS > MAXIMUM_COLS) {
+ COLS = MAXIMUM_COLS;
+ }
}
else if (!strcmp("-ppc", argv[i])) {
double ppc;
@@ -776,7 +779,7 @@ main(int argc, char **argv, char **envp)
}
if (w3m_dump) {
if (COLS == 0)
- COLS = 80;
+ COLS = DEFAULT_COLS;
}
#ifdef USE_BINMODE_STREAM