You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Fogel <kf...@newton.ch.collab.net> on 2001/11/01 16:44:43 UTC
Re: svn commit: rev 333 - trunk/subversion/libsvn_ra_local trunk/subversion/clients/cmdline
Branko Čibej <br...@xbc.nu> writes:
> >Would like some other's opinions on this (apparently, at least one
> >other person was not confused by the byte count).
> >
>
> Forget persons, a script parser will be confused by the byte count
> unless you tell it how many bytes there are in a newline separator.
>
> Don't you just love interop. :-)
I think in practice this is unlikely to be a problem; in any case,
that's just one of many things about log output that a script would
have to know (for whatever platform it's running on).
When you call printf("\n") on a non-Unix machine, can it output \n\r
or \r\n, or will it still just output \n?
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: rev 333 - trunk/subversion/libsvn_ra_local trunk/subversion/clients/cmdline
Posted by Branko Čibej <br...@xbc.nu>.
Karl Fogel wrote:
>Branko �ibej <br...@xbc.nu> writes:
>
>>>Would like some other's opinions on this (apparently, at least one
>>>other person was not confused by the byte count).
>>>
>>Forget persons, a script parser will be confused by the byte count
>>unless you tell it how many bytes there are in a newline separator.
>>
>>Don't you just love interop. :-)
>>
>
>I think in practice this is unlikely to be a problem; in any case,
>that's just one of many things about log output that a script would
>have to know (for whatever platform it's running on).
>
>When you call printf("\n") on a non-Unix machine, can it output \n\r
>or \r\n, or will it still just output \n?
>
If the stream is opened in translated mode (fopen("bla", "wt"), which
stdout typically is, it can output whatever the local line separator
sequence is.
--
Brane �ibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: rev 333 - trunk/subversion/libsvn_ra_local trunk/subversion/clients/cmdline
Posted by Mark Benedetto King <bk...@answerfriend.com>.
On Thu, Nov 01, 2001 at 10:44:43AM -0600, Karl Fogel wrote:
> Branko �ibej <br...@xbc.nu> writes:
> > >Would like some other's opinions on this (apparently, at least one
> > >other person was not confused by the byte count).
> > >
> >
> > Forget persons, a script parser will be confused by the byte count
> > unless you tell it how many bytes there are in a newline separator.
> >
> > Don't you just love interop. :-)
>
> I think in practice this is unlikely to be a problem; in any case,
> that's just one of many things about log output that a script would
> have to know (for whatever platform it's running on).
>
> When you call printf("\n") on a non-Unix machine, can it output \n\r
> or \r\n, or will it still just output \n?
>
Using Microsoft's libraries, FILE *'s do "\n" -> "\r\n" mapping if they
are opened in "text mode" (the default). To avoid this mapping you
need, for example:
FILE *fp = fopen(filename, "wb");
--ben
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org