diff --git a/src/fileio.c b/src/fileio.c index 5e3141e096fbc25ddb2212d65c5dc9b4a9175ce8..9f38101bfb06db83b1dbc2461dc3fcdafc60e01e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -6753,12 +6753,12 @@ typedef struct AutoPatCmd struct AutoPatCmd *next; /* chain of active apc-s for auto-invalidation*/ } AutoPatCmd; -AutoPatCmd *active_apc_list = NULL; /* stack of active autocommands */ +static AutoPatCmd *active_apc_list = NULL; /* stack of active autocommands */ /* * augroups stores a list of autocmd group names. */ -garray_T augroups = {0, 0, sizeof(char_u *), 10, NULL}; +static garray_T augroups = {0, 0, sizeof(char_u *), 10, NULL}; #define AUGROUP_NAME(i) (((char_u **)augroups.ga_data)[i]) /* diff --git a/src/if_cscope.c b/src/if_cscope.c index 9693f845d3e540c1094c65f3de9b7e03e55fb383..3e5e26ce59295c195104e35ef578c13dd6ce57d5 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -1726,6 +1726,7 @@ cs_file_results(f, nummatches_a) * * get parsed cscope output and calls cs_make_vim_style_matches to convert * into ctags format + * When there are no matches sets "*matches_p" to NULL. */ static void cs_fill_results(tagstr, totmatches, nummatches_a, matches_p, cntxts_p, matched) @@ -1790,9 +1791,18 @@ cs_fill_results(tagstr, totmatches, nummatches_a, matches_p, cntxts_p, matched) } /* for all cscope connections */ parse_out: + if (totsofar == 0) + { + /* No matches, free the arrays and return NULL in "*matches_p". */ + vim_free(matches); + matches = NULL; + vim_free(cntxts); + cntxts = NULL; + } *matched = totsofar; *matches_p = matches; *cntxts_p = cntxts; + vim_free(buf); } /* cs_fill_results */ diff --git a/src/mbyte.c b/src/mbyte.c index 8dcc24a9f25a94be9f94b127f8aa0e2f66b70032..9504012976cf0e7f06214b888dbcbd25c6572673 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -1949,7 +1949,7 @@ typedef struct int offset; } convertStruct; -convertStruct foldCase[] = +static convertStruct foldCase[] = { {0x41,0x5a,1,32}, {0xc0,0xd6,1,32}, {0xd8,0xde,1,32}, {0x100,0x12e,2,1}, {0x130,0x130,-1,-199}, {0x132,0x136,2,1}, @@ -2040,7 +2040,7 @@ utf_fold(a) * from 0x41 to 0x5a inclusive, stepping by 1, are switched to lower (for * example) by adding 32. */ -convertStruct toLower[] = +static convertStruct toLower[] = { {0x41,0x5a,1,32}, {0xc0,0xd6,1,32}, {0xd8,0xde,1,32}, {0x100,0x12e,2,1}, {0x130,0x130,-1,-199}, {0x132,0x136,2,1}, @@ -2075,7 +2075,7 @@ convertStruct toLower[] = {0x212b,0x212b,-1,-8262}, {0xff21,0xff3a,1,32}, {0x10400,0x10427,1,40} }; -convertStruct toUpper[] = +static convertStruct toUpper[] = { {0x61,0x7a,1,-32}, {0xb5,0xb5,-1,743}, {0xe0,0xf6,1,-32}, {0xf8,0xfe,1,-32}, {0xff,0xff,-1,121}, {0x101,0x12f,2,-1}, @@ -3134,8 +3134,8 @@ iconv_string(vcp, str, slen, unconvlenp) #ifndef DYNAMIC_ICONV /* just generating prototypes */ # define HINSTANCE int #endif -HINSTANCE hIconvDLL = 0; -HINSTANCE hMsvcrtDLL = 0; +static HINSTANCE hIconvDLL = 0; +static HINSTANCE hMsvcrtDLL = 0; # ifndef DYNAMIC_ICONV_DLL # define DYNAMIC_ICONV_DLL "iconv.dll" diff --git a/src/misc2.c b/src/misc2.c index a1e8c1272560f959fe2894cb940fa112544805e6..3450362985af4ca4b367116bb39906826dbbea05 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -3204,7 +3204,7 @@ typedef unsigned long ulg; /* unsigned 32-bit value */ static void make_crc_tab __ARGS((void)); -ulg crc_32_tab[256]; +static ulg crc_32_tab[256]; /* * Fill the CRC table. diff --git a/src/os_win32.c b/src/os_win32.c index ebe0c665969e1cb3382b4d967041669c9de23429..a55f46c19b19fdf692f253bf452cd434b918fae2 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -149,7 +149,7 @@ typedef BOOL (__stdcall *PFNGCKLN)(LPSTR); #else typedef WINBASEAPI BOOL (WINAPI *PFNGCKLN)(LPSTR); #endif -PFNGCKLN s_pfnGetConsoleKeyboardLayoutName = NULL; +static PFNGCKLN s_pfnGetConsoleKeyboardLayoutName = NULL; #endif #if defined(__BORLANDC__) @@ -470,7 +470,7 @@ win32ssynch_cb(HWND hwnd, LPARAM lparam) * combinations of function/arrow/etc keys. */ -const static struct +static const struct { WORD wVirtKey; BOOL fAnsiKey; diff --git a/src/quickfix.c b/src/quickfix.c index c5ba4cbad584dd06489591bda853a16643b72eed..41ad00b203318b7f9ca17e7db4b3f7433fe76df8 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -49,7 +49,7 @@ struct qfline_S */ #define LISTCOUNT 10 -struct qf_list +static struct qf_list { qfline_T *qf_start; /* pointer to the first error */ qfline_T *qf_ptr; /* pointer to the current error */ diff --git a/src/regexp.c b/src/regexp.c index d18198c243be68630a508480467bbf9f9eaa1744..81035af97059759576218410f151eb81cb2eeb94 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -6110,7 +6110,7 @@ typedef struct /* 0xfb20 - 0xfb4f */ -decomp_T decomp_table[0xfb4f-0xfb20+1] = +static decomp_T decomp_table[0xfb4f-0xfb20+1] = { {0x5e2,0,0}, /* 0xfb20 alt ayin */ {0x5d0,0,0}, /* 0xfb21 alt alef */ diff --git a/src/version.h b/src/version.h index 995acf4499d311e33b2a222cf22b7a5ca34d630f..9b190727582410ef4705b9a4b97f5e4a43c677eb 100644 --- a/src/version.h +++ b/src/version.h @@ -36,5 +36,5 @@ #define VIM_VERSION_NODOT "vim70aa" #define VIM_VERSION_SHORT "7.0aa" #define VIM_VERSION_MEDIUM "7.0aa ALPHA" -#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 May 31)" -#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 May 31, compiled " +#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 1)" +#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 1, compiled "