diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-17 15:54:14 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-17 15:54:14 +0000 |
commit | 6da9aadbef9debc56a27b7ccdcddfe3adb6137d0 (patch) | |
tree | 6650a42db4f5fb7195c7e0e9be835412d67f7ad4 | |
parent | [w3m-dev 02668] install-sh: -e option of sh(1) (diff) | |
download | w3m-6da9aadbef9debc56a27b7ccdcddfe3adb6137d0.tar.gz w3m-6da9aadbef9debc56a27b7ccdcddfe3adb6137d0.zip |
[w3m-dev 02669] delete cURLcode()
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | main.c | 39 |
2 files changed, 19 insertions, 30 deletions
@@ -1,3 +1,11 @@ +2001-12-18 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> + + * [w3m-dev 02669] delete cURLcode() + * main.c (cURLcode): deleted + * main.c (loadNormalBuf): no need to use cURLcode() + * main.c (followI): ditto + * main.c (query_from_followform): need conv_form_encoding() + 2001-12-18 Rin Okuyama <okuyama@cna.ne.jp> * [w3m-dev 02668] install-sh: -e option of sh(1) @@ -1271,4 +1279,4 @@ * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.133 2001/12/17 15:42:44 ukai Exp $ +$Id: ChangeLog,v 1.134 2001/12/17 15:54:14 ukai Exp $ @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.36 2001/12/14 17:35:08 ukai Exp $ */ +/* $Id: main.c,v 1.37 2001/12/17 15:54:14 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include <signal.h> @@ -2307,26 +2307,6 @@ reMark(void) } #endif /* USE_MARK */ -#ifdef JP_CHARSET -static char * -cURLcode(char *url, Buffer *buf) -{ - char *p; - Str s; - - for (p = url; *p; p++) { - if (!IS_ASCII(*p)) { - /* URL contains Kanji... uugh */ - s = conv(url, InnerCode, buf->document_code); - return s->ptr; - } - } - return url; -} -#else /* not JP_CHARSET */ -#define cURLcode(url,buf) (url) -#endif /* not JP_CHARSET */ - static Buffer * loadNormalBuf(Buffer *buf, int renderframe) { @@ -2353,8 +2333,7 @@ loadLink(char *url, char *target, char *referer, FormList *request) referer = NO_REFERER; if (referer == NULL) referer = parsedURL2Str(&Currentbuf->currentURL)->ptr; - buf = loadGeneralFile(cURLcode(url, Currentbuf), - baseURL(Currentbuf), referer, flag, request); + buf = loadGeneralFile(url, baseURL(Currentbuf), referer, flag, request); if (buf == NULL) { char *emsg = Sprintf("Can't load %s", url)->ptr; disp_err_message(emsg, FALSE); @@ -2545,9 +2524,7 @@ followI(void) return; message(Sprintf("loading %s", a->url)->ptr, 0, 0); refresh(); - buf = - loadGeneralFile(cURLcode(a->url, Currentbuf), baseURL(Currentbuf), - NULL, 0, NULL); + buf = loadGeneralFile(a->url, baseURL(Currentbuf), NULL, 0, NULL); if (buf == NULL) { char *emsg = Sprintf("Can't load %s", a->url)->ptr; disp_err_message(emsg, FALSE); @@ -2691,7 +2668,7 @@ query_from_followform(Str *query, FormItemList *fi, int multipart) Strcat_charp(*query, ".x"); form_write_data(body, fi->parent->boundary, (*query)->ptr, "1"); - *query = Strdup(f2->name); + *query = Strdup(conv_form_encoding(f2->name, fi, Currentbuf)); Strcat_charp(*query, ".y"); form_write_data(body, fi->parent->boundary, (*query)->ptr, "1"); @@ -2715,9 +2692,13 @@ query_from_followform(Str *query, FormItemList *fi, int multipart) else { /* not multipart */ if (f2->type == FORM_INPUT_IMAGE) { - Strcat(*query, conv_form_encoding(f2->name, fi, Currentbuf)); + Strcat(*query, + Str_form_quote(conv_form_encoding + (f2->name, fi, Currentbuf))); Strcat_charp(*query, ".x=1&"); - Strcat(*query, conv_form_encoding(f2->name, fi, Currentbuf)); + Strcat(*query, + Str_form_quote(conv_form_encoding + (f2->name, fi, Currentbuf))); Strcat_charp(*query, ".y=1"); } else { |