summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-07-27 22:41:43 +0200
committerBram Moolenaar <Bram@vim.org>2010-07-27 22:41:43 +0200
commit8765a4ac3a9dfb994ad7051183353ead25cfbb64 (patch)
tree92b7309028f41799a44ef42512802188b4470a07 /src
parent3b95389d45bacf90f4ef04a7a7726e5ddc29027a (diff)
downloadvim-git-8765a4ac3a9dfb994ad7051183353ead25cfbb64.tar.gz
Fix build warnings and problems for tiny/small Win32 build. (Mike Williams)
Diffstat (limited to 'src')
-rw-r--r--src/eval.c2
-rw-r--r--src/ex_cmds2.c11
-rw-r--r--src/feature.h3
-rw-r--r--src/gui_w48.c2
-rw-r--r--src/os_mswin.c2
-rw-r--r--src/structs.h31
6 files changed, 29 insertions, 22 deletions
diff --git a/src/eval.c b/src/eval.c
index ac0ad2679..58c89c88d 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -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
}
}
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index f07bb4ce6..f7ffb087a 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -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);
diff --git a/src/feature.h b/src/feature.h
index 3f25898a0..ea79758af 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 00d86fd0d..80b75ff38 100644
--- a/src/gui_w48.c
+++ b/src/gui_w48.c
@@ -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;
diff --git a/src/os_mswin.c b/src/os_mswin.c
index 6b7e896cb..6ee6379e1 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -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,
diff --git a/src/structs.h b/src/structs.h
index 7b8acee79..d959b5c09 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1202,20 +1202,20 @@ typedef struct {
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 @@ 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;