Boost logo

Boost :

From: Marshall Clow (marshall_at_[hidden])
Date: 2008-07-09 22:39:53


At 10:25 PM -0400 7/9/08, Beman Dawes wrote:
>Gennaro Prota wrote:
>>Hi,
>>
>>I had a summary look at the changes made to Boost.Inspect (since I
>>last saw it) and noticed a few issues:
>>
>>* the "*A*" marker is used either for broken links, invalid urls etc.
>> *and* non-ASCII chars
>
>That was fixed earlier this month, IIRC.

I don't think so :-(
It's gotten better, since it now prints "non-ASCII" as well, but it's
not really fixed.

>>* "non-ASCII" itself looks like a misleading name: see the string
>> gPunct, defined in ascii_check.cpp
>>
>>* non portable (though widely portable :-)) code:
>>
>> if ( c >= 'a' && c <= 'z' ) return false;
>> if ( c >= 'A' && c <= 'Z' ) return false;
>> if ( c >= '0' && c <= '9' ) return false;
>
>That was mentioned in "[inspect] Hall of Shame plus non-ASCII
>characters" recently.
>>
>> If there aren't problems with standard library support I'd suggest
>> replacing the above with
>>
>> if ( std::isalnum( static_cast< int >( c ),
>> std::locale::classic()
>> )
>> )
>>
>> Similarly for the subsequent isspace-like tests
>
>You need to read the discussion. isalnum isn't what we want for
>source files, and whatever we settle on isn't going to be locale
>dependent.
>
>>* again in ascii_check.cpp there's some scaffolding to get a line
>> number from a file position; this is needed in other inspector
>> classes as well, and is done much differently. I think it is
>> worth unifying this part and make it available in one place
>
>Yes. John Maddock has been asking that we pinpoint errors more precisely.

I looked into this; hoisting the routine would be easy, but I didn't
want to disturb the tool this close to release.

P.S. New inspection reports are up at:
        <http://www.idio.com/misc/inspect-release.html>
        <http://www.idio.com/misc/inspect-trunk.html>

-- 
-- Marshall
Marshall Clow     Idio Software   <mailto:marshall_at_[hidden]>
It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk