Sync OpenBSD patchset 196:

Rename struct hdrtype to msgtype which is a better name and can be used even
when struct hdr disappears.
pull/1/head
Tiago Cunha 2009-07-30 20:21:55 +00:00
parent 5a9b7b230c
commit 6fbfcfc0d7
6 changed files with 21 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/* $Id: client-fn.c,v 1.7 2009-07-28 22:12:16 tcunha Exp $ */
/* $Id: client-fn.c,v 1.8 2009-07-30 20:21:55 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -63,7 +63,7 @@ client_fill_session(struct msg_command_data *data)
void
client_write_server(
struct client_ctx *cctx, enum hdrtype type, void *buf, size_t len)
struct client_ctx *cctx, enum msgtype type, void *buf, size_t len)
{
struct hdr hdr;

View File

@ -1,4 +1,4 @@
/* $Id: client-msg.c,v 1.22 2009-07-28 22:12:16 tcunha Exp $ */
/* $Id: client-msg.c,v 1.23 2009-07-30 20:21:55 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -33,7 +33,7 @@ int client_msg_fn_exited(struct hdr *, struct client_ctx *);
int client_msg_fn_suspend(struct hdr *, struct client_ctx *);
struct client_msg {
enum hdrtype type;
enum msgtype type;
int (*fn)(struct hdr *, struct client_ctx *);
};
struct client_msg client_msg_table[] = {

View File

@ -1,4 +1,4 @@
/* $Id: server-fn.c,v 1.77 2009-07-28 22:12:16 tcunha Exp $ */
/* $Id: server-fn.c,v 1.78 2009-07-30 20:21:55 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -58,7 +58,7 @@ server_write_error(struct client *c, const char *msg)
void
server_write_client(
struct client *c, enum hdrtype type, const void *buf, size_t len)
struct client *c, enum msgtype type, const void *buf, size_t len)
{
struct hdr hdr;
@ -74,7 +74,7 @@ server_write_client(
void
server_write_session(
struct session *s, enum hdrtype type, const void *buf, size_t len)
struct session *s, enum msgtype type, const void *buf, size_t len)
{
struct client *c;
u_int i;

View File

@ -1,4 +1,4 @@
/* $Id: server-msg.c,v 1.74 2009-07-28 22:12:16 tcunha Exp $ */
/* $Id: server-msg.c,v 1.75 2009-07-30 20:21:55 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -41,7 +41,7 @@ void printflike2 server_msg_fn_command_info(
struct cmd_ctx *, const char *, ...);
struct server_msg {
enum hdrtype type;
enum msgtype type;
void (*fn)(struct hdr *, struct client *);
};
const struct server_msg server_msg_table[] = {

12
tmux.c
View File

@ -1,4 +1,4 @@
/* $Id: tmux.c,v 1.151 2009-07-30 20:17:25 tcunha Exp $ */
/* $Id: tmux.c,v 1.152 2009-07-30 20:21:55 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -62,8 +62,8 @@ char *socket_path;
__dead void usage(void);
char *makesockpath(const char *);
int prepare_unlock(enum hdrtype *, void **, size_t *, int);
int prepare_cmd(enum hdrtype *, void **, size_t *, int, char **);
int prepare_unlock(enum msgtype *, void **, size_t *, int);
int prepare_cmd(enum msgtype *, void **, size_t *, int, char **);
#ifndef HAVE_PROGNAME
char *__progname = (char *) "tmux";
@ -212,7 +212,7 @@ makesockpath(const char *label)
}
int
prepare_unlock(enum hdrtype *msg, void **buf, size_t *len, int argc)
prepare_unlock(enum msgtype *msg, void **buf, size_t *len, int argc)
{
static struct msg_unlock_data unlockdata;
char *pass;
@ -241,7 +241,7 @@ prepare_unlock(enum hdrtype *msg, void **buf, size_t *len, int argc)
}
int
prepare_cmd(enum hdrtype *msg, void **buf, size_t *len, int argc, char **argv)
prepare_cmd(enum msgtype *msg, void **buf, size_t *len, int argc, char **argv)
{
static struct msg_command_data cmddata;
@ -267,7 +267,7 @@ main(int argc, char **argv)
struct cmd_list *cmdlist;
struct cmd *cmd;
struct pollfd pfd;
enum hdrtype msg;
enum msgtype msg;
struct hdr hdr;
struct passwd *pw;
struct msg_print_data printdata;

12
tmux.h
View File

@ -1,4 +1,4 @@
/* $Id: tmux.h,v 1.398 2009-07-28 23:19:06 tcunha Exp $ */
/* $Id: tmux.h,v 1.399 2009-07-30 20:21:55 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -286,7 +286,7 @@ struct tty_term_code_entry {
};
/* Message codes. */
enum hdrtype {
enum msgtype {
MSG_COMMAND,
MSG_DETACH,
MSG_ERROR,
@ -312,7 +312,7 @@ enum hdrtype {
* the tmux client hang even if the protocol version is bumped.
*/
struct hdr {
enum hdrtype type;
enum msgtype type;
size_t size;
};
@ -1350,7 +1350,7 @@ int client_main(struct client_ctx *);
int client_msg_dispatch(struct client_ctx *);
/* client-fn.c */
void client_write_server(struct client_ctx *, enum hdrtype, void *, size_t);
void client_write_server(struct client_ctx *, enum msgtype, void *, size_t);
void client_fill_session(struct msg_command_data *);
/* key-bindings.c */
@ -1384,9 +1384,9 @@ int server_msg_dispatch(struct client *);
const char **server_fill_environ(struct session *);
void server_write_error(struct client *, const char *);
void server_write_client(
struct client *, enum hdrtype, const void *, size_t);
struct client *, enum msgtype, const void *, size_t);
void server_write_session(
struct session *, enum hdrtype, const void *, size_t);
struct session *, enum msgtype, const void *, size_t);
void server_redraw_client(struct client *);
void server_status_client(struct client *);
void server_redraw_session(struct session *);