This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: isspace() & i18n


Christopher Faylor wrote:
> 
> On Mon, Jun 11, 2001 at 07:44:16PM -0400, Michael Meissner wrote:
> >On Mon, Jun 11, 2001 at 06:32:09PM -0400, J. Johnston wrote:
> >>Using an array is the wrong way to implement ctype.  For example, if we
> >>ever want to try and add better locale support.  I would like to switch
> >>over at the earliest possible time.  What would you perceive a
> >>reasonable delay to ensure that most Cygwin users won't see a problem?
> >>(x releases or n time)
> >
> >IMHO, using an array is perfectly fine.  When setlocale is called, you
> >use memcpy or some such to update the array.  After all, in most
> >programs, the number of times you call isspace and friends far, far
> >outweighs the number of times you call setlocale.
> 
> I agree.  We're interested in speed with these "functions" so I think that
> an array makes sense.  For setlocale we could come up with some type of
> scheme for block copying in changed sections as Mike suggests.
> 
> The only problem with this plan is that it doesn't accomodate ROMs or
> read-only sections very well.  I don't know if that is an issue or not.
> 
> cgf

Yes, we can do block copying, however, the array has forced us to use a
GNU extension.  How do you see an array improving speed over a
pointer dereference?

The read-only section issue will catch up with us eventually.

I have no problem with leaving this asis for the short/medium term.  In the
long term, this should be changed.  It is cleaner (no GNUC trickery), more 
efficient for implementing setlocale, and I see no reason to protect a Cygwin user 
who attempts to use a Cygwin x.0 dll with Cygwin x+45.0 header files.  However,
I do acknowledge there is a reasonable amount of time and releases to prevent
chaos from ensuing.  I was just attempting to get a feel for how long that period was.

-- Jeff J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]