diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-28 22:31:39 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-28 22:31:39 -0600 |
commit | 41bb408dde90e755b07cd2ab8a9bdec7548c84b0 (patch) | |
tree | 6d4d5407c000add30aa78630e009c0e5d633e440 /src/tools/qcstring.cpp | |
parent | 1740cd279522c060e738bbbffacab83355d2b794 (diff) | |
download | tqt3-41bb408dde90e755b07cd2ab8a9bdec7548c84b0.tar.gz tqt3-41bb408dde90e755b07cd2ab8a9bdec7548c84b0.zip |
Automated conversion from qt3
Diffstat (limited to 'src/tools/qcstring.cpp')
-rw-r--r-- | src/tools/qcstring.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/tools/qcstring.cpp b/src/tools/qcstring.cpp index 8e7a1d14d..f6f4f1ff8 100644 --- a/src/tools/qcstring.cpp +++ b/src/tools/qcstring.cpp @@ -70,7 +70,7 @@ is copied correctly even if \a src and \a dst overlap. */ -void *qmemmove( void *dst, const void *src, uint len ) +void *tqmemmove( void *dst, const void *src, uint len ) { register char *d; register char *s; @@ -100,7 +100,7 @@ void *qmemmove( void *dst, const void *src, uint len ) The returned string must be deleted using \c delete[]. */ -char *qstrdup( const char *src ) +char *tqstrdup( const char *src ) { if ( !src ) return 0; @@ -133,7 +133,7 @@ char *qstrdup( const char *src ) \sa qstrcpy() */ -char *qstrncpy( char *dst, const char *src, uint len ) +char *tqstrncpy( char *dst, const char *src, uint len ) { if ( !src || !dst ) return 0; @@ -170,7 +170,7 @@ char *qstrncpy( char *dst, const char *src, uint len ) Special case II: Returns a random nonzero value if \a str1 is 0 or \a str2 is 0 (but not both). - \sa tqstrncmp() qstricmp() qstrnicmp() + \sa tqstrncmp() tqstricmp() tqstrnicmp() \link #asciinotion Note on character comparisons \endlink */ @@ -192,7 +192,7 @@ char *qstrncpy( char *dst, const char *src, uint len ) Special case II: Returns a random nonzero value if \a str1 is 0 or \a str2 is 0 (but not both). - \sa qstrcmp(), qstricmp(), qstrnicmp() + \sa qstrcmp(), tqstricmp(), tqstrnicmp() \link #asciinotion Note on character comparisons \endlink */ @@ -212,11 +212,11 @@ char *qstrncpy( char *dst, const char *src, uint len ) Special case II: Returns a random nonzero value if \a str1 is 0 or \a str2 is 0 (but not both). - \sa qstrcmp(), tqstrncmp(), qstrnicmp() + \sa qstrcmp(), tqstrncmp(), tqstrnicmp() \link #asciinotion Note on character comparisons \endlink */ -int qstricmp( const char *str1, const char *str2 ) +int tqstricmp( const char *str1, const char *str2 ) { register const uchar *s1 = (const uchar *)str1; register const uchar *s2 = (const uchar *)str2; @@ -246,11 +246,11 @@ int qstricmp( const char *str1, const char *str2 ) Special case II: Returns a random nonzero value if \a str1 is 0 or \a str2 is 0 (but not both). - \sa qstrcmp(), tqstrncmp() qstricmp() + \sa qstrcmp(), tqstrncmp() tqstricmp() \link #asciinotion Note on character comparisons \endlink */ -int qstrnicmp( const char *str1, const char *str2, uint len ) +int tqstrnicmp( const char *str1, const char *str2, uint len ) { register const uchar *s1 = (const uchar *)str1; register const uchar *s2 = (const uchar *)str2; @@ -308,13 +308,13 @@ static void createCRC16Table() // build CRC16 lookup table The checksum is independent of the byte order (endianness). */ -Q_UINT16 qChecksum( const char *data, uint len ) +Q_UINT16 tqChecksum( const char *data, uint len ) { if ( !crc_tbl_init ) { // create lookup table #ifdef QT_THREAD_SUPPORT - TQMutexLocker locker( qt_global_mutexpool ? - qt_global_mutexpool->get( &crc_tbl_init ) : 0 ); + TQMutexLocker locker( tqt_global_mutexpool ? + tqt_global_mutexpool->get( &crc_tbl_init ) : 0 ); #endif // QT_THREAD_SUPPORT if ( !crc_tbl_init ) { @@ -335,7 +335,7 @@ Q_UINT16 qChecksum( const char *data, uint len ) } /*! - \fn TQByteArray qCompress( const TQByteArray& data ) + \fn TQByteArray tqCompress( const TQByteArray& data ) \relates TQByteArray @@ -355,7 +355,7 @@ Q_UINT16 qChecksum( const char *data, uint len ) */ #ifndef QT_NO_COMPRESS -TQByteArray qCompress( const uchar* data, int nbytes ) +TQByteArray tqCompress( const uchar* data, int nbytes ) { if ( nbytes == 0 ) { TQByteArray tmp( 4 ); @@ -364,7 +364,7 @@ TQByteArray qCompress( const uchar* data, int nbytes ) } if ( !data ) { #if defined(QT_CHECK_RANGE) - qWarning( "qCompress: data is NULL." ); + tqWarning( "qCompress: data is NULL." ); #endif return TQByteArray(); } @@ -386,7 +386,7 @@ TQByteArray qCompress( const uchar* data, int nbytes ) break; case Z_MEM_ERROR: #if defined(QT_CHECK_RANGE) - qWarning( "qCompress: Z_MEM_ERROR: Not enough memory." ); + tqWarning( "qCompress: Z_MEM_ERROR: Not enough memory." ); #endif bazip.resize( 0 ); break; @@ -411,12 +411,12 @@ TQByteArray qCompress( const uchar* data, int nbytes ) Returns an empty TQByteArray if the input data was corrupt. \omit ADD THE FOLLOWING FOR TQt 4.0 - This function will uncompress data compressed with qCompress() + This function will uncompress data compressed with tqCompress() from this and any earlier TQt version, back to TQt 3.1 when this feature was added. \endomit - \sa qCompress() + \sa tqCompress() */ /*! @@ -433,14 +433,14 @@ TQByteArray tqUncompress( const uchar* data, int nbytes ) { if ( !data ) { #if defined(QT_CHECK_RANGE) - qWarning( "qUncompress: data is NULL." ); + tqWarning( "qUncompress: data is NULL." ); #endif return TQByteArray(); } if ( nbytes <= 4 ) { #if defined(QT_CHECK_RANGE) if ( nbytes < 4 || ( data[0]!=0 || data[1]!=0 || data[2]!=0 || data[3]!=0 ) ) - qWarning( "qUncompress: Input data is corrupted." ); + tqWarning( "qUncompress: Input data is corrupted." ); #endif return TQByteArray(); } @@ -463,7 +463,7 @@ TQByteArray tqUncompress( const uchar* data, int nbytes ) break; case Z_MEM_ERROR: #if defined(QT_CHECK_RANGE) - qWarning( "qUncompress: Z_MEM_ERROR: Not enough memory." ); + tqWarning( "qUncompress: Z_MEM_ERROR: Not enough memory." ); #endif break; case Z_BUF_ERROR: @@ -471,7 +471,7 @@ TQByteArray tqUncompress( const uchar* data, int nbytes ) break; case Z_DATA_ERROR: #if defined(QT_CHECK_RANGE) - qWarning( "qUncompress: Z_DATA_ERROR: Input data is corrupted." ); + tqWarning( "qUncompress: Z_DATA_ERROR: Input data is corrupted." ); #endif break; } @@ -552,7 +552,7 @@ TQDataStream &operator>>( TQDataStream &s, TQByteArray &a ) } if ( !a.resize( (uint)len ) ) { // resize array #if defined(QT_CHECK_NULL) - qWarning( "TQDataStream: Not enough memory to read TQByteArray" ); + tqWarning( "TQDataStream: Not enough memory to read TQByteArray" ); #endif len = 0; } @@ -1031,7 +1031,7 @@ int TQCString::find( const char *str, int index, bool cs, uint l ) const while ( haystack <= end ) { hashHaystack += tolower(*(haystack+sl_minus_1)); if ( hashHaystack == hashNeedle - && qstrnicmp( needle, haystack, sl ) == 0 ) + && tqstrnicmp( needle, haystack, sl ) == 0 ) return haystack - data(); REHASH( tolower(*haystack) ); @@ -1136,7 +1136,7 @@ int TQCString::findRev( const char *str, int index, bool cs ) const hashHaystack -= tolower(*haystack); while ( haystack >= end ) { hashHaystack += tolower(*haystack); - if ( hashHaystack == hashNeedle && qstrnicmp( needle, haystack, sl ) == 0 ) + if ( hashHaystack == hashNeedle && tqstrnicmp( needle, haystack, sl ) == 0 ) return haystack-data(); --haystack; REHASH( tolower(*(haystack+sl)) ); @@ -2192,7 +2192,7 @@ TQCString &TQCString::setNum( double n, char f, int prec ) { #if defined(QT_CHECK_RANGE) if ( !(f=='f' || f=='F' || f=='e' || f=='E' || f=='g' || f=='G') ) - qWarning( "TQCString::setNum: Invalid format char '%c'", f ); + tqWarning( "TQCString::setNum: Invalid format char '%c'", f ); #endif char format[20]; register char *fs = format; // generate format string @@ -2323,7 +2323,7 @@ TQDataStream &operator>>( TQDataStream &s, TQCString &str ) } if ( !str.TQByteArray::resize( (uint)len )) {// resize string #if defined(QT_CHECK_NULL) - qWarning( "TQDataStream: Not enough memory to read TQCString" ); + tqWarning( "TQDataStream: Not enough memory to read TQCString" ); #endif len = 0; } |