[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-ocrad] OCRAD with Visual Studio 2010 success
From: |
Antonio Diaz Diaz |
Subject: |
Re: [Bug-ocrad] OCRAD with Visual Studio 2010 success |
Date: |
Mon, 09 Aug 2010 20:53:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905 |
Hello Tilman,
Tilman Hausherr wrote:
data[row].erase( data[row].begin(), data[row].begin() + l - left() );
change to:
data[row].erase( data[row].begin(), data[row].begin() + (l - left()) );
Done. I have in fact found 3 more cases like the 5 you reported and have
put parentheses around all of them.
Insert this in main() just before the call to process_file():
As I said in
http://lists.nongnu.org/archive/html/lzip-bug/2010-07/msg00004.html :
-------------------------------------------------
I would consider adding a conditional for binary mode stdin/stdout, but
not litter the code with a conditional per system. Text mode is a
bug[1], not a feature.
[1] http://cygwin.com/faq.html
"Actually there's no really good reason to do text mode processing since
it only slows down reading and writing files".
-------------------------------------------------
Could you please try the following code? I would prefer to solve all
text mode problems on Windows and OS2 with a single set of patches as I
have done in lzip.
http://download.savannah.gnu.org/releases-noredirect/lzip/lzip-1.11-rc4.tar.gz
#if defined(__MSVCRT__) || defined(__OS2__)
#include <fcntl.h>
#include <io.h>
#endif
...
#if defined(__MSVCRT__) || defined(__OS2__)
_setmode( STDIN_FILENO, O_BINARY );
#endif
replace this in main
if( ( control.outfile = std::fopen( outfile_name, "wx" ) ) == 0 )
I have to think about this because removing the 'x' breaks --force.
(Files are always overwritten). Isn't there an equivalent to O_EXCL for
streams?
Best regards,
Antonio.
Re: [Bug-ocrad] OCRAD with Visual Studio 2010 success, Tilman Hausherr, 2010/08/10