mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Fixing mingw bustage.
This commit is contained in:
parent
ddba83b841
commit
b4fbe0ee60
@ -887,41 +887,23 @@ nsGlobalHistory::GetRowValue(nsIMdbRow *aRow, mdb_column aCol,
|
|||||||
|
|
||||||
// Copy an array of 16-bit values, reversing the byte order.
|
// Copy an array of 16-bit values, reversing the byte order.
|
||||||
void
|
void
|
||||||
nsGlobalHistory::SwapBytes(const PRUint16 *source, PRUint16 *dest, int len)
|
nsGlobalHistory::SwapBytes(const PRUnichar *source, PRUnichar *dest,
|
||||||
|
PRInt32 aLen)
|
||||||
{
|
{
|
||||||
PRUint16 c;
|
PRUint16 c;
|
||||||
const PRUint16 *inp;
|
const PRUint16 *inp;
|
||||||
PRUint16 *outp;
|
PRUint16 *outp;
|
||||||
int i;
|
PRInt32 i;
|
||||||
|
|
||||||
inp = source;
|
inp = source;
|
||||||
outp = dest;
|
outp = dest;
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < aLen; i++) {
|
||||||
c = *inp++;
|
c = *inp++;
|
||||||
*outp++ = (((c >> 8) & 0xff) | (c << 8));
|
*outp++ = (((c >> 8) & 0xff) | (c << 8));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy an array of 32-bit values, reversing the byte order.
|
|
||||||
void
|
|
||||||
nsGlobalHistory::SwapBytes(const PRUint32 *source, PRUint32 *dest, int len)
|
|
||||||
{
|
|
||||||
PRUint32 c;
|
|
||||||
const PRUint32 *inp;
|
|
||||||
PRUint32 *outp;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
inp = source;
|
|
||||||
outp = dest;
|
|
||||||
for (i = 0; i < len; i++) {
|
|
||||||
c = *inp++;
|
|
||||||
*outp++ = (((c >> 24) & 0xff) | ((c >> 8) & 0xff00) |
|
|
||||||
((c << 8) & 0xff0000) | (c << 24));
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsGlobalHistory::GetRowValue(nsIMdbRow *aRow, mdb_column aCol,
|
nsGlobalHistory::GetRowValue(nsIMdbRow *aRow, mdb_column aCol,
|
||||||
PRInt64 *aResult)
|
PRInt64 *aResult)
|
||||||
|
@ -330,8 +330,7 @@ protected:
|
|||||||
nsresult SaveByteOrder(const char *aByteOrder);
|
nsresult SaveByteOrder(const char *aByteOrder);
|
||||||
nsresult GetByteOrder(char **_retval);
|
nsresult GetByteOrder(char **_retval);
|
||||||
nsresult InitByteOrder(PRBool aForce);
|
nsresult InitByteOrder(PRBool aForce);
|
||||||
void SwapBytes(const PRUint16 *source, PRUint16 *dest, int len);
|
void SwapBytes(const PRUnichar *source, PRUnichar *dest, PRInt32 aLen);
|
||||||
void SwapBytes(const PRUint32 *source, PRUint32 *dest, int len);
|
|
||||||
PRBool mReverseByteOrder;
|
PRBool mReverseByteOrder;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user