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

Re: newline conversion with EDITOR

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-01-28 17:24:18 CET

Greg Hudson <ghudson@MIT.EDU> writes:
> On Mon, 2002-01-28 at 04:57, Greg Stein wrote:
> > But I don't think we shold use FILE*. Using apr_file_t is portable. If it
> > has drawbacks, then we should fix APR, not workaround it.
>
> I'm a little confused by this claim. FILE * is extremely portable; not
> only is it in ANSI C, but it's also in K&R C. There have been some
> historical stdio bugs, but none I know of which would actually affect
> Subversion.

Well, note that Greg Stein didn't actually claim that FILE* is not
portable, he merely claimed that apr_file_t *is* portable. :-)

I think if only for code consistency it's worth using apr_file_t. I
believe it does offer some features beyond what FILE* offers, such as
finding out the path from the apr_file_t *. (Not that we need this
right now in the $EDITOR case.)

> (Likewise, system() is part of ANSI C, so is also quite portable, but is
> worth ignoring for other reasons.)

The presence of the "system()" call is dependable. Its behavior
w.r.t. any given argument is not.

-K

---------------------------------------------------------------------
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:37:00 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.