commit bdf12dedd649b746a7a947e71e4e9e91e64fde28
parent 300fa7cd2846ea1482946291f320c6ae4b06414b
Author: htrb <htrb>
Date: Wed, 4 Aug 2010 14:06:35 +0000
fix conditions for UseGraphicChar
Diffstat:
11 files changed, 86 insertions(+), 41 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,12 @@
+2010-08-04 Ito Hiroyuki <ZXB01226@nifty.com>
+
+ * [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
diff --git 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
@@ -129,7 +129,7 @@ with -cols option.
<dt>-no-proxy
<dd>Don't use proxy server.
<dt>-no-graph
-<dd>Don't use graphic character to draw frames.
+<dd>Use ASCII character to draw frames.
<dt>-no-mouse
<dd>Don't activate mouse.
<dt>-config file
diff --git 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
@@ -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
@@ -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
@@ -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 <ukai@debian.or.jp>\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
@@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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
@@ -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
@@ -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
@@ -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;
}