1
0
forked from aniani/vim

Fix build warnings and problems for tiny/small Win32 build. (Mike Williams)

This commit is contained in:
Bram Moolenaar
2010-07-27 22:41:43 +02:00
parent 3b95389d45
commit 8765a4ac3a
6 changed files with 29 additions and 22 deletions

View File

@@ -13508,7 +13508,7 @@ find_some_match(argvars, rettv, type)
startcol = (colnr_T)(regmatch.startp[0]
+ (*mb_ptr2len)(regmatch.startp[0]) - str);
#else
startcol = regmatch.startp[0] + 1 - str;
startcol = (colnr_T)(regmatch.startp[0] + 1 - str);
#endif
}
}

View File

@@ -3857,6 +3857,7 @@ ex_checktime(eap)
#if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
&& (defined(FEAT_EVAL) || defined(FEAT_MULTI_LANG))
# define HAVE_GET_LOCALE_VAL
static char *get_locale_val __ARGS((int what));
static char *
@@ -3946,7 +3947,7 @@ get_mess_lang()
{
char_u *p;
# if (defined(HAVE_LOCALE_H) || defined(X_LOCALE))
# ifdef HAVE_GET_LOCALE_VAL
# if defined(LC_MESSAGES)
p = (char_u *)get_locale_val(LC_MESSAGES);
# else
@@ -3997,7 +3998,7 @@ get_mess_env()
p = mch_getenv((char_u *)"LANG");
if (p != NULL && VIM_ISDIGIT(*p))
p = NULL; /* ignore something like "1043" */
# if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
# ifdef HAVE_GET_LOCALE_VAL
if (p == NULL || *p == NUL)
p = (char_u *)get_locale_val(LC_CTYPE);
# endif
@@ -4018,7 +4019,7 @@ set_lang_var()
{
char_u *loc;
# if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
# ifdef HAVE_GET_LOCALE_VAL
loc = (char_u *)get_locale_val(LC_CTYPE);
# else
/* setlocale() not supported: use the default value */
@@ -4028,14 +4029,14 @@ set_lang_var()
/* When LC_MESSAGES isn't defined use the value from $LC_MESSAGES, fall
* back to LC_CTYPE if it's empty. */
# if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) && defined(LC_MESSAGES)
# if defined(HAVE_GET_LOCALE_VAL) && defined(LC_MESSAGES)
loc = (char_u *)get_locale_val(LC_MESSAGES);
# else
loc = get_mess_env();
# endif
set_vim_var_string(VV_LANG, loc, -1);
# if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
# ifdef HAVE_GET_LOCALE_VAL
loc = (char_u *)get_locale_val(LC_TIME);
# endif
set_vim_var_string(VV_LC_TIME, loc, -1);

View File

@@ -819,7 +819,8 @@
# endif
#endif
#if !defined(FEAT_GUI_DIALOG) && (defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK))
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_W32))
/* need a dialog to show error messages when starting from the desktop */
# define FEAT_GUI_DIALOG
#endif

View File

@@ -3901,7 +3901,9 @@ get_cmd_args(char *prog, char *cmdline, char ***argvp, char **tofree)
}
}
#ifdef FEAT_MBYTE
done:
#endif
argv[argc] = NULL; /* NULL-terminated list */
*argvp = argv;
return argc;

View File

@@ -2548,7 +2548,7 @@ serverSendEnc(HWND target)
data.cbData = (DWORD)STRLEN(p_enc) + 1;
data.lpData = p_enc;
#else
data.cbData = STRLEN("latin1") + 1;
data.cbData = (DWORD)STRLEN("latin1") + 1;
data.lpData = "latin1";
#endif
(void)SendMessage(target, WM_COPYDATA, (WPARAM)message_window,

View File

@@ -1203,11 +1203,11 @@ typedef struct {
flag set */
# endif
/*
* b_sst_array[] contains the state stack for a number of lines, for the start
* of that line (col == 0). This avoids having to recompute the syntax state
* too often.
* b_sst_array[] is allocated to hold the state for all displayed lines, and
* states for 1 out of about 20 other lines.
* b_sst_array[] contains the state stack for a number of lines, for the
* start of that line (col == 0). This avoids having to recompute the
* syntax state too often.
* b_sst_array[] is allocated to hold the state for all displayed lines,
* and states for 1 out of about 20 other lines.
* b_sst_array pointer to an array of synstate_T
* b_sst_len number of entries in b_sst_array[]
* b_sst_first pointer to first used entry in b_sst_array[] or NULL
@@ -1237,6 +1237,9 @@ typedef struct {
char_u *b_p_spf; /* 'spellfile' */
char_u *b_p_spl; /* 'spelllang' */
#endif
#if !defined(FEAT_SYN_HL) && !defined(FEAT_SPELL)
int dummy;
#endif
} synblock_T;