~ubuntu-branches/ubuntu/trusty/libversion-perl/trusty

« back to all changes in this revision

Viewing changes to vutil/vutil.c

  • Committer: Package Import Robot
  • Author(s): Logan Rosen
  • Date: 2012-11-08 11:58:04 UTC
  • mfrom: (7.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20121108115804-yxcczqex0t9ti27n
Tags: 1:0.9901-1ubuntu1
* Merge from Debian unstable. Remaining changes:
  - Build-depend on locales rather than locales-all.
* debian/changelog: Fix badly formatted trailer line.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
    }                                   /* end if dotted-decimal */
119
119
    else
120
120
    {                                   /* decimal versions */
 
121
        int j = 0;                      /* may need this later */
121
122
        /* special strict case for leading '.' or '0' */
122
123
        if (strict) {
123
124
            if (*d == '.') {
180
181
        }
181
182
 
182
183
        while (isDIGIT(*d)) {
183
 
            d++;
 
184
            d++; j++;
184
185
            if (*d == '.' && isDIGIT(d[-1])) {
185
186
                if (alpha) {
186
187
                    BADVERSION(s,errstr,"Invalid version format (underscores before decimal)");
202
203
                if ( ! isDIGIT(d[1]) ) {
203
204
                    BADVERSION(s,errstr,"Invalid version format (misplaced underscore)");
204
205
                }
 
206
                width = j;
205
207
                d++;
206
208
                alpha = TRUE;
207
209
            }