Fix build warnings and problems for tiny/small Win32 build. (Mike Williams)
diff --git a/src/eval.c b/src/eval.c
index ac0ad26..58c89c8 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -13508,7 +13508,7 @@
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
}
}
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index f07bb4c..f7ffb08 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -3857,6 +3857,7 @@
#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 @@
{
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 @@
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 @@
{
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 @@
/* 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);
diff --git a/src/feature.h b/src/feature.h
index 3f25898..ea79758 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -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
diff --git a/src/gui_w48.c b/src/gui_w48.c
index 00d86fd..80b75ff 100644
--- a/src/gui_w48.c
+++ b/src/gui_w48.c
@@ -3901,7 +3901,9 @@
}
}
+#ifdef FEAT_MBYTE
done:
+#endif
argv[argc] = NULL; /* NULL-terminated list */
*argvp = argv;
return argc;
diff --git a/src/os_mswin.c b/src/os_mswin.c
index 6b7e896..6ee6379 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -2548,7 +2548,7 @@
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,
diff --git a/src/structs.h b/src/structs.h
index 7b8acee..d959b5c 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1202,20 +1202,20 @@
int b_syn_folditems; /* number of patterns with the HL_FOLD
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 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
- * b_sst_firstfree pointer to first free entry in b_sst_array[] or NULL
- * b_sst_freecount number of free entries in b_sst_array[]
- * b_sst_check_lnum entries after this lnum need to be checked for
- * validity (MAXLNUM means no check needed)
- */
+ /*
+ * 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
+ * b_sst_firstfree pointer to first free entry in b_sst_array[] or NULL
+ * b_sst_freecount number of free entries in b_sst_array[]
+ * b_sst_check_lnum entries after this lnum need to be checked for
+ * validity (MAXLNUM means no check needed)
+ */
synstate_T *b_sst_array;
int b_sst_len;
synstate_T *b_sst_first;
@@ -1237,6 +1237,9 @@
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;