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

Diff for /src/usr.bin/tmux/screen-write.c between version 1.14 and 1.15

version 1.14, 2009/07/22 15:55:32 version 1.15, 2009/07/22 16:45:31
Line 327 
Line 327 
         s->rupper = 0;          s->rupper = 0;
         s->rlower = screen_size_y(s) - 1;          s->rlower = screen_size_y(s) - 1;
   
         tty_write_cmd(ctx->wp, TTY_ALIGNMENTTEST);          tty_write0(ctx->wp, TTY_ALIGNMENTTEST);
 }  }
   
 /* Insert nx characters. */  /* Insert nx characters. */
Line 349 
Line 349 
         if (s->cx <= screen_size_x(s) - 1)          if (s->cx <= screen_size_x(s) - 1)
                 grid_view_insert_cells(s->grid, s->cx, s->cy, nx);                  grid_view_insert_cells(s->grid, s->cx, s->cy, nx);
   
         tty_write_cmd(ctx->wp, TTY_INSERTCHARACTER, nx);          tty_writenum(ctx->wp, TTY_INSERTCHARACTER, nx);
 }  }
   
 /* Delete nx characters. */  /* Delete nx characters. */
Line 371 
Line 371 
         if (s->cx <= screen_size_x(s) - 1)          if (s->cx <= screen_size_x(s) - 1)
                 grid_view_delete_cells(s->grid, s->cx, s->cy, nx);                  grid_view_delete_cells(s->grid, s->cx, s->cy, nx);
   
         tty_write_cmd(ctx->wp, TTY_DELETECHARACTER, nx);          tty_writenum(ctx->wp, TTY_DELETECHARACTER, nx);
 }  }
   
 /* Insert ny lines. */  /* Insert ny lines. */
Line 393 
Line 393 
   
                 grid_view_insert_lines(s->grid, s->cy, ny);                  grid_view_insert_lines(s->grid, s->cy, ny);
   
                 tty_write_cmd(ctx->wp, TTY_INSERTLINE, ny);                  tty_writenum(ctx->wp, TTY_INSERTLINE, ny);
                 return;                  return;
         }          }
   
Line 409 
Line 409 
         else          else
                 grid_view_insert_lines_region(s->grid, s->rlower, s->cy, ny);                  grid_view_insert_lines_region(s->grid, s->rlower, s->cy, ny);
   
         tty_write_cmd(ctx->wp, TTY_INSERTLINE, ny);          tty_writenum(ctx->wp, TTY_INSERTLINE, ny);
 }  }
   
 /* Delete ny lines. */  /* Delete ny lines. */
Line 431 
Line 431 
   
                 grid_view_delete_lines(s->grid, s->cy, ny);                  grid_view_delete_lines(s->grid, s->cy, ny);
   
                 tty_write_cmd(ctx->wp, TTY_DELETELINE, ny);                  tty_writenum(ctx->wp, TTY_DELETELINE, ny);
                 return;                  return;
         }          }
   
Line 447 
Line 447 
         else          else
                 grid_view_delete_lines_region(s->grid, s->rlower, s->cy, ny);                  grid_view_delete_lines_region(s->grid, s->rlower, s->cy, ny);
   
         tty_write_cmd(ctx->wp, TTY_DELETELINE, ny);          tty_writenum(ctx->wp, TTY_DELETELINE, ny);
 }  }
   
 /* Clear line at cursor. */  /* Clear line at cursor. */
Line 460 
Line 460 
   
         grid_view_clear(s->grid, 0, s->cy, screen_size_x(s), 1);          grid_view_clear(s->grid, 0, s->cy, screen_size_x(s), 1);
   
         tty_write_cmd(ctx->wp, TTY_CLEARLINE);          tty_writenum(ctx->wp, TTY_CLEARLINE, 0);
 }  }
   
 /* Clear to end of line from cursor. */  /* Clear to end of line from cursor. */
Line 477 
Line 477 
         if (s->cx <= sx - 1)          if (s->cx <= sx - 1)
                 grid_view_clear(s->grid, s->cx, s->cy, sx - s->cx, 1);                  grid_view_clear(s->grid, s->cx, s->cy, sx - s->cx, 1);
   
         tty_write_cmd(ctx->wp, TTY_CLEARENDOFLINE);          tty_writenum(ctx->wp, TTY_CLEARENDOFLINE, 0);
 }  }
   
 /* Clear to start of line from cursor. */  /* Clear to start of line from cursor. */
Line 496 
Line 496 
         else          else
                 grid_view_clear(s->grid, 0, s->cy, s->cx + 1, 1);                  grid_view_clear(s->grid, 0, s->cy, s->cx + 1, 1);
   
         tty_write_cmd(ctx->wp, TTY_CLEARSTARTOFLINE);          tty_writenum(ctx->wp, TTY_CLEARSTARTOFLINE, 0);
 }  }
   
 /* Move cursor to px,py.  */  /* Move cursor to px,py.  */
