diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-01-06 15:36:56 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-01-06 15:36:56 +0000 |
commit | ff20968c8c0cbafa349495c791f700775d0e23af (patch) | |
tree | b3610ae72e8d9e30344a0d29bb0cfb0cc8c78611 /file.c | |
parent | fix build errors (diff) | |
download | w3m-ff20968c8c0cbafa349495c791f700775d0e23af.tar.gz w3m-ff20968c8c0cbafa349495c791f700775d0e23af.zip |
[w3m-dev 03610] Re: news:<newsgroup>
* anchor.c (_put_anchor_news): check '<'
(reAnchorNewsheader): added
* file.c (loadSomething): Subject: as buffername
(checkHeader): check buf->document_header
(loadGeneralFile): reAnchorNewsheader
* html.h (SCM_NNTP_GROUP): added
* main.c (main): delete USE_NNTP in switch (newbuf->real_scheme)
(chkNMIDBuffer): lowercase in url_like_pat
* news.c (add_news_message): add scheme, group as arg
(openNewsStream): check SCM_NNTP_GROUP
check current_news.host
(readNewsgroup): rewrite to support nntp:,news: extension
* proto.h (reAnchorNewsheader): added
* url.c (DefaultPort): add 119 for nntp group
(parseURL2): rewrite to support nntp:,news: extension
(_parsedURL2Str): add for SCM_NNTP_GROUP
(openURL): rewrite to support nntp:,news: extension
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r-- | file.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.174 2002/12/27 16:30:54 ukai Exp $ */ +/* $Id: file.c,v 1.175 2003/01/06 15:36:58 ukai Exp $ */ #include "fm.h" #include <sys/types.h> #include "myctype.h" @@ -215,8 +215,11 @@ loadSomething(URLFile *f, return NULL; buf->filename = path; - if (buf->buffername == NULL || buf->buffername[0] == '\0') - buf->buffername = conv_from_system(lastFileName(path)); + if (buf->buffername == NULL || buf->buffername[0] == '\0') { + buf->buffername = checkHeader(buf, "Subject:"); + if (buf->buffername == NULL) + buf->buffername = conv_from_system(lastFileName(path)); + } if (buf->currentURL.scheme == SCM_UNKNOWN) buf->currentURL.scheme = f->scheme; buf->real_scheme = f->scheme; @@ -889,7 +892,7 @@ checkHeader(Buffer *buf, char *field) TextListItem *i; char *p; - if (buf == NULL || field == NULL) + if (buf == NULL || field == NULL || buf->document_header == NULL) return NULL; for (i = buf->document_header->first; i != NULL; i = i->next) { if (!strncasecmp(i->ptr, field, len)) { @@ -2089,6 +2092,10 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, } if (header_string) header_string = NULL; +#ifdef USE_NNTP + if (f.scheme == SCM_NNTP || f.scheme == SCM_NEWS) + reAnchorNewsheader(b); +#endif preFormUpdateBuffer(b); if (fmInitialized) term_raw(); |