=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/layout.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- src/usr.bin/tmux/layout.c 2009/07/19 13:21:40 1.3 +++ src/usr.bin/tmux/layout.c 2009/12/03 22:50:10 1.4 @@ -1,4 +1,4 @@ -/* $OpenBSD: layout.c,v 1.3 2009/07/19 13:21:40 nicm Exp $ */ +/* $OpenBSD: layout.c,v 1.4 2009/12/03 22:50:10 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -45,13 +45,13 @@ lc->parent = lcparent; TAILQ_INIT(&lc->cells); - + lc->sx = UINT_MAX; lc->sy = UINT_MAX; - + lc->xoff = UINT_MAX; lc->yoff = UINT_MAX; - + lc->wp = NULL; return (lc); @@ -201,8 +201,8 @@ if (sx < 1) sx = lc->sx; } - - /* + + /* * Similarly for the vertical size; the minimum vertical size * is two because scroll regions cannot be one line. */ @@ -231,7 +231,7 @@ available = lc->sx; else available = lc->sy; - + if (available > PANE_MINIMUM) available -= PANE_MINIMUM; else @@ -269,7 +269,7 @@ lc->sx += change; else lc->sy += change; - + /* If this is a leaf cell, that is all that is necessary. */ if (type == LAYOUT_WINDOWPANE) return; @@ -281,8 +281,8 @@ return; } - /* - * Child cell runs in the same direction. Adjust each child equally + /* + * Child cell runs in the same direction. Adjust each child equally * until no further change is possible. */ while (change != 0) { @@ -327,10 +327,10 @@ struct layout_cell *lc = w->layout_root; int xlimit, ylimit, xchange, ychange; - /* + /* * Adjust horizontally. Do not attempt to reduce the layout lower than * the minimum (more than the amount returned by layout_resize_check). - * + * * This can mean that the window size is smaller than the total layout * size: redrawing this is handled at a higher level, but it does leave * a problem with growing the window size here: if the current size is @@ -366,7 +366,7 @@ } if (ychange != 0) layout_resize_adjust(lc, LAYOUT_TOPBOTTOM, ychange); - + /* Fix cell offsets. */ layout_fix_offsets(lc); layout_fix_panes(w, sx, sy); @@ -408,7 +408,7 @@ if (size == 0) /* no more change possible */ break; } - + /* Fix cell offsets. */ layout_fix_offsets(wp->window->layout_root); layout_fix_panes(wp->window, wp->window->sx, wp->window->sy); @@ -423,14 +423,14 @@ /* Growing. Always add to the current cell. */ lcadd = lc; - + /* Look towards the tail for a suitable cell for reduction. */ lcremove = TAILQ_NEXT(lc, entry); while (lcremove != NULL) { size = layout_resize_check(lcremove, type); if (size > 0) break; - lcremove = TAILQ_NEXT(lcremove, entry); + lcremove = TAILQ_NEXT(lcremove, entry); } /* If none found, look towards the head. */ @@ -514,7 +514,7 @@ default: fatalx("bad layout type"); } - + if (lc->parent != NULL && lc->parent->type == type) { /* * If the parent exists and is of the same type as the split, @@ -528,7 +528,7 @@ /* * Otherwise create a new parent and insert it. */ - + /* Create and insert the replacement parent. */ lcparent = layout_create_cell(lc->parent); layout_make_node(lcparent, type); @@ -537,11 +537,11 @@ wp->window->layout_root = lcparent; else TAILQ_REPLACE(&lc->parent->cells, lc, lcparent, entry); - + /* Insert the old cell. */ lc->parent = lcparent; TAILQ_INSERT_HEAD(&lcparent->cells, lc, entry); - + /* Create the new child cell. */ lcnew = layout_create_cell(lcparent); TAILQ_INSERT_TAIL(&lcparent->cells, lcnew, entry); @@ -554,7 +554,7 @@ case LAYOUT_LEFTRIGHT: if (size < 0) size2 = ((sx + 1) / 2) - 1; - else + else size2 = size; if (size2 < PANE_MINIMUM) size2 = PANE_MINIMUM; @@ -600,7 +600,7 @@ lc = wp->layout_cell; lcparent = lc->parent; - /* + /* * If no parent, this is the last pane so window close is imminent and * there is no need to resize anything. */ @@ -623,8 +623,8 @@ /* Remove this from the parent's list. */ TAILQ_REMOVE(&lcparent->cells, lc, entry); layout_free_cell(lc); - - /* + + /* * If the parent now has one cell, remove the parent from the tree and * replace it by that cell. */