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

Diff for /src/usr.bin/tmux/cmd-new-session.c between version 1.50 and 1.51

version 1.50, 2013/03/25 11:44:00 version 1.51, 2013/10/10 12:00:21
Line 30 
Line 30 
  * Create a new session and attach to the current terminal unless -d is given.   * Create a new session and attach to the current terminal unless -d is given.
  */   */
   
 enum cmd_retval  cmd_new_session_check(struct args *);  
 enum cmd_retval  cmd_new_session_exec(struct cmd *, struct cmd_q *);  enum cmd_retval  cmd_new_session_exec(struct cmd *, struct cmd_q *);
   
 const struct cmd_entry cmd_new_session_entry = {  const struct cmd_entry cmd_new_session_entry = {
Line 40 
Line 39 
         CMD_TARGET_SESSION_USAGE " [-x width] [-y height] [command]",          CMD_TARGET_SESSION_USAGE " [-x width] [-y height] [command]",
         CMD_STARTSERVER|CMD_CANTNEST|CMD_SENDENVIRON,          CMD_STARTSERVER|CMD_CANTNEST|CMD_SENDENVIRON,
         NULL,          NULL,
         cmd_new_session_check,  
         cmd_new_session_exec          cmd_new_session_exec
 };  };
   
 enum cmd_retval  enum cmd_retval
 cmd_new_session_check(struct args *args)  
 {  
         if (args_has(args, 't') && (args->argc != 0 || args_has(args, 'n')))  
                 return (CMD_RETURN_ERROR);  
         return (CMD_RETURN_NORMAL);  
 }  
   
 enum cmd_retval  
 cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)  cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
 {  {
         struct args             *args = self->args;          struct args             *args = self->args;
Line 69 
Line 59 
         u_int                    sx, sy;          u_int                    sx, sy;
         int                      already_attached;          int                      already_attached;
         struct format_tree      *ft;          struct format_tree      *ft;
   
           if (args_has(args, 't') && (args->argc != 0 || args_has(args, 'n'))) {
                   cmdq_error(cmdq, "command or window name given with target");
                   return (CMD_RETURN_ERROR);
           }
   
         newname = args_get(args, 's');          newname = args_get(args, 's');
         if (newname != NULL) {          if (newname != NULL) {

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51