[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] [bug #18899] atoi and atol do not handle vertical tab

From: Joerg Wunsch
Subject: Re: [avr-libc-dev] [bug #18899] atoi and atol do not handle vertical tab properly
Date: Tue, 30 Jan 2007 10:32:57 +0100
User-agent: Mutt/1.5.11

As Dmitry K. wrote:

> Besides there is an opportunity a little to reduce a code.

I guess you are going to summarize the white space checks as

if (c == ' ' || (c >= BEL && c <= CR)) ...

are you?

I wonder whether we should care about a *real* ctypes implementation
some day, i.e. about something that is customizable for different
(8-bit) locales?  In that case, the check should be turned into an
actual call to isspace() rather than inlining it in the assembly code.
Some additional 10 CPU cycles don't really count when it comes to
number conversions.

> There are no objections if I shall correct these programs?

The major reason why I didn't fix that bug immediately myself was that
I'd like to take this as an occasion to think about a regression test
again.  So ideally, we should:

. set up a regressoin test, using atoi() as an example
. add the test pattersn mentioned in the bug report, so the
  regressoin test ought to fail
. fix the bug
. see the regression test works now

Sorry Dmitry, I didn't really have the time to look at your fplib
regression tests so far.  (Besides, I don't agree it is a good idea to
store them as .tar.bz in CVS, but that's another matter.)  Do you
think your preliminary regression suite could be extended for the
standard libc as well?

cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]