diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-01-07 15:53:42 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-01-07 15:53:42 +0000 |
commit | aee81bf527e78b8292135f3084fa741212cf0b76 (patch) | |
tree | 3eb4a573e1fd61f0904dc117df3b2804efc057b4 /news.c | |
parent | fix build warnings (diff) | |
download | w3m-aee81bf527e78b8292135f3084fa741212cf0b76.tar.gz w3m-aee81bf527e78b8292135f3084fa741212cf0b76.zip |
[w3m-dev 03611] relative URL
* news.c (openNewsStream): don't skip '/' for nntp:
(readNewsgroup): cleanup
* url.c (parseURL): don't copy user & password
(parseURL2): fix for group, don't copy user & password
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r-- | news.c | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -1,4 +1,4 @@ -/* $Id: news.c,v 1.8 2003/01/06 15:49:29 ukai Exp $ */ +/* $Id: news.c,v 1.9 2003/01/07 15:53:43 ukai Exp $ */ #include "fm.h" #include "myctype.h" #include <stdio.h> @@ -272,12 +272,7 @@ openNewsStream(ParsedURL *pu) } if (pu->scheme == SCM_NNTP || pu->scheme == SCM_NEWS) { /* News article */ - group = allocStr(pu->file, -1); - if (pu->scheme == SCM_NNTP && *group == '/') { - /* first char of pu->file is '/' */ - group++; - } - group = file_unquote(group); + group = file_unquote(allocStr(pu->file, -1)); p = strchr(group, '/'); if (p == NULL) { /* <message-id> */ if (!strchr(group, '@')) @@ -321,11 +316,8 @@ readNewsgroup(ParsedURL *pu) if (current_news.host == NULL || !pu->file || *pu->file == '\0') return NULL; group = allocStr(pu->file, -1); - if (pu->scheme == SCM_NNTP_GROUP) { - if (*group == '/') - group++; - scheme = "nntp:/"; - } + if (pu->scheme == SCM_NNTP_GROUP) + scheme = "/"; else scheme = "news:"; if ((list = strchr(group, '/'))) { |