aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-12-27 16:07:44 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-12-27 16:07:44 +0000
commit44ee521b14c164a2d0886a35b19f6a1a3377ff5c (patch)
tree76499044298687cc70fb8328de16b38ca10fe182 /main.c
parent[w3m-dev 03607] mymktime: time zone support (diff)
downloadw3m-44ee521b14c164a2d0886a35b19f6a1a3377ff5c.tar.gz
w3m-44ee521b14c164a2d0886a35b19f6a1a3377ff5c.zip
[w3m-dev 03608] news:<newsgroup>
* XMakefile (LSRCS): add news.c (LOBJS): add news.o * file.c (loadSOmething): don't UFclose() for nntp/news (readHeader): remove . at beginning of line for news img link to file: (loadGeneralFile): add SCM_NEWS_GROUP don't UFclose() for nntp/news (loadHTMLstream): . line check for news (loadBuffer): . line check for news * fm.h (NNTP_server): added (NNTP_mode): added (MaxNewsMessage): added * html.h (SCM_NEWS_GROUP): added * main.c (main): NNTP_server or NNTPSERVER NNTP_mode or NNTPMODE add SCM_NEWS_GROUP (followA): remove news:..@.. check (cmd_loadURL): remove news:...@.. check (w3m_exit): disconnectNews * proto.h (openNewsStream): added (readNewsgroup): added (disconnectNews): added * rc.c (CMT_NNTP_SERVER): added (CMT_NNTP_MODE): added (CMT_MAX_NEWS): added (params9): add nntpserver, nntpmode, max_news * url.c (DefaultPort): add 119 for news group (parseURL2): news:..@... is SCM_NEWS_GROUP (_parsedURL2Str): add news for SCM_NEWS_GROUP (openURL): cleanup SCM_NEWS add SCM_NEWS_GROUP * news.c: added From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'main.c')
-rw-r--r--main.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/main.c b/main.c
index e5f0cbe..216971a 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.182 2002/12/27 15:50:33 ukai Exp $ */
+/* $Id: main.c,v 1.183 2002/12/27 16:07:44 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -445,6 +445,12 @@ main(int argc, char **argv, char **envp)
((p = getenv("NO_PROXY")) ||
(p = getenv("no_proxy")) || (p = getenv("NO_proxy"))))
NO_proxy = p;
+#ifdef USE_NNTP
+ if (!non_null(NNTP_server) && (p = getenv("NNTPSERVER")) != NULL)
+ NNTP_server = p;
+ if (!non_null(NNTP_mode) && (p = getenv("NNTPMODE")) != NULL)
+ NNTP_mode = p;
+#endif
if (!non_null(Editor) && (p = getenv("EDITOR")) != NULL)
Editor = p;
@@ -871,6 +877,7 @@ main(int argc, char **argv, char **envp)
#ifdef USE_NNTP
case SCM_NNTP:
case SCM_NEWS:
+ case SCM_NEWS_GROUP:
#endif /* USE_NNTP */
case SCM_MAILTO:
break;
@@ -2869,7 +2876,7 @@ followA(void)
pushHashHist(URLHist, a->url);
return;
}
-#ifdef USE_NNTP
+#if 0
else if (!strncasecmp(a->url, "news:", 5) && strchr(a->url, '@') == NULL) {
/* news:newsgroup is not supported */
disp_err_message("news:newsgroup_name is not supported", TRUE);
@@ -3824,7 +3831,7 @@ cmd_loadURL(char *url, ParsedURL *current, char *referer)
pushHashHist(URLHist, url);
return;
}
-#ifdef USE_NNTP
+#if 0
if (!strncasecmp(url, "news:", 5) && strchr(url, '@') == NULL) {
/* news:newsgroup is not supported */
disp_err_message("news:newsgroup_name is not supported", TRUE);
@@ -5450,6 +5457,9 @@ w3m_exit(int i)
#ifdef USE_SSL
free_ssl_ctx();
#endif
+#ifdef USE_NNTP
+ disconnectNews();
+#endif
exit(i);
}