diff options
Diffstat (limited to 'qtools/qdatastream.cpp')
-rw-r--r-- | qtools/qdatastream.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/qtools/qdatastream.cpp b/qtools/qdatastream.cpp index 70bcab1..5190b53 100644 --- a/qtools/qdatastream.cpp +++ b/qtools/qdatastream.cpp @@ -403,7 +403,7 @@ void QDataStream::setByteOrder( int bo ) static Q_INT32 read_int_ascii( QDataStream *s ) { - register int n = 0; + int n = 0; char buf[40]; while ( TRUE ) { buf[n] = s->device()->getch(); @@ -462,7 +462,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]; dev->readBlock( b, 2 ); *p++ = b[1]; @@ -491,7 +491,7 @@ QDataStream &QDataStream::operator>>( Q_INT32 &i ) } else if ( noswap ) { // no conversion needed dev->readBlock( (char *)&i, sizeof(Q_INT32) ); } else { // swap bytes - register uchar *p = (uchar *)(&i); + uchar *p = (uchar *)(&i); char b[4]; dev->readBlock( b, 4 ); *p++ = b[3]; @@ -521,7 +521,7 @@ QDataStream &QDataStream::operator>>( Q_INT64 &i ) } else if ( noswap ) { // no conversion needed dev->readBlock( (char *)&i, sizeof(Q_INT64) ); } else { // swap bytes - register uchar *p = (uchar *)(&i); + uchar *p = (uchar *)(&i); char b[sizeof(Q_INT64)]; dev->readBlock( b, sizeof(Q_INT64) ); if ( sizeof(Q_INT64) == 8 ) { @@ -540,7 +540,7 @@ QDataStream &QDataStream::operator>>( Q_INT64 &i ) static double read_double_ascii( QDataStream *s ) { - register int n = 0; + int n = 0; char buf[80]; while ( TRUE ) { buf[n] = s->device()->getch(); @@ -566,7 +566,7 @@ QDataStream &QDataStream::operator>>( float &f ) } else if ( noswap ) { // no conversion needed dev->readBlock( (char *)&f, sizeof(float) ); } else { // swap bytes - register uchar *p = (uchar *)(&f); + uchar *p = (uchar *)(&f); char b[4]; dev->readBlock( b, 4 ); *p++ = b[3]; @@ -591,7 +591,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]; dev->readBlock( b, 8 ); *p++ = b[7]; @@ -670,7 +670,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; while ( len-- ) *this >> *p++; } else { // read data char array @@ -734,7 +734,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; @@ -765,7 +765,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++; @@ -797,7 +797,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[sizeof(Q_INT64)]; if ( sizeof(Q_INT64) == 8 ) { b[7] = *p++; @@ -845,7 +845,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++; @@ -873,7 +873,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++; @@ -939,7 +939,7 @@ QDataStream &QDataStream::writeRawBytes( const char *s, uint len ) { CHECK_STREAM_PRECOND if ( printable ) { // write printable - register char *p = (char *)s; + char *p = (char *)s; while ( len-- ) *this << *p++; } else { // write data char array |