Subversion Repositories SvarDOS

Rev

Rev 926 | Rev 936 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 926 Rev 927
Line 90... Line 90...
90
    }
90
    }
91
    $subver[3] = intval($svarver); // set the +rev as a very minor item
91
    $subver[3] = intval($svarver); // set the +rev as a very minor item
92
    $verstr = substr($verstr, 0, $i);
92
    $verstr = substr($verstr, 0, $i);
93
  }
93
  }
94
 
94
 
-
 
95
  // any occurence of alpha,beta,gamma,delta etc preceded by a digit should have a space separator added
-
 
96
  // example: "2.6.0pre9" becomes "2.6.0 pre9"
-
 
97
  $verstr = preg_replace('/([0-9])(alpha|beta|gamma|delta|pre|rc|patch)/', '$1 $2', $verstr);
-
 
98
 
-
 
99
  // same as above, but this time adding a trailing space separator
-
 
100
  // example: "2.6.0 pre9" becomes "2.6.0 pre 9"
-
 
101
  $verstr = preg_replace('/(alpha|beta|gamma|delta|pre|rc|patch)([0-9])/', '$1 $2', $verstr);
-
 
102
 
95
  // is the version ending with ' alpha', 'beta', etc?
103
  // is the version ending with ' alpha', 'beta', etc?
96
  if (preg_match('/ (alpha|beta|gamma|delta|pre|rc|patch)( [0-9]{1,4}){0,1}$/', $verstr)) {
104
  if (preg_match('/ (alpha|beta|gamma|delta|pre|rc|patch)( [0-9]{1,4}){0,1}$/', $verstr)) {
97
    // if there is a trailing beta-number, process it first
105
    // if there is a trailing beta-number, process it first
98
    if (preg_match('/ [0-9]{1,4}$/', $verstr)) {
106
    if (preg_match('/ [0-9]{1,4}$/', $verstr)) {
99
      $i = strrpos($verstr, ' ');
107
      $i = strrpos($verstr, ' ');