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

Diff for /src/usr.bin/tmux/cmd-set-option.c between version 1.60 and 1.61

version 1.60, 2013/03/24 09:54:10 version 1.61, 2013/03/24 09:55:02
Line 30 
Line 30 
 enum cmd_retval cmd_set_option_exec(struct cmd *, struct cmd_q *);  enum cmd_retval cmd_set_option_exec(struct cmd *, struct cmd_q *);
   
 enum cmd_retval cmd_set_option_user(struct cmd *, struct cmd_q *,  enum cmd_retval cmd_set_option_user(struct cmd *, struct cmd_q *,
                     const char *, const char *);              const char *, const char *);
   
 int     cmd_set_option_unset(struct cmd *, struct cmd_q *,  int     cmd_set_option_unset(struct cmd *, struct cmd_q *,
             const struct options_table_entry *, struct options *,              const struct options_table_entry *, struct options *,
Line 63 
Line 63 
   
 const struct cmd_entry cmd_set_option_entry = {  const struct cmd_entry cmd_set_option_entry = {
         "set-option", "set",          "set-option", "set",
         "agqst:uw", 1, 2,          "agoqst:uw", 1, 2,
         "[-agsquw] [-t target-session|target-window] option [value]",          "[-agosquw] [-t target-session|target-window] option [value]",
         0,          0,
         NULL,          NULL,
         NULL,          NULL,
Line 73 
Line 73 
   
 const struct cmd_entry cmd_set_window_option_entry = {  const struct cmd_entry cmd_set_window_option_entry = {
         "set-window-option", "setw",          "set-window-option", "setw",
         "agqt:u", 1, 2,          "agoqt:u", 1, 2,
         "[-agqu] " CMD_TARGET_WINDOW_USAGE " option [value]",          "[-agoqu] " CMD_TARGET_WINDOW_USAGE " option [value]",
         0,          0,
         NULL,          NULL,
         NULL,          NULL,
Line 151 
Line 151 
                 if (cmd_set_option_unset(self, cmdq, oe, oo, valstr) != 0)                  if (cmd_set_option_unset(self, cmdq, oe, oo, valstr) != 0)
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
         } else {          } else {
                   if (args_has(args, 'o') && options_find1(oo, optstr) != NULL) {
                           if (!args_has(args, 'q'))
                                   cmdq_print(cmdq, "already set: %s", optstr);
                           return (CMD_RETURN_NORMAL);
                   }
                 if (cmd_set_option_set(self, cmdq, oe, oo, valstr) != 0)                  if (cmd_set_option_set(self, cmdq, oe, oo, valstr) != 0)
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
         }          }
Line 226 
Line 231 
                 if (valstr == NULL) {                  if (valstr == NULL) {
                         cmdq_error(cmdq, "empty value");                          cmdq_error(cmdq, "empty value");
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                   }
                   if (args_has(args, 'o') && options_find1(oo, optstr) != NULL) {
                           if (!args_has(args, 'q'))
                                   cmdq_print(cmdq, "already set: %s", optstr);
                           return (CMD_RETURN_NORMAL);
                 }                  }
                 options_set_string(oo, optstr, "%s", valstr);                  options_set_string(oo, optstr, "%s", valstr);
                 if (!args_has(args, 'q')) {                  if (!args_has(args, 'q')) {

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61