diff options
| author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-01-07 16:28:17 +0000 | 
|---|---|---|
| committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-01-07 16:28:17 +0000 | 
| commit | d52fa78f4f7fdb570c10cf07eb48444bc25d60e8 (patch) | |
| tree | 484550aab5689cfb1a7df750d006d24048ef657b | |
| parent | version.c.in: 0.2.4+cvs (diff) | |
| download | w3m-d52fa78f4f7fdb570c10cf07eb48444bc25d60e8.tar.gz w3m-d52fa78f4f7fdb570c10cf07eb48444bc25d60e8.zip | |
[w3m-dev 02794]
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
| -rw-r--r-- | ChangeLog | 8 | ||||
| -rw-r--r-- | url.c | 23 | 
2 files changed, 13 insertions, 18 deletions
| @@ -1,3 +1,9 @@ +2002-01-08  Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> + +	* [w3m-dev 02794] +	* url.c (parseURL): cleanup +	* url.c (parseURL2): file_unquote(pu->file) +  2002-01-07  Fumitoshi UKAI  <ukai@debian.or.jp>  	* version.c.in: 0.2.4+cvs @@ -1783,4 +1789,4 @@  	* release-0-2-1  	* import w3m-0.2.1 -$Id: ChangeLog,v 1.200 2002/01/07 14:00:17 ukai Exp $ +$Id: ChangeLog,v 1.201 2002/01/07 16:28:17 ukai Exp $ @@ -1,4 +1,4 @@ -/* $Id: url.c,v 1.28 2001/12/27 18:22:59 ukai Exp $ */ +/* $Id: url.c,v 1.29 2002/01/07 16:28:17 ukai Exp $ */  #include "fm.h"  #include <sys/types.h>  #include <sys/socket.h> @@ -856,12 +856,6 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)  	p++;      }      switch (*p) { -    case '\0': -	/* scheme://host                */ -	p_url->host = copyPath(q, -1, COPYPATH_SPC_IGNORE); -	p_url->port = DefaultPort[p_url->scheme]; -	p_url->file = DefaultFile(p_url->scheme); -	return;      case ':':  	/* scheme://user:pass@host or  	 * scheme://host:port @@ -881,20 +875,15 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)  	/* scheme://host:port/ */  	tmp = Strnew_charp_n(q, p - q);  	p_url->port = atoi(tmp->ptr); -	if (*p == '\0') { -	    /* scheme://user@host:port      */ -	    /* scheme://user:pass@host:port */ -	    p_url->file = DefaultFile(p_url->scheme); -	    p_url->label = NULL; -	    return; -	} -	/* *p is one of ['/', '?', '#'] */ +	/* *p is one of ['\0', '/', '?', '#'] */  	break;      case '@':  	/* scheme://user@...            */  	p_url->user = copyPath(q, p - q, COPYPATH_SPC_IGNORE);  	q = ++p;  	goto analyze_url; +    case '\0': +	/* scheme://host                */      case '/':      case '?':      case '#': @@ -1111,7 +1100,7 @@ parseURL2(char *url, ParsedURL *pu, ParsedURL *current)  	    if (strncmp(pu->file, "/$LIB/", 6)) {  		char abs[_MAX_PATH]; -		_abspath(abs, pu->file, _MAX_PATH); +		_abspath(abs, file_unquote(pu->file), _MAX_PATH);  		pu->file = file_quote(cleanupName(abs));  	    }  	} @@ -1125,7 +1114,7 @@ parseURL2(char *url, ParsedURL *pu, ParsedURL *current)  	    tmp = Strnew_charp(CurrentDir);  	    if (Strlastchar(tmp) != '/')  		Strcat_char(tmp, '/'); -	    Strcat_charp(tmp, pu->file); +	    Strcat_charp(tmp, file_unquote(pu->file));  	    pu->file = file_quote(cleanupName(tmp->ptr));  	}  #endif | 
