On win32, data from popen() calls gets truncated cause the
pipe is not in binary mode. Using "rb" instead of "r" as
mode fixes this and shouldn't cause problems on posix
E.g. invoking the original dos exe:
gocr_dos -i lotr-1-4-00001.bmp
will fail with
ERROR src\pnm.c L289: read
Attached patch works with the released tarball (0.40) as
well as with the CVS sources (applies with small offset).
I checked the patch with MinGW-gcc 2.95 and 3.3.1 and it
works OK (btw., the autoconf way works already nicely
using MSys, even "make frontend" creates a fully working
Log in to post a comment.