summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-20 15:25:00 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-20 15:25:00 +0200
commit20b23c6358131baefb57b9083387fb4524d3ff24 (patch)
tree57c567c9c1f1ced10cc6c22c13f0fa09d7f0e015
parent66250c932e8a0e3c43e7c7c7b1dbede040b9c508 (diff)
downloadvim-git-20b23c6358131baefb57b9083387fb4524d3ff24.tar.gz
patch 8.2.1492: build failuresv8.2.1492
Problem: Build failures. Solution: Move typedef out of #ifdef. Adjust argument types. Discover America.
-rw-r--r--src/ex_docmd.c22
-rw-r--r--src/structs.h14
-rw-r--r--src/version.c2
3 files changed, 20 insertions, 18 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 4a6da4da0..233ac1041 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -20,9 +20,9 @@ static int ex_pressedreturn = FALSE;
#endif
#ifdef FEAT_EVAL
-static char_u *do_one_cmd(char_u **, int, cstack_T *, char_u *(*fgetline)(int, void *, int, int), void *cookie);
+static char_u *do_one_cmd(char_u **, int, cstack_T *, char_u *(*fgetline)(int, void *, int, getline_opt_T), void *cookie);
#else
-static char_u *do_one_cmd(char_u **, int, char_u *(*fgetline)(int, void *, int, int), void *cookie);
+static char_u *do_one_cmd(char_u **, int, char_u *(*fgetline)(int, void *, int, getline_opt_T), void *cookie);
static int if_level = 0; // depth in :if
#endif
static void append_command(char_u *cmd);
@@ -403,11 +403,11 @@ struct loop_cookie
int current_line; // last read line from growarray
int repeating; // TRUE when looping a second time
// When "repeating" is FALSE use "getline" and "cookie" to get lines
- char_u *(*getline)(int, void *, int, int);
+ char_u *(*getline)(int, void *, int, getline_opt_T);
void *cookie;
};
-static char_u *get_loop_line(int c, void *cookie, int indent, int do_concat);
+static char_u *get_loop_line(int c, void *cookie, int indent, getline_opt_T options);
static int store_loop_line(garray_T *gap, char_u *line);
static void free_cmdlines(garray_T *gap);
@@ -1419,7 +1419,7 @@ do_cmdline(
* Obtain a line when inside a ":while" or ":for" loop.
*/
static char_u *
-get_loop_line(int c, void *cookie, int indent, int do_concat)
+get_loop_line(int c, void *cookie, int indent, getline_opt_T options)
{
struct loop_cookie *cp = (struct loop_cookie *)cookie;
wcmd_T *wp;
@@ -1432,9 +1432,9 @@ get_loop_line(int c, void *cookie, int indent, int do_concat)
// First time inside the ":while"/":for": get line normally.
if (cp->getline == NULL)
- line = getcmdline(c, 0L, indent, do_concat);
+ line = getcmdline(c, 0L, indent, options);
else
- line = cp->getline(c, cp->cookie, indent, do_concat);
+ line = cp->getline(c, cp->cookie, indent, options);
if (line != NULL && store_loop_line(cp->lines_gap, line) == OK)
++cp->current_line;
@@ -1487,7 +1487,7 @@ getline_equal(
char_u *(*func)(int, void *, int, getline_opt_T))
{
#ifdef FEAT_EVAL
- char_u *(*gp)(int, void *, int, int);
+ char_u *(*gp)(int, void *, int, getline_opt_T);
struct loop_cookie *cp;
// When "fgetline" is "get_loop_line()" use the "cookie" to find the
@@ -1516,7 +1516,7 @@ getline_cookie(
void *cookie) // argument for fgetline()
{
#ifdef FEAT_EVAL
- char_u *(*gp)(int, void *, int, int);
+ char_u *(*gp)(int, void *, int, getline_opt_T);
struct loop_cookie *cp;
// When "fgetline" is "get_loop_line()" use the "cookie" to find the
@@ -1544,7 +1544,7 @@ getline_peek(
char_u *(*fgetline)(int, void *, int, getline_opt_T) UNUSED,
void *cookie) // argument for fgetline()
{
- char_u *(*gp)(int, void *, int, int);
+ char_u *(*gp)(int, void *, int, getline_opt_T);
struct loop_cookie *cp;
wcmd_T *wp;
@@ -1694,7 +1694,7 @@ do_one_cmd(
#ifdef FEAT_EVAL
cstack_T *cstack,
#endif
- char_u *(*fgetline)(int, void *, int, int),
+ char_u *(*fgetline)(int, void *, int, getline_opt_T),
void *cookie) // argument for fgetline()
{
char_u *p;
diff --git a/src/structs.h b/src/structs.h
index d8545112b..38ebcf574 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1533,6 +1533,13 @@ struct blobvar_S
typedef int (*cfunc_T)(int argcount, typval_T *argvars, typval_T *rettv, void *state);
typedef void (*cfunc_free_T)(void *state);
+// type of getline() last argument
+typedef enum {
+ GETLINE_NONE, // do not concatenate any lines
+ GETLINE_CONCAT_CONT, // concatenate continuation lines
+ GETLINE_CONCAT_ALL // concatenate continuation and Vim9 # comment lines
+} getline_opt_T;
+
#if defined(FEAT_EVAL) || defined(PROTO)
typedef struct funccall_S funccall_T;
@@ -1761,13 +1768,6 @@ typedef struct
# endif
} scriptitem_T;
-// type of getline() last argument
-typedef enum {
- GETLINE_NONE, // do not concatenate any lines
- GETLINE_CONCAT_CONT, // concatenate continuation lines
- GETLINE_CONCAT_ALL // concatenate continuation and Vim9 # comment lines
-} getline_opt_T;
-
// Struct passed through eval() functions.
// See EVALARG_EVALUATE for a fixed value with eval_flags set to EVAL_EVALUATE.
typedef struct {
diff --git a/src/version.c b/src/version.c
index c5ce04cba..62faf4b97 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1492,
+/**/
1491,
/**/
1490,