# HG changeset patch # User Bram Moolenaar # Date 1280263303 -7200 # Node ID f579b934f51ddf085f6b6b0e326ce531f24e21ac # Parent da067045878f8912fb822f52f922502a0efbc6ff Fix build warnings and problems for tiny/small Win32 build. (Mike Williams) diff --git a/src/eval.c b/src/eval.c --- 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 --- 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 --- 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 --- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -3901,7 +3901,9 @@ get_cmd_args(char *prog, char *cmdline, } } +#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 --- 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 --- 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;