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

Diff for /src/usr.bin/tmux/cmd-show-options.c between version 1.15 and 1.16

version 1.15, 2012/02/25 12:57:42 version 1.16, 2012/07/11 07:10:15
Line 27 
Line 27 
  * Show options.   * Show options.
  */   */
   
 int     cmd_show_options_exec(struct cmd *, struct cmd_ctx *);  enum cmd_retval  cmd_show_options_exec(struct cmd *, struct cmd_ctx *);
   
 const struct cmd_entry cmd_show_options_entry = {  const struct cmd_entry cmd_show_options_entry = {
         "show-options", "show",          "show-options", "show",
Line 49 
Line 49 
         cmd_show_options_exec          cmd_show_options_exec
 };  };
   
 int  enum cmd_retval
 cmd_show_options_exec(struct cmd *self, struct cmd_ctx *ctx)  cmd_show_options_exec(struct cmd *self, struct cmd_ctx *ctx)
 {  {
         struct args                             *args = self->args;          struct args                             *args = self->args;
Line 71 
Line 71 
                 else {                  else {
                         wl = cmd_find_window(ctx, args_get(args, 't'), NULL);                          wl = cmd_find_window(ctx, args_get(args, 't'), NULL);
                         if (wl == NULL)                          if (wl == NULL)
                                 return (-1);                                  return (CMD_RETURN_ERROR);
                         oo = &wl->window->options;                          oo = &wl->window->options;
                 }                  }
         } else {          } else {
Line 81 
Line 81 
                 else {                  else {
                         s = cmd_find_session(ctx, args_get(args, 't'), 0);                          s = cmd_find_session(ctx, args_get(args, 't'), 0);
                         if (s == NULL)                          if (s == NULL)
                                 return (-1);                                  return (CMD_RETURN_ERROR);
                         oo = &s->options;                          oo = &s->options;
                 }                  }
         }          }
Line 90 
Line 90 
                 table = oe = NULL;                  table = oe = NULL;
                 if (options_table_find(args->argv[0], &table, &oe) != 0) {                  if (options_table_find(args->argv[0], &table, &oe) != 0) {
                         ctx->error(ctx, "ambiguous option: %s", args->argv[0]);                          ctx->error(ctx, "ambiguous option: %s", args->argv[0]);
                         return (-1);                          return (CMD_RETURN_ERROR);
                 }                  }
                 if (oe == NULL) {                  if (oe == NULL) {
                         ctx->error(ctx, "unknown option: %s", args->argv[0]);                          ctx->error(ctx, "unknown option: %s", args->argv[0]);
                         return (-1);                          return (CMD_RETURN_ERROR);
                 }                  }
                 if ((o = options_find1(oo, oe->name)) == NULL)                  if ((o = options_find1(oo, oe->name)) == NULL)
                         return (0);                          return (CMD_RETURN_NORMAL);
                 optval = options_table_print_entry(oe, o);                  optval = options_table_print_entry(oe, o);
                 ctx->print(ctx, "%s %s", oe->name, optval);                  ctx->print(ctx, "%s %s", oe->name, optval);
         } else {          } else {
Line 109 
Line 109 
                 }                  }
         }          }
   
         return (0);          return (CMD_RETURN_NORMAL);
 }  }

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16