[BACK]Return to cmd-show-messages.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd-show-messages.c between version 1.5 and 1.6

version 1.5, 2013/03/24 09:27:20 version 1.6, 2013/03/24 09:54:10
Line 27 
Line 27 
  * Show client message log.   * Show client message log.
  */   */
   
 enum cmd_retval  cmd_show_messages_exec(struct cmd *, struct cmd_ctx *);  enum cmd_retval  cmd_show_messages_exec(struct cmd *, struct cmd_q *);
   
 const struct cmd_entry cmd_show_messages_entry = {  const struct cmd_entry cmd_show_messages_entry = {
         "show-messages", "showmsgs",          "show-messages", "showmsgs",
Line 40 
Line 40 
 };  };
   
 enum cmd_retval  enum cmd_retval
 cmd_show_messages_exec(struct cmd *self, struct cmd_ctx *ctx)  cmd_show_messages_exec(struct cmd *self, struct cmd_q *cmdq)
 {  {
         struct args             *args = self->args;          struct args             *args = self->args;
         struct client           *c;          struct client           *c;
Line 48 
Line 48 
         char                    *tim;          char                    *tim;
         u_int                    i;          u_int                    i;
   
         if ((c = cmd_find_client(ctx, args_get(args, 't'), 0)) == NULL)          if ((c = cmd_find_client(cmdq, args_get(args, 't'), 0)) == NULL)
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
   
         for (i = 0; i < ARRAY_LENGTH(&c->message_log); i++) {          for (i = 0; i < ARRAY_LENGTH(&c->message_log); i++) {
Line 57 
Line 57 
                 tim = ctime(&msg->msg_time);                  tim = ctime(&msg->msg_time);
                 *strchr(tim, '\n') = '\0';                  *strchr(tim, '\n') = '\0';
   
                 ctx->print(ctx, "%s %s", tim, msg->msg);                  cmdq_print(cmdq, "%s %s", tim, msg->msg);
         }          }
   
         return (CMD_RETURN_NORMAL);          return (CMD_RETURN_NORMAL);

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6