version 1.22, 2012/03/17 21:37:36 |
version 1.23, 2012/07/10 11:53:01 |
|
|
void |
void |
screen_free(struct screen *s) |
screen_free(struct screen *s) |
{ |
{ |
if (s->tabs != NULL) |
free(s->tabs); |
xfree(s->tabs); |
free(s->title); |
xfree(s->title); |
free(s->ccolour); |
xfree(s->ccolour); |
|
grid_destroy(s->grid); |
grid_destroy(s->grid); |
} |
} |
|
|
|
|
{ |
{ |
u_int i; |
u_int i; |
|
|
if (s->tabs != NULL) |
free(s->tabs); |
xfree(s->tabs); |
|
|
|
if ((s->tabs = bit_alloc(screen_size_x(s))) == NULL) |
if ((s->tabs = bit_alloc(screen_size_x(s))) == NULL) |
fatal("bit_alloc failed"); |
fatal("bit_alloc failed"); |
|
|
void |
void |
screen_set_cursor_colour(struct screen *s, const char *colour_string) |
screen_set_cursor_colour(struct screen *s, const char *colour_string) |
{ |
{ |
xfree(s->ccolour); |
free(s->ccolour); |
s->ccolour = xstrdup(colour_string); |
s->ccolour = xstrdup(colour_string); |
} |
} |
|
|
|
|
|
|
strlcpy(tmp, title, sizeof tmp); |
strlcpy(tmp, title, sizeof tmp); |
|
|
xfree(s->title); |
free(s->title); |
s->title = xstrdup(tmp); |
s->title = xstrdup(tmp); |
} |
} |
|
|