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

Diff for /src/usr.bin/tmux/cmd.c between version 1.78 and 1.79

version 1.78, 2013/03/22 15:54:29 version 1.79, 2013/03/24 09:27:20
Line 517 
Line 517 
   
 /* Find the target client or report an error and return NULL. */  /* Find the target client or report an error and return NULL. */
 struct client *  struct client *
 cmd_find_client(struct cmd_ctx *ctx, const char *arg)  cmd_find_client(struct cmd_ctx *ctx, const char *arg, int quiet)
 {  {
         struct client   *c;          struct client   *c;
         char            *tmparg;          char            *tmparg;
         size_t           arglen;          size_t           arglen;
   
         /* A NULL argument means the current client. */          /* A NULL argument means the current client. */
         if (arg == NULL)          if (arg == NULL) {
                 return (cmd_current_client(ctx));                  c = cmd_current_client(ctx);
                   if (c == NULL && !quiet)
                           ctx->error(ctx, "no clients");
                   return (c);
           }
         tmparg = xstrdup(arg);          tmparg = xstrdup(arg);
   
         /* Trim a single trailing colon if any. */          /* Trim a single trailing colon if any. */
Line 537 
Line 541 
         c = cmd_lookup_client(tmparg);          c = cmd_lookup_client(tmparg);
   
         /* If no client found, report an error. */          /* If no client found, report an error. */
         if (c == NULL)          if (c == NULL && !quiet)
                 ctx->error(ctx, "client not found: %s", tmparg);                  ctx->error(ctx, "client not found: %s", tmparg);
   
         free(tmparg);          free(tmparg);

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79