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

Diff for /src/usr.bin/tmux/client.c between version 1.19 and 1.20

version 1.19, 2009/09/23 06:05:02 version 1.20, 2009/09/23 06:12:58
Line 34 
Line 34 
 #include "tmux.h"  #include "tmux.h"
   
 void    client_send_environ(struct client_ctx *);  void    client_send_environ(struct client_ctx *);
 void    client_handle_winch(struct client_ctx *);  
   
 int  int
 client_init(char *path, struct client_ctx *cctx, int cmdflags, int flags)  client_init(char *path, struct client_ctx *cctx, int cmdflags, int flags)
Line 100 
Line 99 
                 if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) == -1)                  if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) == -1)
                         fatal("ioctl(TIOCGWINSZ)");                          fatal("ioctl(TIOCGWINSZ)");
                 data.flags = flags;                  data.flags = flags;
                 data.sx = ws.ws_col;  
                 data.sy = ws.ws_row;  
   
                 if (getcwd(data.cwd, sizeof data.cwd) == NULL)                  if (getcwd(data.cwd, sizeof data.cwd) == NULL)
                         *data.cwd = '\0';                          *data.cwd = '\0';
Line 169 
Line 166 
                         waitpid(WAIT_ANY, NULL, WNOHANG);                          waitpid(WAIT_ANY, NULL, WNOHANG);
                         sigchld = 0;                          sigchld = 0;
                 }                  }
                 if (sigwinch)                  if (sigwinch) {
                         client_handle_winch(cctx);                          client_write_server(cctx, MSG_RESIZE, NULL, 0);
                           sigwinch = 0;
                   }
                 if (sigcont) {                  if (sigcont) {
                         siginit();                          siginit();
                         client_write_server(cctx, MSG_WAKEUP, NULL, 0);                          client_write_server(cctx, MSG_WAKEUP, NULL, 0);
Line 236 
Line 235 
                 printf("[unknown error]\n");                  printf("[unknown error]\n");
                 return (1);                  return (1);
         }          }
 }  
   
 void  
 client_handle_winch(struct client_ctx *cctx)  
 {  
         struct msg_resize_data  data;  
         struct winsize          ws;  
   
         if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) == -1)  
                 fatal("ioctl failed");  
   
         data.sx = ws.ws_col;  
         data.sy = ws.ws_row;  
         client_write_server(cctx, MSG_RESIZE, &data, sizeof data);  
   
         sigwinch = 0;  
 }  }
   
 int  int

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