version 1.32, 2014/11/06 09:17:25 |
version 1.33, 2015/01/11 04:14:40 |
|
|
void |
void |
screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit) |
screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit) |
{ |
{ |
char host[HOST_NAME_MAX]; |
char host[HOST_NAME_MAX+1]; |
|
|
s->grid = grid_create(sx, sy, hlimit); |
s->grid = grid_create(sx, sy, hlimit); |
|
|
if (gethostname(host, HOST_NAME_MAX) == 0) |
if (gethostname(host, sizeof(host)) == 0) |
s->title = xstrdup(host); |
s->title = xstrdup(host); |
else |
else |
s->title = xstrdup(""); |
s->title = xstrdup(""); |