summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-23 07:32:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-23 07:32:58 +0100
commit0ab2f39e45b4fba5a196555d5366f90c06a34771 (patch)
tree99c538b08a08b5916abb48e40d5b8514e0915abf /idl
parent0a92c29e4747f2289514cdb1030900b7c1cbb6ba (diff)
Use rtl::isAscii* instead of ctype.h is* (and fix passing plain char)
Change-Id: Ie37f15379b0e10912ef2e0ac94249da11040eede
Diffstat (limited to 'idl')
-rw-r--r--idl/source/cmptools/lex.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx
index 482eaf6293c5..d5e1d943fa6e 100644
--- a/idl/source/cmptools/lex.cxx
+++ b/idl/source/cmptools/lex.cxx
@@ -166,9 +166,9 @@ sal_uLong SvTokenStream::GetNumber()
if( nLog == 16 )
{
- while( isxdigit( c ) )
+ while( rtl::isAsciiHexDigit( static_cast<unsigned char>(c) ) )
{
- if( isdigit( c ) )
+ if( rtl::isAsciiDigit( static_cast<unsigned char>(c) ) )
l = l * nLog + (c - '0');
else
l = l * nLog
@@ -179,7 +179,7 @@ sal_uLong SvTokenStream::GetNumber()
}
else
{
- while( isdigit( c ) || 'x' == c )
+ while( rtl::isAsciiDigit( static_cast<unsigned char>(c) ) || 'x' == c )
{
l = l * nLog + (c - '0');
c = GetFastNextChar();
@@ -196,7 +196,8 @@ bool SvTokenStream::MakeToken( SvToken & rToken )
if( 0 == c )
c = GetNextChar();
// skip whitespace
- while( isspace( c ) || 26 == c )
+ while( rtl::isAsciiWhiteSpace( static_cast<unsigned char>(c) )
+ || 26 == c )
{
c = GetFastNextChar();
nColumn += c == '\t' ? nTabSize : 1;
@@ -280,16 +281,17 @@ bool SvTokenStream::MakeToken( SvToken & rToken )
rToken.nType = SVTOKENTYPE::String;
rToken.aString = aStr.makeStringAndClear();
}
- else if( isdigit( c ) )
+ else if( rtl::isAsciiDigit( static_cast<unsigned char>(c) ) )
{
rToken.nType = SVTOKENTYPE::Integer;
rToken.nLong = GetNumber();
}
- else if( isalpha (c) || (c == '_') )
+ else if( rtl::isAsciiAlpha (static_cast<unsigned char>(c)) || (c == '_') )
{
OStringBuffer aBuf;
- while( isalnum( c ) || c == '_' )
+ while( rtl::isAsciiAlphanumeric( static_cast<unsigned char>(c) )
+ || c == '_' )
{
aBuf.append(c);
c = GetFastNextChar();