version 1.12, 2009/08/11 19:32:25 |
version 1.13, 2009/08/11 21:28:11 |
|
|
#include "tmux.h" |
#include "tmux.h" |
|
|
void server_msg_command(struct client *, struct msg_command_data *); |
void server_msg_command(struct client *, struct msg_command_data *); |
void server_msg_identify(struct client *, struct msg_identify_data *); |
void server_msg_identify(struct client *, struct msg_identify_data *, int); |
void server_msg_resize(struct client *, struct msg_resize_data *); |
void server_msg_resize(struct client *, struct msg_resize_data *); |
|
|
void printflike2 server_msg_command_error(struct cmd_ctx *, const char *, ...); |
void printflike2 server_msg_command_error(struct cmd_ctx *, const char *, ...); |
|
|
fatalx("bad MSG_IDENTIFY size"); |
fatalx("bad MSG_IDENTIFY size"); |
memcpy(&identifydata, imsg.data, sizeof identifydata); |
memcpy(&identifydata, imsg.data, sizeof identifydata); |
|
|
server_msg_identify(c, &identifydata); |
server_msg_identify(c, &identifydata, imsg.fd); |
break; |
break; |
case MSG_RESIZE: |
case MSG_RESIZE: |
if (datalen != sizeof resizedata) |
if (datalen != sizeof resizedata) |
|
|
} |
} |
|
|
void |
void |
server_msg_identify(struct client *c, struct msg_identify_data *data) |
server_msg_identify(struct client *c, struct msg_identify_data *data, int fd) |
{ |
{ |
c->tty.sx = data->sx; |
c->tty.sx = data->sx; |
c->tty.sy = data->sy; |
c->tty.sy = data->sy; |
|
|
|
|
data->tty[(sizeof data->tty) - 1] = '\0'; |
data->tty[(sizeof data->tty) - 1] = '\0'; |
data->term[(sizeof data->term) - 1] = '\0'; |
data->term[(sizeof data->term) - 1] = '\0'; |
tty_init(&c->tty, data->tty, data->term); |
tty_init(&c->tty, fd, data->tty, data->term); |
if (data->flags & IDENTIFY_UTF8) |
if (data->flags & IDENTIFY_UTF8) |
c->tty.flags |= TTY_UTF8; |
c->tty.flags |= TTY_UTF8; |
if (data->flags & IDENTIFY_256COLOURS) |
if (data->flags & IDENTIFY_256COLOURS) |