fix conditions for UseGraphicChar

This commit is contained in:
Ito Hiroyuki
2010-08-04 14:06:35 +00:00
parent 7bba9d43e8
commit de4557c096
11 changed files with 101 additions and 56 deletions
+10 -1
View File
@@ -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
@@ -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 $
+1 -1
View File
@@ -230,7 +230,7 @@
エンティティを ASCII の代替表現で表す(デフォルト ON)
OFF にすると ISO 8859-1 として扱う。
graphic_char
テーブルやメニューの枠に graphic 文字を使う(デフォルト OFF)
テーブルやメニューの枠に DEC 特殊文字文字を使う(デフォルト OFF)
OFF の場合 CJK の文字コード、UTF-8 では罫線を使う。
コード変換
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+5 -2
View File
@@ -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;
+5 -5
View File
@@ -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 <signal.h>
@@ -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();
+28 -15
View File
@@ -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 "エンティティを ASCII の代替表現で表す"
#: 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 "ディレクトリ設定"
#: 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"
+36 -23
View File
@@ -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
msgid "Display Settings"
#: rc.c:339
msgid "ASCII"
msgstr ""
#: rc.c:697
msgid "Color Settings"
#: rc.c:340
msgid "charset specific"
msgstr ""
#: rc.c:699
msgid "Miscellaneous Settings"
msgstr ""
#: rc.c:700
msgid "Directory Settings"
msgstr ""
#: rc.c:701
msgid "External Program Settings"
#: rc.c:341
msgid "DEC special graphics"
msgstr ""
#: rc.c:702
msgid "Network Settings"
msgid "Display Settings"
msgstr ""
#: rc.c:703
msgid "Proxy Settings"
#: rc.c:704
msgid "Color Settings"
msgstr ""
#: rc.c:705
msgid "SSL Settings"
#: rc.c:706
msgid "Miscellaneous Settings"
msgstr ""
#: rc.c:707
msgid "Directory Settings"
msgstr ""
#: rc.c:708
msgid "External Program Settings"
msgstr ""
#: rc.c:709
msgid "Network Settings"
msgstr ""
#: rc.c:710
msgid "Proxy Settings"
msgstr ""
#: rc.c:712
msgid "SSL Settings"
msgstr ""
#: 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 ""
+11 -4
View File
@@ -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,
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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;
}