version 1.37, 2009/11/04 22:43:11 |
version 1.38, 2009/11/04 23:54:57 |
|
|
struct window *w; |
struct window *w; |
u_int i; |
u_int i; |
|
|
w = xmalloc(sizeof *w); |
w = xcalloc(1, sizeof *w); |
w->name = NULL; |
w->name = NULL; |
w->flags = 0; |
w->flags = 0; |
|
|
|
|
w->sx = sx; |
w->sx = sx; |
w->sy = sy; |
w->sy = sy; |
|
|
|
queue_window_name(w); |
|
|
options_init(&w->options, &global_w_options); |
options_init(&w->options, &global_w_options); |
|
|
for (i = 0; i < ARRAY_LENGTH(&windows); i++) { |
for (i = 0; i < ARRAY_LENGTH(&windows); i++) { |
|
|
if (w->layout_root != NULL) |
if (w->layout_root != NULL) |
layout_free(w); |
layout_free(w); |
|
|
|
evtimer_del(&w->name_timer); |
|
|
options_free(&w->options); |
options_free(&w->options); |
|
|
window_destroy_panes(w); |
window_destroy_panes(w); |
|
|
ARRAY_DECL(, char *) varlist; |
ARRAY_DECL(, char *) varlist; |
struct environ_entry *envent; |
struct environ_entry *envent; |
const char *ptr; |
const char *ptr; |
struct timeval tv; |
|
struct termios tio2; |
struct termios tio2; |
u_int i; |
u_int i; |
|
|
|
|
memset(&ws, 0, sizeof ws); |
memset(&ws, 0, sizeof ws); |
ws.ws_col = screen_size_x(&wp->base); |
ws.ws_col = screen_size_x(&wp->base); |
ws.ws_row = screen_size_y(&wp->base); |
ws.ws_row = screen_size_y(&wp->base); |
|
|
if (gettimeofday(&wp->window->name_timer, NULL) != 0) |
|
fatal("gettimeofday failed"); |
|
tv.tv_sec = 0; |
|
tv.tv_usec = NAME_INTERVAL * 1000L; |
|
timeradd(&wp->window->name_timer, &tv, &wp->window->name_timer); |
|
|
|
switch (wp->pid = forkpty(&wp->fd, wp->tty, NULL, &ws)) { |
switch (wp->pid = forkpty(&wp->fd, wp->tty, NULL, &ws)) { |
case -1: |
case -1: |