[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Poll: do we really need newline conversion?

From: Vardhan Varma <vardhan.v_at_parsectech.com>
Date: 2001-12-13 05:39:39 CET

IMHO,

Rule 1: Open text files as text ( fopen ( ..,"rt"))
                -- there is no '\r' to worry about, only '\n'
                -- don't try fseek()on these files.
Rule 2: open binary files as binary ( fopen(.."rb");
                -- then don't try fgets.

Let the 'lower' layer ( Win32, MSVCRT, cygwin, c-lib ) take care of
the insertion/addition of '\r' if needed.

--Vardhan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:52 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.