version 1.26, 2009/06/04 02:23:37 |
version 1.27, 2009/06/04 23:39:37 |
|
|
* Split the current window. A window smaller than 3 lines cannot be split. |
* Split the current window. A window smaller than 3 lines cannot be split. |
* The only other error that is possible is a "malloc" failure allocating the |
* The only other error that is possible is a "malloc" failure allocating the |
* structure for the new window. |
* structure for the new window. |
|
* If called with a FFOTHARG, flags on the new window are set to 'n'. |
*/ |
*/ |
/* ARGSUSED */ |
/* ARGSUSED */ |
int |
int |
|
|
|
|
curwp->w_rflag |= WFMODE | WFFULL; |
curwp->w_rflag |= WFMODE | WFFULL; |
wp->w_rflag |= WFMODE | WFFULL; |
wp->w_rflag |= WFMODE | WFFULL; |
|
/* if FFOTHARG, set flags) */ |
|
if (f & FFOTHARG) |
|
wp->w_flag = n; |
|
|
return (TRUE); |
return (TRUE); |
} |
} |
|
|
|
|
} |
} |
free(wp); |
free(wp); |
return (TRUE); |
return (TRUE); |
} |
|
|
|
/* |
|
* Pick a window for a pop-up. Split the screen if there is only one window. |
|
* Pick the uppermost window that isn't the current window. An LRU algorithm |
|
* might be better. Return a pointer, or NULL on error. |
|
*/ |
|
struct mgwin * |
|
wpopup(void) |
|
{ |
|
struct mgwin *wp; |
|
|
|
if (wheadp->w_wndp == NULL && |
|
splitwind(FFRAND, 0) == FALSE) |
|
return (NULL); |
|
|
|
/* find a window to use */ |
|
wp = wheadp; |
|
|
|
while (wp != NULL && wp == curwp) |
|
wp = wp->w_wndp; |
|
return (wp); |
|
} |
} |