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

Diff for /src/usr.bin/tmux/layout-custom.c between version 1.2 and 1.3

version 1.2, 2011/06/05 10:53:05 version 1.3, 2012/01/30 20:57:02
Line 79 
Line 79 
         if (len == 0)          if (len == 0)
                 return (-1);                  return (-1);
   
         tmplen = xsnprintf(tmp, sizeof tmp,          if (lc->wp != NULL) {
             "%ux%u,%u,%u", lc->sx, lc->sy, lc->xoff, lc->yoff);                  tmplen = xsnprintf(tmp, sizeof tmp, "%ux%u,%u,%u,%u",
                       lc->sx, lc->sy, lc->xoff, lc->yoff, lc->wp->id);
           } else {
                   tmplen = xsnprintf(tmp, sizeof tmp, "%ux%u,%u,%u",
                       lc->sx, lc->sy, lc->xoff, lc->yoff);
           }
         if (tmplen > (sizeof tmp) - 1)          if (tmplen > (sizeof tmp) - 1)
                 return (-1);                  return (-1);
         if (strlcat(buf, tmp, len) >= len)          if (strlcat(buf, tmp, len) >= len)
Line 202 
Line 207 
   
         if (!isdigit((u_char) **layout))          if (!isdigit((u_char) **layout))
                 return (NULL);                  return (NULL);
         if (sscanf(*layout, "%ux%u,%u,%u", &sx, &sy, &xoff, &yoff) != 4)          if (sscanf(*layout, "%ux%u,%u,%u,%*u", &sx, &sy, &xoff, &yoff) != 5 &&
               sscanf(*layout, "%ux%u,%u,%u", &sx, &sy, &xoff, &yoff) != 4)
                 return (NULL);                  return (NULL);
   
         while (isdigit((u_char) **layout))          while (isdigit((u_char) **layout))
Line 222 
Line 228 
         (*layout)++;          (*layout)++;
         while (isdigit((u_char) **layout))          while (isdigit((u_char) **layout))
                 (*layout)++;                  (*layout)++;
           if (**layout == ',') {
                   (*layout)++;
                   while (isdigit((u_char) **layout))
                           (*layout)++;
           }
   
         lc = layout_create_cell(lcparent);          lc = layout_create_cell(lcparent);
         lc->sx = sx;          lc->sx = sx;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3