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

Diff for /src/usr.bin/tmux/Attic/server-msg.c between version 1.20 and 1.21

version 1.20, 2009/09/23 06:18:47 version 1.21, 2009/09/23 12:03:31
Line 20 
Line 20 
 #include <sys/ioctl.h>  #include <sys/ioctl.h>
   
 #include <errno.h>  #include <errno.h>
   #include <paths.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <time.h>  #include <time.h>
Line 29 
Line 30 
   
 void    server_msg_command(struct client *, struct msg_command_data *);  void    server_msg_command(struct client *, struct msg_command_data *);
 void    server_msg_identify(struct client *, struct msg_identify_data *, int);  void    server_msg_identify(struct client *, struct msg_identify_data *, int);
   void    server_msg_shell(struct client *);
   
 void printflike2 server_msg_command_error(struct cmd_ctx *, const char *, ...);  void printflike2 server_msg_command_error(struct cmd_ctx *, const char *, ...);
 void printflike2 server_msg_command_print(struct cmd_ctx *, const char *, ...);  void printflike2 server_msg_command_print(struct cmd_ctx *, const char *, ...);
Line 113 
Line 115 
                         if (strchr(environdata.var, '=') != NULL)                          if (strchr(environdata.var, '=') != NULL)
                                 environ_put(&c->environ, environdata.var);                                  environ_put(&c->environ, environdata.var);
                         break;                          break;
                   case MSG_SHELL:
                           if (datalen != 0)
                                   fatalx("bad MSG_SHELL size");
   
                           server_msg_shell(c);
                           break;
                 default:                  default:
                         fatalx("unexpected message");                          fatalx("unexpected message");
                 }                  }
Line 247 
Line 255 
         tty_resize(&c->tty);          tty_resize(&c->tty);
   
         c->flags |= CLIENT_TERMINAL;          c->flags |= CLIENT_TERMINAL;
   }
   
   void
   server_msg_shell(struct client *c)
   {
           struct msg_shell_data    data;
           const char              *shell;
   
           shell = options_get_string(&global_s_options, "default-shell");
   
           if (*shell == '\0' || areshell(shell))
                   shell = _PATH_BSHELL;
           if (strlcpy(data.shell, shell, sizeof data.shell) >= sizeof data.shell)
                   strlcpy(data.shell, _PATH_BSHELL, sizeof data.shell);
   
           server_write_client(c, MSG_SHELL, &data, sizeof data);
           c->flags |= CLIENT_BAD; /* it will die after exec */
 }  }

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21