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

Re: 1.10 API review - svn_io_stdin_readline()

From: Stefan Sperling <stsp_at_apache.org>
Date: Tue, 16 Jan 2018 09:04:52 +0100

On Tue, Jan 16, 2018 at 07:37:31AM +0100, Branko Čibej wrote:
> Two questions here:
> 1. Why did none of the existing functions in libsvn_subr/prompt.c fit
> the use case?

They assume a terminal. I'm not sure if they'd work on stdin as-is.

> 2. What's wrong with using svn_stream_readline() with
> svn_io_stream_for_stdin2()?
> In other words: I suspect this new function should be removed.
> -- Brane

Just for the record, this function was added by William Orr in this
patch submission: https://svn.haxx.se/dev/archive-2017-12/0146.shtml
Based on feedback I provided here:

This function is in fact just a convenience wrapper around the two other
functions you mention.

There are 7 callers of this function across our command line tools.
If this function is not deemed appropriate for the public API, I would just
move it to the libsvn_subr cmdline.c bag of helper functions. Agreed?
Received on 2018-01-16 09:05:03 CET

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.