comparison src/ex_docmd.c @ 18904:2bdc2e1f6e1f v8.2.0013

patch 8.2.0013: not using a typedef for condstack Commit: https://github.com/vim/vim/commit/ddef129160ff0676e5da482071fb2fdc2988ac34 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 16 17:10:33 2019 +0100 patch 8.2.0013: not using a typedef for condstack Problem: Not using a typedef for condstack. Solution: Add a typedef.
author Bram Moolenaar <Bram@vim.org>
date Mon, 16 Dec 2019 17:15:04 +0100
parents b77ef4b8af7c
children 847cc7932c42
comparison
equal deleted inserted replaced
18903:1974a221b494 18904:2bdc2e1f6e1f
18 #ifndef FEAT_PRINTER 18 #ifndef FEAT_PRINTER
19 # define ex_hardcopy ex_ni 19 # define ex_hardcopy ex_ni
20 #endif 20 #endif
21 21
22 #ifdef FEAT_EVAL 22 #ifdef FEAT_EVAL
23 static char_u *do_one_cmd(char_u **, int, struct condstack *, char_u *(*fgetline)(int, void *, int, int), void *cookie); 23 static char_u *do_one_cmd(char_u **, int, cstack_T *, char_u *(*fgetline)(int, void *, int, int), void *cookie);
24 #else 24 #else
25 static char_u *do_one_cmd(char_u **, int, char_u *(*fgetline)(int, void *, int, int), void *cookie); 25 static char_u *do_one_cmd(char_u **, int, char_u *(*fgetline)(int, void *, int, int), void *cookie);
26 static int if_level = 0; // depth in :if 26 static int if_level = 0; // depth in :if
27 #endif 27 #endif
28 static void free_cmdmod(void); 28 static void free_cmdmod(void);
621 int msg_didout_before_start = 0; 621 int msg_didout_before_start = 0;
622 int count = 0; // line number count 622 int count = 0; // line number count
623 int did_inc = FALSE; // incremented RedrawingDisabled 623 int did_inc = FALSE; // incremented RedrawingDisabled
624 int retval = OK; 624 int retval = OK;
625 #ifdef FEAT_EVAL 625 #ifdef FEAT_EVAL
626 struct condstack cstack; // conditional stack 626 cstack_T cstack; // conditional stack
627 garray_T lines_ga; // keep lines for ":while"/":for" 627 garray_T lines_ga; // keep lines for ":while"/":for"
628 int current_line = 0; // active line in lines_ga 628 int current_line = 0; // active line in lines_ga
629 char_u *fname = NULL; // function or script name 629 char_u *fname = NULL; // function or script name
630 linenr_T *breakpoint = NULL; // ptr to breakpoint field in cookie 630 linenr_T *breakpoint = NULL; // ptr to breakpoint field in cookie
631 int *dbg_tick = NULL; // ptr to dbg_tick field in cookie 631 int *dbg_tick = NULL; // ptr to dbg_tick field in cookie
669 { 669 {
670 emsg(_("E169: Command too recursive")); 670 emsg(_("E169: Command too recursive"));
671 #ifdef FEAT_EVAL 671 #ifdef FEAT_EVAL
672 // When converting to an exception, we do not include the command name 672 // When converting to an exception, we do not include the command name
673 // since this is not an error of the specific command. 673 // since this is not an error of the specific command.
674 do_errthrow((struct condstack *)NULL, (char_u *)NULL); 674 do_errthrow((cstack_T *)NULL, (char_u *)NULL);
675 msg_list = saved_msg_list; 675 msg_list = saved_msg_list;
676 #endif 676 #endif
677 return FAIL; 677 return FAIL;
678 } 678 }
679 ++call_depth; 679 ++call_depth;
1626 */ 1626 */
1627 #pragma optimize( "g", off ) 1627 #pragma optimize( "g", off )
1628 #endif 1628 #endif
1629 static char_u * 1629 static char_u *
1630 do_one_cmd( 1630 do_one_cmd(
1631 char_u **cmdlinep, 1631 char_u **cmdlinep,
1632 int sourcing, 1632 int sourcing,
1633 #ifdef FEAT_EVAL 1633 #ifdef FEAT_EVAL
1634 struct condstack *cstack, 1634 cstack_T *cstack,
1635 #endif 1635 #endif
1636 char_u *(*fgetline)(int, void *, int, int), 1636 char_u *(*fgetline)(int, void *, int, int),
1637 void *cookie) // argument for fgetline() 1637 void *cookie) // argument for fgetline()
1638 { 1638 {
1639 char_u *p; 1639 char_u *p;
1640 linenr_T lnum; 1640 linenr_T lnum;
1641 long n; 1641 long n;
1642 char *errormsg = NULL; // error message 1642 char *errormsg = NULL; // error message
1643 char_u *after_modifier = NULL; 1643 char_u *after_modifier = NULL;
1644 exarg_T ea; // Ex command arguments 1644 exarg_T ea; // Ex command arguments
1645 int save_msg_scroll = msg_scroll; 1645 int save_msg_scroll = msg_scroll;
1646 cmdmod_T save_cmdmod; 1646 cmdmod_T save_cmdmod;
1647 int save_reg_executing = reg_executing; 1647 int save_reg_executing = reg_executing;
1648 int ni; // set when Not Implemented 1648 int ni; // set when Not Implemented
1649 char_u *cmd; 1649 char_u *cmd;
1650 1650
1651 vim_memset(&ea, 0, sizeof(ea)); 1651 vim_memset(&ea, 0, sizeof(ea));
1652 ea.line1 = 1; 1652 ea.line1 = 1;
1653 ea.line2 = 1; 1653 ea.line2 = 1;
1654 #ifdef FEAT_EVAL 1654 #ifdef FEAT_EVAL