#19 compress -c adds DOS end lines

open
nobody
None
5
2005-04-26
2005-04-26
mikets
No

Compress -c produces the output to the stdout, which is
defined as text file in DOS/Windows. If binary file
compressed contains 0A byte, the runtime automatically
adds the 0D.
Suggested solution:
file ncompress-4.2.4, file compress42.c, near line 1147
add:

setmode (1, O_BINARY); /* reset the binary mode
for stdout */

(This compiles in MS Visual Studio 6.0)

Fine tunings can be done, by checking whether the
stdout is redirected on console or a file

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks