From 044b20385b5bdb3eb423730fe017e58ce428d6e6 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sat, 30 Apr 2005 13:24:26 +0000 Subject: [PATCH] parse_url() is void. --- src/core/url.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/url.c b/src/core/url.c index 2a156e8b..b33138e9 100644 --- a/src/core/url.c +++ b/src/core/url.c @@ -8,7 +8,6 @@ * * [protocol://[host][:port]/]path/to/file * - * We return true for success, 0 for failure (e.g. unknown protocol). * The URL string will be modified by having NULs inserted after * "protocol", "host" and "port". The original URL can be * reconstructed by calling unparse_url. @@ -17,6 +16,8 @@ void parse_url ( struct url_info *info, char *url ) { char *p; + DBG ( "URL parsing \"%s\"\n", url ); + /* Zero the structure */ memset ( info, 0, sizeof ( *info ) ); @@ -44,11 +45,15 @@ void parse_url ( struct url_info *info, char *url ) { } } info->file = p; + DBG ( "URL protocol \"%s\" host \"%s\" port \"%s\" " + "file \"%s\"\n", info->protocol, info->host, + info->port ? info->port : "(NONE)", info->file ); return; } /* URL has no explicit protocol; is just a filename */ info->file = url; + DBG ( "URL file \"%s\"\n", info->file ); } /* @@ -63,9 +68,11 @@ char * unparse_url ( struct url_info *info ) { info->port[-1] = ':'; } info->host[-3] = ':'; + DBG ( "URL reconstructed \"%s\"\n", info->protocol ); return info->protocol; } else { /* URL had no protocol; was just a filename */ + DBG ( "URL reconstructed \"%s\"\n", info->file ); return info->file; } }