monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] "mtn cat" text/binary impedence mismatch


From: Larry Hastings
Subject: Re: [Monotone-devel] "mtn cat" text/binary impedence mismatch
Date: Wed, 08 Nov 2006 10:22:31 -0800
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)

Zack Weinberg wrote:
Is there a reason not to set stdin/stdout to binary at the beginning of execution and leave them that way forever?
Sure is.  When text mode is set, stdout prepends every "\n" with a "\r".  That means printf("mtn: usage\n") gets turned into "mtn: usage\r\n" when it hits the console.  Naked "\n"s looks okay in the console, but if you redirect it into a file then open in an editor that's dumb about newlines (like, say, the "notepad" that comes with Windows) it looks awful.  Best to stick with the local EOL convention.

That reminds me.  Does the conversion step with get_linesep_conv() happen with "mtn cat"?  I think it does not, but it should.


larry

reply via email to

[Prev in Thread] Current Thread [Next in Thread]