mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.0806: too many #ifdefs
Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 2.
This commit is contained in:
20
src/main.c
20
src/main.c
@@ -119,7 +119,7 @@ main
|
||||
*/
|
||||
mch_early_init();
|
||||
|
||||
#if defined(WIN32) && defined(FEAT_MBYTE)
|
||||
#if defined(WIN32)
|
||||
/*
|
||||
* MinGW expands command line arguments, which confuses our code to
|
||||
* convert when 'encoding' changes. Get the unexpanded arguments.
|
||||
@@ -250,7 +250,7 @@ main
|
||||
params.fname = alist_name(&GARGLIST[0]);
|
||||
}
|
||||
|
||||
#if defined(WIN32) && defined(FEAT_MBYTE)
|
||||
#if defined(WIN32)
|
||||
{
|
||||
extern void set_alist_count(void);
|
||||
|
||||
@@ -592,9 +592,7 @@ vim_main2(void)
|
||||
{
|
||||
char_u *enc = NULL;
|
||||
|
||||
# ifdef FEAT_MBYTE
|
||||
enc = p_menc;
|
||||
# endif
|
||||
if (params.use_ef != NULL)
|
||||
set_string_option_direct((char_u *)"ef", -1,
|
||||
params.use_ef, OPT_FREE, SID_CARG);
|
||||
@@ -813,7 +811,7 @@ vim_main2(void)
|
||||
/* Must come before the may_req_ calls. */
|
||||
starting = 0;
|
||||
|
||||
#if defined(FEAT_TERMRESPONSE) && defined(FEAT_MBYTE)
|
||||
#if defined(FEAT_TERMRESPONSE)
|
||||
/* Must be done before redrawing, puts a few characters on the screen. */
|
||||
may_req_ambiguous_char_width();
|
||||
#endif
|
||||
@@ -926,9 +924,7 @@ common_init(mparm_T *paramp)
|
||||
{
|
||||
cmdline_init();
|
||||
|
||||
#ifdef FEAT_MBYTE
|
||||
(void)mb_init(); /* init mb_bytelen_tab[] to ones */
|
||||
#endif
|
||||
#ifdef FEAT_EVAL
|
||||
eval_init(); /* init global variables */
|
||||
#endif
|
||||
@@ -1549,7 +1545,7 @@ getout(int exitval)
|
||||
if (garbage_collect_at_exit)
|
||||
garbage_collect(FALSE);
|
||||
#endif
|
||||
#if defined(WIN32) && defined(FEAT_MBYTE)
|
||||
#if defined(WIN32)
|
||||
free_cmd_argsW();
|
||||
#endif
|
||||
|
||||
@@ -2501,7 +2497,7 @@ scripterror:
|
||||
#endif
|
||||
);
|
||||
|
||||
#if defined(FEAT_MBYTE) && defined(WIN32)
|
||||
#if defined(WIN32)
|
||||
{
|
||||
/* Remember this argument has been added to the argument list.
|
||||
* Needed when 'encoding' is changed. */
|
||||
@@ -2584,7 +2580,7 @@ check_tty(mparm_T *parmp)
|
||||
#if defined(WIN3264) && !defined(FEAT_GUI_W32)
|
||||
if (is_cygpty_used())
|
||||
{
|
||||
# if defined(FEAT_MBYTE) && defined(HAVE_BIND_TEXTDOMAIN_CODESET) \
|
||||
# if defined(HAVE_BIND_TEXTDOMAIN_CODESET) \
|
||||
&& defined(FEAT_GETTEXT)
|
||||
char *s, *tofree = NULL;
|
||||
|
||||
@@ -3660,9 +3656,7 @@ exec_on_server(mparm_T *parmp)
|
||||
{
|
||||
cmdsrv_main(&parmp->argc, parmp->argv,
|
||||
parmp->serverName_arg, &parmp->serverStr);
|
||||
# ifdef FEAT_MBYTE
|
||||
parmp->serverStrEnc = vim_strsave(p_enc);
|
||||
# endif
|
||||
}
|
||||
|
||||
/* If we're still running, get the name to register ourselves.
|
||||
@@ -4281,7 +4275,6 @@ serverConvert(
|
||||
char_u *res = data;
|
||||
|
||||
*tofree = NULL;
|
||||
# ifdef FEAT_MBYTE
|
||||
if (client_enc != NULL && p_enc != NULL)
|
||||
{
|
||||
vimconv_T vimconv;
|
||||
@@ -4298,7 +4291,6 @@ serverConvert(
|
||||
}
|
||||
convert_setup(&vimconv, NULL, NULL);
|
||||
}
|
||||
# endif
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user