aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--file.c4
-rw-r--r--indep.c11
3 files changed, 14 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index abe19b9..2620cc1 100644
--- 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_*
@@ -5589,4 +5596,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.600 2002/12/09 15:21:12 ukai Exp $
+$Id: ChangeLog,v 1.601 2002/12/09 15:24:00 ukai Exp $
diff --git a/file.c b/file.c
index 251277e..f764ff7 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.152 2002/12/08 14:23:44 ukai Exp $ */
+/* $Id: file.c,v 1.153 2002/12/09 15:24:02 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -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
index cc9185a..1b855bf 100644
--- a/indep.c
+++ b/indep.c
@@ -1,4 +1,4 @@
-/* $Id: indep.c,v 1.25 2002/11/09 21:55:24 ukai Exp $ */
+/* $Id: indep.c,v 1.26 2002/12/09 15:24:04 ukai Exp $ */
#include "fm.h"
#include <stdio.h>
#include <pwd.h>
@@ -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;
}