diff options
author | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-07-19 12:08:41 +0000 |
---|---|---|
committer | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-07-19 12:08:41 +0000 |
commit | 459e010eed8f5217086045d20793ab87d2c8dc62 (patch) | |
tree | c9ce0a53a15c0026ce0306037d5b5c45559b1ec4 | |
parent | * [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org (diff) | |
download | w3m-459e010eed8f5217086045d20793ab87d2c8dc62.tar.gz w3m-459e010eed8f5217086045d20793ab87d2c8dc62.zip |
* [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org
* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=261174#10
* terms.c (graph_ok): check UseGraphicChar is GRAPHIC_CHAR_ALL or not.
* symbol.c (get_symbol): check UseGraphicChar.
* rc.c (graphic_char_str): added.
* main.c (sig_chld): use GRAPHIC_CHAR_ASCII and GRAPHIC_CHAR_ALL.
* fm.h (GRAPHIC_CHAR_ASCII, GRAPHIC_CHAR_CHARSET, GRAPHIC_CHAR_ALL): added.
* fm.h: UseGraphicChar is initialized as GRAPHIC_CHAR_ASCII.
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | fm.h | 7 | ||||
-rw-r--r-- | main.c | 6 | ||||
-rw-r--r-- | rc.c | 13 | ||||
-rw-r--r-- | symbol.c | 37 | ||||
-rw-r--r-- | terms.c | 4 |
6 files changed, 53 insertions, 27 deletions
@@ -1,6 +1,17 @@ 2010-07-19 d+w3m@vdr.jp * [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org + * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=261174#10 + * terms.c (graph_ok): check UseGraphicChar is GRAPHIC_CHAR_ALL or not. + * symbol.c (get_symbol): check UseGraphicChar. + * rc.c (graphic_char_str): added. + * main.c (sig_chld): use GRAPHIC_CHAR_ASCII and GRAPHIC_CHAR_ALL. + * fm.h (GRAPHIC_CHAR_ASCII, GRAPHIC_CHAR_CHARSET, GRAPHIC_CHAR_ALL): added. + * fm.h: UseGraphicChar is initialized as GRAPHIC_CHAR_ASCII. + +2010-07-19 d+w3m@vdr.jp + + * [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=185006#22 * main.c (sig_chld): save exit code to d->err. (addDownloadList): initialize d->running and d->err. @@ -8987,4 +8998,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.1010 2010/07/19 11:45:23 htrb Exp $ +$Id: ChangeLog,v 1.1011 2010/07/19 12:08:41 htrb Exp $ @@ -1,4 +1,4 @@ -/* $Id: fm.h,v 1.140 2010/07/19 11:45:24 htrb Exp $ */ +/* $Id: fm.h,v 1.141 2010/07/19 12:08:41 htrb Exp $ */ /* * w3m: WWW wo Miru utility * @@ -1057,7 +1057,10 @@ global char SimplePreserveSpace init(FALSE); #define wc_Str_conv_strict(x,charset0,charset1) (x) #endif global char UseAltEntity init(TRUE); -global char UseGraphicChar init(FALSE); +#define GRAPHIC_CHAR_ASCII 2 +#define GRAPHIC_CHAR_CHARSET 0 +#define GRAPHIC_CHAR_ALL 1 +global char UseGraphicChar init(GRAPHIC_CHAR_ASCII); extern char *graph_symbol[]; extern char *graph2_symbol[]; extern int symbol_width; @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.261 2010/07/19 11:45:24 htrb Exp $ */ +/* $Id: main.c,v 1.262 2010/07/19 12:08:41 htrb Exp $ */ #define MAINPROGRAM #include "fm.h" #include <signal.h> @@ -562,9 +562,9 @@ main(int argc, char **argv, char **envp) } #endif else if (!strcmp("-graph", argv[i])) - UseGraphicChar = TRUE; + UseGraphicChar = GRAPHIC_CHAR_ALL; else if (!strcmp("-no-graph", argv[i])) - UseGraphicChar = FALSE; + UseGraphicChar = GRAPHIC_CHAR_ASCII; else if (!strcmp("-T", argv[i])) { if (++i >= argc) usage(); @@ -1,4 +1,4 @@ -/* $Id: rc.c,v 1.107 2010/07/19 09:00:34 htrb Exp $ */ +/* $Id: rc.c,v 1.108 2010/07/19 12:08:41 htrb Exp $ */ /* * Initialization file etc. */ @@ -331,6 +331,13 @@ static struct sel_c auto_detect_str[] = { }; #endif +static struct sel_c graphic_char_str[] = { + {N_S(GRAPHIC_CHAR_ASCII), N_("No")}, + {N_S(GRAPHIC_CHAR_CHARSET), N_("Yes, but only charset specific")}, + {N_S(GRAPHIC_CHAR_ALL), N_("Yes")}, + {0, NULL, NULL} +}; + struct param_ptr params1[] = { {"tabstop", P_NZINT, PI_TEXT, (void *)&Tabstop, CMT_TABSTOP, NULL}, {"indent_incr", P_NZINT, PI_TEXT, (void *)&IndentIncr, CMT_INDENT_INCR, @@ -365,8 +372,8 @@ struct param_ptr params1[] = { {"multicol", P_INT, PI_ONOFF, (void *)&multicolList, CMT_MULTICOL, NULL}, {"alt_entity", P_CHARINT, PI_ONOFF, (void *)&UseAltEntity, CMT_ALT_ENTITY, NULL}, - {"graphic_char", P_CHARINT, PI_ONOFF, (void *)&UseGraphicChar, - CMT_GRAPHIC_CHAR, NULL}, + {"graphic_char", P_CHARINT, PI_SEL_C, (void *)&UseGraphicChar, + CMT_GRAPHIC_CHAR, (void *)graphic_char_str}, {"fold_textarea", P_CHARINT, PI_ONOFF, (void *)&FoldTextarea, CMT_FOLD_TEXTAREA, NULL}, {"display_ins_del", P_INT, PI_SEL_C, (void *)&displayInsDel, @@ -86,24 +86,29 @@ get_symbol(wc_ces charset, int *width) charset_symbol_set *p; symbol_set *s = NULL; - if (charset == save_charset && save_symbol != NULL && - *width == save_symbol->width) { - *width = save_symbol->width; - return save_symbol->item; - } - save_charset = charset; - for (p = charset_symbol_list; p->charset; p++) { - if (charset == p->charset && - (*width == 0 || *width == p->symbol->width)) { - s = p->symbol; - break; + if (UseGraphicChar != GRAPHIC_CHAR_ASCII) { + if (charset == save_charset && save_symbol != NULL && + *width == save_symbol->width) + return save_symbol->item; + save_charset = charset; + for (p = charset_symbol_list; p->charset; p++) { + if (charset == p->charset && + (*width == 0 || *width == p->symbol->width)) { + s = p->symbol; + break; + } } - } - if (s == NULL) + if (s == NULL) + s = (*width == 2) ? &alt2_symbol_set : &alt_symbol_set; + if (s != save_symbol) { + if (!s->encode) + encode_symbol(s); + save_symbol = s; + } + } else { + if (save_symbol != NULL && *width == save_symbol->width) + return save_symbol->item; s = (*width == 2) ? &alt2_symbol_set : &alt_symbol_set; - if (s != save_symbol) { - if (!s->encode) - encode_symbol(s); save_symbol = s; } *width = s->width; @@ -1,4 +1,4 @@ -/* $Id: terms.c,v 1.59 2010/07/18 13:31:24 htrb Exp $ */ +/* $Id: terms.c,v 1.60 2010/07/19 12:08:41 htrb Exp $ */ /* * An original curses library for EUC-kanji by Akinori ITO, December 1989 * revised by Akinori ITO, January 1995 @@ -1201,7 +1201,7 @@ graphend(void) int graph_ok(void) { - if (!UseGraphicChar) + if (UseGraphicChar != GRAPHIC_CHAR_ALL) return 0; return T_as[0] != 0 && T_ae[0] != 0 && T_ac[0] != 0; } |