commit 0dd89ae9b35fee7e2e3b68a8a80242d84db8f324
parent b84270d63e5e405932e38fcd500b0be8bfa59edc
Author: ukai <ukai>
Date: Wed, 15 Jan 2003 16:24:25 +0000
* file.c (loadGopherDir): convertLine RAW_MODE
* ftp.c (loadFTPDir): ditto
* fix indent
From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat:
6 files changed, 35 insertions(+), 29 deletions(-)
diff --git 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)
diff --git a/file.c b/file.c
@@ -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
@@ -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
@@ -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
@@ -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
@@ -343,16 +343,14 @@ loadNewsgroup(ParsedURL *pu, char *code)
if (SETJMP(AbortLoading) != 0) {
news_close(¤t_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(¤t_news, "GROUP", group, &status);
+ tmp = news_command(¤t_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(¤t_news, "HEAD", Sprintf("%d", i)->ptr, &status);
+ news_command(¤t_news, "HEAD", Sprintf("%d", i)->ptr,
+ &status);
if (status != 221)
continue;
readHeader(&f, buf, FALSE, NULL);