w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 80c28caf12e1dceba16bdce8765d341d093e94a4
parent 7d33d926121ba2fc758cad036ef39b73bac91f41
Author: ukai <ukai>
Date:   Mon,  9 Dec 2002 15:24:00 +0000

[w3m-dev 03542] news support
* file.c (loadGeneralFile): NNTP as well as NEWS
* indep.c (url_unquote_char): check % hex hex
	(url_unquote): unquote except \0, \n, \r
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>

Diffstat:
MChangeLog | 7+++++++
Mfile.c | 2+-
Mindep.c | 9+++------
3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,5 +1,12 @@ 2002-12-10 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 03542] news support + * file.c (loadGeneralFile): NNTP as well as NEWS + * indep.c (url_unquote_char): check % hex hex + (url_unquote): unquote except \0, \n, \r + +2002-12-10 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> + * [w3m-dev 03541] Re: W3M_LINE_NO / W3M_CURRENT_COLUMN * main.c (goLine): check searchKeyData() (set_buffer_environ): W3M_CURRENT_* diff --git a/file.c b/file.c @@ -1749,7 +1749,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, } } #ifdef USE_NNTP - else if (pu.scheme == SCM_NEWS) { + else if (pu.scheme == SCM_NEWS || pu.scheme == SCM_NNTP) { t_buf = newBuffer(INIT_BUFFER_WIDTH); readHeader(&f, t_buf, TRUE, &pu); t = checkContentType(t_buf); diff --git a/indep.c b/indep.c @@ -506,10 +506,8 @@ html_unquote(char *str) static char xdigit[0x10] = "0123456789ABCDEF"; #define url_unquote_char(pstr) \ - (IS_XDIGIT((*(pstr))[1]) ? \ - (IS_XDIGIT((*(pstr))[2]) ? \ + ((IS_XDIGIT((*(pstr))[1]) && IS_XDIGIT((*(pstr))[2])) ? \ (*(pstr) += 3, (GET_MYCDIGIT((*(pstr))[-2]) << 4) | GET_MYCDIGIT((*(pstr))[-1])) : \ - (*(pstr) += 2, GET_MYCDIGIT((*(pstr))[-1]))) : \ -1) char * @@ -547,11 +545,10 @@ url_unquote(char *str) if (*p == '%') { q = p; c = url_unquote_char(&q); - if (c >= 0 && (IS_CNTRL(c) || c == ' ' || !IS_ASCII(c))) { + if (c >= 0 && c != '\0' && c != '\n' && c != '\r') { if (tmp == NULL) tmp = Strnew_charp_n(str, (int)(p - str)); - if (c != '\0' && c != '\n' && c != '\r') - Strcat_char(tmp, (char)c); + Strcat_char(tmp, (char)c); p = q; continue; }