[w3m-dev 02481] Re: #ifdef cleanup

From: Fumitoshi UKAI <ukai@debian.or.jp>
This commit is contained in:
Fumitoshi UKAI
2001-11-21 19:24:35 +00:00
parent cba7edc34e
commit ea92fdcecb
15 changed files with 239 additions and 235 deletions

44
rc.c
View File

@@ -1,4 +1,4 @@
/* $Id: rc.c,v 1.6 2001/11/21 16:29:47 ukai Exp $ */
/* $Id: rc.c,v 1.7 2001/11/21 19:24:35 ukai Exp $ */
/*
* Initialization file etc.
*/
@@ -43,7 +43,7 @@ static int rc_initialized = 0;
#if defined(USE_SSL) && defined(USE_SSL_VERIFY)
#define P_SSLPATH 5
#endif
#ifdef COLOR
#ifdef USE_COLOR
#define P_COLOR 6
#endif
#ifdef JP_CHARSET
@@ -115,10 +115,10 @@ static int rc_initialized = 0;
#define CMT_IFILE "<22>ƥǥ<C6A5><C7A5><EFBFBD>ȥ<EFBFBD><C8A5>Υ<EFBFBD><CEA5><EFBFBD><EFBFBD>ǥå<C7A5><C3A5><EFBFBD><EFBFBD>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD>"
#define CMT_RETRY_HTTP "URL<52>˼<EFBFBD>ưŪ<C6B0><C5AA> http:// <20><><EFBFBD>䤦"
#define CMT_DECODE_CTE "<22><>¸<EFBFBD><C2B8><EFBFBD><EFBFBD> Content-Transfer-Encoding <20><><EFBFBD>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD>ɤ<EFBFBD><C9A4><EFBFBD>"
#ifdef MOUSE
#ifdef USE_MOUSE
#define CMT_MOUSE "<22>ޥ<EFBFBD><DEA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȥ<EFBFBD>"
#define CMT_REVERSE_MOUSE "<22>ޥ<EFBFBD><DEA5><EFBFBD><EFBFBD>Υɥ<CEA5><C9A5>å<EFBFBD>ư<EFBFBD><C6B0><EFBFBD><EFBFBD><EFBFBD>դˤ<D5A4><CBA4><EFBFBD>"
#endif /* MOUSE */
#endif /* USE_MOUSE */
#define CMT_CLEAR_BUF "ɽ<><C9BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4>ʤ<EFBFBD><CAA4>Хåե<C3A5><D5A5>Υ<EFBFBD><CEA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#define CMT_NOSENDREFERER "Referer: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD>ˤ<EFBFBD><CBA4><EFBFBD>"
#define CMT_IGNORE_CASE "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD>ζ<EFBFBD><CEB6>̤򤷤ʤ<F2A4B7A4>"
@@ -210,10 +210,10 @@ static int rc_initialized = 0;
#define CMT_IFILE "Index file for the directory"
#define CMT_RETRY_HTTP "Prepend http:// to URL automatically"
#define CMT_DECODE_CTE "Decode Content-Transfer-Encoding when saving"
#ifdef MOUSE
#ifdef USE_MOUSE
#define CMT_MOUSE "Use mouse"
#define CMT_REVERSE_MOUSE "Reverse mouse dragging action"
#endif /* MOUSE */
#endif /* USE_MOUSE */
#define CMT_CLEAR_BUF "Free memory of the undisplayed buffers"
#define CMT_NOSENDREFERER "Don't send header `Referer:'"
#define CMT_IGNORE_CASE "Ignore case when search"
@@ -279,7 +279,7 @@ static struct sel_c scodestr[] =
};
#endif /* JP_CHARSET */
#ifdef COLOR
#ifdef USE_COLOR
static struct sel_c colorstr[] =
{
#if LANG == JA
@@ -306,7 +306,7 @@ static struct sel_c colorstr[] =
{0, NULL, NULL}
#endif /* LANG != JA */
};
#endif /* COLOR */
#endif /* USE_COLOR */
#ifdef INET6
static struct sel_c dnsorders[] =
@@ -353,7 +353,7 @@ struct param_ptr params1[] =
{NULL, 0, 0, NULL, NULL, NULL},
};
#ifdef COLOR
#ifdef USE_COLOR
struct param_ptr params2[] =
{
{"color", P_INT, PI_ONOFF, (void *) &useColor, CMT_COLOR, NULL},
@@ -361,16 +361,16 @@ struct param_ptr params2[] =
{"anchor_color", P_COLOR, PI_SEL_C, (void *) &anchor_color, CMT_A_COLOR, colorstr},
{"image_color", P_COLOR, PI_SEL_C, (void *) &image_color, CMT_I_COLOR, colorstr},
{"form_color", P_COLOR, PI_SEL_C, (void *) &form_color, CMT_F_COLOR, colorstr},
#ifdef BG_COLOR
#ifdef USE_BG_COLOR
{"bg_color", P_COLOR, PI_SEL_C, (void *) &bg_color, CMT_BG_COLOR, colorstr},
#endif /* BG_COLOR */
#endif /* USE_BG_COLOR */
{"active_style", P_INT, PI_ONOFF, (void *) &useActiveColor, CMT_ACTIVE_STYLE, NULL},
{"active_color", P_COLOR, PI_SEL_C, (void *) &active_color, CMT_C_COLOR, colorstr},
{"visited_anchor", P_INT, PI_ONOFF, (void *) &useVisitedColor, CMT_VISITED_ANCHOR, NULL},
{"visited_color", P_COLOR, PI_SEL_C, (void *) &visited_color, CMT_V_COLOR, colorstr},
{NULL, 0, 0, NULL, NULL, NULL},
};
#endif /* COLOR */
#endif /* USE_COLOR */
struct param_ptr params3[] =
@@ -383,10 +383,10 @@ struct param_ptr params3[] =
{"confirm_qq", P_INT, PI_ONOFF, (void *) &confirm_on_quit, CMT_CONFIRM_QQ, NULL},
{"wrap_search", P_INT, PI_ONOFF, (void *) &WrapDefault, CMT_WRAP, NULL},
{"ignorecase_search", P_INT, PI_ONOFF, (void *) &IgnoreCase, CMT_IGNORE_CASE, NULL},
#ifdef MOUSE
#ifdef USE_MOUSE
{"use_mouse", P_INT, PI_ONOFF, (void *) &use_mouse, CMT_MOUSE, NULL},
{"reverse_mouse", P_INT, PI_ONOFF, (void *) &reverse_mouse, CMT_REVERSE_MOUSE, NULL},
#endif /* MOUSE */
#endif /* USE_MOUSE */
{"clear_buffer", P_INT, PI_ONOFF, (void *) &clear_buffer, CMT_CLEAR_BUF, NULL},
{"decode_cte", P_CHARINT, PI_ONOFF, (void *) &DecodeCTE, CMT_DECODE_CTE, NULL},
{NULL, 0, 0, NULL, NULL, NULL},
@@ -476,9 +476,9 @@ struct param_section sections[] =
{
#if LANG == JA
{"ɽ<EFBFBD><EFBFBD><EFBFBD>ط<EFBFBD>", params1},
#ifdef COLOR
#ifdef USE_COLOR
{"ɽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", params2},
#endif /* COLOR */
#endif /* USE_COLOR */
{"<EFBFBD><EFBFBD>¿<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", params3},
{"<EFBFBD>ǥ<EFBFBD><EFBFBD><EFBFBD>ȥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", params5},
{"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ץ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", params6},
@@ -493,9 +493,9 @@ struct param_section sections[] =
#endif
#else /* LANG != JA */
{"Display", params1},
#ifdef COLOR
#ifdef USE_COLOR
{"Color Setting", params2},
#endif /* COLOR */
#endif /* USE_COLOR */
{"Miscellaneous Setting", params3},
{"Directory Setting", params5},
{"External Programs", params6},
@@ -643,7 +643,7 @@ show_params(FILE * fp)
t = "path";
break;
#endif
#ifdef COLOR
#ifdef USE_COLOR
case P_COLOR:
t = "color";
break;
@@ -702,7 +702,7 @@ str_to_bool(char *value, int old)
return 1;
}
#ifdef COLOR
#ifdef USE_COLOR
static int
str_to_color(char *value)
{
@@ -846,7 +846,7 @@ set_param(char *name, char *value)
ssl_path_modified = 1;
break;
#endif
#ifdef COLOR
#ifdef USE_COLOR
case P_COLOR:
*(int *) p->varptr = str_to_color(value);
break;
@@ -1131,7 +1131,7 @@ to_str(struct param_ptr *p)
{
switch (p->type) {
case P_INT:
#ifdef COLOR
#ifdef USE_COLOR
case P_COLOR:
#endif
case P_NZINT: