[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.53 and 1.54

version 1.53, 2016/07/15 00:42:56 version 1.54, 2016/07/15 00:49:08
Line 43 
Line 43 
         0, { .data = { 0, 8, 8, ' ' } }          0, { .data = { 0, 8, 8, ' ' } }
 };  };
   
 int     grid_check_y(struct grid *, u_int);  
   
 void    grid_reflow_copy(struct grid_line *, u_int, struct grid_line *l,  void    grid_reflow_copy(struct grid_line *, u_int, struct grid_line *l,
             u_int, u_int);              u_int, u_int);
 void    grid_reflow_join(struct grid *, u_int *, struct grid_line *, u_int);  void    grid_reflow_join(struct grid *, u_int *, struct grid_line *, u_int);
Line 64 
Line 62 
 }  }
   
 /* Check grid y position. */  /* Check grid y position. */
 int  static int
 grid_check_y(struct grid *gd, u_int py)  grid_check_y(struct grid *gd, u_int py)
 {  {
         if ((py) >= (gd)->hsize + (gd)->sy) {          if ((py) >= (gd)->hsize + (gd)->sy) {
Line 74 
Line 72 
         return (0);          return (0);
 }  }
   
   /* Compare grid cells. Return 1 if equal, 0 if not. */
   int
   grid_cells_equal(const struct grid_cell *gca, const struct grid_cell *gcb)
   {
           if (gca->fg != gcb->fg || gca->bg != gcb->bg)
                   return (0);
           if (gca->attr != gcb->attr || gca->flags != gcb->flags)
                   return (0);
           if (gca->data.width != gcb->data.width)
                   return (0);
           if (gca->data.size != gcb->data.size)
                   return (0);
           return (memcmp(gca->data.data, gcb->data.data, gca->data.size) == 0);
   }
   
 /* Create a new grid. */  /* Create a new grid. */
 struct grid *  struct grid *
 grid_create(u_int sx, u_int sy, u_int hlimit)  grid_create(u_int sx, u_int sy, u_int hlimit)
Line 131 
Line 144 
                 for (xx = 0; xx < gla->cellsize; xx++) {                  for (xx = 0; xx < gla->cellsize; xx++) {
                         grid_get_cell(ga, xx, yy, &gca);                          grid_get_cell(ga, xx, yy, &gca);
                         grid_get_cell(gb, xx, yy, &gcb);                          grid_get_cell(gb, xx, yy, &gcb);
                         if (memcmp(&gca, &gcb, sizeof (struct grid_cell)) != 0)                          if (!grid_cells_equal(&gca, &gcb))
                                 return (1);                                  return (1);
                 }                  }
         }          }
Line 305 
Line 318 
             (gc->bg & COLOUR_FLAG_RGB)))              (gc->bg & COLOUR_FLAG_RGB)))
                 extended = 1;                  extended = 1;
         if (extended) {          if (extended) {
                   gl->flags |= GRID_LINE_EXTENDED;
   
                 if (~gce->flags & GRID_FLAG_EXTENDED) {                  if (~gce->flags & GRID_FLAG_EXTENDED) {
                         gl->extddata = xreallocarray(gl->extddata,                          gl->extddata = xreallocarray(gl->extddata,
                             gl->extdsize + 1, sizeof *gl->extddata);                              gl->extdsize + 1, sizeof *gl->extddata);

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.54