To: vim_dev@googlegroups.com Subject: Patch 8.1.1991 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1991 Problem: Still cannot build with eval but without cscope. Solution: Move f_cscope_connection() outside of #ifdef. Files: src/if_cscope.c *** ../vim-8.1.1990/src/if_cscope.c 2019-09-05 22:33:23.268963478 +0200 --- src/if_cscope.c 2019-09-05 23:02:33.702490135 +0200 *************** *** 432,464 **** 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 --- 432,437 ---- *************** *** 2527,2530 **** #endif /* FEAT_CSCOPE */ ! /* the end */ --- 2500,2532 ---- #endif /* FEAT_CSCOPE */ ! #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 *** ../vim-8.1.1990/src/version.c 2019-09-05 22:50:08.453226267 +0200 --- src/version.c 2019-09-05 23:03:19.158323586 +0200 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 1991, /**/ -- % cat /usr/include/sys/errno.h #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ [...] #define EMACS 666 /* Too many macros */ % /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///