From e7f034dceff196b7588bca995a5e22bd480f71ca Mon Sep 17 00:00:00 2001 From: Avuton Olrich Date: Tue, 3 Mar 2009 08:01:42 -0800 Subject: cmdline: Print available protocols when --version is run. --- src/ls.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/ls.c') diff --git a/src/ls.c b/src/ls.c index c6987aedb..92b8a213e 100644 --- a/src/ls.c +++ b/src/ls.c @@ -24,6 +24,12 @@ #include #include + +/** + * file:// is not included in remoteUrlPrefixes, the connection method + * is detected at runtime and displayed as a urlhandler if the client is + * connected by IPC socket. + */ static const char *remoteUrlPrefixes[] = { #ifdef HAVE_CURL "http://", @@ -40,6 +46,20 @@ static const char *remoteUrlPrefixes[] = { NULL }; +void print_supported_uri_schemes_to_fp(FILE *fp) +{ + const char **prefixes = remoteUrlPrefixes; + +#ifdef HAVE_UN + fprintf(fp, "file:// "); +#endif + while (*prefixes) { + fprintf(fp, "%s ", *prefixes); + prefixes++; + } + puts("\n"); +} + void print_supported_uri_schemes(struct client *client) { const char **prefixes = remoteUrlPrefixes; -- cgit v1.2.3