* [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.
This commit is contained in:
Ito Hiroyuki
2010-07-19 12:08:41 +00:00
parent a19f155b48
commit 459e010eed
6 changed files with 53 additions and 27 deletions

View File

@@ -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;