frp = frp->fr_parent)
{
if (frp->fr_layout == FR_ROW)
- for (frp2 = frp->fr_child; frp2 != NULL;
- frp2 = frp2->fr_next)
+ FOR_ALL_FRAMES(frp2, frp->fr_child)
if (frp2 != prevfrp)
minwidth += frame_minwidth(frp2, NOWIN);
prevfrp = frp;
frp = frp->fr_parent)
{
if (frp->fr_layout == FR_COL)
- for (frp2 = frp->fr_child; frp2 != NULL;
- frp2 = frp2->fr_next)
+ FOR_ALL_FRAMES(frp2, frp->fr_child)
if (frp2 != prevfrp)
minheight += frame_minheight(frp2, NOWIN);
prevfrp = frp;
if (frp->fr_win != NULL)
oldwin->w_frame = frp;
else
- for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, frp->fr_child)
frp->fr_parent = curfrp;
}
#endif
/* Check if all frames in this row/col have one window. */
- for (frp = curwin->w_frame->fr_parent->fr_child; frp != NULL;
- frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, curwin->w_frame->fr_parent->fr_child)
if (frp->fr_win == NULL)
{
EMSG(_("E443: Cannot rotate when another window is split"));
else
{
next_curwin_size = -1;
- for (fr = topfr->fr_child; fr != NULL; fr = fr->fr_next)
+ FOR_ALL_FRAMES(fr, topfr->fr_child)
{
/* If 'winfixwidth' set keep the window width if
* possible.
--totwincount; /* don't count curwin */
}
- for (fr = topfr->fr_child; fr != NULL; fr = fr->fr_next)
+ FOR_ALL_FRAMES(fr, topfr->fr_child)
{
wincount = 1;
if (fr->fr_next == NULL)
else
{
next_curwin_size = -1;
- for (fr = topfr->fr_child; fr != NULL; fr = fr->fr_next)
+ FOR_ALL_FRAMES(fr, topfr->fr_child)
{
/* If 'winfixheight' set keep the window height if
* possible.
--totwincount; /* don't count curwin */
}
- for (fr = topfr->fr_child; fr != NULL; fr = fr->fr_next)
+ FOR_ALL_FRAMES(fr, topfr->fr_child)
{
wincount = 1;
if (fr->fr_next == NULL)
* and remove it. */
frp2->fr_parent->fr_layout = frp2->fr_layout;
frp2->fr_parent->fr_child = frp2->fr_child;
- for (frp = frp2->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, frp2->fr_child)
frp->fr_parent = frp2->fr_parent;
frp2->fr_parent->fr_win = frp2->fr_win;
if (frp2->fr_win != NULL)
if (frp->fr_layout == FR_LEAF)
return frp->fr_win == wp;
- for (p = frp->fr_child; p != NULL; p = p->fr_next)
+ FOR_ALL_FRAMES(p, frp->fr_child)
if (frame_has_win(p, wp))
return TRUE;
return FALSE;
do
{
/* All frames in this row get the same new height. */
- for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, topfrp->fr_child)
{
frame_new_height(frp, height, topfirst, wfh);
if (frp->fr_height > height)
{
/* The frame is fixed height if one of the frames in the row is fixed
* height. */
- for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, frp->fr_child)
if (frame_fixed_height(frp))
return TRUE;
return FALSE;
/* frp->fr_layout == FR_COL: The frame is fixed height if all of the
* frames in the row are fixed height. */
- for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, frp->fr_child)
if (!frame_fixed_height(frp))
return FALSE;
return TRUE;
{
/* The frame is fixed width if one of the frames in the row is fixed
* width. */
- for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, frp->fr_child)
if (frame_fixed_width(frp))
return TRUE;
return FALSE;
/* frp->fr_layout == FR_ROW: The frame is fixed width if all of the
* frames in the row are fixed width. */
- for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, frp->fr_child)
if (!frame_fixed_width(frp))
return FALSE;
return TRUE;
else if (frp->fr_layout == FR_ROW)
{
/* Handle all the frames in the row. */
- for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, frp->fr_child)
frame_add_statusline(frp);
}
else /* frp->fr_layout == FR_COL */
do
{
/* All frames in this column get the same new width. */
- for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, topfrp->fr_child)
{
frame_new_width(frp, width, leftfirst, wfw);
if (frp->fr_width > width)
else if (frp->fr_layout == FR_COL)
{
/* Handle all the frames in the column. */
- for (frp = frp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, frp->fr_child)
frame_add_vsep(frp);
}
else /* frp->fr_layout == FR_ROW */
{
/* get the minimal height from each frame in this row */
m = 0;
- for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, topfrp->fr_child)
{
n = frame_minheight(frp, next_curwin);
if (n > m)
{
/* Add up the minimal heights for all frames in this column. */
m = 0;
- for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, topfrp->fr_child)
m += frame_minheight(frp, next_curwin);
}
{
/* get the minimal width from each frame in this column */
m = 0;
- for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, topfrp->fr_child)
{
n = frame_minwidth(frp, next_curwin);
if (n > m)
{
/* Add up the minimal widths for all frames in this row. */
m = 0;
- for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, topfrp->fr_child)
m += frame_minwidth(frp, next_curwin);
}
{
startrow = *row;
startcol = *col;
- for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, topfrp->fr_child)
{
if (topfrp->fr_layout == FR_ROW)
*row = startrow; /* all frames are at the same row */
{
room = 0;
room_reserved = 0;
- for (frp = curfrp->fr_parent->fr_child; frp != NULL;
- frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, curfrp->fr_parent->fr_child)
{
if (frp != curfrp
&& frp->fr_win != NULL
{
room = 0;
room_reserved = 0;
- for (frp = curfrp->fr_parent->fr_child; frp != NULL;
- frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, curfrp->fr_parent->fr_child)
{
if (frp != curfrp
&& frp->fr_win != NULL
if (room < 0)
room = 0;
/* sum up the room of frames below of the current one */
- for (fr = curfr->fr_next; fr != NULL; fr = fr->fr_next)
+ FOR_ALL_FRAMES(fr, curfr->fr_next)
room += fr->fr_height - frame_minheight(fr, NULL);
fr = curfr; /* put fr at window that grows */
}
left = FALSE;
/* sum up the room of frames right of the current one */
room = 0;
- for (fr = curfr->fr_next; fr != NULL; fr = fr->fr_next)
+ FOR_ALL_FRAMES(fr, curfr->fr_next)
room += fr->fr_width - frame_minwidth(fr, NULL);
fr = curfr; /* put fr at window that grows */
}
else if (fr->fr_layout == FR_ROW)
{
/* vertically split windows, set status line for each one */
- for (fp = fr->fr_child; fp != NULL; fp = fp->fr_next)
+ FOR_ALL_FRAMES(fp, fr->fr_child)
last_status_rec(fp, statusline);
}
else
return TRUE;
if (topframe->fr_layout == FR_COL)
- for (fr = topframe->fr_child; fr != NULL; fr = fr->fr_next)
+ FOR_ALL_FRAMES(fr, topframe->fr_child)
if (fr->fr_layout == FR_ROW)
return TRUE;
return FALSE;
if (topfrp->fr_layout == FR_ROW)
- for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, topfrp->fr_child)
if (frp->fr_height != height)
return FALSE;
return FALSE;
if (topfrp->fr_layout == FR_COL)
- for (frp = topfrp->fr_child; frp != NULL; frp = frp->fr_next)
+ FOR_ALL_FRAMES(frp, topfrp->fr_child)
if (frp->fr_width != width)
return FALSE;