Fridrich, Just downloaded the fs_experimental branch, built it on Linux without modification as a test and ran wpd2text against two of the four files I was using before - worked fine.
Also quickly hacked together an MS VC version of the lib and wpd2text and it also works fine. Minimal changes: just added the new files to the VC project, and created a simple CLR wpd2text app. I'll do some more thorough checks with all of the conv utilities. I'll play with the MS VC version to see if I can create a common source file that will build on both MS VC and Linux. Did it as a CLR, and just ifdef'ing out the stdafx.h doesn't work. regards - David At 06:14 am 10/04/2007, David Hislop wrote: >Fridrich, > >OK, I'll look up the pragma again. >I'll be off the air for a while, should get back to it in a week or so. > >David > >At 01:03 am 09/04/2007, Fridrich Strba wrote: >>-----BEGIN PGP SIGNED MESSAGE----- >>Hash: SHA1 >> >>Hello, >> >>David Hislop wrote: >> >> It is possible that the msvc iostream implementation has some differences >> > So obviously there is something different in MSVC iostream. I think it's >> > in basic_istream (and so probably basic_ostream as well). It seems that >> > the d->buffer << d->file.rdbuf() in WPSFileStream::isOLEStream() resets >> > the buffer counts to make the buffer empty. Actually, that probably >> > makes sense (I can't believe I said that about an MS-Anything :-) ). >> > Anyway, their implementation seems to differ from the one at >> > www.cplusplus.com <http://www.cplusplus.com/> , for example. >> >>Yeah :-) It has to be my fault because I had problems with resetting the >>failbit eofbit and badbit on some systems, I replaced the read with >>readsome. Now, I read the www.cplusplus.com again and I realize that >>this is what they write: >>"Reads a block of data of up to n characters and stores it in the array >>pointed by s, but unlike member function read, readsome stops reading if >>the memory buffer associated with the stream runs out of characters, >>even if the End-Of-File has not yet been reached." >>So, I replaced it again with a checked read and it should be working >>now. In the fs_experimental branch I want to say. >> >> > Yes. I'm currently using the code below just directly in what would be >> > WPXStreamImplementation.cpp, but if you choose to use something similar, >> > it could perhaps be better in libwpd_internal.h. >> > #if (defined(_MSC_VER) && (_MSC_VER >= 1400)) // 1400 for Visual >> > Studio 2005 >> > // From Visual Studio 2005, readsome() and read() are deprecated. >> > #define myReadSome(BUF, SIZ, NUM) _Readsome_s(BUF, SIZ, NUM); >> > #define myRead(BUF, SIZ, NUM) _Read_s(BUF, SIZ, NUM); >> > #else // WIN32 >> > #define myReadSome(BUF, SIZ, NUM) readsome(BUF, NUM); >> > #define myRead(BUF, SIZ, NUM) read(BUF, NUM); >> > #endif // WIN32 >> >>My problem with this approach is that static library built with VS2005 >>will not be usable with the earlier MSVC versions. The linking will not >>find a symbol that does not exist in the earlier version (AFAIK). So, if >>one wants a really warning-free code, maybe a pragma to suppress this >>warning would do better :-) >> >>Cheers >> >>F. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Libwpd-devel mailing list Libwpd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libwpd-devel