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

Diff for /src/usr.bin/tmux/Attic/tty-write.c between version 1.5 and 1.6

version 1.5, 2009/07/22 16:45:31 version 1.6, 2009/07/22 18:02:23
Line 23 
Line 23 
 #include "tmux.h"  #include "tmux.h"
   
 void  void
 tty_write0(struct window_pane *wp, enum tty_cmd cmd)  tty_write0(struct window_pane *wp, tty_cmd_func *cmdfn)
 {  {
         struct tty_ctx  ctx;          struct tty_ctx  ctx;
   
         memset(&ctx, 0, sizeof ctx);          memset(&ctx, 0, sizeof ctx);
         ctx.wp = wp;          ctx.wp = wp;
         tty_write_cmd(cmd, &ctx);          tty_write(cmdfn, &ctx);
 }  }
   
 void  void
 tty_writenum(struct window_pane *wp, enum tty_cmd cmd, u_int num)  tty_writenum(struct window_pane *wp, tty_cmd_func *cmdfn, u_int num)
 {  {
         struct tty_ctx  ctx;          struct tty_ctx  ctx;
   
         memset(&ctx, 0, sizeof ctx);          memset(&ctx, 0, sizeof ctx);
         ctx.wp = wp;          ctx.wp = wp;
         ctx.num = num;          ctx.num = num;
         tty_write_cmd(cmd, &ctx);          tty_write(cmdfn, &ctx);
 }  }
   
 void  void
 tty_writeptr(struct window_pane *wp, enum tty_cmd cmd, void *ptr)  tty_writeptr(struct window_pane *wp, tty_cmd_func *cmdfn, void *ptr)
 {  {
         struct tty_ctx  ctx;          struct tty_ctx  ctx;
   
         memset(&ctx, 0, sizeof ctx);          memset(&ctx, 0, sizeof ctx);
         ctx.wp = wp;          ctx.wp = wp;
         ctx.ptr = ptr;          ctx.ptr = ptr;
         tty_write_cmd(cmd, &ctx);          tty_write(cmdfn, &ctx);
 }  }
   
 void  void
 tty_write_cmd(enum tty_cmd cmd, struct tty_ctx *ctx)  tty_write(tty_cmd_func *cmdfn, struct tty_ctx *ctx)
 {  {
         struct window_pane      *wp = ctx->wp;          struct window_pane      *wp = ctx->wp;
         struct client           *c;          struct client           *c;
Line 77 
Line 77 
                         continue;                          continue;
   
                 if (c->session->curw->window == wp->window) {                  if (c->session->curw->window == wp->window) {
                           if (c->tty.flags & TTY_FREEZE || c->tty.term == NULL)
                                   continue;
                         tty_update_mode(&c->tty, c->tty.mode & ~MODE_CURSOR);                          tty_update_mode(&c->tty, c->tty.mode & ~MODE_CURSOR);
                           cmdfn(&c->tty, ctx);
                         tty_write(&c->tty, cmd, ctx);  
                 }                  }
         }          }
 }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6