diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /kio/misc/kntlm | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kio/misc/kntlm')
-rw-r--r-- | kio/misc/kntlm/des.cpp | 28 | ||||
-rw-r--r-- | kio/misc/kntlm/des.h | 2 | ||||
-rw-r--r-- | kio/misc/kntlm/kntlm.cpp | 70 | ||||
-rw-r--r-- | kio/misc/kntlm/kntlm.h | 40 | ||||
-rw-r--r-- | kio/misc/kntlm/kswap.h | 98 |
5 files changed, 119 insertions, 119 deletions
diff --git a/kio/misc/kntlm/des.cpp b/kio/misc/kntlm/des.cpp index b6683ac34..e1029a4ca 100644 --- a/kio/misc/kntlm/des.cpp +++ b/kio/misc/kntlm/des.cpp @@ -25,7 +25,7 @@ static void permute_fp (unsigned char *inblock, DES_KEY * key, unsigned char *ou static void perminit_ip (DES_KEY * key); static void spinit (DES_KEY * key); static void perminit_fp (DES_KEY * key); -static Q_UINT32 f (DES_KEY * key, Q_UINT32 r, char *subkey); +static TQ_UINT32 f (DES_KEY * key, TQ_UINT32 r, char *subkey); /* Tables defined in the Data Encryption Standard documents */ @@ -211,8 +211,8 @@ ntlm_des_set_key (DES_KEY * dkey, char *user_key, int /*len*/) for (j = 0; j < 56; j++) { /* convert pc1 to bits of key */ l = pc1[j] - 1; /* integer bit location */ - m = l & 07; /* find bit */ - pc1m[j] = (user_key[l >> 3] & /* find which key byte l is in */ + m = l & 07; /* tqfind bit */ + pc1m[j] = (user_key[l >> 3] & /* tqfind which key byte l is in */ bytebit[m]) /* and which bit of that byte */ ? 1 : 0; /* and store 1-bit result */ @@ -227,7 +227,7 @@ ntlm_des_set_key (DES_KEY * dkey, char *user_key, int /*len*/) /* check bit that goes to kn[j] */ if (pcr[pc2[j] - 1]) { - /* mask it in if it's there */ + /* tqmask it in if it's there */ l = j % 6; dkey->kn[i][j / 6] |= bytebit[l] >> 2; } @@ -240,9 +240,9 @@ ntlm_des_set_key (DES_KEY * dkey, char *user_key, int /*len*/) static void ntlm_des_encrypt (DES_KEY * key, unsigned char *block) { - Q_UINT32 left, right; + TQ_UINT32 left, right; char *knp; - Q_UINT32 work[2]; /* Working data storage */ + TQ_UINT32 work[2]; /* Working data storage */ permute_ip (block, key, (unsigned char *) work); /* Initial Permutation */ left = KFromToBigEndian(work[0]); @@ -310,7 +310,7 @@ permute_ip (unsigned char *inblock, DES_KEY * key, unsigned char *outblock) ob = outblock; p = key->iperm[j][(*ib >> 4) & 0xf]; q = key->iperm[j + 1][*ib & 0xf]; - /* and each output byte, OR the masks together */ + /* and each output byte, OR the tqmasks together */ *ob++ |= *p++ | *q++; *ob++ |= *p++ | *q++; *ob++ |= *p++ | *q++; @@ -339,7 +339,7 @@ permute_fp (unsigned char *inblock, DES_KEY * key, unsigned char *outblock) ob = outblock; p = key->fperm[j][(*ib >> 4) & 0xf]; q = key->fperm[j + 1][*ib & 0xf]; - /* and each output byte, OR the masks together */ + /* and each output byte, OR the tqmasks together */ *ob++ |= *p++ | *q++; *ob++ |= *p++ | *q++; *ob++ |= *p++ | *q++; @@ -352,11 +352,11 @@ permute_fp (unsigned char *inblock, DES_KEY * key, unsigned char *outblock) } /* The nonlinear function f(r,k), the heart of DES */ -static Q_UINT32 -f (DES_KEY * key, Q_UINT32 r, char *subkey) +static TQ_UINT32 +f (DES_KEY * key, TQ_UINT32 r, char *subkey) { - Q_UINT32 *spp; - Q_UINT32 rval, rt; + TQ_UINT32 *spp; + TQ_UINT32 rval, rt; int er; #ifdef TRACE @@ -377,7 +377,7 @@ f (DES_KEY * key, Q_UINT32 r, char *subkey) spp = &key->sp[7][0]; rval = spp[(er ^ *subkey--) & 0x3f]; spp -= 64; - rt = (Q_UINT32) r >> 3; + rt = (TQ_UINT32) r >> 3; rval |= spp[((int) rt ^ *subkey--) & 0x3f]; spp -= 64; rt >>= 4; @@ -457,7 +457,7 @@ spinit (DES_KEY * key) { char pbox[32]; int p, i, s, j, rowcol; - Q_UINT32 val; + TQ_UINT32 val; /* Compute pbox, the inverse of p32i. * This is easier to work with diff --git a/kio/misc/kntlm/des.h b/kio/misc/kntlm/des.h index 1cb2f27e5..0f6f59dc9 100644 --- a/kio/misc/kntlm/des.h +++ b/kio/misc/kntlm/des.h @@ -6,7 +6,7 @@ typedef struct des_key { char kn[16][8]; - Q_UINT32 sp[8][64]; + TQ_UINT32 sp[8][64]; char iperm[16][16][8]; char fperm[16][16][8]; } DES_KEY; diff --git a/kio/misc/kntlm/kntlm.cpp b/kio/misc/kntlm/kntlm.cpp index a3eca3bdd..db2b45b6c 100644 --- a/kio/misc/kntlm/kntlm.cpp +++ b/kio/misc/kntlm/kntlm.cpp @@ -32,12 +32,12 @@ #include "des.h" #include "kntlm.h" -TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode ) +TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool tqunicode ) { //watch for buffer overflows - Q_UINT32 offset; - Q_UINT16 len; - offset = KFromToLittleEndian((Q_UINT32)secbuf.offset); + TQ_UINT32 offset; + TQ_UINT16 len; + offset = KFromToLittleEndian((TQ_UINT32)secbuf.offset); len = KFromToLittleEndian(secbuf.len); if ( offset > buf.size() || offset + len > buf.size() ) return TQString::null; @@ -45,10 +45,10 @@ TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool un TQString str; const char *c = buf.data() + offset; - if ( unicode ) { + if ( tqunicode ) { str = UnicodeLE2TQString( (TQChar*) c, len >> 1 ); } else { - str = TQString::fromLatin1( c, len ); + str = TQString::tqfromLatin1( c, len ); } return str; } @@ -56,9 +56,9 @@ TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool un TQByteArray KNTLM::getBuf( const TQByteArray &buf, const SecBuf &secbuf ) { TQByteArray ret; - Q_UINT32 offset; - Q_UINT16 len; - offset = KFromToLittleEndian((Q_UINT32)secbuf.offset); + TQ_UINT32 offset; + TQ_UINT16 len; + offset = KFromToLittleEndian((TQ_UINT32)secbuf.offset); len = KFromToLittleEndian(secbuf.len); //watch for buffer overflows if ( offset > buf.size() || @@ -67,11 +67,11 @@ TQByteArray KNTLM::getBuf( const TQByteArray &buf, const SecBuf &secbuf ) return ret; } -void KNTLM::addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode ) +void KNTLM::addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool tqunicode ) { TQByteArray tmp; - if ( unicode ) { + if ( tqunicode ) { tmp = QString2UnicodeLE( str ); addBuf( buf, secbuf, tmp ); } else { @@ -85,26 +85,26 @@ void KNTLM::addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bo void KNTLM::addBuf( TQByteArray &buf, SecBuf &secbuf, TQByteArray &data ) { - Q_UINT32 offset; - Q_UINT16 len, maxlen; + TQ_UINT32 offset; + TQ_UINT16 len, maxlen; offset = (buf.size() + 1) & 0xfffffffe; len = data.size(); maxlen = data.size(); - secbuf.offset = KFromToLittleEndian((Q_UINT32)offset); + secbuf.offset = KFromToLittleEndian((TQ_UINT32)offset); secbuf.len = KFromToLittleEndian(len); secbuf.maxlen = KFromToLittleEndian(maxlen); buf.resize( offset + len ); memcpy( buf.data() + offset, data.data(), data.size() ); } -bool KNTLM::getNegotiate( TQByteArray &negotiate, const TQString &domain, const TQString &workstation, Q_UINT32 flags ) +bool KNTLM::getNegotiate( TQByteArray &negotiate, const TQString &domain, const TQString &workstation, TQ_UINT32 flags ) { TQByteArray rbuf( sizeof(Negotiate) ); rbuf.fill( 0 ); memcpy( rbuf.data(), "NTLMSSP", 8 ); - ((Negotiate*) rbuf.data())->msgType = KFromToLittleEndian( (Q_UINT32)1 ); + ((Negotiate*) rbuf.data())->msgType = KFromToLittleEndian( (TQ_UINT32)1 ); if ( !domain.isEmpty() ) { flags |= Negotiate_Domain_Supplied; addString( rbuf, ((Negotiate*) rbuf.data())->domain, domain ); @@ -126,21 +126,21 @@ bool KNTLM::getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQSt Challenge *ch = (Challenge *) challenge.data(); TQByteArray response; uint chsize = challenge.size(); - bool unicode = false; + bool tqunicode = false; TQString dom; //challenge structure too small if ( chsize < 32 ) return false; - unicode = KFromToLittleEndian(ch->flags) & Negotiate_Unicode; + tqunicode = KFromToLittleEndian(ch->flags) & Negotiate_Unicode; if ( domain.isEmpty() ) - dom = getString( challenge, ch->targetName, unicode ); + dom = getString( challenge, ch->targetName, tqunicode ); else dom = domain; rbuf.fill( 0 ); memcpy( rbuf.data(), "NTLMSSP", 8 ); - ((Auth*) rbuf.data())->msgType = KFromToLittleEndian( (Q_UINT32)3 ); + ((Auth*) rbuf.data())->msgType = KFromToLittleEndian( (TQ_UINT32)3 ); ((Auth*) rbuf.data())->flags = ch->flags; TQByteArray targetInfo = getBuf( challenge, ch->targetInfo ); @@ -164,10 +164,10 @@ bool KNTLM::getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQSt addBuf( rbuf, ((Auth*) rbuf.data())->lmResponse, response ); // } if ( !dom.isEmpty() ) - addString( rbuf, ((Auth*) rbuf.data())->domain, dom, unicode ); - addString( rbuf, ((Auth*) rbuf.data())->user, user, unicode ); + addString( rbuf, ((Auth*) rbuf.data())->domain, dom, tqunicode ); + addString( rbuf, ((Auth*) rbuf.data())->user, user, tqunicode ); if ( !workstation.isEmpty() ) - addString( rbuf, ((Auth*) rbuf.data())->workstation, workstation, unicode ); + addString( rbuf, ((Auth*) rbuf.data())->workstation, workstation, tqunicode ); auth = rbuf; @@ -241,10 +241,10 @@ TQByteArray KNTLM::getNTLMResponse( const TQString &password, const unsigned cha TQByteArray KNTLM::ntlmHash( const TQString &password ) { KMD4::Digest digest; - TQByteArray ret, unicode; - unicode = QString2UnicodeLE( password ); + TQByteArray ret, tqunicode; + tqunicode = QString2UnicodeLE( password ); - KMD4 md4( unicode ); + KMD4 md4( tqunicode ); md4.rawDigest( digest ); ret.duplicate( (const char*) digest, sizeof( digest ) ); return ret; @@ -298,10 +298,10 @@ TQByteArray KNTLM::createBlob( const TQByteArray &targetinfo ) blob.fill( 0 ); Blob *bl = (Blob *) blob.data(); - bl->signature = KFromToBigEndian( (Q_UINT32) 0x01010000 ); - Q_UINT64 now = TQDateTime::currentDateTime().toTime_t(); - now += (Q_UINT64)3600*(Q_UINT64)24*(Q_UINT64)134774; - now *= (Q_UINT64)10000000; + bl->signature = KFromToBigEndian( (TQ_UINT32) 0x01010000 ); + TQ_UINT64 now = TQDateTime::tqcurrentDateTime().toTime_t(); + now += (TQ_UINT64)3600*(TQ_UINT64)24*(TQ_UINT64)134774; + now *= (TQ_UINT64)10000000; bl->timestamp = KFromToLittleEndian( now ); for ( uint i = 0; i<8; i++ ) { bl->challenge[i] = KApplication::random() % 0xff; @@ -312,7 +312,7 @@ TQByteArray KNTLM::createBlob( const TQByteArray &targetinfo ) TQByteArray KNTLM::hmacMD5( const TQByteArray &data, const TQByteArray &key ) { - Q_UINT8 ipad[64], opad[64]; + TQ_UINT8 ipad[64], opad[64]; KMD5::Digest digest; TQByteArray ret; @@ -372,18 +372,18 @@ void KNTLM::convertKey( unsigned char *key_56, void* ks ) TQByteArray KNTLM::QString2UnicodeLE( const TQString &target ) { - TQByteArray unicode( target.length() * 2 ); + TQByteArray tqunicode( target.length() * 2 ); for ( uint i = 0; i < target.length(); i++ ) { - ((Q_UINT16*)unicode.data())[ i ] = KFromToLittleEndian( target[i].unicode() ); + ((TQ_UINT16*)tqunicode.data())[ i ] = KFromToLittleEndian( target[i].tqunicode() ); } - return unicode; + return tqunicode; } TQString KNTLM::UnicodeLE2TQString( const TQChar* data, uint len ) { TQString ret; for ( uint i = 0; i < len; i++ ) { - ret += KFromToLittleEndian( data[ i ].unicode() ); + ret += KFromToLittleEndian( data[ i ].tqunicode() ); } return ret; } diff --git a/kio/misc/kntlm/kntlm.h b/kio/misc/kntlm/kntlm.h index 9be4ea357..23f00aa2a 100644 --- a/kio/misc/kntlm/kntlm.h +++ b/kio/misc/kntlm/kntlm.h @@ -33,7 +33,7 @@ * can be used for various servers which implements NTLM type authentication. * A comprehensive description of the NTLM authentication protocol can be found * at http://davenport.sourceforge.net/ntlm.html - * The class also contains methods to create the LanManager and NT (MD4) hashes + * The class also tqcontains methods to create the LanManager and NT (MD4) hashes * of a password. * This class doesn't maintain any state information, so all methods are static. */ @@ -70,9 +70,9 @@ public: typedef struct { - Q_UINT16 len; - Q_UINT16 maxlen; - Q_UINT32 offset; + TQ_UINT16 len; + TQ_UINT16 maxlen; + TQ_UINT32 offset; } SecBuf; /** @@ -81,8 +81,8 @@ public: typedef struct { char signature[8]; /* "NTLMSSP\0" */ - Q_UINT32 msgType; /* 1 */ - Q_UINT32 flags; + TQ_UINT32 msgType; /* 1 */ + TQ_UINT32 flags; SecBuf domain; SecBuf workstation; } Negotiate; @@ -93,11 +93,11 @@ public: typedef struct { char signature[8]; - Q_UINT32 msgType; /* 2 */ + TQ_UINT32 msgType; /* 2 */ SecBuf targetName; - Q_UINT32 flags; - Q_UINT8 challengeData[8]; - Q_UINT32 context[2]; + TQ_UINT32 flags; + TQ_UINT8 challengeData[8]; + TQ_UINT32 context[2]; SecBuf targetInfo; } Challenge; @@ -107,23 +107,23 @@ public: typedef struct { char signature[8]; - Q_UINT32 msgType; /* 3 */ + TQ_UINT32 msgType; /* 3 */ SecBuf lmResponse; SecBuf ntResponse; SecBuf domain; SecBuf user; SecBuf workstation; SecBuf sessionKey; - Q_UINT32 flags; + TQ_UINT32 flags; } Auth; typedef struct { - Q_UINT32 signature; - Q_UINT32 reserved; - Q_UINT64 timestamp; - Q_UINT8 challenge[8]; - Q_UINT8 unknown[4]; + TQ_UINT32 signature; + TQ_UINT32 reserved; + TQ_UINT64 timestamp; + TQ_UINT8 challenge[8]; + TQ_UINT8 unknown[4]; //Target info block - variable length } Blob; @@ -139,7 +139,7 @@ public: */ static bool getNegotiate( TQByteArray &negotiate, const TQString &domain = TQString::null, const TQString &workstation = TQString::null, - Q_UINT32 flags = Negotiate_Unicode | Request_Target | Negotiate_NTLM ); + TQ_UINT32 flags = Negotiate_Unicode | Request_Target | Negotiate_NTLM ); /** * Creates the type 3 message which should be sent to the server after * the challenge (type 2) received. @@ -212,7 +212,7 @@ public: /** * Extracts a string field from an NTLM structure. */ - static TQString getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode ); + static TQString getString( const TQByteArray &buf, const SecBuf &secbuf, bool tqunicode ); /** * Extracts a byte array from an NTLM structure. */ @@ -226,7 +226,7 @@ private: static TQString UnicodeLE2TQString( const TQChar* data, uint len ); static void addBuf( TQByteArray &buf, SecBuf &secbuf, TQByteArray &data ); - static void addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode = false ); + static void addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool tqunicode = false ); static void convertKey( unsigned char *key_56, void* ks ); }; diff --git a/kio/misc/kntlm/kswap.h b/kio/misc/kntlm/kswap.h index 336321fd4..6f935237e 100644 --- a/kio/misc/kntlm/kswap.h +++ b/kio/misc/kntlm/kswap.h @@ -28,7 +28,7 @@ /** * \defgroup KSWAP Byte-swapping functions - * kswap.h contains functions that will help converting + * kswap.h tqcontains functions that will help converting * 16, 32 and 64 bit length data between little-endian and * big-endian representations. * @@ -47,52 +47,52 @@ #ifdef HAVE_BYTESWAP_H #include <byteswap.h> - inline Q_UINT16 KSWAP_16( Q_UINT16 b ) { return bswap_16( b ); } - inline Q_INT16 KSWAP_16( Q_INT16 b ) { return bswap_16( (Q_UINT16)b ); } - inline Q_UINT32 KSWAP_32( Q_UINT32 b ) { return bswap_32( b ); } - inline Q_INT32 KSWAP_32( Q_INT32 b ) { return bswap_32( (Q_UINT32)b ); } - inline Q_UINT64 KSWAP_64( Q_UINT64 b ) { return bswap_64( b ); } - inline Q_INT64 KSWAP_64( Q_INT64 b ) { return bswap_64( (Q_UINT64)b ); } + inline TQ_UINT16 KSWAP_16( TQ_UINT16 b ) { return bswap_16( b ); } + inline TQ_INT16 KSWAP_16( TQ_INT16 b ) { return bswap_16( (TQ_UINT16)b ); } + inline TQ_UINT32 KSWAP_32( TQ_UINT32 b ) { return bswap_32( b ); } + inline TQ_INT32 KSWAP_32( TQ_INT32 b ) { return bswap_32( (TQ_UINT32)b ); } + inline TQ_UINT64 KSWAP_64( TQ_UINT64 b ) { return bswap_64( b ); } + inline TQ_INT64 KSWAP_64( TQ_INT64 b ) { return bswap_64( (TQ_UINT64)b ); } #else /* HAVE_BYTESWAP_H */ #ifdef WORDS_BIGENDIAN - inline Q_UINT16 KSWAP_16( Q_UINT16 b ) + inline TQ_UINT16 KSWAP_16( TQ_UINT16 b ) { return (((b) & 0x00ff) << 8 | ((b) & 0xff00) >> 8); } - inline Q_INT16 KSWAP_16( Q_INT16 b ) + inline TQ_INT16 KSWAP_16( TQ_INT16 b ) { - return ((((Q_UINT16)b) & 0x00ff) << 8 | (((Q_UINT16)b) & 0xff00) >> 8); + return ((((TQ_UINT16)b) & 0x00ff) << 8 | (((TQ_UINT16)b) & 0xff00) >> 8); } - inline Q_UINT32 KSWAP_32( Q_UINT32 b ) + inline TQ_UINT32 KSWAP_32( TQ_UINT32 b ) { return ((((b) & 0xff000000) >> 24) | (((b) & 0x00ff0000) >> 8) | \ (((b) & 0x0000ff00) << 8) | (((b) & 0x000000ff) << 24)); } - inline Q_INT32 KSWAP_32( Q_INT32 b ) + inline TQ_INT32 KSWAP_32( TQ_INT32 b ) { return - (((((Q_UINT32)b) & 0xff000000) >> 24) | ((((Q_UINT32)b) & 0x00ff0000) >> 8) | \ - ((((Q_UINT32)b) & 0x0000ff00) << 8) | ((((Q_UINT32)b) & 0x000000ff) << 24)); + (((((TQ_UINT32)b) & 0xff000000) >> 24) | ((((TQ_UINT32)b) & 0x00ff0000) >> 8) | \ + ((((TQ_UINT32)b) & 0x0000ff00) << 8) | ((((TQ_UINT32)b) & 0x000000ff) << 24)); } #else /* WORDS_BIGENDIAN */ #include <sys/types.h> #include <netinet/in.h> - inline Q_UINT16 KSWAP_16( Q_UINT16 b ) { return htons(b); } - inline Q_INT16 KSWAP_16( Q_INT16 b ) { return htons((Q_UINT16)b); } - inline Q_UINT32 KSWAP_32( Q_UINT32 b ) { return htonl(b); } - inline Q_INT32 KSWAP_32( Q_INT32 b ) { return htonl((Q_UINT32)b); } + inline TQ_UINT16 KSWAP_16( TQ_UINT16 b ) { return htons(b); } + inline TQ_INT16 KSWAP_16( TQ_INT16 b ) { return htons((TQ_UINT16)b); } + inline TQ_UINT32 KSWAP_32( TQ_UINT32 b ) { return htonl(b); } + inline TQ_INT32 KSWAP_32( TQ_INT32 b ) { return htonl((TQ_UINT32)b); } #endif - inline Q_UINT64 KSWAP_64( Q_UINT64 b ) + inline TQ_UINT64 KSWAP_64( TQ_UINT64 b ) { union { - Q_UINT64 ll; - Q_UINT32 l[2]; + TQ_UINT64 ll; + TQ_UINT32 l[2]; } w, r; w.ll = b; r.l[0] = KSWAP_32( w.l[1] ); @@ -100,13 +100,13 @@ return r.ll; } - inline Q_INT64 KSWAP_64( Q_INT64 b ) + inline TQ_INT64 KSWAP_64( TQ_INT64 b ) { union { - Q_UINT64 ll; - Q_UINT32 l[2]; + TQ_UINT64 ll; + TQ_UINT32 l[2]; } w, r; - w.ll = (Q_UINT64) b; + w.ll = (TQ_UINT64) b; r.l[0] = KSWAP_32( w.l[1] ); r.l[1] = KSWAP_32( w.l[0] ); return r.ll; @@ -117,7 +117,7 @@ * \ingroup KSWAP * Converts a 16 bit unsigned value from/to big-endian byte order to/from the machine order. */ -inline Q_UINT16 KFromToBigEndian( Q_UINT16 b ) +inline TQ_UINT16 KFromToBigEndian( TQ_UINT16 b ) { #ifdef WORDS_BIGENDIAN return b; @@ -130,7 +130,7 @@ inline Q_UINT16 KFromToBigEndian( Q_UINT16 b ) * \ingroup KSWAP * Converts a 16 bit unsigned array from/to big-endian byte order to/from the machine order. */ -inline void KFromToBigEndian( Q_UINT16 *out, Q_UINT16 *in, uint len ) +inline void KFromToBigEndian( TQ_UINT16 *out, TQ_UINT16 *in, uint len ) { #ifdef WORDS_BIGENDIAN if ( out != in ) memcpy( out, in, len<<1 ) ; @@ -143,7 +143,7 @@ inline void KFromToBigEndian( Q_UINT16 *out, Q_UINT16 *in, uint len ) * \ingroup KSWAP * Converts a 32 bit unsigned value from/to big-endian byte order to/from the machine order. */ -inline Q_UINT32 KFromToBigEndian( Q_UINT32 b ) +inline TQ_UINT32 KFromToBigEndian( TQ_UINT32 b ) { #ifdef WORDS_BIGENDIAN return b; @@ -156,7 +156,7 @@ inline Q_UINT32 KFromToBigEndian( Q_UINT32 b ) * \ingroup KSWAP * Converts a 32 bit unsigned array from/to big-endian byte order to/from the machine order. */ -inline void KFromToBigEndian( Q_UINT32 *out, Q_UINT32 *in, uint len ) +inline void KFromToBigEndian( TQ_UINT32 *out, TQ_UINT32 *in, uint len ) { #ifdef WORDS_BIGENDIAN if ( out != in ) memcpy( out, in, len<<2 ) ; @@ -169,7 +169,7 @@ inline void KFromToBigEndian( Q_UINT32 *out, Q_UINT32 *in, uint len ) * \ingroup KSWAP * Converts a 64 bit unsigned value from/to big-endian byte order to/from the machine order. */ -inline Q_UINT64 KFromToBigEndian( Q_UINT64 b ) +inline TQ_UINT64 KFromToBigEndian( TQ_UINT64 b ) { #ifdef WORDS_BIGENDIAN return b; @@ -182,7 +182,7 @@ inline Q_UINT64 KFromToBigEndian( Q_UINT64 b ) * \ingroup KSWAP * Converts a 64 bit unsigned array from/to big-endian byte order to/from the machine order. */ -inline void KFromToBigEndian( Q_UINT64 *out, Q_UINT64 *in, uint len ) +inline void KFromToBigEndian( TQ_UINT64 *out, TQ_UINT64 *in, uint len ) { #ifdef WORDS_BIGENDIAN if ( out != in ) memcpy( out, in, len<<3 ) ; @@ -195,7 +195,7 @@ inline void KFromToBigEndian( Q_UINT64 *out, Q_UINT64 *in, uint len ) * \ingroup KSWAP * Converts a 16 bit signed value from/to big-endian byte order to/from the machine order. */ -inline Q_INT16 KFromToBigEndian( Q_INT16 b ) +inline TQ_INT16 KFromToBigEndian( TQ_INT16 b ) { #ifdef WORDS_BIGENDIAN return b; @@ -208,7 +208,7 @@ inline Q_INT16 KFromToBigEndian( Q_INT16 b ) * \ingroup KSWAP * Converts a 16 bit signed array from/to big-endian byte order to/from the machine order. */ -inline void KFromToBigEndian( Q_INT16 *out, Q_INT16 *in, uint len ) +inline void KFromToBigEndian( TQ_INT16 *out, TQ_INT16 *in, uint len ) { #ifdef WORDS_BIGENDIAN if ( out != in ) memcpy( out, in, len<<1 ) ; @@ -221,7 +221,7 @@ inline void KFromToBigEndian( Q_INT16 *out, Q_INT16 *in, uint len ) * \ingroup KSWAP * Converts a 32 bit signed value from/to big-endian byte order to/from the machine order. */ -inline Q_INT32 KFromToBigEndian( Q_INT32 b ) +inline TQ_INT32 KFromToBigEndian( TQ_INT32 b ) { #ifdef WORDS_BIGENDIAN return b; @@ -234,7 +234,7 @@ inline Q_INT32 KFromToBigEndian( Q_INT32 b ) * \ingroup KSWAP * Converts a 32 bit signed array from/to big-endian byte order to/from the machine order. */ -inline void KFromToBigEndian( Q_INT32 *out, Q_INT32 *in, uint len ) +inline void KFromToBigEndian( TQ_INT32 *out, TQ_INT32 *in, uint len ) { #ifdef WORDS_BIGENDIAN if ( out != in ) memcpy( out, in, len<<2 ) ; @@ -247,7 +247,7 @@ inline void KFromToBigEndian( Q_INT32 *out, Q_INT32 *in, uint len ) * \ingroup KSWAP * Converts a 64 bit signed value from/to big-endian byte order to/from the machine order. */ -inline Q_INT64 KFromToBigEndian( Q_INT64 b ) +inline TQ_INT64 KFromToBigEndian( TQ_INT64 b ) { #ifdef WORDS_BIGENDIAN return b; @@ -260,7 +260,7 @@ inline Q_INT64 KFromToBigEndian( Q_INT64 b ) * \ingroup KSWAP * Converts a 64 bit signed array from/to big-endian byte order to/from the machine order. */ -inline void KFromToBigEndian( Q_INT64 *out, Q_INT64 *in, uint len ) +inline void KFromToBigEndian( TQ_INT64 *out, TQ_INT64 *in, uint len ) { #ifdef WORDS_BIGENDIAN if ( out != in ) memcpy( out, in, len<<3 ) ; @@ -273,7 +273,7 @@ inline void KFromToBigEndian( Q_INT64 *out, Q_INT64 *in, uint len ) * \ingroup KSWAP * Converts a 16 bit unsigned value from/to little-endian byte order to/from the machine order. */ -inline Q_UINT16 KFromToLittleEndian( Q_UINT16 b ) +inline TQ_UINT16 KFromToLittleEndian( TQ_UINT16 b ) { #ifndef WORDS_BIGENDIAN return b; @@ -286,7 +286,7 @@ inline Q_UINT16 KFromToLittleEndian( Q_UINT16 b ) * \ingroup KSWAP * Converts a 16 bit unsigned array from/to little-endian byte order to/from the machine order. */ -inline void KFromToLittleEndian( Q_UINT16 *out, Q_UINT16 *in, uint len ) +inline void KFromToLittleEndian( TQ_UINT16 *out, TQ_UINT16 *in, uint len ) { #ifndef WORDS_BIGENDIAN if ( out != in ) memcpy( out, in, len<<1 ) ; @@ -299,7 +299,7 @@ inline void KFromToLittleEndian( Q_UINT16 *out, Q_UINT16 *in, uint len ) * \ingroup KSWAP * Converts a 32 bit unsigned value from/to little-endian byte order to/from the machine order. */ -inline Q_UINT32 KFromToLittleEndian( Q_UINT32 b ) +inline TQ_UINT32 KFromToLittleEndian( TQ_UINT32 b ) { #ifndef WORDS_BIGENDIAN return b; @@ -312,7 +312,7 @@ inline Q_UINT32 KFromToLittleEndian( Q_UINT32 b ) * \ingroup KSWAP * Converts a 32 bit unsigned array from/to little-endian byte order to/from the machine order. */ -inline void KFromToLittleEndian( Q_UINT32 *out, Q_UINT32 *in, uint len ) +inline void KFromToLittleEndian( TQ_UINT32 *out, TQ_UINT32 *in, uint len ) { #ifndef WORDS_BIGENDIAN if ( out != in ) memcpy( out, in, len<<2 ) ; @@ -325,7 +325,7 @@ inline void KFromToLittleEndian( Q_UINT32 *out, Q_UINT32 *in, uint len ) * \ingroup KSWAP * Converts a 64 bit unsigned value from/to little-endian byte order to/from the machine order. */ -inline Q_UINT64 KFromToLittleEndian( Q_UINT64 b ) +inline TQ_UINT64 KFromToLittleEndian( TQ_UINT64 b ) { #ifndef WORDS_BIGENDIAN return b; @@ -338,7 +338,7 @@ inline Q_UINT64 KFromToLittleEndian( Q_UINT64 b ) * \ingroup KSWAP * Converts a 64 bit unsigned array from/to little-endian byte order to/from the machine order. */ -inline void KFromToLittleEndian( Q_UINT64 *out, Q_UINT64 *in, uint len ) +inline void KFromToLittleEndian( TQ_UINT64 *out, TQ_UINT64 *in, uint len ) { #ifndef WORDS_BIGENDIAN if ( out != in ) memcpy( out, in, len<<3 ) ; @@ -351,7 +351,7 @@ inline void KFromToLittleEndian( Q_UINT64 *out, Q_UINT64 *in, uint len ) * \ingroup KSWAP * Converts a 16 bit signed value from/to little-endian byte order to/from the machine order. */ -inline Q_INT16 KFromToLittleEndian( Q_INT16 b ) +inline TQ_INT16 KFromToLittleEndian( TQ_INT16 b ) { #ifndef WORDS_BIGENDIAN return b; @@ -364,7 +364,7 @@ inline Q_INT16 KFromToLittleEndian( Q_INT16 b ) * \ingroup KSWAP * Converts a 16 bit signed array from/to little-endian byte order to/from the machine order. */ -inline void KFromToLittleEndian( Q_INT16 *out, Q_INT16 *in, uint len ) +inline void KFromToLittleEndian( TQ_INT16 *out, TQ_INT16 *in, uint len ) { #ifndef WORDS_BIGENDIAN if ( out != in ) memcpy( out, in, len<<1 ) ; @@ -377,7 +377,7 @@ inline void KFromToLittleEndian( Q_INT16 *out, Q_INT16 *in, uint len ) * \ingroup KSWAP * Converts a 32 bit signed value from/to little-endian byte order to/from the machine order. */ -inline Q_INT32 KFromToLittleEndian( Q_INT32 b ) +inline TQ_INT32 KFromToLittleEndian( TQ_INT32 b ) { #ifndef WORDS_BIGENDIAN return b; @@ -390,7 +390,7 @@ inline Q_INT32 KFromToLittleEndian( Q_INT32 b ) * \ingroup KSWAP * Converts a 32 bit signed array from/to little-endian byte order to/from the machine order. */ -inline void KFromToLittleEndian( Q_INT32 *out, Q_INT32 *in, uint len ) +inline void KFromToLittleEndian( TQ_INT32 *out, TQ_INT32 *in, uint len ) { #ifndef WORDS_BIGENDIAN if ( out != in ) memcpy( out, in, len<<2 ) ; @@ -403,7 +403,7 @@ inline void KFromToLittleEndian( Q_INT32 *out, Q_INT32 *in, uint len ) * \ingroup KSWAP * Converts a 64 bit signed value from/to little-endian byte order to/from the machine order. */ -inline Q_INT64 KFromToLittleEndian( Q_INT64 b ) +inline TQ_INT64 KFromToLittleEndian( TQ_INT64 b ) { #ifndef WORDS_BIGENDIAN return b; @@ -416,7 +416,7 @@ inline Q_INT64 KFromToLittleEndian( Q_INT64 b ) * \ingroup KSWAP * Converts a 64 bit signed array from/to little-endian byte order to/from the machine order. */ -inline void KFromToLittleEndian( Q_INT64 *out, Q_INT64 *in, uint len ) +inline void KFromToLittleEndian( TQ_INT64 *out, TQ_INT64 *in, uint len ) { #ifndef WORDS_BIGENDIAN if ( out != in ) memcpy( out, in, len<<3 ) ; |