Subversion Repositories SvarDOS

Rev

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

Rev 921 Rev 922
Line 91... Line 91...
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
  // is the version ending with ' alpha', 'beta', etc?
95
  // is the version ending with ' alpha', 'beta', etc?
96
  if (preg_match('/ (alpha|beta|gamma|delta|pre|rc)( [0-9]{1,4}){0,1}$/', $verstr)) {
96
  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
97
    // if there is a trailing beta-number, process it first
98
    if (preg_match('/ [0-9]{1,4}$/', $verstr)) {
98
    if (preg_match('/ [0-9]{1,4}$/', $verstr)) {
99
      $i = strrpos($verstr, ' ');
99
      $i = strrpos($verstr, ' ');
100
      $subver[2] = intval(substr($verstr, $i + 1));
100
      $subver[2] = intval(substr($verstr, $i + 1));
101
      $verstr = trim(substr($verstr, 0, $i));
101
      $verstr = trim(substr($verstr, 0, $i));
Line 113... Line 113...
113
      $subver[1] = 4;
113
      $subver[1] = 4;
114
    } else if ($greek == 'pre') {
114
    } else if ($greek == 'pre') {
115
      $subver[1] = 5;
115
      $subver[1] = 5;
116
    } else if ($greek == 'rc') {
116
    } else if ($greek == 'rc') {
117
      $subver[1] = 6;
117
      $subver[1] = 6;
-
 
118
    } else if ($greek == 'patch') { // this is a POST-release version, as opposed to all above that are PRE-release versions
-
 
119
      $subver[1] = 99;
118
    } else {
120
    } else {
119
      return(false);
121
      return(false);
120
    }
122
    }
121
  } else {
123
  } else {
122
    $subver[1] = 99;
124
    $subver[1] = 98; // one less than the 'patch' level
123
  }
125
  }
124
 
126
 
125
  // does the version string have a single-letter subversion? (1.0c)
127
  // does the version string have a single-letter subversion? (1.0c)
126
  if (preg_match('/[a-z]$/', $verstr)) {
128
  if (preg_match('/[a-z]$/', $verstr)) {
127
    $subver[0] = ord(substr($verstr, -1));
129
    $subver[0] = ord(substr($verstr, -1));