]> granicus.if.org Git - vim/commitdiff
Fix build warnings and problems for tiny/small Win32 build. (Mike Williams)
authorBram Moolenaar <Bram@vim.org>
Tue, 27 Jul 2010 20:41:43 +0000 (22:41 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 27 Jul 2010 20:41:43 +0000 (22:41 +0200)
src/eval.c
src/ex_cmds2.c
src/feature.h
src/gui_w48.c
src/os_mswin.c
src/structs.h

index ac0ad2679297af3f76da01e10bff50fd77c97bd4..58c89c88d19a1b6e03c71742026fbf349a9fd7c7 100644 (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
            }
        }
index f07bb4ce6ea953ca905308c023fe8e95688776cf..f7ffb087af32ce317cf838f5f72fd00f112c7710 100644 (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);
index 3f25898a0364953806db8186e8f4748f29e8f63e..ea79758af8e92b4c883c5bd4007bc3df3672f764 100644 (file)
 # 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
index 00d86fd0d712fa79e66f5a1b215e7ce23863568c..80b75ff384c11793237ab5d6020937e181c12ee6 100644 (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;
index 6b7e896cbb383fbd82e5f4184fc2796bcdae8100..6ee6379e104c1173db3e2fec6cc3937edb80727c 100644 (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,
index 7b8acee7906263a1534ed4f0d123ab16375a0eff..d959b5c0902bcbc9723ea26f0cdf6b9e0087b15b 100644 (file)
@@ -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;