aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-01-15 16:24:25 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-01-15 16:24:25 +0000
commit0aeedf43a0ac1d38b99af0508c635681dd6082bf (patch)
treef52a72ffdde9a3e0c50ffb4792c54cd3560ba67b
parent[w3m-dev 03642] Re: cleanup (don't close connection of news server) (diff)
downloadw3m-0aeedf43a0ac1d38b99af0508c635681dd6082bf.tar.gz
w3m-0aeedf43a0ac1d38b99af0508c635681dd6082bf.zip
* file.c (loadGopherDir): convertLine RAW_MODE
* ftp.c (loadFTPDir): ditto * fix indent From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat (limited to '')
-rw-r--r--ChangeLog7
-rw-r--r--file.c36
-rw-r--r--ftp.c10
-rw-r--r--local.c4
-rw-r--r--main.c4
-rw-r--r--news.c15
6 files changed, 41 insertions, 35 deletions
diff --git a/ChangeLog b/ChangeLog
index aae20d7..7eed7ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-16 Fumitoshi UKAI <ukai@debian.or.jp>
+
+ * file.c (loadGopherDir): convertLine RAW_MODE
+ * ftp.c (loadFTPDir): ditto
+
2003-01-16 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03642] Re: cleanup (don't close connection of news server)
@@ -6471,4 +6476,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.683 2003/01/15 16:17:11 ukai Exp $
+$Id: ChangeLog,v 1.684 2003/01/15 16:24:25 ukai Exp $
diff --git a/file.c b/file.c
index afe58dc..b5829e8 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.185 2003/01/15 16:11:43 ukai Exp $ */
+/* $Id: file.c,v 1.186 2003/01/15 16:24:25 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -1563,24 +1563,24 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
return b;
}
else {
- page = loadLocalDir(pu.real_file);
+ page = loadLocalDir(pu.real_file);
t = "local:directory";
#ifdef JP_CHARSET
code = SystemCode;
#endif
}
- }
- }
- break;
+ }
+ }
+ break;
case SCM_FTPDIR:
- page = loadFTPDir(&pu, &code);
- t = "ftp:directory";
- break;
+ page = loadFTPDir(&pu, &code);
+ t = "ftp:directory";
+ break;
#ifdef USE_NNTP
case SCM_NEWS_GROUP:
- page = loadNewsgroup(&pu, &code);
- t = "news:group";
- break;
+ page = loadNewsgroup(&pu, &code);
+ t = "news:group";
+ break;
#endif
case SCM_UNKNOWN:
#ifdef USE_EXTERNAL_URI_LOADER
@@ -1896,15 +1896,15 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
if (do_download) {
char *file;
if (!src)
- return NULL;
+ return NULL;
file = guess_filename(pu.file);
#ifdef USE_GOPHER
if (f.scheme == SCM_GOPHER)
- file = Sprintf("%s.html", file)->ptr;
+ file = Sprintf("%s.html", file)->ptr;
#endif
#ifdef USE_NNTP
if (f.scheme == SCM_NEWS_GROUP)
- file = Sprintf("%s.html", file)->ptr;
+ file = Sprintf("%s.html", file)->ptr;
#endif
doFileMove(tmp->ptr, file);
return NO_BUFFER;
@@ -6610,7 +6610,9 @@ loadGopherDir(URLFile *uf, ParsedURL *pu, char *code)
tmp = parsedURL2Str(pu);
p = html_quote(tmp->ptr);
- tmp = convertLine(NULL, Strnew_charp(file_unquote(tmp->ptr)), code, NULL);
+ tmp =
+ convertLine(NULL, Strnew_charp(file_unquote(tmp->ptr)), code,
+ RAW_MODE);
q = html_quote(tmp->ptr);
tmp = Strnew_m_charp("<html>\n<head>\n<base href=\"", p, "\">\n<title>", q,
"</title>\n</head>\n<body>\n<h1>Index of ", q,
@@ -7488,7 +7490,7 @@ _doFileCopy(char *tmpf, char *defstr, int download)
signal(SIGINT, SIG_IGN);
SETPGRP();
close_tty();
- close_all_fds(2);
+ close_all_fds(2);
QuietMessage = TRUE;
fmInitialized = FALSE;
if (!_MoveFile(tmpf, p) && PreserveTimestamp && !is_pipe &&
@@ -7595,7 +7597,7 @@ doFileSave(URLFile uf, char *defstr)
signal(SIGINT, SIG_IGN);
SETPGRP();
close_tty();
- close_all_fds_except(2, UFfileno(&uf));
+ close_all_fds_except(2, UFfileno(&uf));
QuietMessage = TRUE;
fmInitialized = FALSE;
if (!save2tmp(uf, p) && PreserveTimestamp && uf.modtime != -1)
diff --git a/ftp.c b/ftp.c
index 212dab9..ac9720c 100644
--- a/ftp.c
+++ b/ftp.c
@@ -1,4 +1,4 @@
-/* $Id: ftp.c,v 1.25 2003/01/15 16:14:41 ukai Exp $ */
+/* $Id: ftp.c,v 1.26 2003/01/15 16:24:25 ukai Exp $ */
#include <stdio.h>
#include <pwd.h>
#include <Str.h>
@@ -456,7 +456,9 @@ loadFTPDir(ParsedURL *pu, char *code)
if (Strlastchar(tmp) != '/')
Strcat_char(tmp, '/');
fn = html_quote(tmp->ptr);
- tmp = convertLine(NULL, Strnew_charp(file_unquote(tmp->ptr)), code, NULL);
+ tmp =
+ convertLine(NULL, Strnew_charp(file_unquote(tmp->ptr)), code,
+ RAW_MODE);
q = html_quote(tmp->ptr);
FTPDIRtmp = Strnew_m_charp("<html>\n<head>\n<base href=\"", fn,
"\">\n<title>", q,
@@ -525,7 +527,7 @@ loadFTPDir(ParsedURL *pu, char *code)
}
date++;
len = strlen(fn);
- tmp = convertLine(NULL, Strnew_charp(fn), code, NULL);
+ tmp = convertLine(NULL, Strnew_charp(fn), code, RAW_MODE);
Strcat_m_charp(FTPDIRtmp, "<a href=\"", html_quote(file_quote(fn)),
"\">", html_quote(tmp->ptr), NULL);
if (ftype == FTPDIR_LINK) {
@@ -557,7 +559,7 @@ loadFTPDir(ParsedURL *pu, char *code)
qsort(flist, nfile, sizeof(char *), strCmp);
for (i = 0; i < nfile; i++) {
fn = flist[i];
- tmp = convertLine(NULL, Strnew_charp(fn), code, NULL);
+ tmp = convertLine(NULL, Strnew_charp(fn), code, RAW_MODE);
Strcat_m_charp(FTPDIRtmp, "<li><a href=\"",
html_quote(file_quote(fn)), "\">",
html_quote(tmp->ptr), "</a>\n", NULL);
diff --git a/local.c b/local.c
index 82fa748..445d1c1 100644
--- a/local.c
+++ b/local.c
@@ -1,4 +1,4 @@
-/* $Id: local.c,v 1.19 2003/01/15 16:17:11 ukai Exp $ */
+/* $Id: local.c,v 1.20 2003/01/15 16:24:25 ukai Exp $ */
#include "fm.h"
#include <string.h>
#include <stdio.h>
@@ -63,7 +63,7 @@ loadLocalDir(char *dname)
qdir = html_quote(Str_conv_from_system(dirname)->ptr);
tmp = Strnew_m_charp("<HTML>\n<HEAD>\n<BASE HREF=\"file://", qdir,
"\">\n<TITLE>Directory list of ", qdir,
- "</TITLE>\n</HEAD>\n<BODY>\n<H1>Directory list of ",
+ "</TITLE>\n</HEAD>\n<BODY>\n<H1>Directory list of ",
qdir, "</H1>\n", NULL);
flist = New_N(char *, nfile_max);
nfile = 0;
diff --git a/main.c b/main.c
index 99f1cb4..f6e71ef 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.192 2003/01/15 16:11:43 ukai Exp $ */
+/* $Id: main.c,v 1.193 2003/01/15 16:24:25 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -4414,7 +4414,7 @@ vwSrc(void)
}
else if (Currentbuf->real_scheme == SCM_LOCAL &&
!(Currentbuf->real_type &&
- !strcasecmp(Currentbuf->real_type, "local:directory"))) {
+ !strcasecmp(Currentbuf->real_type, "local:directory"))) {
fn = Currentbuf->filename;
}
else {
diff --git a/news.c b/news.c
index e95a0ba..840bbd1 100644
--- a/news.c
+++ b/news.c
@@ -1,4 +1,4 @@
-/* $Id: news.c,v 1.13 2003/01/15 16:14:41 ukai Exp $ */
+/* $Id: news.c,v 1.14 2003/01/15 16:24:25 ukai Exp $ */
#include "fm.h"
#include "myctype.h"
#include <stdio.h>
@@ -343,16 +343,14 @@ loadNewsgroup(ParsedURL *pu, char *code)
if (SETJMP(AbortLoading) != 0) {
news_close(&current_news);
- Strcat_charp(page,
- "</table>\n<p>Transfer Interrupted!\n");
+ Strcat_charp(page, "</table>\n<p>Transfer Interrupted!\n");
goto news_end;
}
trap = signal(SIGINT, KeyAbort);
if (fmInitialized)
term_cbreak();
- tmp =
- news_command(&current_news, "GROUP", group, &status);
+ tmp = news_command(&current_news, "GROUP", group, &status);
if (status != 211)
goto news_list;
if (sscanf(tmp->ptr, "%d %d %d %d", &status, &i, &first, &last) != 4)
@@ -378,9 +376,7 @@ loadNewsgroup(ParsedURL *pu, char *code)
}
page = Sprintf("<html>\n<head>\n<base href=\"%s\">\n\
<title>Newsgroup: %s %d-%d</title>\n\
-</head>\n<body>\n<h1>Newsgroup: %s %d-%d</h1>\n<hr>\n",
- parsedURL2Str(pu)->ptr, qgroup, start, end, qgroup, start,
- end);
+</head>\n<body>\n<h1>Newsgroup: %s %d-%d</h1>\n<hr>\n", parsedURL2Str(pu)->ptr, qgroup, start, end, qgroup, start, end);
if (start > first) {
i = start - MaxNewsMessage;
if (i < first)
@@ -427,7 +423,8 @@ loadNewsgroup(ParsedURL *pu, char *code)
init_stream(&f, SCM_NEWS, current_news.rf);
buf = newBuffer(INIT_BUFFER_WIDTH);
for (i = start; i <= end && i <= last; i++) {
- news_command(&current_news, "HEAD", Sprintf("%d", i)->ptr, &status);
+ news_command(&current_news, "HEAD", Sprintf("%d", i)->ptr,
+ &status);
if (status != 221)
continue;
readHeader(&f, buf, FALSE, NULL);