summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-01-30 20:17:32 +0900
committerSlávek Banko <slavek.banko@axis.cz>2021-02-01 23:39:38 +0100
commit961eb3f6e276b4a3609328a3076ef790026e9c03 (patch)
treef27de88e666ac3e067e01b15ac60a103eb3c559f /src/tools
parentb08a6d71ba872e67b75a822fcd44670126975818 (diff)
downloadqt3-961eb3f6e276b4a3609328a3076ef790026e9c03.tar.gz
qt3-961eb3f6e276b4a3609328a3076ef790026e9c03.zip
Removed explicit usage of the 'register' keyword.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/qbitarray.cpp18
-rw-r--r--src/tools/qcstring.cpp38
-rw-r--r--src/tools/qdatastream.cpp28
-rw-r--r--src/tools/qgarray.cpp24
-rw-r--r--src/tools/qgcache.cpp2
-rw-r--r--src/tools/qgdict.cpp14
-rw-r--r--src/tools/qglist.cpp24
-rw-r--r--src/tools/qgvector.cpp4
-rw-r--r--src/tools/qlocale.cpp28
-rw-r--r--src/tools/qstring.cpp26
-rw-r--r--src/tools/qtextstream.cpp4
-rw-r--r--src/tools/qunicodetables_p.h18
12 files changed, 114 insertions, 114 deletions
diff --git a/src/tools/qbitarray.cpp b/src/tools/qbitarray.cpp
index bdbeaa2..d3922bf 100644
--- a/src/tools/qbitarray.cpp
+++ b/src/tools/qbitarray.cpp
@@ -372,7 +372,7 @@ bool QBitArray::toggleBit( uint index )
return FALSE;
}
#endif
- register uchar *p = (uchar *)data() + (index>>3);
+ uchar *p = (uchar *)data() + (index>>3);
uchar b = (1 << (index & 7)); // bit position
uchar c = *p & b; // read bit
*p ^= b; // toggle bit
@@ -436,8 +436,8 @@ bool QBitArray::toggleBit( uint index )
QBitArray &QBitArray::operator&=( const QBitArray &a )
{
resize( QMAX(size(), a.size()) );
- register uchar *a1 = (uchar *)data();
- register uchar *a2 = (uchar *)a.data();
+ uchar *a1 = (uchar *)data();
+ uchar *a2 = (uchar *)a.data();
int n = QMIN( QByteArray::size(), a.QByteArray::size() );
int p = QMAX( QByteArray::size(), a.QByteArray::size() ) - n;
while ( n-- > 0 )
@@ -467,8 +467,8 @@ QBitArray &QBitArray::operator&=( const QBitArray &a )
QBitArray &QBitArray::operator|=( const QBitArray &a )
{
resize( QMAX(size(), a.size()) );
- register uchar *a1 = (uchar *)data();
- register uchar *a2 = (uchar *)a.data();
+ uchar *a1 = (uchar *)data();
+ uchar *a2 = (uchar *)a.data();
int n = QMIN( QByteArray::size(), a.QByteArray::size() );
while ( n-- > 0 )
*a1++ |= *a2++;
@@ -495,8 +495,8 @@ QBitArray &QBitArray::operator|=( const QBitArray &a )
QBitArray &QBitArray::operator^=( const QBitArray &a )
{
resize( QMAX(size(), a.size()) );
- register uchar *a1 = (uchar *)data();
- register uchar *a2 = (uchar *)a.data();
+ uchar *a1 = (uchar *)data();
+ uchar *a2 = (uchar *)a.data();
int n = QMIN( QByteArray::size(), a.QByteArray::size() );
while ( n-- > 0 )
*a1++ ^= *a2++;
@@ -517,8 +517,8 @@ QBitArray &QBitArray::operator^=( const QBitArray &a )
QBitArray QBitArray::operator~() const
{
QBitArray a( size() );
- register uchar *a1 = (uchar *)data();
- register uchar *a2 = (uchar *)a.data();
+ uchar *a1 = (uchar *)data();
+ uchar *a2 = (uchar *)a.data();
int n = QByteArray::size();
while ( n-- )
*a2++ = ~*a1++;
diff --git a/src/tools/qcstring.cpp b/src/tools/qcstring.cpp
index 9abf9e7..9a07a84 100644
--- a/src/tools/qcstring.cpp
+++ b/src/tools/qcstring.cpp
@@ -72,8 +72,8 @@
void *qmemmove( void *dst, const void *src, uint len )
{
- register char *d;
- register char *s;
+ char *d;
+ char *s;
if ( dst > src ) {
d = (char *)dst + len - 1;
s = (char *)src + len - 1;
@@ -218,8 +218,8 @@ char *qstrncpy( char *dst, const char *src, uint len )
int qstricmp( const char *str1, const char *str2 )
{
- register const uchar *s1 = (const uchar *)str1;
- register const uchar *s2 = (const uchar *)str2;
+ const uchar *s1 = (const uchar *)str1;
+ const uchar *s2 = (const uchar *)str2;
int res;
uchar c;
if ( !s1 || !s2 )
@@ -252,8 +252,8 @@ int qstricmp( const char *str1, const char *str2 )
int qstrnicmp( const char *str1, const char *str2, uint len )
{
- register const uchar *s1 = (const uchar *)str1;
- register const uchar *s2 = (const uchar *)str2;
+ const uchar *s1 = (const uchar *)str1;
+ const uchar *s2 = (const uchar *)str2;
int res;
uchar c;
if ( !s1 || !s2 )
@@ -273,8 +273,8 @@ static bool crc_tbl_init = FALSE;
static void createCRC16Table() // build CRC16 lookup table
{
- register uint i;
- register uint j;
+ uint i;
+ uint j;
uint v0, v1, v2, v3;
for ( i = 0; i < 16; i++ ) {
v0 = i & 1;
@@ -322,7 +322,7 @@ Q_UINT16 qChecksum( const char *data, uint len )
crc_tbl_init = TRUE;
}
}
- register Q_UINT16 crc = 0xffff;
+ Q_UINT16 crc = 0xffff;
uchar c;
uchar *p = (uchar *)data;
while ( len-- ) {
@@ -940,7 +940,7 @@ int QCString::find( char c, int index, bool cs ) const
{
if ( (uint)index >= size() ) // index outside string
return -1;
- register const char *d;
+ const char *d;
if ( cs ) { // case sensitive
d = strchr( data()+index, c );
} else {
@@ -1056,8 +1056,8 @@ int QCString::find( const char *str, int index, bool cs, uint l ) const
int QCString::findRev( char c, int index, bool cs ) const
{
- register const char *b = data();
- register const char *d;
+ const char *b = data();
+ const char *d;
if ( index < 0 )
index = length();
if ( (uint)index >= size() )
@@ -1290,7 +1290,7 @@ QCString QCString::mid( uint index, uint len ) const
} else {
if ( len > slen-index )
len = slen - index;
- register char *p = data()+index;
+ char *p = data()+index;
QCString s( len+1 );
strncpy( s.data(), p, len );
*(s.data()+len) = '\0';
@@ -1390,7 +1390,7 @@ QCString QCString::rightJustify( uint width, char fill, bool truncate ) const
QCString QCString::lower() const
{
QCString s( data() );
- register char *p = s.data();
+ char *p = s.data();
if ( p ) {
while ( *p ) {
*p = tolower( (uchar) *p );
@@ -1416,7 +1416,7 @@ QCString QCString::lower() const
QCString QCString::upper() const
{
QCString s( data() );
- register char *p = s.data();
+ char *p = s.data();
if ( p ) {
while ( *p ) {
*p = toupper(*p);
@@ -1448,7 +1448,7 @@ QCString QCString::stripWhiteSpace() const
if ( isEmpty() ) // nothing to do
return copy();
- register char *s = data();
+ char *s = data();
QCString result = s;
int reslen = result.length();
if ( !isspace((uchar) s[0]) && !isspace((uchar) s[reslen-1]) )
@@ -2107,7 +2107,7 @@ QCString &QCString::setNum( long n )
{
detach();
char buf[20];
- register char *p = &buf[19];
+ char *p = &buf[19];
bool neg;
if ( n < 0 ) {
neg = TRUE;
@@ -2137,7 +2137,7 @@ QCString &QCString::setNum( ulong n )
{
detach();
char buf[20];
- register char *p = &buf[19];
+ char *p = &buf[19];
*p = '\0';
do {
*--p = ((int)(n%10)) + '0';
@@ -2195,7 +2195,7 @@ QCString &QCString::setNum( double n, char f, int prec )
qWarning( "QCString::setNum: Invalid format char '%c'", f );
#endif
char format[20];
- register char *fs = format; // generate format string
+ char *fs = format; // generate format string
*fs++ = '%'; // "%.<prec>l<f>"
if ( prec > 99 )
prec = 99;
diff --git a/src/tools/qdatastream.cpp b/src/tools/qdatastream.cpp
index 2cdd5f7..f36afeb 100644
--- a/src/tools/qdatastream.cpp
+++ b/src/tools/qdatastream.cpp
@@ -493,7 +493,7 @@ extern "C" long long __strtoll( const char *, char**, int );
static Q_INT64 read_int_ascii( QDataStream *s )
{
- register int n = 0;
+ int n = 0;
char buf[40];
for ( ;; ) {
buf[n] = s->device()->getch();
@@ -575,7 +575,7 @@ QDataStream &QDataStream::operator>>( Q_INT16 &i )
} else if ( noswap ) { // no conversion needed
dev->readBlock( (char *)&i, sizeof(Q_INT16) );
} else { // swap bytes
- register uchar *p = (uchar *)(&i);
+ uchar *p = (uchar *)(&i);
char b[2];
if (dev->readBlock( b, 2 ) >= 2) {
*p++ = b[1];
@@ -687,7 +687,7 @@ QDataStream &QDataStream::operator>>( Q_LONG &i )
} else if ( noswap ) { // no conversion needed
dev->readBlock( (char *)&i, sizeof(Q_LONG) );
} else { // swap bytes
- register uchar *p = (uchar *)(&i);
+ uchar *p = (uchar *)(&i);
char b[sizeof(Q_LONG)];
if (dev->readBlock( b, sizeof(Q_LONG) ) >= (int)sizeof(Q_LONG)) {
for ( int j = sizeof(Q_LONG); j; ) {
@@ -701,7 +701,7 @@ QDataStream &QDataStream::operator>>( Q_LONG &i )
static double read_double_ascii( QDataStream *s )
{
- register int n = 0;
+ int n = 0;
char buf[80];
for ( ;; ) {
buf[n] = s->device()->getch();
@@ -759,7 +759,7 @@ QDataStream &QDataStream::operator>>( double &f )
} else if ( noswap ) { // no conversion needed
dev->readBlock( (char *)&f, sizeof(double) );
} else { // swap bytes
- register uchar *p = (uchar *)(&f);
+ uchar *p = (uchar *)(&f);
char b[8];
if (dev->readBlock( b, 8 ) >= 8) {
*p++ = b[7];
@@ -841,7 +841,7 @@ QDataStream &QDataStream::readRawBytes( char *s, uint len )
{
CHECK_STREAM_PRECOND
if ( printable ) { // printable data
- register Q_INT8 *p = (Q_INT8*)s;
+ Q_INT8 *p = (Q_INT8*)s;
if ( version() < 4 ) {
while ( len-- ) {
Q_INT32 tmp;
@@ -918,7 +918,7 @@ QDataStream &QDataStream::operator<<( Q_INT16 i )
} else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&i, sizeof(Q_INT16) );
} else { // swap bytes
- register uchar *p = (uchar *)(&i);
+ uchar *p = (uchar *)(&i);
char b[2];
b[1] = *p++;
b[0] = *p;
@@ -944,7 +944,7 @@ QDataStream &QDataStream::operator<<( Q_INT32 i )
} else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&i, sizeof(Q_INT32) );
} else { // swap bytes
- register uchar *p = (uchar *)(&i);
+ uchar *p = (uchar *)(&i);
char b[4];
b[3] = *p++;
b[2] = *p++;
@@ -987,7 +987,7 @@ QDataStream &QDataStream::operator<<( Q_INT64 i )
} else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&i, sizeof(Q_INT64) );
} else { // swap bytes
- register uchar *p = (uchar *)(&i);
+ uchar *p = (uchar *)(&i);
char b[8];
b[7] = *p++;
b[6] = *p++;
@@ -1027,7 +1027,7 @@ QDataStream &QDataStream::operator<<( Q_LONG i )
} else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&i, sizeof(Q_LONG) );
} else { // swap bytes
- register uchar *p = (uchar *)(&i);
+ uchar *p = (uchar *)(&i);
char b[sizeof(Q_LONG)];
for ( int j = sizeof(Q_LONG); j; )
b[--j] = *p++;
@@ -1064,7 +1064,7 @@ QDataStream &QDataStream::operator<<( float f )
if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&g, sizeof(float) );
} else { // swap bytes
- register uchar *p = (uchar *)(&g);
+ uchar *p = (uchar *)(&g);
char b[4];
b[3] = *p++;
b[2] = *p++;
@@ -1094,7 +1094,7 @@ QDataStream &QDataStream::operator<<( double f )
} else if ( noswap ) { // no conversion needed
dev->writeBlock( (char *)&f, sizeof(double) );
} else { // swap bytes
- register uchar *p = (uchar *)(&f);
+ uchar *p = (uchar *)(&f);
char b[8];
b[7] = *p++;
b[6] = *p++;
@@ -1163,11 +1163,11 @@ QDataStream &QDataStream::writeRawBytes( const char *s, uint len )
CHECK_STREAM_PRECOND
if ( printable ) { // write printable
if ( version() < 4 ) {
- register char *p = (char *)s;
+ char *p = (char *)s;
while ( len-- )
*this << *p++;
} else {
- register Q_INT8 *p = (Q_INT8*)s;
+ Q_INT8 *p = (Q_INT8*)s;
while ( len-- )
*this << *p++;
}
diff --git a/src/tools/qgarray.cpp b/src/tools/qgarray.cpp
index 8a27510..495d89a 100644
--- a/src/tools/qgarray.cpp
+++ b/src/tools/qgarray.cpp
@@ -324,17 +324,17 @@ bool QGArray::fill( const char *d, int len, uint sz )
if ( sz == 1 ) // 8 bit elements
memset( data(), *d, len );
else if ( sz == 4 ) { // 32 bit elements
- register Q_INT32 *x = (Q_INT32*)data();
+ Q_INT32 *x = (Q_INT32*)data();
Q_INT32 v = *((Q_INT32*)d);
while ( len-- )
*x++ = v;
} else if ( sz == 2 ) { // 16 bit elements
- register Q_INT16 *x = (Q_INT16*)data();
+ Q_INT16 *x = (Q_INT16*)data();
Q_INT16 v = *((Q_INT16*)d);
while ( len-- )
*x++ = v;
} else { // any other size elements
- register char *x = data();
+ char *x = data();
while ( len-- ) { // more complicated
memcpy( x, d, sz );
x += sz;
@@ -400,7 +400,7 @@ QGArray &QGArray::duplicate( const QGArray &a )
if ( a.shd == shd ) { // a.duplicate(a) !
if ( shd->count > 1 ) {
shd->count--;
- register array_data *n = newData();
+ array_data *n = newData();
Q_CHECK_PTR( n );
if ( (n->len=shd->len) ) {
n->data = NEW(char,n->len);
@@ -605,11 +605,11 @@ int QGArray::find( const char *d, uint index, uint sz ) const
#endif
return -1;
}
- register uint i;
+ uint i;
uint ii;
switch ( sz ) {
case 1: { // 8 bit elements
- register char *x = data() + index;
+ char *x = data() + index;
char v = *d;
for ( i=index; i<shd->len; i++ ) {
if ( *x++ == v )
@@ -619,7 +619,7 @@ int QGArray::find( const char *d, uint index, uint sz ) const
}
break;
case 2: { // 16 bit elements
- register Q_INT16 *x = (Q_INT16*)(data() + index);
+ Q_INT16 *x = (Q_INT16*)(data() + index);
Q_INT16 v = *((Q_INT16*)d);
for ( i=index; i<shd->len; i+=2 ) {
if ( *x++ == v )
@@ -629,7 +629,7 @@ int QGArray::find( const char *d, uint index, uint sz ) const
}
break;
case 4: { // 32 bit elements
- register Q_INT32 *x = (Q_INT32*)(data() + index);
+ Q_INT32 *x = (Q_INT32*)(data() + index);
Q_INT32 v = *((Q_INT32*)d);
for ( i=index; i<shd->len; i+=4 ) {
if ( *x++ == v )
@@ -659,11 +659,11 @@ int QGArray::find( const char *d, uint index, uint sz ) const
int QGArray::contains( const char *d, uint sz ) const
{
- register uint i = shd->len;
+ uint i = shd->len;
int count = 0;
switch ( sz ) {
case 1: { // 8 bit elements
- register char *x = data();
+ char *x = data();
char v = *d;
while ( i-- ) {
if ( *x++ == v )
@@ -672,7 +672,7 @@ int QGArray::contains( const char *d, uint sz ) const
}
break;
case 2: { // 16 bit elements
- register Q_INT16 *x = (Q_INT16*)data();
+ Q_INT16 *x = (Q_INT16*)data();
Q_INT16 v = *((Q_INT16*)d);
i /= 2;
while ( i-- ) {
@@ -682,7 +682,7 @@ int QGArray::contains( const char *d, uint sz ) const
}
break;
case 4: { // 32 bit elements
- register Q_INT32 *x = (Q_INT32*)data();
+ Q_INT32 *x = (Q_INT32*)data();
Q_INT32 v = *((Q_INT32*)d);
i /= 4;
while ( i-- ) {
diff --git a/src/tools/qgcache.cpp b/src/tools/qgcache.cpp
index 3c70d9f..51542e7 100644
--- a/src/tools/qgcache.cpp
+++ b/src/tools/qgcache.cpp
@@ -589,7 +589,7 @@ bool QGCache::makeRoomFor( int cost, int priority )
return FALSE; // than maximum cost
if ( priority == -1 )
priority = 32767;
- register QCacheItem *ci = lruList->last();
+ QCacheItem *ci = lruList->last();
int cntCost = 0;
int dumps = 0; // number of items to dump
while ( cntCost < cost && ci && ci->skipPriority <= priority ) {
diff --git a/src/tools/qgdict.cpp b/src/tools/qgdict.cpp
index b9c1810..1ad6da9 100644
--- a/src/tools/qgdict.cpp
+++ b/src/tools/qgdict.cpp
@@ -95,7 +95,7 @@ int QGDict::hashKeyString( const QString &key )
qWarning( "QGDict::hashKeyString: Invalid null key" );
#endif
int i;
- register uint h=0;
+ uint h=0;
uint g;
const QChar *p = key.unicode();
if ( cases ) { // case sensitive
@@ -129,8 +129,8 @@ int QGDict::hashKeyAscii( const char *key )
if ( key == 0 )
qWarning( "QGDict::hashAsciiKey: Invalid null key" );
#endif
- register const char *k = key;
- register uint h=0;
+ const char *k = key;
+ uint h=0;
uint g;
if ( cases ) { // case sensitive
while ( *k ) {
@@ -1080,8 +1080,8 @@ QPtrCollection::Item QGDictIterator::toFirst()
curNode = 0;
return 0;
}
- register uint i = 0;
- register QBaseBucket **v = dict->vec;
+ uint i = 0;
+ QBaseBucket **v = dict->vec;
while ( !(*v++) )
i++;
curNode = dict->vec[i];
@@ -1125,8 +1125,8 @@ QPtrCollection::Item QGDictIterator::operator++()
return 0;
curNode = curNode->getNext();
if ( !curNode ) { // no next bucket
- register uint i = curIndex + 1; // look from next vec element
- register QBaseBucket **v = &dict->vec[i];
+ uint i = curIndex + 1; // look from next vec element
+ QBaseBucket **v = &dict->vec[i];
while ( i < dict->size() && !(*v++) )
i++;
if ( i == dict->size() ) { // nothing found
diff --git a/src/tools/qglist.cpp b/src/tools/qglist.cpp
index fb94427..ef4c051 100644
--- a/src/tools/qglist.cpp
+++ b/src/tools/qglist.cpp
@@ -350,7 +350,7 @@ QLNode *QGList::locate( uint index )
curNode = firstNode;
curIndex = 0;
}
- register QLNode *node;
+ QLNode *node;
int distance = index - curIndex; // node distance to cur node
bool forward; // direction to traverse
@@ -405,7 +405,7 @@ void QGList::inSort( QPtrCollection::Item d )
//mutex->lock();
#endif
int index = 0;
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
while ( n && compareItems(n->data,d) < 0 ){ // find position in list
n = n->next;
index++;
@@ -426,7 +426,7 @@ void QGList::prepend( QPtrCollection::Item d )
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n = new QLNode( newItem(d) );
+ QLNode *n = new QLNode( newItem(d) );
Q_CHECK_PTR( n );
n->prev = 0;
if ( (n->next = firstNode) ) // list is not empty
@@ -451,7 +451,7 @@ void QGList::append( QPtrCollection::Item d )
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n = new QLNode( newItem(d) );
+ QLNode *n = new QLNode( newItem(d) );
Q_CHECK_PTR( n );
n->next = 0;
if ( (n->prev = lastNode) ) { // list is not empty
@@ -500,7 +500,7 @@ bool QGList::insertAt( uint index, QPtrCollection::Item d )
return FALSE;
}
QLNode *prevNode = nextNode->prev;
- register QLNode *n = new QLNode( newItem(d) );
+ QLNode *n = new QLNode( newItem(d) );
Q_CHECK_PTR( n );
nextNode->prev = n;
Q_ASSERT( (!((curIndex > 0) && (!prevNode))) );
@@ -564,7 +564,7 @@ QLNode *QGList::unlink()
#endif
return 0;
}
- register QLNode *n = curNode; // unlink this node
+ QLNode *n = curNode; // unlink this node
if ( n == firstNode ) { // removing first node ?
if ( (firstNode = n->next) ) {
firstNode->prev = 0;
@@ -881,7 +881,7 @@ void QGList::clear()
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
firstNode = lastNode = curNode = 0; // initialize list
numNodes = 0;
@@ -914,7 +914,7 @@ int QGList::findRef( QPtrCollection::Item d, bool fromStart )
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n;
+ QLNode *n;
int index;
if ( fromStart ) { // start from first node
n = firstNode;
@@ -946,7 +946,7 @@ int QGList::find( QPtrCollection::Item d, bool fromStart )
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n;
+ QLNode *n;
int index;
if ( fromStart ) { // start from first node
n = firstNode;
@@ -977,7 +977,7 @@ uint QGList::containsRef( QPtrCollection::Item d ) const
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
uint count = 0;
while ( n ) { // for all nodes...
if ( n->data == d ) // count # exact matches
@@ -1000,7 +1000,7 @@ uint QGList::contains( QPtrCollection::Item d ) const
#if defined(QT_THREAD_SUPPORT)
//mutex->lock();
#endif
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
uint count = 0;
QGList *that = (QGList*)this; // mutable for compareItems()
while ( n ) { // for all nodes...
@@ -1167,7 +1167,7 @@ void QGList::toVector( QGVector *vector ) const
#endif
return;
}
- register QLNode *n = firstNode;
+ QLNode *n = firstNode;
uint i = 0;
while ( n ) {
vector->insert( i, n->data );
diff --git a/src/tools/qgvector.cpp b/src/tools/qgvector.cpp
index 154d07d..c468896 100644
--- a/src/tools/qgvector.cpp
+++ b/src/tools/qgvector.cpp
@@ -388,8 +388,8 @@ void QGVector::sort() // sort vector
{
if ( count() == 0 ) // no elements
return;
- register Item *start = &vec[0];
- register Item *end = &vec[len-1];
+ Item *start = &vec[0];
+ Item *end = &vec[len-1];
Item tmp;
for (;;) { // put all zero elements behind
while ( start < end && *start != 0 )
diff --git a/src/tools/qlocale.cpp b/src/tools/qlocale.cpp
index a20ea83..e610d63 100644
--- a/src/tools/qlocale.cpp
+++ b/src/tools/qlocale.cpp
@@ -163,8 +163,8 @@ static char *_qdtoa(double d, int mode, int ndigits, int *decpt,
int *sign, char **rve, char **digits_str);
static double qstrtod(const char *s00, char const **se, bool *ok);
#endif
-static Q_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok);
-static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok);
+static Q_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *ok);
+static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool *ok);
static inline bool compareBits(double d1, double d2)
{
@@ -3797,13 +3797,13 @@ Q_ULLONG QLocalePrivate::stringToUnsLongLong(QString num, int base,
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
-static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok)
+static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool *ok)
{
- register const char *s = nptr;
- register Q_ULLONG acc;
- register unsigned char c;
- register Q_ULLONG qbase, cutoff;
- register int neg, any, cutlim;
+ const char *s = nptr;
+ Q_ULLONG acc;
+ unsigned char c;
+ Q_ULLONG qbase, cutoff;
+ int neg, any, cutlim;
if (ok != 0)
*ok = TRUE;
@@ -3878,13 +3878,13 @@ static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int ba
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
-static Q_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok)
+static Q_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *ok)
{
- register const char *s;
- register Q_ULLONG acc;
- register unsigned char c;
- register Q_ULLONG qbase, cutoff;
- register int neg, any, cutlim;
+ const char *s;
+ Q_ULLONG acc;
+ unsigned char c;
+ Q_ULLONG qbase, cutoff;
+ int neg, any, cutlim;
if (ok != 0)
*ok = TRUE;
diff --git a/src/tools/qstring.cpp b/src/tools/qstring.cpp
index 143f80c..62c5af0 100644
--- a/src/tools/qstring.cpp
+++ b/src/tools/qstring.cpp
@@ -576,7 +576,7 @@ bool QChar::isSymbol() const
int QChar::digitValue() const
{
#ifndef QT_NO_UNICODETABLES
- register int pos = QUnicodeTables::decimal_info[row()];
+ int pos = QUnicodeTables::decimal_info[row()];
if( !pos )
return -1;
return QUnicodeTables::decimal_info[(pos<<8) + cell()];
@@ -654,7 +654,7 @@ static QString shared_decomp;
const QString &QChar::decomposition() const
{
#ifndef QT_NO_UNICODETABLES
- register int pos = QUnicodeTables::decomposition_info[row()];
+ int pos = QUnicodeTables::decomposition_info[row()];
if(!pos) return QString::null;
pos = QUnicodeTables::decomposition_info[(pos<<8)+cell()];
@@ -681,7 +681,7 @@ const QString &QChar::decomposition() const
QChar::Decomposition QChar::decompositionTag() const
{
#ifndef QT_NO_UNICODETABLES
- register int pos = QUnicodeTables::decomposition_info[row()];
+ int pos = QUnicodeTables::decomposition_info[row()];
if(!pos) return QChar::Single;
pos = QUnicodeTables::decomposition_info[(pos<<8)+cell()];
@@ -961,7 +961,7 @@ private:
QLigature::QLigature( QChar c )
{
- register int pos = QUnicodeTables::ligature_info[c.row()];
+ int pos = QUnicodeTables::ligature_info[c.row()];
if( !pos )
ligatures = 0;
else
@@ -2528,7 +2528,7 @@ QString QString::multiArg( int numArgs, const QString& a1, const QString& a2,
int digitUsed[10];
int argForDigit[10];
};
- register const QChar *uc = d->unicode;
+ const QChar *uc = d->unicode;
const QString *args[4];
const int len = (int) length();
const int end = len - 1;
@@ -3018,7 +3018,7 @@ int QString::find( QChar c, int index, bool cs ) const
index += l;
if ( (uint)index >= l )
return -1;
- register const QChar *uc = unicode()+index;
+ const QChar *uc = unicode()+index;
const QChar *end = unicode() + l;
if ( cs ) {
while ( uc < end && *uc != c )
@@ -3041,7 +3041,7 @@ int QString::find( QChar c, int index, bool cs ) const
static void bm_init_skiptable( const QString &pattern, uint *skiptable, bool cs )
{
int i = 0;
- register uint *st = skiptable;
+ uint *st = skiptable;
int l = pattern.length();
while ( i++ < 0x100/8 ) {
*(st++) = l;
@@ -3078,7 +3078,7 @@ static int bm_find( const QString &str, int index, const QString &pattern, uint
const uint pl = pattern.length();
const uint pl_minus_one = pl - 1;
- register const QChar *current = uc + index + pl_minus_one;
+ const QChar *current = uc + index + pl_minus_one;
const QChar *end = uc + l;
if ( cs ) {
while ( current < end ) {
@@ -3269,7 +3269,7 @@ int QString::findRev( QChar c, int index, bool cs ) const
if ( (uint)index >= l )
return -1;
const QChar *end = unicode();
- register const QChar *uc = end + index;
+ const QChar *uc = end + index;
if ( cs ) {
while ( uc >= end && *uc != c )
uc--;
@@ -3836,7 +3836,7 @@ QString QString::mid( uint index, uint len ) const
len = slen - index;
if ( index == 0 && len == slen )
return *this;
- register const QChar *p = unicode()+index;
+ const QChar *p = unicode()+index;
QString s( len, TRUE );
memcpy( s.d->unicode, p, len * sizeof(QChar) );
s.d->len = len;
@@ -3938,7 +3938,7 @@ QString QString::rightJustify( uint width, QChar fill, bool truncate ) const
QString QString::lower() const
{
int l = length();
- register QChar *p = d->unicode;
+ QChar *p = d->unicode;
while ( l ) {
if ( *p != ::lower(*p) ) {
QString s( *this );
@@ -3971,7 +3971,7 @@ QString QString::lower() const
QString QString::upper() const
{
int l = length();
- register QChar *p = d->unicode;
+ QChar *p = d->unicode;
while ( l ) {
if ( *p != ::upper(*p) ) {
QString s( *this );
@@ -4012,7 +4012,7 @@ QString QString::stripWhiteSpace() const
{
if ( isEmpty() ) // nothing to do
return *this;
- register const QChar *s = unicode();
+ const QChar *s = unicode();
if ( !s->isSpace() && !s[length()-1].isSpace() )
return *this;
diff --git a/src/tools/qtextstream.cpp b/src/tools/qtextstream.cpp
index eb56eec..ede0163 100644
--- a/src/tools/qtextstream.cpp
+++ b/src/tools/qtextstream.cpp
@@ -1869,7 +1869,7 @@ QTextStream &QTextStream::output_int( int format, unsigned long long n, bool neg
static const char hexdigits_upper[] = "0123456789ABCDEF";
CHECK_STREAM_PRECOND
char buf[76];
- register char *p;
+ char *p;
int len;
const char *hexdigits;
@@ -2099,7 +2099,7 @@ QTextStream &QTextStream::operator<<( double f )
f_char = (flags() & uppercase) ? 'E' : 'e';
else
f_char = (flags() & uppercase) ? 'G' : 'g';
- register char *fs = format; // generate format string
+ char *fs = format; // generate format string
*fs++ = '%'; // "%.<prec>l<f_char>"
*fs++ = '.';
int prec = precision();
diff --git a/src/tools/qunicodetables_p.h b/src/tools/qunicodetables_p.h
index ae8136f..8a587d7 100644
--- a/src/tools/qunicodetables_p.h
+++ b/src/tools/qunicodetables_p.h
@@ -101,7 +101,7 @@ inline QChar::Category category( const QChar &c )
if ( c.unicode() > 0xff ) return QChar::Letter_Uppercase; //########
return (QChar::Category)QUnicodeTables::unicode_info[c.unicode()];
#else
- register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
+ int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
uc += c.cell();
return (QChar::Category)QUnicodeTables::unicode_info[uc];
#endif // QT_NO_UNICODETABLES
@@ -112,8 +112,8 @@ inline QChar lower( const QChar &c )
#ifndef QT_NO_UNICODETABLES
int row = c.row();
int cell = c.cell();
- register int ci = QUnicodeTables::case_info[row];
- register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
+ int ci = QUnicodeTables::case_info[row];
+ int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
uc += c.cell();
if (QUnicodeTables::unicode_info[uc] != QChar::Letter_Uppercase || !ci)
return c;
@@ -131,8 +131,8 @@ inline QChar upper( const QChar &c )
#ifndef QT_NO_UNICODETABLES
int row = c.row();
int cell = c.cell();
- register int ci = QUnicodeTables::case_info[row];
- register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
+ int ci = QUnicodeTables::case_info[row];
+ int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
uc += c.cell();
if (QUnicodeTables::unicode_info[uc] != QChar::Letter_Lowercase || !ci)
return c;
@@ -148,7 +148,7 @@ inline QChar upper( const QChar &c )
inline QChar::Direction direction( const QChar &c )
{
#ifndef QT_NO_UNICODETABLES
- register int pos = QUnicodeTables::direction_info[c.row()];
+ int pos = QUnicodeTables::direction_info[c.row()];
return (QChar::Direction) (QUnicodeTables::direction_info[(pos<<8)+c.cell()] & 0x1f);
#else
Q_UNUSED(c);
@@ -159,7 +159,7 @@ inline QChar::Direction direction( const QChar &c )
inline bool mirrored( const QChar &c )
{
#ifndef QT_NO_UNICODETABLES
- register int pos = QUnicodeTables::direction_info[c.row()];
+ int pos = QUnicodeTables::direction_info[c.row()];
return QUnicodeTables::direction_info[(pos<<8)+c.cell()] > 128;
#else
Q_UNUSED(c);
@@ -187,7 +187,7 @@ inline QChar mirroredChar( const QChar &ch )
inline QChar::Joining joining( const QChar &ch )
{
#ifndef QT_NO_UNICODETABLES
- register int pos = QUnicodeTables::direction_info[ch.row()];
+ int pos = QUnicodeTables::direction_info[ch.row()];
return (QChar::Joining) ((QUnicodeTables::direction_info[(pos<<8)+ch.cell()] >> 5) &0x3);
#else
Q_UNUSED(ch);
@@ -225,7 +225,7 @@ inline int lineBreakClass( const QChar &ch )
return ch.row() ? QUnicodeTables::LineBreak_AL
: QUnicodeTables::latin1_line_break_info[ch.cell()];
#else
- register int pos = ((int)QUnicodeTables::line_break_info[ch.row()] << 8) + ch.cell();
+ int pos = ((int)QUnicodeTables::line_break_info[ch.row()] << 8) + ch.cell();
return QUnicodeTables::line_break_info[pos];
#endif
}