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

Diff for /src/usr.bin/less/line.c between version 1.20 and 1.21

version 1.20, 2016/03/26 08:59:29 version 1.21, 2016/09/17 15:06:41
Line 181 
Line 181 
                 if (n < MIN_LINENUM_WIDTH)                  if (n < MIN_LINENUM_WIDTH)
                         n = MIN_LINENUM_WIDTH;                          n = MIN_LINENUM_WIDTH;
                 snprintf(linebuf+curr, size_linebuf-curr, "%*s ", n, buf);                  snprintf(linebuf+curr, size_linebuf-curr, "%*s ", n, buf);
                 n++;  /* One space after the line number. */                  n++;    /* One space after the line number. */
                 for (i = 0; i < n; i++)                  for (i = 0; i < n; i++)
                         attr[curr+i] = AT_NORMAL;                          attr[curr+i] = AT_NORMAL;
                 curr += n;                  curr += n;
Line 464 
Line 464 
          * Search backwards for either an ESC (which means we ARE in a seq);           * Search backwards for either an ESC (which means we ARE in a seq);
          * or an end char (which means we're NOT in a seq).           * or an end char (which means we're NOT in a seq).
          */           */
         for (p = &linebuf[curr];  p > linebuf; ) {          for (p = &linebuf[curr]; p > linebuf; ) {
                 LWCHAR ch = step_char(&p, -1, linebuf);                  LWCHAR ch = step_char(&p, -1, linebuf);
                 if (IS_CSI_START(ch))                  if (IS_CSI_START(ch))
                         return (1);                          return (1);
Line 596 
Line 596 
                 to_tab = tabdefault -                  to_tab = tabdefault -
                     ((to_tab - tabstops[ntabstops-1]) % tabdefault);                      ((to_tab - tabstops[ntabstops-1]) % tabdefault);
         else {          else {
                 for (i = ntabstops - 2;  i >= 0;  i--)                  for (i = ntabstops - 2; i >= 0; i--)
                         if (to_tab >= tabstops[i])                          if (to_tab >= tabstops[i])
                                 break;                                  break;
                 to_tab = tabstops[i+1] - to_tab;                  to_tab = tabstops[i+1] - to_tab;

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21