ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/src/vendor/less/dist/cvt.c
(Generate patch)

Comparing vendor/less/dist/cvt.c (file contents):
Revision 6427 by laffer1, Sat Nov 30 19:59:03 2013 UTC vs.
Revision 6428 by laffer1, Sun Dec 1 02:26:57 2013 UTC

# Line 1 | Line 1
1   /*
2 < * Copyright (C) 1984-2009  Mark Nudelman
2 > * Copyright (C) 1984-2012  Mark Nudelman
3   *
4   * You may distribute under the terms of either the GNU General Public
5   * License or the Less License, as specified in the README file.
6   *
7 < * For more information about less, or for information on how to
8 < * contact the author, see the README file.
7 > * For more information, see the README file.
8   */
9  
10   /*
# Line 64 | Line 63 | cvt_text(odst, osrc, chpos, lenp, ops)
63          int ops;
64   {
65          char *dst;
66 +        char *edst = odst;
67          char *src;
68          register char *src_end;
69          LWCHAR ch;
# Line 98 | Line 98 | cvt_text(odst, osrc, chpos, lenp, ops)
98                          if ((ops & CVT_TO_LC) && IS_UPPER(ch))
99                                  ch = TO_LOWER(ch);
100                          put_wchar(&dst, ch);
101 <                        /*
102 <                         * Record the original position of the char.
103 <                         * But if we've already recorded a position
104 <                         * for this char (due to a backspace), leave
105 <                         * it alone; if multiple source chars map to
106 <                         * one destination char, we want the position
107 <                         * of the first one.
108 <                         */
109 <                        if (chpos != NULL && chpos[dst_pos] < 0)
101 >                        /* Record the original position of the char. */
102 >                        if (chpos != NULL)
103                                  chpos[dst_pos] = src_pos;
104                  }
105 +                if (dst > edst)
106 +                        edst = dst;
107          }
108 <        if ((ops & CVT_CRLF) && dst > odst && dst[-1] == '\r')
109 <                dst--;
110 <        *dst = '\0';
108 >        if ((ops & CVT_CRLF) && edst > odst && edst[-1] == '\r')
109 >                edst--;
110 >        *edst = '\0';
111          if (lenp != NULL)
112 <                *lenp = dst - odst;
113 <        if (chpos != NULL)
119 <                chpos[dst - odst] = src - osrc;
112 >                *lenp = edst - odst;
113 >        /* FIXME: why was this here?  if (chpos != NULL) chpos[dst - odst] = src - osrc; */
114   }

Comparing vendor/less/dist/cvt.c (property cvs2svn:cvs-rev):
Revision 6427 by laffer1, Sat Nov 30 19:59:03 2013 UTC vs.
Revision 6428 by laffer1, Sun Dec 1 02:26:57 2013 UTC

# Line 1 | Line 0
1 1.1.1.1

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines