w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 9411a22ca3c7b4aea4a59ac1ed61031a095f208c
parent 9220031c68b2236daefd87fb7f9a238889ffac7b
Author: ukai <ukai>
Date:   Mon,  7 Jan 2002 16:28:17 +0000

[w3m-dev 02794]
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>

Diffstat:
MChangeLog | 6++++++
Murl.c | 21+++++----------------
2 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -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 diff --git a/url.c b/url.c @@ -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