aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog8
-rw-r--r--parsetagx.c15
2 files changed, 19 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 7919906..4b072a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2002-08-28 Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
+ * [w3m-dev 03291] parsetagx.c:toNumber()
+ * parsetagx.c (toNumber): don't parse non-number value as 0,
+ just ignore
+
+2002-08-28 Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
+
* [w3m-dev 03290] Re: Forward: Bug#157098: wrong file presentation on large files
* indep.c (strtoclen): need defined()
@@ -3715,4 +3721,4 @@
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.417 2002/08/27 16:35:15 ukai Exp $
+$Id: ChangeLog,v 1.418 2002/08/27 16:39:40 ukai Exp $
diff --git a/parsetagx.c b/parsetagx.c
index fb6e9a5..0742260 100644
--- a/parsetagx.c
+++ b/parsetagx.c
@@ -1,4 +1,4 @@
-/* $Id: parsetagx.c,v 1.8 2002/01/31 17:54:53 ukai Exp $ */
+/* $Id: parsetagx.c,v 1.9 2002/08/27 16:39:40 ukai Exp $ */
#include "fm.h"
#include "myctype.h"
#include "indep.h"
@@ -42,8 +42,17 @@ noConv(char *oval, char **str)
static int
toNumber(char *oval, int *num)
{
- *num = atoi(oval);
- return 1;
+ char *ep;
+ int x;
+
+ x = strtol(oval, &ep, 0);
+
+ if (ep > oval) {
+ *num = x;
+ return 1;
+ }
+ else
+ return 0;
}
static int