octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #54622] test importdata fails in dev octave wi


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows
Date: Mon, 10 Sep 2018 18:55:00 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Follow-up Comment #50, bug #54622 (project octave):

Nah, that character after "Inf" must be a x09.  Clearly, std::isalpha
(next_char) thinks that 255 is alphanumeric for John's system.  Depends on the
locale, I guess:

http://www.cplusplus.com/reference/cctype/isalpha/

The way I understand this routine is that some error bit during the double
conversion such that peek() returns an EOF value:

http://www.cplusplus.com/reference/istream/istream/peek/
http://www.cplusplus.com/reference/ios/ios/rdstate/

Perhaps it would be better to move that condition to the top if-statement. 
Also, looking at this, perhaps we should just avoid using the tolower()
routine.  Of interest is only the i,j,I,J letters and it is only two extra
machine cycles to if I and J are present.  Whereas, with tolower() there needs
to be a call/jump/return via a library routine, and that library routine is
going to have to check some ranges to make sure that the character in question
can be converted to some other ASCII.  Why do all that just to account for a
couple extra characters?

I'm attaching a changeset that might solve the problem by avoiding tolower(). 
Please give it a try.  If it doesn't work, then we'll have to dig deeper.

(file #44972)
    _______________________________________________________

Additional Item Attachment:

File name: octave-dlmread_no_tolower-djs2018sep10.patch Size:2 KB


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?54622>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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