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

Diff for /src/usr.bin/less/cvt.c between version 1.7 and 1.8

version 1.7, 2016/03/16 15:36:26 version 1.8, 2016/09/17 15:06:41
Line 43 
Line 43 
         int i;          int i;
         int *chpos = ecalloc(sizeof (int), len);          int *chpos = ecalloc(sizeof (int), len);
         /* Initialize all entries to an invalid position. */          /* Initialize all entries to an invalid position. */
         for (i = 0;  i < len;  i++)          for (i = 0; i < len; i++)
                 chpos[i] = -1;                  chpos[i] = -1;
         return (chpos);          return (chpos);
 }  }
Line 67 
Line 67 
         else          else
                 src_end = osrc + strlen(osrc);                  src_end = osrc + strlen(osrc);
   
         for (src = osrc, dst = odst;  src < src_end; ) {          for (src = osrc, dst = odst; src < src_end; ) {
                 int src_pos = src - osrc;                  int src_pos = src - osrc;
                 int dst_pos = dst - odst;                  int dst_pos = dst - odst;
                 ch = step_char(&src, +1, src_end);                  ch = step_char(&src, +1, src_end);
Line 79 
Line 79 
                             !IS_ASCII_OCTET(*dst) && !IS_UTF8_LEAD(*dst));                              !IS_ASCII_OCTET(*dst) && !IS_UTF8_LEAD(*dst));
                 } else if ((ops & CVT_ANSI) && IS_CSI_START(ch)) {                  } else if ((ops & CVT_ANSI) && IS_CSI_START(ch)) {
                         /* Skip to end of ANSI escape sequence. */                          /* Skip to end of ANSI escape sequence. */
                         src++;  /* skip the CSI start char */                          src++;  /* skip the CSI start char */
                         while (src < src_end)                          while (src < src_end)
                                 if (!is_ansi_middle(*src++))                                  if (!is_ansi_middle(*src++))
                                         break;                                          break;

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8