summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-07-29 14:17:27 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-07-29 14:17:27 +0000
commit9297d1c2ad086d16e7afa160d80765c36d6264f4 (patch)
tree78de8ffb1b267af3db5ad4441864fdd9d989b9b0 /usr.bin/tmux
parent97f164c00b3cdd8bf2fc22be1c2100c9616fe019 (diff)
Rename struct hdrtype to msgtype which is a better name and can be used even
when struct hdr disappears.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/client-fn.c4
-rw-r--r--usr.bin/tmux/client-msg.c4
-rw-r--r--usr.bin/tmux/server-fn.c6
-rw-r--r--usr.bin/tmux/server-msg.c4
-rw-r--r--usr.bin/tmux/tmux.c12
-rw-r--r--usr.bin/tmux/tmux.h12
6 files changed, 21 insertions, 21 deletions
diff --git a/usr.bin/tmux/client-fn.c b/usr.bin/tmux/client-fn.c
index 195254d322e..b986bc75a6f 100644
--- a/usr.bin/tmux/client-fn.c
+++ b/usr.bin/tmux/client-fn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client-fn.c,v 1.2 2009/07/26 12:58:44 nicm Exp $ */
+/* $OpenBSD: client-fn.c,v 1.3 2009/07/29 14:17:26 nicm 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;
diff --git a/usr.bin/tmux/client-msg.c b/usr.bin/tmux/client-msg.c
index 26183343d36..a0c6fdd8ec8 100644
--- a/usr.bin/tmux/client-msg.c
+++ b/usr.bin/tmux/client-msg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client-msg.c,v 1.5 2009/07/26 12:58:44 nicm Exp $ */
+/* $OpenBSD: client-msg.c,v 1.6 2009/07/29 14:17:26 nicm 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[] = {
diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c
index 22ba7eeefa6..50616517f5c 100644
--- a/usr.bin/tmux/server-fn.c
+++ b/usr.bin/tmux/server-fn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-fn.c,v 1.10 2009/07/26 12:58:44 nicm Exp $ */
+/* $OpenBSD: server-fn.c,v 1.11 2009/07/29 14:17:26 nicm 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;
diff --git a/usr.bin/tmux/server-msg.c b/usr.bin/tmux/server-msg.c
index 475bad2bf1d..af9f9682780 100644
--- a/usr.bin/tmux/server-msg.c
+++ b/usr.bin/tmux/server-msg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-msg.c,v 1.7 2009/07/26 12:58:44 nicm Exp $ */
+/* $OpenBSD: server-msg.c,v 1.8 2009/07/29 14:17:26 nicm 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[] = {
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c
index a5fe1d8daf6..d3ac8fdbb51 100644
--- a/usr.bin/tmux/tmux.c
+++ b/usr.bin/tmux/tmux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.c,v 1.22 2009/07/29 05:36:53 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.23 2009/07/29 14:17:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -57,8 +57,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 **);
__dead void
usage(void)
@@ -203,7 +203,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;
@@ -232,7 +232,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;
@@ -258,7 +258,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;
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index cb63215d196..806b9f91f11 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.63 2009/07/28 17:05:10 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.64 2009/07/29 14:17:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -287,7 +287,7 @@ struct tty_term_code_entry {
};
/* Message codes. */
-enum hdrtype {
+enum msgtype {
MSG_COMMAND,
MSG_DETACH,
MSG_ERROR,
@@ -313,7 +313,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;
};
@@ -1351,7 +1351,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 */
@@ -1385,9 +1385,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 *);