From de4557c096f0ef91763331e8ca3c8fe45b223aca Mon Sep 17 00:00:00 2001 From: Ito Hiroyuki Date: Wed, 4 Aug 2010 14:06:35 +0000 Subject: fix conditions for UseGraphicChar --- ChangeLog | 11 ++++++++++- doc-jp/README.m17n | 2 +- doc/MANUAL.html | 2 +- doc/README.m17n | 2 +- fm.h | 7 +++++-- main.c | 10 +++++----- po/ja.po | 43 ++++++++++++++++++++++++++++--------------- po/w3m.pot | 39 ++++++++++++++++++++++++++------------- rc.c | 15 +++++++++++---- symbol.c | 2 +- terms.c | 4 ++-- 11 files changed, 91 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6711207..3a4b08a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-08-04 Ito Hiroyuki + + * [w3m-dev 04369] Re: w3m's bugs from bugs.debian.org + * terms.c (graph_ok): fix condition (UseGraphicChar != GRAPHIC_CHAR_DEC) + * symbol.c (get_symbol): fix condition (UseGraphicChar != GRAPHIC_CHAR_ASCII) + * rc.c (params1): type of graphic_char option is PI_SEL_C + * main.c (main): use GRAPHIC_CHAR_ASCII and GRAPHIC_CHAR_DEC instead of FALSE and TRUE + * fm.h (GRAPHIC_CHAR_ASCII, GRAPHIC_CHAR_DEC, GRAPHIC_CHAR_CHARSET): added + 2010-08-03 d+w3m@vdr.jp * [w3m-dev 04363] Re: w3m's bugs from bugs.debian.org @@ -9099,4 +9108,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.1026 2010/08/03 10:25:23 htrb Exp $ +$Id: ChangeLog,v 1.1027 2010/08/04 14:06:35 htrb Exp $ diff --git a/doc-jp/README.m17n b/doc-jp/README.m17n index 39efd93..0c13872 100644 --- a/doc-jp/README.m17n +++ b/doc-jp/README.m17n @@ -230,7 +230,7 @@ エンティティを ASCII の代替表現で表す(デフォルト ON) OFF にすると ISO 8859-1 として扱う。 graphic_char - テーブルやメニューの枠に graphic 文字を使う(デフォルト OFF) + テーブルやメニューの枠に DEC 特殊文字文字を使う(デフォルト OFF) OFF の場合 CJK の文字コード、UTF-8 では罫線を使う。 コード変換 diff --git a/doc/MANUAL.html b/doc/MANUAL.html index c134462..aff0189 100644 --- a/doc/MANUAL.html +++ b/doc/MANUAL.html @@ -129,7 +129,7 @@ with -cols option.
-no-proxy
Don't use proxy server.
-no-graph -
Don't use graphic character to draw frames. +
Use ASCII character to draw frames.
-no-mouse
Don't activate mouse.
-config file diff --git a/doc/README.m17n b/doc/README.m17n index 0dd1b78..d3a6ea5 100644 --- a/doc/README.m17n +++ b/doc/README.m17n @@ -202,7 +202,7 @@ Option pannel Use alternate expression with ASCII for entities. (Default: ON) If it is OFF, entities are treated as ISO 8859-1 graphic_char - Use graphic char for border of table and menu. + Use DEC special graphics for border of table and menu. If it is OFF, ruled line is used with CJK charset or UTF-8. Code conversion diff --git a/fm.h b/fm.h index 2dc0762..4e118b3 100644 --- a/fm.h +++ b/fm.h @@ -1,4 +1,4 @@ -/* $Id: fm.h,v 1.146 2010/08/03 10:02:16 htrb Exp $ */ +/* $Id: fm.h,v 1.147 2010/08/04 14:06:36 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_DEC 1 +#define GRAPHIC_CHAR_CHARSET 0 +global char UseGraphicChar init(GRAPHIC_CHAR_CHARSET); extern char *graph_symbol[]; extern char *graph2_symbol[]; extern int symbol_width; diff --git a/main.c b/main.c index 6e5b494..e510f79 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.266 2010/08/03 10:25:23 htrb Exp $ */ +/* $Id: main.c,v 1.267 2010/08/04 14:06:36 htrb Exp $ */ #define MAINPROGRAM #include "fm.h" #include @@ -240,8 +240,8 @@ fusage(FILE * f, int err) fprintf(f, " -cookie use cookie (-no-cookie: don't use cookie)\n"); #endif /* USE_COOKIE */ - fprintf(f, " -graph use graphic character\n"); - fprintf(f, " -no-graph don't use graphic character\n"); + fprintf(f, " -graph use DEC special graphics for border of table and menu\n"); + fprintf(f, " -no-graph use ACII character for border of table and menu\n"); fprintf(f, " -S squeeze multiple blank lines\n"); fprintf(f, " -W toggle wrap search mode\n"); fprintf(f, " -X don't use termcap init/deinit\n"); @@ -554,9 +554,9 @@ main(int argc, char **argv, char **envp) } #endif else if (!strcmp("-graph", argv[i])) - UseGraphicChar = TRUE; + UseGraphicChar = GRAPHIC_CHAR_DEC; else if (!strcmp("-no-graph", argv[i])) - UseGraphicChar = FALSE; + UseGraphicChar = GRAPHIC_CHAR_ASCII; else if (!strcmp("-T", argv[i])) { if (++i >= argc) usage(); diff --git a/po/ja.po b/po/ja.po index f9b3a3b..cd24fce 100644 --- a/po/ja.po +++ b/po/ja.po @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: w3m 0.5.2\n" "Report-Msgid-Bugs-To: satodai@w3m.jp\n" -"POT-Creation-Date: 2010-07-26 16:12+0900\n" -"PO-Revision-Date: 2010-07-26 16:13+0900\n" +"POT-Creation-Date: 2010-08-04 18:33+0900\n" +"PO-Revision-Date: 2010-08-04 18:36+0900\n" "Last-Translator: Fumitoshi UKAI \n" "Language-Team: Japanese\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -202,8 +203,8 @@ msgid "Use ASCII equivalents to display entities" msgstr "潟cc ASCII 篁f粋;憗ц;" #: rc.c:90 -msgid "Use graphic char for border of table and menu" -msgstr "若<ャ若 graphic 絖篏帥" +msgid "Character type for border of table and menu" +msgstr "若<ャ若篏帥絖" #: rc.c:91 msgid "Fold lines in TEXTAREA" @@ -801,43 +802,55 @@ msgstr "ISO 2022 " msgid "ON" msgstr "" -#: rc.c:695 +#: rc.c:339 +msgid "ASCII" +msgstr "ASCII" + +#: rc.c:340 +msgid "charset specific" +msgstr "絖潟若箴絖" + +#: rc.c:341 +msgid "DEC special graphics" +msgstr "DEC 号絖" + +#: rc.c:702 msgid "Display Settings" msgstr "茵腓咲≫" -#: rc.c:697 +#: rc.c:704 msgid "Color Settings" msgstr "茵腓肴" -#: rc.c:699 +#: rc.c:706 msgid "Miscellaneous Settings" msgstr "紊荐絎" -#: rc.c:700 +#: rc.c:707 msgid "Directory Settings" msgstr "c荐絎" -#: rc.c:701 +#: rc.c:708 msgid "External Program Settings" msgstr "紊違" -#: rc.c:702 +#: rc.c:709 msgid "Network Settings" msgstr "若荐絎" -#: rc.c:703 +#: rc.c:710 msgid "Proxy Settings" msgstr "激荐絎" -#: rc.c:705 +#: rc.c:712 msgid "SSL Settings" msgstr "SSL荐絎" -#: rc.c:708 +#: rc.c:715 msgid "Cookie Settings" msgstr "若荐絎" -#: rc.c:711 +#: rc.c:718 msgid "Charset Settings" msgstr "絖潟若荐絎" @@ -846,6 +859,6 @@ msgstr "絖潟若荐絎" #. * header. For example, ja.po should translate it as #. * "ja;q=1.0, en;q=0.5" like that. #. -#: rc.c:1190 +#: rc.c:1197 msgid "en;q=1.0" msgstr "ja;q=1.0, en;q=0.5" diff --git a/po/w3m.pot b/po/w3m.pot index a5af740..b912654 100644 --- a/po/w3m.pot +++ b/po/w3m.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: satodai@w3m.jp\n" -"POT-Creation-Date: 2010-07-26 16:12+0900\n" +"POT-Creation-Date: 2010-08-04 18:33+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" @@ -201,7 +202,7 @@ msgid "Use ASCII equivalents to display entities" msgstr "" #: rc.c:90 -msgid "Use graphic char for border of table and menu" +msgid "Character type for border of table and menu" msgstr "" #: rc.c:91 @@ -800,43 +801,55 @@ msgstr "" msgid "ON" msgstr "" -#: rc.c:695 +#: rc.c:339 +msgid "ASCII" +msgstr "" + +#: rc.c:340 +msgid "charset specific" +msgstr "" + +#: rc.c:341 +msgid "DEC special graphics" +msgstr "" + +#: rc.c:702 msgid "Display Settings" msgstr "" -#: rc.c:697 +#: rc.c:704 msgid "Color Settings" msgstr "" -#: rc.c:699 +#: rc.c:706 msgid "Miscellaneous Settings" msgstr "" -#: rc.c:700 +#: rc.c:707 msgid "Directory Settings" msgstr "" -#: rc.c:701 +#: rc.c:708 msgid "External Program Settings" msgstr "" -#: rc.c:702 +#: rc.c:709 msgid "Network Settings" msgstr "" -#: rc.c:703 +#: rc.c:710 msgid "Proxy Settings" msgstr "" -#: rc.c:705 +#: rc.c:712 msgid "SSL Settings" msgstr "" -#: rc.c:708 +#: rc.c:715 msgid "Cookie Settings" msgstr "" -#: rc.c:711 +#: rc.c:718 msgid "Charset Settings" msgstr "" @@ -845,6 +858,6 @@ msgstr "" #. * header. For example, ja.po should translate it as #. * "ja;q=1.0, en;q=0.5" like that. #. -#: rc.c:1190 +#: rc.c:1197 msgid "en;q=1.0" msgstr "" diff --git a/rc.c b/rc.c index 99d65bc..22fad7f 100644 --- a/rc.c +++ b/rc.c @@ -1,4 +1,4 @@ -/* $Id: rc.c,v 1.114 2010/07/26 11:38:53 htrb Exp $ */ +/* $Id: rc.c,v 1.115 2010/08/04 14:06:36 htrb Exp $ */ /* * Initialization file etc. */ @@ -87,7 +87,7 @@ static int OptionEncode = FALSE; #endif #define CMT_MULTICOL N_("Display file names in multi-column format") #define CMT_ALT_ENTITY N_("Use ASCII equivalents to display entities") -#define CMT_GRAPHIC_CHAR N_("Use graphic char for border of table and menu") +#define CMT_GRAPHIC_CHAR N_("Character type for border of table and menu") #define CMT_FOLD_TEXTAREA N_("Fold lines in TEXTAREA") #define CMT_DISP_INS_DEL N_("Display INS, DEL, S and STRIKE element") #define CMT_COLOR N_("Display with color") @@ -335,6 +335,13 @@ static struct sel_c auto_detect_str[] = { }; #endif +static struct sel_c graphic_char_str[] = { + {N_S(GRAPHIC_CHAR_ASCII), N_("ASCII")}, + {N_S(GRAPHIC_CHAR_CHARSET), N_("charset specific")}, + {N_S(GRAPHIC_CHAR_DEC), N_("DEC special graphics")}, + {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, @@ -371,8 +378,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, diff --git a/symbol.c b/symbol.c index f4215ed..50475ae 100644 --- a/symbol.c +++ b/symbol.c @@ -87,7 +87,7 @@ get_symbol(wc_ces charset, int *width) charset_symbol_set *p; symbol_set *s = NULL; - if (UseGraphicChar) { + if (UseGraphicChar != GRAPHIC_CHAR_ASCII) { if (charset == save_charset && save_symbol != NULL && *width == save_symbol->width) { return save_symbol->conved_item; diff --git a/terms.c b/terms.c index 870f523..e031586 100644 --- a/terms.c +++ b/terms.c @@ -1,4 +1,4 @@ -/* $Id: terms.c,v 1.61 2010/07/25 09:55:05 htrb Exp $ */ +/* $Id: terms.c,v 1.62 2010/08/04 14:06:36 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_DEC) return 0; return T_as[0] != 0 && T_ae[0] != 0 && T_ac[0] != 0; } -- cgit v1.2.3