Line 539 
Line 539 
         else if (s->cy > 0)          else if (s->cy > 0)
                 s->cy--;                  s->cy--;
   
         tty_write_cmd(ctx->wp, TTY_REVERSEINDEX);          tty_writenum(ctx->wp, TTY_REVERSEINDEX, 0);
 }  }
   
 /* Set scroll region. */  /* Set scroll region. */
Line 601 
Line 601 
         else if (s->cy < screen_size_y(s) - 1)          else if (s->cy < screen_size_y(s) - 1)
                 s->cy++;                  s->cy++;
   
         tty_write_cmd(ctx->wp, TTY_LINEFEED);          tty_writenum(ctx->wp, TTY_LINEFEED, 0);
 }  }
   
 /* Carriage return (cursor to start of line). */  /* Carriage return (cursor to start of line). */
Line 653 
Line 653 
                 grid_view_clear(s->grid, s->cx, s->cy, sx - s->cx, 1);                  grid_view_clear(s->grid, s->cx, s->cy, sx - s->cx, 1);
         grid_view_clear(s->grid, 0, s->cy + 1, sx, sy - (s->cy + 1));          grid_view_clear(s->grid, 0, s->cy + 1, sx, sy - (s->cy + 1));
   
         tty_write_cmd(ctx->wp, TTY_CLEARENDOFSCREEN);          tty_writenum(ctx->wp, TTY_CLEARENDOFSCREEN, 0);
 }  }
   
 /* Clear to start of screen. */  /* Clear to start of screen. */
Line 674 
Line 674 
         else          else
                 grid_view_clear(s->grid, 0, s->cy, s->cx + 1, 1);                  grid_view_clear(s->grid, 0, s->cy, s->cx + 1, 1);
   
         tty_write_cmd(ctx->wp, TTY_CLEARSTARTOFSCREEN);          tty_writenum(ctx->wp, TTY_CLEARSTARTOFSCREEN, 0);
 }  }
   
 /* Clear entire screen. */  /* Clear entire screen. */
Line 687 
Line 687 
   
         grid_view_clear(s->grid, 0, 0, screen_size_x(s), screen_size_y(s));          grid_view_clear(s->grid, 0, 0, screen_size_x(s), screen_size_y(s));
   
         tty_write_cmd(ctx->wp, TTY_CLEARSCREEN);          tty_writenum(ctx->wp, TTY_CLEARSCREEN, 0);
 }  }
   
 /* Write cell data. */  /* Write cell data. */
Line 697 
Line 697 
 {  {
         struct screen           *s = ctx->s;          struct screen           *s = ctx->s;
         struct grid             *gd = s->grid;          struct grid             *gd = s->grid;
           struct tty_ctx           ttyctx;
         struct grid_utf8         gu, *tmp_gu;          struct grid_utf8         gu, *tmp_gu;
         u_int                    width, xx, i;          u_int                    width, xx, i;
         struct grid_cell         tmp_gc, *tmp_gc2;          struct grid_cell         tmp_gc, *tmp_gc2;
Line 736 
Line 737 
                 memcpy(tmp_gu->data + i, udata, UTF8_SIZE - i);                  memcpy(tmp_gu->data + i, udata, UTF8_SIZE - i);
   
                 /* Assume the previous character has just been input. */                  /* Assume the previous character has just been input. */
                 tty_write_cmd(ctx->wp, TTY_UTF8CHARACTER, udata);                  tty_writeptr(ctx->wp, TTY_UTF8CHARACTER, udata);
                 return;                  return;
         }          }
   
Line 789 
Line 790 
   
         /* Draw to the screen if necessary. */          /* Draw to the screen if necessary. */
         if (insert)          if (insert)
                 tty_write_cmd(ctx->wp, TTY_INSERTCHARACTER, width);                  tty_writenum(ctx->wp, TTY_INSERTCHARACTER, width);
           ttyctx.wp = ctx->wp;
           ttyctx.utf8 = &gu;
         if (screen_check_selection(s, s->cx - width, s->cy)) {          if (screen_check_selection(s, s->cx - width, s->cy)) {
                 s->sel.cell.data = gc->data;                  s->sel.cell.data = gc->data;
                 tty_write_cmd(ctx->wp, TTY_CELL, &s->sel.cell, &gu);                  ttyctx.cell = &s->sel.cell;
         } else                  tty_write_cmd(TTY_CELL, &ttyctx);
                 tty_write_cmd(ctx->wp, TTY_CELL, gc, &gu);          } else {
                   ttyctx.cell = gc;
                   tty_write_cmd(TTY_CELL, &ttyctx);
           }
 }  }
   
 /*  /*

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15