# HG changeset patch # User Bram Moolenaar # Date 1567718103 -7200 # Node ID 8976c3a3803a63f2a9cbb1c7ba02ad8acf7d7861 # Parent 2acb695046e1bb1a1545e22f45ae418efcb3734b patch 8.1.1991: still cannot build with eval but without cscope Commit: https://github.com/vim/vim/commit/6f72e90dd843a7342395b31f31c2073a3859869d Author: Bram Moolenaar Date: Thu Sep 5 23:04:02 2019 +0200 patch 8.1.1991: still cannot build with eval but without cscope Problem: Still cannot build with eval but without cscope. Solution: Move f_cscope_connection() outside of #ifdef. diff --git a/src/if_cscope.c b/src/if_cscope.c --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -432,33 +432,6 @@ cs_connection(int num, char_u *dbpath, c return FALSE; } -/* - * "cscope_connection([{num} , {dbpath} [, {prepend}]])" function - * - * Checks the existence of a cscope connection. - */ - void -f_cscope_connection(typval_T *argvars UNUSED, typval_T *rettv UNUSED) -{ -#ifdef FEAT_CSCOPE - int num = 0; - char_u *dbpath = NULL; - char_u *prepend = NULL; - char_u buf[NUMBUFLEN]; - - if (argvars[0].v_type != VAR_UNKNOWN - && argvars[1].v_type != VAR_UNKNOWN) - { - num = (int)tv_get_number(&argvars[0]); - dbpath = tv_get_string(&argvars[1]); - if (argvars[2].v_type != VAR_UNKNOWN) - prepend = tv_get_string_buf(&argvars[2], buf); - } - - rettv->vval.v_number = cs_connection(num, dbpath, prepend); -#endif -} - #endif @@ -2527,4 +2500,33 @@ cs_end(void) #endif /* FEAT_CSCOPE */ -/* the end */ +#if defined(FEAT_EVAL) || defined(PROTO) + +/* + * "cscope_connection([{num} , {dbpath} [, {prepend}]])" function + * + * Checks the existence of a cscope connection. + */ + void +f_cscope_connection(typval_T *argvars UNUSED, typval_T *rettv UNUSED) +{ +# ifdef FEAT_CSCOPE + int num = 0; + char_u *dbpath = NULL; + char_u *prepend = NULL; + char_u buf[NUMBUFLEN]; + + if (argvars[0].v_type != VAR_UNKNOWN + && argvars[1].v_type != VAR_UNKNOWN) + { + num = (int)tv_get_number(&argvars[0]); + dbpath = tv_get_string(&argvars[1]); + if (argvars[2].v_type != VAR_UNKNOWN) + prepend = tv_get_string_buf(&argvars[2], buf); + } + + rettv->vval.v_number = cs_connection(num, dbpath, prepend); +# endif +} + +#endif // FEAT_EVAL diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -758,6 +758,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1991, +/**/ 1990, /**/ 1989,