When building wget 1.6 on Solaris 2.5.1 with GCC 2.95.3, I ran
into the following porting problem.
snprintf.c: In function `dopr':
snprintf.c:230: warning: subscript has type `char'
snprintf.c:254: warning: subscript has type `char'
This is warning that isdigit doesn't work on negative
Quoting Paul Eggert ([EMAIL PROTECTED]):
When building wget 1.6 on Solaris 2.5.1 with GCC 2.95.3, I ran
into the following porting problem.
snprintf.c: In function `dopr':
snprintf.c:230: warning: subscript has type `char'
snprintf.c:254: warning: subscript has type `char'
This is
Date: Sun, 8 Apr 2001 12:05:35 +0200
From: Jan Prikryl [EMAIL PROTECTED]
Wouldn't just an explicit type cast to `(unsigned char)ch' suffice?
That would work for now, but it won't work if wget got properly
internationalized. That is because isdigit(x) succeeds for non-ASCII
digits in some
Paul Eggert [EMAIL PROTECTED] writes:
That would work for now, but it won't work if wget got properly
internationalized. That is because isdigit(x) succeeds for
non-ASCII digits in some locales. Some locales have multiple ways
to represent the decimal digits, and some locales even have
Russ Allbery [EMAIL PROTECTED] writes:
That's why Wget 1.7 incorporates its own implementation of IS* macros
(from Gcc) and uses them consistently. Except in snprintf.c, which is
not part of Wget proper. *sigh*
...since snprintf.c isn't part of wget proper, it *might* be called in a
Hrvoje Niksic [EMAIL PROTECTED] writes:
The problem is, I'm not sure there is an upstream version of snprintf.c.
As you know, it is used by several different projects. That's why I'm
trying to avoid changing it, unless it is absolutely necessary.
I'd been assuming
From: Hrvoje Niksic [EMAIL PROTECTED]
Date: 08 Apr 2001 23:06:32 +0200
In the general case (other is* macros), such hacked-up code is
probably slower than table lookups.
For the special case of isdigit, '0'=x x='9' is usually faster
than table lookups. Decent compilers like GCC optimize