=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.h,v retrieving revision 1.347 retrieving revision 1.348 diff -c -r1.347 -r1.348 *** src/usr.bin/tmux/tmux.h 2012/07/10 11:53:01 1.347 --- src/usr.bin/tmux/tmux.h 2012/07/11 07:10:15 1.348 *************** *** 1,4 **** ! /* $OpenBSD: tmux.h,v 1.347 2012/07/10 11:53:01 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tmux.h,v 1.348 2012/07/11 07:10:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 1331,1336 **** --- 1331,1343 ---- TAILQ_HEAD(, cmd) list; }; + enum cmd_retval { + CMD_RETURN_ERROR = -1, + CMD_RETURN_NORMAL = 0, + CMD_RETURN_YIELD, + CMD_RETURN_ATTACH + }; + struct cmd_entry { const char *name; const char *alias; *************** *** 1349,1355 **** void (*key_binding)(struct cmd *, int); int (*check)(struct args *); ! int (*exec)(struct cmd *, struct cmd_ctx *); }; /* Key binding. */ --- 1356,1362 ---- void (*key_binding)(struct cmd *, int); int (*check)(struct args *); ! enum cmd_retval (*exec)(struct cmd *, struct cmd_ctx *); }; /* Key binding. */ *************** *** 1641,1647 **** char **cmd_copy_argv(int, char *const *); void cmd_free_argv(int, char **); struct cmd *cmd_parse(int, char **, char **); ! int cmd_exec(struct cmd *, struct cmd_ctx *); void cmd_free(struct cmd *); size_t cmd_print(struct cmd *, char *, size_t); struct session *cmd_current_session(struct cmd_ctx *, int); --- 1648,1654 ---- char **cmd_copy_argv(int, char *const *); void cmd_free_argv(int, char **); struct cmd *cmd_parse(int, char **, char **); ! enum cmd_retval cmd_exec(struct cmd *, struct cmd_ctx *); void cmd_free(struct cmd *); size_t cmd_print(struct cmd *, char *, size_t); struct session *cmd_current_session(struct cmd_ctx *, int); *************** *** 1745,1751 **** /* cmd-list.c */ struct cmd_list *cmd_list_parse(int, char **, char **); ! int cmd_list_exec(struct cmd_list *, struct cmd_ctx *); void cmd_list_free(struct cmd_list *); size_t cmd_list_print(struct cmd_list *, char *, size_t); --- 1752,1758 ---- /* cmd-list.c */ struct cmd_list *cmd_list_parse(int, char **, char **); ! enum cmd_retval cmd_list_exec(struct cmd_list *, struct cmd_ctx *); void cmd_list_free(struct cmd_list *); size_t cmd_list_print(struct cmd_list *, char *, size_t);