diff options
-rw-r--r-- | ChangeLog | 29 | ||||
-rw-r--r-- | config.h.in | 4 | ||||
-rw-r--r-- | etc.c | 7 | ||||
-rw-r--r-- | file.c | 24 | ||||
-rw-r--r-- | fm.h | 11 | ||||
-rw-r--r-- | ftp.c | 7 | ||||
-rw-r--r-- | mimehead.c | 14 | ||||
-rw-r--r-- | news.c | 8 | ||||
-rw-r--r-- | proto.h | 47 | ||||
-rw-r--r-- | terms.c | 4 |
10 files changed, 105 insertions, 50 deletions
@@ -1,5 +1,32 @@ 2003-10-06 Fumitoshi UKAI <ukai@debian.or.jp> + * fix build error --disbable-m17n + * config.h.in: undef USE_M17N, USE_UNICODE + * etc.c (url_unquote_conv): USE_M17N + * file.c (convertLine): USE_M17N + (loadHTMLStream): fix ifdef USE_IMAGE->USE_M17N + (loadBuffer): fix USE_M17N + (getNextPage): fix USE_M17N + * fm.h (USE_M17N): don't define USE_M17N in case LANG == JA + (this should be done by configure) + (wc_ces): dummy typedef + (wc_Str_conv): fix non-m17n macro args + (wc_Str_conv_strict): ditto + * ftp.c (loadFTPDir): fix undefined USE_M17N + * mimehead.c (decodeWord): ditto + (decodeMIME): ditto + * news.c (loadNewsgroup): ditto + * proto.h (convertLine): ditto + (loadGopherDir): ditto + (loadFTPDir): ditto + (loadNewsgroup): ditto + (decodeWord): ditto + (decodeMIME): ditto + (url_unquote_conv): ditto + * terms.c (SETCH): ditto + +2003-10-06 Fumitoshi UKAI <ukai@debian.or.jp> + * --with-imagelib request on [w3m-dev 03981] from Mamoru KOMACHI <usata@sodan.ecc.u-tokyo.ac.jp> * acinclude.m4 (AC_W3M_IMAGE): add --with-imagelib @@ -8144,4 +8171,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.880 2003/10/05 16:59:37 ukai Exp $ +$Id: ChangeLog,v 1.881 2003/10/05 18:52:50 ukai Exp $ diff --git a/config.h.in b/config.h.in index 790be75..576397d 100644 --- a/config.h.in +++ b/config.h.in @@ -38,8 +38,8 @@ #define DISPLAY_CHARSET @DISPLAY_CHARSET@ #define SYSTEM_CHARSET @SYSTEM_CHARSET@ #define DOCUMENT_CHARSET @DOCUMENT_CHARSET@ -#define USE_M17N -#define USE_UNICODE +#undef USE_M17N +#undef USE_UNICODE #define W3M_LANG @W3M_LANG@ #define LANG W3M_LANG @@ -1,4 +1,4 @@ -/* $Id: etc.c,v 1.74 2003/09/26 17:59:51 ukai Exp $ */ +/* $Id: etc.c,v 1.75 2003/10/05 18:52:51 ukai Exp $ */ #include "fm.h" #include <pwd.h> #include "myctype.h" @@ -1649,8 +1649,13 @@ file_to_url(char *file) return tmp->ptr; } +#ifdef USE_M17N char * url_unquote_conv(char *url, wc_ces charset) +#else +char * +url_unquote_conv0(char *url) +#endif { #ifdef USE_M17N wc_uint8 old_auto_detect = WcOption.auto_detect; @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.229 2003/09/26 17:59:51 ukai Exp $ */ +/* $Id: file.c,v 1.230 2003/10/05 18:52:51 ukai Exp $ */ #include "fm.h" #include <sys/types.h> #include "myctype.h" @@ -454,9 +454,14 @@ acceptableEncoding() /* * convert line */ +#ifdef USE_M17N Str convertLine(URLFile *uf, Str line, int mode, wc_ces * charset, wc_ces doc_charset) +#else +Str +convertLine0(URLFile *uf, Str line, int mode) +#endif { #ifdef USE_M17N line = wc_Str_conv_with_detect(line, charset, doc_charset, InnerCharset); @@ -1904,7 +1909,8 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, tmp = tmpfname(TMPF_SRC, ".html"); src = fopen(tmp->ptr, "w"); if (src) { - Str s = wc_Str_conv_strict(page, InnerCharset, charset); + Str s; + s = wc_Str_conv_strict(page, InnerCharset, charset); Strfputs(s, src); fclose(src); } @@ -6597,13 +6603,11 @@ loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal) } meta_charset = 0; } +#endif lineBuf2 = convertLine(f, lineBuf2, HTML_MODE, &charset, doc_charset); -#ifdef USE_IMAGE +#ifdef USE_M17N cur_document_charset = charset; #endif -#else - lineBuf2 = convertLine(f, lineBuf2, HTML_MODE); -#endif HTMLlineproc0(lineBuf2->ptr, &htmlenv1, internal); } if (obuf.status != R_ST_NORMAL) { @@ -6841,12 +6845,8 @@ loadBuffer(URLFile *uf, Buffer *volatile newBuf) showProgress(&linelen, &trbyte); if (frame_source) continue; -#ifdef USE_M17N lineBuf2 = convertLine(uf, lineBuf2, PAGER_MODE, &charset, doc_charset); -#else - lineBuf2 = convertLine(uf, lineBuf2, PAGER_MODE); -#endif if (squeezeBlankLine) { if (lineBuf2->ptr[0] == '\n' && pre_lbuf == '\n') { ++nlines; @@ -7260,12 +7260,8 @@ getNextPage(Buffer *buf, int plen) } linelen += lineBuf2->length; showProgress(&linelen, &trbyte); -#ifdef USE_M17N lineBuf2 = convertLine(&uf, lineBuf2, PAGER_MODE, &charset, doc_charset); -#else - lineBuf2 = convertLine(&uf, lineBuf2, PAGER_MODE); -#endif if (squeezeBlankLine) { squeeze_flag = FALSE; if (lineBuf2->ptr[0] == '\n' && pre_lbuf == '\n') { @@ -1,4 +1,4 @@ -/* $Id: fm.h,v 1.123 2003/09/26 20:45:53 ukai Exp $ */ +/* $Id: fm.h,v 1.124 2003/10/05 18:52:51 ukai Exp $ */ /* * w3m: WWW wo Miru utility * @@ -39,12 +39,11 @@ #include "html.h" #include <gc.h> #include "Str.h" -#if LANG == JA -#define USE_M17N -#endif /* LANG == JA */ #ifdef USE_M17N #include "wc.h" #include "wtf.h" +#else +typedef int wc_ces; /* XXX: not used */ #endif #ifdef HAVE_LOCALE_H @@ -1036,8 +1035,8 @@ global char SearchConv init(TRUE); #define conv_from_system(x) (x) #define conv_to_system(x) (x) #define url_quote_conv(x,c) url_quote(x) -#define wc_Str_conv(x) (x) -#define wc_Str_conv_strict(x) (x) +#define wc_Str_conv(x,charset0,charset1) (x) +#define wc_Str_conv_strict(x,charset0,charset1) (x) #endif global char UseAltEntity init(TRUE); global char UseGraphicChar init(FALSE); @@ -1,4 +1,4 @@ -/* $Id: ftp.c,v 1.32 2003/09/22 21:02:18 ukai Exp $ */ +/* $Id: ftp.c,v 1.33 2003/10/05 18:52:51 ukai Exp $ */ #include <stdio.h> #include <pwd.h> #include <Str.h> @@ -416,8 +416,13 @@ openFTPStream(ParsedURL *pu, URLFile *uf) return NULL; } +#ifdef USE_M17N Str loadFTPDir(ParsedURL *pu, wc_ces * charset) +#else +Str +loadFTPDir0(ParsedURL *pu) +#endif { Str FTPDIRtmp; Str tmp; @@ -1,4 +1,4 @@ -/* $Id: mimehead.c,v 1.9 2003/09/22 21:02:20 ukai Exp $ */ +/* $Id: mimehead.c,v 1.10 2003/10/05 18:52:51 ukai Exp $ */ /* * MIME header support by Akinori ITO */ @@ -191,8 +191,13 @@ decodeQP(char **ww) return a; } +#ifdef USE_M17N Str decodeWord(char **ow, wc_ces * charset) +#else +Str +decodeWord0(char **ow) +#endif { #ifdef USE_M17N wc_ces c; @@ -215,7 +220,7 @@ decodeWord(char **ow, wc_ces * charset) if (!c) goto convert_fail; #else - if (strcasecmp(buf, "ISO-8859-1") != 0 && strcasecmp(buf, "US_ASCII") != 0) + if (strcasecmp(tmp->ptr, "ISO-8859-1") != 0 && strcasecmp(tmp->ptr, "US_ASCII") != 0) /* NOT ISO-8859-1 encoding ... don't convert */ goto convert_fail; #endif @@ -255,8 +260,13 @@ decodeWord(char **ow, wc_ces * charset) /* * convert MIME encoded string to the original one */ +#ifdef USE_M17N Str decodeMIME(Str orgstr, wc_ces * charset) +#else +Str +decodeMIME0(Str orgstr) +#endif { char *org = orgstr->ptr, *endp = org + orgstr->length; char *org0, *p; @@ -1,4 +1,4 @@ -/* $Id: news.c,v 1.16 2003/09/22 21:02:20 ukai Exp $ */ +/* $Id: news.c,v 1.17 2003/10/05 18:52:51 ukai Exp $ */ #include "fm.h" #include "myctype.h" #include <stdio.h> @@ -302,8 +302,14 @@ openNewsStream(ParsedURL *pu) return NULL; } + +#ifdef USE_M17N Str loadNewsgroup(ParsedURL *pu, wc_ces * charset) +#else +Str +loadNewsgroup0(ParsedURL *pu) +#endif { volatile Str page; Str tmp; @@ -1,4 +1,4 @@ -/* $Id: proto.h,v 1.96 2003/09/22 21:02:20 ukai Exp $ */ +/* $Id: proto.h,v 1.97 2003/10/05 18:52:51 ukai Exp $ */ /* * This file was automatically generated by version 1.7 of cextract. * Manual editing not recommended. @@ -168,12 +168,13 @@ extern int dir_exist(char *path); #ifdef USE_M17N extern char **get_symbol(wc_ces charset, int *width); extern char **set_symbol(int width); +extern Str convertLine(URLFile *uf, Str line, int mode, wc_ces * charset, + wc_ces doc_charset); #else -#define convertLine(a,b,c,d,e) _convertLine(a,b,c) extern char **get_symbol(void); +extern Str convertLine0(URLFile *uf, Str line, int mode); +#define convertLine(uf,line,mode,charset,dcharset) convertLine0(uf,line,mode) #endif -extern Str convertLine(URLFile *uf, Str line, int mode, wc_ces * charset, - wc_ces doc_charset); extern void push_symbol(Str str, char symbol, int width, int n); extern Buffer *loadFile(char *path); extern Buffer *loadGeneralFile(char *path, ParsedURL *current, char *referer, @@ -230,9 +231,6 @@ extern void loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal); extern Buffer *loadHTMLString(Str page); #ifdef USE_GOPHER -#ifndef USE_M17N -#define loadGopherDir(a,b,c) _loadGopherDir(a,b) -#endif extern Str loadGopherDir(URLFile *uf, ParsedURL *pu, wc_ces * charset); #endif /* USE_GOPHER */ extern Buffer *loadBuffer(URLFile *uf, Buffer *newBuf); @@ -522,18 +520,22 @@ extern char *guessContentType(char *filename); extern TextList *make_domain_list(char *domain_list); extern int check_no_proxy(char *domain); extern InputStream openFTPStream(ParsedURL *pu, URLFile *uf); -#ifndef USE_M17N -#define loadFTPDir(a,b) _loadFTPDir(a) -#endif +#ifdef USE_M17N extern Str loadFTPDir(ParsedURL *pu, wc_ces * charset); +#else +extern Str loadFTPDir0(ParsedURL *pu); +#define loadFTPDir(pu,charset) loadFTPDir0(pu) +#endif extern void closeFTP(void); extern void disconnectFTP(void); #ifdef USE_NNTP extern InputStream openNewsStream(ParsedURL *pu); -#ifndef USE_M17N -#define loadNewsgroup(a,b) _loadNewsgroup(a) -#endif +#ifdef USE_M17N extern Str loadNewsgroup(ParsedURL *pu, wc_ces * charset); +#else +extern Str loadNewsgroup0(ParsedURL *pu); +#define loadNewsgroup(pu,charset) loadNewsgroup0(pu) +#endif extern void closeNews(void); extern void disconnectNews(void); #endif @@ -578,12 +580,15 @@ extern Str decodeB(char **ww); extern Str decodeQ(char **ww); extern Str decodeQP(char **ww); extern Str decodeU(char **ww); -#ifndef USE_M17N -#define decodeWord(a,b) _decodeWord(a) -#define decodeMIME(a,b) _decodeMIME(a) -#endif +#ifdef USE_M17N extern Str decodeWord(char **ow, wc_ces * charset); extern Str decodeMIME(Str orgstr, wc_ces * charset); +#else +extern Str decodeWord0(char **ow); +extern Str decodeMIME0(Str orgstr); +#define decodeWord(ow,charset) decodeWord0(ow) +#define decodeMIME(orgstr,charset) decodeMIME0(orgstr) +#endif extern Str encodeB(char *a); extern int set_param_option(char *option); extern char *get_param_option(char *name); @@ -619,10 +624,12 @@ extern void mySystem(char *command, int background); extern Str myExtCommand(char *cmd, char *arg, int redirect); extern Str myEditor(char *cmd, char *file, int line); extern char *file_to_url(char *file); -#ifndef USE_M17N -#define url_unquote_conv(a,b) _url_unquote_conv(a) -#endif +#ifdef USE_M17N extern char *url_unquote_conv(char *url, wc_ces charset); +#else +extern char *url_unquote_conv0(char *url); +#define url_unquote_conv(url, charset) url_unquote_conv0(url) +#endif extern char *expandName(char *name); extern Str tmpfname(int type, char *ext); extern time_t mymktime(char *timestr); @@ -1,4 +1,4 @@ -/* $Id: terms.c,v 1.49 2003/09/22 21:02:22 ukai Exp $ */ +/* $Id: terms.c,v 1.50 2003/10/05 18:52:51 ukai Exp $ */ /* * An original curses library for EUC-kanji by Akinori ITO, December 1989 * revised by Akinori ITO, January 1995 @@ -305,7 +305,7 @@ typedef struct sgttyb TerminalMode; #define SETCH(var,ch,len) ((var) = New_Reuse(char, (var), (len) + 1), \ strncpy((var), (ch), (len)), (var)[len] = '\0') #else -#define SETCH(var,ch) ((var) = (ch)) +#define SETCH(var,ch,len) ((var) = (ch)) #endif /* Charactor Color */ |