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

Diff for /src/usr.bin/tmux/grid.c between version 1.16 and 1.17

version 1.16, 2009/11/18 17:02:17 version 1.17, 2009/12/03 22:50:10
Line 170 
Line 170 
 {  {
         u_int   yy;          u_int   yy;
   
         GRID_DEBUG(gd, "");          GRID_DEBUG(gd, "");
   
         if (gd->hsize < gd->hlimit)          if (gd->hsize < gd->hlimit)
                 return;                  return;
Line 183 
Line 183 
         gd->hsize -= yy;          gd->hsize -= yy;
 }  }
   
 /*  /*
  * Scroll the entire visible screen, moving one line into the history. Just   * Scroll the entire visible screen, moving one line into the history. Just
  * allocate a new line at the bottom and move the history size indicator.   * allocate a new line at the bottom and move the history size indicator.
  */   */
Line 192 
Line 192 
 {  {
         u_int   yy;          u_int   yy;
   
         GRID_DEBUG(gd, "");          GRID_DEBUG(gd, "");
   
         yy = gd->hsize + gd->sy;          yy = gd->hsize + gd->sy;
         gd->linedata = xrealloc(gd->linedata, yy + 1, sizeof *gd->linedata);          gd->linedata = xrealloc(gd->linedata, yy + 1, sizeof *gd->linedata);
         memset(&gd->linedata[yy], 0, sizeof gd->linedata[yy]);          memset(&gd->linedata[yy], 0, sizeof gd->linedata[yy]);
   
         gd->hsize++;          gd->hsize++;
 }  }
   
Line 208 
Line 208 
         struct grid_line        *gl_history, *gl_upper, *gl_lower;          struct grid_line        *gl_history, *gl_upper, *gl_lower;
         u_int                    yy;          u_int                    yy;
   
         GRID_DEBUG(gd, "upper=%u, lower=%u", upper, lower);          GRID_DEBUG(gd, "upper=%u, lower=%u", upper, lower);
   
         /* Create a space for a new line. */          /* Create a space for a new line. */
         yy = gd->hsize + gd->sy;          yy = gd->hsize + gd->sy;
Line 354 
Line 354 
 {  {
         u_int   xx, yy;          u_int   xx, yy;
   
         GRID_DEBUG(gd, "px=%u, py=%u, nx=%u, ny=%u", px, py, nx, ny);          GRID_DEBUG(gd, "px=%u, py=%u, nx=%u, ny=%u", px, py, nx, ny);
   
         if (nx == 0 || ny == 0)          if (nx == 0 || ny == 0)
                 return;                  return;
Line 395 
Line 395 
         struct grid_line        *gl;          struct grid_line        *gl;
         u_int                    yy;          u_int                    yy;
   
         GRID_DEBUG(gd, "py=%u, ny=%u", py, ny);          GRID_DEBUG(gd, "py=%u, ny=%u", py, ny);
   
         if (ny == 0)          if (ny == 0)
                 return;                  return;
Line 421 
Line 421 
 {  {
         u_int   yy;          u_int   yy;
   
         GRID_DEBUG(gd, "dy=%u, py=%u, ny=%u", dy, py, ny);          GRID_DEBUG(gd, "dy=%u, py=%u, ny=%u", dy, py, ny);
   
         if (ny == 0 || py == dy)          if (ny == 0 || py == dy)
                 return;                  return;
Line 460 
Line 460 
         struct grid_line        *gl;          struct grid_line        *gl;
         u_int                    xx;          u_int                    xx;
   
         GRID_DEBUG(gd, "dx=%u, px=%u, py=%u, nx=%u", dx, px, py, nx);          GRID_DEBUG(gd, "dx=%u, px=%u, py=%u, nx=%u", dx, px, py, nx);
   
         if (nx == 0 || px == dx)          if (nx == 0 || px == dx)
                 return;                  return;
Line 499 
Line 499 
 char *  char *
 grid_string_cells(struct grid *gd, u_int px, u_int py, u_int nx)  grid_string_cells(struct grid *gd, u_int px, u_int py, u_int nx)
 {  {
         const struct grid_cell  *gc;          const struct grid_cell  *gc;
         const struct grid_utf8  *gu;          const struct grid_utf8  *gu;
         char                    *buf;          char                    *buf;
         size_t                   len, off, size;          size_t                   len, off, size;
         u_int                    xx;          u_int                    xx;
Line 535 
Line 535 
                         buf[off++] = gc->data;                          buf[off++] = gc->data;
                 }                  }
         }          }
   
         while (off > 0 && buf[off - 1] == ' ')          while (off > 0 && buf[off - 1] == ' ')
                 off--;                  off--;
         buf[off] = '\0';          buf[off] = '\0';
         return (buf);          return (buf);
 }  }
   
 /*  /*
  * Duplicate a set of lines between two grids. If there aren't enough lines in   * Duplicate a set of lines between two grids. If there aren't enough lines in
  * either source or destination, the number of lines is limited to the number   * either source or destination, the number of lines is limited to the number
  * available.   * available.

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17