Sync BaseTools Branch (version r2157) to EDKII main trunk.

BaseTool Branch:
  https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/branches/Releases/BaseTools_r2100

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11702 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2011-05-25 10:45:15 +00:00
parent 46cc3885e6
commit 9fd2164e34
29 changed files with 24 additions and 15 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -119,28 +119,37 @@ Returns:
--*/
{
CHAR8 StrPtr[40];
CHAR8 *Token;
CHAR8 TemStr[5] = "0000";
unsigned Major;
unsigned Minor;
UINTN Length;
Major = 0;
Minor = 0;
memset (StrPtr, 0, 40);
Token = strtok (Str, ".");
while (Token != NULL) {
strcat (StrPtr, Token);
Token = strtok (NULL, ".");
if (strstr (Str, ".") != NULL) {
sscanf (
Str,
"%02x.%02x",
&Major,
&Minor
);
} else {
Length = strlen(Str);
if (Length < 4) {
strncpy (TemStr + 4 - Length, Str, Length);
} else {
strncpy (TemStr, Str + Length - 4, 4);
}
sscanf (
TemStr,
"%02x%02x",
&Major,
&Minor
);
}
sscanf (
StrPtr,
"%02d%02d",
&Major,
&Minor
);
*MajorVer = (UINT8) Major;
*MinorVer = (UINT8) Minor;
return EFI_SUCCESS;

View File

@ -3630,7 +3630,7 @@ class FdfParser:
if not self.__GetNextToken():
raise Warning("expected Component version", self.FileName, self.CurrentLineNumber)
Pattern = re.compile('-$|[0-9]{0,1}[0-9]{1}\.[0-9]{0,1}[0-9]{1}')
Pattern = re.compile('-$|[0-9a-fA-F]{1,2}\.[0-9a-fA-F]{1,2}$', re.DOTALL)
if Pattern.match(self.__Token) == None:
raise Warning("Unknown version format '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
CompStatementObj.CompVer = self.__Token