Update of /cvsroot/libwpd/libwpd2/src/lib In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5908/src/lib Modified Files: WP1PictureGroup.cpp WP3ResourceFork.cpp WP5GraphicsInformationPacket.h WP6ExtendedDocumentSummaryPacket.cpp WPXBinaryData.cpp WPXBinaryData.h WPXEncryption.cpp WPXEncryption.h WPXMemoryStream.cpp WPXMemoryStream.h WPXPropertyListVector.cpp WPXPropertyListVector.h WPXStream.h WPXStreamImplementation.cpp WPXStreamImplementation.h WPXTable.h libwpd-0.9.def libwpd-stream-0.9.def libwpd.h.in libwpd_internal.cpp Log Message: replacing size_t with unsigned long, so that the names are mangled the same way on x86 and x86_64 + update the def files Index: WPXTable.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXTable.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- WPXTable.h 8 Dec 2007 11:17:48 -0000 1.19 +++ WPXTable.h 10 Dec 2008 23:45:49 -0000 1.20 @@ -76,7 +76,7 @@ WPXTableList & operator=(const WPXTableList & tableList); virtual ~WPXTableList(); - WPXTable * operator[](size_t i) { return (*m_tableList)[i]; } + WPXTable * operator[](unsigned long i) { return (*m_tableList)[i]; } void add(WPXTable *table) { m_tableList->push_back(table); } private: Index: libwpd.h.in =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd.h.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- libwpd.h.in 27 Jul 2008 20:38:50 -0000 1.2 +++ libwpd.h.in 10 Dec 2008 23:45:49 -0000 1.3 @@ -33,6 +33,5 @@ #include "WPXDocumentInterface.h" #include "WPDocument.h" -#include "WPXBinaryData.h" #endif /* LIBWPD_H */ Index: WP5GraphicsInformationPacket.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP5GraphicsInformationPacket.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- WP5GraphicsInformationPacket.h 13 Oct 2008 15:38:29 -0000 1.6 +++ WP5GraphicsInformationPacket.h 10 Dec 2008 23:45:49 -0000 1.7 @@ -37,7 +37,7 @@ ~WP5GraphicsInformationPacket(); void _readContents(WPXInputStream *input, WPXEncryption *encryption, uint32_t dataSize); const std::vector<WPXBinaryData *> &getImages() const { return m_images; } - const WPXBinaryData *getImage( size_t imageIndex ) const { if (imageIndex < m_images.size()) return m_images[imageIndex]; return NULL; } + const WPXBinaryData *getImage( unsigned long imageIndex ) const { if (imageIndex < m_images.size()) return m_images[imageIndex]; return NULL; } private: std::vector<WPXBinaryData *> m_images; Index: WP6ExtendedDocumentSummaryPacket.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP6ExtendedDocumentSummaryPacket.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- WP6ExtendedDocumentSummaryPacket.cpp 22 Nov 2007 12:20:40 -0000 1.38 +++ WP6ExtendedDocumentSummaryPacket.cpp 10 Dec 2008 23:45:49 -0000 1.39 @@ -57,7 +57,7 @@ for(unsigned i=0; i<(unsigned)m_dataSize; i++) m_streamData[i] = readU8(input, encryption); - m_stream = new WPXMemoryInputStream(m_streamData, (size_t)m_dataSize); + m_stream = new WPXMemoryInputStream(m_streamData, (unsigned long)m_dataSize); } void WP6ExtendedDocumentSummaryPacket::parse(WP6Listener *listener) const Index: WP3ResourceFork.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP3ResourceFork.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- WP3ResourceFork.cpp 19 Nov 2008 13:15:34 -0000 1.9 +++ WP3ResourceFork.cpp 10 Dec 2008 23:45:49 -0000 1.10 @@ -76,7 +76,7 @@ input->seek(offsetToData, WPX_SEEK_SET); uint32_t resourceDataSize = readU32(input, encryption, true); - size_t oldEncryptionOffset = 0; + unsigned long oldEncryptionOffset = 0; unsigned char oldEncryptionMaskBase = 0; if (encryption) { @@ -91,7 +91,7 @@ } WPXBinaryData resourceData; - for (size_t k = 0; k < (size_t)resourceDataSize && !input->atEOS(); k++) + for (unsigned long k = 0; k < (unsigned long)resourceDataSize && !input->atEOS(); k++) resourceData.append((unsigned char)readU8(input, encryption)); if (encryption) Index: WPXEncryption.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXEncryption.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- WPXEncryption.h 22 Oct 2008 12:17:51 -0000 1.3 +++ WPXEncryption.h 10 Dec 2008 23:45:49 -0000 1.4 @@ -28,21 +28,20 @@ #include "libwpd_types.h" #include "WPXString.h" -#include <stdio.h> class WPXInputStream; class WPXEncryption { public: - WPXEncryption(const char *password, const size_t encryptionStartOffset = 0); + WPXEncryption(const char *password, const unsigned long encryptionStartOffset = 0); ~WPXEncryption(); - const unsigned char *readAndDecrypt(WPXInputStream *input, size_t numBytes, size_t &numBytesRead); + const unsigned char *readAndDecrypt(WPXInputStream *input, unsigned long numBytes, unsigned long &numBytesRead); uint16_t getCheckSum() const; - void setEncryptionStartOffset(size_t encryptionStartOffset) { m_encryptionStartOffset = encryptionStartOffset; } - size_t getEncryptionStartOffset() const { return m_encryptionStartOffset; } + void setEncryptionStartOffset(unsigned long encryptionStartOffset) { m_encryptionStartOffset = encryptionStartOffset; } + unsigned long getEncryptionStartOffset() const { return m_encryptionStartOffset; } void setEncryptionMaskBase(unsigned char encryptionMaskBase) { m_encryptionMaskBase = encryptionMaskBase; } unsigned char getEncryptionMaskBase() const { return m_encryptionMaskBase; } @@ -52,7 +51,7 @@ private: unsigned char *m_buffer; WPXString m_password; - size_t m_encryptionStartOffset; + unsigned long m_encryptionStartOffset; unsigned char m_encryptionMaskBase; }; Index: WPXMemoryStream.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXMemoryStream.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- WPXMemoryStream.cpp 22 Nov 2007 12:20:52 -0000 1.14 +++ WPXMemoryStream.cpp 10 Dec 2008 23:45:49 -0000 1.15 @@ -27,7 +27,7 @@ #include "libwpd_internal.h" -WPXMemoryInputStream::WPXMemoryInputStream(unsigned char *data, size_t size) : +WPXMemoryInputStream::WPXMemoryInputStream(unsigned char *data, unsigned long size) : WPXInputStream(), m_offset(0), m_size(size), @@ -39,7 +39,7 @@ { } -const unsigned char * WPXMemoryInputStream::read(size_t numBytes, size_t &numBytesRead) +const unsigned char * WPXMemoryInputStream::read(unsigned long numBytes, unsigned long &numBytesRead) { numBytesRead = 0; Index: WPXPropertyListVector.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXPropertyListVector.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- WPXPropertyListVector.cpp 6 Dec 2008 17:02:25 -0000 1.12 +++ WPXPropertyListVector.cpp 10 Dec 2008 23:45:49 -0000 1.13 @@ -35,9 +35,9 @@ WPXPropertyListVectorImpl(const std::vector<WPXPropertyList> &_vector) : m_vector(_vector) {} WPXPropertyListVectorImpl() : m_vector() {} void append(const WPXPropertyList &elem) { m_vector.push_back(elem); } - size_t count() const { return m_vector.size(); } + unsigned long count() const { return m_vector.size(); } std::vector<WPXPropertyList> m_vector; - const WPXPropertyList &operator[](size_t index) const { return m_vector[index];} + const WPXPropertyList &operator[](unsigned long index) const { return m_vector[index];} }; class WPXPropertyListVectorIterImpl @@ -103,12 +103,12 @@ m_impl->append(i()); } -size_t WPXPropertyListVector::count() const +unsigned long WPXPropertyListVector::count() const { return m_impl->count(); } -const WPXPropertyList& WPXPropertyListVector::operator[](size_t index) const +const WPXPropertyList& WPXPropertyListVector::operator[](unsigned long index) const { return m_impl->operator[](index); } Index: WP1PictureGroup.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WP1PictureGroup.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- WP1PictureGroup.cpp 19 Nov 2008 13:15:34 -0000 1.2 +++ WP1PictureGroup.cpp 10 Dec 2008 23:45:49 -0000 1.3 @@ -58,7 +58,7 @@ input->seek(-2, WPX_SEEK_CUR); for (int i = 0; i < 512; i++) m_binaryData.append((unsigned char)0); - for (size_t j = 0; j < dataSize && !input->atEOS(); j++ ); + for (unsigned long j = 0; j < dataSize && !input->atEOS(); j++ ); m_binaryData.append(readU8(input, encryption)); #if DUMP_PICTURE std::ostringstream filename; Index: WPXPropertyListVector.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXPropertyListVector.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- WPXPropertyListVector.h 6 Dec 2008 17:02:25 -0000 1.11 +++ WPXPropertyListVector.h 10 Dec 2008 23:45:49 -0000 1.12 @@ -26,7 +26,6 @@ #ifndef WPXPROPERTYLISTVECTOR_H #define WPXPROPERTYLISTVECTOR_H -#include <sys/types.h> #include "WPXPropertyList.h" @@ -41,8 +40,8 @@ virtual ~WPXPropertyListVector(); void append(const WPXPropertyList &elem); void append(const WPXPropertyListVector &vec); - size_t count() const; - const WPXPropertyList& operator[](size_t index) const; + unsigned long count() const; + const WPXPropertyList& operator[](unsigned long index) const; WPXPropertyListVector& operator=(const WPXPropertyListVector& vect); class Iter Index: libwpd-stream-0.9.def =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd-stream-0.9.def,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- libwpd-stream-0.9.def 18 Nov 2008 02:25:49 -0000 1.1 +++ libwpd-stream-0.9.def 10 Dec 2008 23:45:49 -0000 1.2 @@ -1,6 +1,6 @@ _ZN13WPXFileStream11isOLEStreamEv _ZN13WPXFileStream20getDocumentOLEStreamEPKc -_ZN13WPXFileStream4readEjRj +_ZN13WPXFileStream4readEmRm _ZN13WPXFileStream4seekEl13WPX_SEEK_TYPE _ZN13WPXFileStream4tellEv _ZN13WPXFileStream5atEOSEv @@ -11,7 +11,7 @@ _ZN13WPXFileStreamD2Ev _ZN15WPXStringStream11isOLEStreamEv _ZN15WPXStringStream20getDocumentOLEStreamEPKc -_ZN15WPXStringStream4readEjRj +_ZN15WPXStringStream4readEmRm _ZN15WPXStringStream4seekEl13WPX_SEEK_TYPE _ZN15WPXStringStream4tellEv _ZN15WPXStringStream5atEOSEv Index: WPXEncryption.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXEncryption.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- WPXEncryption.cpp 22 Oct 2008 12:17:51 -0000 1.3 +++ WPXEncryption.cpp 10 Dec 2008 23:45:49 -0000 1.4 @@ -28,7 +28,7 @@ #include "libwpd_internal.h" #include <string.h> -WPXEncryption::WPXEncryption(const char *password, const size_t encryptionStartOffset) : +WPXEncryption::WPXEncryption(const char *password, const unsigned long encryptionStartOffset) : m_buffer(NULL), m_password(), m_encryptionStartOffset(encryptionStartOffset), @@ -36,7 +36,7 @@ { if (password) { - for (size_t i = 0; i < strlen(password); i++) + for (unsigned long i = 0; i < strlen(password); i++) if (password[i] >= 'a' && password[i] <= 'z') m_password.append(password[i] - 'a' + 'A'); else @@ -64,25 +64,25 @@ return checkSum; } -const unsigned char * WPXEncryption::readAndDecrypt(WPXInputStream *input, size_t numBytes, size_t &numBytesRead) +const unsigned char * WPXEncryption::readAndDecrypt(WPXInputStream *input, unsigned long numBytes, unsigned long &numBytesRead) { if ((m_password.len() <= 0) || (m_encryptionStartOffset > input->tell() + numBytes)) return input->read(numBytes, numBytesRead); - size_t readStartPosition = input->tell(); - if (readStartPosition == (size_t)-1) + unsigned long readStartPosition = input->tell(); + if (readStartPosition == (unsigned long)-1) return 0; const unsigned char *encryptedBuffer = input->read(numBytes, numBytesRead); if (m_buffer) delete [] m_buffer; m_buffer = new unsigned char[numBytesRead]; - for (size_t i=0; i<numBytesRead; i++) + for (unsigned long i=0; i<numBytesRead; i++) { if (readStartPosition + i < m_encryptionStartOffset) m_buffer[i] = encryptedBuffer[i]; else { - size_t passwordOffset = (readStartPosition + i - m_encryptionStartOffset) % m_password.len(); + unsigned long passwordOffset = (readStartPosition + i - m_encryptionStartOffset) % m_password.len(); unsigned char encryptionMask = (unsigned char)(m_encryptionMaskBase + readStartPosition + i - m_encryptionStartOffset); m_buffer[i] = encryptedBuffer[i] ^ ( m_password.cstr()[passwordOffset] ^ encryptionMask); } Index: libwpd-0.9.def =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd-0.9.def,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- libwpd-0.9.def 25 Nov 2008 11:53:48 -0000 1.3 +++ libwpd-0.9.def 10 Dec 2008 23:45:49 -0000 1.4 @@ -5,13 +5,13 @@ _ZN11WPXPropertyD2Ev _ZN13WPXBinaryData5clearEv _ZN13WPXBinaryData6appendEh -_ZN13WPXBinaryData6appendEPKhj +_ZN13WPXBinaryData6appendEPKhm _ZN13WPXBinaryData6appendERKS_ _ZN13WPXBinaryDataaSERKS_ -_ZN13WPXBinaryDataC1EPKhj +_ZN13WPXBinaryDataC1EPKhm _ZN13WPXBinaryDataC1ERKS_ _ZN13WPXBinaryDataC1Ev -_ZN13WPXBinaryDataC2EPKhj +_ZN13WPXBinaryDataC2EPKhm _ZN13WPXBinaryDataC2ERKS_ _ZN13WPXBinaryDataC2Ev _ZN13WPXBinaryDataD1Ev @@ -27,7 +27,7 @@ _ZN15WPXPropertyList4IterD2Ev _ZN15WPXPropertyList5clearEv _ZN15WPXPropertyList6insertEPKcb -_ZN15WPXPropertyList6insertEPKcf7WPXUnit +_ZN15WPXPropertyList6insertEPKcd7WPXUnit _ZN15WPXPropertyList6insertEPKci _ZN15WPXPropertyList6insertEPKcP11WPXProperty _ZN15WPXPropertyList6insertEPKcRK9WPXString @@ -43,12 +43,12 @@ _ZN15WPXPropertyListD2Ev _ZN18WPXPropertyFactory10newIntPropEi _ZN18WPXPropertyFactory11newBoolPropEb -_ZN18WPXPropertyFactory11newInchPropEf -_ZN18WPXPropertyFactory11newTwipPropEf -_ZN18WPXPropertyFactory12newPointPropEf +_ZN18WPXPropertyFactory11newInchPropEd +_ZN18WPXPropertyFactory11newTwipPropEd +_ZN18WPXPropertyFactory12newPointPropEd _ZN18WPXPropertyFactory13newStringPropEPKc _ZN18WPXPropertyFactory13newStringPropERK9WPXString -_ZN18WPXPropertyFactory14newPercentPropEf +_ZN18WPXPropertyFactory14newPercentPropEd _ZN21WPXPropertyListVector4Iter4lastEv _ZN21WPXPropertyListVector4Iter4nextEv _ZN21WPXPropertyListVector4Iter6rewindEv @@ -59,6 +59,7 @@ _ZN21WPXPropertyListVector4IterD2Ev _ZN21WPXPropertyListVector6appendERK15WPXPropertyList _ZN21WPXPropertyListVector6appendERKS_ +_ZN21WPXPropertyListVectoraSERKS_ _ZN21WPXPropertyListVectorC1ERKS_ _ZN21WPXPropertyListVectorC1Ev _ZN21WPXPropertyListVectorC2ERKS_ @@ -91,8 +92,6 @@ _ZN9WPXStringC2Ev _ZN9WPXStringD1Ev _ZN9WPXStringD2Ev -_ZN9WPXStringeqEPKc -_ZN9WPXStringeqERKS_ _ZNK13WPXBinaryData13getBase64DataEv _ZNK13WPXBinaryData13getDataBufferEv _ZNK13WPXBinaryData13getDataStreamEv @@ -101,10 +100,12 @@ _ZNK15WPXPropertyListixEPKc _ZNK21WPXPropertyListVector4IterclEv _ZNK21WPXPropertyListVector5countEv -_ZNK21WPXPropertyListVectorixEj +_ZNK21WPXPropertyListVectorixEm _ZNK9WPXString3lenEv _ZNK9WPXString4cstrEv _ZNK9WPXString4IterclEv +_ZNK9WPXStringeqEPKc +_ZNK9WPXStringeqERKS_ _ZTI15WPXPropertyList _ZTI21WPXPropertyListVector _ZTIN15WPXPropertyList4IterE Index: WPXStream.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXStream.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- WPXStream.h 22 Nov 2007 12:20:52 -0000 1.13 +++ WPXStream.h 10 Dec 2008 23:45:49 -0000 1.14 @@ -24,7 +24,6 @@ #ifndef WPXSTREAM_H #define WPXSTREAM_H -#include <stdio.h> enum WPX_SEEK_TYPE { @@ -59,7 +58,7 @@ \return Should be a pointer to an array of numBytesRead bytes (unsigned char[numBytesRead]). \return Optionally it could be 0 if the desired number of bytes could not be read. */ - virtual const unsigned char *read(size_t numBytes, size_t &numBytesRead) = 0; + virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) = 0; /** Moves to the next location inside the input stream. \param offset The offset of the location inside the input stream to move to. Index: WPXStreamImplementation.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXStreamImplementation.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- WPXStreamImplementation.cpp 18 Nov 2008 02:25:49 -0000 1.17 +++ WPXStreamImplementation.cpp 10 Dec 2008 23:45:49 -0000 1.18 @@ -115,7 +115,7 @@ #define BUFFER_MAX 65536 -const unsigned char *WPXFileStream::read(size_t numBytes, size_t &numBytesRead) +const unsigned char *WPXFileStream::read(unsigned long numBytes, unsigned long &numBytesRead) { numBytesRead = 0; @@ -309,7 +309,7 @@ delete d; } -const unsigned char *WPXStringStream::read(size_t numBytes, size_t &numBytesRead) +const unsigned char *WPXStringStream::read(unsigned long numBytes, unsigned long &numBytesRead) { numBytesRead = 0; Index: WPXBinaryData.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXBinaryData.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- WPXBinaryData.cpp 19 Nov 2008 13:15:34 -0000 1.10 +++ WPXBinaryData.cpp 10 Dec 2008 23:45:49 -0000 1.11 @@ -56,27 +56,27 @@ m_binaryDataImpl->m_buf = data.m_binaryDataImpl->m_buf; } -WPXBinaryData::WPXBinaryData(const unsigned char *buffer, const size_t bufferSize) : +WPXBinaryData::WPXBinaryData(const unsigned char *buffer, const unsigned long bufferSize) : m_binaryDataImpl(new WPXBinaryDataImpl) { m_binaryDataImpl->m_buf = std::vector<unsigned char> (bufferSize); - for (size_t i = 0; i < bufferSize; i++) + for (unsigned long i = 0; i < bufferSize; i++) m_binaryDataImpl->m_buf[i] = buffer[i]; } void WPXBinaryData::append(const WPXBinaryData &data) { - size_t previousSize = m_binaryDataImpl->m_buf.size(); + unsigned long previousSize = m_binaryDataImpl->m_buf.size(); m_binaryDataImpl->m_buf.reserve(previousSize + data.m_binaryDataImpl->m_buf.size()); - for (size_t i = 0; i < data.m_binaryDataImpl->m_buf.size(); i++) + for (unsigned long i = 0; i < data.m_binaryDataImpl->m_buf.size(); i++) m_binaryDataImpl->m_buf.push_back(data.m_binaryDataImpl->m_buf[i]); } -void WPXBinaryData::append(const unsigned char *buffer, const size_t bufferSize ) +void WPXBinaryData::append(const unsigned char *buffer, const unsigned long bufferSize ) { - size_t previousSize = m_binaryDataImpl->m_buf.size(); + unsigned long previousSize = m_binaryDataImpl->m_buf.size(); m_binaryDataImpl->m_buf.reserve(previousSize + bufferSize); - for (size_t i = 0; i < bufferSize; i++) + for (unsigned long i = 0; i < bufferSize; i++) m_binaryDataImpl->m_buf.push_back(buffer[i]); } @@ -90,9 +90,9 @@ m_binaryDataImpl->m_buf = std::vector<unsigned char>(); } -size_t WPXBinaryData::size() const +unsigned long WPXBinaryData::size() const { - return (size_t)m_binaryDataImpl->m_buf.size(); + return (unsigned long)m_binaryDataImpl->m_buf.size(); } WPXBinaryData& WPXBinaryData::operator=(const WPXBinaryData &dataBuf) Index: libwpd_internal.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/libwpd_internal.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- libwpd_internal.cpp 3 Dec 2008 13:40:34 -0000 1.43 +++ libwpd_internal.cpp 10 Dec 2008 23:45:49 -0000 1.44 @@ -30,7 +30,7 @@ uint8_t readU8(WPXInputStream *input, WPXEncryption *encryption) { - size_t numBytesRead; + unsigned long numBytesRead; uint8_t const * p = (encryption ? encryption->readAndDecrypt(input, sizeof(uint8_t), numBytesRead) : input->read(sizeof(uint8_t), numBytesRead)); @@ -43,7 +43,7 @@ uint16_t readU16(WPXInputStream *input, WPXEncryption *encryption, bool bigendian) { - size_t numBytesRead; + unsigned long numBytesRead; uint16_t const *val = (uint16_t const *)(encryption ? encryption->readAndDecrypt(input, sizeof(uint16_t), numBytesRead) : input->read(sizeof(uint16_t), numBytesRead)); @@ -58,7 +58,7 @@ uint32_t readU32(WPXInputStream *input, WPXEncryption *encryption, bool bigendian) { - size_t numBytesRead; + unsigned long numBytesRead; uint32_t const *val = (uint32_t const *)(encryption ? encryption->readAndDecrypt(input, sizeof(uint32_t), numBytesRead) : input->read(sizeof(uint32_t), numBytesRead)); Index: WPXBinaryData.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXBinaryData.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- WPXBinaryData.h 19 Nov 2008 13:15:34 -0000 1.6 +++ WPXBinaryData.h 10 Dec 2008 23:45:49 -0000 1.7 @@ -26,7 +26,6 @@ #define WPXBINARYDATA_H #include "WPXString.h" -#include <stdio.h> class WPXInputStream; class WPXBinaryDataImpl; @@ -36,15 +35,15 @@ public: WPXBinaryData(); WPXBinaryData(const WPXBinaryData &); - WPXBinaryData(const unsigned char *buffer, const size_t bufferSize); + WPXBinaryData(const unsigned char *buffer, const unsigned long bufferSize); ~WPXBinaryData(); void append(const WPXBinaryData &data); - void append(const unsigned char *buffer, const size_t bufferSize); + void append(const unsigned char *buffer, const unsigned long bufferSize); void append(const unsigned char c); void clear(); - size_t size() const; + unsigned long size() const; const unsigned char *getDataBuffer() const; const WPXString getBase64Data() const; const WPXInputStream *getDataStream() const; Index: WPXMemoryStream.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXMemoryStream.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- WPXMemoryStream.h 7 Nov 2008 17:24:23 -0000 1.12 +++ WPXMemoryStream.h 10 Dec 2008 23:45:49 -0000 1.13 @@ -29,21 +29,21 @@ class WPXMemoryInputStream : public WPXInputStream { public: - WPXMemoryInputStream(unsigned char *data, size_t size); + WPXMemoryInputStream(unsigned char *data, unsigned long size); virtual ~WPXMemoryInputStream(); virtual bool isOLEStream() { return false; } virtual WPXInputStream * getDocumentOLEStream(const char*) { return 0; } - virtual const unsigned char *read(size_t numBytes, size_t &numBytesRead); + virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); virtual int seek(long offset, WPX_SEEK_TYPE seekType); virtual long tell(); virtual bool atEOS(); - virtual size_t getSize() const { return m_size; }; + virtual unsigned long getSize() const { return m_size; }; private: long m_offset; - size_t m_size; + unsigned long m_size; unsigned char *m_data; WPXMemoryInputStream(const WPXMemoryInputStream&); WPXMemoryInputStream& operator=(const WPXMemoryInputStream&); Index: WPXStreamImplementation.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXStreamImplementation.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- WPXStreamImplementation.h 7 Nov 2008 17:24:23 -0000 1.5 +++ WPXStreamImplementation.h 10 Dec 2008 23:45:49 -0000 1.6 @@ -32,7 +32,7 @@ explicit WPXFileStream(const char* filename); ~WPXFileStream(); - const unsigned char *read(size_t numBytes, size_t &numBytesRead); + const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); long tell(); int seek(long offset, WPX_SEEK_TYPE seekType); bool atEOS(); @@ -54,7 +54,7 @@ WPXStringStream(const unsigned char *data, const unsigned int dataSize); ~WPXStringStream(); - const unsigned char *read(size_t numBytes, size_t &numBytesRead); + const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); long tell(); int seek(long offset, WPX_SEEK_TYPE seekType); bool atEOS(); |