w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit ad988103aab08e771aba2158e902de3eb81b7c45
parent 08cd06963b520131ebcc06b953a544080ea94afe
Author: ukai <ukai>
Date:   Tue, 27 Aug 2002 16:39:40 +0000

* [w3m-dev 03291] parsetagx.c:toNumber()
* parsetagx.c (toNumber): don't parse non-number value as 0,
                            just ignore
From: Kiyokazu SUTO <suto@ks-and-ks.ne.jp>

Diffstat:
MChangeLog | 6++++++
Mparsetagx.c | 13+++++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)

diff --git 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() diff --git a/parsetagx.c b/parsetagx.c @@ -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