atomicobject/heatshrink — pull request #10 by philpem (2014-12-31 14:59:20+00:00)
Title: Fix a number of Windows-specific issues

These commits fix a number of Windows-specific issues in Heatshrink, as noted on #9. They port most of sjaeckel's changes from PR #4 to the latest version of Heatshrink, with the exception of the Microblaze changes which I cannot test.

Most of these fixes are related to Windows' special handling of text and binary mode data streams, and the data corruption and truncation you get when sending binary data down a stream open in text mode.

There is also one fix (4d94f2d) which is likely to be useful on other platforms; this ensures that error messages are sent out on the stderr stream. There is one potential unresolved issue with this fix: on line 390 of heatshrink.c, function report(), there is an fprintf() which will output on stderr if data is being piped, or stdout if it is being sent to a file. I'd argue that this should always send to stderr.