diff options
author | Tatsuya Kinoshita <tats@vega.ocn.ne.jp> | 2011-05-04 07:23:02 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@vega.ocn.ne.jp> | 2011-05-04 07:23:02 +0000 |
commit | 6db339b3d7a391f196e7c4b725a4ed0bd00f31cf (patch) | |
tree | 7d6fed976b72694d61fc595a745d394e1cd6e1a5 /rc.c | |
parent | Adding upstream version 0.5.1 (diff) | |
download | w3m-6db339b3d7a391f196e7c4b725a4ed0bd00f31cf.tar.gz w3m-6db339b3d7a391f196e7c4b725a4ed0bd00f31cf.zip |
Adding upstream version 0.5.2upstream/0.5.2
Diffstat (limited to '')
-rw-r--r-- | rc.c | 81 |
1 files changed, 56 insertions, 25 deletions
@@ -1,4 +1,4 @@ -/* $Id: rc.c,v 1.96 2004/04/22 16:34:08 ukai Exp $ */ +/* $Id: rc.c,v 1.106 2007/05/23 15:06:06 inu Exp $ */ /* * Initialization file etc. */ @@ -87,7 +87,7 @@ static int OptionEncode = FALSE; #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_FOLD_TEXTAREA N_("Fold lines in TEXTAREA") -#define CMT_DISP_INS_DEL N_("Display DEL, S and STRIKE element") +#define CMT_DISP_INS_DEL N_("Display INS, DEL, S and STRIKE element") #define CMT_COLOR N_("Display with color") #define CMT_B_COLOR N_("Color of normal character") #define CMT_A_COLOR N_("Color of anchor") @@ -152,6 +152,7 @@ static int OptionEncode = FALSE; #define CMT_MARK_ALL_PAGES N_("Treat URL-like strings as links in all pages") #define CMT_WRAP N_("Wrap search") #define CMT_VIEW_UNSEENOBJECTS N_("Display unseen objects (e.g. bgimage tag)") +#define CMT_AUTO_UNCOMPRESS N_("Uncompress compressed data automatically when downloading") #ifdef __EMX__ #define CMT_BGEXTVIEW N_("Run external viewer in a separate session") #else @@ -192,6 +193,7 @@ static int OptionEncode = FALSE; #endif /* USE_SSL */ #ifdef USE_COOKIE #define CMT_USECOOKIE N_("Enable cookie processing") +#define CMT_SHOWCOOKIE N_("Print a message when receiving a cookie") #define CMT_ACCEPTCOOKIE N_("Accept cookies") #define CMT_ACCEPTBADCOOKIE N_("Action to be taken on invalid cookie") #define CMT_COOKIE_REJECT_DOMAINS N_("Domains to reject cookies from") @@ -279,6 +281,13 @@ static struct sel_c defaulturls[] = { {0, NULL, NULL} }; +static struct sel_c displayinsdel[] = { + {N_S(DISPLAY_INS_DEL_SIMPLE), N_("simple")}, + {N_S(DISPLAY_INS_DEL_NORMAL), N_("use tag")}, + {N_S(DISPLAY_INS_DEL_FONTIFY), N_("fontify")}, + {0, NULL, NULL} +}; + #ifdef USE_MOUSE static struct sel_c wheelmode[] = { {TRUE, "1", N_("A:relative to screen height")}, @@ -289,22 +298,22 @@ static struct sel_c wheelmode[] = { #ifdef INET6 static struct sel_c dnsorders[] = { - {N_S(DNS_ORDER_UNSPEC), "unspecified"}, - {N_S(DNS_ORDER_INET_INET6), "inet inet6"}, - {N_S(DNS_ORDER_INET6_INET), "inet6 inet"}, - {N_S(DNS_ORDER_INET_ONLY), "inet only"}, - {N_S(DNS_ORDER_INET6_ONLY), "inet6 only"}, + {N_S(DNS_ORDER_UNSPEC), N_("unspecified")}, + {N_S(DNS_ORDER_INET_INET6), N_("inet inet6")}, + {N_S(DNS_ORDER_INET6_INET), N_("inet6 inet")}, + {N_S(DNS_ORDER_INET_ONLY), N_("inet only")}, + {N_S(DNS_ORDER_INET6_ONLY), N_("inet6 only")}, {0, NULL, NULL} }; #endif /* INET6 */ #ifdef USE_COOKIE static struct sel_c badcookiestr[] = { - {N_S(ACCEPT_BAD_COOKIE_DISCARD), "discard"}, + {N_S(ACCEPT_BAD_COOKIE_DISCARD), N_("discard")}, #if 0 - {N_S(ACCEPT_BAD_COOKIE_ACCEPT), "accept"}, + {N_S(ACCEPT_BAD_COOKIE_ACCEPT), N_("accept")}, #endif - {N_S(ACCEPT_BAD_COOKIE_ASK), "ask"}, + {N_S(ACCEPT_BAD_COOKIE_ASK), N_("ask")}, {0, NULL, NULL} }; #endif /* USE_COOKIE */ @@ -314,9 +323,9 @@ static wc_ces_list *display_charset_str = NULL; static wc_ces_list *document_charset_str = NULL; static wc_ces_list *system_charset_str = NULL; static struct sel_c auto_detect_str[] = { - {N_S(WC_OPT_DETECT_OFF), "OFF"}, - {N_S(WC_OPT_DETECT_ISO_2022), "Only ISO 2022"}, - {N_S(WC_OPT_DETECT_ON), "ON"}, + {N_S(WC_OPT_DETECT_OFF), N_("OFF")}, + {N_S(WC_OPT_DETECT_ISO_2022), N_("Only ISO 2022")}, + {N_S(WC_OPT_DETECT_ON), N_("ON")}, {0, NULL, NULL} }; #endif @@ -359,8 +368,8 @@ struct param_ptr params1[] = { CMT_GRAPHIC_CHAR, NULL}, {"fold_textarea", P_CHARINT, PI_ONOFF, (void *)&FoldTextarea, CMT_FOLD_TEXTAREA, NULL}, - {"display_ins_del", P_INT, PI_ONOFF, (void *)&displayInsDel, - CMT_DISP_INS_DEL, NULL}, + {"display_ins_del", P_INT, PI_SEL_C, (void *)&displayInsDel, + CMT_DISP_INS_DEL, displayinsdel}, {"ignore_null_img_alt", P_INT, PI_ONOFF, (void *)&ignore_null_img_alt, CMT_IGNORE_NULL_IMG_ALT, NULL}, {"view_unseenobject", P_INT, PI_ONOFF, (void *)&view_unseenobject, @@ -468,6 +477,8 @@ struct param_ptr params3[] = { NULL}, {"decode_cte", P_CHARINT, PI_ONOFF, (void *)&DecodeCTE, CMT_DECODE_CTE, NULL}, + {"auto_uncompress", P_CHARINT, PI_ONOFF, (void *)&AutoUncompress, + CMT_AUTO_UNCOMPRESS, NULL}, {"preserve_timestamp", P_CHARINT, PI_ONOFF, (void *)&PreserveTimestamp, CMT_PRESERVE_TIMESTAMP, NULL}, {"keymap_file", P_STRING, PI_TEXT, (void *)&keymap_file, CMT_KEYMAP_FILE, @@ -552,6 +563,8 @@ struct param_ptr params7[] = { #ifdef USE_COOKIE struct param_ptr params8[] = { {"use_cookie", P_INT, PI_ONOFF, (void *)&use_cookie, CMT_USECOOKIE, NULL}, + {"show_cookie", P_INT, PI_ONOFF, (void *)&show_cookie, + CMT_SHOWCOOKIE, NULL}, {"accept_cookie", P_INT, PI_ONOFF, (void *)&accept_cookie, CMT_ACCEPTCOOKIE, NULL}, {"accept_bad_cookie", P_INT, PI_SEL_C, (void *)&accept_bad_cookie, @@ -784,16 +797,18 @@ show_params(FILE * fp) char *t = NULL; char *cmt; -#if ENABLE_NLS +#ifdef USE_M17N +#ifdef ENABLE_NLS OptionCharset = SystemCharset; /* FIXME */ #endif +#endif fputs("\nconfiguration parameters\n", fp); for (j = 0; sections[j].name != NULL; j++) { #ifdef USE_M17N if (!OptionEncode) cmt = - wc_conv(gettext(sections[j].name), OptionCharset, + wc_conv(_(sections[j].name), OptionCharset, InnerCharset)->ptr; else #endif @@ -839,7 +854,7 @@ show_params(FILE * fp) } #ifdef USE_M17N if (!OptionEncode) - cmt = wc_conv(gettext(sections[j].params[i].comment), + cmt = wc_conv(_(sections[j].params[i].comment), OptionCharset, InnerCharset)->ptr; else #endif @@ -1111,7 +1126,11 @@ do_mkdir(const char *dir, long mode) return mkdir(abs, mode); } #else /* not __EMX__ */ +#ifdef __MINGW32_VERSION +#define do_mkdir(dir,mode) mkdir(dir) +#else #define do_mkdir(dir,mode) mkdir(dir,mode) +#endif /* not __MINW32_VERSION */ #endif /* not __EMX__ */ void @@ -1303,26 +1322,38 @@ load_option_panel(void) if (optionpanel_str == NULL) optionpanel_str = Sprintf(optionpanel_src1, w3m_version, - html_quote(localCookie()->ptr), CMT_HELPER); -#if ENABLE_NLS + html_quote(localCookie()->ptr), _(CMT_HELPER)); +#ifdef USE_M17N +#ifdef ENABLE_NLS OptionCharset = SystemCharset; /* FIXME */ #endif -#ifdef USE_M17N if (!OptionEncode) { optionpanel_str = wc_Str_conv(optionpanel_str, OptionCharset, InnerCharset); for (i = 0; sections[i].name != NULL; i++) { sections[i].name = - wc_conv(gettext(sections[i].name), OptionCharset, + wc_conv(_(sections[i].name), OptionCharset, InnerCharset)->ptr; - for (p = sections[i].params; p->name; p++) + for (p = sections[i].params; p->name; p++) { p->comment = - wc_conv(gettext(p->comment), OptionCharset, + wc_conv(_(p->comment), OptionCharset, InnerCharset)->ptr; + if (p->inputtype == PI_SEL_C +#ifdef USE_COLOR + && p->select != colorstr +#endif + ) { + for (s = (struct sel_c *)p->select; s->text != NULL; s++) { + s->text = + wc_conv(_(s->text), OptionCharset, + InnerCharset)->ptr; + } + } + } } #ifdef USE_COLOR for (s = colorstr; s->text; s++) - s->text = wc_conv(gettext(s->text), OptionCharset, + s->text = wc_conv(_(s->text), OptionCharset, InnerCharset)->ptr; #endif OptionEncode = TRUE; |