forked from aniani/vim
patch 9.0.1390: FOR_ALL_ macros are defined in an unexpected file
Problem: FOR_ALL_ macros are defined in an unexpected file. Solution: Move FOR_ALL_ macros to macros.h. Add FOR_ALL_HASHTAB_ITEMS. (Yegappan Lakshmanan, closes #12109)
This commit is contained in:
committed by
Bram Moolenaar
parent
663ee88a82
commit
14113fdf9c
@@ -873,10 +873,6 @@ EXTERN vimmenu_T *root_menu INIT(= NULL);
|
||||
* overruling of menus that the user already defined.
|
||||
*/
|
||||
EXTERN int sys_menu INIT(= FALSE);
|
||||
|
||||
#define FOR_ALL_MENUS(m) for ((m) = root_menu; (m) != NULL; (m) = (m)->next)
|
||||
#define FOR_ALL_CHILD_MENUS(p, c) \
|
||||
for ((c) = (p)->children; (c) != NULL; (c) = (c)->next)
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI
|
||||
@@ -968,27 +964,6 @@ EXTERN win_T *lastwin; // last window
|
||||
EXTERN win_T *prevwin INIT(= NULL); // previous window
|
||||
#define ONE_WINDOW (firstwin == lastwin)
|
||||
#define W_NEXT(wp) ((wp)->w_next)
|
||||
#define FOR_ALL_WINDOWS(wp) for ((wp) = firstwin; (wp) != NULL; (wp) = (wp)->w_next)
|
||||
#define FOR_ALL_FRAMES(frp, first_frame) \
|
||||
for ((frp) = first_frame; (frp) != NULL; (frp) = (frp)->fr_next)
|
||||
#define FOR_ALL_TABPAGES(tp) for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next)
|
||||
#define FOR_ALL_WINDOWS_IN_TAB(tp, wp) \
|
||||
for ((wp) = ((tp) == NULL || (tp) == curtab) \
|
||||
? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
|
||||
/*
|
||||
* When using this macro "break" only breaks out of the inner loop. Use "goto"
|
||||
* to break out of the tabpage loop.
|
||||
*/
|
||||
#define FOR_ALL_TAB_WINDOWS(tp, wp) \
|
||||
for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
|
||||
for ((wp) = ((tp) == curtab) \
|
||||
? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
|
||||
|
||||
#define FOR_ALL_POPUPWINS(wp) \
|
||||
for ((wp) = first_popupwin; (wp) != NULL; (wp) = (wp)->w_next)
|
||||
#define FOR_ALL_POPUPWINS_IN_TAB(tp, wp) \
|
||||
for ((wp) = (tp)->tp_first_popupwin; (wp) != NULL; (wp) = (wp)->w_next)
|
||||
|
||||
|
||||
EXTERN win_T *curwin; // currently active window
|
||||
|
||||
@@ -1050,16 +1025,6 @@ EXTERN buf_T *firstbuf INIT(= NULL); // first buffer
|
||||
EXTERN buf_T *lastbuf INIT(= NULL); // last buffer
|
||||
EXTERN buf_T *curbuf INIT(= NULL); // currently active buffer
|
||||
|
||||
#define FOR_ALL_BUFFERS(buf) \
|
||||
for ((buf) = firstbuf; (buf) != NULL; (buf) = (buf)->b_next)
|
||||
|
||||
#define FOR_ALL_BUF_WININFO(buf, wip) \
|
||||
for ((wip) = (buf)->b_wininfo; (wip) != NULL; (wip) = (wip)->wi_next)
|
||||
|
||||
// Iterate through all the signs placed in a buffer
|
||||
#define FOR_ALL_SIGNS_IN_BUF(buf, sign) \
|
||||
for ((sign) = (buf)->b_signlist; (sign) != NULL; (sign) = (sign)->se_next)
|
||||
|
||||
// Flag that is set when switching off 'swapfile'. It means that all blocks
|
||||
// are to be loaded into memory. Shouldn't be global...
|
||||
EXTERN int mf_dont_release INIT(= FALSE); // don't release blocks
|
||||
@@ -1874,9 +1839,6 @@ EXTERN disptick_T display_tick INIT(= 0);
|
||||
// Line in which spell checking wasn't highlighted because it touched the
|
||||
// cursor position in Insert mode.
|
||||
EXTERN linenr_T spell_redraw_lnum INIT(= 0);
|
||||
|
||||
#define FOR_ALL_SPELL_LANGS(slang) \
|
||||
for ((slang) = first_lang; (slang) != NULL; (slang) = (slang)->sl_next)
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_CONCEAL
|
||||
@@ -2015,11 +1977,6 @@ EXTERN char *ch_part_names[]
|
||||
|
||||
// Whether a redraw is needed for appending a line to a buffer.
|
||||
EXTERN int channel_need_redraw INIT(= FALSE);
|
||||
|
||||
# define FOR_ALL_CHANNELS(ch) \
|
||||
for ((ch) = first_channel; (ch) != NULL; (ch) = (ch)->ch_next)
|
||||
# define FOR_ALL_JOBS(job) \
|
||||
for ((job) = first_job; (job) != NULL; (job) = (job)->jv_next)
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
@@ -2032,14 +1989,6 @@ EXTERN int did_repeated_msg INIT(= 0);
|
||||
# define REPEATED_MSG_SAFESTATE 2
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_DIFF)
|
||||
#define FOR_ALL_DIFFBLOCKS_IN_TAB(tp, dp) \
|
||||
for ((dp) = (tp)->tp_first_diff; (dp) != NULL; (dp) = (dp)->df_next)
|
||||
#endif
|
||||
|
||||
#define FOR_ALL_LIST_ITEMS(l, li) \
|
||||
for ((li) = (l) == NULL ? NULL : (l)->lv_first; (li) != NULL; (li) = (li)->li_next)
|
||||
|
||||
// While executing a regexp and set to OPTION_MAGIC_ON or OPTION_MAGIC_OFF this
|
||||
// overrules p_magic. Otherwise set to OPTION_MAGIC_NOT_SET.
|
||||
EXTERN optmagic_T magic_overruled INIT(= OPTION_MAGIC_NOT_SET);
|
||||
|
Reference in New Issue
Block a user