From dfd33cccd5e2b4d169eb0f0ca7cccfc998b979b2 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Wed, 15 Jan 2003 16:11:43 +0000 Subject: [w3m-dev 03640] Re: cleanup (don't close connection of news server) * anchor.c (_put_ahchor_news): always conv_str (_put_anchor_all): always conv_str * etc.c (close_all_fds): deleted (close_all_fds_except): added, except fd=f is left open * file.c (guess_filename): added (UFhalfclose): added (convertLine): cleanup_line if not raw mode check uf (readHeader): always convertLine (loadGeneralFile): rewrite (loadGopherDir): return Str, args change to ParsedURL and code rewrite (saveBuffer): always conv_str (_doFileCopy): close_all_fds (doFileSave): close_all_fds_except (uncompress_stream): dup, close_all_fds_except * form.c (form_fputs_decode): always conv_str (input_textarea): convertLine * frame.c (createFrameFile): convertLine * ftp.c (loadFTPDir): arg code rewrite (readFTPDir): convertLine * html.h (UFfileno): added * image.c (loadImage): close_all_fds * indep.h (RAW_MODE): added * local.c (loadLocalDir): return Str (dirBuffer): rewrite (localcgi_popen_r): close_all_fds * main.c (main): check SCM_LOCAL print err_msg * news.c (news_command): args cmd and arg (news_quit): news_command (openNewsStream): news_command (readNewsgroup): deleted (loadNewsgroup): added (closeNews): added * proto.h (loadGopherDir): update (conv_str): define for no JP_CHARSET (readFTPDir): deleted (loadFTPDir): added (readNewsgroup): deleted (loadNewsgroup): added (dirBuffer): deleted (loadLocalDir): added (close_all_fds): defined by close_all_fds_except (close_all_fds_except): added From: Hironori SAKAMOTO --- anchor.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'anchor.c') diff --git a/anchor.c b/anchor.c index 4a365ab..264c1b1 100644 --- a/anchor.c +++ b/anchor.c @@ -1,4 +1,4 @@ -/* $Id: anchor.c,v 1.19 2003/01/06 15:37:49 ukai Exp $ */ +/* $Id: anchor.c,v 1.20 2003/01/15 16:11:43 ukai Exp $ */ #include "fm.h" #include "myctype.h" #include "regex.h" @@ -198,10 +198,7 @@ _put_anchor_news(Buffer *buf, char *p1, char *p2, int line, int pos) if (*(p2 - 1) == '>') p2--; } - tmp = Strnew_charp_n(p1, p2 - p1); -#ifdef JP_CHARSET - tmp = conv_str(tmp, InnerCode, buf->document_code); -#endif + tmp = conv_str(Strnew_charp_n(p1, p2 - p1), InnerCode, buf->document_code); tmp = Sprintf("news:%s", file_quote(tmp->ptr)); return registerHref(buf, tmp->ptr, NULL, NO_REFERER, NULL, '\0', line, pos); @@ -213,10 +210,7 @@ _put_anchor_all(Buffer *buf, char *p1, char *p2, int line, int pos) { Str tmp; - tmp = Strnew_charp_n(p1, p2 - p1); -#ifdef JP_CHARSET - tmp = conv_str(tmp, InnerCode, buf->document_code); -#endif + tmp = conv_str(Strnew_charp_n(p1, p2 - p1), InnerCode, buf->document_code); return registerHref(buf, url_quote(tmp->ptr), NULL, NO_REFERER, NULL, '\0', line, pos); } -- cgit v1.2.3