]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Clean up source files
authorLiming Gao <liming.gao@intel.com>
Thu, 5 Jul 2018 09:40:04 +0000 (17:40 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 9 Jul 2018 02:25:47 +0000 (10:25 +0800)
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
289 files changed:
BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
BaseTools/BuildNotes.txt
BaseTools/Conf/ReadMe.txt
BaseTools/ReadMe.txt
BaseTools/Scripts/MemoryProfileSymbolGen.py
BaseTools/Source/BinaryFiles.txt
BaseTools/Source/C/BootSectImage/bootsectimage.c
BaseTools/Source/C/BootSectImage/fat.h
BaseTools/Source/C/BootSectImage/mbr.h
BaseTools/Source/C/Common/BasePeCoff.c
BaseTools/Source/C/Common/BinderFuncs.h
BaseTools/Source/C/Common/CommonLib.c
BaseTools/Source/C/Common/CommonLib.h
BaseTools/Source/C/Common/Compress.h
BaseTools/Source/C/Common/Crc32.c
BaseTools/Source/C/Common/Crc32.h
BaseTools/Source/C/Common/Decompress.c
BaseTools/Source/C/Common/Decompress.h
BaseTools/Source/C/Common/EfiCompress.c
BaseTools/Source/C/Common/EfiUtilityMsgs.h
BaseTools/Source/C/Common/FirmwareVolumeBuffer.c
BaseTools/Source/C/Common/FvLib.c
BaseTools/Source/C/Common/FvLib.h
BaseTools/Source/C/Common/MemoryFile.c
BaseTools/Source/C/Common/MemoryFile.h
BaseTools/Source/C/Common/MyAlloc.c
BaseTools/Source/C/Common/MyAlloc.h
BaseTools/Source/C/Common/OsPath.c
BaseTools/Source/C/Common/OsPath.h
BaseTools/Source/C/Common/ParseGuidedSectionTools.c
BaseTools/Source/C/Common/ParseGuidedSectionTools.h
BaseTools/Source/C/Common/ParseInf.c
BaseTools/Source/C/Common/ParseInf.h
BaseTools/Source/C/Common/PeCoffLib.h
BaseTools/Source/C/Common/PeCoffLoaderEx.c
BaseTools/Source/C/Common/SimpleFileParsing.c
BaseTools/Source/C/Common/SimpleFileParsing.h
BaseTools/Source/C/Common/StringFuncs.c
BaseTools/Source/C/Common/StringFuncs.h
BaseTools/Source/C/Common/TianoCompress.c
BaseTools/Source/C/EfiLdrImage/EfiLdrImage.c
BaseTools/Source/C/EfiRom/EfiRom.c
BaseTools/Source/C/EfiRom/EfiRom.h
BaseTools/Source/C/GenBootSector/FatFormat.h
BaseTools/Source/C/GenBootSector/GenBootSector.c
BaseTools/Source/C/GenBootSector/GetDrvNumOffset.c
BaseTools/Source/C/GenCrc32/GenCrc32.c
BaseTools/Source/C/GenFfs/GenFfs.c
BaseTools/Source/C/GenFv/GenFv.c
BaseTools/Source/C/GenFv/GenFvInternalLib.c
BaseTools/Source/C/GenFv/GenFvInternalLib.h
BaseTools/Source/C/GenFw/Elf32Convert.c
BaseTools/Source/C/GenFw/Elf32Convert.h
BaseTools/Source/C/GenFw/Elf64Convert.c
BaseTools/Source/C/GenFw/Elf64Convert.h
BaseTools/Source/C/GenFw/ElfConvert.c
BaseTools/Source/C/GenFw/ElfConvert.h
BaseTools/Source/C/GenFw/GenFw.c
BaseTools/Source/C/GenFw/GenFw.h
BaseTools/Source/C/GenFw/elf32.h
BaseTools/Source/C/GenFw/elf64.h
BaseTools/Source/C/GenFw/elf_common.h
BaseTools/Source/C/GenPage/GenPage.c
BaseTools/Source/C/GenPage/VirtualMemory.h
BaseTools/Source/C/GenSec/GenSec.c
BaseTools/Source/C/GenVtf/GenVtf.c
BaseTools/Source/C/GenVtf/GenVtf.h
BaseTools/Source/C/GnuGenBootSector/FatFormat.h
BaseTools/Source/C/GnuGenBootSector/GnuGenBootSector.c
BaseTools/Source/C/Include/AArch64/ProcessorBind.h
BaseTools/Source/C/Include/Arm/ProcessorBind.h
BaseTools/Source/C/Include/Common/BaseTypes.h
BaseTools/Source/C/Include/Common/BuildVersion.h
BaseTools/Source/C/Include/Common/PiFirmwareFile.h
BaseTools/Source/C/Include/Common/PiFirmwareVolume.h
BaseTools/Source/C/Include/Common/UefiBaseTypes.h
BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
BaseTools/Source/C/Include/Common/UefiMultiPhase.h
BaseTools/Source/C/Include/Common/VariableFormat.h
BaseTools/Source/C/Include/Guid/PcAnsi.h
BaseTools/Source/C/Include/Guid/PiFirmwareFileSystem.h
BaseTools/Source/C/Include/Ia32/ProcessorBind.h
BaseTools/Source/C/Include/IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h
BaseTools/Source/C/Include/IndustryStandard/PeImage.h
BaseTools/Source/C/Include/IndustryStandard/pci22.h
BaseTools/Source/C/Include/Protocol/GraphicsOutput.h
BaseTools/Source/C/Include/Protocol/GuidedSectionExtraction.h
BaseTools/Source/C/Include/Protocol/HiiFramework.h
BaseTools/Source/C/Include/Protocol/UgaDraw.h
BaseTools/Source/C/Include/X64/ProcessorBind.h
BaseTools/Source/C/LzmaCompress/LZMA-SDK-README.txt
BaseTools/Source/C/LzmaCompress/LzmaCompress.c
BaseTools/Source/C/LzmaCompress/LzmaF86Compress.bat
BaseTools/Source/C/Makefiles/NmakeSubdirs.bat
BaseTools/Source/C/PyEfiCompressor/EfiCompressor.c
BaseTools/Source/C/PyUtility/PyUtility.c
BaseTools/Source/C/TianoCompress/TianoCompress.c
BaseTools/Source/C/TianoCompress/TianoCompress.h
BaseTools/Source/C/VfrCompile/EfiVfr.h
BaseTools/Source/C/VfrCompile/VfrCompiler.cpp
BaseTools/Source/C/VfrCompile/VfrCompiler.h
BaseTools/Source/C/VfrCompile/VfrError.cpp
BaseTools/Source/C/VfrCompile/VfrError.h
BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
BaseTools/Source/C/VfrCompile/VfrFormPkg.h
BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
BaseTools/Source/C/VfrCompile/VfrUtilityLib.h
BaseTools/Source/C/VolInfo/VolInfo.c
BaseTools/Source/Python/AutoGen/AutoGen.py
BaseTools/Source/Python/AutoGen/BuildEngine.py
BaseTools/Source/Python/AutoGen/GenC.py
BaseTools/Source/Python/AutoGen/GenPcdDb.py
BaseTools/Source/Python/AutoGen/InfSectionParser.py
BaseTools/Source/Python/AutoGen/StrGather.py
BaseTools/Source/Python/AutoGen/UniClassObject.py
BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py
BaseTools/Source/Python/BPDG/BPDG.py
BaseTools/Source/Python/BPDG/GenVpd.py
BaseTools/Source/Python/BPDG/StringTable.py
BaseTools/Source/Python/Common/BuildVersion.py
BaseTools/Source/Python/Common/Database.py
BaseTools/Source/Python/Common/Misc.py
BaseTools/Source/Python/Common/MultipleWorkspace.py
BaseTools/Source/Python/Common/RangeExpression.py
BaseTools/Source/Python/Common/StringUtils.py
BaseTools/Source/Python/Common/VariableAttributes.py
BaseTools/Source/Python/Common/VpdInfoFile.py
BaseTools/Source/Python/CommonDataClass/CommonClass.py
BaseTools/Source/Python/CommonDataClass/FdfClass.py
BaseTools/Source/Python/Ecc/CLexer.py
BaseTools/Source/Python/Ecc/CParser.py
BaseTools/Source/Python/Ecc/Check.py
BaseTools/Source/Python/Ecc/CodeFragment.py
BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
BaseTools/Source/Python/Ecc/Configuration.py
BaseTools/Source/Python/Ecc/Ecc.py
BaseTools/Source/Python/Ecc/EccGlobalData.py
BaseTools/Source/Python/Ecc/Exception.py
BaseTools/Source/Python/Ecc/FileProfile.py
BaseTools/Source/Python/Ecc/MetaDataParser.py
BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileTable.py
BaseTools/Source/Python/Ecc/ParserWarning.py
BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py
BaseTools/Source/Python/Ecc/Xml/__init__.py
BaseTools/Source/Python/Ecc/c.py
BaseTools/Source/Python/Eot/CLexer.py
BaseTools/Source/Python/Eot/CParser.py
BaseTools/Source/Python/Eot/Eot.py
BaseTools/Source/Python/Eot/ParserWarning.py
BaseTools/Source/Python/Eot/Report.py
BaseTools/Source/Python/GenFds/Attribute.py
BaseTools/Source/Python/GenFds/Capsule.py
BaseTools/Source/Python/GenFds/CapsuleData.py
BaseTools/Source/Python/GenFds/EfiSection.py
BaseTools/Source/Python/GenFds/Fd.py
BaseTools/Source/Python/GenFds/FdfParser.py
BaseTools/Source/Python/GenFds/Ffs.py
BaseTools/Source/Python/GenFds/FfsFileStatement.py
BaseTools/Source/Python/GenFds/FfsInfStatement.py
BaseTools/Source/Python/GenFds/Fv.py
BaseTools/Source/Python/GenFds/GenFds.py
BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
BaseTools/Source/Python/GenFds/GuidSection.py
BaseTools/Source/Python/GenFds/OptRomFileStatement.py
BaseTools/Source/Python/GenFds/OptRomInfStatement.py
BaseTools/Source/Python/GenFds/OptionRom.py
BaseTools/Source/Python/GenFds/Region.py
BaseTools/Source/Python/GenFds/Section.py
BaseTools/Source/Python/GenFds/Vtf.py
BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py
BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKeys.py
BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py
BaseTools/Source/Python/Rsa2048Sha256Sign/TestSigningPublicKey.txt
BaseTools/Source/Python/Table/Table.py
BaseTools/Source/Python/Table/TableDataModel.py
BaseTools/Source/Python/Table/TableDec.py
BaseTools/Source/Python/Table/TableDsc.py
BaseTools/Source/Python/Table/TableEotReport.py
BaseTools/Source/Python/Table/TableFdf.py
BaseTools/Source/Python/Table/TableFile.py
BaseTools/Source/Python/Table/TableFunction.py
BaseTools/Source/Python/Table/TableIdentifier.py
BaseTools/Source/Python/Table/TableInf.py
BaseTools/Source/Python/Table/TablePcd.py
BaseTools/Source/Python/Table/TableReport.py
BaseTools/Source/Python/TargetTool/TargetTool.py
BaseTools/Source/Python/Trim/Trim.py
BaseTools/Source/Python/UPT/BuildVersion.py
BaseTools/Source/Python/UPT/Core/DependencyRules.py
BaseTools/Source/Python/UPT/Core/DistributionPackageClass.py
BaseTools/Source/Python/UPT/Core/FileHook.py
BaseTools/Source/Python/UPT/Core/IpiDb.py
BaseTools/Source/Python/UPT/Core/PackageFile.py
BaseTools/Source/Python/UPT/Core/__init__.py
BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py
BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py
BaseTools/Source/Python/UPT/GenMetaFile/GenXmlFile.py
BaseTools/Source/Python/UPT/GenMetaFile/__init__.py
BaseTools/Source/Python/UPT/InstallPkg.py
BaseTools/Source/Python/UPT/InventoryWs.py
BaseTools/Source/Python/UPT/Library/CommentGenerating.py
BaseTools/Source/Python/UPT/Library/CommentParsing.py
BaseTools/Source/Python/UPT/Library/DataType.py
BaseTools/Source/Python/UPT/Library/ExpressionValidate.py
BaseTools/Source/Python/UPT/Library/GlobalData.py
BaseTools/Source/Python/UPT/Library/Misc.py
BaseTools/Source/Python/UPT/Library/ParserValidate.py
BaseTools/Source/Python/UPT/Library/Parsing.py
BaseTools/Source/Python/UPT/Library/UniClassObject.py
BaseTools/Source/Python/UPT/Library/Xml/XmlRoutines.py
BaseTools/Source/Python/UPT/Library/Xml/__init__.py
BaseTools/Source/Python/UPT/Library/__init__.py
BaseTools/Source/Python/UPT/Logger/Log.py
BaseTools/Source/Python/UPT/Logger/StringTable.py
BaseTools/Source/Python/UPT/Logger/ToolError.py
BaseTools/Source/Python/UPT/Logger/__init__.py
BaseTools/Source/Python/UPT/MkPkg.py
BaseTools/Source/Python/UPT/Object/POM/CommonObject.py
BaseTools/Source/Python/UPT/Object/POM/ModuleObject.py
BaseTools/Source/Python/UPT/Object/POM/PackageObject.py
BaseTools/Source/Python/UPT/Object/POM/__init__.py
BaseTools/Source/Python/UPT/Object/Parser/DecObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfBinaryObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfBuildOptionObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfCommonObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfDefineCommonObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfDefineObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfDepexObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfGuidObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfHeaderObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfMisc.py
BaseTools/Source/Python/UPT/Object/Parser/InfPackagesObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfPcdObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfPpiObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfProtocolObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfSoucesObject.py
BaseTools/Source/Python/UPT/Object/Parser/InfUserExtensionObject.py
BaseTools/Source/Python/UPT/Object/Parser/__init__.py
BaseTools/Source/Python/UPT/Object/__init__.py
BaseTools/Source/Python/UPT/Parser/DecParser.py
BaseTools/Source/Python/UPT/Parser/DecParserMisc.py
BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py
BaseTools/Source/Python/UPT/Parser/InfBinarySectionParser.py
BaseTools/Source/Python/UPT/Parser/InfBuildOptionSectionParser.py
BaseTools/Source/Python/UPT/Parser/InfDefineSectionParser.py
BaseTools/Source/Python/UPT/Parser/InfDepexSectionParser.py
BaseTools/Source/Python/UPT/Parser/InfGuidPpiProtocolSectionParser.py
BaseTools/Source/Python/UPT/Parser/InfLibrarySectionParser.py
BaseTools/Source/Python/UPT/Parser/InfPackageSectionParser.py
BaseTools/Source/Python/UPT/Parser/InfParser.py
BaseTools/Source/Python/UPT/Parser/InfParserMisc.py
BaseTools/Source/Python/UPT/Parser/InfPcdSectionParser.py
BaseTools/Source/Python/UPT/Parser/InfSectionParser.py
BaseTools/Source/Python/UPT/Parser/InfSourceSectionParser.py
BaseTools/Source/Python/UPT/Parser/__init__.py
BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py
BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py
BaseTools/Source/Python/UPT/PomAdapter/__init__.py
BaseTools/Source/Python/UPT/ReplacePkg.py
BaseTools/Source/Python/UPT/RmPkg.py
BaseTools/Source/Python/UPT/UPT.py
BaseTools/Source/Python/UPT/UnitTest/CommentGeneratingUnitTest.py
BaseTools/Source/Python/UPT/UnitTest/CommentParsingUnitTest.py
BaseTools/Source/Python/UPT/UnitTest/DecParserTest.py
BaseTools/Source/Python/UPT/UnitTest/DecParserUnitTest.py
BaseTools/Source/Python/UPT/UnitTest/InfBinarySectionTest.py
BaseTools/Source/Python/UPT/Xml/CommonXml.py
BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py
BaseTools/Source/Python/UPT/Xml/IniToXml.py
BaseTools/Source/Python/UPT/Xml/PackageSurfaceAreaXml.py
BaseTools/Source/Python/UPT/Xml/PcdXml.py
BaseTools/Source/Python/UPT/Xml/XmlParser.py
BaseTools/Source/Python/UPT/Xml/XmlParserMisc.py
BaseTools/Source/Python/UPT/Xml/__init__.py
BaseTools/Source/Python/Workspace/MetaFileParser.py
BaseTools/Source/Python/Workspace/MetaFileTable.py
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
BaseTools/Source/Python/build/BuildReport.py
BaseTools/Source/Python/build/build.py
BaseTools/Source/Python/sitecustomize.py
BaseTools/Tests/CheckPythonSyntax.py
BaseTools/Tests/TestTools.py
BaseTools/gcc/mingw-gcc-build.py
BaseTools/toolsetup.bat

index b26b4e5b511224981cb96272ca45d6beb974f52c..66b9e9dc8c6bd58087620a8a4953c108945515e0 100755 (executable)
@@ -1,94 +1,94 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-#
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.  The full text of the license may be found at
-#
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-#
-# ARMCC tools do not support cygwin paths. Ths script converts cygwin paths to DOS paths
-# in any arguments. 
-#
-# armcc_wrapper.py ToolToExec [command line to convert]
-#
-# anthing with the / will be converted via cygpath cygwin call or manually. 
-# -I/cygpath/c/example is a special case as you can not pass -I to cygpath
-#
-# ExceptionList if a tool takes an argument with a / add it to the exception list
-#
+#!/usr/bin/env python\r
+#\r
+# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+#\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.  The full text of the license may be found at\r
+#\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+\r
+#\r
+# ARMCC tools do not support cygwin paths. Ths script converts cygwin paths to DOS paths\r
+# in any arguments.\r
+#\r
+# armcc_wrapper.py ToolToExec [command line to convert]\r
+#\r
+# anthing with the / will be converted via cygpath cygwin call or manually.\r
+# -I/cygpath/c/example is a special case as you can not pass -I to cygpath\r
+#\r
+# ExceptionList if a tool takes an argument with a / add it to the exception list\r
+#\r
 from __future__ import print_function\r
-import sys
-import os
-import subprocess
-import pipes
-
-#
-# Convert using cygpath command line tool
-# Currently not used, but just in case we need it in the future
-#
-def ConvertCygPathToDosViacygpath(CygPath):
-  p = subprocess.Popen("cygpath -m " + pipes.quote(CygPath), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True)
-  return p.stdout.read().strip()
-
-#
-#
-#
-def ConvertCygPathToDos(CygPath):
-  if CygPath.find("/cygdrive/") == 0:
-    # convert /cygdrive/c/Xyz to c:/Xyz
-    DosPath = CygPath[10] + ':' + CygPath[11:]
-  else:
-    DosPath = CygPath
-  
-  # pipes.quote will add the extra \\ for us.
+import sys\r
+import os\r
+import subprocess\r
+import pipes\r
+\r
+#\r
+# Convert using cygpath command line tool\r
+# Currently not used, but just in case we need it in the future\r
+#\r
+def ConvertCygPathToDosViacygpath(CygPath):\r
+  p = subprocess.Popen("cygpath -m " + pipes.quote(CygPath), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True)\r
+  return p.stdout.read().strip()\r
+\r
+#\r
+#\r
+#\r
+def ConvertCygPathToDos(CygPath):\r
+  if CygPath.find("/cygdrive/") == 0:\r
+    # convert /cygdrive/c/Xyz to c:/Xyz\r
+    DosPath = CygPath[10] + ':' + CygPath[11:]\r
+  else:\r
+    DosPath = CygPath\r
+\r
+  # pipes.quote will add the extra \\ for us.\r
   return DosPath.replace('/', '\\')\r
-
-
-# we receive our options as a list, but we will be passing them to the shell as a line
-# this means we have to requote things as they will get one round of unquoting.
-# we can't set "shell=False" because we are running commands from the PATH and
-# if you don't use the shell you don't get a PATH search.
-def main(argv):
-
-  # use 1st argument as name of tool to call
-  Command = pipes.quote(sys.argv[1]);
-  
-  ExceptionList = ["/interwork"]
-  
-  for arg in argv:
-    if arg.find('/') == -1:
-      # if we don't need to convert just add to the command line
-      Command = Command + ' ' + pipes.quote(arg)
-    elif arg in ExceptionList:
-      # if it is in the list, then don't do a cygpath
-      # assembler stuff after --apcs has the /.
-      Command = Command + ' ' + pipes.quote(arg)
-    else:
-      if ((arg[0] == '-') and (arg[1] == 'I' or arg[1] == 'i')):
-        CygPath = arg[0] + arg[1] + ConvertCygPathToDos(arg[2:])
-      else:
-        CygPath = ConvertCygPathToDos(arg)
-
-      Command = Command + ' ' + pipes.quote(CygPath)
-    
-  # call the real tool with the converted paths
-  return subprocess.call(Command, shell=True)
-
-if __name__ == "__main__":
-  try:
-     ret = main(sys.argv[2:])
-
-  except:
+\r
+\r
+# we receive our options as a list, but we will be passing them to the shell as a line\r
+# this means we have to requote things as they will get one round of unquoting.\r
+# we can't set "shell=False" because we are running commands from the PATH and\r
+# if you don't use the shell you don't get a PATH search.\r
+def main(argv):\r
+\r
+  # use 1st argument as name of tool to call\r
+  Command = pipes.quote(sys.argv[1]);\r
+\r
+  ExceptionList = ["/interwork"]\r
+\r
+  for arg in argv:\r
+    if arg.find('/') == -1:\r
+      # if we don't need to convert just add to the command line\r
+      Command = Command + ' ' + pipes.quote(arg)\r
+    elif arg in ExceptionList:\r
+      # if it is in the list, then don't do a cygpath\r
+      # assembler stuff after --apcs has the /.\r
+      Command = Command + ' ' + pipes.quote(arg)\r
+    else:\r
+      if ((arg[0] == '-') and (arg[1] == 'I' or arg[1] == 'i')):\r
+        CygPath = arg[0] + arg[1] + ConvertCygPathToDos(arg[2:])\r
+      else:\r
+        CygPath = ConvertCygPathToDos(arg)\r
+\r
+      Command = Command + ' ' + pipes.quote(CygPath)\r
+\r
+  # call the real tool with the converted paths\r
+  return subprocess.call(Command, shell=True)\r
+\r
+\r
+if __name__ == "__main__":\r
+  try:\r
+     ret = main(sys.argv[2:])\r
+\r
+  except:\r
     print("exiting: exception from " + sys.argv[0])\r
-    ret = 2
-
-  sys.exit(ret)
-
+    ret = 2\r
+\r
+  sys.exit(ret)\r
+\r
index 31e4f3cd9074df1c5ba7a2f482daf10482347568..0d77df055ecb9bc03331b7cda5b72bdf74fc1d98 100644 (file)
@@ -6,7 +6,7 @@ Root Package 1.00
 Intel is a trademark or registered trademark of Intel Corporation or its\r
 subsidiaries in the United States and other countries.\r
 * Other names and brands may be claimed as the property of others.\r
-Copyright (c) 2007, Intel Corporation. All rights reserved.\r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.\r
 \r
 -------------------------------------------------------------------------------\r
 Quick Start\r
@@ -33,28 +33,28 @@ Tools in Python
 ---------------\r
 * Convert Python source to exe file\r
 \r
-  The tools written in Python can be converted into executable program which can \r
+  The tools written in Python can be converted into executable program which can\r
   be executed without installing a Python interpreter. (Generally it is easier\r
   to run the scripts from their source on operating systems other than Windows.)\r
 \r
   For Windows and Linux, the conversion tool package is called cx_Freeze, its\r
   home page is:\r
 \r
-               http://sourceforge.net/projects/cx-freeze/\r
+    http://sourceforge.net/projects/cx-freeze/\r
 \r
-       If you have installed cx_Freeze at c:\cx_Freeze-3.0.3. Use following command\r
+  If you have installed cx_Freeze at c:\cx_Freeze-3.0.3. Use following command\r
   lines to convert MyBuild.py to MyBuild.exe (note this is an example, there is\r
   no MyBuild Python project in the BaseTools\Python tree.\r
 \r
     set PYTHONPATH=<BaseToolsDirPath>\Source\Python\r
-       c:\cx_Freeze-3.0.3\FreezePython.exe --include-modules=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_16_le,encodings.utf_8 --install-dir=.\mybuild MyBuild.py\r
+    c:\cx_Freeze-3.0.3\FreezePython.exe --include-modules=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_16_le,encodings.utf_8 --install-dir=.\mybuild MyBuild.py\r
 \r
-       The generated .exe (and .dll) files are put in "mybuild" subdirectory.\r
+  The generated .exe (and .dll) files are put in "mybuild" subdirectory.\r
 \r
-  The following is a real example with the BuildTools/trunk/BaseTools project \r
+  The following is a real example with the BuildTools/trunk/BaseTools project\r
   installed in: C:\Work\BaseTools\r
 \r
-  \r
+\r
   C:\Work\BaseTools\Source\Python> set PYTHONPATH=C:\Work\BaseTools\Source\Python\r
   C:\Work\BaseTools\Source\Python> c:\cx_Freeze-3.0.3\FreezePython.exe --include-modules=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_16_le,encodings.utf_8 --install-dir=C:\Work\BaseTools\Bin\Win32 build\build.py\r
 \r
@@ -70,7 +70,7 @@ Windows:
 \r
   The tools written in Python can be executed directly from its source directory\r
 as long as the Python interpreter (Python 2.5) has been installed. Before the execution,\r
-please make sure the environment variable PYTHONPATH is set to \r
+please make sure the environment variable PYTHONPATH is set to\r
 \r
         <buildtools_project>/BaseTools/Source/Python\r
 \r
index 0e5e39d36bf343bf52608cd052f4f4b2589218aa..7bded360c88b9a31757bfe33511147b411d01829 100644 (file)
@@ -6,4 +6,4 @@ These files may be updated frequently.
 \r
 The XMLSchema directory contains the EDK II Packaging XML definitions.  The\r
 schema may change in the future.  It differs somewhat from the early versions\r
-of the XML Schema.
\ No newline at end of file
+of the XML Schema.\r
index be9ff2af856673b193e2e75d51a99f45438e06f9..db632f75ef2b531347faa8c56025a66474b0a673 100644 (file)
@@ -1,6 +1,6 @@
 This directory contains the next generation of EDK II build tools and template files.\r
 Templates are located in the Conf directory, while the tools executables for\r
-Microsoft Windows 32-bit Operating Systems are located in the Bin\Win32 directory, other \r
+Microsoft Windows 32-bit Operating Systems are located in the Bin\Win32 directory, other\r
 directory contatins tools source.\r
 \r
 1. Build step to generate the binary tools.\r
@@ -38,8 +38,8 @@ packages to build all the C BaseTools:
   sudo apt-get install build-essential uuid-dev\r
 \r
 === Python sqlite3 module ===\r
-On Windows, the cx_freeze will not copy the sqlite3.dll to the frozen \r
-binary directory (the same directory as build.exe and GenFds.exe). \r
+On Windows, the cx_freeze will not copy the sqlite3.dll to the frozen\r
+binary directory (the same directory as build.exe and GenFds.exe).\r
 Please copy it manually from <PythonHome>\DLLs.\r
 \r
 The Python distributed with most recent Linux will have sqlite3 module\r
index eaae0283c51d07e67075e897dbce626186b4f9ff..eb04f14545bf710cc9cd44426a25aa6654398968 100644 (file)
@@ -3,7 +3,7 @@
 #\r
 # This tool depends on DIA2Dump.exe (VS) or nm (gcc) to parse debug entry.\r
 #\r
-# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials are licensed and made available under\r
 # the terms and conditions of the BSD License that accompanies this distribution.\r
 # The full text of the license may be found at\r
@@ -21,7 +21,7 @@ import sys
 from optparse import OptionParser\r
 \r
 versionNumber = "1.1"\r
-__copyright__ = "Copyright (c) 2016, Intel Corporation. All rights reserved."\r
+__copyright__ = "Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved."\r
 \r
 class Symbols:\r
     def __init__(self):\r
@@ -72,7 +72,7 @@ class Symbols:
         reportLines = linefile.readlines()\r
         linefile.close()\r
 \r
-        # 000113ca T AllocatePool      c:\home\edk-ii\MdePkg\Library\UefiMemoryAllocationLib\MemoryAllocationLib.c:399\r
+        # 000113ca T AllocatePool  c:\home\edk-ii\MdePkg\Library\UefiMemoryAllocationLib\MemoryAllocationLib.c:399\r
         patchLineFileMatchString = "([0-9a-fA-F]*)\s+[T|D|t|d]\s+(\w+)\s*((?:[a-zA-Z]:)?[\w+\-./_a-zA-Z0-9\\\\]*):?([0-9]*)"\r
 \r
         for reportLine in reportLines:\r
@@ -127,9 +127,9 @@ class Symbols:
         linefile.close()\r
 \r
         #   ** GetDebugPrintErrorLevel\r
-        #      line 32 at [0000C790][0001:0000B790], len = 0x3 c:\home\edk-ii\mdepkg\library\basedebugprinterrorlevellib\basedebugprinterrorlevellib.c (MD5: 687C0AE564079D35D56ED5D84A6164CC)\r
-        #      line 36 at [0000C793][0001:0000B793], len = 0x5\r
-        #      line 37 at [0000C798][0001:0000B798], len = 0x2\r
+        #  line 32 at [0000C790][0001:0000B790], len = 0x3  c:\home\edk-ii\mdepkg\library\basedebugprinterrorlevellib\basedebugprinterrorlevellib.c (MD5: 687C0AE564079D35D56ED5D84A6164CC)\r
+        #  line 36 at [0000C793][0001:0000B793], len = 0x5\r
+        #  line 37 at [0000C798][0001:0000B798], len = 0x2\r
 \r
         patchLineFileMatchString = "\s+line ([0-9]+) at \[([0-9a-fA-F]{8})\]\[[0-9a-fA-F]{4}\:[0-9a-fA-F]{8}\], len = 0x[0-9a-fA-F]+\s*([\w+\-\:./_a-zA-Z0-9\\\\]*)\s*"\r
         patchLineFileMatchStringFunc = "\*\*\s+(\w+)\s*"\r
index a5273d4753d48c3f65d0154afbef77f6100b2437..aad138ebd544124788a339fed05eb0b3d371f228 100644 (file)
@@ -8,10 +8,10 @@
 # If a tool requires additional files, the developer must list those files in the\r
 # [ExtraFiles.Win32] section.\r
 # The [CxFreeze.Win32] section is maintained by the owner of the Build Server who\r
-# must ensure that files that are required by the cx_freeze frozen binaries are \r
+# must ensure that files that are required by the cx_freeze frozen binaries are\r
 # present in the Bin\Win32 directory.\r
 #\r
-# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available under\r
 # the terms and conditions of the BSD License which accompanies this distribution.\r
index 4f876ae1cc0a4c7f4a0fb8b1a7418ca329ffb2c8..72cad168698c7fcae317f24683a10dd90eea06f2 100644 (file)
@@ -4,14 +4,14 @@ Abstract:
   Patch the BPB information in boot sector image file.\r
   Patch the MBR code in MBR image file.\r
 \r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -98,7 +98,7 @@ Returns:
 }\r
 \r
 int WriteToFile (\r
-  void *BootSector, \r
+  void *BootSector,\r
   char *FileName\r
   )\r
 /*++\r
@@ -136,7 +136,7 @@ Return:
 }\r
 \r
 int ReadFromFile (\r
-  void *BootSector, \r
+  void *BootSector,\r
   char *FileName\r
   )\r
 /*++\r
@@ -446,17 +446,17 @@ Return:
         FatBpb->Fat32.BS_BootSig, FAT_BS_BOOTSIG);\r
     return FatTypeUnknown;\r
   }\r
-  \r
+\r
   if ((FatType == FatTypeFat12) || (FatType == FatTypeFat16)) {\r
     memcpy (FilSysType, FatBpb->Fat12_16.BS_FilSysType, 8);\r
     FilSysType[8] = 0;\r
-    if ((FatType == FatTypeFat12) && \r
+    if ((FatType == FatTypeFat12) &&\r
         (strcmp (FilSysType, FAT12_FILSYSTYPE) != 0) &&\r
         (strcmp (FilSysType, FAT_FILSYSTYPE) != 0)) {\r
       DebugMsg (NULL, 0, DEBUG_WARN, NULL, "ERROR: E3003: FAT12 - BS_FilSysType - %s, expected: %s, or %s\n",\r
           FilSysType, FAT12_FILSYSTYPE, FAT_FILSYSTYPE);\r
     }\r
-    if ((FatType == FatTypeFat16) && \r
+    if ((FatType == FatTypeFat16) &&\r
         (strcmp (FilSysType, FAT16_FILSYSTYPE) != 0) &&\r
         (strcmp (FilSysType, FAT_FILSYSTYPE) != 0)) {\r
       DebugMsg (NULL, 0, DEBUG_WARN, NULL, "ERROR: E3003: FAT16 - BS_FilSysType - %s, expected: %s, or %s\n",\r
@@ -486,11 +486,11 @@ ParseBootSector (
 {\r
   FAT_BPB_STRUCT  FatBpb;\r
   FAT_TYPE        FatType;\r
-  \r
+\r
   if (ReadFromFile ((void *)&FatBpb, FileName) == 0) {\r
     return ;\r
   }\r
-  \r
+\r
   FatType = GetFatType (&FatBpb);\r
   if (FatType <= FatTypeUnknown || FatType >= FatTypeMax) {\r
     printf ("ERROR: E3002: Unknown FAT Type!\n");\r
@@ -608,7 +608,7 @@ ParseBootSector (
   printf ("  1FE    Signature                    %04x\n", FatBpb.Fat12_16.Signature);\r
   printf ("\n");\r
 \r
-  \r
+\r
   return ;\r
 }\r
 \r
@@ -634,14 +634,14 @@ Arguments:
   FAT_TYPE        SourceFatType;\r
   CHAR8           VolLab[11];\r
   CHAR8           FilSysType[8];\r
-  \r
+\r
   if (ReadFromFile ((void *)&DestFatBpb, DestFileName) == 0) {\r
     return ;\r
   }\r
   if (ReadFromFile ((void *)&SourceFatBpb, SourceFileName) == 0) {\r
     return ;\r
   }\r
-  \r
+\r
   DestFatType = GetFatType (&DestFatBpb);\r
   SourceFatType = GetFatType (&SourceFatBpb);\r
 \r
@@ -650,10 +650,10 @@ Arguments:
     // FAT type mismatch\r
     //\r
     if (ForcePatch) {\r
-      DebugMsg (NULL, 0, DEBUG_WARN, NULL, "ERROR: E3004: FAT type mismatch: Source - %s, Dest - %s", \r
+      DebugMsg (NULL, 0, DEBUG_WARN, NULL, "ERROR: E3004: FAT type mismatch: Source - %s, Dest - %s",\r
         FatTypeToString(SourceFatType), FatTypeToString(DestFatType));\r
     } else {\r
-      DebugMsg (NULL, 0, DEBUG_ERROR, NULL, "ERROR: E3004: FAT type mismatch: Source - %s, Dest - %s", \r
+      DebugMsg (NULL, 0, DEBUG_ERROR, NULL, "ERROR: E3004: FAT type mismatch: Source - %s, Dest - %s",\r
         FatTypeToString(SourceFatType), FatTypeToString(DestFatType));\r
       return ;\r
     }\r
@@ -707,7 +707,7 @@ Arguments:
     memcpy (DestFatBpb.Fat32.BS_VolLab, VolLab, sizeof(VolLab));\r
     memcpy (DestFatBpb.Fat32.BS_FilSysType, FilSysType, sizeof(FilSysType));\r
   }\r
-  \r
+\r
   //\r
   // Set Signature of DestFatBpb to 55AA\r
   //\r
@@ -731,11 +731,11 @@ ParseMbr (
   )\r
 {\r
   MASTER_BOOT_RECORD  Mbr;\r
-  \r
+\r
   if (ReadFromFile ((void *)&Mbr, FileName) == 0) {\r
     return ;\r
   }\r
\r
+\r
   printf ("\nMaster Boot Record:\n");\r
   printf ("\n");\r
   printf ("  Offset Title                        Value\n");\r
@@ -805,14 +805,14 @@ PatchMbr (
 {\r
   MASTER_BOOT_RECORD  DestMbr;\r
   MASTER_BOOT_RECORD  SourceMbr;\r
-  \r
+\r
   if (ReadFromFile ((void *)&DestMbr, DestFileName) == 0) {\r
     return ;\r
   }\r
   if (ReadFromFile ((void *)&SourceMbr, SourceFileName) == 0) {\r
     return ;\r
   }\r
-  \r
+\r
   if (SourceMbr.Signature != MBR_SIGNATURE) {\r
     printf ("ERROR: E3000: Invalid MBR!\n");\r
     return;\r
index 5827d18bb27e8532726fae768122052a09f93bfb..33070d42cc14e1e1e32a36b95cc117f96995612e 100644 (file)
@@ -2,14 +2,14 @@
 \r
   Fat file system structure and definition.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index 36d157da247a6310ad0ef08621549f5cdaa38975..33e742e4a5d0384ca69b54075acdf95ea41d9b10 100644 (file)
@@ -2,14 +2,14 @@
 \r
   MBR Partition Entry and Table structure defintions.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index fb7ce251221d3f49082052507255a895632e3863..1d89a300de18786c41de1ac228ac0cf2da72ae4c 100644 (file)
@@ -2,15 +2,15 @@
 \r
   Functions to get info and load PE/COFF image.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 Portions Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "PeCoffLib.h"\r
 \r
 typedef union {\r
-  VOID                         *Header; \r
+  VOID                         *Header;\r
   EFI_IMAGE_OPTIONAL_HEADER32  *Optional32;\r
   EFI_IMAGE_OPTIONAL_HEADER64  *Optional64;\r
 } EFI_IMAGE_OPTIONAL_HEADER_POINTER;\r
@@ -90,12 +90,12 @@ Arguments:
   ImageContext  - The context of the image being loaded\r
 \r
   PeHdr         - The buffer in which to return the PE header\r
-  \r
+\r
   TeHdr         - The buffer in which to return the TE header\r
 \r
 Returns:\r
 \r
-  RETURN_SUCCESS if the PE or TE Header is read, \r
+  RETURN_SUCCESS if the PE or TE Header is read,\r
   Otherwise, the error status from reading the PE/COFF or TE image using the ImageRead function.\r
 \r
 --*/\r
@@ -135,7 +135,7 @@ Returns:
     //\r
     // Check the PE/COFF Header Signature. If not, then try to get a TE header\r
     //\r
-    *TeHdr = (EFI_TE_IMAGE_HEADER *)*PeHdr; \r
+    *TeHdr = (EFI_TE_IMAGE_HEADER *)*PeHdr;\r
     if ((*TeHdr)->Signature != EFI_TE_IMAGE_HEADER_SIGNATURE) {\r
       return RETURN_UNSUPPORTED;\r
     }\r
@@ -163,7 +163,7 @@ Arguments:
   ImageContext  - The context of the image being loaded\r
 \r
   PeHdr         - The buffer in which to return the PE header\r
-  \r
+\r
   TeHdr         - The buffer in which to return the TE header\r
 \r
 Returns:\r
@@ -174,7 +174,7 @@ Returns:
 --*/\r
 {\r
   //\r
-  // See if the machine type is supported. \r
+  // See if the machine type is supported.\r
   // We support a native machine type (IA-32/Itanium-based)\r
   //\r
   if (ImageContext->IsTeImage == FALSE) {\r
@@ -182,7 +182,7 @@ Returns:
   } else {\r
     ImageContext->Machine = TeHdr->Machine;\r
   }\r
-  \r
+\r
   if (ImageContext->Machine != EFI_IMAGE_MACHINE_IA32 && \\r
       ImageContext->Machine != EFI_IMAGE_MACHINE_IA64 && \\r
       ImageContext->Machine != EFI_IMAGE_MACHINE_X64  && \\r
@@ -191,7 +191,7 @@ Returns:
       ImageContext->Machine != EFI_IMAGE_MACHINE_AARCH64) {\r
     if (ImageContext->Machine == IMAGE_FILE_MACHINE_ARM) {\r
       //\r
-      // There are two types of ARM images. Pure ARM and ARM/Thumb. \r
+      // There are two types of ARM images. Pure ARM and ARM/Thumb.\r
       // If we see the ARM say it is the ARM/Thumb so there is only\r
       // a single machine type we need to check for ARM.\r
       //\r
@@ -204,8 +204,8 @@ Returns:
 \r
     } else {\r
       //\r
-      // unsupported PeImage machine type \r
-      // \r
+      // unsupported PeImage machine type\r
+      //\r
       return RETURN_UNSUPPORTED;\r
     }\r
   }\r
@@ -225,8 +225,8 @@ Returns:
       ImageContext->ImageType != EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER && \\r
       ImageContext->ImageType != EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER) {\r
     //\r
-    // upsupported PeImage subsystem type \r
-    // \r
+    // upsupported PeImage subsystem type\r
+    //\r
     return RETURN_UNSUPPORTED;\r
   }\r
 \r
@@ -348,7 +348,7 @@ Returns:
       ImageContext->ImageSize         = (UINT64) OptionHeader.Optional32->SizeOfImage;\r
       ImageContext->SectionAlignment  = OptionHeader.Optional32->SectionAlignment;\r
       ImageContext->SizeOfHeaders     = OptionHeader.Optional32->SizeOfHeaders;\r
-  \r
+\r
       //\r
       // Modify ImageSize to contain .PDB file name if required and initialize\r
       // PdbRVA field...\r
@@ -361,7 +361,7 @@ Returns:
       ImageContext->ImageSize         = (UINT64) OptionHeader.Optional64->SizeOfImage;\r
       ImageContext->SectionAlignment  = OptionHeader.Optional64->SectionAlignment;\r
       ImageContext->SizeOfHeaders     = OptionHeader.Optional64->SizeOfHeaders;\r
-  \r
+\r
       //\r
       // Modify ImageSize to contain .PDB file name if required and initialize\r
       // PdbRVA field...\r
@@ -371,7 +371,7 @@ Returns:
         DebugDirectoryEntryRva = DebugDirectoryEntry->VirtualAddress;\r
       }\r
     }\r
-    \r
+\r
     if (DebugDirectoryEntryRva != 0) {\r
       //\r
       // Determine the file offset of the debug directory...  This means we walk\r
@@ -382,8 +382,8 @@ Returns:
 \r
       SectionHeaderOffset = (UINTN)(\r
                                ImageContext->PeCoffHeaderOffset +\r
-                               sizeof (UINT32) + \r
-                               sizeof (EFI_IMAGE_FILE_HEADER) + \r
+                               sizeof (UINT32) +\r
+                               sizeof (EFI_IMAGE_FILE_HEADER) +\r
                                PeHdr->Pe32.FileHeader.SizeOfOptionalHeader\r
                                );\r
 \r
@@ -413,12 +413,12 @@ Returns:
         SectionHeaderOffset += sizeof (EFI_IMAGE_SECTION_HEADER);\r
       }\r
 \r
-      if (DebugDirectoryEntryFileOffset != 0) {    \r
+      if (DebugDirectoryEntryFileOffset != 0) {\r
         for (Index = 0; Index < DebugDirectoryEntry->Size; Index += sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY)) {\r
           //\r
           // Read next debug directory entry\r
           //\r
-          Size = sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY);    \r
+          Size = sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY);\r
           Status = ImageContext->ImageRead (\r
                                    ImageContext->Handle,\r
                                    DebugDirectoryEntryFileOffset + Index,\r
@@ -489,8 +489,8 @@ Returns:
 \r
       //\r
       // In Te image header there is not a field to describe the ImageSize.\r
-      // Actually, the ImageSize equals the RVA plus the VirtualSize of \r
-      // the last section mapped into memory (Must be rounded up to \r
+      // Actually, the ImageSize equals the RVA plus the VirtualSize of\r
+      // the last section mapped into memory (Must be rounded up to\r
       // a mulitple of Section Alignment). Per the PE/COFF specification, the\r
       // section headers in the Section Table must appear in order of the RVA\r
       // values for the corresponding sections. So the ImageSize can be determined\r
@@ -627,9 +627,9 @@ Returns:
   // Use DestinationAddress field of ImageContext as the relocation address even if it is 0.\r
   //\r
   BaseAddress = ImageContext->DestinationAddress;\r
-  \r
+\r
   if (!(ImageContext->IsTeImage)) {\r
-    PeHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)((UINTN)ImageContext->ImageAddress + \r
+    PeHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)((UINTN)ImageContext->ImageAddress +\r
                                             ImageContext->PeCoffHeaderOffset);\r
     OptionHeader.Header = (VOID *) &(PeHdr->Pe32.OptionalHeader);\r
     if (PeHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {\r
@@ -708,20 +708,20 @@ Returns:
     Adjust            = (UINT64) (BaseAddress - TeHdr->ImageBase);\r
     TeHdr->ImageBase  = (UINT64) (BaseAddress);\r
     MachineType = TeHdr->Machine;\r
-    \r
+\r
     //\r
     // Find the relocation block\r
     //\r
     RelocDir = &TeHdr->DataDirectory[0];\r
     RelocBase = (EFI_IMAGE_BASE_RELOCATION *)(UINTN)(\r
-                                    ImageContext->ImageAddress + \r
+                                    ImageContext->ImageAddress +\r
                                     RelocDir->VirtualAddress +\r
-                                    sizeof(EFI_TE_IMAGE_HEADER) - \r
+                                    sizeof(EFI_TE_IMAGE_HEADER) -\r
                                     TeHdr->StrippedSize\r
                                     );\r
     RelocBaseEnd = (EFI_IMAGE_BASE_RELOCATION *) ((UINTN) RelocBase + (UINTN) RelocDir->Size - 1);\r
   }\r
-  \r
+\r
   //\r
   // Run the relocation information and apply the fixups\r
   //\r
@@ -739,13 +739,13 @@ Returns:
     } else {\r
       FixupBase = (CHAR8 *)(UINTN)(ImageContext->ImageAddress +\r
                     RelocBase->VirtualAddress +\r
-                    sizeof(EFI_TE_IMAGE_HEADER) - \r
+                    sizeof(EFI_TE_IMAGE_HEADER) -\r
                     TeHdr->StrippedSize\r
                     );\r
     }\r
 \r
     if ((CHAR8 *) RelocEnd < (CHAR8 *) ((UINTN) ImageContext->ImageAddress) ||\r
-        (CHAR8 *) RelocEnd > (CHAR8 *)((UINTN)ImageContext->ImageAddress + \r
+        (CHAR8 *) RelocEnd > (CHAR8 *)((UINTN)ImageContext->ImageAddress +\r
           (UINTN)ImageContext->ImageSize)) {\r
       ImageContext->ImageError = IMAGE_ERROR_FAILED_RELOCATION;\r
       return RETURN_LOAD_ERROR;\r
@@ -961,12 +961,12 @@ Returns:
       ((UINTN)ImageContext->ImageAddress + ImageContext->PeCoffHeaderOffset);\r
 \r
     OptionHeader.Header = (VOID *) &(PeHdr->Pe32.OptionalHeader);\r
-    \r
+\r
     FirstSection = (EFI_IMAGE_SECTION_HEADER *) (\r
                       (UINTN)ImageContext->ImageAddress +\r
                       ImageContext->PeCoffHeaderOffset +\r
-                      sizeof(UINT32) + \r
-                      sizeof(EFI_IMAGE_FILE_HEADER) + \r
+                      sizeof(UINT32) +\r
+                      sizeof(EFI_IMAGE_FILE_HEADER) +\r
                       PeHdr->Pe32.FileHeader.SizeOfOptionalHeader\r
       );\r
     NumberOfSections = (UINTN) (PeHdr->Pe32.FileHeader.NumberOfSections);\r
@@ -1016,7 +1016,7 @@ Returns:
       return RETURN_LOAD_ERROR;\r
     }\r
 \r
-       \r
+\r
     if (ImageContext->IsTeImage) {\r
       Base  = (CHAR8 *) ((UINTN) Base + sizeof (EFI_TE_IMAGE_HEADER) - (UINTN) TeHdr->StrippedSize);\r
       End   = (CHAR8 *) ((UINTN) End + sizeof (EFI_TE_IMAGE_HEADER) - (UINTN) TeHdr->StrippedSize);\r
@@ -1286,19 +1286,19 @@ PeCoffLoaderGetPdbPointer (
     if (Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress != 0) {\r
       DirectoryEntry  = &Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG];\r
       TEImageAdjust   = sizeof (EFI_TE_IMAGE_HEADER) - Hdr.Te->StrippedSize;\r
-      \r
+\r
       //\r
       // Get the DebugEntry offset in the raw data image.\r
       //\r
       SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (Hdr.Te + 1);\r
       Index = Hdr.Te->NumberOfSections;\r
       for (Index1 = 0; Index1 < Index; Index1 ++) {\r
-        if ((DirectoryEntry->VirtualAddress >= SectionHeader[Index1].VirtualAddress) && \r
+        if ((DirectoryEntry->VirtualAddress >= SectionHeader[Index1].VirtualAddress) &&\r
            (DirectoryEntry->VirtualAddress < (SectionHeader[Index1].VirtualAddress + SectionHeader[Index1].Misc.VirtualSize))) {\r
           DebugEntry = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *)((UINTN) Hdr.Te +\r
-                        DirectoryEntry->VirtualAddress - \r
-                        SectionHeader [Index1].VirtualAddress + \r
-                        SectionHeader [Index1].PointerToRawData + \r
+                        DirectoryEntry->VirtualAddress -\r
+                        SectionHeader [Index1].VirtualAddress +\r
+                        SectionHeader [Index1].PointerToRawData +\r
                         TEImageAdjust);\r
           break;\r
         }\r
@@ -1334,8 +1334,8 @@ PeCoffLoaderGetPdbPointer (
 \r
     SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (\r
                        (UINT8 *) Hdr.Pe32 +\r
-                       sizeof (UINT32) + \r
-                       sizeof (EFI_IMAGE_FILE_HEADER) +  \r
+                       sizeof (UINT32) +\r
+                       sizeof (EFI_IMAGE_FILE_HEADER) +\r
                        Hdr.Pe32->FileHeader.SizeOfOptionalHeader\r
                        );\r
     Index = Hdr.Pe32->FileHeader.NumberOfSections;\r
@@ -1362,12 +1362,12 @@ PeCoffLoaderGetPdbPointer (
       // Get the DebugEntry offset in the raw data image.\r
       //\r
       for (Index1 = 0; Index1 < Index; Index1 ++) {\r
-        if ((DirectoryEntry->VirtualAddress >= SectionHeader[Index1].VirtualAddress) && \r
+        if ((DirectoryEntry->VirtualAddress >= SectionHeader[Index1].VirtualAddress) &&\r
            (DirectoryEntry->VirtualAddress < (SectionHeader[Index1].VirtualAddress + SectionHeader[Index1].Misc.VirtualSize))) {\r
           DebugEntry = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *) (\r
-                       (UINTN) Pe32Data + \r
-                       DirectoryEntry->VirtualAddress - \r
-                       SectionHeader[Index1].VirtualAddress + \r
+                       (UINTN) Pe32Data +\r
+                       DirectoryEntry->VirtualAddress -\r
+                       SectionHeader[Index1].VirtualAddress +\r
                        SectionHeader[Index1].PointerToRawData);\r
           break;\r
         }\r
@@ -1383,7 +1383,7 @@ PeCoffLoaderGetPdbPointer (
 \r
   //\r
   // Scan the directory to find the debug entry.\r
-  // \r
+  //\r
   for (DirCount = 0; DirCount < DirectoryEntry->Size; DirCount += sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY), DebugEntry++) {\r
     if (EFI_IMAGE_DEBUG_TYPE_CODEVIEW == DebugEntry->Type) {\r
       if (DebugEntry->SizeOfData > 0) {\r
@@ -1392,13 +1392,13 @@ PeCoffLoaderGetPdbPointer (
         //\r
         CodeViewEntryPointer = NULL;\r
         for (Index1 = 0; Index1 < Index; Index1 ++) {\r
-          if ((DebugEntry->RVA >= SectionHeader[Index1].VirtualAddress) && \r
+          if ((DebugEntry->RVA >= SectionHeader[Index1].VirtualAddress) &&\r
              (DebugEntry->RVA < (SectionHeader[Index1].VirtualAddress + SectionHeader[Index1].Misc.VirtualSize))) {\r
             CodeViewEntryPointer = (VOID *) (\r
-                                   ((UINTN)Pe32Data) + \r
-                                   (UINTN) DebugEntry->RVA - \r
-                                   SectionHeader[Index1].VirtualAddress + \r
-                                   SectionHeader[Index1].PointerToRawData + \r
+                                   ((UINTN)Pe32Data) +\r
+                                   (UINTN) DebugEntry->RVA -\r
+                                   SectionHeader[Index1].VirtualAddress +\r
+                                   SectionHeader[Index1].PointerToRawData +\r
                                    (UINTN)TEImageAdjust);\r
             break;\r
           }\r
index 310d76a0d147ee588961d6c53208488f03e9f047..fadcece0e382a2bedc95bb51e057a4348558fa44 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
-Prototypes for binder functions that allow common code to be written which then \r
-links to implementation of these functions which is appropriate for the specific \r
+Prototypes for binder functions that allow common code to be written which then\r
+links to implementation of these functions which is appropriate for the specific\r
 environment that they are running under.\r
-  \r
-Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
+\r
+Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
index 15509e3453091eb1e4fe1685b4aee3c89fda403a..618aadac781a561f6f808dcf64022798d3463642 100644 (file)
@@ -2,13 +2,13 @@
 Common basic Library Functions\r
 \r
 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -136,7 +136,7 @@ Arguments:
 \r
 Returns:\r
   =  0  if Guid1 == Guid2\r
-  != 0  if Guid1 != Guid2 \r
+  != 0  if Guid1 != Guid2\r
 \r
 --*/\r
 {\r
@@ -169,7 +169,7 @@ GetFileImage (
 \r
 Routine Description:\r
 \r
-  This function opens a file and reads it into a memory buffer.  The function \r
+  This function opens a file and reads it into a memory buffer.  The function\r
   will allocate the memory buffer and returns the size of the buffer.\r
 \r
 Arguments:\r
@@ -332,7 +332,7 @@ CalculateChecksum8 (
   IN UINTN        Size\r
   )\r
 /*++\r
-  \r
+\r
 Routine Description:\r
 \r
   This function calculates the value needed for a valid UINT8 checksum\r
@@ -357,7 +357,7 @@ CalculateSum8 (
   IN UINTN  Size\r
   )\r
 /*++\r
-  \r
+\r
 Routine Description::\r
 \r
   This function calculates the UINT8 sum for the requested region.\r
@@ -394,7 +394,7 @@ CalculateChecksum16 (
   IN UINTN        Size\r
   )\r
 /*++\r
-  \r
+\r
 Routine Description::\r
 \r
   This function calculates the value needed for a valid UINT16 checksum\r
@@ -419,7 +419,7 @@ CalculateSum16 (
   IN UINTN        Size\r
   )\r
 /*++\r
-  \r
+\r
 Routine Description:\r
 \r
   This function calculates the UINT16 sum for the requested region.\r
@@ -518,7 +518,7 @@ Returns:
   EFI_SUCCESS             The GUID was printed.\r
   EFI_INVALID_PARAMETER   The input was NULL.\r
   EFI_BUFFER_TOO_SMALL    The input buffer was not big enough\r
-  \r
+\r
 --*/\r
 {\r
   if (Guid == NULL) {\r
@@ -593,7 +593,7 @@ char *strlwr(char *s)
 #define WINDOWS_UNC_EXTENSION_PATH "\\\\?\\UNC"\r
 \r
 //\r
-// Global data to store full file path. It is not required to be free. \r
+// Global data to store full file path. It is not required to be free.\r
 //\r
 CHAR8 mCommonLibFullPath[MAX_LONG_FILE_PATH];\r
 \r
@@ -604,32 +604,32 @@ LongFilePath (
 /*++\r
 \r
 Routine Description:\r
-  Convert FileName to the long file path, which can support larger than 260 length. \r
+  Convert FileName to the long file path, which can support larger than 260 length.\r
 \r
 Arguments:\r
-  FileName         - FileName. \r
+  FileName         - FileName.\r
 \r
 Returns:\r
   LongFilePath      A pointer to the converted long file path.\r
-  \r
+\r
 --*/\r
 {\r
 #ifdef __GNUC__\r
   //\r
-  // __GNUC__ may not be good way to differentiate unix and windows. Need more investigation here. \r
-  // unix has no limitation on file path. Just return FileName. \r
+  // __GNUC__ may not be good way to differentiate unix and windows. Need more investigation here.\r
+  // unix has no limitation on file path. Just return FileName.\r
   //\r
   return FileName;\r
 #else\r
   CHAR8 *RootPath;\r
   CHAR8 *PathPointer;\r
   CHAR8 *NextPointer;\r
-  \r
+\r
   PathPointer = (CHAR8 *) FileName;\r
-  \r
+\r
   if (FileName != NULL) {\r
     //\r
-    // Add the extension string first to support long file path. \r
+    // Add the extension string first to support long file path.\r
     //\r
     mCommonLibFullPath[0] = 0;\r
     strcpy (mCommonLibFullPath, WINDOWS_EXTENSION_PATH);\r
@@ -642,7 +642,7 @@ Returns:
       FileName ++;\r
     } else if (strlen (FileName) < 3 || FileName[1] != ':' || (FileName[2] != '\\' && FileName[2] != '/')) {\r
       //\r
-      // Relative file path. Convert it to absolute path. \r
+      // Relative file path. Convert it to absolute path.\r
       //\r
       RootPath = getcwd (NULL, 0);\r
       if (RootPath != NULL) {\r
@@ -675,7 +675,7 @@ Returns:
       return NULL;\r
     }\r
     strncat (mCommonLibFullPath, FileName, MAX_LONG_FILE_PATH - strlen (mCommonLibFullPath) - 1);\r
-    \r
+\r
     //\r
     // Convert directory separator '/' to '\\'\r
     //\r
@@ -685,7 +685,7 @@ Returns:
         *PathPointer = '\\';\r
       }\r
     } while (*PathPointer ++ != '\0');\r
-    \r
+\r
     //\r
     // Convert ":\\\\" to ":\\", because it doesn't work with WINDOWS_EXTENSION_PATH.\r
     //\r
@@ -693,7 +693,7 @@ Returns:
       *(PathPointer + 2) = '\0';\r
       strncat (mCommonLibFullPath, PathPointer + 3, MAX_LONG_FILE_PATH - strlen (mCommonLibFullPath) - 1);\r
     }\r
-    \r
+\r
     //\r
     // Convert ".\\" to "", because it doesn't work with WINDOWS_EXTENSION_PATH.\r
     //\r
@@ -701,7 +701,7 @@ Returns:
       *PathPointer = '\0';\r
       strncat (mCommonLibFullPath, PathPointer + 2, MAX_LONG_FILE_PATH - strlen (mCommonLibFullPath) - 1);\r
     }\r
-        \r
+\r
     //\r
     // Convert "\\.\\" to "\\", because it doesn't work with WINDOWS_EXTENSION_PATH.\r
     //\r
@@ -732,10 +732,10 @@ Returns:
         break;\r
       }\r
     }\r
-    \r
+\r
     PathPointer = mCommonLibFullPath;\r
   }\r
-  \r
+\r
   return PathPointer;\r
 #endif\r
 }\r
index dccb19223ba2bac09aa8cde2ad84050648e9dd46..fa10fac4682a902ccc32e22673403d26335f0c5f 100644 (file)
@@ -451,14 +451,14 @@ SplitStr (
 /*++\r
 \r
 Routine Description:\r
-  Convert FileName to the long file path, which can support larger than 260 length. \r
+  Convert FileName to the long file path, which can support larger than 260 length.\r
 \r
 Arguments:\r
-  FileName         - FileName. \r
+  FileName         - FileName.\r
 \r
 Returns:\r
   LongFilePath      A pointer to the converted long file path.\r
-  \r
+\r
 --*/\r
 \r
 #ifdef __cplusplus\r
index beb2ebe9f6fb31cbfc5042c47bd6459d5ff609d2..e114b5c9eacfdd82d9a6557a2a9769fe09bf2e1b 100644 (file)
@@ -1,16 +1,16 @@
 /** @file\r
 Header file for compression routine.\r
 Providing both EFI and Tiano Compress algorithms.\r
-  \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-  \r
+\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
 **/\r
 \r
 #ifndef _COMPRESS_H_\r
index 05d7a8d6c38e81413fd79b6c9917a78e1836aecf..dc1588712426afa76ba46e52663702dff2bf121f 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 CalcuateCrc32 routine.\r
 \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index 81461717d1c77f40302425732d04163e9f395361..766f44390854a255138df10e8fe0b77e67f98377 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 Header file for CalcuateCrc32 routine\r
 \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index 8f1afb4e406e0d7bf4250451218ff9b683f6807f..9906888933a0183e8d232de580c16839043618a9 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
-Decompressor. Algorithm Ported from OPSD code (Decomp.asm) for Efi and Tiano \r
+Decompressor. Algorithm Ported from OPSD code (Decomp.asm) for Efi and Tiano\r
 compress algorithm.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
index 2899ed5eac475515438f6933a0ad14ed6c4e8663..22ac1df1f920cd9cd30980ccb120fa99aefff3f0 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 Header file for compression routine\r
 \r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index b225fee913bec3369eb4f92cd5137b36a85a59fd..33d4c5eec1e763d2bcf98326fe0c9e82a3c121a7 100644 (file)
@@ -1,17 +1,17 @@
 /** @file\r
-Compression routine. The compression algorithm is a mixture of LZ77 and Huffman \r
-coding. LZ77 transforms the source data into a sequence of Original Characters \r
-and Pointers to repeated strings. This sequence is further divided into Blocks \r
+Compression routine. The compression algorithm is a mixture of LZ77 and Huffman\r
+coding. LZ77 transforms the source data into a sequence of Original Characters\r
+and Pointers to repeated strings. This sequence is further divided into Blocks\r
 and Huffman codings are applied to each Block.\r
-  \r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -60,13 +60,13 @@ typedef INT16             NODE;
 //\r
 \r
 STATIC\r
-VOID \r
+VOID\r
 PutDword(\r
   IN UINT32 Data\r
   );\r
 \r
 STATIC\r
-EFI_STATUS \r
+EFI_STATUS\r
 AllocateMemory (\r
   );\r
 \r
@@ -75,160 +75,160 @@ VOID
 FreeMemory (\r
   );\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 InitSlide (\r
   );\r
 \r
-STATIC \r
-NODE \r
+STATIC\r
+NODE\r
 Child (\r
-  IN NODE q, \r
+  IN NODE q,\r
   IN UINT8 c\r
   );\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 MakeChild (\r
-  IN NODE q, \r
-  IN UINT8 c, \r
+  IN NODE q,\r
+  IN UINT8 c,\r
   IN NODE r\r
   );\r
-  \r
-STATIC \r
-VOID \r
+\r
+STATIC\r
+VOID\r
 Split (\r
   IN NODE Old\r
   );\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 InsertNode (\r
   );\r
-  \r
-STATIC \r
-VOID \r
+\r
+STATIC\r
+VOID\r
 DeleteNode (\r
   );\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 GetNextMatch (\r
   );\r
-  \r
-STATIC \r
-EFI_STATUS \r
+\r
+STATIC\r
+EFI_STATUS\r
 Encode (\r
   );\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 CountTFreq (\r
   );\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 WritePTLen (\r
-  IN INT32 n, \r
-  IN INT32 nbit, \r
+  IN INT32 n,\r
+  IN INT32 nbit,\r
   IN INT32 Special\r
   );\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 WriteCLen (\r
   );\r
-  \r
-STATIC \r
-VOID \r
+\r
+STATIC\r
+VOID\r
 EncodeC (\r
   IN INT32 c\r
   );\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 EncodeP (\r
   IN UINT32 p\r
   );\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 SendBlock (\r
   );\r
-  \r
-STATIC \r
-VOID \r
+\r
+STATIC\r
+VOID\r
 Output (\r
-  IN UINT32 c, \r
+  IN UINT32 c,\r
   IN UINT32 p\r
   );\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 HufEncodeStart (\r
   );\r
-  \r
-STATIC \r
-VOID \r
+\r
+STATIC\r
+VOID\r
 HufEncodeEnd (\r
   );\r
-  \r
-STATIC \r
-VOID \r
+\r
+STATIC\r
+VOID\r
 MakeCrcTable (\r
   );\r
-  \r
-STATIC \r
-VOID \r
+\r
+STATIC\r
+VOID\r
 PutBits (\r
-  IN INT32 n, \r
+  IN INT32 n,\r
   IN UINT32 x\r
   );\r
-  \r
-STATIC \r
-INT32 \r
+\r
+STATIC\r
+INT32\r
 FreadCrc (\r
-  OUT UINT8 *p, \r
+  OUT UINT8 *p,\r
   IN  INT32 n\r
   );\r
-  \r
-STATIC \r
-VOID \r
+\r
+STATIC\r
+VOID\r
 InitPutBits (\r
   );\r
-  \r
-STATIC \r
-VOID \r
+\r
+STATIC\r
+VOID\r
 CountLen (\r
   IN INT32 i\r
   );\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 MakeLen (\r
   IN INT32 Root\r
   );\r
-  \r
-STATIC \r
-VOID \r
+\r
+STATIC\r
+VOID\r
 DownHeap (\r
   IN INT32 i\r
   );\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 MakeCode (\r
-  IN  INT32 n, \r
-  IN  UINT8 Len[], \r
+  IN  INT32 n,\r
+  IN  UINT8 Len[],\r
   OUT UINT16 Code[]\r
   );\r
-  \r
-STATIC \r
-INT32 \r
+\r
+STATIC\r
+INT32\r
 MakeTree (\r
-  IN  INT32   NParm, \r
-  IN  UINT16  FreqParm[], \r
-  OUT UINT8   LenParm[], \r
+  IN  INT32   NParm,\r
+  IN  UINT16  FreqParm[],\r
+  OUT UINT8   LenParm[],\r
   OUT UINT16  CodeParm[]\r
   );\r
 \r
@@ -286,7 +286,7 @@ Returns:
 --*/\r
 {\r
   EFI_STATUS Status = EFI_SUCCESS;\r
-  \r
+\r
   //\r
   // Initializations\r
   //\r
@@ -300,7 +300,7 @@ Returns:
   mPrev       = NULL;\r
   mNext       = NULL;\r
 \r
-  \r
+\r
   mSrc = SrcBuffer;\r
   mSrcUpperLimit = mSrc + SrcSize;\r
   mDst = DstBuffer;\r
@@ -308,28 +308,28 @@ Returns:
 \r
   PutDword(0L);\r
   PutDword(0L);\r
-  \r
+\r
   MakeCrcTable ();\r
 \r
   mOrigSize = mCompSize = 0;\r
   mCrc = INIT_CRC;\r
-  \r
+\r
   //\r
   // Compress it\r
   //\r
-  \r
+\r
   Status = Encode();\r
   if (EFI_ERROR (Status)) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   //\r
   // Null terminate the compressed data\r
   //\r
   if (mDst < mDstUpperLimit) {\r
     *mDst++ = 0;\r
   }\r
-  \r
+\r
   //\r
   // Fill in compressed size and original size\r
   //\r
@@ -340,7 +340,7 @@ Returns:
   //\r
   // Return\r
   //\r
-  \r
+\r
   if (mCompSize + 1 + 8 > *DstSize) {\r
     *DstSize = mCompSize + 1 + 8;\r
     return EFI_BUFFER_TOO_SMALL;\r
@@ -351,8 +351,8 @@ Returns:
 \r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 PutDword(\r
   IN UINT32 Data\r
   )\r
@@ -361,13 +361,13 @@ PutDword(
 Routine Description:\r
 \r
   Put a dword to output stream\r
-  \r
+\r
 Arguments:\r
 \r
   Data    - the dword to put\r
-  \r
+\r
 Returns: (VOID)\r
-  \r
+\r
 --*/\r
 {\r
   if (mDst < mDstUpperLimit) {\r
@@ -395,7 +395,7 @@ AllocateMemory ()
 Routine Description:\r
 \r
   Allocate memory spaces for data structures used in compression process\r
-  \r
+\r
 Argements: (VOID)\r
 \r
 Returns:\r
@@ -406,7 +406,7 @@ Returns:
 --*/\r
 {\r
   UINT32      i;\r
-  \r
+\r
   mText       = malloc (WNDSIZ * 2 + MAXMATCH);\r
   if (mText == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
@@ -425,7 +425,7 @@ Returns:
     mParent == NULL || mPrev == NULL || mNext == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   mBufSiz = 16 * 1024U;\r
   while ((mBuf = malloc(mBufSiz)) == NULL) {\r
     mBufSiz = (mBufSiz / 10U) * 9U;\r
@@ -434,7 +434,7 @@ Returns:
     }\r
   }\r
   mBuf[0] = 0;\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -445,7 +445,7 @@ FreeMemory ()
 Routine Description:\r
 \r
   Called when compression is completed to free memory previously allocated.\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -455,48 +455,48 @@ Returns: (VOID)
   if (mText) {\r
     free (mText);\r
   }\r
-  \r
+\r
   if (mLevel) {\r
     free (mLevel);\r
   }\r
-  \r
+\r
   if (mChildCount) {\r
     free (mChildCount);\r
   }\r
-  \r
+\r
   if (mPosition) {\r
     free (mPosition);\r
   }\r
-  \r
+\r
   if (mParent) {\r
     free (mParent);\r
   }\r
-  \r
+\r
   if (mPrev) {\r
     free (mPrev);\r
   }\r
-  \r
+\r
   if (mNext) {\r
     free (mNext);\r
   }\r
-  \r
+\r
   if (mBuf) {\r
     free (mBuf);\r
-  }  \r
+  }\r
 \r
   return;\r
 }\r
 \r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 InitSlide ()\r
 /*++\r
 \r
 Routine Description:\r
 \r
   Initialize String Info Log data structures\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -511,23 +511,23 @@ Returns: (VOID)
   }\r
   for (i = WNDSIZ; i < WNDSIZ * 2; i++) {\r
     mParent[i] = NIL;\r
-  }  \r
+  }\r
   mAvail = 1;\r
   for (i = 1; i < WNDSIZ - 1; i++) {\r
     mNext[i] = (NODE)(i + 1);\r
   }\r
-  \r
+\r
   mNext[WNDSIZ - 1] = NIL;\r
   for (i = WNDSIZ * 2; i <= MAX_HASH_VAL; i++) {\r
     mNext[i] = NIL;\r
-  }  \r
+  }\r
 }\r
 \r
 \r
-STATIC \r
-NODE \r
+STATIC\r
+NODE\r
 Child (\r
-  IN NODE q, \r
+  IN NODE q,\r
   IN UINT8 c\r
   )\r
 /*++\r
@@ -535,34 +535,34 @@ Child (
 Routine Description:\r
 \r
   Find child node given the parent node and the edge character\r
-  \r
+\r
 Arguments:\r
 \r
   q       - the parent node\r
   c       - the edge character\r
-  \r
+\r
 Returns:\r
 \r
-  The child node (NIL if not found)  \r
-  \r
+  The child node (NIL if not found)\r
+\r
 --*/\r
 {\r
   NODE r;\r
-  \r
+\r
   r = mNext[HASH(q, c)];\r
   mParent[NIL] = q;  /* sentinel */\r
   while (mParent[r] != q) {\r
     r = mNext[r];\r
   }\r
-  \r
+\r
   return r;\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 MakeChild (\r
-  IN NODE q, \r
-  IN UINT8 c, \r
+  IN NODE q,\r
+  IN UINT8 c,\r
   IN NODE r\r
   )\r
 /*++\r
@@ -570,19 +570,19 @@ MakeChild (
 Routine Description:\r
 \r
   Create a new child for a given parent node.\r
-  \r
+\r
 Arguments:\r
 \r
   q       - the parent node\r
   c       - the edge character\r
   r       - the child node\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
 {\r
   NODE h, t;\r
-  \r
+\r
   h = (NODE)HASH(q, c);\r
   t = mNext[h];\r
   mNext[h] = r;\r
@@ -593,8 +593,8 @@ Returns: (VOID)
   mChildCount[q]++;\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 Split (\r
   NODE Old\r
   )\r
@@ -603,11 +603,11 @@ Split (
 Routine Description:\r
 \r
   Split a node.\r
-  \r
+\r
 Arguments:\r
 \r
   Old     - the node to split\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -630,15 +630,15 @@ Returns: (VOID)
   MakeChild(New, mText[mPos + mMatchLen], mPos);\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 InsertNode ()\r
 /*++\r
 \r
 Routine Description:\r
 \r
   Insert string info for current position into the String Info Log\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -649,7 +649,7 @@ Returns: (VOID)
   UINT8 c, *t1, *t2;\r
 \r
   if (mMatchLen >= 4) {\r
-    \r
+\r
     //\r
     // We have just got a long match, the target tree\r
     // can be located by MatchPos + 1. Travese the tree\r
@@ -657,7 +657,7 @@ Returns: (VOID)
     // The usage of PERC_FLAG ensures proper node deletion\r
     // in DeleteNode() later.\r
     //\r
-    \r
+\r
     mMatchLen--;\r
     r = (INT16)((mMatchPos + 1) | WNDSIZ);\r
     while ((q = mParent[r]) == NIL) {\r
@@ -673,13 +673,13 @@ Returns: (VOID)
     }\r
     if (t < WNDSIZ) {\r
       mPosition[t] = (NODE)(mPos | PERC_FLAG);\r
-    }    \r
+    }\r
   } else {\r
-    \r
+\r
     //\r
     // Locate the target tree\r
     //\r
-    \r
+\r
     q = (INT16)(mText[mPos] + WNDSIZ);\r
     c = mText[mPos + 1];\r
     if ((r = Child(q, c)) == NIL) {\r
@@ -689,13 +689,13 @@ Returns: (VOID)
     }\r
     mMatchLen = 2;\r
   }\r
-  \r
+\r
   //\r
   // Traverse down the tree to find a match.\r
   // Update Position value along the route.\r
   // Node split or creation is involved.\r
   //\r
-  \r
+\r
   for ( ; ; ) {\r
     if (r >= WNDSIZ) {\r
       j = MAXMATCH;\r
@@ -706,7 +706,7 @@ Returns: (VOID)
     }\r
     if (mMatchPos >= mPos) {\r
       mMatchPos -= WNDSIZ;\r
-    }    \r
+    }\r
     t1 = &mText[mPos + mMatchLen];\r
     t2 = &mText[mMatchPos + mMatchLen];\r
     while (mMatchLen < j) {\r
@@ -737,16 +737,16 @@ Returns: (VOID)
   mPrev[t] = mPos;\r
   mParent[mPos] = q;\r
   mParent[r] = NIL;\r
-  \r
+\r
   //\r
   // Special usage of 'next'\r
   //\r
   mNext[r] = mPos;\r
-  \r
+\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 DeleteNode ()\r
 /*++\r
 \r
@@ -754,7 +754,7 @@ Routine Description:
 \r
   Delete outdated string info. (The Usage of PERC_FLAG\r
   ensures a clean deletion)\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -766,7 +766,7 @@ Returns: (VOID)
   if (mParent[mPos] == NIL) {\r
     return;\r
   }\r
-  \r
+\r
   r = mPrev[mPos];\r
   s = mNext[mPos];\r
   mNext[r] = s;\r
@@ -819,8 +819,8 @@ Returns: (VOID)
   mAvail = r;\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 GetNextMatch ()\r
 /*++\r
 \r
@@ -860,7 +860,7 @@ Routine Description:
 Arguments: (VOID)\r
 \r
 Returns:\r
-  \r
+\r
   EFI_SUCCESS           - The compression is successful\r
   EFI_OUT_0F_RESOURCES  - Not enough memory for compression process\r
 \r
@@ -877,11 +877,11 @@ Returns:
   }\r
 \r
   InitSlide();\r
-  \r
+\r
   HufEncodeStart();\r
 \r
   mRemainder = FreadCrc(&mText[WNDSIZ], WNDSIZ + MAXMATCH);\r
-  \r
+\r
   mMatchLen = 0;\r
   mPos = WNDSIZ;\r
   InsertNode();\r
@@ -895,21 +895,21 @@ Returns:
     if (mMatchLen > mRemainder) {\r
       mMatchLen = mRemainder;\r
     }\r
-    \r
+\r
     if (mMatchLen > LastMatchLen || LastMatchLen < THRESHOLD) {\r
-      \r
+\r
       //\r
       // Not enough benefits are gained by outputting a pointer,\r
       // so just output the original character\r
       //\r
-      \r
+\r
       Output(mText[mPos - 1], 0);\r
     } else {\r
-      \r
+\r
       //\r
       // Outputting a pointer is beneficial enough, do it.\r
       //\r
-      \r
+\r
       Output(LastMatchLen + (UINT8_MAX + 1 - THRESHOLD),\r
              (mPos - LastMatchPos - 2) & (WNDSIZ - 1));\r
       while (--LastMatchLen > 0) {\r
@@ -920,21 +920,21 @@ Returns:
       }\r
     }\r
   }\r
-  \r
+\r
   HufEncodeEnd();\r
   FreeMemory();\r
   return EFI_SUCCESS;\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 CountTFreq ()\r
 /*++\r
 \r
 Routine Description:\r
 \r
   Count the frequencies for the Extra Set\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -975,11 +975,11 @@ Returns: (VOID)
   }\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 WritePTLen (\r
-  IN INT32 n, \r
-  IN INT32 nbit, \r
+  IN INT32 n,\r
+  IN INT32 nbit,\r
   IN INT32 Special\r
   )\r
 /*++\r
@@ -987,13 +987,13 @@ WritePTLen (
 Routine Description:\r
 \r
   Outputs the code length array for the Extra Set or the Position Set.\r
-  \r
+\r
 Arguments:\r
 \r
   n       - the number of symbols\r
   nbit    - the number of bits needed to represent 'n'\r
   Special - the special symbol that needs to be take care of\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -1021,15 +1021,15 @@ Returns: (VOID)
   }\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 WriteCLen ()\r
 /*++\r
 \r
 Routine Description:\r
 \r
   Outputs the code length array for Char&Length Set\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -1073,8 +1073,8 @@ Returns: (VOID)
   }\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 EncodeC (\r
   IN INT32 c\r
   )\r
@@ -1082,8 +1082,8 @@ EncodeC (
   PutBits(mCLen[c], mCCode[c]);\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 EncodeP (\r
   IN UINT32 p\r
   )\r
@@ -1102,15 +1102,15 @@ EncodeP (
   }\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 SendBlock ()\r
 /*++\r
 \r
 Routine Description:\r
 \r
   Huffman code the block and output it.\r
-  \r
+\r
 Argument: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -1171,10 +1171,10 @@ Returns: (VOID)
 }\r
 \r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 Output (\r
-  IN UINT32 c, \r
+  IN UINT32 c,\r
   IN UINT32 p\r
   )\r
 /*++\r
@@ -1200,7 +1200,7 @@ Returns: (VOID)
       SendBlock();\r
       mOutputPos = 0;\r
     }\r
-    CPos = mOutputPos++;  \r
+    CPos = mOutputPos++;\r
     mBuf[CPos] = 0;\r
   }\r
   mBuf[mOutputPos++] = (UINT8) c;\r
@@ -1235,23 +1235,23 @@ HufEncodeStart ()
   return;\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 HufEncodeEnd ()\r
 {\r
   SendBlock();\r
-  \r
+\r
   //\r
   // Flush remaining bits\r
   //\r
   PutBits(UINT8_BIT - 1, 0);\r
-  \r
+\r
   return;\r
 }\r
 \r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 MakeCrcTable ()\r
 {\r
   UINT32 i, j, r;\r
@@ -1265,14 +1265,14 @@ MakeCrcTable ()
         r >>= 1;\r
       }\r
     }\r
-    mCrcTable[i] = (UINT16)r;    \r
+    mCrcTable[i] = (UINT16)r;\r
   }\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 PutBits (\r
-  IN INT32 n, \r
+  IN INT32 n,\r
   IN UINT32 x\r
   )\r
 /*++\r
@@ -1284,18 +1284,18 @@ Routine Description:
 Argments:\r
 \r
   n   - the rightmost n bits of the data is used\r
-  x   - the data \r
+  x   - the data\r
 \r
 Returns: (VOID)\r
 \r
 --*/\r
 {\r
-  UINT8 Temp;  \r
-  \r
+  UINT8 Temp;\r
+\r
   if (n < mBitCount) {\r
     mSubBitBuf |= x << (mBitCount -= n);\r
   } else {\r
-      \r
+\r
     Temp = (UINT8)(mSubBitBuf | (x >> (n -= mBitCount)));\r
     if (mDst < mDstUpperLimit) {\r
       *mDst++ = Temp;\r
@@ -1305,22 +1305,22 @@ Returns: (VOID)
     if (n < UINT8_BIT) {\r
       mSubBitBuf = x << (mBitCount = UINT8_BIT - n);\r
     } else {\r
-        \r
+\r
       Temp = (UINT8)(x >> (n - UINT8_BIT));\r
       if (mDst < mDstUpperLimit) {\r
         *mDst++ = Temp;\r
       }\r
       mCompSize++;\r
-      \r
+\r
       mSubBitBuf = x << (mBitCount = 2 * UINT8_BIT - n);\r
     }\r
   }\r
 }\r
 \r
-STATIC \r
-INT32 \r
+STATIC\r
+INT32\r
 FreadCrc (\r
-  OUT UINT8 *p, \r
+  OUT UINT8 *p,\r
   IN  INT32 n\r
   )\r
 /*++\r
@@ -1328,7 +1328,7 @@ FreadCrc (
 Routine Description:\r
 \r
   Read in source data\r
-  \r
+\r
 Arguments:\r
 \r
   p   - the buffer to hold the data\r
@@ -1337,7 +1337,7 @@ Arguments:
 Returns:\r
 \r
   number of bytes actually read\r
-  \r
+\r
 --*/\r
 {\r
   INT32 i;\r
@@ -1356,16 +1356,16 @@ Returns:
 }\r
 \r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 InitPutBits ()\r
 {\r
-  mBitCount = UINT8_BIT;  \r
+  mBitCount = UINT8_BIT;\r
   mSubBitBuf = 0;\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 CountLen (\r
   IN INT32 i\r
   )\r
@@ -1374,11 +1374,11 @@ CountLen (
 Routine Description:\r
 \r
   Count the number of each code length for a Huffman tree.\r
-  \r
+\r
 Arguments:\r
 \r
   i   - the top node\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -1395,8 +1395,8 @@ Returns: (VOID)
   }\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 MakeLen (\r
   IN INT32 Root\r
   )\r
@@ -1405,7 +1405,7 @@ MakeLen (
 Routine Description:\r
 \r
   Create code length array for a Huffman tree\r
-  \r
+\r
 Arguments:\r
 \r
   Root   - the root of the tree\r
@@ -1419,12 +1419,12 @@ Arguments:
     mLenCnt[i] = 0;\r
   }\r
   CountLen(Root);\r
-  \r
+\r
   //\r
   // Adjust the length count array so that\r
   // no code will be generated longer than its designated length\r
   //\r
-  \r
+\r
   Cum = 0;\r
   for (i = 16; i > 0; i--) {\r
     Cum += mLenCnt[i] << (16 - i);\r
@@ -1448,8 +1448,8 @@ Arguments:
   }\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 DownHeap (\r
   IN INT32 i\r
   )\r
@@ -1459,7 +1459,7 @@ DownHeap (
   //\r
   // priority queue: send i-th entry down heap\r
   //\r
-  \r
+\r
   k = mHeap[i];\r
   while ((j = 2 * i) <= mHeapSize) {\r
     if (j < mHeapSize && mFreq[mHeap[j]] > mFreq[mHeap[j + 1]]) {\r
@@ -1474,11 +1474,11 @@ DownHeap (
   mHeap[i] = (INT16)k;\r
 }\r
 \r
-STATIC \r
-VOID \r
+STATIC\r
+VOID\r
 MakeCode (\r
-  IN  INT32 n, \r
-  IN  UINT8 Len[], \r
+  IN  INT32 n,\r
+  IN  UINT8 Len[],\r
   OUT UINT16 Code[]\r
   )\r
 /*++\r
@@ -1486,7 +1486,7 @@ MakeCode (
 Routine Description:\r
 \r
   Assign code to each symbol based on the code length array\r
-  \r
+\r
 Arguments:\r
 \r
   n     - number of symbols\r
@@ -1509,12 +1509,12 @@ Returns: (VOID)
   }\r
 }\r
 \r
-STATIC \r
-INT32 \r
+STATIC\r
+INT32\r
 MakeTree (\r
-  IN  INT32   NParm, \r
-  IN  UINT16  FreqParm[], \r
-  OUT UINT8   LenParm[], \r
+  IN  INT32   NParm,\r
+  IN  UINT16  FreqParm[],\r
+  OUT UINT8   LenParm[],\r
   OUT UINT16  CodeParm[]\r
   )\r
 /*++\r
@@ -1522,22 +1522,22 @@ MakeTree (
 Routine Description:\r
 \r
   Generates Huffman codes given a frequency distribution of symbols\r
-  \r
+\r
 Arguments:\r
 \r
   NParm    - number of symbols\r
   FreqParm - frequency of each symbol\r
   LenParm  - code length for each symbol\r
   CodeParm - code for each symbol\r
-  \r
+\r
 Returns:\r
 \r
   Root of the Huffman tree.\r
-  \r
+\r
 --*/\r
 {\r
   INT32 i, j, k, Avail;\r
-  \r
+\r
   //\r
   // make tree, calculate len[], return root\r
   //\r
@@ -1552,16 +1552,16 @@ Returns:
     mLen[i] = 0;\r
     if (mFreq[i]) {\r
       mHeap[++mHeapSize] = (INT16)i;\r
-    }    \r
+    }\r
   }\r
   if (mHeapSize < 2) {\r
     CodeParm[mHeap[1]] = 0;\r
     return mHeap[1];\r
   }\r
   for (i = mHeapSize / 2; i >= 1; i--) {\r
-    \r
+\r
     //\r
-    // make priority queue \r
+    // make priority queue\r
     //\r
     DownHeap(i);\r
   }\r
@@ -1584,11 +1584,11 @@ Returns:
     mLeft[k] = (UINT16)i;\r
     mRight[k] = (UINT16)j;\r
   } while (mHeapSize > 1);\r
-  \r
+\r
   mSortPtr = CodeParm;\r
   MakeLen(k);\r
   MakeCode(NParm, LenParm, CodeParm);\r
-  \r
+\r
   //\r
   // return root\r
   //\r
index 40b5e10c08741c42ee497984694e556903acff30..eb330a6bec126650c44fe43606dde43fead41c93 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 Defines and prototypes for common EFI utility error and debug messages.\r
 \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -32,7 +32,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define STATUS_SUCCESS  0\r
 #define STATUS_WARNING  1\r
 #define STATUS_ERROR    2\r
-#define VOID void \r
+#define VOID void\r
 \r
 typedef int STATUS;\r
 \r
index d4a635335a6e3ffbb47012d577f85d9216a1995a..c68d2ee0dbd7c6208626c918b6cb4c4724da0f4e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 EFI Firmware Volume routines which work on a Fv image in buffers.\r
 \r
-Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1654,7 +1654,7 @@ FvBufCalculateSum16 (
   IN UINTN        Size\r
   )\r
 /*++\r
-  \r
+\r
 Routine Description:\r
 \r
   This function calculates the UINT16 sum for the requested region.\r
@@ -1693,7 +1693,7 @@ FvBufCalculateChecksum16 (
   IN UINTN        Size\r
   )\r
 /*++\r
-  \r
+\r
 Routine Description::\r
 \r
   This function calculates the value needed for a valid UINT16 checksum\r
index f97a7f21ce63875d612c4100a7043ee2e0adfab6..b5ae45de0927e02be009359111eaa5ed1b2eb6ea 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 These functions assist in parsing and manipulating a Firmware Volume.\r
 \r
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -44,9 +44,9 @@ Arguments:
 \r
   Fv            Buffer containing the FV.\r
   FvLength      Length of the FV\r
-    \r
+\r
 Returns:\r
\r
+\r
   EFI_SUCCESS             Function Completed successfully.\r
   EFI_INVALID_PARAMETER   A required parameter was NULL.\r
 \r
@@ -80,9 +80,9 @@ Arguments:
 \r
   FvHeader      Pointer to the FV buffer.\r
   FvLength      Length of the FV\r
-    \r
+\r
 Returns:\r
\r
+\r
   EFI_SUCCESS             Function Completed successfully.\r
   EFI_INVALID_PARAMETER   A required parameter was NULL.\r
   EFI_ABORTED             The library needs to be initialized.\r
@@ -117,16 +117,16 @@ GetNextFile (
 Routine Description:\r
 \r
   This function returns the next file.  If the current file is NULL, it returns\r
-  the first file in the FV.  If the function returns EFI_SUCCESS and the file \r
+  the first file in the FV.  If the function returns EFI_SUCCESS and the file\r
   pointer is NULL, then there are no more files in the FV.\r
 \r
 Arguments:\r
 \r
   CurrentFile   Pointer to the current file, must be within the current FV.\r
   NextFile      Pointer to the next file in the FV.\r
-    \r
+\r
 Returns:\r
\r
+\r
   EFI_SUCCESS             Function completed successfully.\r
   EFI_INVALID_PARAMETER   A required parameter was NULL or is out of range.\r
   EFI_ABORTED             The library needs to be initialized.\r
@@ -496,7 +496,7 @@ GetSectionByType (
 \r
 Routine Description:\r
 \r
-  Find a section in a file by type and instance.  An instance of 1 is the first \r
+  Find a section in a file by type and instance.  An instance of 1 is the first\r
   instance.  The function will return NULL if a matching section cannot be found.\r
   GUID-defined sections, if special processing is not needed, are handled in a\r
   depth-first manner.\r
@@ -543,7 +543,7 @@ Returns:
   // Get the first section\r
   //\r
   CurrentSection.CommonHeader = (EFI_COMMON_SECTION_HEADER *) ((UINTN) File + GetFfsHeaderLength(File));\r
-  \r
+\r
   //\r
   // Depth-first manner to find section file.\r
   //\r
@@ -858,7 +858,7 @@ Returns:
   EFI_SUCCESS              The function completed successfully.\r
   EFI_INVALID_PARAMETER    One of the input parameters was invalid.\r
   EFI_ABORTED              Operation aborted.\r
-  \r
+\r
 --*/\r
 {\r
   EFI_STATUS  Status;\r
@@ -905,7 +905,7 @@ Routine Description:
   It in no way validate the FFS file.\r
 \r
 Arguments:\r
-  \r
+\r
   ErasePolarity The erase polarity for the file state bits.\r
   FfsHeader     Pointer to a FFS file.\r
 \r
index 751bb38c531b50e9abca471d336961a739dbed45..e79866e1a1a048b78e507c284eb33fa5507bbbcb 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 These functions assist in parsing and manipulating a Firmware Volume.\r
-  \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -183,7 +183,7 @@ Routine Description:
   It in no way validate the FFS file.\r
 \r
 Arguments:\r
-  \r
+\r
   ErasePolarity The erase polarity for the file state bits.\r
   FfsHeader     Pointer to a FFS file.\r
 \r
index ec27619abbb09a0b440665e3fbb593cbf598e461..dbd47e5d3713f9673a9f6e32da040dde7e7ea036 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 This contains some useful functions for accessing files.\r
 \r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index 552417a5a60cd55103fbe0937859b03011834363..2d267d539e9a4594487f2156f52850383071ae81 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 Header file for helper functions useful for accessing files.\r
 \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index be7c515a6067dd72b6f9782f5c17bbd1e1e71821..4b656ed39c8c3309062c63de51dd543b42784688 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 File for memory allocation tracking functions.\r
 \r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index e220e637aebec5e213c839bd37b018e0c722c05a..fa9146e18dc4cda4964244600446fb9dec6079f9 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 Header file for memory allocation tracking functions.\r
 \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index 7c90dfe12d8120b965473c0a5f4ae11b3518e8ab..b46516d292da34c3a47cd2652a073a2af7276644 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 Functions useful to operate file directories by parsing file path.\r
 \r
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -87,7 +87,7 @@ Returns:
   }\r
 \r
   //\r
-  // \r
+  //\r
   //\r
   for (Offset = Length; Offset > 0; Offset--) {\r
     if ((Return[Offset] == '/') || (Return[Offset] == '\\')) {\r
@@ -195,7 +195,7 @@ Returns:
   }\r
 \r
   //\r
-  // \r
+  //\r
   //\r
   for (Offset = Length; Offset > 0; Offset--) {\r
     if ((Return[Offset] == '/') || (Return[Offset] == '\\')) {\r
index 0deaa9e7abfad6eac0debf057797a2ff5ceb08a7..d3d75ea5dccdc854f3ea09c79fe1252f20c69ca8 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
-Header file for helper functions useful to operate file directories by parsing \r
+Header file for helper functions useful to operate file directories by parsing\r
 file path.\r
 \r
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index 115cfa41439f7b0b6cebe510ef6f45ef5d30c320..5afe9638417b5bdd3e4cad7d9662a007b0939b63 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 Helper functions for parsing GuidedSectionTools.txt\r
 \r
-Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -76,7 +76,7 @@ Returns:
   ParsedGuidedSectionTools = ParseGuidedSectionToolsMemoryFile (MemoryFile);\r
 \r
   FreeMemoryFile (MemoryFile);\r
-  \r
+\r
   return ParsedGuidedSectionTools;\r
 }\r
 \r
@@ -122,7 +122,7 @@ Returns:
     if (NextLine == NULL) {\r
       break;\r
     }\r
-    \r
+\r
     Status = StripInfDscStringInPlace (NextLine);\r
     if (EFI_ERROR (Status)) {\r
       free (NextLine);\r
index d9c1f8cb43364f6b69eecd786ecaa3e0fd5eefcc..e41b092daf701081a8f0b0b913b8eb0b4d8d0f36 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 Header file for helper functions for parsing GuidedSectionTools.txt\r
 \r
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index d7845366d499fc82bb3503c9548e7f503d7defb1..4d10ff8b0c30dacdee7cfe2e5877bf716f0858d0 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 This contains some useful functions for parsing INF files.\r
 \r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -31,11 +31,11 @@ ReadLine (
 Routine Description:\r
 \r
   This function reads a line, stripping any comments.\r
-  The function reads a string from the input stream argument and stores it in \r
-  the input string. ReadLine reads characters from the current file position \r
-  to and including the first newline character, to the end of the stream, or \r
-  until the number of characters read is equal to MaxLength - 1, whichever \r
-  comes first.  The newline character, if read, is replaced with a \0. \r
+  The function reads a string from the input stream argument and stores it in\r
+  the input string. ReadLine reads characters from the current file position\r
+  to and including the first newline character, to the end of the stream, or\r
+  until the number of characters read is equal to MaxLength - 1, whichever\r
+  comes first.  The newline character, if read, is replaced with a \0.\r
 \r
 Arguments:\r
 \r
@@ -372,17 +372,17 @@ StringToGuid (
   )\r
 /*++\r
 \r
-Routine Description: \r
+Routine Description:\r
 \r
-  Converts a string to an EFI_GUID.  The string must be in the \r
+  Converts a string to an EFI_GUID.  The string must be in the\r
   xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx format.\r
 \r
-Arguments:  \r
+Arguments:\r
 \r
   AsciiGuidBuffer - pointer to ascii string\r
   GuidBuffer      - pointer to destination Guid\r
 \r
-Returns:  \r
+Returns:\r
 \r
   EFI_ABORTED             Could not convert the string\r
   EFI_SUCCESS             The string was successfully converted\r
@@ -408,7 +408,7 @@ Returns:
         break;\r
       }\r
     } else {\r
-      if (((AsciiGuidBuffer[Index] >= '0') && (AsciiGuidBuffer[Index] <= '9')) || \r
+      if (((AsciiGuidBuffer[Index] >= '0') && (AsciiGuidBuffer[Index] <= '9')) ||\r
          ((AsciiGuidBuffer[Index] >= 'a') && (AsciiGuidBuffer[Index] <= 'f')) ||\r
          ((AsciiGuidBuffer[Index] >= 'A') && (AsciiGuidBuffer[Index] <= 'F'))) {\r
         continue;\r
@@ -417,12 +417,12 @@ Returns:
       }\r
     }\r
   }\r
-  \r
+\r
   if (Index < 36 || AsciiGuidBuffer[36] != '\0') {\r
     Error (NULL, 0, 1003, "Invalid option value", "Incorrect GUID \"%s\"\n  Correct Format \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"", AsciiGuidBuffer);\r
     return EFI_ABORTED;\r
   }\r
-  \r
+\r
   //\r
   // Scan the guid string into the buffer\r
   //\r
@@ -477,9 +477,9 @@ AsciiStringToUint64 (
 \r
 Routine Description:\r
 \r
-  Converts a null terminated ascii string that represents a number into a \r
-  UINT64 value.  A hex number may be preceeded by a 0x, but may not be \r
-  succeeded by an h.  A number without 0x or 0X is considered to be base 10 \r
+  Converts a null terminated ascii string that represents a number into a\r
+  UINT64 value.  A hex number may be preceeded by a 0x, but may not be\r
+  succeeded by an h.  A number without 0x or 0X is considered to be base 10\r
   unless the IsHex input is true.\r
 \r
 Arguments:\r
@@ -498,13 +498,13 @@ Returns:
   UINT8   Index;\r
   UINT64  Value;\r
   CHAR8   CurrentChar;\r
-  \r
+\r
   //\r
   // Initialize the result\r
   //\r
   Value = 0;\r
   Index = 0;\r
-  \r
+\r
   //\r
   // Check input parameter\r
   //\r
@@ -514,11 +514,11 @@ Returns:
   while (AsciiString[Index] == ' ') {\r
     Index ++;\r
   }\r
-  \r
+\r
   //\r
   // Add each character to the result\r
   //\r
-  \r
+\r
   //\r
   // Skip first two chars only if the string starts with '0x' or '0X'\r
   //\r
index 80ee3887ad1ae7d7c8e3ea9f280e451921d535a3..903ce71a047c2485d5915eca351e71caaf9d20a1 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 Header file for helper functions useful for parsing INF files.\r
 \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -39,11 +39,11 @@ ReadLine (
 Routine Description:\r
 \r
   This function reads a line, stripping any comments.\r
-  The function reads a string from the input stream argument and stores it in \r
-  the input string. ReadLine reads characters from the current file position \r
-  to and including the first newline character, to the end of the stream, or \r
-  until the number of characters read is equal to MaxLength - 1, whichever \r
-  comes first.  The newline character, if read, is replaced with a \0. \r
+  The function reads a string from the input stream argument and stores it in\r
+  the input string. ReadLine reads characters from the current file position\r
+  to and including the first newline character, to the end of the stream, or\r
+  until the number of characters read is equal to MaxLength - 1, whichever\r
+  comes first.  The newline character, if read, is replaced with a \0.\r
 \r
 Arguments:\r
 \r
@@ -124,17 +124,17 @@ StringToGuid (
 \r
 /*++\r
 \r
-Routine Description: \r
+Routine Description:\r
 \r
-  Converts a string to an EFI_GUID.  The string must be in the \r
+  Converts a string to an EFI_GUID.  The string must be in the\r
   xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx format.\r
 \r
-Arguments:  \r
+Arguments:\r
 \r
   GuidBuffer      - pointer to destination Guid\r
   AsciiGuidBuffer - pointer to ascii string\r
 \r
-Returns:  \r
+Returns:\r
 \r
   EFI_ABORTED    Could not convert the string\r
   EFI_SUCCESS    The string was successfully converted\r
@@ -152,9 +152,9 @@ AsciiStringToUint64 (
 \r
 Routine Description:\r
 \r
-  Converts a null terminated ascii string that represents a number into a \r
-  UINT64 value.  A hex number may be preceeded by a 0x, but may not be \r
-  succeeded by an h.  A number without 0x or 0X is considered to be base 10 \r
+  Converts a null terminated ascii string that represents a number into a\r
+  UINT64 value.  A hex number may be preceeded by a 0x, but may not be\r
+  succeeded by an h.  A number without 0x or 0X is considered to be base 10\r
   unless the IsHex input is true.\r
 \r
 Arguments:\r
index b56dd753844fe0ff998362786d4c29ee07585f3d..80c8c33c76ff96883410fd351be7724aa5093e2e 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
-       Function prototypes and defines on Memory Only PE COFF loader\r
+  Function prototypes and defines on Memory Only PE COFF loader\r
 \r
-       Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials                          \r
-       are licensed and made available under the terms and conditions of the BSD License         \r
-       which accompanies this distribution.  The full text of the license may be found at        \r
-       http://opensource.org/licenses/bsd-license.php                                            \r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
 \r
-       THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-       WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -20,7 +20,7 @@
 // BUGBUG: Find where used and see if can be replaced by RETURN_STATUS codes\r
 //\r
 #define IMAGE_ERROR_SUCCESS                      0\r
-#define IMAGE_ERROR_IMAGE_READ                   1  \r
+#define IMAGE_ERROR_IMAGE_READ                   1\r
 #define IMAGE_ERROR_INVALID_PE_HEADER_SIGNATURE  2\r
 #define IMAGE_ERROR_INVALID_MACHINE_TYPE         3\r
 #define IMAGE_ERROR_INVALID_SUBSYSTEM            4\r
@@ -73,15 +73,15 @@ typedef struct {
 \r
 \r
 /**\r
-       Retrieves information on a PE/COFF image\r
+  Retrieves information on a PE/COFF image\r
 \r
-       @param  ImageContext The context of the image being loaded\r
+  @param  ImageContext The context of the image being loaded\r
 \r
-       @retval EFI_SUCCESS The information on the PE/COFF image was collected.\r
-       @retval EFI_INVALID_PARAMETER ImageContext is NULL.\r
-       @retval EFI_UNSUPPORTED The PE/COFF image is not supported.\r
-       @retval Otherwise The error status from reading the PE/COFF image using the\r
-       ImageContext->ImageRead() function\r
+  @retval  EFI_SUCCESS The information on the PE/COFF image was collected.\r
+  @retval  EFI_INVALID_PARAMETER ImageContext is NULL.\r
+  @retval  EFI_UNSUPPORTED The PE/COFF image is not supported.\r
+  @retval  Otherwise The error status from reading the PE/COFF image using the\r
+  ImageContext->ImageRead() function\r
 \r
 **/\r
 RETURN_STATUS\r
@@ -92,13 +92,13 @@ PeCoffLoaderGetImageInfo (
 ;\r
 \r
 /**\r
-       Relocates a PE/COFF image in memory\r
+  Relocates a PE/COFF image in memory\r
 \r
-       @param  ImageContext Contains information on the loaded image to relocate\r
+  @param  ImageContext Contains information on the loaded image to relocate\r
 \r
-       @retval EFI_SUCCESS      if the PE/COFF image was relocated\r
-       @retval EFI_LOAD_ERROR   if the image is not a valid PE/COFF image\r
-       @retval EFI_UNSUPPORTED  not support\r
+  @retval EFI_SUCCESS      if the PE/COFF image was relocated\r
+  @retval EFI_LOAD_ERROR   if the image is not a valid PE/COFF image\r
+  @retval EFI_UNSUPPORTED  not support\r
 \r
 **/\r
 RETURN_STATUS\r
@@ -109,14 +109,14 @@ PeCoffLoaderRelocateImage (
 ;\r
 \r
 /**\r
-       Loads a PE/COFF image into memory\r
+  Loads a PE/COFF image into memory\r
 \r
-       @param  ImageContext Contains information on image to load into memory\r
+  @param  ImageContext Contains information on image to load into memory\r
 \r
-       @retval EFI_SUCCESS            if the PE/COFF image was loaded\r
-       @retval EFI_BUFFER_TOO_SMALL   if the caller did not provide a large enough buffer\r
-       @retval EFI_LOAD_ERROR         if the image is a runtime driver with no relocations\r
-       @retval EFI_INVALID_PARAMETER  if the image address is invalid\r
+  @retval EFI_SUCCESS            if the PE/COFF image was loaded\r
+  @retval EFI_BUFFER_TOO_SMALL   if the caller did not provide a large enough buffer\r
+  @retval EFI_LOAD_ERROR         if the image is a runtime driver with no relocations\r
+  @retval EFI_INVALID_PARAMETER  if the image address is invalid\r
 \r
 **/\r
 RETURN_STATUS\r
@@ -148,7 +148,7 @@ PeCoffLoaderGetEntryPoint (
 //\r
 \r
 /**\r
-  Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and \r
+  Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and\r
   return the immediate data encoded in the instruction\r
 \r
   @param  Instruction   Pointer to ARM MOVT or MOVW immediate instruction\r
@@ -178,7 +178,7 @@ ThumbMovtImmediatePatch (
 \r
 \r
 /**\r
-  Pass in a pointer to an ARM MOVW/MOVT instruciton pair and \r
+  Pass in a pointer to an ARM MOVW/MOVT instruciton pair and\r
   return the immediate data encoded in the two` instruction\r
 \r
   @param  Instructions  Pointer to ARM MOVW/MOVT insturction pair\r
index d04fa7d5ba2da5551c051763dcf55a72d0a1c518..2d9a2a8978e8ca2a7928fe58b73226383392ba94 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
 IA32, X64 and IPF Specific relocation fixups\r
 \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 Portions Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 --*/\r
 \r
@@ -27,45 +27,45 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     *(UINT32*)Address = (*(UINT32*)Address & ~(((1 << Size) - 1) << InstPos)) | \\r
           ((UINT32)((((UINT64)Value >> ValPos) & (((UINT64)1 << Size) - 1))) << InstPos)\r
 \r
-#define IMM64_IMM7B_INST_WORD_X         3  \r
-#define IMM64_IMM7B_SIZE_X              7  \r
-#define IMM64_IMM7B_INST_WORD_POS_X     4  \r
-#define IMM64_IMM7B_VAL_POS_X           0  \r
-\r
-#define IMM64_IMM9D_INST_WORD_X         3  \r
-#define IMM64_IMM9D_SIZE_X              9  \r
-#define IMM64_IMM9D_INST_WORD_POS_X     18  \r
-#define IMM64_IMM9D_VAL_POS_X           7  \r
-\r
-#define IMM64_IMM5C_INST_WORD_X         3  \r
-#define IMM64_IMM5C_SIZE_X              5  \r
-#define IMM64_IMM5C_INST_WORD_POS_X     13  \r
-#define IMM64_IMM5C_VAL_POS_X           16  \r
-\r
-#define IMM64_IC_INST_WORD_X            3  \r
-#define IMM64_IC_SIZE_X                 1  \r
-#define IMM64_IC_INST_WORD_POS_X        12  \r
-#define IMM64_IC_VAL_POS_X              21  \r
-\r
-#define IMM64_IMM41a_INST_WORD_X        1  \r
-#define IMM64_IMM41a_SIZE_X             10  \r
-#define IMM64_IMM41a_INST_WORD_POS_X    14  \r
-#define IMM64_IMM41a_VAL_POS_X          22  \r
-\r
-#define IMM64_IMM41b_INST_WORD_X        1  \r
-#define IMM64_IMM41b_SIZE_X             8  \r
-#define IMM64_IMM41b_INST_WORD_POS_X    24  \r
-#define IMM64_IMM41b_VAL_POS_X          32  \r
-\r
-#define IMM64_IMM41c_INST_WORD_X        2  \r
-#define IMM64_IMM41c_SIZE_X             23  \r
-#define IMM64_IMM41c_INST_WORD_POS_X    0  \r
-#define IMM64_IMM41c_VAL_POS_X          40  \r
-\r
-#define IMM64_SIGN_INST_WORD_X          3  \r
-#define IMM64_SIGN_SIZE_X               1  \r
-#define IMM64_SIGN_INST_WORD_POS_X      27  \r
-#define IMM64_SIGN_VAL_POS_X            63  \r
+#define IMM64_IMM7B_INST_WORD_X         3\r
+#define IMM64_IMM7B_SIZE_X              7\r
+#define IMM64_IMM7B_INST_WORD_POS_X     4\r
+#define IMM64_IMM7B_VAL_POS_X           0\r
+\r
+#define IMM64_IMM9D_INST_WORD_X         3\r
+#define IMM64_IMM9D_SIZE_X              9\r
+#define IMM64_IMM9D_INST_WORD_POS_X     18\r
+#define IMM64_IMM9D_VAL_POS_X           7\r
+\r
+#define IMM64_IMM5C_INST_WORD_X         3\r
+#define IMM64_IMM5C_SIZE_X              5\r
+#define IMM64_IMM5C_INST_WORD_POS_X     13\r
+#define IMM64_IMM5C_VAL_POS_X           16\r
+\r
+#define IMM64_IC_INST_WORD_X            3\r
+#define IMM64_IC_SIZE_X                 1\r
+#define IMM64_IC_INST_WORD_POS_X        12\r
+#define IMM64_IC_VAL_POS_X              21\r
+\r
+#define IMM64_IMM41a_INST_WORD_X        1\r
+#define IMM64_IMM41a_SIZE_X             10\r
+#define IMM64_IMM41a_INST_WORD_POS_X    14\r
+#define IMM64_IMM41a_VAL_POS_X          22\r
+\r
+#define IMM64_IMM41b_INST_WORD_X        1\r
+#define IMM64_IMM41b_SIZE_X             8\r
+#define IMM64_IMM41b_INST_WORD_POS_X    24\r
+#define IMM64_IMM41b_VAL_POS_X          32\r
+\r
+#define IMM64_IMM41c_INST_WORD_X        2\r
+#define IMM64_IMM41c_SIZE_X             23\r
+#define IMM64_IMM41c_INST_WORD_POS_X    0\r
+#define IMM64_IMM41c_VAL_POS_X          40\r
+\r
+#define IMM64_SIGN_INST_WORD_X          3\r
+#define IMM64_SIGN_SIZE_X               1\r
+#define IMM64_SIGN_INST_WORD_POS_X      27\r
+#define IMM64_SIGN_VAL_POS_X            63\r
 \r
 RETURN_STATUS\r
 PeCoffLoaderRelocateIa32Image (\r
@@ -102,7 +102,7 @@ Returns:
 RETURN_STATUS\r
 PeCoffLoaderRelocateIpfImage (\r
   IN UINT16      *Reloc,\r
-  IN OUT CHAR8   *Fixup, \r
+  IN OUT CHAR8   *Fixup,\r
   IN OUT CHAR8   **FixupData,\r
   IN UINT64      Adjust\r
   )\r
@@ -142,8 +142,8 @@ Returns:
 \r
       Fixup = (CHAR8 *)((UINTN) Fixup & (UINTN) ~(15));\r
       FixupVal = (UINT64)0;\r
-                       \r
-      // \r
+\r
+      //\r
       // Extract the lower 32 bits of IMM64 from bundle\r
       //\r
       EXT_IMM64(FixupVal,\r
@@ -180,13 +180,13 @@ Returns:
                 IMM64_IMM41a_INST_WORD_POS_X,\r
                 IMM64_IMM41a_VAL_POS_X\r
                 );\r
-                       \r
-      // \r
+\r
+      //\r
       // Update 64-bit address\r
       //\r
       FixupVal += Adjust;\r
 \r
-      // \r
+      //\r
       // Insert IMM64 into bundle\r
       //\r
       INS_IMM64(FixupVal,\r
@@ -261,7 +261,7 @@ Returns:
 }\r
 \r
 /**\r
-  Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and \r
+  Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and\r
   return the immediate data encoded in the instruction\r
 \r
   @param  Instruction   Pointer to ARM MOVT or MOVW immediate instruction\r
@@ -279,7 +279,7 @@ ThumbMovtImmediateAddress (
 \r
   // Thumb2 is two 16-bit instructions working together. Not a single 32-bit instruction\r
   // Example MOVT R0, #0 is 0x0000f2c0 or 0xf2c0 0x0000\r
-  Movt = (*Instruction << 16) | (*(Instruction + 1)); \r
+  Movt = (*Instruction << 16) | (*(Instruction + 1));\r
 \r
   // imm16 = imm4:i:imm3:imm8\r
   //         imm4 -> Bit19:Bit16\r
@@ -308,7 +308,7 @@ ThumbMovtImmediatePatch (
   UINT16  Patch;\r
 \r
   // First 16-bit chunk of instruciton\r
-  Patch  = ((Address >> 12) & 0x000f);             // imm4 \r
+  Patch  = ((Address >> 12) & 0x000f);             // imm4\r
   Patch |= (((Address & BIT11) != 0) ? BIT10 : 0); // i\r
   *Instruction = (*Instruction & ~0x040f) | Patch;\r
 \r
@@ -320,7 +320,7 @@ ThumbMovtImmediatePatch (
 }\r
 \r
 /**\r
-  Pass in a pointer to an ARM MOVW/MOVT instruciton pair and \r
+  Pass in a pointer to an ARM MOVW/MOVT instruciton pair and\r
   return the immediate data encoded in the two` instruction\r
 \r
   @param  Instructions  Pointer to ARM MOVW/MOVT insturction pair\r
@@ -336,10 +336,10 @@ ThumbMovwMovtImmediateAddress (
 {\r
   UINT16  *Word;\r
   UINT16  *Top;\r
-  \r
+\r
   Word = Instructions;  // MOVW\r
   Top  = Word + 2;      // MOVT\r
-  \r
+\r
   return (ThumbMovtImmediateAddress (Top) << 16) + ThumbMovtImmediateAddress (Word);\r
 }\r
 \r
@@ -359,7 +359,7 @@ ThumbMovwMovtImmediatePatch (
 {\r
   UINT16  *Word;\r
   UINT16  *Top;\r
-  \r
+\r
   Word = (UINT16 *)Instructions;  // MOVW\r
   Top  = Word + 2;                // MOVT\r
 \r
@@ -394,19 +394,19 @@ PeCoffLoaderRelocateArmImage (
   Fixup16   = (UINT16 *) Fixup;\r
 \r
   switch ((**Reloc) >> 12) {\r
-  \r
+\r
   case EFI_IMAGE_REL_BASED_ARM_MOV32T:\r
     FixupVal = ThumbMovwMovtImmediateAddress (Fixup16) + (UINT32)Adjust;\r
     ThumbMovwMovtImmediatePatch (Fixup16, FixupVal);\r
-    \r
-    \r
+\r
+\r
     if (*FixupData != NULL) {\r
       *FixupData = ALIGN_POINTER(*FixupData, sizeof(UINT64));\r
       CopyMem (*FixupData, Fixup16, sizeof (UINT64));\r
       *FixupData = *FixupData + sizeof(UINT64);\r
     }\r
     break;\r
-  \r
+\r
   case EFI_IMAGE_REL_BASED_ARM_MOV32A:\r
      // break omitted - ARM instruction encoding not implemented\r
   default:\r
index 209a0954b3f22031b98daab3e51e309c7eb59b6f..e7da04424497ce06729f7a5f3df9fd8a00d2ec40 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 Generic but simple file parsing routines.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 --*/\r
 \r
@@ -238,7 +238,7 @@ Arguments:
   FileName  - name of the file to parse\r
 \r
 Returns:\r
-  \r
+\r
 \r
 --*/\r
 {\r
@@ -345,7 +345,7 @@ SFPGetNextToken (
 /*++\r
 \r
 Routine Description:\r
-  Get the next token from the input stream. \r
+  Get the next token from the input stream.\r
 \r
 Arguments:\r
   Str - pointer to a copy of the next token\r
@@ -356,7 +356,7 @@ Returns:
   FALSE - otherwise\r
 \r
 Notes:\r
-  Preceeding white space is ignored. \r
+  Preceeding white space is ignored.\r
   The parser's buffer pointer is advanced past the end of the\r
   token.\r
 \r
@@ -580,7 +580,7 @@ Arguments:
   None.\r
 \r
 Returns:\r
-  STATUS_SUCCESS - the file was closed \r
+  STATUS_SUCCESS - the file was closed\r
   STATUS_ERROR   - no file is currently open\r
 \r
 --*/\r
@@ -605,7 +605,7 @@ ProcessIncludeFile (
 Routine Description:\r
 \r
   Given a source file, open the file and parse it\r
-  \r
+\r
 Arguments:\r
 \r
   SourceFile        - name of file to parse\r
@@ -614,7 +614,7 @@ Arguments:
 Returns:\r
 \r
   Standard status.\r
-  \r
+\r
 --*/\r
 {\r
   STATIC UINTN NestDepth = 0;\r
@@ -674,7 +674,7 @@ Routine Description:
 \r
   Given a source file that's been opened, read the contents into an internal\r
   buffer and pre-process it to remove comments.\r
-  \r
+\r
 Arguments:\r
 \r
   SourceFile        - structure containing info on the file to process\r
@@ -682,7 +682,7 @@ Arguments:
 Returns:\r
 \r
   Standard status.\r
-  \r
+\r
 --*/\r
 {\r
   //\r
@@ -722,13 +722,13 @@ PreprocessFile (
 Routine Description:\r
   Preprocess a file to replace all carriage returns with NULLs so\r
   we can print lines (as part of error messages) from the file to the screen.\r
-  \r
+\r
 Arguments:\r
   SourceFile - structure that we use to keep track of an input file.\r
 \r
 Returns:\r
   Nothing.\r
-  \r
+\r
 --*/\r
 {\r
   BOOLEAN InComment;\r
@@ -826,8 +826,8 @@ SFPGetQuotedString (
 /*++\r
 \r
 Routine Description:\r
-  Retrieve a quoted-string from the input file. \r
-  \r
+  Retrieve a quoted-string from the input file.\r
+\r
 Arguments:\r
   Str    - pointer to a copy of the quoted string parsed\r
   Length - size of buffer pointed to by Str\r
@@ -836,7 +836,7 @@ Returns:
   TRUE    - next token in input stream was a quoted string, and\r
             the string value was returned in Str\r
   FALSE   - otherwise\r
-  \r
+\r
 --*/\r
 {\r
   SkipWhiteSpace (&mGlobals.SourceFile);\r
@@ -881,14 +881,14 @@ SFPIsEOF (
 Routine Description:\r
   Return TRUE of FALSE to indicate whether or not we've reached the end of the\r
   file we're parsing.\r
-  \r
+\r
 Arguments:\r
   NA\r
 \r
 Returns:\r
   TRUE    - EOF reached\r
   FALSE   - otherwise\r
-  \r
+\r
 --*/\r
 {\r
   SkipWhiteSpace (&mGlobals.SourceFile);\r
index 7265232d7250884974705fe2ac44f879544aafae..72cc9d52f679ae39c1c046b0ce1ee882b6783b0f 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 Function prototypes and defines for the simple file parsing routines.\r
 \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index a2bb87fe1b883944b5e3ee85a33336709a567c87..65d14140681ca2dcf7347ffe5764823c534649e0 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 Function prototypes and defines for string routines.\r
 \r
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -383,7 +383,7 @@ Returns:
     strcat (NewString, "\"");\r
   }\r
   strcat (NewString, "]");\r
-  \r
+\r
   return NewString;\r
 }\r
 \r
index 4acbf106f7c45408a1dd0091b83f8d3f0420d68e..0675cb9f1d3b54645d3720a23d038713231c5c47 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 String routines implementation\r
 \r
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index 252b8291ed4badb7ac1e7a7aa5a275fbd214a724..8b1ea7f7614061ebadd9debba2b078ee9763328f 100644 (file)
@@ -1,17 +1,17 @@
 /** @file\r
-Compression routine. The compression algorithm is a mixture of LZ77 and Huffman \r
-coding. LZ77 transforms the source data into a sequence of Original Characters \r
-and Pointers to repeated strings. This sequence is further divided into Blocks \r
+Compression routine. The compression algorithm is a mixture of LZ77 and Huffman\r
+coding. LZ77 transforms the source data into a sequence of Original Characters\r
+and Pointers to repeated strings. This sequence is further divided into Blocks\r
 and Huffman codings are applied to each Block.\r
-  \r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -367,13 +367,13 @@ PutDword (
 Routine Description:\r
 \r
   Put a dword to output stream\r
-  \r
+\r
 Arguments:\r
 \r
   Data    - the dword to put\r
-  \r
+\r
 Returns: (VOID)\r
-  \r
+\r
 --*/\r
 {\r
   if (mDst < mDstUpperLimit) {\r
@@ -403,8 +403,8 @@ AllocateMemory (
 Routine Description:\r
 \r
   Allocate memory spaces for data structures used in compression process\r
-  \r
-Argements: \r
+\r
+Argements:\r
   VOID\r
 \r
 Returns:\r
@@ -460,7 +460,7 @@ FreeMemory (
 Routine Description:\r
 \r
   Called when compression is completed to free memory previously allocated.\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -512,7 +512,7 @@ InitSlide (
 Routine Description:\r
 \r
   Initialize String Info Log data structures\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -552,16 +552,16 @@ Child (
 Routine Description:\r
 \r
   Find child node given the parent node and the edge character\r
-  \r
+\r
 Arguments:\r
 \r
   NodeQ       - the parent node\r
   CharC       - the edge character\r
-  \r
+\r
 Returns:\r
 \r
-  The child node (NIL if not found)  \r
-  \r
+  The child node (NIL if not found)\r
+\r
 --*/\r
 {\r
   NODE  NodeR;\r
@@ -590,13 +590,13 @@ MakeChild (
 Routine Description:\r
 \r
   Create a new child for a given parent node.\r
-  \r
+\r
 Arguments:\r
 \r
   Parent       - the parent node\r
   CharC   - the edge character\r
   Child       - the child node\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -624,11 +624,11 @@ Split (
 Routine Description:\r
 \r
   Split a node.\r
-  \r
+\r
 Arguments:\r
 \r
   Old     - the node to split\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -662,7 +662,7 @@ InsertNode (
 Routine Description:\r
 \r
   Insert string info for current position into the String Info Log\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -795,7 +795,7 @@ Routine Description:
 \r
   Delete outdated string info. (The Usage of PERC_FLAG\r
   ensures a clean deletion)\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -926,7 +926,7 @@ Routine Description:
 Arguments: (VOID)\r
 \r
 Returns:\r
-  \r
+\r
   EFI_SUCCESS           - The compression is successful\r
   EFI_OUT_0F_RESOURCES  - Not enough memory for compression process\r
 \r
@@ -1012,7 +1012,7 @@ CountTFreq (
 Routine Description:\r
 \r
   Count the frequencies for the Extra Set\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -1071,13 +1071,13 @@ WritePTLen (
 Routine Description:\r
 \r
   Outputs the code length array for the Extra Set or the Position Set.\r
-  \r
+\r
 Arguments:\r
 \r
   Number       - the number of symbols\r
   nbit    - the number of bits needed to represent 'n'\r
   Special - the special symbol that needs to be take care of\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -1119,7 +1119,7 @@ WriteCLen (
 Routine Description:\r
 \r
   Outputs the code length array for Char&Length Set\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -1209,11 +1209,11 @@ SendBlock (
 Routine Description:\r
 \r
   Huffman code the block and output it.\r
-  \r
-Arguments: \r
+\r
+Arguments:\r
   (VOID)\r
 \r
-Returns: \r
+Returns:\r
   (VOID)\r
 \r
 --*/\r
@@ -1420,7 +1420,7 @@ Routine Description:
 Arguments:\r
 \r
   Number   - the rightmost n bits of the data is used\r
-  x   - the data \r
+  x   - the data\r
 \r
 Returns: (VOID)\r
 \r
@@ -1456,7 +1456,7 @@ FreadCrc (
 Routine Description:\r
 \r
   Read in source data\r
-  \r
+\r
 Arguments:\r
 \r
   Pointer   - the buffer to hold the data\r
@@ -1465,7 +1465,7 @@ Arguments:
 Returns:\r
 \r
   number of bytes actually read\r
-  \r
+\r
 --*/\r
 {\r
   INT32 Index;\r
@@ -1507,11 +1507,11 @@ CountLen (
 Routine Description:\r
 \r
   Count the number of each code length for a Huffman tree.\r
-  \r
+\r
 Arguments:\r
 \r
   Index   - the top node\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -1538,11 +1538,11 @@ MakeLen (
 Routine Description:\r
 \r
   Create code length array for a Huffman tree\r
-  \r
+\r
 Arguments:\r
 \r
   Root   - the root of the tree\r
-  \r
+\r
 Returns:\r
 \r
   VOID\r
@@ -1634,7 +1634,7 @@ MakeCode (
 Routine Description:\r
 \r
   Assign code to each symbol based on the code length array\r
-  \r
+\r
 Arguments:\r
 \r
   Number     - number of symbols\r
@@ -1671,18 +1671,18 @@ MakeTree (
 Routine Description:\r
 \r
   Generates Huffman codes given a frequency distribution of symbols\r
-  \r
+\r
 Arguments:\r
 \r
   NParm    - number of symbols\r
   FreqParm - frequency of each symbol\r
   LenParm  - code length for each symbol\r
   CodeParm - code for each symbol\r
-  \r
+\r
 Returns:\r
 \r
   Root of the Huffman tree.\r
-  \r
+\r
 --*/\r
 {\r
   INT32 Index;\r
index 5368d22360ad2f7d020fed95456301f782369c21..1895e6961906c0aad5a2fca952bc8016318928b3 100644 (file)
@@ -5,15 +5,15 @@ FILE := EFILDR_HEADER
         EFILDR_IMAGE +\r
         <PeImageFileContent> +\r
 The order of EFILDR_IMAGE is same as the order of placing PeImageFileContent.\r
-  \r
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -36,8 +36,8 @@ typedef struct {
   UINT8  FileName[52];\r
 } EFILDR_IMAGE;\r
 \r
-typedef struct {          \r
-  UINT32       Signature;     \r
+typedef struct {\r
+  UINT32       Signature;\r
   UINT32       HeaderCheckSum;\r
   UINT32       FileLength;\r
   UINT32       NumberOfImages;\r
@@ -102,7 +102,7 @@ CountVerboseLevel (
     }\r
     ++(*ReturnValue);\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -176,29 +176,29 @@ Returns:
   UINT64        DebugLevel = 0;\r
   UINT64        VerboseLevel = 0;\r
   EFI_STATUS Status = EFI_SUCCESS;\r
-  \r
+\r
   SetUtilityName (UTILITY_NAME);\r
 \r
   if (argc == 1) {\r
     printf ("Usage: EfiLdrImage -o OutImage LoaderImage PeImage1 PeImage2 ... PeImageN\n");\r
     return STATUS_ERROR;\r
   }\r
-  \r
+\r
   argc --;\r
   argv ++;\r
 \r
   if ((stricmp (argv[0], "-h") == 0) || (stricmp (argv[0], "--help") == 0)) {\r
     Usage();\r
-    return STATUS_SUCCESS;    \r
+    return STATUS_SUCCESS;\r
   }\r
 \r
   if (stricmp (argv[0], "--version") == 0) {\r
     Version();\r
-    return STATUS_SUCCESS;    \r
+    return STATUS_SUCCESS;\r
   }\r
 \r
   while (argc > 0) {\r
-   \r
+\r
     if ((stricmp (argv[0], "-o") == 0) || (stricmp (argv[0], "--output") == 0)) {\r
       OutputFileName = argv[1];\r
       if (OutputFileName == NULL) {\r
@@ -207,39 +207,39 @@ Returns:
       }\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
-    \r
+\r
     if ((stricmp (argv[0], "-q") == 0) || (stricmp (argv[0], "--quiet") == 0)) {\r
       argc --;\r
       argv ++;\r
-      continue; \r
+      continue;\r
     }\r
-    \r
+\r
     if ((strlen(argv[0]) >= 2 && argv[0][0] == '-' && (argv[0][1] == 'v' || argv[0][1] == 'V')) || (stricmp (argv[0], "--verbose") == 0)) {\r
       VerboseLevel = 1;\r
       if (strlen(argv[0]) > 2) {\r
         Status = CountVerboseLevel (&argv[0][2], strlen(argv[0]) - 2, &VerboseLevel);\r
         if (EFI_ERROR (Status)) {\r
           Error (NULL, 0, 1003, "Invalid option value", "%s", argv[0]);\r
-          return STATUS_ERROR;        \r
+          return STATUS_ERROR;\r
         }\r
       }\r
-      \r
+\r
       argc --;\r
       argv ++;\r
-      continue; \r
+      continue;\r
     }\r
-    \r
+\r
     if ((stricmp (argv[0], "-d") == 0) || (stricmp (argv[0], "--debug") == 0)) {\r
       Status = AsciiStringToUint64 (argv[1], FALSE, &DebugLevel);\r
       if (EFI_ERROR (Status)) {\r
         Error (NULL, 0, 1003, "Invalid option value", "%s = %s", argv[0], argv[1]);\r
-        return STATUS_ERROR;        \r
+        return STATUS_ERROR;\r
       }\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
     //\r
     // Don't recognize the parameter, should be regarded as the input file name.\r
index fc3b5ad277a60db17bd7b3fda5a8a2bbf39932ee..cb4ecea2c498b703b170e4017e4101618bfda601 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
 Utility program to create an EFI option ROM image from binary and EFI PE32 files.\r
 \r
-Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available \r
-under the terms and conditions of the BSD License which accompanies this \r
+Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available\r
+under the terms and conditions of the BSD License which accompanies this\r
 distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
@@ -26,8 +26,8 @@ main (
 /*++\r
 \r
 Routine Description:\r
-  \r
-  Given an EFI image filename, create a ROM-able image by creating an option \r
+\r
+  Given an EFI image filename, create a ROM-able image by creating an option\r
   ROM header and PCI data structure, filling them in, and then writing the\r
   option ROM header + PCI data structure + EFI image out to the output file.\r
 \r
@@ -71,11 +71,11 @@ Returns:
   } else if (mOptions.Debug) {\r
     SetPrintLevel(DebugLevel);\r
   }\r
-  \r
+\r
   if (mOptions.Verbose) {\r
     VerboseMsg("%s tool start.\n", UTILITY_NAME);\r
   }\r
-  \r
+\r
   //\r
   // If dumping an image, then do that and quit\r
   //\r
@@ -208,7 +208,7 @@ BailOut:
     VerboseMsg("%s tool done with return code is 0x%x.\n", UTILITY_NAME, GetUtilityStatus ());\r
   }\r
 \r
-  return GetUtilityStatus (); \r
+  return GetUtilityStatus ();\r
 }\r
 \r
 static\r
@@ -221,7 +221,7 @@ ProcessBinFile (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Process a binary input file.\r
 \r
 Arguments:\r
@@ -247,7 +247,7 @@ Returns:
   UINT32                    Index;\r
   UINT8                     ByteCheckSum;\r
   UINT16                    CodeType;\r
\r
+\r
   PciDs23 = NULL;\r
   PciDs30 = NULL;\r
   Status = STATUS_SUCCESS;\r
@@ -351,7 +351,7 @@ Returns:
   } else {\r
     PciDs30->ImageLength = (UINT16) (TotalSize / 512);\r
     CodeType = PciDs30->CodeType;\r
-       }\r
+  }\r
 \r
   //\r
   // If this is the last image, then set the LAST bit unless requested not\r
@@ -362,13 +362,13 @@ Returns:
       PciDs23->Indicator = INDICATOR_LAST;\r
     } else {\r
       PciDs30->Indicator = INDICATOR_LAST;\r
-               }\r
+    }\r
   } else {\r
     if (mOptions.Pci23 == 1) {\r
       PciDs23->Indicator = 0;\r
     } else {\r
       PciDs30->Indicator = 0;\r
-               }\r
+    }\r
   }\r
 \r
   if (CodeType != PCI_CODE_TYPE_EFI_IMAGE) {\r
@@ -431,7 +431,7 @@ ProcessEfiFile (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Process a PE32 EFI file.\r
 \r
 Arguments:\r
@@ -502,7 +502,7 @@ Returns:
   } else {\r
     HeaderPadBytes = 0;\r
   }\r
-  \r
+\r
   //\r
   // For Pci3.0 to use the different data structure.\r
   //\r
@@ -600,7 +600,7 @@ Returns:
   // Check size\r
   //\r
   if (TotalSize > MAX_OPTION_ROM_SIZE) {\r
-    Error (NULL, 0, 2000, "Invalid", "Option ROM image %s size exceeds limit of 0x%X bytes.", InFile->FileName, MAX_OPTION_ROM_SIZE);  \r
+    Error (NULL, 0, 2000, "Invalid", "Option ROM image %s size exceeds limit of 0x%X bytes.", InFile->FileName, MAX_OPTION_ROM_SIZE);\r
     Status = STATUS_ERROR;\r
     goto BailOut;\r
   }\r
@@ -685,12 +685,12 @@ Returns:
   if ((InFile->Next == NULL) && (mOptions.NoLast == 0)) {\r
     if (mOptions.Pci23 == 1) {\r
       PciDs23.Indicator = INDICATOR_LAST;\r
-         } else {\r
+    } else {\r
     PciDs30.Indicator = INDICATOR_LAST;}\r
   } else {\r
     if (mOptions.Pci23 == 1) {\r
       PciDs23.Indicator = 0;\r
-       } else {\r
+  } else {\r
       PciDs30.Indicator = 0;\r
     }\r
   }\r
@@ -723,13 +723,13 @@ Returns:
       Error (NULL, 0, 0002, "Failed to write PCI ROM header to output file!", NULL);\r
       Status = STATUS_ERROR;\r
       goto BailOut;\r
-    } \r
+    }\r
   } else {\r
     if (fwrite (&PciDs30, sizeof (PciDs30), 1, OutFptr) != 1) {\r
       Error (NULL, 0, 0002, "Failed to write PCI ROM header to output file!", NULL);\r
       Status = STATUS_ERROR;\r
       goto BailOut;\r
-    } \r
+    }\r
   }\r
 \r
   //\r
@@ -819,7 +819,7 @@ CheckPE32File (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Given a file pointer to a supposed PE32 image file, verify that it is indeed a\r
   PE32 image file, and then return the machine type in the supplied pointer.\r
 \r
@@ -911,7 +911,7 @@ ParseCommandLine (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Given the Argc/Argv program arguments, and a pointer to an options structure,\r
   parse the command-line options and check their validity.\r
 \r
@@ -973,12 +973,12 @@ Returns:
     Usage ();\r
     return STATUS_ERROR;\r
   }\r
-  \r
+\r
   if ((stricmp(Argv[0], "-h") == 0) || (stricmp(Argv[0], "--help") == 0)) {\r
     Usage();\r
     return STATUS_ERROR;\r
   }\r
-  \r
+\r
   if ((stricmp(Argv[0], "--version") == 0)) {\r
     Version();\r
     return STATUS_ERROR;\r
@@ -1222,7 +1222,7 @@ Returns:
         ReturnStatus = STATUS_ERROR;\r
         goto Done;\r
       }\r
-      \r
+\r
       //\r
       // set flag and class code for this image.\r
       //\r
@@ -1239,7 +1239,7 @@ Returns:
       } else {\r
         if (PrevFileList == NULL) {\r
           PrevFileList = FileList;\r
-        } else {          \r
+        } else {\r
           PrevFileList->Next = FileList;\r
         }\r
       }\r
@@ -1273,7 +1273,7 @@ Returns:
       ReturnStatus = STATUS_ERROR;\r
       goto Done;\r
     }\r
-  \r
+\r
     if (!Options->DevIdCount) {\r
       Error (NULL, 0, 2000, "Missing Device ID in command line", NULL);\r
       ReturnStatus = STATUS_ERROR;\r
@@ -1307,7 +1307,7 @@ Version (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Print version information for this utility.\r
 \r
 Arguments:\r
@@ -1321,7 +1321,7 @@ Returns:
 {\r
  fprintf (stdout, "%s Version %d.%d %s \n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);\r
 }\r
-   \r
+\r
 static\r
 void\r
 Usage (\r
@@ -1330,7 +1330,7 @@ Usage (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Print usage information for this utility.\r
 \r
 Arguments:\r
@@ -1347,11 +1347,11 @@ Returns:
   // Summary usage\r
   //\r
   fprintf (stdout, "Usage: %s -f VendorId -i DeviceId [options] [file name<s>] \n\n", UTILITY_NAME);\r
-  \r
+\r
   //\r
   // Copyright declaration\r
-  // \r
-  fprintf (stdout, "Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.\n\n");\r
+  //\r
+  fprintf (stdout, "Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.\n\n");\r
 \r
   //\r
   // Details Option\r
@@ -1386,7 +1386,7 @@ Returns:
   fprintf (stdout, "  -q, --quiet\n\\r
             Disable all messages except FATAL ERRORS.\n");\r
   fprintf (stdout, "  --debug [#,0-9]\n\\r
-            Enable debug messages at level #.\n");  \r
+            Enable debug messages at level #.\n");\r
 }\r
 \r
 static\r
@@ -1515,7 +1515,7 @@ Returns:
     fprintf (stdout, "    Device ID               0x%04X\n", PciDs30.DeviceId);\r
     fprintf (stdout, "    Length                  0x%04X\n", PciDs30.Length);\r
     fprintf (stdout, "    Revision                0x%04X\n", PciDs30.Revision);\r
-    fprintf (stdout, "    DeviceListOffset        0x%02X\n", PciDs30.DeviceListOffset);    \r
+    fprintf (stdout, "    DeviceListOffset        0x%02X\n", PciDs30.DeviceListOffset);\r
     if (PciDs30.DeviceListOffset) {\r
       //\r
       // Print device ID list\r
@@ -1549,8 +1549,8 @@ Returns:
     fprintf (stdout, "    Code revision:          0x%04X\n", PciDs30.CodeRevision);\r
     fprintf (stdout, "    MaxRuntimeImageLength   0x%02X\n", PciDs30.MaxRuntimeImageLength);\r
     fprintf (stdout, "    ConfigUtilityCodeHeaderOffset 0x%02X\n", PciDs30.ConfigUtilityCodeHeaderOffset);\r
-    fprintf (stdout, "    DMTFCLPEntryPointOffset 0x%02X\n", PciDs30.DMTFCLPEntryPointOffset);   \r
-    fprintf (stdout, "    Indicator               0x%02X", PciDs30.Indicator);    \r
+    fprintf (stdout, "    DMTFCLPEntryPointOffset 0x%02X\n", PciDs30.DMTFCLPEntryPointOffset);\r
+    fprintf (stdout, "    Indicator               0x%02X", PciDs30.Indicator);\r
     }\r
     //\r
     // Print the indicator, used to flag the last image\r
@@ -1566,7 +1566,7 @@ Returns:
     if (mOptions.Pci23 == 1) {\r
       fprintf (stdout, "    Code type              0x%02X", PciDs23.CodeType);\r
     } else {\r
-      fprintf (stdout, "    Code type               0x%02X", PciDs30.CodeType); \r
+      fprintf (stdout, "    Code type               0x%02X", PciDs30.CodeType);\r
     }\r
     if (PciDs23.CodeType == PCI_CODE_TYPE_EFI_IMAGE || PciDs30.CodeType == PCI_CODE_TYPE_EFI_IMAGE) {\r
       fprintf (stdout, "   (EFI image)\n");\r
index f90c63fbf4ddf6904fa697a70bc0c4a4e8413b82..ea179f5487a7e227f99fdb0bc3e603a94560ae35 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
 This file contains the relevant declarations required to generate Option Rom File\r
 \r
-Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available \r
-under the terms and conditions of the BSD License which accompanies this \r
+Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available\r
+under the terms and conditions of the BSD License which accompanies this\r
 distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
@@ -93,7 +93,7 @@ typedef struct {
   INT8      Pci30;\r
   INT8      DumpOption;\r
 //  INT8      Help;\r
-//  INT8      Version;  \r
+//  INT8      Version;\r
   FILE_LIST *FileList;\r
 } OPTIONS;\r
 \r
@@ -177,7 +177,7 @@ Returns:
 \r
   None\r
 \r
---*/  \r
+--*/\r
 ;\r
 \r
 static\r
@@ -190,7 +190,7 @@ ParseCommandLine (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Given the Argc/Argv program arguments, and a pointer to an options structure,\r
   parse the command-line options and check their validity.\r
 \r
@@ -218,7 +218,7 @@ CheckPE32File (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Given the Argc/Argv program arguments, and a pointer to an options structure,\r
   parse the command-line options and check their validity.\r
 \r
@@ -233,7 +233,7 @@ Returns:
   STATUS_SUCCESS    success\r
   non-zero          otherwise\r
 \r
---*/  \r
+--*/\r
 ;\r
 \r
 static\r
@@ -248,7 +248,7 @@ ProcessEfiFile (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Process a PE32 EFI file.\r
 \r
 Arguments:\r
@@ -276,7 +276,7 @@ ProcessBinFile (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Process a binary input file.\r
 \r
 Arguments:\r
@@ -289,7 +289,7 @@ Returns:
 \r
   0 - successful\r
 \r
---*/  \r
+--*/\r
 ;\r
 \r
 static\r
index 1f77e879b313907c40ba42144e1c6325893807a9..e244f1507c166d7b599ebefb5352399c3339563b 100644 (file)
@@ -2,14 +2,14 @@
 \r
   Fat file system structure and definition.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 --*/\r
 \r
index c02de49ba2ad6e3e67e59f68853e8655cf572e68..2385ccc640088429b38cbd1374440c32c8619835 100644 (file)
@@ -3,15 +3,15 @@ Reading/writing MBR/DBR.
   NOTE:\r
     If we write MBR to disk, we just update the MBR code and the partition table wouldn't be over written.\r
     If we process DBR, we will patch MBR to set first partition active if no active partition exists.\r
-    \r
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -166,16 +166,16 @@ Return:
                    );\r
   if (VolumeHandle == INVALID_HANDLE_VALUE) {\r
     fprintf (\r
-      stderr, \r
-      "error E0005: CreateFile failed: Volume = %s, LastError = 0x%lx\n", \r
-      VolumeAccessPath, \r
+      stderr,\r
+      "error E0005: CreateFile failed: Volume = %s, LastError = 0x%lx\n",\r
+      VolumeAccessPath,\r
       GetLastError ()\r
       );\r
     return FALSE;\r
   }\r
 \r
   //\r
-  // Get Disk Number. It should fail when operating on floppy. That's ok \r
+  // Get Disk Number. It should fail when operating on floppy. That's ok\r
   //  because Disk Number is only needed when operating on Hard or USB disk.\r
   //\r
   // To direct write to disk:\r
@@ -183,13 +183,13 @@ Return:
   //   for floppy:     use path = \\.\X:, where X can be A or B\r
   //\r
   Success = DeviceIoControl(\r
-              VolumeHandle, \r
+              VolumeHandle,\r
               IOCTL_STORAGE_GET_DEVICE_NUMBER,\r
-              NULL, \r
-              0, \r
-              &StorageDeviceNumber, \r
+              NULL,\r
+              0,\r
+              &StorageDeviceNumber,\r
               sizeof(StorageDeviceNumber),\r
-              &BytesReturned, \r
+              &BytesReturned,\r
               NULL\r
               );\r
   //\r
@@ -207,7 +207,7 @@ Return:
     DriveInfo->DiskNumber = StorageDeviceNumber.DeviceNumber;\r
   }\r
   CloseHandle(VolumeHandle);\r
-  \r
+\r
   //\r
   // Fill in the type string\r
   //\r
@@ -241,7 +241,7 @@ Routine Description:
 {\r
   UINT       Index;\r
   DRIVE_INFO DriveInfo;\r
-  \r
+\r
   UINT Mask =  GetLogicalDrives();\r
 \r
   for (Index = 0; Index < MAX_DRIVE; Index++) {\r
@@ -258,9 +258,9 @@ Routine Description:
         } else {\r
           fprintf (\r
             stdout,\r
-            "%c: - DiskNum: %u, Type: %s\n", \r
+            "%c: - DiskNum: %u, Type: %s\n",\r
             DriveInfo.VolumeLetter,\r
-            (unsigned) DriveInfo.DiskNumber, \r
+            (unsigned) DriveInfo.DiskNumber,\r
             DriveInfo.DriveType->Description\r
             );\r
         }\r
@@ -301,7 +301,7 @@ Return:
 \r
   DbrOffset = 0;\r
   HasMbr    = FALSE;\r
-  \r
+\r
   SetFilePointer(DiskHandle, 0, NULL, FILE_BEGIN);\r
   if (!ReadFile (DiskHandle, DiskPartition, 0x200, &BytesReturn, NULL)) {\r
     return -1;\r
@@ -359,12 +359,12 @@ Return:
 }\r
 \r
 /**\r
- * Get window file handle for input/ouput disk/file. \r
- *  \r
+ * Get window file handle for input/ouput disk/file.\r
+ *\r
  * @param PathInfo\r
  * @param ProcessMbr\r
  * @param FileHandle\r
- * \r
+ *\r
  * @return ERROR_STATUS\r
  */\r
 ERROR_STATUS\r
@@ -384,11 +384,11 @@ GetFileHandle (
 \r
   *FileHandle = CreateFile(\r
                    PathInfo->PhysicalPath,\r
-                   GENERIC_READ | GENERIC_WRITE, \r
-                   FILE_SHARE_READ, \r
-                   NULL, \r
-                   OpenFlag, \r
-                   FILE_ATTRIBUTE_NORMAL, \r
+                   GENERIC_READ | GENERIC_WRITE,\r
+                   FILE_SHARE_READ,\r
+                   NULL,\r
+                   OpenFlag,\r
+                   FILE_ATTRIBUTE_NORMAL,\r
                    NULL\r
                    );\r
   if (*FileHandle == INVALID_HANDLE_VALUE) {\r
@@ -419,19 +419,19 @@ GetFileHandle (
 }\r
 \r
 /**\r
-  Writing or reading boot sector or MBR according to the argument. \r
-   \r
+  Writing or reading boot sector or MBR according to the argument.\r
+\r
   @param InputInfo PATH_INFO instance for input path\r
   @param OutputInfo PATH_INFO instance for output path\r
   @param ProcessMbr TRUE is to process MBR, otherwise, processing boot sector\r
-  \r
+\r
   @return ERROR_STATUS\r
  **/\r
 ERROR_STATUS\r
 ProcessBsOrMbr (\r
   PATH_INFO     *InputInfo,\r
   PATH_INFO     *OutputInfo,\r
-  BOOL         ProcessMbr\r
+  BOOL          ProcessMbr\r
   )\r
 {\r
   BYTE              DiskPartition[0x200] = {0};\r
@@ -462,14 +462,14 @@ ProcessBsOrMbr (
 \r
   //\r
   // Read boot sector from source disk/file\r
-  // \r
+  //\r
   if (!ReadFile (InputHandle, DiskPartition, 0x200, &BytesReturn, NULL)) {\r
     Status = ErrorFileReadWrite;\r
     goto Done;\r
   }\r
 \r
   if (InputInfo->Type == PathUsb) {\r
-      // Manually set BS_DrvNum to 0x80 as window's format.exe has a bug which will clear this field discarding USB disk's MBR. \r
+      // Manually set BS_DrvNum to 0x80 as window's format.exe has a bug which will clear this field discarding USB disk's MBR.\r
       // offset of BS_DrvNum is 0x24 for FAT12/16\r
       //                        0x40 for FAT32\r
       //\r
@@ -509,7 +509,7 @@ ProcessBsOrMbr (
 \r
   //\r
   // Write boot sector to taget disk/file\r
-  // \r
+  //\r
   if (!WriteFile (OutputHandle, DiskPartition, 0x200, &BytesReturn, NULL)) {\r
     Status = ErrorFileReadWrite;\r
     goto Done;\r
@@ -555,7 +555,7 @@ PrintUsage (
   )\r
 {\r
   printf ("Usage: GenBootSector [options] --cfg-file CFG_FILE\n\n\\r
-Copyright (c) 2009 - 2014, Intel Corporation.  All rights reserved.\n\n\\r
+Copyright (c) 2009 - 2018, Intel Corporation.  All rights reserved.\n\n\\r
   Utility to retrieve and update the boot sector or MBR.\n\n\\r
 optional arguments:\n\\r
   -h, --help            Show this help message and exit\n\\r
@@ -601,7 +601,7 @@ GetPathInfo (
   //\r
   if (IsLetter(PathInfo->Path[0]) && (PathInfo->Path[1] == ':') && (PathInfo->Path[2] == '\0')) {\r
     VolumeLetter = PathInfo->Path[0];\r
-    if ((VolumeLetter == 'A') || (VolumeLetter == 'a') || \r
+    if ((VolumeLetter == 'A') || (VolumeLetter == 'a') ||\r
         (VolumeLetter == 'B') || (VolumeLetter == 'b')) {\r
       PathInfo->Type = PathFloppy;\r
       sprintf (PathInfo->PhysicalPath, FloppyPathTemplate, VolumeLetter);\r
@@ -628,8 +628,8 @@ GetPathInfo (
       return ErrorPath;\r
     }\r
 \r
-       return ErrorSuccess;\r
-  } \r
+  return ErrorSuccess;\r
+  }\r
 \r
   //\r
   // Check the path length\r
@@ -660,7 +660,7 @@ GetPathInfo (
   PathInfo->PhysicalPath[sizeof (PathInfo->PhysicalPath) / sizeof (PathInfo->PhysicalPath[0]) - 1] = 0;\r
 \r
   return ErrorSuccess;\r
-}    \r
+}\r
 \r
 INT\r
 main (\r
@@ -682,14 +682,14 @@ main (
   AppName = *argv;\r
   argv ++;\r
   argc --;\r
-  \r
+\r
   ProcessMbr    = FALSE;\r
 \r
   if (argc == 0) {\r
     PrintUsage();\r
     return 0;\r
   }\r
-   \r
+\r
   //\r
   // Parse command line\r
   //\r
@@ -697,23 +697,23 @@ main (
     if ((stricmp (argv[Index], "-l") == 0) || (stricmp (argv[Index], "--list") == 0)) {\r
       ListDrive ();\r
       return 0;\r
-    } \r
-    \r
+    }\r
+\r
     if ((stricmp (argv[Index], "-m") == 0) || (stricmp (argv[Index], "--mbr") == 0)) {\r
       ProcessMbr = TRUE;\r
       continue;\r
-    } \r
-    \r
+    }\r
+\r
     if ((stricmp (argv[Index], "-i") == 0) || (stricmp (argv[Index], "--input") == 0)) {\r
       InputPathInfo.Path  = argv[Index + 1];\r
       InputPathInfo.Input = TRUE;\r
       if (InputPathInfo.Path == NULL) {\r
         Error (NULL, 0, 1003, "Invalid option value", "Input file name can't be NULL");\r
         return 1;\r
-      } \r
+      }\r
       if (InputPathInfo.Path[0] == '-') {\r
         Error (NULL, 0, 1003, "Invalid option value", "Input file is missing");\r
-        return 1;       \r
+        return 1;\r
       }\r
       ++Index;\r
       continue;\r
@@ -725,33 +725,33 @@ main (
       if (OutputPathInfo.Path == NULL) {\r
         Error (NULL, 0, 1003, "Invalid option value", "Output file name can't be NULL");\r
         return 1;\r
-      } \r
+      }\r
       if (OutputPathInfo.Path[0] == '-') {\r
         Error (NULL, 0, 1003, "Invalid option value", "Output file is missing");\r
-        return 1;       \r
+        return 1;\r
       }\r
       ++Index;\r
       continue;\r
     }\r
-    \r
+\r
     if ((stricmp (argv[Index], "-h") == 0) || (stricmp (argv[Index], "--help") == 0)) {\r
       PrintUsage ();\r
       return 0;\r
-    } \r
-    \r
+    }\r
+\r
     if (stricmp (argv[Index], "--version") == 0) {\r
       Version ();\r
       return 0;\r
-    } \r
-    \r
+    }\r
+\r
     if ((stricmp (argv[Index], "-v") == 0) || (stricmp (argv[Index], "--verbose") == 0)) {\r
       continue;\r
-    } \r
-    \r
+    }\r
+\r
     if ((stricmp (argv[Index], "-q") == 0) || (stricmp (argv[Index], "--quiet") == 0)) {\r
       continue;\r
-    } \r
-    \r
+    }\r
+\r
     if ((stricmp (argv[Index], "-d") == 0) || (stricmp (argv[Index], "--debug") == 0)) {\r
       EfiStatus = AsciiStringToUint64 (argv[Index + 1], FALSE, &LogLevel);\r
       if (EFI_ERROR (EfiStatus)) {\r
@@ -774,7 +774,7 @@ main (
     Error (NULL, 0, 1000, "Unknown option", "%s", argv[Index]);\r
     return 1;\r
   }\r
-  \r
+\r
   if (InputPathInfo.Path == NULL) {\r
     Error (NULL, 0, 1001, "Missing options", "Input file is missing");\r
     return 1;\r
@@ -784,7 +784,7 @@ main (
     Error (NULL, 0, 1001, "Missing options", "Output file is missing");\r
     return 1;\r
   }\r
-  \r
+\r
   if (GetPathInfo(&InputPathInfo) != ErrorSuccess) {\r
     Error (NULL, 0, 1003, "Invalid option value", "Input file can't be found.");\r
     return 1;\r
@@ -794,7 +794,7 @@ main (
     Error (NULL, 0, 1003, "Invalid option value", "Output file can't be found.");\r
     return 1;\r
   }\r
-  \r
+\r
   //\r
   // Process DBR (Patch or Read)\r
   //\r
@@ -802,19 +802,19 @@ main (
 \r
   if (Status == ErrorSuccess) {\r
     fprintf (\r
-      stdout, \r
-      "%s %s: successful!\n", \r
-      (OutputPathInfo.Type != PathFile) ? "Write" : "Read", \r
+      stdout,\r
+      "%s %s: successful!\n",\r
+      (OutputPathInfo.Type != PathFile) ? "Write" : "Read",\r
       ProcessMbr ? "MBR" : "DBR"\r
       );\r
     return 0;\r
   } else {\r
     fprintf (\r
-      stderr, \r
+      stderr,\r
       "%s: %s %s: failed - %s (LastError: 0x%lx)!\n",\r
       (Status == ErrorNoMbr) ? "WARNING" : "ERROR",\r
-      (OutputPathInfo.Type != PathFile) ? "Write" : "Read", \r
-      ProcessMbr ? "MBR" : "DBR", \r
+      (OutputPathInfo.Type != PathFile) ? "Write" : "Read",\r
+      ProcessMbr ? "MBR" : "DBR",\r
       ErrorStatusDesc[Status],\r
       GetLastError ()\r
       );\r
index 065833b79fe64f0c0b7860451f59610492b9d7a1..ab6944ef2a7127280ca03d4c52cffe148534f08b 100644 (file)
@@ -2,14 +2,14 @@
 \r
   Get Drv Num offset from Fat file system.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index 515358794bc078fe563147052e8acbec7c432a03..369f4affa917ba52905556199a2591998c6aef8a 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 Calculate Crc32 value and Verify Crc32 value for input data.\r
 \r
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -27,7 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #define CRC32_NULL              0\r
 #define CRC32_ENCODE            1\r
-#define CRC32_DECODE            2 \r
+#define CRC32_DECODE            2\r
 \r
 VOID\r
 Version (\r
@@ -76,11 +76,11 @@ Returns:
   // Summary usage\r
   //\r
   fprintf (stdout, "Usage: GenCrc32 -e|-d [options] <input_file>\n\n");\r
-  \r
+\r
   //\r
   // Copyright declaration\r
-  // \r
-  fprintf (stdout, "Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.\n\n");\r
+  //\r
+  fprintf (stdout, "Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.\n\n");\r
 \r
   //\r
   // Details Option\r
@@ -100,7 +100,7 @@ Returns:
   fprintf (stdout, "  -o OUTPUT_FILENAME, --output OUTPUT_FILENAME\n\\r
                         Output file name\n");\r
   fprintf (stdout, "  --sfo                 Reserved for future use\n");\r
-  \r
+\r
 }\r
 \r
 int\r
@@ -135,7 +135,7 @@ Returns:
   UINT32                  Crc32Value;\r
   FILE                    *InFile;\r
   FILE                    *OutFile;\r
-  \r
+\r
   //\r
   // Init local variables\r
   //\r
@@ -165,12 +165,12 @@ Returns:
 \r
   if ((stricmp (argv[0], "-h") == 0) || (stricmp (argv[0], "--help") == 0)) {\r
     Usage ();\r
-    return STATUS_SUCCESS;    \r
+    return STATUS_SUCCESS;\r
   }\r
 \r
   if (stricmp (argv[0], "--version") == 0) {\r
     Version ();\r
-    return STATUS_SUCCESS;    \r
+    return STATUS_SUCCESS;\r
   }\r
 \r
   while (argc > 0) {\r
@@ -182,21 +182,21 @@ Returns:
       OutputFileName = argv[1];\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-e") == 0) || (stricmp (argv[0], "--encode") == 0)) {\r
       FileAction     = CRC32_ENCODE;\r
       argc --;\r
       argv ++;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-d") == 0) || (stricmp (argv[0], "--decode") == 0)) {\r
       FileAction     = CRC32_DECODE;\r
       argc --;\r
       argv ++;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-v") == 0) || (stricmp (argv[0], "--verbose") == 0)) {\r
@@ -246,7 +246,7 @@ Returns:
   }\r
 \r
   VerboseMsg ("%s tool start.", UTILITY_NAME);\r
-  \r
+\r
   //\r
   // Check Input parameters\r
   //\r
@@ -258,7 +258,7 @@ Returns:
   } else if (FileAction == CRC32_DECODE) {\r
     VerboseMsg ("File will be decoded by Crc32");\r
   }\r
-  \r
+\r
   if (InputFileName == NULL) {\r
     Error (NULL, 0, 1001, "Missing option", "Input files are not specified");\r
     goto Finish;\r
@@ -272,7 +272,7 @@ Returns:
   } else {\r
     VerboseMsg ("Output file name is %s", OutputFileName);\r
   }\r
-  \r
+\r
   //\r
   // Open Input file and read file data.\r
   //\r
@@ -285,18 +285,18 @@ Returns:
   fseek (InFile, 0, SEEK_END);\r
   FileSize = ftell (InFile);\r
   fseek (InFile, 0, SEEK_SET);\r
-  \r
+\r
   FileBuffer = (UINT8 *) malloc (FileSize);\r
   if (FileBuffer == NULL) {\r
     Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated!");\r
     fclose (InFile);\r
     goto Finish;\r
   }\r
-  \r
+\r
   fread (FileBuffer, 1, FileSize, InFile);\r
   fclose (InFile);\r
   VerboseMsg ("the size of the input file is %u bytes", (unsigned) FileSize);\r
-  \r
+\r
   //\r
   // Open output file\r
   //\r
@@ -305,7 +305,7 @@ Returns:
     Error (NULL, 0, 0001, "Error opening file", OutputFileName);\r
     goto Finish;\r
   }\r
-  \r
+\r
   //\r
   // Calculate Crc32 value\r
   //\r
@@ -352,16 +352,16 @@ Finish:
   if (FileBuffer != NULL) {\r
     free (FileBuffer);\r
   }\r
-  \r
+\r
   if (OutFile != NULL) {\r
     fclose (OutFile);\r
   }\r
-  \r
+\r
   VerboseMsg ("%s tool done with return code is 0x%x.", UTILITY_NAME, GetUtilityStatus ());\r
 \r
   return GetUtilityStatus ();\r
 }\r
 \r
-  \r
-  \r
-  \r
+\r
+\r
+\r
index eb40c30ea7b523152d3e22c3cdf49f5de93b089c..02c7ac30f082d90747094982c76093ff5fd94a90 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
 This file contains functions required to generate a Firmware File System file.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -76,7 +76,7 @@ STATIC EFI_GUID mZeroGuid = {0};
 STATIC EFI_GUID mEfiFfsSectionAlignmentPaddingGuid = EFI_FFS_SECTION_ALIGNMENT_PADDING_GUID;\r
 \r
 STATIC\r
-VOID \r
+VOID\r
 Version (\r
   VOID\r
   )\r
@@ -89,12 +89,12 @@ Routine Description:
 Arguments:\r
 \r
   None\r
-  \r
+\r
 Returns:\r
 \r
   None\r
-  \r
---*/ \r
+\r
+--*/\r
 {\r
   fprintf (stdout, "%s Version %d.%d %s \n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);\r
 }\r
@@ -124,11 +124,11 @@ Returns:
   // Summary usage\r
   //\r
   fprintf (stdout, "\nUsage: %s [options]\n\n", UTILITY_NAME);\r
-  \r
+\r
   //\r
   // Copyright declaration\r
-  // \r
-  fprintf (stdout, "Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.\n\n");\r
+  //\r
+  fprintf (stdout, "Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.\n\n");\r
 \r
   //\r
   // Details Option\r
@@ -236,7 +236,7 @@ Returns:
 --*/\r
 {\r
   UINT8 Index = 0;\r
-  \r
+\r
   if (String == NULL) {\r
     return EFI_FV_FILETYPE_ALL;\r
   }\r
@@ -262,31 +262,31 @@ GetSectionContents (
   OUT UINT8                     *PESectionNum\r
   )\r
 /*++\r
-        \r
+\r
 Routine Description:\r
-           \r
+\r
   Get the contents of all section files specified in InputFileName\r
   into FileBuffer.\r
-            \r
+\r
 Arguments:\r
-               \r
+\r
   InputFileName  - Name of the input file.\r
-                \r
+\r
   InputFileAlign - Alignment required by the input file data.\r
 \r
   InputFileNum   - Number of input files. Should be at least 1.\r
 \r
   FileBuffer     - Output buffer to contain data\r
 \r
-  BufferLength   - On input, this is size of the FileBuffer. \r
+  BufferLength   - On input, this is size of the FileBuffer.\r
                    On output, this is the actual length of the data.\r
 \r
   MaxAlignment   - The max alignment required by all the input file datas.\r
-  \r
+\r
   PeSectionNum   - Calculate the number of Pe/Te Section in this FFS file.\r
 \r
 Returns:\r
-                       \r
+\r
   EFI_SUCCESS on successful return\r
   EFI_INVALID_PARAMETER if InputFileNum is less than 1 or BufferLength point is NULL.\r
   EFI_ABORTED if unable to open input file.\r
@@ -323,8 +323,8 @@ Returns:
     while ((Size & 0x03) != 0) {\r
       Size++;\r
     }\r
-    \r
-    // \r
+\r
+    //\r
     // Open file and read contents\r
     //\r
     InFile = fopen (LongFilePath (InputFileName[Index]), "rb");\r
@@ -336,8 +336,8 @@ Returns:
     fseek (InFile, 0, SEEK_END);\r
     FileSize = ftell (InFile);\r
     fseek (InFile, 0, SEEK_SET);\r
-    DebugMsg (NULL, 0, 9, "Input section files", \r
-              "the input section name is %s and the size is %u bytes", InputFileName[Index], (unsigned) FileSize); \r
+    DebugMsg (NULL, 0, 9, "Input section files",\r
+              "the input section name is %s and the size is %u bytes", InputFileName[Index], (unsigned) FileSize);\r
 \r
     //\r
     // Check this section is Te/Pe section, and Calculate the numbers of Te/Pe section.\r
@@ -371,10 +371,10 @@ Returns:
         }\r
       }\r
       (*PESectionNum) ++;\r
-    } else if (TempSectHeader.Type == EFI_SECTION_COMPRESSION || \r
+    } else if (TempSectHeader.Type == EFI_SECTION_COMPRESSION ||\r
                TempSectHeader.Type == EFI_SECTION_FIRMWARE_VOLUME_IMAGE) {\r
       //\r
-      // for the encapsulated section, assume it contains Pe/Te section \r
+      // for the encapsulated section, assume it contains Pe/Te section\r
       //\r
       (*PESectionNum) ++;\r
     }\r
@@ -398,7 +398,7 @@ Returns:
     if ((InputFileAlign [Index] != 0) && (((Size + HeaderSize + TeOffset) % InputFileAlign [Index]) != 0)) {\r
       Offset = (Size + sizeof (EFI_COMMON_SECTION_HEADER) + HeaderSize + TeOffset + InputFileAlign [Index] - 1) & ~(InputFileAlign [Index] - 1);\r
       Offset = Offset - Size - HeaderSize - TeOffset;\r
-       \r
+\r
       if (FileBuffer != NULL && ((Size + Offset) < *BufferLength)) {\r
         //\r
         // The maximal alignment is 64K, the raw section size must be less than 0xffffff\r
@@ -425,7 +425,7 @@ Returns:
           SectHeader->CommonHeader.Type   = EFI_SECTION_RAW;\r
         }\r
       }\r
-      DebugMsg (NULL, 0, 9, "Pad raw section for section data alignment", \r
+      DebugMsg (NULL, 0, 9, "Pad raw section for section data alignment",\r
                 "Pad Raw section size is %u", (unsigned) Offset);\r
 \r
       Size = Size + Offset;\r
@@ -612,13 +612,13 @@ Returns:
   // unsigned 32-bit integer plus the size unit character.\r
   //\r
   CHAR8                   AlignmentBuffer[16];\r
-  \r
+\r
   //\r
   // Init local variables\r
   //\r
   LogLevel       = 0;\r
   Index          = 0;\r
-  FfsAttrib      = 0;  \r
+  FfsAttrib      = 0;\r
   FfsAlign       = 0;\r
   FfsFiletype    = EFI_FV_FILETYPE_ALL;\r
   OutputFileName = NULL;\r
@@ -649,12 +649,12 @@ Returns:
   if ((stricmp (argv[0], "-h") == 0) || (stricmp (argv[0], "--help") == 0)) {\r
     Version ();\r
     Usage ();\r
-    return STATUS_SUCCESS;    \r
+    return STATUS_SUCCESS;\r
   }\r
 \r
   if (stricmp (argv[0], "--version") == 0) {\r
     Version ();\r
-    return STATUS_SUCCESS;    \r
+    return STATUS_SUCCESS;\r
   }\r
 \r
   while (argc > 0) {\r
@@ -670,7 +670,7 @@ Returns:
       }\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-o") == 0) || (stricmp (argv[0], "--outputfile") == 0)) {\r
@@ -681,7 +681,7 @@ Returns:
       OutputFileName = argv[1];\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-g") == 0) || (stricmp (argv[0], "--fileguid") == 0)) {\r
@@ -755,7 +755,7 @@ Returns:
           return STATUS_ERROR;\r
         }\r
         memset (InputFileName, 0, (MAXIMUM_INPUT_FILE_NUM * sizeof (CHAR8 *)));\r
-        \r
+\r
         InputFileAlign = (UINT32 *) malloc (MAXIMUM_INPUT_FILE_NUM * sizeof (UINT32));\r
         if (InputFileAlign == NULL) {\r
           Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");\r
@@ -771,7 +771,7 @@ Returns:
                                     InputFileName,\r
                                     (InputFileNum + MAXIMUM_INPUT_FILE_NUM) * sizeof (CHAR8 *)\r
                                     );\r
-  \r
+\r
         if (InputFileName == NULL) {\r
           Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");\r
           free (InputFileAlign);\r
@@ -783,7 +783,7 @@ Returns:
                                     InputFileAlign,\r
                                     (InputFileNum + MAXIMUM_INPUT_FILE_NUM) * sizeof (UINT32)\r
                                     );\r
-  \r
+\r
         if (InputFileAlign == NULL) {\r
           Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");\r
           free (InputFileName);\r
@@ -791,16 +791,16 @@ Returns:
         }\r
         memset (&(InputFileAlign[InputFileNum]), 0, (MAXIMUM_INPUT_FILE_NUM * sizeof (UINT32)));\r
       }\r
-  \r
+\r
       InputFileName[InputFileNum] = argv[1];\r
       argc -= 2;\r
       argv += 2;\r
 \r
       if (argc <= 0) {\r
-             InputFileNum ++;\r
+        InputFileNum ++;\r
         break;\r
       }\r
-      \r
+\r
       //\r
       // Section File alignment requirement\r
       //\r
@@ -834,7 +834,7 @@ Returns:
         argv += 2;\r
       }\r
       InputFileNum ++;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-n") == 0) || (stricmp (argv[0], "--sectionalign") == 0)) {\r
@@ -886,25 +886,25 @@ Returns:
   //\r
   if (FfsFiletype == EFI_FV_FILETYPE_ALL) {\r
     Error (NULL, 0, 1001, "Missing option", "filetype");\r
-    goto Finish;      \r
+    goto Finish;\r
   }\r
 \r
   if (CompareGuid (&FileGuid, &mZeroGuid) == 0) {\r
     Error (NULL, 0, 1001, "Missing option", "fileguid");\r
-    goto Finish;    \r
+    goto Finish;\r
   }\r
 \r
   if (InputFileNum == 0) {\r
     Error (NULL, 0, 1001, "Missing option", "Input files");\r
     goto Finish;\r
   }\r
-  \r
+\r
   //\r
   // Output input parameter information\r
   //\r
   VerboseMsg ("Fv File type is %s", mFfsFileType [FfsFiletype]);\r
   VerboseMsg ("Output file name is %s", OutputFileName);\r
-  VerboseMsg ("FFS File Guid is %08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", \r
+  VerboseMsg ("FFS File Guid is %08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",\r
                 (unsigned) FileGuid.Data1,\r
                 FileGuid.Data2,\r
                 FileGuid.Data3,\r
@@ -932,10 +932,10 @@ Returns:
     }\r
     VerboseMsg ("the %dth input section name is %s and section alignment is %u", Index, InputFileName[Index], (unsigned) InputFileAlign[Index]);\r
   }\r
-  \r
+\r
   //\r
   // Calculate the size of all input section files.\r
-  //  \r
+  //\r
   Status = GetSectionContents (\r
              InputFileName,\r
              InputFileAlign,\r
@@ -946,20 +946,20 @@ Returns:
              &MaxAlignment,\r
              &PeSectionNum\r
              );\r
-  \r
-  if ((FfsFiletype == EFI_FV_FILETYPE_SECURITY_CORE || \r
+\r
+  if ((FfsFiletype == EFI_FV_FILETYPE_SECURITY_CORE ||\r
       FfsFiletype == EFI_FV_FILETYPE_PEI_CORE ||\r
       FfsFiletype == EFI_FV_FILETYPE_DXE_CORE) && (PeSectionNum != 1)) {\r
     Error (NULL, 0, 2000, "Invalid parameter", "Fv File type %s must have one and only one Pe or Te section, but %u Pe/Te section are input", mFfsFileType [FfsFiletype], PeSectionNum);\r
     goto Finish;\r
   }\r
-  \r
+\r
   if ((FfsFiletype == EFI_FV_FILETYPE_PEIM ||\r
       FfsFiletype == EFI_FV_FILETYPE_DRIVER ||\r
       FfsFiletype == EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER ||\r
       FfsFiletype == EFI_FV_FILETYPE_APPLICATION) && (PeSectionNum < 1)) {\r
     Error (NULL, 0, 2000, "Invalid parameter", "Fv File type %s must have at least one Pe or Te section, but no Pe/Te section is input", mFfsFileType [FfsFiletype]);\r
-    goto Finish;   \r
+    goto Finish;\r
   }\r
 \r
   if (Status == EFI_BUFFER_TOO_SMALL) {\r
@@ -969,7 +969,7 @@ Returns:
       goto Finish;\r
     }\r
     memset (FileBuffer, 0, FileSize);\r
-    \r
+\r
     //\r
     // read all input file contents into a buffer\r
     //\r
@@ -993,7 +993,7 @@ Returns:
     Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");\r
     goto Finish;\r
   }\r
-  \r
+\r
   //\r
   // Create Ffs file header.\r
   //\r
@@ -1001,9 +1001,9 @@ Returns:
   memcpy (&FfsFileHeader.Name, &FileGuid, sizeof (EFI_GUID));\r
   FfsFileHeader.Type       = FfsFiletype;\r
   //\r
-  // Update FFS Alignment based on the max alignment required by input section files \r
+  // Update FFS Alignment based on the max alignment required by input section files\r
   //\r
-  VerboseMsg ("the max alignment of all input sections is %u", (unsigned) MaxAlignment); \r
+  VerboseMsg ("the max alignment of all input sections is %u", (unsigned) MaxAlignment);\r
   for (Index = 0; Index < sizeof (mFfsValidAlign) / sizeof (UINT32) - 1; Index ++) {\r
     if ((MaxAlignment > mFfsValidAlign [Index]) && (MaxAlignment <= mFfsValidAlign [Index + 1])) {\r
       break;\r
@@ -1012,8 +1012,8 @@ Returns:
   if (FfsAlign < Index) {\r
     FfsAlign = Index;\r
   }\r
-  VerboseMsg ("the alignment of the generated FFS file is %u", (unsigned) mFfsValidAlign [FfsAlign + 1]);  \r
-  \r
+  VerboseMsg ("the alignment of the generated FFS file is %u", (unsigned) mFfsValidAlign [FfsAlign + 1]);\r
+\r
   //\r
   // Now FileSize includes the EFI_FFS_FILE_HEADER\r
   //\r
@@ -1056,15 +1056,15 @@ Returns:
     // Ffs header checksum = zero, so only need to calculate ffs body.\r
     //\r
     FfsFileHeader.IntegrityCheck.Checksum.File = CalculateChecksum8 (\r
-                                                   FileBuffer, \r
+                                                   FileBuffer,\r
                                                    FileSize - HeaderSize\r
-                                                   );    \r
+                                                   );\r
   } else {\r
     FfsFileHeader.IntegrityCheck.Checksum.File = FFS_FIXED_CHECKSUM;\r
   }\r
 \r
   FfsFileHeader.State = EFI_FILE_HEADER_CONSTRUCTION | EFI_FILE_HEADER_VALID | EFI_FILE_DATA_VALID;\r
-  \r
+\r
   //\r
   // Open output file to write ffs data.\r
   //\r
index be3184031056a53dcea2bd3d6e8116a332d32fda..77537552bd40fcc2e32938cb3d6b30902e243984 100644 (file)
@@ -1,17 +1,17 @@
 /** @file\r
-  This contains all code necessary to build the GenFvImage.exe utility.       \r
+  This contains all code necessary to build the GenFvImage.exe utility.\r
   This utility relies heavily on the GenFvImage Lib.  Definitions for both\r
-  can be found in the Tiano Firmware Volume Generation Utility \r
+  can be found in the Tiano Firmware Volume Generation Utility\r
   Specification, review draft.\r
 \r
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -38,7 +38,7 @@ EFI_GUID  mEfiFirmwareFileSystem2Guid = EFI_FIRMWARE_FILE_SYSTEM2_GUID;
 EFI_GUID  mEfiFirmwareFileSystem3Guid = EFI_FIRMWARE_FILE_SYSTEM3_GUID;\r
 \r
 STATIC\r
-VOID \r
+VOID\r
 Version (\r
   VOID\r
 )\r
@@ -62,7 +62,7 @@ Returns:
 }\r
 \r
 STATIC\r
-VOID \r
+VOID\r
 Usage (\r
   VOID\r
   )\r
@@ -86,11 +86,11 @@ Returns:
   // Summary usage\r
   //\r
   fprintf (stdout, "\nUsage: %s [options]\n\n", UTILITY_NAME);\r
-  \r
+\r
   //\r
   // Copyright declaration\r
-  // \r
-  fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");\r
+  //\r
+  fprintf (stdout, "Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.\n\n");\r
 \r
   //\r
   // Details Option\r
@@ -128,7 +128,7 @@ Returns:
                         FV base address when current FV base address is set.\n");\r
   fprintf (stdout, "  -m logfile, --map logfile\n\\r
                         Logfile is the output fv map file name. if it is not\n\\r
-                        given, the FvName.map will be the default map file name\n"); \r
+                        given, the FvName.map will be the default map file name\n");\r
   fprintf (stdout, "  -g Guid, --guid Guid\n\\r
                         GuidValue is one specific capsule guid value\n\\r
                         or fv file system guid value.\n\\r
@@ -141,7 +141,7 @@ Returns:
                         Capsule OEM Flag is an integer between 0x0000 and 0xffff\n");\r
   fprintf (stdout, "  --capheadsize HeadSize\n\\r
                         HeadSize is one HEX or DEC format value\n\\r
-                        HeadSize is required by Capsule Image.\n");                        \r
+                        HeadSize is required by Capsule Image.\n");\r
   fprintf (stdout, "  -c, --capsule         Create Capsule Image.\n");\r
   fprintf (stdout, "  -p, --dump            Dump Capsule Image header.\n");\r
   fprintf (stdout, "  -v, --verbose         Turn on verbose output with informational messages.\n");\r
@@ -170,14 +170,14 @@ Arguments:
   FvInfFileName      The name of an FV image description file or Capsule Image.\r
 \r
   Arguments come in pair in any order.\r
-    -I FvInfFileName \r
+    -I FvInfFileName\r
 \r
 Returns:\r
 \r
   EFI_SUCCESS            No error conditions detected.\r
   EFI_INVALID_PARAMETER  One or more of the input parameters is invalid.\r
-  EFI_OUT_OF_RESOURCES   A resource required by the utility was unavailable.  \r
-                         Most commonly this will be memory allocation \r
+  EFI_OUT_OF_RESOURCES   A resource required by the utility was unavailable.\r
+                         Most commonly this will be memory allocation\r
                          or file creation.\r
   EFI_LOAD_ERROR         GenFvImage.lib could not be loaded.\r
   EFI_ABORTED            Error executing the GenFvImage lib.\r
@@ -216,7 +216,7 @@ Returns:
   Status        = EFI_SUCCESS;\r
 \r
   SetUtilityName (UTILITY_NAME);\r
-  \r
+\r
   if (argc == 1) {\r
     Error (NULL, 0, 1001, "Missing options", "No input options specified.");\r
     Usage ();\r
@@ -227,13 +227,13 @@ Returns:
   // Init global data to Zero\r
   //\r
   memset (&mFvDataInfo, 0, sizeof (FV_INFO));\r
-  memset (&mCapDataInfo, 0, sizeof (CAP_INFO)); \r
+  memset (&mCapDataInfo, 0, sizeof (CAP_INFO));\r
   //\r
   // Set the default FvGuid\r
   //\r
   memcpy (&mFvDataInfo.FvFileSystemGuid, &mEfiFirmwareFileSystem2Guid, sizeof (EFI_GUID));\r
   mFvDataInfo.ForceRebase = -1;\r
-   \r
+\r
   //\r
   // Parse command line\r
   //\r
@@ -243,12 +243,12 @@ Returns:
   if ((stricmp (argv[0], "-h") == 0) || (stricmp (argv[0], "--help") == 0)) {\r
     Version ();\r
     Usage ();\r
-    return STATUS_SUCCESS;    \r
+    return STATUS_SUCCESS;\r
   }\r
 \r
   if (stricmp (argv[0], "--version") == 0) {\r
     Version ();\r
-    return STATUS_SUCCESS;    \r
+    return STATUS_SUCCESS;\r
   }\r
 \r
   while (argc > 0) {\r
@@ -260,7 +260,7 @@ Returns:
       }\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-a") == 0) || (stricmp (argv[0], "--addrfile") == 0)) {\r
@@ -271,7 +271,7 @@ Returns:
       }\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-o") == 0) || (stricmp (argv[0], "--outputfile") == 0)) {\r
@@ -282,54 +282,54 @@ Returns:
       }\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-r") == 0) || (stricmp (argv[0], "--baseaddr") == 0)) {\r
       Status = AsciiStringToUint64 (argv[1], FALSE, &TempNumber);\r
       if (EFI_ERROR (Status)) {\r
         Error (NULL, 0, 1003, "Invalid option value", "%s = %s", argv[0], argv[1]);\r
-        return STATUS_ERROR;        \r
+        return STATUS_ERROR;\r
       }\r
       mFvDataInfo.BaseAddress    = TempNumber;\r
       mFvDataInfo.BaseAddressSet = TRUE;\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-b") == 0) || (stricmp (argv[0], "--blocksize") == 0)) {\r
       Status = AsciiStringToUint64 (argv[1], FALSE, &TempNumber);\r
       if (EFI_ERROR (Status)) {\r
         Error (NULL, 0, 1003, "Invalid option value", "%s = %s", argv[0], argv[1]);\r
-        return STATUS_ERROR;        \r
+        return STATUS_ERROR;\r
       }\r
       if (TempNumber == 0) {\r
         Error (NULL, 0, 1003, "Invalid option value", "Fv block size can't be be set to zero");\r
-        return STATUS_ERROR;        \r
+        return STATUS_ERROR;\r
       }\r
       mFvDataInfo.FvBlocks[0].Length = (UINT32) TempNumber;\r
       DebugMsg (NULL, 0, 9, "FV Block Size", "%s = 0x%llx", EFI_BLOCK_SIZE_STRING, (unsigned long long) TempNumber);\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-n") == 0) || (stricmp (argv[0], "--numberblock") == 0)) {\r
       Status = AsciiStringToUint64 (argv[1], FALSE, &TempNumber);\r
       if (EFI_ERROR (Status)) {\r
         Error (NULL, 0, 1003, "Invalid option value", "%s = %s", argv[0], argv[1]);\r
-        return STATUS_ERROR;        \r
+        return STATUS_ERROR;\r
       }\r
       if (TempNumber == 0) {\r
         Error (NULL, 0, 1003, "Invalid option value", "Fv block number can't be set to zero");\r
-        return STATUS_ERROR;        \r
+        return STATUS_ERROR;\r
       }\r
       mFvDataInfo.FvBlocks[0].NumBlocks = (UINT32) TempNumber;\r
       DebugMsg (NULL, 0, 9, "FV Number Block", "%s = 0x%llx", EFI_NUM_BLOCKS_STRING, (unsigned long long) TempNumber);\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((strcmp (argv[0], "-f") == 0) || (stricmp (argv[0], "--ffsfile") == 0)) {\r
@@ -348,38 +348,38 @@ Returns:
       argv += 2;\r
 \r
       if (argc > 0) {\r
-                   if ((stricmp (argv[0], "-s") == 0) || (stricmp (argv[0], "--filetakensize") == 0)) {\r
-                     if (argv[1] == NULL) {\r
-                       Error (NULL, 0, 1003, "Invalid option value", "Ffsfile Size can't be null");\r
-                       return STATUS_ERROR;\r
-                     }\r
-                     Status = AsciiStringToUint64 (argv[1], FALSE, &TempNumber);\r
-                     if (EFI_ERROR (Status)) {\r
-                       Error (NULL, 0, 1003, "Invalid option value", "%s = %s", argv[0], argv[1]);\r
-                       return STATUS_ERROR;        \r
-                     }\r
-                     mFvDataInfo.SizeofFvFiles[Index] = (UINT32) TempNumber;\r
-               DebugMsg (NULL, 0, 9, "FV component file size", "the %uth size is %s", (unsigned) Index + 1, argv[1]);\r
-               argc -= 2;\r
-               argv += 2;\r
+        if ((stricmp (argv[0], "-s") == 0) || (stricmp (argv[0], "--filetakensize") == 0)) {\r
+          if (argv[1] == NULL) {\r
+            Error (NULL, 0, 1003, "Invalid option value", "Ffsfile Size can't be null");\r
+            return STATUS_ERROR;\r
+          }\r
+          Status = AsciiStringToUint64 (argv[1], FALSE, &TempNumber);\r
+          if (EFI_ERROR (Status)) {\r
+            Error (NULL, 0, 1003, "Invalid option value", "%s = %s", argv[0], argv[1]);\r
+            return STATUS_ERROR;\r
+          }\r
+          mFvDataInfo.SizeofFvFiles[Index] = (UINT32) TempNumber;\r
+          DebugMsg (NULL, 0, 9, "FV component file size", "the %uth size is %s", (unsigned) Index + 1, argv[1]);\r
+          argc -= 2;\r
+          argv += 2;\r
         }\r
       }\r
       Index ++;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-s") == 0) || (stricmp (argv[0], "--filetakensize") == 0)) {\r
       Error (NULL, 0, 1003, "Invalid option", "It must be specified together with -f option to specify the file size.");\r
-      return STATUS_ERROR; \r
+      return STATUS_ERROR;\r
     }\r
 \r
     if ((stricmp (argv[0], "-c") == 0) || (stricmp (argv[0], "--capsule") == 0)) {\r
       CapsuleFlag = TRUE;\r
       argc --;\r
       argv ++;\r
-      continue; \r
+      continue;\r
     }\r
-  \r
+\r
     if ((strcmp (argv[0], "-F") == 0) || (stricmp (argv[0], "--force-rebase") == 0)) {\r
       if (argv[1] == NULL) {\r
         Error (NULL, 0, 1003, "Invalid option value", "Froce rebase flag can't be null");\r
@@ -397,8 +397,8 @@ Returns:
 \r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
-    } \r
+      continue;\r
+    }\r
 \r
     if (stricmp (argv[0], "--capheadsize") == 0) {\r
       //\r
@@ -407,13 +407,13 @@ Returns:
       Status = AsciiStringToUint64 (argv[1], FALSE, &TempNumber);\r
       if (EFI_ERROR (Status)) {\r
         Error (NULL, 0, 1003, "Invalid option value", "%s = %s", argv[0], argv[1]);\r
-        return STATUS_ERROR;        \r
+        return STATUS_ERROR;\r
       }\r
       mCapDataInfo.HeaderSize = (UINT32) TempNumber;\r
       DebugMsg (NULL, 0, 9, "Capsule Header size", "%s = 0x%llx", EFI_CAPSULE_HEADER_SIZE_STRING, (unsigned long long) TempNumber);\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if (stricmp (argv[0], "--capflag") == 0) {\r
@@ -437,7 +437,7 @@ Returns:
       DebugMsg (NULL, 0, 9, "Capsule Flag", argv[1]);\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if (stricmp (argv[0], "--capoemflag") == 0) {\r
@@ -468,7 +468,7 @@ Returns:
       DebugMsg (NULL, 0, 9, "Capsule Guid", "%s = %s", EFI_CAPSULE_GUID_STRING, argv[1]);\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-g") == 0) || (stricmp (argv[0], "--guid") == 0)) {\r
@@ -486,7 +486,7 @@ Returns:
       DebugMsg (NULL, 0, 9, "FV Guid", "%s = %s", EFI_FV_FILESYSTEMGUID_STRING, argv[1]);\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if (stricmp (argv[0], "--FvNameGuid") == 0) {\r
@@ -502,14 +502,14 @@ Returns:
       DebugMsg (NULL, 0, 9, "FV Name Guid", "%s = %s", EFI_FV_NAMEGUID_STRING, argv[1]);\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-p") == 0) || (stricmp (argv[0], "--dump") == 0)) {\r
       DumpCapsule = TRUE;\r
       argc --;\r
       argv ++;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-m") == 0) || (stricmp (argv[0], "--map") == 0)) {\r
@@ -520,7 +520,7 @@ Returns:
       }\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-v") == 0) || (stricmp (argv[0], "--verbose") == 0)) {\r
@@ -564,7 +564,7 @@ Returns:
   }\r
 \r
   VerboseMsg ("%s tool start.", UTILITY_NAME);\r
-  \r
+\r
   //\r
   // check input parameter, InfFileName can be NULL\r
   //\r
@@ -581,7 +581,7 @@ Returns:
   if (OutFileName != NULL) {\r
     VerboseMsg ("the output file name is %s", OutFileName);\r
   }\r
-  \r
+\r
   //\r
   // Read the INF file image\r
   //\r
@@ -591,7 +591,7 @@ Returns:
       return STATUS_ERROR;\r
     }\r
   }\r
-  \r
+\r
   if (DumpCapsule) {\r
     VerboseMsg ("Dump the capsule header information for the input capsule image %s", InfFileName);\r
     //\r
@@ -636,7 +636,7 @@ Returns:
     }\r
 \r
     Status = GenerateCapImage (\r
-              InfFileImage, \r
+              InfFileImage,\r
               InfFileSize,\r
               OutFileName\r
               );\r
@@ -667,7 +667,7 @@ Returns:
   if (InfFileImage != NULL) {\r
     free (InfFileImage);\r
   }\r
-  \r
+\r
   //\r
   //  update boot driver address and runtime driver address in address file\r
   //\r
@@ -689,7 +689,7 @@ Returns:
     fflush (FpFile);\r
     fclose (FpFile);\r
   }\r
-  \r
+\r
   if (Status == EFI_SUCCESS) {\r
     DebugMsg (NULL, 0, 9, "The Total Fv Size", "%s = 0x%x", EFI_FV_TOTAL_SIZE_STRING, (unsigned) mFvTotalSize);\r
     DebugMsg (NULL, 0, 9, "The used Fv Size", "%s = 0x%x", EFI_FV_TAKEN_SIZE_STRING, (unsigned) mFvTakenSize);\r
index 6a34b6f553649f2a110a8e0ec5ff978025863e5a..6a874f4e944fd56f6f286f1b91bfbaa78b8b6b02 100644 (file)
@@ -4,13 +4,13 @@ This file contains the internal functions required to generate a Firmware Volume
 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 Portions Copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
 Portions Copyright (c) 2016 HP Development Company, L.P.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -53,56 +53,56 @@ EFI_GUID  mDefaultCapsuleGuid                 = {0x3B6686BD, 0x0D76, 0x4030, { 0
 EFI_GUID  mEfiFfsSectionAlignmentPaddingGuid  = EFI_FFS_SECTION_ALIGNMENT_PADDING_GUID;\r
 \r
 CHAR8      *mFvbAttributeName[] = {\r
-  EFI_FVB2_READ_DISABLED_CAP_STRING, \r
-  EFI_FVB2_READ_ENABLED_CAP_STRING,  \r
-  EFI_FVB2_READ_STATUS_STRING,       \r
+  EFI_FVB2_READ_DISABLED_CAP_STRING,\r
+  EFI_FVB2_READ_ENABLED_CAP_STRING,\r
+  EFI_FVB2_READ_STATUS_STRING,\r
   EFI_FVB2_WRITE_DISABLED_CAP_STRING,\r
-  EFI_FVB2_WRITE_ENABLED_CAP_STRING, \r
-  EFI_FVB2_WRITE_STATUS_STRING,      \r
-  EFI_FVB2_LOCK_CAP_STRING,          \r
-  EFI_FVB2_LOCK_STATUS_STRING,       \r
+  EFI_FVB2_WRITE_ENABLED_CAP_STRING,\r
+  EFI_FVB2_WRITE_STATUS_STRING,\r
+  EFI_FVB2_LOCK_CAP_STRING,\r
+  EFI_FVB2_LOCK_STATUS_STRING,\r
   NULL,\r
-  EFI_FVB2_STICKY_WRITE_STRING,      \r
-  EFI_FVB2_MEMORY_MAPPED_STRING,     \r
-  EFI_FVB2_ERASE_POLARITY_STRING,    \r
-  EFI_FVB2_READ_LOCK_CAP_STRING,     \r
-  EFI_FVB2_READ_LOCK_STATUS_STRING,  \r
-  EFI_FVB2_WRITE_LOCK_CAP_STRING,    \r
-  EFI_FVB2_WRITE_LOCK_STATUS_STRING \r
+  EFI_FVB2_STICKY_WRITE_STRING,\r
+  EFI_FVB2_MEMORY_MAPPED_STRING,\r
+  EFI_FVB2_ERASE_POLARITY_STRING,\r
+  EFI_FVB2_READ_LOCK_CAP_STRING,\r
+  EFI_FVB2_READ_LOCK_STATUS_STRING,\r
+  EFI_FVB2_WRITE_LOCK_CAP_STRING,\r
+  EFI_FVB2_WRITE_LOCK_STATUS_STRING\r
 };\r
 \r
 CHAR8      *mFvbAlignmentName[] = {\r
-  EFI_FVB2_ALIGNMENT_1_STRING,   \r
-  EFI_FVB2_ALIGNMENT_2_STRING,   \r
-  EFI_FVB2_ALIGNMENT_4_STRING,   \r
-  EFI_FVB2_ALIGNMENT_8_STRING,   \r
-  EFI_FVB2_ALIGNMENT_16_STRING,  \r
-  EFI_FVB2_ALIGNMENT_32_STRING,  \r
-  EFI_FVB2_ALIGNMENT_64_STRING,  \r
-  EFI_FVB2_ALIGNMENT_128_STRING, \r
-  EFI_FVB2_ALIGNMENT_256_STRING, \r
-  EFI_FVB2_ALIGNMENT_512_STRING, \r
-  EFI_FVB2_ALIGNMENT_1K_STRING,  \r
-  EFI_FVB2_ALIGNMENT_2K_STRING,  \r
-  EFI_FVB2_ALIGNMENT_4K_STRING,  \r
-  EFI_FVB2_ALIGNMENT_8K_STRING,  \r
-  EFI_FVB2_ALIGNMENT_16K_STRING, \r
-  EFI_FVB2_ALIGNMENT_32K_STRING, \r
-  EFI_FVB2_ALIGNMENT_64K_STRING, \r
+  EFI_FVB2_ALIGNMENT_1_STRING,\r
+  EFI_FVB2_ALIGNMENT_2_STRING,\r
+  EFI_FVB2_ALIGNMENT_4_STRING,\r
+  EFI_FVB2_ALIGNMENT_8_STRING,\r
+  EFI_FVB2_ALIGNMENT_16_STRING,\r
+  EFI_FVB2_ALIGNMENT_32_STRING,\r
+  EFI_FVB2_ALIGNMENT_64_STRING,\r
+  EFI_FVB2_ALIGNMENT_128_STRING,\r
+  EFI_FVB2_ALIGNMENT_256_STRING,\r
+  EFI_FVB2_ALIGNMENT_512_STRING,\r
+  EFI_FVB2_ALIGNMENT_1K_STRING,\r
+  EFI_FVB2_ALIGNMENT_2K_STRING,\r
+  EFI_FVB2_ALIGNMENT_4K_STRING,\r
+  EFI_FVB2_ALIGNMENT_8K_STRING,\r
+  EFI_FVB2_ALIGNMENT_16K_STRING,\r
+  EFI_FVB2_ALIGNMENT_32K_STRING,\r
+  EFI_FVB2_ALIGNMENT_64K_STRING,\r
   EFI_FVB2_ALIGNMENT_128K_STRING,\r
   EFI_FVB2_ALIGNMENT_256K_STRING,\r
   EFI_FVB2_ALIGNMENT_512K_STRING,\r
-  EFI_FVB2_ALIGNMENT_1M_STRING,  \r
-  EFI_FVB2_ALIGNMENT_2M_STRING,  \r
-  EFI_FVB2_ALIGNMENT_4M_STRING,  \r
-  EFI_FVB2_ALIGNMENT_8M_STRING,  \r
-  EFI_FVB2_ALIGNMENT_16M_STRING, \r
-  EFI_FVB2_ALIGNMENT_32M_STRING, \r
-  EFI_FVB2_ALIGNMENT_64M_STRING, \r
+  EFI_FVB2_ALIGNMENT_1M_STRING,\r
+  EFI_FVB2_ALIGNMENT_2M_STRING,\r
+  EFI_FVB2_ALIGNMENT_4M_STRING,\r
+  EFI_FVB2_ALIGNMENT_8M_STRING,\r
+  EFI_FVB2_ALIGNMENT_16M_STRING,\r
+  EFI_FVB2_ALIGNMENT_32M_STRING,\r
+  EFI_FVB2_ALIGNMENT_64M_STRING,\r
   EFI_FVB2_ALIGNMENT_128M_STRING,\r
   EFI_FVB2_ALIGNMENT_256M_STRING,\r
   EFI_FVB2_ALIGNMENT_512M_STRING,\r
-  EFI_FVB2_ALIGNMENT_1G_STRING,  \r
+  EFI_FVB2_ALIGNMENT_1G_STRING,\r
   EFI_FVB2_ALIGNMENT_2G_STRING\r
 };\r
 \r
@@ -258,7 +258,7 @@ Returns:
     //\r
     strcpy (FvInfo->FvName, Value);\r
   }\r
-  \r
+\r
   //\r
   // Read Fv Attribute\r
   //\r
@@ -409,7 +409,7 @@ UpdateFfsFileState (
 Routine Description:\r
 \r
   This function changes the FFS file attributes based on the erase polarity\r
-  of the FV. Update the reserved bits of State to EFI_FVB2_ERASE_POLARITY. \r
+  of the FV. Update the reserved bits of State to EFI_FVB2_ERASE_POLARITY.\r
 \r
 Arguments:\r
 \r
@@ -586,7 +586,7 @@ Arguments:
                   The current offset must be valid.\r
   DataAlignment   The data alignment of the next FFS file.\r
   FvEnd           End of the empty data in FvImage.\r
-  ExtHeader       PI FvExtHeader Optional \r
+  ExtHeader       PI FvExtHeader Optional\r
 \r
 Returns:\r
 \r
@@ -723,12 +723,12 @@ Returns:
     }\r
     memcpy ((UINT8 *)PadFile + CurFfsHeaderSize, ExtHeader, ExtHeader->ExtHeaderSize);\r
     ((EFI_FIRMWARE_VOLUME_HEADER *) FvImage->FileImage)->ExtHeaderOffset = (UINT16) ((UINTN) ((UINT8 *)PadFile + CurFfsHeaderSize) - (UINTN) FvImage->FileImage);\r
-         //\r
-         // Make next file start at QWord Boundry\r
-         //\r
-         while (((UINTN) FvImage->CurrentFilePointer & (EFI_FFS_FILE_HEADER_ALIGNMENT - 1)) != 0) {\r
-           FvImage->CurrentFilePointer++;\r
-         }\r
+    //\r
+    // Make next file start at QWord Boundry\r
+    //\r
+    while (((UINTN) FvImage->CurrentFilePointer & (EFI_FFS_FILE_HEADER_ALIGNMENT - 1)) != 0) {\r
+      FvImage->CurrentFilePointer++;\r
+    }\r
   }\r
 \r
   return EFI_SUCCESS;\r
@@ -766,7 +766,7 @@ EFI_STATUS
 WriteMapFile (\r
   IN OUT FILE                  *FvMapFile,\r
   IN     CHAR8                 *FileName,\r
-  IN     EFI_FFS_FILE_HEADER   *FfsFile, \r
+  IN     EFI_FFS_FILE_HEADER   *FfsFile,\r
   IN     EFI_PHYSICAL_ADDRESS  ImageBaseAddress,\r
   IN     PE_COFF_LOADER_IMAGE_CONTEXT *pImageContext\r
   )\r
@@ -817,19 +817,19 @@ Returns:
   //\r
   FunctionType = 0;\r
   //\r
-  // Print FileGuid to string buffer. \r
+  // Print FileGuid to string buffer.\r
   //\r
   PrintGuidToBuffer (&FfsFile->Name, (UINT8 *)FileGuidName, MAX_LINE_LEN, TRUE);\r
-  \r
+\r
   //\r
-  // Construct Map file Name \r
+  // Construct Map file Name\r
   //\r
   if (strlen (FileName) >= MAX_LONG_FILE_PATH) {\r
     return EFI_ABORTED;\r
   }\r
   strncpy (PeMapFileName, FileName, MAX_LONG_FILE_PATH - 1);\r
   PeMapFileName[MAX_LONG_FILE_PATH - 1] = 0;\r
-  \r
+\r
   //\r
   // Change '\\' to '/', unified path format.\r
   //\r
@@ -840,10 +840,10 @@ Returns:
     }\r
     Cptr ++;\r
   }\r
-  \r
+\r
   //\r
   // Get Map file\r
-  // \r
+  //\r
   Cptr = PeMapFileName + strlen (PeMapFileName);\r
   while ((*Cptr != '.') && (Cptr >= PeMapFileName)) {\r
     Cptr --;\r
@@ -864,30 +864,30 @@ Returns:
   while ((*Cptr != FILE_SEP_CHAR) && (Cptr >= PeMapFileName)) {\r
     Cptr --;\r
   }\r
-       *Cptr2 = '\0';\r
+  *Cptr2 = '\0';\r
   if (strlen (Cptr + 1) >= MAX_LINE_LEN) {\r
     return EFI_ABORTED;\r
   }\r
   strncpy (KeyWord, Cptr + 1, MAX_LINE_LEN - 1);\r
   KeyWord[MAX_LINE_LEN - 1] = 0;\r
-       *Cptr2 = '.';\r
+  *Cptr2 = '.';\r
 \r
   //\r
   // AddressOfEntryPoint and Offset in Image\r
   //\r
   if (!pImageContext->IsTeImage) {\r
-       ImgHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *) ((UINT8 *) pImageContext->Handle + pImageContext->PeCoffHeaderOffset);\r
-       AddressOfEntryPoint = ImgHdr->Pe32.OptionalHeader.AddressOfEntryPoint;\r
-       Offset = 0;\r
+    ImgHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *) ((UINT8 *) pImageContext->Handle + pImageContext->PeCoffHeaderOffset);\r
+    AddressOfEntryPoint = ImgHdr->Pe32.OptionalHeader.AddressOfEntryPoint;\r
+    Offset = 0;\r
     SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (\r
                        (UINT8 *) ImgHdr +\r
-                       sizeof (UINT32) + \r
-                       sizeof (EFI_IMAGE_FILE_HEADER) +  \r
+                       sizeof (UINT32) +\r
+                       sizeof (EFI_IMAGE_FILE_HEADER) +\r
                        ImgHdr->Pe32.FileHeader.SizeOfOptionalHeader\r
                        );\r
     Index = ImgHdr->Pe32.FileHeader.NumberOfSections;\r
   } else {\r
-       TEImageHeader = (EFI_TE_IMAGE_HEADER *) pImageContext->Handle;\r
+    TEImageHeader = (EFI_TE_IMAGE_HEADER *) pImageContext->Handle;\r
     AddressOfEntryPoint = TEImageHeader->AddressOfEntryPoint;\r
     Offset = TEImageHeader->StrippedSize - sizeof (EFI_TE_IMAGE_HEADER);\r
     SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (TEImageHeader + 1);\r
@@ -907,31 +907,31 @@ Returns:
 \r
   if (FfsFile->Type != EFI_FV_FILETYPE_SECURITY_CORE && pImageContext->Machine == EFI_IMAGE_MACHINE_IA64) {\r
     //\r
-    // Process IPF PLABEL to get the real address after the image has been rebased. \r
+    // Process IPF PLABEL to get the real address after the image has been rebased.\r
     // PLABEL structure is got by AddressOfEntryPoint offset to ImageBuffer stored in pImageContext->Handle.\r
     //\r
     fprintf (FvMapFile, "EntryPoint=0x%010llx", (unsigned long long) (*(UINT64 *)((UINTN) pImageContext->Handle + (UINTN) AddressOfEntryPoint)));\r
   } else {\r
     fprintf (FvMapFile, "EntryPoint=0x%010llx", (unsigned long long) (ImageBaseAddress + AddressOfEntryPoint));\r
   }\r
-  fprintf (FvMapFile, ")\n"); \r
-  \r
+  fprintf (FvMapFile, ")\n");\r
+\r
   fprintf (FvMapFile, "(GUID=%s", FileGuidName);\r
   TextVirtualAddress = 0;\r
   DataVirtualAddress = 0;\r
   for (; Index > 0; Index --, SectionHeader ++) {\r
     if (stricmp ((CHAR8 *)SectionHeader->Name, ".text") == 0) {\r
-               TextVirtualAddress = SectionHeader->VirtualAddress;\r
-       } else if (stricmp ((CHAR8 *)SectionHeader->Name, ".data") == 0) {\r
-         DataVirtualAddress = SectionHeader->VirtualAddress;\r
-       } else if (stricmp ((CHAR8 *)SectionHeader->Name, ".sdata") == 0) {\r
-         DataVirtualAddress = SectionHeader->VirtualAddress;\r
-       }\r
+      TextVirtualAddress = SectionHeader->VirtualAddress;\r
+    } else if (stricmp ((CHAR8 *)SectionHeader->Name, ".data") == 0) {\r
+      DataVirtualAddress = SectionHeader->VirtualAddress;\r
+    } else if (stricmp ((CHAR8 *)SectionHeader->Name, ".sdata") == 0) {\r
+      DataVirtualAddress = SectionHeader->VirtualAddress;\r
+    }\r
   }\r
   fprintf (FvMapFile, " .textbaseaddress=0x%010llx", (unsigned long long) (ImageBaseAddress + TextVirtualAddress));\r
   fprintf (FvMapFile, " .databaseaddress=0x%010llx", (unsigned long long) (ImageBaseAddress + DataVirtualAddress));\r
   fprintf (FvMapFile, ")\n\n");\r
-   \r
+\r
   //\r
   // Open PeMapFile\r
   //\r
@@ -941,7 +941,7 @@ Returns:
     return EFI_ABORTED;\r
   }\r
   VerboseMsg ("The map file is %s", PeMapFileName);\r
-  \r
+\r
   //\r
   // Output Functions information into Fv Map file\r
   //\r
@@ -956,7 +956,7 @@ Returns:
     }\r
     //\r
     // By Address and Static keyword\r
-    //  \r
+    //\r
     if (FunctionType == 0) {\r
       sscanf (Line, "%s", KeyWord);\r
       if (stricmp (KeyWord, "Address") == 0) {\r
@@ -1001,7 +1001,7 @@ Returns:
   //\r
   fprintf (FvMapFile, "\n\n");\r
   fclose (PeMapFile);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -1196,7 +1196,7 @@ Returns:
   EFI_STATUS            Status;\r
   UINTN                 Index1;\r
   UINT8                 FileGuidString[PRINTED_GUID_BUFFER_SIZE];\r
-  \r
+\r
   Index1 = 0;\r
   //\r
   // Verify input parameters.\r
@@ -1236,7 +1236,7 @@ Returns:
   // Done with the file, from this point on we will just use the buffer read.\r
   //\r
   fclose (NewFile);\r
-  \r
+\r
   //\r
   // Verify read successful\r
   //\r
@@ -1245,20 +1245,20 @@ Returns:
     Error (NULL, 0, 0004, "Error reading file", FvInfo->FvFiles[Index]);\r
     return EFI_ABORTED;\r
   }\r
-  \r
+\r
   //\r
   // For None PI Ffs file, directly add them into FvImage.\r
   //\r
   if (!FvInfo->IsPiFvImage) {\r
     memcpy (FvImage->CurrentFilePointer, FileBuffer, FileSize);\r
     if (FvInfo->SizeofFvFiles[Index] > FileSize) {\r
-       FvImage->CurrentFilePointer += FvInfo->SizeofFvFiles[Index];\r
+      FvImage->CurrentFilePointer += FvInfo->SizeofFvFiles[Index];\r
     } else {\r
-       FvImage->CurrentFilePointer += FileSize;\r
+      FvImage->CurrentFilePointer += FileSize;\r
     }\r
     goto Done;\r
   }\r
-  \r
+\r
   //\r
   // Verify Ffs file\r
   //\r
@@ -1303,7 +1303,7 @@ Returns:
   // Check if alignment is required\r
   //\r
   ReadFfsAlignment ((EFI_FFS_FILE_HEADER *) FileBuffer, &CurrentFileAlignment);\r
-  \r
+\r
   //\r
   // Find the largest alignment of all the FFS files in the FV\r
   //\r
@@ -1328,20 +1328,20 @@ Returns:
         return EFI_ABORTED;\r
       }\r
       //\r
-      // Rebase the PE or TE image in FileBuffer of FFS file for XIP \r
+      // Rebase the PE or TE image in FileBuffer of FFS file for XIP\r
       // Rebase for the debug genfvmap tool\r
       //\r
       Status = FfsRebase (FvInfo, FvInfo->FvFiles[Index], (EFI_FFS_FILE_HEADER *) FileBuffer, (UINTN) *VtfFileImage - (UINTN) FvImage->FileImage, FvMapFile);\r
       if (EFI_ERROR (Status)) {\r
         Error (NULL, 0, 3000, "Invalid", "Could not rebase %s.", FvInfo->FvFiles[Index]);\r
         return Status;\r
-      }          \r
+      }\r
       //\r
       // copy VTF File\r
       //\r
       memcpy (*VtfFileImage, FileBuffer, FileSize);\r
-      \r
-      PrintGuidToBuffer ((EFI_GUID *) FileBuffer, FileGuidString, sizeof (FileGuidString), TRUE); \r
+\r
+      PrintGuidToBuffer ((EFI_GUID *) FileBuffer, FileGuidString, sizeof (FileGuidString), TRUE);\r
       fprintf (FvReportFile, "0x%08X %s\n", (unsigned)(UINTN) (((UINT8 *)*VtfFileImage) - (UINTN)FvImage->FileImage), FileGuidString);\r
 \r
       free (FileBuffer);\r
@@ -1374,19 +1374,19 @@ Returns:
   //\r
   if ((UINTN) (FvImage->CurrentFilePointer + FileSize) <= (UINTN) (*VtfFileImage)) {\r
     //\r
-    // Rebase the PE or TE image in FileBuffer of FFS file for XIP. \r
+    // Rebase the PE or TE image in FileBuffer of FFS file for XIP.\r
     // Rebase Bs and Rt drivers for the debug genfvmap tool.\r
     //\r
     Status = FfsRebase (FvInfo, FvInfo->FvFiles[Index], (EFI_FFS_FILE_HEADER *) FileBuffer, (UINTN) FvImage->CurrentFilePointer - (UINTN) FvImage->FileImage, FvMapFile);\r
-       if (EFI_ERROR (Status)) {\r
-         Error (NULL, 0, 3000, "Invalid", "Could not rebase %s.", FvInfo->FvFiles[Index]);\r
-         return Status;\r
-       }               \r
+  if (EFI_ERROR (Status)) {\r
+    Error (NULL, 0, 3000, "Invalid", "Could not rebase %s.", FvInfo->FvFiles[Index]);\r
+    return Status;\r
+  }\r
     //\r
     // Copy the file\r
     //\r
     memcpy (FvImage->CurrentFilePointer, FileBuffer, FileSize);\r
-    PrintGuidToBuffer ((EFI_GUID *) FileBuffer, FileGuidString, sizeof (FileGuidString), TRUE); \r
+    PrintGuidToBuffer ((EFI_GUID *) FileBuffer, FileGuidString, sizeof (FileGuidString), TRUE);\r
     fprintf (FvReportFile, "0x%08X %s\n", (unsigned) (FvImage->CurrentFilePointer - FvImage->FileImage), FileGuidString);\r
     FvImage->CurrentFilePointer += FileSize;\r
   } else {\r
@@ -1401,7 +1401,7 @@ Returns:
     FvImage->CurrentFilePointer++;\r
   }\r
 \r
-Done: \r
+Done:\r
   //\r
   // Free allocated memory.\r
   //\r
@@ -1458,7 +1458,7 @@ Returns:
   PadFile = (EFI_FFS_FILE_HEADER *) FvImage->CurrentFilePointer;\r
 \r
   //\r
-  // write PadFile FFS header with PadType, don't need to set PAD file guid in its header. \r
+  // write PadFile FFS header with PadType, don't need to set PAD file guid in its header.\r
   //\r
   PadFile->Type       = EFI_FV_FILETYPE_FFS_PAD;\r
   PadFile->Attributes = 0;\r
@@ -1629,7 +1629,7 @@ Returns:
   if (EFI_ERROR (Status)) {\r
     Error (NULL, 0, 3000, "Invalid", "could not get the PE32 entry point for the SEC core.");\r
     return EFI_ABORTED;\r
-  }  \r
+  }\r
 \r
   if (\r
        Vtf0Detected &&\r
@@ -1650,7 +1650,7 @@ Returns:
   SecCorePhysicalAddress = FvInfo->BaseAddress;\r
   SecCorePhysicalAddress += (UINTN) Pe32Section.Pe32Section + SecHeaderSize - (UINTN) FvImage->FileImage;\r
   SecCorePhysicalAddress += EntryPoint;\r
-  DebugMsg (NULL, 0, 9, "SecCore physical entry point address", "Address = 0x%llX", (unsigned long long) SecCorePhysicalAddress); \r
+  DebugMsg (NULL, 0, 9, "SecCore physical entry point address", "Address = 0x%llX", (unsigned long long) SecCorePhysicalAddress);\r
 \r
   //\r
   // Find the PEI Core\r
@@ -1758,18 +1758,18 @@ Returns:
     // Write lower 32 bits of physical address for Pei Core entry\r
     //\r
     *Ia32ResetAddressPtr = (UINT32) PeiCorePhysicalAddress;\r
-    \r
+\r
     //\r
     // Write SecCore Entry point relative address into the jmp instruction in reset vector.\r
-    // \r
+    //\r
     Ia32ResetAddressPtr  = (UINT32 *) ((UINTN) FvImage->Eof - IA32_SEC_CORE_ENTRY_OFFSET);\r
-    \r
+\r
     Ia32SecEntryOffset   = (INT32) (SecCorePhysicalAddress - (FV_IMAGES_TOP_ADDRESS - IA32_SEC_CORE_ENTRY_OFFSET + 2));\r
     if (Ia32SecEntryOffset <= -65536) {\r
       Error (NULL, 0, 3000, "Invalid", "The SEC EXE file size is too large, it must be less than 64K.");\r
       return STATUS_ERROR;\r
     }\r
-    \r
+\r
     *(UINT16 *) Ia32ResetAddressPtr = (UINT16) Ia32SecEntryOffset;\r
 \r
     //\r
@@ -1819,9 +1819,9 @@ Returns:
     //\r
     WordPointer   = (UINT16 *) (BytePointer + SIZEOF_STARTUP_DATA_ARRAY - 2);\r
     *WordPointer  = (UINT16) (0x10000 - (UINT32) CheckSum);\r
-    \r
+\r
     //\r
-    // IpiVector at the 4k aligned address in the top 2 blocks in the PEI FV. \r
+    // IpiVector at the 4k aligned address in the top 2 blocks in the PEI FV.\r
     //\r
     IpiVector  = (UINT32) (FV_IMAGES_TOP_ADDRESS - ((UINTN) FvImage->Eof - (UINTN) BytePointer));\r
     DebugMsg (NULL, 0, 9, "Startup AP Vector address", "IpiVector at 0x%X", (unsigned) IpiVector);\r
@@ -2120,15 +2120,15 @@ UpdateArmResetVectorIfNeeded (
 /*++\r
 \r
 Routine Description:\r
-  This parses the FV looking for SEC and patches that address into the \r
+  This parses the FV looking for SEC and patches that address into the\r
   beginning of the FV header.\r
 \r
   For ARM32 the reset vector is at 0x00000000 or 0xFFFF0000.\r
   For AArch64 the reset vector is at 0x00000000.\r
 \r
-  This would commonly map to the first entry in the ROM. \r
+  This would commonly map to the first entry in the ROM.\r
   ARM32 Exceptions:\r
-  Reset            +0    \r
+  Reset            +0\r
   Undefined        +4\r
   SWI              +8\r
   Prefetch Abort   +12\r
@@ -2138,15 +2138,15 @@ Routine Description:
 \r
   We support two schemes on ARM.\r
   1) Beginning of the FV is the reset vector\r
-  2) Reset vector is data bytes FDF file and that code branches to reset vector \r
+  2) Reset vector is data bytes FDF file and that code branches to reset vector\r
     in the beginning of the FV (fixed size offset).\r
 \r
   Need to have the jump for the reset vector at location zero.\r
   We also need to store the address or PEI (if it exists).\r
-  We stub out a return from interrupt in case the debugger \r
+  We stub out a return from interrupt in case the debugger\r
    is using SWI (not done for AArch64, not enough space in struct).\r
-  The optional entry to the common exception handler is \r
-   to support full featured exception handling from ROM and is currently \r
+  The optional entry to the common exception handler is\r
+   to support full featured exception handling from ROM and is currently\r
     not support by this tool.\r
 \r
 Arguments:\r
@@ -2243,7 +2243,7 @@ Returns:
     // 1 - PEI Entry Point\r
     // 2 - movs pc,lr for a SWI handler\r
     // 3 - Place holder for Common Exception Handler\r
-    UINT32                      ResetVector[4]; \r
+    UINT32                      ResetVector[4];\r
 \r
     memset(ResetVector, 0, sizeof (ResetVector));\r
 \r
@@ -2356,8 +2356,8 @@ GetPe32Info (
 \r
 Routine Description:\r
 \r
-  Retrieves the PE32 entry point offset and machine type from PE image or TeImage.  \r
-  See EfiImage.h for machine types.  The entry point offset is from the beginning \r
+  Retrieves the PE32 entry point offset and machine type from PE image or TeImage.\r
+  See EfiImage.h for machine types.  The entry point offset is from the beginning\r
   of the PE32 buffer passed in.\r
 \r
 Arguments:\r
@@ -2399,13 +2399,13 @@ Returns:
     *BaseOfCode   = TeHeader->BaseOfCode + sizeof (EFI_TE_IMAGE_HEADER) - TeHeader->StrippedSize;\r
     *MachineType  = TeHeader->Machine;\r
   } else {\r
-  \r
+\r
     //\r
-    // Then check whether \r
+    // Then check whether\r
     // First is the DOS header\r
     //\r
     DosHeader = (EFI_IMAGE_DOS_HEADER *) Pe32;\r
-  \r
+\r
     //\r
     // Verify DOS header is expected\r
     //\r
@@ -2417,7 +2417,7 @@ Returns:
     // Immediately following is the NT header.\r
     //\r
     ImgHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *) ((UINTN) Pe32 + DosHeader->e_lfanew);\r
-  \r
+\r
     //\r
     // Verify NT header is expected\r
     //\r
@@ -2436,7 +2436,7 @@ Returns:
   //\r
   // Verify machine type is supported\r
   //\r
-  if ((*MachineType != EFI_IMAGE_MACHINE_IA32) && (*MachineType != EFI_IMAGE_MACHINE_IA64) && (*MachineType != EFI_IMAGE_MACHINE_X64) && (*MachineType != EFI_IMAGE_MACHINE_EBC) && \r
+  if ((*MachineType != EFI_IMAGE_MACHINE_IA32) && (*MachineType != EFI_IMAGE_MACHINE_IA64) && (*MachineType != EFI_IMAGE_MACHINE_X64) && (*MachineType != EFI_IMAGE_MACHINE_EBC) &&\r
       (*MachineType != EFI_IMAGE_MACHINE_ARMT) && (*MachineType != EFI_IMAGE_MACHINE_AARCH64)) {\r
     Error (NULL, 0, 3000, "Invalid", "Unrecognized machine type in the PE32 file.");\r
     return EFI_UNSUPPORTED;\r
@@ -2506,7 +2506,7 @@ Returns:
     InfMemoryFile.FileImage           = InfFileImage;\r
     InfMemoryFile.CurrentFilePointer  = InfFileImage;\r
     InfMemoryFile.Eof                 = InfFileImage + InfFileSize;\r
-  \r
+\r
     //\r
     // Parse the FV inf file for header information\r
     //\r
@@ -2528,17 +2528,17 @@ Returns:
     Error (NULL, 0, 1001, "Missing option", "Output file name");\r
     return EFI_ABORTED;\r
   }\r
-  \r
+\r
   if (mFvDataInfo.FvBlocks[0].Length == 0) {\r
     Error (NULL, 0, 1001, "Missing required argument", "Block Size");\r
     return EFI_ABORTED;\r
   }\r
-  \r
+\r
   //\r
   // Debug message Fv File System Guid\r
   //\r
   if (mFvDataInfo.FvFileSystemGuidSet) {\r
-    DebugMsg (NULL, 0, 9, "FV File System Guid", "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", \r
+    DebugMsg (NULL, 0, 9, "FV File System Guid", "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",\r
                   (unsigned) mFvDataInfo.FvFileSystemGuid.Data1,\r
                   mFvDataInfo.FvFileSystemGuid.Data2,\r
                   mFvDataInfo.FvFileSystemGuid.Data3,\r
@@ -2611,7 +2611,7 @@ Returns:
   // Debug message Fv Name Guid\r
   //\r
   if (mFvDataInfo.FvNameGuidSet) {\r
-      DebugMsg (NULL, 0, 9, "FV Name Guid", "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", \r
+      DebugMsg (NULL, 0, 9, "FV Name Guid", "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",\r
                   (unsigned) mFvDataInfo.FvNameGuid.Data1,\r
                   mFvDataInfo.FvNameGuid.Data2,\r
                   mFvDataInfo.FvNameGuid.Data3,\r
@@ -2695,7 +2695,7 @@ Returns:
     goto Finish;\r
   }\r
   VerboseMsg ("the generated FV image size is %u bytes", (unsigned) mFvDataInfo.Size);\r
-  \r
+\r
   //\r
   // support fv image and empty fv image\r
   //\r
@@ -2716,7 +2716,7 @@ Returns:
   //\r
   if (mFvDataInfo.FvAttributes == 0) {\r
     //\r
-    // Set Default Fv Attribute \r
+    // Set Default Fv Attribute\r
     //\r
     mFvDataInfo.FvAttributes = FV_DEFAULT_ATTRIBUTE;\r
   }\r
@@ -2747,7 +2747,7 @@ Returns:
   FvHeader->Revision        = EFI_FVH_REVISION;\r
   FvHeader->ExtHeaderOffset = 0;\r
   FvHeader->Reserved[0]     = 0;\r
-  \r
+\r
   //\r
   // Copy firmware block map\r
   //\r
@@ -2802,7 +2802,7 @@ Returns:
     Status = EFI_ABORTED;\r
     goto Finish;\r
   }\r
-  \r
+\r
   //\r
   // Open FvReport file\r
   //\r
@@ -2883,7 +2883,7 @@ Returns:
     if (!mArm) {\r
       //\r
       // Update reset vector (SALE_ENTRY for IPF)\r
-      // Now for IA32 and IA64 platform, the fv which has bsf file must have the \r
+      // Now for IA32 and IA64 platform, the fv which has bsf file must have the\r
       // EndAddress of 0xFFFFFFFF (unless the section was rebased).\r
       // Thus, only this type fv needs to update the  reset vector.\r
       // If the PEI Core is found, the VTF file will probably get\r
@@ -2892,29 +2892,29 @@ Returns:
       if (mFvDataInfo.ForceRebase == 1 ||\r
           (mFvDataInfo.BaseAddress + mFvDataInfo.Size) == FV_IMAGES_TOP_ADDRESS) {\r
         Status = UpdateResetVector (&FvImageMemoryFile, &mFvDataInfo, VtfFileImage);\r
-        if (EFI_ERROR(Status)) {                                               \r
+        if (EFI_ERROR(Status)) {\r
           Error (NULL, 0, 3000, "Invalid", "Could not update the reset vector.");\r
-          goto Finish;                                              \r
+          goto Finish;\r
         }\r
         DebugMsg (NULL, 0, 9, "Update Reset vector in VTF file", NULL);\r
       }\r
     }\r
-  } \r
+  }\r
 \r
   if (mArm) {\r
     Status = UpdateArmResetVectorIfNeeded (&FvImageMemoryFile, &mFvDataInfo);\r
-    if (EFI_ERROR (Status)) {                                               \r
+    if (EFI_ERROR (Status)) {\r
       Error (NULL, 0, 3000, "Invalid", "Could not update the reset vector.");\r
-      goto Finish;                                              \r
-    }  \r
-    \r
+      goto Finish;\r
+    }\r
+\r
     //\r
     // Update Checksum for FvHeader\r
     //\r
     FvHeader->Checksum = 0;\r
     FvHeader->Checksum = CalculateChecksum16 ((UINT16 *) FvHeader, FvHeader->HeaderLength / sizeof (UINT16));\r
   }\r
-  \r
+\r
   //\r
   // Update FV Alignment attribute to the largest alignment of all the FFS files in the FV\r
   //\r
@@ -2937,7 +2937,7 @@ Returns:
     FvHeader->Checksum      = CalculateChecksum16 ((UINT16 *) FvHeader, FvHeader->HeaderLength / sizeof (UINT16));\r
   }\r
 \r
-WriteFile: \r
+WriteFile:\r
   //\r
   // Write fv file\r
   //\r
@@ -2970,12 +2970,12 @@ Finish:
   if (FvReportName != NULL) {\r
     free (FvReportName);\r
   }\r
-  \r
+\r
   if (FvFile != NULL) {\r
     fflush (FvFile);\r
     fclose (FvFile);\r
   }\r
-  \r
+\r
   if (FvMapFile != NULL) {\r
     fflush (FvMapFile);\r
     fclose (FvMapFile);\r
@@ -3084,7 +3084,7 @@ Returns:
   UINT32              FfsHeaderSize;\r
   EFI_FFS_FILE_HEADER FfsHeader;\r
   UINTN               VtfFileSize;\r
-  \r
+\r
   FvExtendHeaderSize = 0;\r
   VtfFileSize = 0;\r
   fpin  = NULL;\r
@@ -3097,19 +3097,19 @@ Returns:
   for (Index = 0; FvInfoPtr->FvBlocks[Index].NumBlocks > 0 && FvInfoPtr->FvBlocks[Index].Length > 0; Index++) {\r
     FvInfoPtr->Size += FvInfoPtr->FvBlocks[Index].NumBlocks * FvInfoPtr->FvBlocks[Index].Length;\r
   }\r
-  \r
+\r
   //\r
   // Calculate the required sizes for all FFS files.\r
   //\r
   CurrentOffset = sizeof (EFI_FIRMWARE_VOLUME_HEADER);\r
-  \r
+\r
   for (Index = 1;; Index ++) {\r
     CurrentOffset += sizeof (EFI_FV_BLOCK_MAP_ENTRY);\r
     if (FvInfoPtr->FvBlocks[Index].NumBlocks == 0 || FvInfoPtr->FvBlocks[Index].Length == 0) {\r
       break;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Calculate PI extension header\r
   //\r
@@ -3164,7 +3164,7 @@ Returns:
     // close file\r
     //\r
     fclose (fpin);\r
-    \r
+\r
     if (FvInfoPtr->IsPiFvImage) {\r
         //\r
         // Check whether this ffs file is vtf file\r
@@ -3183,7 +3183,7 @@ Returns:
       }\r
 \r
       //\r
-      // Get the alignment of FFS file \r
+      // Get the alignment of FFS file\r
       //\r
       ReadFfsAlignment (&FfsHeader, &FfsAlignment);\r
       FfsAlignment = 1 << FfsAlignment;\r
@@ -3197,28 +3197,28 @@ Returns:
         CurrentOffset = (CurrentOffset + FfsHeaderSize + sizeof(EFI_FFS_FILE_HEADER) + FfsAlignment - 1) & ~(FfsAlignment - 1);\r
         CurrentOffset -= FfsHeaderSize;\r
       }\r
-         }\r
+    }\r
 \r
     //\r
     // Add ffs file size\r
     //\r
     if (FvInfoPtr->SizeofFvFiles[Index] > FfsFileSize) {\r
-       CurrentOffset += FvInfoPtr->SizeofFvFiles[Index];\r
+      CurrentOffset += FvInfoPtr->SizeofFvFiles[Index];\r
     } else {\r
-       CurrentOffset += FfsFileSize;\r
+      CurrentOffset += FfsFileSize;\r
     }\r
-       \r
+\r
     //\r
     // Make next ffs file start at QWord Boundry\r
     //\r
     if (FvInfoPtr->IsPiFvImage) {\r
-       CurrentOffset = (CurrentOffset + EFI_FFS_FILE_HEADER_ALIGNMENT - 1) & ~(EFI_FFS_FILE_HEADER_ALIGNMENT - 1);\r
+      CurrentOffset = (CurrentOffset + EFI_FFS_FILE_HEADER_ALIGNMENT - 1) & ~(EFI_FFS_FILE_HEADER_ALIGNMENT - 1);\r
     }\r
   }\r
   CurrentOffset += VtfFileSize;\r
   DebugMsg (NULL, 0, 9, "FvImage size", "The calculated fv image size is 0x%x and the current set fv image size is 0x%x", (unsigned) CurrentOffset, (unsigned) FvInfoPtr->Size);\r
-  \r
-  if (FvInfoPtr->Size == 0) { \r
+\r
+  if (FvInfoPtr->Size == 0) {\r
     //\r
     // Update FvInfo data\r
     //\r
@@ -3233,7 +3233,7 @@ Returns:
     Error (NULL, 0, 3000, "Invalid", "the required fv image size 0x%x exceeds the set fv image size 0x%x", (unsigned) CurrentOffset, (unsigned) FvInfoPtr->Size);\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Set Fv Size Information\r
   //\r
@@ -3288,7 +3288,7 @@ Returns:
 \r
 EFI_STATUS\r
 GetChildFvFromFfs (\r
-  IN      FV_INFO               *FvInfo, \r
+  IN      FV_INFO               *FvInfo,\r
   IN      EFI_FFS_FILE_HEADER   *FfsFile,\r
   IN      UINTN                 XipOffset\r
   )\r
@@ -3319,7 +3319,7 @@ Returns:
 \r
   for (Index = 1;; Index++) {\r
     //\r
-    // Find FV section \r
+    // Find FV section\r
     //\r
     Status = GetSectionByType (FfsFile, EFI_SECTION_FIRMWARE_VOLUME_IMAGE, Index, &SubFvSection);\r
     if (EFI_ERROR (Status)) {\r
@@ -3361,9 +3361,9 @@ Returns:
 }\r
 \r
 EFI_STATUS\r
-FfsRebase ( \r
-  IN OUT  FV_INFO               *FvInfo, \r
-  IN      CHAR8                 *FileName,           \r
+FfsRebase (\r
+  IN OUT  FV_INFO               *FvInfo,\r
+  IN      CHAR8                 *FileName,\r
   IN OUT  EFI_FFS_FILE_HEADER   *FfsFile,\r
   IN      UINTN                 XipOffset,\r
   IN      FILE                  *FvMapFile\r
@@ -3376,7 +3376,7 @@ Routine Description:
   rebase any PE32 sections found in the file using the base address.\r
 \r
 Arguments:\r
-  \r
+\r
   FvInfo            A pointer to FV_INFO struture.\r
   FileName          Ffs File PathName\r
   FfsFile           A pointer to Ffs file image.\r
@@ -3395,7 +3395,7 @@ Returns:
 {\r
   EFI_STATUS                            Status;\r
   PE_COFF_LOADER_IMAGE_CONTEXT          ImageContext;\r
-  PE_COFF_LOADER_IMAGE_CONTEXT          OrigImageContext;  \r
+  PE_COFF_LOADER_IMAGE_CONTEXT          OrigImageContext;\r
   EFI_PHYSICAL_ADDRESS                  XipBase;\r
   EFI_PHYSICAL_ADDRESS                  NewPe32BaseAddress;\r
   UINTN                                 Index;\r
@@ -3414,7 +3414,7 @@ Returns:
   UINT32                                FfsHeaderSize;\r
   UINT32                                CurSecHdrSize;\r
 \r
-  Index              = 0;  \r
+  Index              = 0;\r
   MemoryImagePointer = NULL;\r
   TEImageHeader      = NULL;\r
   ImgHdr             = NULL;\r
@@ -3429,7 +3429,7 @@ Returns:
   if ((FvInfo->BaseAddress == 0) && (FvInfo->ForceRebase == -1)) {\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // If ForceRebase Flag specified to FALSE, will always not take rebase action.\r
   //\r
@@ -3475,7 +3475,7 @@ Returns:
     // Init Value\r
     //\r
     NewPe32BaseAddress = 0;\r
-    \r
+\r
     //\r
     // Find Pe Image\r
     //\r
@@ -3506,7 +3506,7 @@ Returns:
     // Keep Image Context for PE image in FV\r
     //\r
     memcpy (&OrigImageContext, &ImageContext, sizeof (ImageContext));\r
-    \r
+\r
     //\r
     // Get File PdbPointer\r
     //\r
@@ -3536,11 +3536,11 @@ Returns:
           return EFI_ABORTED;\r
         }\r
         //\r
-        // PeImage has no reloc section. It will try to get reloc data from the original EFI image. \r
+        // PeImage has no reloc section. It will try to get reloc data from the original EFI image.\r
         //\r
         if (ImageContext.RelocationsStripped) {\r
           //\r
-          // Construct the original efi file Name \r
+          // Construct the original efi file Name\r
           //\r
           if (strlen (FileName) >= MAX_LONG_FILE_PATH) {\r
             Error (NULL, 0, 2000, "Invalid", "The file name %s is too long.", FileName);\r
@@ -3622,7 +3622,7 @@ Returns:
         //\r
         return EFI_SUCCESS;\r
     }\r
-    \r
+\r
     //\r
     // Relocation doesn't exist\r
     //\r
@@ -3644,14 +3644,14 @@ Returns:
     }\r
     memset ((VOID *) MemoryImagePointer, 0, (UINTN) ImageContext.ImageSize + ImageContext.SectionAlignment);\r
     ImageContext.ImageAddress = ((UINTN) MemoryImagePointer + ImageContext.SectionAlignment - 1) & (~((UINTN) ImageContext.SectionAlignment - 1));\r
-    \r
+\r
     Status =  PeCoffLoaderLoadImage (&ImageContext);\r
     if (EFI_ERROR (Status)) {\r
       Error (NULL, 0, 3000, "Invalid", "LocateImage() call failed on rebase of %s", FileName);\r
       free ((VOID *) MemoryImagePointer);\r
       return Status;\r
     }\r
-         \r
+\r
     ImageContext.DestinationAddress = NewPe32BaseAddress;\r
     Status                          = PeCoffLoaderRelocateImage (&ImageContext);\r
     if (EFI_ERROR (Status)) {\r
@@ -3665,15 +3665,15 @@ Returns:
     //\r
     SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (\r
                        (UINTN) ImgHdr +\r
-                       sizeof (UINT32) + \r
-                       sizeof (EFI_IMAGE_FILE_HEADER) +  \r
+                       sizeof (UINT32) +\r
+                       sizeof (EFI_IMAGE_FILE_HEADER) +\r
                        ImgHdr->Pe32.FileHeader.SizeOfOptionalHeader\r
                        );\r
-    \r
+\r
     for (Index = 0; Index < ImgHdr->Pe32.FileHeader.NumberOfSections; Index ++, SectionHeader ++) {\r
       CopyMem (\r
-        (UINT8 *) CurrentPe32Section.Pe32Section + CurSecHdrSize + SectionHeader->PointerToRawData, \r
-        (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress), \r
+        (UINT8 *) CurrentPe32Section.Pe32Section + CurSecHdrSize + SectionHeader->PointerToRawData,\r
+        (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),\r
         SectionHeader->SizeOfRawData\r
         );\r
     }\r
@@ -3684,7 +3684,7 @@ Returns:
       free (PeFileBuffer);\r
       PeFileBuffer = NULL;\r
     }\r
-    \r
+\r
     //\r
     // Update Image Base Address\r
     //\r
@@ -3739,13 +3739,13 @@ Returns:
     //\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // Now process TE sections\r
   //\r
   for (Index = 1;; Index++) {\r
     NewPe32BaseAddress = 0;\r
-    \r
+\r
     //\r
     // Find Te Image\r
     //\r
@@ -3755,7 +3755,7 @@ Returns:
     }\r
 \r
     CurSecHdrSize = GetSectionHeaderLength(CurrentPe32Section.CommonHeader);\r
-    \r
+\r
     //\r
     // Calculate the TE base address, the FFS file base plus the offset of the TE section less the size stripped off\r
     // by GenTEImage\r
@@ -3800,7 +3800,7 @@ Returns:
     //\r
     if (ImageContext.RelocationsStripped) {\r
       //\r
-      // Construct the original efi file name \r
+      // Construct the original efi file name\r
       //\r
       if (strlen (FileName) >= MAX_LONG_FILE_PATH) {\r
         Error (NULL, 0, 2000, "Invalid", "The file name %s is too long.", FileName);\r
@@ -3889,7 +3889,7 @@ Returns:
     }\r
     //\r
     // Reloacate TeImage\r
-    // \r
+    //\r
     ImageContext.DestinationAddress = NewPe32BaseAddress;\r
     Status                          = PeCoffLoaderRelocateImage (&ImageContext);\r
     if (EFI_ERROR (Status)) {\r
@@ -3897,7 +3897,7 @@ Returns:
       free ((VOID *) MemoryImagePointer);\r
       return Status;\r
     }\r
-    \r
+\r
     //\r
     // Copy the relocated image into raw image file.\r
     //\r
@@ -3905,19 +3905,19 @@ Returns:
     for (Index = 0; Index < TEImageHeader->NumberOfSections; Index ++, SectionHeader ++) {\r
       if (!ImageContext.IsTeImage) {\r
         CopyMem (\r
-          (UINT8 *) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->PointerToRawData, \r
-          (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress), \r
+          (UINT8 *) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->PointerToRawData,\r
+          (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),\r
           SectionHeader->SizeOfRawData\r
           );\r
       } else {\r
         CopyMem (\r
-          (UINT8 *) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->PointerToRawData, \r
-          (VOID*) (UINTN) (ImageContext.ImageAddress + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->VirtualAddress), \r
+          (UINT8 *) TEImageHeader + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->PointerToRawData,\r
+          (VOID*) (UINTN) (ImageContext.ImageAddress + sizeof (EFI_TE_IMAGE_HEADER) - TEImageHeader->StrippedSize + SectionHeader->VirtualAddress),\r
           SectionHeader->SizeOfRawData\r
           );\r
       }\r
     }\r
-    \r
+\r
     //\r
     // Free the allocated memory resource\r
     //\r
@@ -3927,7 +3927,7 @@ Returns:
       free (PeFileBuffer);\r
       PeFileBuffer = NULL;\r
     }\r
-    \r
+\r
     //\r
     // Update Image Base Address\r
     //\r
@@ -3958,14 +3958,14 @@ Returns:
     }\r
 \r
     WriteMapFile (\r
-      FvMapFile, \r
-      PdbPointer, \r
+      FvMapFile,\r
+      PdbPointer,\r
       FfsFile,\r
-      NewPe32BaseAddress, \r
+      NewPe32BaseAddress,\r
       &OrigImageContext\r
       );\r
   }\r
\r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -4013,7 +4013,7 @@ Returns:
     // Get Pad file size.\r
     //\r
     FileLength = GetFfsFileLength(PadFile);\r
-    FileLength = (FileLength + EFI_FFS_FILE_HEADER_ALIGNMENT - 1) & ~(EFI_FFS_FILE_HEADER_ALIGNMENT - 1); \r
+    FileLength = (FileLength + EFI_FFS_FILE_HEADER_ALIGNMENT - 1) & ~(EFI_FFS_FILE_HEADER_ALIGNMENT - 1);\r
     //\r
     // FixPoint must be align on 0x1000 relative to FvImage Header\r
     //\r
@@ -4026,7 +4026,7 @@ Returns:
       FixPoint += 0x1000;\r
     }\r
     FixPoint -= 0x1000;\r
-    \r
+\r
     if ((UINTN) FixPoint < ((UINTN) PadFile + GetFfsHeaderLength(PadFile))) {\r
       //\r
       // No alignment FixPoint in this Pad File.\r
@@ -4034,7 +4034,7 @@ Returns:
       continue;\r
     }\r
 \r
-    if ((UINTN) FvImage->Eof - (UINTN)FixPoint <= 0x20000) {    \r
+    if ((UINTN) FvImage->Eof - (UINTN)FixPoint <= 0x20000) {\r
       //\r
       // Find the position to place ApResetVector\r
       //\r
@@ -4042,7 +4042,7 @@ Returns:
       return EFI_SUCCESS;\r
     }\r
   }\r
-  \r
+\r
   return EFI_NOT_FOUND;\r
 }\r
 \r
@@ -4121,7 +4121,7 @@ Returns:
         CapInfo->Flags |= CAPSULE_FLAGS_INITIATE_RESET;\r
       }\r
     } else if (strstr (Value, "PersistAcrossReset") != NULL) {\r
-      CapInfo->Flags |= CAPSULE_FLAGS_PERSIST_ACROSS_RESET; \r
+      CapInfo->Flags |= CAPSULE_FLAGS_PERSIST_ACROSS_RESET;\r
       if (strstr (Value, "InitiateReset") != NULL) {\r
         CapInfo->Flags |= CAPSULE_FLAGS_INITIATE_RESET;\r
       }\r
@@ -4174,12 +4174,12 @@ Returns:
       // Add the file\r
       //\r
       strcpy (CapInfo->CapFiles[Index], Value);\r
-      DebugMsg (NULL, 0, 9, "Capsule component file", "the %uth file name is %s", (unsigned) Index, CapInfo->CapFiles[Index]); \r
+      DebugMsg (NULL, 0, 9, "Capsule component file", "the %uth file name is %s", (unsigned) Index, CapInfo->CapFiles[Index]);\r
     } else {\r
       break;\r
     }\r
   }\r
-  \r
+\r
   if (Index == 0) {\r
     Warning (NULL, 0, 0, "Capsule components are not specified.", NULL);\r
   }\r
@@ -4222,7 +4222,7 @@ Returns:
   UINT32                Index;\r
   FILE                  *fpin, *fpout;\r
   EFI_STATUS            Status;\r
-  \r
+\r
   if (InfFileImage != NULL) {\r
     //\r
     // Initialize file structures\r
@@ -4230,7 +4230,7 @@ Returns:
     InfMemoryFile.FileImage           = InfFileImage;\r
     InfMemoryFile.CurrentFilePointer  = InfFileImage;\r
     InfMemoryFile.Eof                 = InfFileImage + InfFileSize;\r
-  \r
+\r
     //\r
     // Parse the Cap inf file for header information\r
     //\r
@@ -4239,7 +4239,7 @@ Returns:
       return Status;\r
     }\r
   }\r
-  \r
+\r
   if (mCapDataInfo.HeaderSize == 0) {\r
     //\r
     // make header size align 16 bytes.\r
@@ -4252,16 +4252,16 @@ Returns:
     Error (NULL, 0, 2000, "Invalid parameter", "The specified HeaderSize cannot be less than the size of EFI_CAPSULE_HEADER.");\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   if (CapFileName == NULL && mCapDataInfo.CapName[0] != '\0') {\r
     CapFileName = mCapDataInfo.CapName;\r
   }\r
-  \r
+\r
   if (CapFileName == NULL) {\r
     Error (NULL, 0, 2001, "Missing required argument", "Output Capsule file name");\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   //\r
   // Set Default Capsule Guid value\r
   //\r
@@ -4299,7 +4299,7 @@ Returns:
   // Initialize the capsule header to zero\r
   //\r
   memset (CapBuffer, 0, mCapDataInfo.HeaderSize);\r
-  \r
+\r
   //\r
   // create capsule header and get capsule body\r
   //\r
@@ -4325,7 +4325,7 @@ Returns:
     Index ++;\r
     CapSize += FileSize;\r
   }\r
-  \r
+\r
   //\r
   // write capsule data into the output file\r
   //\r
@@ -4339,7 +4339,7 @@ Returns:
   fwrite (CapBuffer, 1, CapSize, fpout);\r
   fclose (fpout);\r
   free (CapBuffer);\r
-  \r
+\r
   VerboseMsg ("The size of the generated capsule image is %u bytes", (unsigned) CapSize);\r
 \r
   return EFI_SUCCESS;\r
index f039fa4dc7d82a60d44c0cd7ab57584e5652a689..6cfa37064544cf3f41847812f8dbe88ff5036d00 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
 This file contains describes the public interfaces to the GenFvImage Library.\r
 The basic purpose of the library is to create Firmware Volume images.\r
-  \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -71,7 +71,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define EFI_BLOCK_SIZE_STRING             "EFI_BLOCK_SIZE"\r
 #define EFI_GUID_STRING                   "EFI_GUID"\r
 #define EFI_FV_FILESYSTEMGUID_STRING      "EFI_FV_GUID"\r
-#define EFI_FV_NAMEGUID_STRING            "EFI_FVNAME_GUID" \r
+#define EFI_FV_NAMEGUID_STRING            "EFI_FVNAME_GUID"\r
 #define EFI_CAPSULE_GUID_STRING           "EFI_CAPSULE_GUID"\r
 #define EFI_CAPSULE_HEADER_SIZE_STRING    "EFI_CAPSULE_HEADER_SIZE"\r
 #define EFI_CAPSULE_FLAGS_STRING          "EFI_CAPSULE_FLAGS"\r
@@ -105,38 +105,38 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define EFI_FVB2_WRITE_LOCK_CAP_STRING     "EFI_WRITE_LOCK_CAP"\r
 #define EFI_FVB2_WRITE_LOCK_STATUS_STRING  "EFI_WRITE_LOCK_STATUS"\r
 \r
-#define EFI_FVB2_ALIGNMENT_1_STRING       "EFI_FVB2_ALIGNMENT_1"   \r
-#define EFI_FVB2_ALIGNMENT_2_STRING       "EFI_FVB2_ALIGNMENT_2"   \r
-#define EFI_FVB2_ALIGNMENT_4_STRING       "EFI_FVB2_ALIGNMENT_4"   \r
-#define EFI_FVB2_ALIGNMENT_8_STRING       "EFI_FVB2_ALIGNMENT_8"   \r
-#define EFI_FVB2_ALIGNMENT_16_STRING      "EFI_FVB2_ALIGNMENT_16"  \r
-#define EFI_FVB2_ALIGNMENT_32_STRING      "EFI_FVB2_ALIGNMENT_32"  \r
-#define EFI_FVB2_ALIGNMENT_64_STRING      "EFI_FVB2_ALIGNMENT_64"  \r
-#define EFI_FVB2_ALIGNMENT_128_STRING     "EFI_FVB2_ALIGNMENT_128" \r
-#define EFI_FVB2_ALIGNMENT_256_STRING     "EFI_FVB2_ALIGNMENT_256" \r
-#define EFI_FVB2_ALIGNMENT_512_STRING     "EFI_FVB2_ALIGNMENT_512" \r
-#define EFI_FVB2_ALIGNMENT_1K_STRING      "EFI_FVB2_ALIGNMENT_1K"  \r
-#define EFI_FVB2_ALIGNMENT_2K_STRING      "EFI_FVB2_ALIGNMENT_2K"  \r
-#define EFI_FVB2_ALIGNMENT_4K_STRING      "EFI_FVB2_ALIGNMENT_4K"  \r
-#define EFI_FVB2_ALIGNMENT_8K_STRING      "EFI_FVB2_ALIGNMENT_8K"  \r
-#define EFI_FVB2_ALIGNMENT_16K_STRING     "EFI_FVB2_ALIGNMENT_16K" \r
-#define EFI_FVB2_ALIGNMENT_32K_STRING     "EFI_FVB2_ALIGNMENT_32K" \r
-#define EFI_FVB2_ALIGNMENT_64K_STRING     "EFI_FVB2_ALIGNMENT_64K" \r
+#define EFI_FVB2_ALIGNMENT_1_STRING       "EFI_FVB2_ALIGNMENT_1"\r
+#define EFI_FVB2_ALIGNMENT_2_STRING       "EFI_FVB2_ALIGNMENT_2"\r
+#define EFI_FVB2_ALIGNMENT_4_STRING       "EFI_FVB2_ALIGNMENT_4"\r
+#define EFI_FVB2_ALIGNMENT_8_STRING       "EFI_FVB2_ALIGNMENT_8"\r
+#define EFI_FVB2_ALIGNMENT_16_STRING      "EFI_FVB2_ALIGNMENT_16"\r
+#define EFI_FVB2_ALIGNMENT_32_STRING      "EFI_FVB2_ALIGNMENT_32"\r
+#define EFI_FVB2_ALIGNMENT_64_STRING      "EFI_FVB2_ALIGNMENT_64"\r
+#define EFI_FVB2_ALIGNMENT_128_STRING     "EFI_FVB2_ALIGNMENT_128"\r
+#define EFI_FVB2_ALIGNMENT_256_STRING     "EFI_FVB2_ALIGNMENT_256"\r
+#define EFI_FVB2_ALIGNMENT_512_STRING     "EFI_FVB2_ALIGNMENT_512"\r
+#define EFI_FVB2_ALIGNMENT_1K_STRING      "EFI_FVB2_ALIGNMENT_1K"\r
+#define EFI_FVB2_ALIGNMENT_2K_STRING      "EFI_FVB2_ALIGNMENT_2K"\r
+#define EFI_FVB2_ALIGNMENT_4K_STRING      "EFI_FVB2_ALIGNMENT_4K"\r
+#define EFI_FVB2_ALIGNMENT_8K_STRING      "EFI_FVB2_ALIGNMENT_8K"\r
+#define EFI_FVB2_ALIGNMENT_16K_STRING     "EFI_FVB2_ALIGNMENT_16K"\r
+#define EFI_FVB2_ALIGNMENT_32K_STRING     "EFI_FVB2_ALIGNMENT_32K"\r
+#define EFI_FVB2_ALIGNMENT_64K_STRING     "EFI_FVB2_ALIGNMENT_64K"\r
 #define EFI_FVB2_ALIGNMENT_128K_STRING    "EFI_FVB2_ALIGNMENT_128K"\r
 #define EFI_FVB2_ALIGNMENT_256K_STRING    "EFI_FVB2_ALIGNMENT_256K"\r
 #define EFI_FVB2_ALIGNMENT_512K_STRING    "EFI_FVB2_ALIGNMENT_512K"\r
-#define EFI_FVB2_ALIGNMENT_1M_STRING      "EFI_FVB2_ALIGNMENT_1M"  \r
-#define EFI_FVB2_ALIGNMENT_2M_STRING      "EFI_FVB2_ALIGNMENT_2M"  \r
-#define EFI_FVB2_ALIGNMENT_4M_STRING      "EFI_FVB2_ALIGNMENT_4M"  \r
-#define EFI_FVB2_ALIGNMENT_8M_STRING      "EFI_FVB2_ALIGNMENT_8M"  \r
-#define EFI_FVB2_ALIGNMENT_16M_STRING     "EFI_FVB2_ALIGNMENT_16M" \r
-#define EFI_FVB2_ALIGNMENT_32M_STRING     "EFI_FVB2_ALIGNMENT_32M" \r
-#define EFI_FVB2_ALIGNMENT_64M_STRING     "EFI_FVB2_ALIGNMENT_64M" \r
+#define EFI_FVB2_ALIGNMENT_1M_STRING      "EFI_FVB2_ALIGNMENT_1M"\r
+#define EFI_FVB2_ALIGNMENT_2M_STRING      "EFI_FVB2_ALIGNMENT_2M"\r
+#define EFI_FVB2_ALIGNMENT_4M_STRING      "EFI_FVB2_ALIGNMENT_4M"\r
+#define EFI_FVB2_ALIGNMENT_8M_STRING      "EFI_FVB2_ALIGNMENT_8M"\r
+#define EFI_FVB2_ALIGNMENT_16M_STRING     "EFI_FVB2_ALIGNMENT_16M"\r
+#define EFI_FVB2_ALIGNMENT_32M_STRING     "EFI_FVB2_ALIGNMENT_32M"\r
+#define EFI_FVB2_ALIGNMENT_64M_STRING     "EFI_FVB2_ALIGNMENT_64M"\r
 #define EFI_FVB2_ALIGNMENT_128M_STRING    "EFI_FVB2_ALIGNMENT_128M"\r
 #define EFI_FVB2_ALIGNMENT_256M_STRING    "EFI_FVB2_ALIGNMENT_256M"\r
 #define EFI_FVB2_ALIGNMENT_512M_STRING    "EFI_FVB2_ALIGNMENT_512M"\r
-#define EFI_FVB2_ALIGNMENT_1G_STRING      "EFI_FVB2_ALIGNMENT_1G"  \r
-#define EFI_FVB2_ALIGNMENT_2G_STRING      "EFI_FVB2_ALIGNMENT_2G"  \r
+#define EFI_FVB2_ALIGNMENT_1G_STRING      "EFI_FVB2_ALIGNMENT_1G"\r
+#define EFI_FVB2_ALIGNMENT_2G_STRING      "EFI_FVB2_ALIGNMENT_2G"\r
 \r
 #define EFI_FV_WEAK_ALIGNMENT_STRING      "EFI_WEAK_ALIGNMENT"\r
 \r
@@ -336,7 +336,7 @@ EFI_STATUS
 FindApResetVectorPosition (\r
   IN  MEMORY_FILE  *FvImage,\r
   OUT UINT8        **Pointer\r
-  ); \r
+  );\r
 \r
 EFI_STATUS\r
 CalculateFvSize (\r
@@ -344,9 +344,9 @@ CalculateFvSize (
   );\r
 \r
 EFI_STATUS\r
-FfsRebase ( \r
-  IN OUT  FV_INFO               *FvInfo, \r
-  IN      CHAR8                 *FileName,           \r
+FfsRebase (\r
+  IN OUT  FV_INFO               *FvInfo,\r
+  IN      CHAR8                 *FileName,\r
   IN OUT  EFI_FFS_FILE_HEADER   *FfsFile,\r
   IN      UINTN                 XipOffset,\r
   IN      FILE                  *FvMapFile\r
@@ -365,7 +365,7 @@ GenerateCapImage (
 \r
 Routine Description:\r
 \r
-  This is the main function which will be called from application to \r
+  This is the main function which will be called from application to\r
   generate UEFI Capsule image.\r
 \r
 Arguments:\r
@@ -388,14 +388,14 @@ EFI_STATUS
 GenerateFvImage (\r
   IN CHAR8                *InfFileImage,\r
   IN UINTN                InfFileSize,\r
-  IN CHAR8                *FvFileName,  \r
+  IN CHAR8                *FvFileName,\r
   IN CHAR8                *MapFileName\r
   )\r
 /*++\r
 \r
 Routine Description:\r
 \r
-  This is the main function which will be called from application to \r
+  This is the main function which will be called from application to\r
   generate Firmware Image conforms to PI spec.\r
 \r
 Arguments:\r
@@ -404,9 +404,9 @@ Arguments:
   InfFileSize    Size of the contents of the InfFileImage buffer.\r
   FvFileName     Requested name for the FV file.\r
   MapFileName    Fv map file to log fv driver information.\r
-    \r
+\r
 Returns:\r
\r
+\r
   EFI_SUCCESS             Function completed successfully.\r
   EFI_OUT_OF_RESOURCES    Could not allocate required resources.\r
   EFI_ABORTED             Error encountered.\r
index ac0e2b13771bbcefc4285b8483965d2330a7fb04..af5ff9396ecf7c06656b057ee3f4f23e5d179621 100644 (file)
@@ -130,7 +130,7 @@ InitializeElf32 (
   //\r
   // Initialize data pointer and structures.\r
   //\r
-  mEhdr = (Elf_Ehdr*) FileBuffer;  \r
+  mEhdr = (Elf_Ehdr*) FileBuffer;\r
 \r
   //\r
   // Check the ELF32 specific header information.\r
@@ -142,12 +142,12 @@ InitializeElf32 (
   if (mEhdr->e_ident[EI_DATA] != ELFDATA2LSB) {\r
     Error (NULL, 0, 3000, "Unsupported", "ELF EI_DATA not ELFDATA2LSB");\r
     return FALSE;\r
-  }  \r
+  }\r
   if ((mEhdr->e_type != ET_EXEC) && (mEhdr->e_type != ET_DYN)) {\r
     Error (NULL, 0, 3000, "Unsupported", "ELF e_type not ET_EXEC or ET_DYN");\r
     return FALSE;\r
   }\r
-  if (!((mEhdr->e_machine == EM_386) || (mEhdr->e_machine == EM_ARM))) { \r
+  if (!((mEhdr->e_machine == EM_386) || (mEhdr->e_machine == EM_ARM))) {\r
     Error (NULL, 0, 3000, "Unsupported", "ELF e_machine not EM_386 or EM_ARM");\r
     return FALSE;\r
   }\r
@@ -155,13 +155,13 @@ InitializeElf32 (
     Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);\r
     return FALSE;\r
   }\r
-  \r
+\r
   //\r
   // Update section header pointers\r
   //\r
   mShdrBase  = (Elf_Shdr *)((UINT8 *)mEhdr + mEhdr->e_shoff);\r
   mPhdrBase = (Elf_Phdr *)((UINT8 *)mEhdr + mEhdr->e_phoff);\r
-  \r
+\r
   //\r
   // Create COFF Section offset buffer and zero.\r
   //\r
@@ -707,20 +707,20 @@ WriteSections32 (
     if ((RelShdr->sh_type != SHT_REL) && (RelShdr->sh_type != SHT_RELA)) {\r
       continue;\r
     }\r
-    \r
+\r
     //\r
     // Relocation section found.  Now extract section information that the relocations\r
     // apply to in the ELF data and the new COFF data.\r
     //\r
     SecShdr = GetShdrByIndex(RelShdr->sh_info);\r
     SecOffset = mCoffSectionsOffset[RelShdr->sh_info];\r
-    \r
+\r
     //\r
     // Only process relocations for the current filter type.\r
     //\r
     if (RelShdr->sh_type == SHT_REL && (*Filter)(SecShdr)) {\r
       UINT32 RelOffset;\r
-      \r
+\r
       //\r
       // Determine the symbol table referenced by the relocation data.\r
       //\r
@@ -735,18 +735,18 @@ WriteSections32 (
         // Set pointer to relocation entry\r
         //\r
         Elf_Rel *Rel = (Elf_Rel *)((UINT8*)mEhdr + RelShdr->sh_offset + RelOffset);\r
-        \r
+\r
         //\r
         // Set pointer to symbol table entry associated with the relocation entry.\r
         //\r
         Elf_Sym *Sym = (Elf_Sym *)(Symtab + ELF_R_SYM(Rel->r_info) * SymtabShdr->sh_entsize);\r
-        \r
+\r
         Elf_Shdr *SymShdr;\r
         UINT8 *Targ;\r
         UINT16 Address;\r
 \r
         //\r
-        // Check section header index found in symbol table and get the section \r
+        // Check section header index found in symbol table and get the section\r
         // header location.\r
         //\r
         if (Sym->st_shndx == SHN_UNDEF\r
@@ -768,7 +768,7 @@ WriteSections32 (
         //\r
         // Convert the relocation data to a pointer into the coff file.\r
         //\r
-        // Note: \r
+        // Note:\r
         //   r_offset is the virtual address of the storage unit to be relocated.\r
         //   sh_addr is the virtual address for the base of the section.\r
         //\r
@@ -814,9 +814,9 @@ WriteSections32 (
           case R_ARM_THM_JUMP19:\r
           case R_ARM_CALL:\r
           case R_ARM_JMP24:\r
-          case R_ARM_THM_JUMP24:  \r
-          case R_ARM_PREL31:  \r
-          case R_ARM_MOVW_PREL_NC:  \r
+          case R_ARM_THM_JUMP24:\r
+          case R_ARM_PREL31:\r
+          case R_ARM_MOVW_PREL_NC:\r
           case R_ARM_MOVT_PREL:\r
           case R_ARM_THM_MOVW_PREL_NC:\r
           case R_ARM_THM_MOVT_PREL:\r
@@ -909,7 +909,7 @@ WriteRelocations32 (
         for (RelIdx = 0; RelIdx < RelShdr->sh_size; RelIdx += RelShdr->sh_entsize) {\r
           Rel = (Elf_Rel *)((UINT8*)mEhdr + RelShdr->sh_offset + RelIdx);\r
 \r
-          if (mEhdr->e_machine == EM_386) { \r
+          if (mEhdr->e_machine == EM_386) {\r
             switch (ELF_R_TYPE(Rel->r_info)) {\r
             case R_386_NONE:\r
             case R_386_PC32:\r
@@ -941,9 +941,9 @@ WriteRelocations32 (
             case R_ARM_THM_JUMP19:\r
             case R_ARM_CALL:\r
             case R_ARM_JMP24:\r
-            case R_ARM_THM_JUMP24:  \r
-            case R_ARM_PREL31:  \r
-            case R_ARM_MOVW_PREL_NC:  \r
+            case R_ARM_THM_JUMP24:\r
+            case R_ARM_PREL31:\r
+            case R_ARM_MOVW_PREL_NC:\r
             case R_ARM_MOVT_PREL:\r
             case R_ARM_THM_MOVW_PREL_NC:\r
             case R_ARM_THM_MOVT_PREL:\r
@@ -1090,7 +1090,7 @@ WriteRelocations32 (
           case  R_ARM_RABS32:\r
             CoffAddFixup (Rel->r_offset, EFI_IMAGE_REL_BASED_HIGHLOW);\r
             break;\r
-          \r
+\r
           default:\r
             Error (NULL, 0, 3000, "Invalid", "%s bad ARM dynamic relocations, unkown type %d.", mInImageName, ELF32_R_TYPE (Rel->r_info));\r
             break;\r
@@ -1163,7 +1163,7 @@ SetImageSize32 (
   )\r
 {\r
   EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;\r
-  \r
+\r
   //\r
   // Set image size\r
   //\r
index 65fa55206887d285bbf47ce7f6a41e169e414cf9..3262b90c7fb8e4256abcdf632b5293d8e2de863f 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
 Header file for Elf32 Convert solution\r
 \r
-Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
-This program and the accompanying materials are licensed and made available \r
-under the terms and conditions of the BSD License which accompanies this \r
-distribution.  The full text of the license may be found at \r
+This program and the accompanying materials are licensed and made available\r
+under the terms and conditions of the BSD License which accompanies this\r
+distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
index 9ffb367e4365b39588c3008335dfdc2d210a68d5..4636cfee03a72fb357f43547ef143874bc054609 100644 (file)
@@ -800,24 +800,24 @@ WriteSections64 (
             // Absolute relocation.\r
             //\r
             VerboseMsg ("R_X86_64_64");\r
-            VerboseMsg ("Offset: 0x%08X, Addend: 0x%016LX", \r
-              (UINT32)(SecOffset + (Rel->r_offset - SecShdr->sh_addr)), \r
+            VerboseMsg ("Offset: 0x%08X, Addend: 0x%016LX",\r
+              (UINT32)(SecOffset + (Rel->r_offset - SecShdr->sh_addr)),\r
               *(UINT64 *)Targ);\r
             *(UINT64 *)Targ = *(UINT64 *)Targ - SymShdr->sh_addr + mCoffSectionsOffset[Sym->st_shndx];\r
             VerboseMsg ("Relocation:  0x%016LX", *(UINT64*)Targ);\r
             break;\r
           case R_X86_64_32:\r
             VerboseMsg ("R_X86_64_32");\r
-            VerboseMsg ("Offset: 0x%08X, Addend: 0x%08X", \r
-              (UINT32)(SecOffset + (Rel->r_offset - SecShdr->sh_addr)), \r
+            VerboseMsg ("Offset: 0x%08X, Addend: 0x%08X",\r
+              (UINT32)(SecOffset + (Rel->r_offset - SecShdr->sh_addr)),\r
               *(UINT32 *)Targ);\r
             *(UINT32 *)Targ = (UINT32)((UINT64)(*(UINT32 *)Targ) - SymShdr->sh_addr + mCoffSectionsOffset[Sym->st_shndx]);\r
             VerboseMsg ("Relocation:  0x%08X", *(UINT32*)Targ);\r
             break;\r
           case R_X86_64_32S:\r
             VerboseMsg ("R_X86_64_32S");\r
-            VerboseMsg ("Offset: 0x%08X, Addend: 0x%08X", \r
-              (UINT32)(SecOffset + (Rel->r_offset - SecShdr->sh_addr)), \r
+            VerboseMsg ("Offset: 0x%08X, Addend: 0x%08X",\r
+              (UINT32)(SecOffset + (Rel->r_offset - SecShdr->sh_addr)),\r
               *(UINT32 *)Targ);\r
             *(INT32 *)Targ = (INT32)((INT64)(*(INT32 *)Targ) - SymShdr->sh_addr + mCoffSectionsOffset[Sym->st_shndx]);\r
             VerboseMsg ("Relocation:  0x%08X", *(UINT32*)Targ);\r
@@ -838,8 +838,8 @@ WriteSections64 (
             // Relative relocation: Symbol - Ip + Addend\r
             //\r
             VerboseMsg ("R_X86_64_PC32");\r
-            VerboseMsg ("Offset: 0x%08X, Addend: 0x%08X", \r
-              (UINT32)(SecOffset + (Rel->r_offset - SecShdr->sh_addr)), \r
+            VerboseMsg ("Offset: 0x%08X, Addend: 0x%08X",\r
+              (UINT32)(SecOffset + (Rel->r_offset - SecShdr->sh_addr)),\r
               *(UINT32 *)Targ);\r
             *(UINT32 *)Targ = (UINT32) (*(UINT32 *)Targ\r
               + (mCoffSectionsOffset[Sym->st_shndx] - SymShdr->sh_addr)\r
@@ -986,7 +986,7 @@ WriteRelocations64 (
             case R_X86_64_PLT32:\r
               break;\r
             case R_X86_64_64:\r
-              VerboseMsg ("EFI_IMAGE_REL_BASED_DIR64 Offset: 0x%08X", \r
+              VerboseMsg ("EFI_IMAGE_REL_BASED_DIR64 Offset: 0x%08X",\r
                 mCoffSectionsOffset[RelShdr->sh_info] + (Rel->r_offset - SecShdr->sh_addr));\r
               CoffAddFixup(\r
                 (UINT32) ((UINT64) mCoffSectionsOffset[RelShdr->sh_info]\r
@@ -995,7 +995,7 @@ WriteRelocations64 (
               break;\r
             case R_X86_64_32S:\r
             case R_X86_64_32:\r
-              VerboseMsg ("EFI_IMAGE_REL_BASED_HIGHLOW Offset: 0x%08X", \r
+              VerboseMsg ("EFI_IMAGE_REL_BASED_HIGHLOW Offset: 0x%08X",\r
                 mCoffSectionsOffset[RelShdr->sh_info] + (Rel->r_offset - SecShdr->sh_addr));\r
               CoffAddFixup(\r
                 (UINT32) ((UINT64) mCoffSectionsOffset[RelShdr->sh_info]\r
index 7a1d6ae013c59eba4fb7cbb13aa40364d944909c..0dac2cba55bdbe65a3072798b54fc706ef7dbc4f 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
 Header file for Elf64 convert solution\r
 \r
-Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
-This program and the accompanying materials are licensed and made available \r
-under the terms and conditions of the BSD License which accompanies this \r
-distribution.  The full text of the license may be found at \r
+This program and the accompanying materials are licensed and made available\r
+under the terms and conditions of the BSD License which accompanies this\r
+distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
index 86f844d2a9264ca3b82537c3734500cc60883d7a..494f9b8e90cfe0e64474987360d50b634471d2d5 100644 (file)
@@ -3,9 +3,9 @@ Elf convert solution
 \r
 Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
-This program and the accompanying materials are licensed and made available \r
-under the terms and conditions of the BSD License which accompanies this \r
-distribution.  The full text of the license may be found at \r
+This program and the accompanying materials are licensed and made available\r
+under the terms and conditions of the BSD License which accompanies this\r
+distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -92,7 +92,7 @@ CoffAddFixup(
       // Add a null entry (is it required ?)\r
       //\r
       CoffAddFixupEntry (0);\r
-      \r
+\r
       //\r
       // Pad for alignment.\r
       //\r
@@ -163,7 +163,7 @@ IsElfHeader (
   UINT8  *FileBuffer\r
 )\r
 {\r
-  return (FileBuffer[EI_MAG0] == ELFMAG0 && \r
+  return (FileBuffer[EI_MAG0] == ELFMAG0 &&\r
           FileBuffer[EI_MAG1] == ELFMAG1 &&\r
           FileBuffer[EI_MAG2] == ELFMAG2 &&\r
           FileBuffer[EI_MAG3] == ELFMAG3);\r
@@ -199,7 +199,7 @@ ConvertElf (
 \r
   //\r
   // Compute sections new address.\r
-  //  \r
+  //\r
   VerboseMsg ("Compute sections new address.");\r
   ElfFunctions.ScanSections ();\r
 \r
@@ -246,6 +246,6 @@ ConvertElf (
   // Free resources used by ELF functions.\r
   //\r
   ElfFunctions.CleanUp ();\r
-  \r
+\r
   return TRUE;\r
 }\r
index fc8c63f34bdcf4fb3d7acc908c72f0d364c0e3b1..1c0f24e6c2892511a7faf87208d03fa57daf9b82 100644 (file)
@@ -3,9 +3,9 @@ Header file for Elf convert solution
 \r
 Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
-This program and the accompanying materials are licensed and made available \r
-under the terms and conditions of the BSD License which accompanies this \r
-distribution.  The full text of the license may be found at \r
+This program and the accompanying materials are licensed and made available\r
+under the terms and conditions of the BSD License which accompanies this\r
+distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -45,7 +45,7 @@ typedef enum {
   SECTION_TEXT,\r
   SECTION_HII,\r
   SECTION_DATA\r
-  \r
+\r
 } SECTION_FILTER_TYPES;\r
 \r
 //\r
@@ -58,7 +58,7 @@ typedef struct {
   VOID    (*WriteDebug) ();\r
   VOID    (*SetImageSize) ();\r
   VOID    (*CleanUp) ();\r
-  \r
+\r
 } ELF_FUNCTION_TABLE;\r
 \r
 //\r
index 00c9ff35b1c3728a6de693dc974d6de7975edd65..7976bec60a4b3c04e01e3521c7a27a60f69b6510 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Converts a pe32+ image to an FW, Te image type, or other specific image.\r
 \r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -169,7 +169,7 @@ Returns:
   //\r
   // Copyright declaration\r
   //\r
-  fprintf (stdout, "Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.\n\n");\r
+  fprintf (stdout, "Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.\n\n");\r
 \r
   //\r
   // Details Option\r
@@ -242,7 +242,7 @@ Returns:
                         If it is combined with other action options, the later\n\\r
                         input action option will override the previous one.\n");\r
   fprintf (stdout, "  -a NUM, --align NUM   NUM is one HEX or DEC format alignment value.\n\\r
-                        This option is only used together with -j option.\n");  \r
+                        This option is only used together with -j option.\n");\r
   fprintf (stdout, "  -p NUM, --pad NUM     NUM is one HEX or DEC format padding value.\n\\r
                         This option is only used together with -j option.\n");\r
   fprintf (stdout, "  --keepexceptiontable  Don't clear exception table.\n\\r
@@ -490,7 +490,7 @@ SetHiiResourceHeader (
         }\r
 \r
         //\r
-        // Now it ought to be resource Data and update its OffsetToData value \r
+        // Now it ought to be resource Data and update its OffsetToData value\r
         //\r
         if (!ResourceDirectoryEntry->u2.s.DataIsDirectory) {\r
           ResourceDataEntry = (EFI_IMAGE_RESOURCE_DATA_ENTRY *) (HiiBinData + ResourceDirectoryEntry->u2.OffsetToData);\r
@@ -501,7 +501,7 @@ SetHiiResourceHeader (
     }\r
     ResourceDirectoryEntry++;\r
   }\r
-  \r
+\r
   return;\r
 }\r
 \r
@@ -530,7 +530,7 @@ GetPeCoffHeader (
       return NULL;\r
     }\r
   }\r
-  \r
+\r
   return PeHdr;\r
 }\r
 \r
@@ -555,7 +555,7 @@ PeCoffConvertImageToXip (
   if (PeHdr == NULL) {\r
     return;\r
   }\r
-  \r
+\r
   if (PeHdr->Pe32.OptionalHeader.SectionAlignment != PeHdr->Pe32.OptionalHeader.FileAlignment) {\r
     //\r
     // The only reason to expand zero fill sections is to make them compatible with XIP images.\r
@@ -672,7 +672,7 @@ PeCoffConvertImageToXip (
 \r
 UINT8 *\r
 CreateHiiResouceSectionHeader (\r
-  UINT32 *pSectionHeaderSize, \r
+  UINT32 *pSectionHeaderSize,\r
   UINT32 HiiDataSize\r
   )\r
 /*++\r
@@ -705,8 +705,8 @@ Returns:
   // Calculate the total size for the resource header (include Type, Name and Language)\r
   // then allocate memory for the resource header.\r
   //\r
-  HiiSectionHeaderSize = 3 * (sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY)) \r
-                          + 3 * (sizeof (UINT16) + 3 * sizeof (CHAR16)) \r
+  HiiSectionHeaderSize = 3 * (sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY))\r
+                          + 3 * (sizeof (UINT16) + 3 * sizeof (CHAR16))\r
                           + sizeof (EFI_IMAGE_RESOURCE_DATA_ENTRY);\r
   HiiSectionHeader = malloc (HiiSectionHeaderSize);\r
   if (HiiSectionHeader == NULL) {\r
@@ -717,7 +717,7 @@ Returns:
 \r
   HiiSectionOffset = 0;\r
   //\r
-  // Create Type entry \r
+  // Create Type entry\r
   //\r
   ResourceDirectory = (EFI_IMAGE_RESOURCE_DIRECTORY *) (HiiSectionHeader + HiiSectionOffset);\r
   HiiSectionOffset += sizeof (EFI_IMAGE_RESOURCE_DIRECTORY);\r
@@ -877,7 +877,7 @@ Returns:
 \r
   if (ImageContext.RelocationsStripped) {\r
     Error (NULL, 0, 3000, "Invalid", "The input PeImage %s has no relocation to be fixed up", FileName);\r
-    return Status;    \r
+    return Status;\r
   }\r
 \r
   //\r
@@ -890,8 +890,8 @@ Returns:
   //\r
   SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (\r
     (UINTN) ImgHdr +\r
-    sizeof (UINT32) + \r
-    sizeof (EFI_IMAGE_FILE_HEADER) +  \r
+    sizeof (UINT32) +\r
+    sizeof (EFI_IMAGE_FILE_HEADER) +\r
     ImgHdr->Pe32.FileHeader.SizeOfOptionalHeader\r
     );\r
 \r
@@ -957,7 +957,7 @@ Returns:
 \r
   if (ImageContext.RelocationsStripped) {\r
     Error (NULL, 0, 3000, "Invalid", "The input PeImage %s has no relocation to be fixed up", FileName);\r
-    return Status;    \r
+    return Status;\r
   }\r
 \r
   //\r
@@ -996,15 +996,15 @@ Returns:
   //\r
   SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (\r
     (UINTN) ImgHdr +\r
-    sizeof (UINT32) + \r
-    sizeof (EFI_IMAGE_FILE_HEADER) +  \r
+    sizeof (UINT32) +\r
+    sizeof (EFI_IMAGE_FILE_HEADER) +\r
     ImgHdr->Pe32.FileHeader.SizeOfOptionalHeader\r
     );\r
 \r
   for (Index = 0; Index < ImgHdr->Pe32.FileHeader.NumberOfSections; Index ++, SectionHeader ++) {\r
     CopyMem (\r
-      FileBuffer + SectionHeader->PointerToRawData, \r
-      (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress), \r
+      FileBuffer + SectionHeader->PointerToRawData,\r
+      (VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),\r
       SectionHeader->SizeOfRawData\r
       );\r
   }\r
@@ -2186,7 +2186,7 @@ Returns:
         goto Finish;\r
       }\r
     }\r
-    \r
+\r
     if (NegativeAddr) {\r
       //\r
       // Set Base Address to a negative value.\r
@@ -2534,7 +2534,7 @@ Returns:
     (TEImageHeader.DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress == 0) && \\r
     (TEImageHeader.DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].Size == 0)) {\r
       //\r
-      // PeImage can be loaded into memory, but it has no relocation section. \r
+      // PeImage can be loaded into memory, but it has no relocation section.\r
       // Fix TeImage Header to set VA of relocation data directory to not zero, the size is still zero.\r
       //\r
       if (Optional32 != NULL) {\r
@@ -2716,7 +2716,7 @@ Finish:
       }\r
     }\r
   }\r
-  \r
+\r
   if (InputFileBuffer != NULL) {\r
     free (InputFileBuffer);\r
   }\r
@@ -2735,7 +2735,7 @@ Finish:
     ReportFileName = (CHAR8 *) malloc (FileLen + 1);\r
     if (ReportFileName != NULL) {\r
       strcpy (ReportFileName, OutImageName);\r
-      strcpy (ReportFileName + (FileLen - 4), ".txt"); \r
+      strcpy (ReportFileName + (FileLen - 4), ".txt");\r
       ReportFile = fopen (LongFilePath (ReportFileName), "w+");\r
       if (ReportFile != NULL) {\r
         fprintf (ReportFile, "MODULE_SIZE = %u\n", (unsigned) mImageSize);\r
@@ -2789,7 +2789,7 @@ Returns:
   EFI_IMAGE_SECTION_HEADER        *SectionHeader;\r
   EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *DebugEntry;\r
   EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY *RsdsEntry;\r
-  UINT32                          *NewTimeStamp;  \r
+  UINT32                          *NewTimeStamp;\r
 \r
   //\r
   // Init variable.\r
@@ -2968,7 +2968,7 @@ Returns:
   EFI_IMAGE_OPTIONAL_HEADER64     *Optional64Hdr;\r
   EFI_IMAGE_SECTION_HEADER        *SectionHeader;\r
   UINT32                          *NewTimeStamp;\r
-  \r
+\r
   //\r
   // Init variable.\r
   //\r
index b56181d13e8693680b43f7045de42e71283fecb8..2fe513e929955d14741a9c062a631c1f2461acd8 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
 Header file for GenFw\r
 \r
-Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
-This program and the accompanying materials are licensed and made available \r
-under the terms and conditions of the BSD License which accompanies this \r
-distribution.  The full text of the license may be found at \r
+This program and the accompanying materials are licensed and made available\r
+under the terms and conditions of the BSD License which accompanies this\r
+distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
index dd4e1325986be88520c6def8834d4d6fd3dd06cf..4371776edf6fe2f1dec2100134860fe38008d5c2 100644 (file)
@@ -48,38 +48,38 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  * ELF definitions common to all 32-bit architectures.\r
  */\r
 \r
-typedef UINT32 Elf32_Addr;\r
-typedef UINT16 Elf32_Half;\r
-typedef UINT32 Elf32_Off;\r
-typedef INT32          Elf32_Sword;\r
-typedef UINT32 Elf32_Word;\r
-typedef UINT64 Elf32_Lword;\r
+typedef UINT32  Elf32_Addr;\r
+typedef UINT16  Elf32_Half;\r
+typedef UINT32  Elf32_Off;\r
+typedef INT32    Elf32_Sword;\r
+typedef UINT32  Elf32_Word;\r
+typedef UINT64  Elf32_Lword;\r
 \r
-typedef Elf32_Word     Elf32_Hashelt;\r
+typedef Elf32_Word  Elf32_Hashelt;\r
 \r
 /* Non-standard class-dependent datatype used for abstraction. */\r
-typedef Elf32_Word     Elf32_Size;\r
-typedef Elf32_Sword    Elf32_Ssize;\r
+typedef Elf32_Word  Elf32_Size;\r
+typedef Elf32_Sword  Elf32_Ssize;\r
 \r
 /*\r
  * ELF header.\r
  */\r
 \r
 typedef struct {\r
-       unsigned char   e_ident[EI_NIDENT];     /* File identification. */\r
-       Elf32_Half      e_type;         /* File type. */\r
-       Elf32_Half      e_machine;      /* Machine architecture. */\r
-       Elf32_Word      e_version;      /* ELF format version. */\r
-       Elf32_Addr      e_entry;        /* Entry point. */\r
-       Elf32_Off       e_phoff;        /* Program header file offset. */\r
-       Elf32_Off       e_shoff;        /* Section header file offset. */\r
-       Elf32_Word      e_flags;        /* Architecture-specific flags. */\r
-       Elf32_Half      e_ehsize;       /* Size of ELF header in bytes. */\r
-       Elf32_Half      e_phentsize;    /* Size of program header entry. */\r
-       Elf32_Half      e_phnum;        /* Number of program header entries. */\r
-       Elf32_Half      e_shentsize;    /* Size of section header entry. */\r
-       Elf32_Half      e_shnum;        /* Number of section header entries. */\r
-       Elf32_Half      e_shstrndx;     /* Section name strings section. */\r
+  unsigned char  e_ident[EI_NIDENT];  /* File identification. */\r
+  Elf32_Half  e_type;    /* File type. */\r
+  Elf32_Half  e_machine;  /* Machine architecture. */\r
+  Elf32_Word  e_version;  /* ELF format version. */\r
+  Elf32_Addr  e_entry;  /* Entry point. */\r
+  Elf32_Off  e_phoff;  /* Program header file offset. */\r
+  Elf32_Off  e_shoff;  /* Section header file offset. */\r
+  Elf32_Word  e_flags;  /* Architecture-specific flags. */\r
+  Elf32_Half  e_ehsize;  /* Size of ELF header in bytes. */\r
+  Elf32_Half  e_phentsize;  /* Size of program header entry. */\r
+  Elf32_Half  e_phnum;  /* Number of program header entries. */\r
+  Elf32_Half  e_shentsize;  /* Size of section header entry. */\r
+  Elf32_Half  e_shnum;  /* Number of section header entries. */\r
+  Elf32_Half  e_shstrndx;  /* Section name strings section. */\r
 } Elf32_Ehdr;\r
 \r
 /*\r
@@ -87,17 +87,17 @@ typedef struct {
  */\r
 \r
 typedef struct {\r
-       Elf32_Word      sh_name;        /* Section name (index into the\r
-                                          section header string table). */\r
-       Elf32_Word      sh_type;        /* Section type. */\r
-       Elf32_Word      sh_flags;       /* Section flags. */\r
-       Elf32_Addr      sh_addr;        /* Address in memory image. */\r
-       Elf32_Off       sh_offset;      /* Offset in file. */\r
-       Elf32_Word      sh_size;        /* Size in bytes. */\r
-       Elf32_Word      sh_link;        /* Index of a related section. */\r
-       Elf32_Word      sh_info;        /* Depends on section type. */\r
-       Elf32_Word      sh_addralign;   /* Alignment in bytes. */\r
-       Elf32_Word      sh_entsize;     /* Size of each entry in section. */\r
+  Elf32_Word  sh_name;  /* Section name (index into the\r
+             section header string table). */\r
+  Elf32_Word  sh_type;  /* Section type. */\r
+  Elf32_Word  sh_flags;  /* Section flags. */\r
+  Elf32_Addr  sh_addr;  /* Address in memory image. */\r
+  Elf32_Off  sh_offset;  /* Offset in file. */\r
+  Elf32_Word  sh_size;  /* Size in bytes. */\r
+  Elf32_Word  sh_link;  /* Index of a related section. */\r
+  Elf32_Word  sh_info;  /* Depends on section type. */\r
+  Elf32_Word  sh_addralign;  /* Alignment in bytes. */\r
+  Elf32_Word  sh_entsize;  /* Size of each entry in section. */\r
 } Elf32_Shdr;\r
 \r
 /*\r
@@ -105,14 +105,14 @@ typedef struct {
  */\r
 \r
 typedef struct {\r
-       Elf32_Word      p_type;         /* Entry type. */\r
-       Elf32_Off       p_offset;       /* File offset of contents. */\r
-       Elf32_Addr      p_vaddr;        /* Virtual address in memory image. */\r
-       Elf32_Addr      p_paddr;        /* Physical address (not used). */\r
-       Elf32_Word      p_filesz;       /* Size of contents in file. */\r
-       Elf32_Word      p_memsz;        /* Size of contents in memory. */\r
-       Elf32_Word      p_flags;        /* Access permission flags. */\r
-       Elf32_Word      p_align;        /* Alignment in memory and file. */\r
+  Elf32_Word  p_type;    /* Entry type. */\r
+  Elf32_Off  p_offset;  /* File offset of contents. */\r
+  Elf32_Addr  p_vaddr;  /* Virtual address in memory image. */\r
+  Elf32_Addr  p_paddr;  /* Physical address (not used). */\r
+  Elf32_Word  p_filesz;  /* Size of contents in file. */\r
+  Elf32_Word  p_memsz;  /* Size of contents in memory. */\r
+  Elf32_Word  p_flags;  /* Access permission flags. */\r
+  Elf32_Word  p_align;  /* Alignment in memory and file. */\r
 } Elf32_Phdr;\r
 \r
 /*\r
@@ -120,11 +120,11 @@ typedef struct {
  */\r
 \r
 typedef struct {\r
-       Elf32_Sword     d_tag;          /* Entry type. */\r
-       union {\r
-               Elf32_Word      d_val;  /* Integer value. */\r
-               Elf32_Addr      d_ptr;  /* Address value. */\r
-       } d_un;\r
+  Elf32_Sword  d_tag;    /* Entry type. */\r
+  union {\r
+    Elf32_Word  d_val;  /* Integer value. */\r
+    Elf32_Addr  d_ptr;  /* Address value. */\r
+  } d_un;\r
 } Elf32_Dyn;\r
 \r
 /*\r
@@ -133,60 +133,60 @@ typedef struct {
 \r
 /* Relocations that don't need an addend field. */\r
 typedef struct {\r
-       Elf32_Addr      r_offset;       /* Location to be relocated. */\r
-       Elf32_Word      r_info;         /* Relocation type and symbol index. */\r
+  Elf32_Addr  r_offset;  /* Location to be relocated. */\r
+  Elf32_Word  r_info;    /* Relocation type and symbol index. */\r
 } Elf32_Rel;\r
 \r
 /* Relocations that need an addend field. */\r
 typedef struct {\r
-       Elf32_Addr      r_offset;       /* Location to be relocated. */\r
-       Elf32_Word      r_info;         /* Relocation type and symbol index. */\r
-       Elf32_Sword     r_addend;       /* Addend. */\r
+  Elf32_Addr  r_offset;  /* Location to be relocated. */\r
+  Elf32_Word  r_info;    /* Relocation type and symbol index. */\r
+  Elf32_Sword  r_addend;  /* Addend. */\r
 } Elf32_Rela;\r
 \r
 /* Macros for accessing the fields of r_info. */\r
-#define ELF32_R_SYM(info)      ((info) >> 8)\r
-#define ELF32_R_TYPE(info)     ((unsigned char)(info))\r
+#define ELF32_R_SYM(info)  ((info) >> 8)\r
+#define ELF32_R_TYPE(info)  ((unsigned char)(info))\r
 \r
 /* Macro for constructing r_info from field values. */\r
-#define ELF32_R_INFO(sym, type)        (((sym) << 8) + (unsigned char)(type))\r
+#define ELF32_R_INFO(sym, type)  (((sym) << 8) + (unsigned char)(type))\r
 \r
 /*\r
- *     Note entry header\r
+ *  Note entry header\r
  */\r
 typedef Elf_Note Elf32_Nhdr;\r
 \r
 /*\r
- *     Move entry\r
+ *  Move entry\r
  */\r
 typedef struct {\r
-       Elf32_Lword     m_value;        /* symbol value */\r
-       Elf32_Word      m_info;         /* size + index */\r
-       Elf32_Word      m_poffset;      /* symbol offset */\r
-       Elf32_Half      m_repeat;       /* repeat count */\r
-       Elf32_Half      m_stride;       /* stride info */\r
+  Elf32_Lword  m_value;  /* symbol value */\r
+  Elf32_Word   m_info;    /* size + index */\r
+  Elf32_Word  m_poffset;  /* symbol offset */\r
+  Elf32_Half  m_repeat;  /* repeat count */\r
+  Elf32_Half  m_stride;  /* stride info */\r
 } Elf32_Move;\r
 \r
 /*\r
- *     The macros compose and decompose values for Move.r_info\r
+ *  The macros compose and decompose values for Move.r_info\r
  *\r
- *     sym = ELF32_M_SYM(M.m_info)\r
- *     size = ELF32_M_SIZE(M.m_info)\r
- *     M.m_info = ELF32_M_INFO(sym, size)\r
+ *  sym = ELF32_M_SYM(M.m_info)\r
+ *  size = ELF32_M_SIZE(M.m_info)\r
+ *  M.m_info = ELF32_M_INFO(sym, size)\r
  */\r
-#define        ELF32_M_SYM(info)       ((info)>>8)\r
-#define        ELF32_M_SIZE(info)      ((unsigned char)(info))\r
-#define        ELF32_M_INFO(sym, size) (((sym)<<8)+(unsigned char)(size))\r
+#define  ELF32_M_SYM(info)  ((info)>>8)\r
+#define  ELF32_M_SIZE(info)  ((unsigned char)(info))\r
+#define  ELF32_M_INFO(sym, size)  (((sym)<<8)+(unsigned char)(size))\r
 \r
 /*\r
- *     Hardware/Software capabilities entry\r
+ *  Hardware/Software capabilities entry\r
  */\r
 typedef struct {\r
-       Elf32_Word      c_tag;          /* how to interpret value */\r
-       union {\r
-               Elf32_Word      c_val;\r
-               Elf32_Addr      c_ptr;\r
-       } c_un;\r
+  Elf32_Word  c_tag;    /* how to interpret value */\r
+  union {\r
+    Elf32_Word  c_val;\r
+    Elf32_Addr  c_ptr;\r
+  } c_un;\r
 } Elf32_Cap;\r
 \r
 /*\r
@@ -194,65 +194,65 @@ typedef struct {
  */\r
 \r
 typedef struct {\r
-       Elf32_Word      st_name;        /* String table index of name. */\r
-       Elf32_Addr      st_value;       /* Symbol value. */\r
-       Elf32_Word      st_size;        /* Size of associated object. */\r
-       unsigned char   st_info;        /* Type and binding information. */\r
-       unsigned char   st_other;       /* Reserved (not used). */\r
-       Elf32_Half      st_shndx;       /* Section index of symbol. */\r
+  Elf32_Word  st_name;  /* String table index of name. */\r
+  Elf32_Addr  st_value;  /* Symbol value. */\r
+  Elf32_Word  st_size;  /* Size of associated object. */\r
+  unsigned char  st_info;  /* Type and binding information. */\r
+  unsigned char  st_other;  /* Reserved (not used). */\r
+  Elf32_Half  st_shndx;  /* Section index of symbol. */\r
 } Elf32_Sym;\r
 \r
 /* Macros for accessing the fields of st_info. */\r
-#define ELF32_ST_BIND(info)            ((info) >> 4)\r
-#define ELF32_ST_TYPE(info)            ((info) & 0xf)\r
+#define ELF32_ST_BIND(info)    ((info) >> 4)\r
+#define ELF32_ST_TYPE(info)    ((info) & 0xf)\r
 \r
 /* Macro for constructing st_info from field values. */\r
-#define ELF32_ST_INFO(bind, type)      (((bind) << 4) + ((type) & 0xf))\r
+#define ELF32_ST_INFO(bind, type)  (((bind) << 4) + ((type) & 0xf))\r
 \r
 /* Macro for accessing the fields of st_other. */\r
-#define ELF32_ST_VISIBILITY(oth)       ((oth) & 0x3)\r
+#define ELF32_ST_VISIBILITY(oth)  ((oth) & 0x3)\r
 \r
 /* Structures used by Sun & GNU symbol versioning. */\r
 typedef struct\r
 {\r
-       Elf32_Half      vd_version;\r
-       Elf32_Half      vd_flags;\r
-       Elf32_Half      vd_ndx;\r
-       Elf32_Half      vd_cnt;\r
-       Elf32_Word      vd_hash;\r
-       Elf32_Word      vd_aux;\r
-       Elf32_Word      vd_next;\r
+  Elf32_Half  vd_version;\r
+  Elf32_Half  vd_flags;\r
+  Elf32_Half  vd_ndx;\r
+  Elf32_Half  vd_cnt;\r
+  Elf32_Word  vd_hash;\r
+  Elf32_Word  vd_aux;\r
+  Elf32_Word  vd_next;\r
 } Elf32_Verdef;\r
 \r
 typedef struct\r
 {\r
-       Elf32_Word      vda_name;\r
-       Elf32_Word      vda_next;\r
+  Elf32_Word  vda_name;\r
+  Elf32_Word  vda_next;\r
 } Elf32_Verdaux;\r
 \r
 typedef struct\r
 {\r
-       Elf32_Half      vn_version;\r
-       Elf32_Half      vn_cnt;\r
-       Elf32_Word      vn_file;\r
-       Elf32_Word      vn_aux;\r
-       Elf32_Word      vn_next;\r
+  Elf32_Half  vn_version;\r
+  Elf32_Half  vn_cnt;\r
+  Elf32_Word  vn_file;\r
+  Elf32_Word  vn_aux;\r
+  Elf32_Word  vn_next;\r
 } Elf32_Verneed;\r
 \r
 typedef struct\r
 {\r
-       Elf32_Word      vna_hash;\r
-       Elf32_Half      vna_flags;\r
-       Elf32_Half      vna_other;\r
-       Elf32_Word      vna_name;\r
-       Elf32_Word      vna_next;\r
+  Elf32_Word  vna_hash;\r
+  Elf32_Half  vna_flags;\r
+  Elf32_Half  vna_other;\r
+  Elf32_Word  vna_name;\r
+  Elf32_Word  vna_next;\r
 } Elf32_Vernaux;\r
 \r
 typedef Elf32_Half Elf32_Versym;\r
 \r
 typedef struct {\r
-       Elf32_Half      si_boundto;     /* direct bindings - symbol bound to */\r
-       Elf32_Half      si_flags;       /* per symbol flags */\r
+  Elf32_Half  si_boundto;  /* direct bindings - symbol bound to */\r
+  Elf32_Half  si_flags;  /* per symbol flags */\r
 } Elf32_Syminfo;\r
 \r
 #endif /* !_SYS_ELF32_H_ */\r
index 572085995d7af0c020065dafb739d6063b95712c..f4d4e1a28c06d327653b711b375a70b12e710d1d 100644 (file)
@@ -47,14 +47,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  * ELF definitions common to all 64-bit architectures.\r
  */\r
 \r
-typedef UINT64 Elf64_Addr;\r
-typedef UINT16 Elf64_Half;\r
-typedef UINT64 Elf64_Off;\r
-typedef INT32          Elf64_Sword;\r
-typedef INT64          Elf64_Sxword;\r
-typedef UINT32 Elf64_Word;\r
-typedef UINT64 Elf64_Lword;\r
-typedef UINT64 Elf64_Xword;\r
+typedef UINT64  Elf64_Addr;\r
+typedef UINT16  Elf64_Half;\r
+typedef UINT64  Elf64_Off;\r
+typedef INT32    Elf64_Sword;\r
+typedef INT64    Elf64_Sxword;\r
+typedef UINT32  Elf64_Word;\r
+typedef UINT64  Elf64_Lword;\r
+typedef UINT64  Elf64_Xword;\r
 \r
 /*\r
  * Types of dynamic symbol hash table bucket and chain elements.\r
@@ -63,31 +63,31 @@ typedef UINT64      Elf64_Xword;
  * typedef is required.\r
  */\r
 \r
-typedef Elf64_Word     Elf64_Hashelt;\r
+typedef Elf64_Word  Elf64_Hashelt;\r
 \r
 /* Non-standard class-dependent datatype used for abstraction. */\r
-typedef Elf64_Xword      Elf64_Size;\r
-typedef Elf64_Sxword   Elf64_Ssize;\r
+typedef Elf64_Xword    Elf64_Size;\r
+typedef Elf64_Sxword  Elf64_Ssize;\r
 \r
 /*\r
  * ELF header.\r
  */\r
 \r
 typedef struct {\r
-       unsigned char   e_ident[EI_NIDENT];     /* File identification. */\r
-       Elf64_Half      e_type;         /* File type. */\r
-       Elf64_Half      e_machine;      /* Machine architecture. */\r
-       Elf64_Word      e_version;      /* ELF format version. */\r
-       Elf64_Addr      e_entry;        /* Entry point. */\r
-       Elf64_Off       e_phoff;        /* Program header file offset. */\r
-       Elf64_Off       e_shoff;        /* Section header file offset. */\r
-       Elf64_Word      e_flags;        /* Architecture-specific flags. */\r
-       Elf64_Half      e_ehsize;       /* Size of ELF header in bytes. */\r
-       Elf64_Half      e_phentsize;    /* Size of program header entry. */\r
-       Elf64_Half      e_phnum;        /* Number of program header entries. */\r
-       Elf64_Half      e_shentsize;    /* Size of section header entry. */\r
-       Elf64_Half      e_shnum;        /* Number of section header entries. */\r
-       Elf64_Half      e_shstrndx;     /* Section name strings section. */\r
+  unsigned char  e_ident[EI_NIDENT];  /* File identification. */\r
+  Elf64_Half  e_type;    /* File type. */\r
+  Elf64_Half  e_machine;  /* Machine architecture. */\r
+  Elf64_Word  e_version;  /* ELF format version. */\r
+  Elf64_Addr  e_entry;  /* Entry point. */\r
+  Elf64_Off  e_phoff;  /* Program header file offset. */\r
+  Elf64_Off  e_shoff;  /* Section header file offset. */\r
+  Elf64_Word  e_flags;  /* Architecture-specific flags. */\r
+  Elf64_Half  e_ehsize;  /* Size of ELF header in bytes. */\r
+  Elf64_Half  e_phentsize;  /* Size of program header entry. */\r
+  Elf64_Half  e_phnum;  /* Number of program header entries. */\r
+  Elf64_Half  e_shentsize;  /* Size of section header entry. */\r
+  Elf64_Half  e_shnum;  /* Number of section header entries. */\r
+  Elf64_Half  e_shstrndx;  /* Section name strings section. */\r
 } Elf64_Ehdr;\r
 \r
 /*\r
@@ -95,17 +95,17 @@ typedef struct {
  */\r
 \r
 typedef struct {\r
-       Elf64_Word      sh_name;        /* Section name (index into the\r
-                                          section header string table). */\r
-       Elf64_Word      sh_type;        /* Section type. */\r
-       Elf64_Xword     sh_flags;       /* Section flags. */\r
-       Elf64_Addr      sh_addr;        /* Address in memory image. */\r
-       Elf64_Off       sh_offset;      /* Offset in file. */\r
-       Elf64_Xword     sh_size;        /* Size in bytes. */\r
-       Elf64_Word      sh_link;        /* Index of a related section. */\r
-       Elf64_Word      sh_info;        /* Depends on section type. */\r
-       Elf64_Xword     sh_addralign;   /* Alignment in bytes. */\r
-       Elf64_Xword     sh_entsize;     /* Size of each entry in section. */\r
+  Elf64_Word  sh_name;  /* Section name (index into the\r
+             section header string table). */\r
+  Elf64_Word  sh_type;  /* Section type. */\r
+  Elf64_Xword  sh_flags;  /* Section flags. */\r
+  Elf64_Addr  sh_addr;  /* Address in memory image. */\r
+  Elf64_Off  sh_offset;  /* Offset in file. */\r
+  Elf64_Xword  sh_size;  /* Size in bytes. */\r
+  Elf64_Word  sh_link;  /* Index of a related section. */\r
+  Elf64_Word  sh_info;  /* Depends on section type. */\r
+  Elf64_Xword  sh_addralign;  /* Alignment in bytes. */\r
+  Elf64_Xword  sh_entsize;  /* Size of each entry in section. */\r
 } Elf64_Shdr;\r
 \r
 /*\r
@@ -113,14 +113,14 @@ typedef struct {
  */\r
 \r
 typedef struct {\r
-       Elf64_Word      p_type;         /* Entry type. */\r
-       Elf64_Word      p_flags;        /* Access permission flags. */\r
-       Elf64_Off       p_offset;       /* File offset of contents. */\r
-       Elf64_Addr      p_vaddr;        /* Virtual address in memory image. */\r
-       Elf64_Addr      p_paddr;        /* Physical address (not used). */\r
-       Elf64_Xword     p_filesz;       /* Size of contents in file. */\r
-       Elf64_Xword     p_memsz;        /* Size of contents in memory. */\r
-       Elf64_Xword     p_align;        /* Alignment in memory and file. */\r
+  Elf64_Word  p_type;    /* Entry type. */\r
+  Elf64_Word  p_flags;  /* Access permission flags. */\r
+  Elf64_Off  p_offset;  /* File offset of contents. */\r
+  Elf64_Addr  p_vaddr;  /* Virtual address in memory image. */\r
+  Elf64_Addr  p_paddr;  /* Physical address (not used). */\r
+  Elf64_Xword  p_filesz;  /* Size of contents in file. */\r
+  Elf64_Xword  p_memsz;  /* Size of contents in memory. */\r
+  Elf64_Xword  p_align;  /* Alignment in memory and file. */\r
 } Elf64_Phdr;\r
 \r
 /*\r
@@ -128,11 +128,11 @@ typedef struct {
  */\r
 \r
 typedef struct {\r
-       Elf64_Sxword    d_tag;          /* Entry type. */\r
-       union {\r
-               Elf64_Xword     d_val;  /* Integer value. */\r
-               Elf64_Addr      d_ptr;  /* Address value. */\r
-       } d_un;\r
+  Elf64_Sxword  d_tag;    /* Entry type. */\r
+  union {\r
+    Elf64_Xword  d_val;  /* Integer value. */\r
+    Elf64_Addr  d_ptr;  /* Address value. */\r
+  } d_un;\r
 } Elf64_Dyn;\r
 \r
 /*\r
@@ -141,58 +141,58 @@ typedef struct {
 \r
 /* Relocations that don't need an addend field. */\r
 typedef struct {\r
-       Elf64_Addr      r_offset;       /* Location to be relocated. */\r
-       Elf64_Xword     r_info;         /* Relocation type and symbol index. */\r
+  Elf64_Addr  r_offset;  /* Location to be relocated. */\r
+  Elf64_Xword  r_info;    /* Relocation type and symbol index. */\r
 } Elf64_Rel;\r
 \r
 /* Relocations that need an addend field. */\r
 typedef struct {\r
-       Elf64_Addr      r_offset;       /* Location to be relocated. */\r
-       Elf64_Xword     r_info;         /* Relocation type and symbol index. */\r
-       Elf64_Sxword    r_addend;       /* Addend. */\r
+  Elf64_Addr  r_offset;  /* Location to be relocated. */\r
+  Elf64_Xword  r_info;    /* Relocation type and symbol index. */\r
+  Elf64_Sxword  r_addend;  /* Addend. */\r
 } Elf64_Rela;\r
 \r
 /* Macros for accessing the fields of r_info. */\r
-#define ELF64_R_SYM(info)      ((info) >> 32)\r
-#define ELF64_R_TYPE(info)     ((info) & 0xffffffffL)\r
+#define ELF64_R_SYM(info)  ((info) >> 32)\r
+#define ELF64_R_TYPE(info)  ((info) & 0xffffffffL)\r
 \r
 /* Macro for constructing r_info from field values. */\r
-#define ELF64_R_INFO(sym, type)        (((sym) << 32) + ((type) & 0xffffffffL))\r
+#define ELF64_R_INFO(sym, type)  (((sym) << 32) + ((type) & 0xffffffffL))\r
 \r
-#define        ELF64_R_TYPE_DATA(info) (((Elf64_Xword)(info)<<32)>>40)\r
-#define        ELF64_R_TYPE_ID(info)   (((Elf64_Xword)(info)<<56)>>56)\r
-#define        ELF64_R_TYPE_INFO(data, type)   \\r
-               (((Elf64_Xword)(data)<<8)+(Elf64_Xword)(type))\r
+#define  ELF64_R_TYPE_DATA(info)  (((Elf64_Xword)(info)<<32)>>40)\r
+#define  ELF64_R_TYPE_ID(info)  (((Elf64_Xword)(info)<<56)>>56)\r
+#define  ELF64_R_TYPE_INFO(data, type)  \\r
+    (((Elf64_Xword)(data)<<8)+(Elf64_Xword)(type))\r
 \r
 /*\r
- *     Note entry header\r
+ *  Note entry header\r
  */\r
 typedef Elf_Note Elf64_Nhdr;\r
 \r
 /*\r
- *     Move entry\r
+ *  Move entry\r
  */\r
 typedef struct {\r
-       Elf64_Lword     m_value;        /* symbol value */\r
-       Elf64_Xword     m_info;         /* size + index */\r
-       Elf64_Xword     m_poffset;      /* symbol offset */\r
-       Elf64_Half      m_repeat;       /* repeat count */\r
-       Elf64_Half      m_stride;       /* stride info */\r
+  Elf64_Lword  m_value;  /* symbol value */\r
+  Elf64_Xword   m_info;    /* size + index */\r
+  Elf64_Xword  m_poffset;  /* symbol offset */\r
+  Elf64_Half  m_repeat;  /* repeat count */\r
+  Elf64_Half  m_stride;  /* stride info */\r
 } Elf64_Move;\r
 \r
-#define        ELF64_M_SYM(info)       ((info)>>8)\r
-#define        ELF64_M_SIZE(info)      ((unsigned char)(info))\r
-#define        ELF64_M_INFO(sym, size) (((sym)<<8)+(unsigned char)(size))\r
+#define  ELF64_M_SYM(info)  ((info)>>8)\r
+#define  ELF64_M_SIZE(info)  ((unsigned char)(info))\r
+#define  ELF64_M_INFO(sym, size)  (((sym)<<8)+(unsigned char)(size))\r
 \r
 /*\r
- *     Hardware/Software capabilities entry\r
+ *  Hardware/Software capabilities entry\r
  */\r
 typedef struct {\r
-       Elf64_Xword     c_tag;          /* how to interpret value */\r
-       union {\r
-               Elf64_Xword     c_val;\r
-               Elf64_Addr      c_ptr;\r
-       } c_un;\r
+  Elf64_Xword  c_tag;    /* how to interpret value */\r
+  union {\r
+    Elf64_Xword  c_val;\r
+    Elf64_Addr  c_ptr;\r
+  } c_un;\r
 } Elf64_Cap;\r
 \r
 /*\r
@@ -200,61 +200,61 @@ typedef struct {
  */\r
 \r
 typedef struct {\r
-       Elf64_Word      st_name;        /* String table index of name. */\r
-       unsigned char   st_info;        /* Type and binding information. */\r
-       unsigned char   st_other;       /* Reserved (not used). */\r
-       Elf64_Half      st_shndx;       /* Section index of symbol. */\r
-       Elf64_Addr      st_value;       /* Symbol value. */\r
-       Elf64_Xword     st_size;        /* Size of associated object. */\r
+  Elf64_Word  st_name;  /* String table index of name. */\r
+  unsigned char  st_info;  /* Type and binding information. */\r
+  unsigned char  st_other;  /* Reserved (not used). */\r
+  Elf64_Half  st_shndx;  /* Section index of symbol. */\r
+  Elf64_Addr  st_value;  /* Symbol value. */\r
+  Elf64_Xword  st_size;  /* Size of associated object. */\r
 } Elf64_Sym;\r
 \r
 /* Macros for accessing the fields of st_info. */\r
-#define ELF64_ST_BIND(info)            ((info) >> 4)\r
-#define ELF64_ST_TYPE(info)            ((info) & 0xf)\r
+#define ELF64_ST_BIND(info)    ((info) >> 4)\r
+#define ELF64_ST_TYPE(info)    ((info) & 0xf)\r
 \r
 /* Macro for constructing st_info from field values. */\r
-#define ELF64_ST_INFO(bind, type)      (((bind) << 4) + ((type) & 0xf))\r
+#define ELF64_ST_INFO(bind, type)  (((bind) << 4) + ((type) & 0xf))\r
 \r
 /* Macro for accessing the fields of st_other. */\r
-#define ELF64_ST_VISIBILITY(oth)       ((oth) & 0x3)\r
+#define ELF64_ST_VISIBILITY(oth)  ((oth) & 0x3)\r
 \r
 /* Structures used by Sun & GNU-style symbol versioning. */\r
 typedef struct {\r
-       Elf64_Half      vd_version;\r
-       Elf64_Half      vd_flags;\r
-       Elf64_Half      vd_ndx;\r
-       Elf64_Half      vd_cnt;\r
-       Elf64_Word      vd_hash;\r
-       Elf64_Word      vd_aux;\r
-       Elf64_Word      vd_next;\r
+  Elf64_Half  vd_version;\r
+  Elf64_Half  vd_flags;\r
+  Elf64_Half  vd_ndx;\r
+  Elf64_Half  vd_cnt;\r
+  Elf64_Word  vd_hash;\r
+  Elf64_Word  vd_aux;\r
+  Elf64_Word  vd_next;\r
 } Elf64_Verdef;\r
 \r
 typedef struct {\r
-       Elf64_Word      vda_name;\r
-       Elf64_Word      vda_next;\r
+  Elf64_Word  vda_name;\r
+  Elf64_Word  vda_next;\r
 } Elf64_Verdaux;\r
 \r
 typedef struct {\r
-       Elf64_Half      vn_version;\r
-       Elf64_Half      vn_cnt;\r
-       Elf64_Word      vn_file;\r
-       Elf64_Word      vn_aux;\r
-       Elf64_Word      vn_next;\r
+  Elf64_Half  vn_version;\r
+  Elf64_Half  vn_cnt;\r
+  Elf64_Word  vn_file;\r
+  Elf64_Word  vn_aux;\r
+  Elf64_Word  vn_next;\r
 } Elf64_Verneed;\r
 \r
 typedef struct {\r
-       Elf64_Word      vna_hash;\r
-       Elf64_Half      vna_flags;\r
-       Elf64_Half      vna_other;\r
-       Elf64_Word      vna_name;\r
-       Elf64_Word      vna_next;\r
+  Elf64_Word  vna_hash;\r
+  Elf64_Half  vna_flags;\r
+  Elf64_Half  vna_other;\r
+  Elf64_Word  vna_name;\r
+  Elf64_Word  vna_next;\r
 } Elf64_Vernaux;\r
 \r
 typedef Elf64_Half Elf64_Versym;\r
 \r
 typedef struct {\r
-       Elf64_Half      si_boundto;     /* direct bindings - symbol bound to */\r
-       Elf64_Half      si_flags;       /* per symbol flags */\r
+  Elf64_Half  si_boundto;  /* direct bindings - symbol bound to */\r
+  Elf64_Half  si_flags;  /* per symbol flags */\r
 } Elf64_Syminfo;\r
 \r
 #endif /* !_SYS_ELF64_H_ */\r
index 766d0e42efc9539c3675a0146c28b61cb7a6f6bf..242ad00a0a775a4c7532bff9154d649edd85e548 100644 (file)
@@ -58,314 +58,314 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  */\r
 \r
 typedef struct {\r
-       UINT32  n_namesz;       /* Length of name. */\r
-       UINT32  n_descsz;       /* Length of descriptor. */\r
-       UINT32  n_type;         /* Type of this note. */\r
+  UINT32  n_namesz;  /* Length of name. */\r
+  UINT32  n_descsz;  /* Length of descriptor. */\r
+  UINT32  n_type;    /* Type of this note. */\r
 } Elf_Note;\r
 \r
 /* Indexes into the e_ident array.  Keep synced with\r
    http://www.sco.com/developers/gabi/latest/ch4.eheader.html */\r
-#define EI_MAG0                0       /* Magic number, byte 0. */\r
-#define EI_MAG1                1       /* Magic number, byte 1. */\r
-#define EI_MAG2                2       /* Magic number, byte 2. */\r
-#define EI_MAG3                3       /* Magic number, byte 3. */\r
-#define EI_CLASS       4       /* Class of machine. */\r
-#define EI_DATA                5       /* Data format. */\r
-#define EI_VERSION     6       /* ELF format version. */\r
-#define EI_OSABI       7       /* Operating system / ABI identification */\r
-#define EI_ABIVERSION  8       /* ABI version */\r
-#define OLD_EI_BRAND   8       /* Start of architecture identification. */\r
-#define EI_PAD         9       /* Start of padding (per SVR4 ABI). */\r
-#define EI_NIDENT      16      /* Size of e_ident array. */\r
+#define EI_MAG0    0  /* Magic number, byte 0. */\r
+#define EI_MAG1    1  /* Magic number, byte 1. */\r
+#define EI_MAG2    2  /* Magic number, byte 2. */\r
+#define EI_MAG3    3  /* Magic number, byte 3. */\r
+#define EI_CLASS  4  /* Class of machine. */\r
+#define EI_DATA    5  /* Data format. */\r
+#define EI_VERSION  6  /* ELF format version. */\r
+#define EI_OSABI  7  /* Operating system / ABI identification */\r
+#define EI_ABIVERSION  8  /* ABI version */\r
+#define OLD_EI_BRAND  8  /* Start of architecture identification. */\r
+#define EI_PAD    9  /* Start of padding (per SVR4 ABI). */\r
+#define EI_NIDENT  16  /* Size of e_ident array. */\r
 \r
 /* Values for the magic number bytes. */\r
-#define ELFMAG0                0x7f\r
-#define ELFMAG1                'E'\r
-#define ELFMAG2                'L'\r
-#define ELFMAG3                'F'\r
-#define ELFMAG         "\177ELF"       /* magic string */\r
-#define SELFMAG                4               /* magic string size */\r
+#define ELFMAG0    0x7f\r
+#define ELFMAG1    'E'\r
+#define ELFMAG2    'L'\r
+#define ELFMAG3    'F'\r
+#define ELFMAG    "\177ELF"  /* magic string */\r
+#define SELFMAG    4    /* magic string size */\r
 \r
 /* Values for e_ident[EI_VERSION] and e_version. */\r
-#define EV_NONE                0\r
-#define EV_CURRENT     1\r
+#define EV_NONE    0\r
+#define EV_CURRENT  1\r
 \r
 /* Values for e_ident[EI_CLASS]. */\r
-#define ELFCLASSNONE   0       /* Unknown class. */\r
-#define ELFCLASS32     1       /* 32-bit architecture. */\r
-#define ELFCLASS64     2       /* 64-bit architecture. */\r
+#define ELFCLASSNONE  0  /* Unknown class. */\r
+#define ELFCLASS32  1  /* 32-bit architecture. */\r
+#define ELFCLASS64  2  /* 64-bit architecture. */\r
 \r
 /* Values for e_ident[EI_DATA]. */\r
-#define ELFDATANONE    0       /* Unknown data format. */\r
-#define ELFDATA2LSB    1       /* 2's complement little-endian. */\r
-#define ELFDATA2MSB    2       /* 2's complement big-endian. */\r
+#define ELFDATANONE  0  /* Unknown data format. */\r
+#define ELFDATA2LSB  1  /* 2's complement little-endian. */\r
+#define ELFDATA2MSB  2  /* 2's complement big-endian. */\r
 \r
 /* Values for e_ident[EI_OSABI]. */\r
-#define ELFOSABI_NONE          0       /* UNIX System V ABI */\r
-#define ELFOSABI_HPUX          1       /* HP-UX operating system */\r
-#define ELFOSABI_NETBSD                2       /* NetBSD */\r
-#define ELFOSABI_LINUX         3       /* GNU/Linux */\r
-#define ELFOSABI_HURD          4       /* GNU/Hurd */\r
-#define ELFOSABI_86OPEN                5       /* 86Open common IA32 ABI */\r
-#define ELFOSABI_SOLARIS       6       /* Solaris */\r
-#define ELFOSABI_AIX           7       /* AIX */\r
-#define ELFOSABI_IRIX          8       /* IRIX */\r
-#define ELFOSABI_FREEBSD       9       /* FreeBSD */\r
-#define ELFOSABI_TRU64         10      /* TRU64 UNIX */\r
-#define ELFOSABI_MODESTO       11      /* Novell Modesto */\r
-#define ELFOSABI_OPENBSD       12      /* OpenBSD */\r
-#define ELFOSABI_OPENVMS       13      /* Open VMS */\r
-#define ELFOSABI_NSK           14      /* HP Non-Stop Kernel */\r
-#define ELFOSABI_ARM           97      /* ARM */\r
-#define ELFOSABI_STANDALONE    255     /* Standalone (embedded) application */\r
+#define ELFOSABI_NONE    0  /* UNIX System V ABI */\r
+#define ELFOSABI_HPUX    1  /* HP-UX operating system */\r
+#define ELFOSABI_NETBSD    2  /* NetBSD */\r
+#define ELFOSABI_LINUX    3  /* GNU/Linux */\r
+#define ELFOSABI_HURD    4  /* GNU/Hurd */\r
+#define ELFOSABI_86OPEN    5  /* 86Open common IA32 ABI */\r
+#define ELFOSABI_SOLARIS  6  /* Solaris */\r
+#define ELFOSABI_AIX    7  /* AIX */\r
+#define ELFOSABI_IRIX    8  /* IRIX */\r
+#define ELFOSABI_FREEBSD  9  /* FreeBSD */\r
+#define ELFOSABI_TRU64    10  /* TRU64 UNIX */\r
+#define ELFOSABI_MODESTO  11  /* Novell Modesto */\r
+#define ELFOSABI_OPENBSD  12  /* OpenBSD */\r
+#define ELFOSABI_OPENVMS  13  /* Open VMS */\r
+#define ELFOSABI_NSK    14  /* HP Non-Stop Kernel */\r
+#define ELFOSABI_ARM    97  /* ARM */\r
+#define ELFOSABI_STANDALONE  255  /* Standalone (embedded) application */\r
 \r
-#define ELFOSABI_SYSV          ELFOSABI_NONE   /* symbol used in old spec */\r
-#define ELFOSABI_MONTEREY      ELFOSABI_AIX    /* Monterey */\r
+#define ELFOSABI_SYSV    ELFOSABI_NONE  /* symbol used in old spec */\r
+#define ELFOSABI_MONTEREY  ELFOSABI_AIX  /* Monterey */\r
 \r
 /* e_ident */\r
-#define IS_ELF(ehdr)   ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \\r
-                        (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \\r
-                        (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \\r
-                        (ehdr).e_ident[EI_MAG3] == ELFMAG3)\r
+#define IS_ELF(ehdr)  ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \\r
+       (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \\r
+       (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \\r
+       (ehdr).e_ident[EI_MAG3] == ELFMAG3)\r
 \r
 /* Values for e_type. */\r
-#define ET_NONE                0       /* Unknown type. */\r
-#define ET_REL         1       /* Relocatable. */\r
-#define ET_EXEC                2       /* Executable. */\r
-#define ET_DYN         3       /* Shared object. */\r
-#define ET_CORE                4       /* Core file. */\r
-#define ET_LOOS                0xfe00  /* First operating system specific. */\r
-#define ET_HIOS                0xfeff  /* Last operating system-specific. */\r
-#define ET_LOPROC      0xff00  /* First processor-specific. */\r
-#define ET_HIPROC      0xffff  /* Last processor-specific. */\r
+#define ET_NONE    0  /* Unknown type. */\r
+#define ET_REL    1  /* Relocatable. */\r
+#define ET_EXEC    2  /* Executable. */\r
+#define ET_DYN    3  /* Shared object. */\r
+#define ET_CORE    4  /* Core file. */\r
+#define ET_LOOS    0xfe00  /* First operating system specific. */\r
+#define ET_HIOS    0xfeff  /* Last operating system-specific. */\r
+#define ET_LOPROC  0xff00  /* First processor-specific. */\r
+#define ET_HIPROC  0xffff  /* Last processor-specific. */\r
 \r
 /* Values for e_machine. */\r
-#define EM_NONE                0       /* Unknown machine. */\r
-#define EM_M32         1       /* AT&T WE32100. */\r
-#define EM_SPARC       2       /* Sun SPARC. */\r
-#define EM_386         3       /* Intel i386. */\r
-#define EM_68K         4       /* Motorola 68000. */\r
-#define EM_88K         5       /* Motorola 88000. */\r
-#define EM_860         7       /* Intel i860. */\r
-#define EM_MIPS                8       /* MIPS R3000 Big-Endian only. */\r
-#define EM_S370                9       /* IBM System/370. */\r
-#define EM_MIPS_RS3_LE 10      /* MIPS R3000 Little-Endian. */\r
-#define EM_PARISC      15      /* HP PA-RISC. */\r
-#define EM_VPP500      17      /* Fujitsu VPP500. */\r
-#define EM_SPARC32PLUS 18      /* SPARC v8plus. */\r
-#define EM_960         19      /* Intel 80960. */\r
-#define EM_PPC         20      /* PowerPC 32-bit. */\r
-#define EM_PPC64       21      /* PowerPC 64-bit. */\r
-#define EM_S390                22      /* IBM System/390. */\r
-#define EM_V800                36      /* NEC V800. */\r
-#define EM_FR20                37      /* Fujitsu FR20. */\r
-#define EM_RH32                38      /* TRW RH-32. */\r
-#define EM_RCE         39      /* Motorola RCE. */\r
-#define EM_ARM         40      /* ARM. */\r
-#define EM_SH          42      /* Hitachi SH. */\r
-#define EM_SPARCV9     43      /* SPARC v9 64-bit. */\r
-#define EM_TRICORE     44      /* Siemens TriCore embedded processor. */\r
-#define EM_ARC         45      /* Argonaut RISC Core. */\r
-#define EM_H8_300      46      /* Hitachi H8/300. */\r
-#define EM_H8_300H     47      /* Hitachi H8/300H. */\r
-#define EM_H8S         48      /* Hitachi H8S. */\r
-#define EM_H8_500      49      /* Hitachi H8/500. */\r
-#define EM_IA_64       50      /* Intel IA-64 Processor. */\r
-#define EM_MIPS_X      51      /* Stanford MIPS-X. */\r
-#define EM_COLDFIRE    52      /* Motorola ColdFire. */\r
-#define EM_68HC12      53      /* Motorola M68HC12. */\r
-#define EM_MMA         54      /* Fujitsu MMA. */\r
-#define EM_PCP         55      /* Siemens PCP. */\r
-#define EM_NCPU                56      /* Sony nCPU. */\r
-#define EM_NDR1                57      /* Denso NDR1 microprocessor. */\r
-#define EM_STARCORE    58      /* Motorola Star*Core processor. */\r
-#define EM_ME16                59      /* Toyota ME16 processor. */\r
-#define EM_ST100       60      /* STMicroelectronics ST100 processor. */\r
-#define EM_TINYJ       61      /* Advanced Logic Corp. TinyJ processor. */\r
-#define EM_X86_64      62      /* Advanced Micro Devices x86-64 */\r
-#define        EM_AMD64        EM_X86_64       /* Advanced Micro Devices x86-64 (compat) */\r
-#define EM_AARCH64     183     /* ARM 64bit Architecture */\r
+#define EM_NONE    0  /* Unknown machine. */\r
+#define EM_M32    1  /* AT&T WE32100. */\r
+#define EM_SPARC  2  /* Sun SPARC. */\r
+#define EM_386    3  /* Intel i386. */\r
+#define EM_68K    4  /* Motorola 68000. */\r
+#define EM_88K    5  /* Motorola 88000. */\r
+#define EM_860    7  /* Intel i860. */\r
+#define EM_MIPS    8  /* MIPS R3000 Big-Endian only. */\r
+#define EM_S370    9  /* IBM System/370. */\r
+#define EM_MIPS_RS3_LE  10  /* MIPS R3000 Little-Endian. */\r
+#define EM_PARISC  15  /* HP PA-RISC. */\r
+#define EM_VPP500  17  /* Fujitsu VPP500. */\r
+#define EM_SPARC32PLUS  18  /* SPARC v8plus. */\r
+#define EM_960    19  /* Intel 80960. */\r
+#define EM_PPC    20  /* PowerPC 32-bit. */\r
+#define EM_PPC64  21  /* PowerPC 64-bit. */\r
+#define EM_S390    22  /* IBM System/390. */\r
+#define EM_V800    36  /* NEC V800. */\r
+#define EM_FR20    37  /* Fujitsu FR20. */\r
+#define EM_RH32    38  /* TRW RH-32. */\r
+#define EM_RCE    39  /* Motorola RCE. */\r
+#define EM_ARM    40  /* ARM. */\r
+#define EM_SH    42  /* Hitachi SH. */\r
+#define EM_SPARCV9  43  /* SPARC v9 64-bit. */\r
+#define EM_TRICORE  44  /* Siemens TriCore embedded processor. */\r
+#define EM_ARC    45  /* Argonaut RISC Core. */\r
+#define EM_H8_300  46  /* Hitachi H8/300. */\r
+#define EM_H8_300H  47  /* Hitachi H8/300H. */\r
+#define EM_H8S    48  /* Hitachi H8S. */\r
+#define EM_H8_500  49  /* Hitachi H8/500. */\r
+#define EM_IA_64  50  /* Intel IA-64 Processor. */\r
+#define EM_MIPS_X  51  /* Stanford MIPS-X. */\r
+#define EM_COLDFIRE  52  /* Motorola ColdFire. */\r
+#define EM_68HC12  53  /* Motorola M68HC12. */\r
+#define EM_MMA    54  /* Fujitsu MMA. */\r
+#define EM_PCP    55  /* Siemens PCP. */\r
+#define EM_NCPU    56  /* Sony nCPU. */\r
+#define EM_NDR1    57  /* Denso NDR1 microprocessor. */\r
+#define EM_STARCORE  58  /* Motorola Star*Core processor. */\r
+#define EM_ME16    59  /* Toyota ME16 processor. */\r
+#define EM_ST100  60  /* STMicroelectronics ST100 processor. */\r
+#define EM_TINYJ  61  /* Advanced Logic Corp. TinyJ processor. */\r
+#define EM_X86_64  62  /* Advanced Micro Devices x86-64 */\r
+#define  EM_AMD64  EM_X86_64  /* Advanced Micro Devices x86-64 (compat) */\r
+#define EM_AARCH64  183  /* ARM 64bit Architecture */\r
 \r
 /* Non-standard or deprecated. */\r
-#define EM_486         6       /* Intel i486. */\r
-#define EM_MIPS_RS4_BE 10      /* MIPS R4000 Big-Endian */\r
-#define EM_ALPHA_STD   41      /* Digital Alpha (standard value). */\r
-#define EM_ALPHA       0x9026  /* Alpha (written in the absence of an ABI) */\r
+#define EM_486    6  /* Intel i486. */\r
+#define EM_MIPS_RS4_BE  10  /* MIPS R4000 Big-Endian */\r
+#define EM_ALPHA_STD  41  /* Digital Alpha (standard value). */\r
+#define EM_ALPHA  0x9026  /* Alpha (written in the absence of an ABI) */\r
 \r
 /* Special section indexes. */\r
-#define SHN_UNDEF           0          /* Undefined, missing, irrelevant. */\r
-#define SHN_LORESERVE  0xff00          /* First of reserved range. */\r
-#define SHN_LOPROC     0xff00          /* First processor-specific. */\r
-#define SHN_HIPROC     0xff1f          /* Last processor-specific. */\r
-#define SHN_LOOS       0xff20          /* First operating system-specific. */\r
-#define SHN_HIOS       0xff3f          /* Last operating system-specific. */\r
-#define SHN_ABS                0xfff1          /* Absolute values. */\r
-#define SHN_COMMON     0xfff2          /* Common data. */\r
-#define SHN_XINDEX     0xffff          /* Escape -- index stored elsewhere. */\r
-#define SHN_HIRESERVE  0xffff          /* Last of reserved range. */\r
+#define SHN_UNDEF       0    /* Undefined, missing, irrelevant. */\r
+#define SHN_LORESERVE  0xff00    /* First of reserved range. */\r
+#define SHN_LOPROC  0xff00    /* First processor-specific. */\r
+#define SHN_HIPROC  0xff1f    /* Last processor-specific. */\r
+#define SHN_LOOS  0xff20    /* First operating system-specific. */\r
+#define SHN_HIOS  0xff3f    /* Last operating system-specific. */\r
+#define SHN_ABS    0xfff1    /* Absolute values. */\r
+#define SHN_COMMON  0xfff2    /* Common data. */\r
+#define SHN_XINDEX  0xffff    /* Escape -- index stored elsewhere. */\r
+#define SHN_HIRESERVE  0xffff    /* Last of reserved range. */\r
 \r
 /* sh_type */\r
-#define SHT_NULL               0       /* inactive */\r
-#define SHT_PROGBITS           1       /* program defined information */\r
-#define SHT_SYMTAB             2       /* symbol table section */\r
-#define SHT_STRTAB             3       /* string table section */\r
-#define SHT_RELA               4       /* relocation section with addends */\r
-#define SHT_HASH               5       /* symbol hash table section */\r
-#define SHT_DYNAMIC            6       /* dynamic section */ \r
-#define SHT_NOTE               7       /* note section */\r
-#define SHT_NOBITS             8       /* no space section */\r
-#define SHT_REL                        9       /* relocation section - no addends */\r
-#define SHT_SHLIB              10      /* reserved - purpose unknown */\r
-#define SHT_DYNSYM             11      /* dynamic symbol table section */ \r
-#define SHT_INIT_ARRAY         14      /* Initialization function pointers. */\r
-#define SHT_FINI_ARRAY         15      /* Termination function pointers. */\r
-#define SHT_PREINIT_ARRAY      16      /* Pre-initialization function ptrs. */\r
-#define SHT_GROUP              17      /* Section group. */\r
-#define SHT_SYMTAB_SHNDX       18      /* Section indexes (see SHN_XINDEX). */\r
-#define SHT_LOOS               0x60000000      /* First of OS specific semantics */\r
-#define SHT_LOSUNW             0x6ffffff4\r
-#define SHT_SUNW_dof           0x6ffffff4\r
-#define SHT_SUNW_cap           0x6ffffff5\r
-#define SHT_SUNW_SIGNATURE     0x6ffffff6\r
-#define SHT_SUNW_ANNOTATE      0x6ffffff7\r
-#define SHT_SUNW_DEBUGSTR      0x6ffffff8\r
-#define SHT_SUNW_DEBUG         0x6ffffff9\r
-#define SHT_SUNW_move          0x6ffffffa\r
-#define SHT_SUNW_COMDAT                0x6ffffffb\r
-#define SHT_SUNW_syminfo       0x6ffffffc\r
-#define SHT_SUNW_verdef                0x6ffffffd\r
-#define SHT_GNU_verdef         0x6ffffffd      /* Symbol versions provided */\r
-#define SHT_SUNW_verneed       0x6ffffffe\r
-#define SHT_GNU_verneed                0x6ffffffe      /* Symbol versions required */\r
-#define SHT_SUNW_versym                0x6fffffff\r
-#define SHT_GNU_versym         0x6fffffff      /* Symbol version table */\r
-#define SHT_HISUNW             0x6fffffff\r
-#define SHT_HIOS               0x6fffffff      /* Last of OS specific semantics */\r
-#define SHT_LOPROC             0x70000000      /* reserved range for processor */\r
-#define SHT_AMD64_UNWIND       0x70000001      /* unwind information */\r
-#define SHT_HIPROC             0x7fffffff      /* specific section header types */\r
-#define SHT_LOUSER             0x80000000      /* reserved range for application */\r
-#define SHT_HIUSER             0xffffffff      /* specific indexes */\r
+#define SHT_NULL    0  /* inactive */\r
+#define SHT_PROGBITS    1  /* program defined information */\r
+#define SHT_SYMTAB    2  /* symbol table section */\r
+#define SHT_STRTAB    3  /* string table section */\r
+#define SHT_RELA    4  /* relocation section with addends */\r
+#define SHT_HASH    5  /* symbol hash table section */\r
+#define SHT_DYNAMIC    6  /* dynamic section */\r
+#define SHT_NOTE    7  /* note section */\r
+#define SHT_NOBITS    8  /* no space section */\r
+#define SHT_REL      9  /* relocation section - no addends */\r
+#define SHT_SHLIB    10  /* reserved - purpose unknown */\r
+#define SHT_DYNSYM    11  /* dynamic symbol table section */\r
+#define SHT_INIT_ARRAY    14  /* Initialization function pointers. */\r
+#define SHT_FINI_ARRAY    15  /* Termination function pointers. */\r
+#define SHT_PREINIT_ARRAY  16  /* Pre-initialization function ptrs. */\r
+#define SHT_GROUP    17  /* Section group. */\r
+#define SHT_SYMTAB_SHNDX  18  /* Section indexes (see SHN_XINDEX). */\r
+#define SHT_LOOS    0x60000000  /* First of OS specific semantics */\r
+#define SHT_LOSUNW    0x6ffffff4\r
+#define SHT_SUNW_dof    0x6ffffff4\r
+#define SHT_SUNW_cap    0x6ffffff5\r
+#define SHT_SUNW_SIGNATURE  0x6ffffff6\r
+#define SHT_SUNW_ANNOTATE  0x6ffffff7\r
+#define SHT_SUNW_DEBUGSTR  0x6ffffff8\r
+#define SHT_SUNW_DEBUG    0x6ffffff9\r
+#define SHT_SUNW_move    0x6ffffffa\r
+#define SHT_SUNW_COMDAT    0x6ffffffb\r
+#define SHT_SUNW_syminfo  0x6ffffffc\r
+#define SHT_SUNW_verdef    0x6ffffffd\r
+#define SHT_GNU_verdef    0x6ffffffd  /* Symbol versions provided */\r
+#define SHT_SUNW_verneed  0x6ffffffe\r
+#define SHT_GNU_verneed    0x6ffffffe  /* Symbol versions required */\r
+#define SHT_SUNW_versym    0x6fffffff\r
+#define SHT_GNU_versym    0x6fffffff  /* Symbol version table */\r
+#define SHT_HISUNW    0x6fffffff\r
+#define SHT_HIOS    0x6fffffff  /* Last of OS specific semantics */\r
+#define SHT_LOPROC    0x70000000  /* reserved range for processor */\r
+#define SHT_AMD64_UNWIND  0x70000001  /* unwind information */\r
+#define SHT_HIPROC    0x7fffffff  /* specific section header types */\r
+#define SHT_LOUSER    0x80000000  /* reserved range for application */\r
+#define SHT_HIUSER    0xffffffff  /* specific indexes */\r
 \r
 /* Flags for sh_flags. */\r
-#define SHF_WRITE              0x1     /* Section contains writable data. */\r
-#define SHF_ALLOC              0x2     /* Section occupies memory. */\r
-#define SHF_EXECINSTR          0x4     /* Section contains instructions. */\r
-#define SHF_MERGE              0x10    /* Section may be merged. */\r
-#define SHF_STRINGS            0x20    /* Section contains strings. */\r
-#define SHF_INFO_LINK          0x40    /* sh_info holds section index. */\r
-#define SHF_LINK_ORDER         0x80    /* Special ordering requirements. */\r
-#define SHF_OS_NONCONFORMING   0x100   /* OS-specific processing required. */\r
-#define SHF_GROUP              0x200   /* Member of section group. */\r
-#define SHF_TLS                        0x400   /* Section contains TLS data. */\r
-#define SHF_MASKOS     0x0ff00000      /* OS-specific semantics. */\r
-#define SHF_MASKPROC   0xf0000000      /* Processor-specific semantics. */\r
+#define SHF_WRITE    0x1  /* Section contains writable data. */\r
+#define SHF_ALLOC    0x2  /* Section occupies memory. */\r
+#define SHF_EXECINSTR    0x4  /* Section contains instructions. */\r
+#define SHF_MERGE    0x10  /* Section may be merged. */\r
+#define SHF_STRINGS    0x20  /* Section contains strings. */\r
+#define SHF_INFO_LINK    0x40  /* sh_info holds section index. */\r
+#define SHF_LINK_ORDER    0x80  /* Special ordering requirements. */\r
+#define SHF_OS_NONCONFORMING  0x100  /* OS-specific processing required. */\r
+#define SHF_GROUP    0x200  /* Member of section group. */\r
+#define SHF_TLS      0x400  /* Section contains TLS data. */\r
+#define SHF_MASKOS  0x0ff00000  /* OS-specific semantics. */\r
+#define SHF_MASKPROC  0xf0000000  /* Processor-specific semantics. */\r
 \r
 /* Values for p_type. */\r
-#define PT_NULL                0       /* Unused entry. */\r
-#define PT_LOAD                1       /* Loadable segment. */\r
-#define PT_DYNAMIC     2       /* Dynamic linking information segment. */\r
-#define PT_INTERP      3       /* Pathname of interpreter. */\r
-#define PT_NOTE                4       /* Auxiliary information. */\r
-#define PT_SHLIB       5       /* Reserved (not used). */\r
-#define PT_PHDR                6       /* Location of program header itself. */\r
-#define        PT_TLS          7       /* Thread local storage segment */\r
-#define PT_LOOS                0x60000000      /* First OS-specific. */\r
-#define        PT_SUNW_UNWIND  0x6464e550      /* amd64 UNWIND program header */\r
-#define        PT_GNU_EH_FRAME 0x6474e550\r
-#define        PT_LOSUNW       0x6ffffffa\r
-#define        PT_SUNWBSS      0x6ffffffa      /* Sun Specific segment */\r
-#define        PT_SUNWSTACK    0x6ffffffb      /* describes the stack segment */\r
-#define        PT_SUNWDTRACE   0x6ffffffc      /* private */\r
-#define        PT_SUNWCAP      0x6ffffffd      /* hard/soft capabilities segment */\r
-#define        PT_HISUNW       0x6fffffff\r
-#define PT_HIOS                0x6fffffff      /* Last OS-specific. */\r
-#define PT_LOPROC      0x70000000      /* First processor-specific type. */\r
-#define PT_HIPROC      0x7fffffff      /* Last processor-specific type. */\r
+#define PT_NULL    0  /* Unused entry. */\r
+#define PT_LOAD    1  /* Loadable segment. */\r
+#define PT_DYNAMIC  2  /* Dynamic linking information segment. */\r
+#define PT_INTERP  3  /* Pathname of interpreter. */\r
+#define PT_NOTE    4  /* Auxiliary information. */\r
+#define PT_SHLIB  5  /* Reserved (not used). */\r
+#define PT_PHDR    6  /* Location of program header itself. */\r
+#define  PT_TLS    7  /* Thread local storage segment */\r
+#define PT_LOOS    0x60000000  /* First OS-specific. */\r
+#define  PT_SUNW_UNWIND  0x6464e550  /* amd64 UNWIND program header */\r
+#define  PT_GNU_EH_FRAME  0x6474e550\r
+#define  PT_LOSUNW  0x6ffffffa\r
+#define  PT_SUNWBSS  0x6ffffffa  /* Sun Specific segment */\r
+#define  PT_SUNWSTACK  0x6ffffffb  /* describes the stack segment */\r
+#define  PT_SUNWDTRACE  0x6ffffffc  /* private */\r
+#define  PT_SUNWCAP  0x6ffffffd  /* hard/soft capabilities segment */\r
+#define  PT_HISUNW  0x6fffffff\r
+#define PT_HIOS    0x6fffffff  /* Last OS-specific. */\r
+#define PT_LOPROC  0x70000000  /* First processor-specific type. */\r
+#define PT_HIPROC  0x7fffffff  /* Last processor-specific type. */\r
 \r
 /* Values for p_flags. */\r
-#define PF_X           0x1             /* Executable. */\r
-#define PF_W           0x2             /* Writable. */\r
-#define PF_R           0x4             /* Readable. */\r
-#define PF_MASKOS      0x0ff00000      /* Operating system-specific. */\r
-#define PF_MASKPROC    0xf0000000      /* Processor-specific. */\r
+#define PF_X    0x1    /* Executable. */\r
+#define PF_W    0x2    /* Writable. */\r
+#define PF_R    0x4    /* Readable. */\r
+#define PF_MASKOS  0x0ff00000  /* Operating system-specific. */\r
+#define PF_MASKPROC  0xf0000000  /* Processor-specific. */\r
 \r
 /* Extended program header index. */\r
-#define        PN_XNUM         0xffff\r
+#define  PN_XNUM    0xffff\r
 \r
 /* Values for d_tag. */\r
-#define DT_NULL                0       /* Terminating entry. */\r
-#define DT_NEEDED      1       /* String table offset of a needed shared\r
-                                  library. */\r
-#define DT_PLTRELSZ    2       /* Total size in bytes of PLT relocations. */\r
-#define DT_PLTGOT      3       /* Processor-dependent address. */\r
-#define DT_HASH                4       /* Address of symbol hash table. */\r
-#define DT_STRTAB      5       /* Address of string table. */\r
-#define DT_SYMTAB      6       /* Address of symbol table. */\r
-#define DT_RELA                7       /* Address of ElfNN_Rela relocations. */\r
-#define DT_RELASZ      8       /* Total size of ElfNN_Rela relocations. */\r
-#define DT_RELAENT     9       /* Size of each ElfNN_Rela relocation entry. */\r
-#define DT_STRSZ       10      /* Size of string table. */\r
-#define DT_SYMENT      11      /* Size of each symbol table entry. */\r
-#define DT_INIT                12      /* Address of initialization function. */\r
-#define DT_FINI                13      /* Address of finalization function. */\r
-#define DT_SONAME      14      /* String table offset of shared object\r
-                                  name. */\r
-#define DT_RPATH       15      /* String table offset of library path. [sup] */\r
-#define DT_SYMBOLIC    16      /* Indicates "symbolic" linking. [sup] */\r
-#define DT_REL         17      /* Address of ElfNN_Rel relocations. */\r
-#define DT_RELSZ       18      /* Total size of ElfNN_Rel relocations. */\r
-#define DT_RELENT      19      /* Size of each ElfNN_Rel relocation. */\r
-#define DT_PLTREL      20      /* Type of relocation used for PLT. */\r
-#define DT_DEBUG       21      /* Reserved (not used). */\r
-#define DT_TEXTREL     22      /* Indicates there may be relocations in\r
-                                  non-writable segments. [sup] */\r
-#define DT_JMPREL      23      /* Address of PLT relocations. */\r
-#define        DT_BIND_NOW     24      /* [sup] */\r
-#define        DT_INIT_ARRAY   25      /* Address of the array of pointers to\r
-                                  initialization functions */\r
-#define        DT_FINI_ARRAY   26      /* Address of the array of pointers to\r
-                                  termination functions */\r
-#define        DT_INIT_ARRAYSZ 27      /* Size in bytes of the array of\r
-                                  initialization functions. */\r
-#define        DT_FINI_ARRAYSZ 28      /* Size in bytes of the array of\r
-                                  terminationfunctions. */\r
-#define        DT_RUNPATH      29      /* String table offset of a null-terminated\r
-                                  library search path string. */\r
-#define        DT_FLAGS        30      /* Object specific flag values. */\r
-#define        DT_ENCODING     32      /* Values greater than or equal to DT_ENCODING\r
-                                  and less than DT_LOOS follow the rules for\r
-                                  the interpretation of the d_un union\r
-                                  as follows: even == 'd_ptr', even == 'd_val'\r
-                                  or none */\r
-#define        DT_PREINIT_ARRAY 32     /* Address of the array of pointers to\r
-                                  pre-initialization functions. */\r
-#define        DT_PREINIT_ARRAYSZ 33   /* Size in bytes of the array of\r
-                                  pre-initialization functions. */\r
-#define        DT_MAXPOSTAGS   34      /* number of positive tags */\r
-#define        DT_LOOS         0x6000000d      /* First OS-specific */\r
-#define        DT_SUNW_AUXILIARY       0x6000000d      /* symbol auxiliary name */\r
-#define        DT_SUNW_RTLDINF         0x6000000e      /* ld.so.1 info (private) */\r
-#define        DT_SUNW_FILTER          0x6000000f      /* symbol filter name */\r
-#define        DT_SUNW_CAP             0x60000010      /* hardware/software */\r
-#define        DT_HIOS         0x6ffff000      /* Last OS-specific */\r
+#define DT_NULL    0  /* Terminating entry. */\r
+#define DT_NEEDED  1  /* String table offset of a needed shared\r
+           library. */\r
+#define DT_PLTRELSZ  2  /* Total size in bytes of PLT relocations. */\r
+#define DT_PLTGOT  3  /* Processor-dependent address. */\r
+#define DT_HASH    4  /* Address of symbol hash table. */\r
+#define DT_STRTAB  5  /* Address of string table. */\r
+#define DT_SYMTAB  6  /* Address of symbol table. */\r
+#define DT_RELA    7  /* Address of ElfNN_Rela relocations. */\r
+#define DT_RELASZ  8  /* Total size of ElfNN_Rela relocations. */\r
+#define DT_RELAENT  9  /* Size of each ElfNN_Rela relocation entry. */\r
+#define DT_STRSZ  10  /* Size of string table. */\r
+#define DT_SYMENT  11  /* Size of each symbol table entry. */\r
+#define DT_INIT    12  /* Address of initialization function. */\r
+#define DT_FINI    13  /* Address of finalization function. */\r
+#define DT_SONAME  14  /* String table offset of shared object\r
+           name. */\r
+#define DT_RPATH  15  /* String table offset of library path. [sup] */\r
+#define DT_SYMBOLIC  16  /* Indicates "symbolic" linking. [sup] */\r
+#define DT_REL    17  /* Address of ElfNN_Rel relocations. */\r
+#define DT_RELSZ  18  /* Total size of ElfNN_Rel relocations. */\r
+#define DT_RELENT  19  /* Size of each ElfNN_Rel relocation. */\r
+#define DT_PLTREL  20  /* Type of relocation used for PLT. */\r
+#define DT_DEBUG  21  /* Reserved (not used). */\r
+#define DT_TEXTREL  22  /* Indicates there may be relocations in\r
+           non-writable segments. [sup] */\r
+#define DT_JMPREL  23  /* Address of PLT relocations. */\r
+#define  DT_BIND_NOW  24  /* [sup] */\r
+#define  DT_INIT_ARRAY  25  /* Address of the array of pointers to\r
+           initialization functions */\r
+#define  DT_FINI_ARRAY  26  /* Address of the array of pointers to\r
+           termination functions */\r
+#define  DT_INIT_ARRAYSZ  27  /* Size in bytes of the array of\r
+           initialization functions. */\r
+#define  DT_FINI_ARRAYSZ  28  /* Size in bytes of the array of\r
+           terminationfunctions. */\r
+#define  DT_RUNPATH  29  /* String table offset of a null-terminated\r
+           library search path string. */\r
+#define  DT_FLAGS  30  /* Object specific flag values. */\r
+#define  DT_ENCODING  32  /* Values greater than or equal to DT_ENCODING\r
+           and less than DT_LOOS follow the rules for\r
+           the interpretation of the d_un union\r
+           as follows: even == 'd_ptr', even == 'd_val'\r
+           or none */\r
+#define  DT_PREINIT_ARRAY 32  /* Address of the array of pointers to\r
+           pre-initialization functions. */\r
+#define  DT_PREINIT_ARRAYSZ 33  /* Size in bytes of the array of\r
+           pre-initialization functions. */\r
+#define  DT_MAXPOSTAGS  34  /* number of positive tags */\r
+#define  DT_LOOS    0x6000000d  /* First OS-specific */\r
+#define  DT_SUNW_AUXILIARY  0x6000000d  /* symbol auxiliary name */\r
+#define  DT_SUNW_RTLDINF    0x6000000e  /* ld.so.1 info (private) */\r
+#define  DT_SUNW_FILTER    0x6000000f  /* symbol filter name */\r
+#define  DT_SUNW_CAP    0x60000010  /* hardware/software */\r
+#define  DT_HIOS    0x6ffff000  /* Last OS-specific */\r
 \r
 /*\r
  * DT_* entries which fall between DT_VALRNGHI & DT_VALRNGLO use the\r
  * Dyn.d_un.d_val field of the Elf*_Dyn structure.\r
  */\r
-#define        DT_VALRNGLO     0x6ffffd00\r
-#define        DT_CHECKSUM     0x6ffffdf8      /* elf checksum */\r
-#define        DT_PLTPADSZ     0x6ffffdf9      /* pltpadding size */\r
-#define        DT_MOVEENT      0x6ffffdfa      /* move table entry size */\r
-#define        DT_MOVESZ       0x6ffffdfb      /* move table size */\r
-#define        DT_FEATURE_1    0x6ffffdfc      /* feature holder */\r
-#define        DT_POSFLAG_1    0x6ffffdfd      /* flags for DT_* entries, effecting */\r
-                                       /*      the following DT_* entry. */\r
-                                       /*      See DF_P1_* definitions */\r
-#define        DT_SYMINSZ      0x6ffffdfe      /* syminfo table size (in bytes) */\r
-#define        DT_SYMINENT     0x6ffffdff      /* syminfo entry size (in bytes) */\r
-#define        DT_VALRNGHI     0x6ffffdff\r
+#define  DT_VALRNGLO  0x6ffffd00\r
+#define  DT_CHECKSUM  0x6ffffdf8  /* elf checksum */\r
+#define  DT_PLTPADSZ  0x6ffffdf9  /* pltpadding size */\r
+#define  DT_MOVEENT  0x6ffffdfa  /* move table entry size */\r
+#define  DT_MOVESZ  0x6ffffdfb  /* move table size */\r
+#define  DT_FEATURE_1  0x6ffffdfc  /* feature holder */\r
+#define  DT_POSFLAG_1  0x6ffffdfd  /* flags for DT_* entries, effecting */\r
+          /*  the following DT_* entry. */\r
+          /*  See DF_P1_* definitions */\r
+#define  DT_SYMINSZ  0x6ffffdfe  /* syminfo table size (in bytes) */\r
+#define  DT_SYMINENT  0x6ffffdff  /* syminfo entry size (in bytes) */\r
+#define  DT_VALRNGHI  0x6ffffdff\r
 \r
 /*\r
  * DT_* entries which fall between DT_ADDRRNGHI & DT_ADDRRNGLO use the\r
@@ -374,137 +374,137 @@ typedef struct {
  * If any adjustment is made to the ELF object after it has been\r
  * built, these entries will need to be adjusted.\r
  */\r
-#define        DT_ADDRRNGLO    0x6ffffe00\r
-#define        DT_CONFIG       0x6ffffefa      /* configuration information */\r
-#define        DT_DEPAUDIT     0x6ffffefb      /* dependency auditing */\r
-#define        DT_AUDIT        0x6ffffefc      /* object auditing */\r
-#define        DT_PLTPAD       0x6ffffefd      /* pltpadding (sparcv9) */\r
-#define        DT_MOVETAB      0x6ffffefe      /* move table */\r
-#define        DT_SYMINFO      0x6ffffeff      /* syminfo table */\r
-#define        DT_ADDRRNGHI    0x6ffffeff\r
+#define  DT_ADDRRNGLO  0x6ffffe00\r
+#define  DT_CONFIG  0x6ffffefa  /* configuration information */\r
+#define  DT_DEPAUDIT  0x6ffffefb  /* dependency auditing */\r
+#define  DT_AUDIT  0x6ffffefc  /* object auditing */\r
+#define  DT_PLTPAD  0x6ffffefd  /* pltpadding (sparcv9) */\r
+#define  DT_MOVETAB  0x6ffffefe  /* move table */\r
+#define  DT_SYMINFO  0x6ffffeff  /* syminfo table */\r
+#define  DT_ADDRRNGHI  0x6ffffeff\r
 \r
-#define        DT_VERSYM       0x6ffffff0      /* Address of versym section. */\r
-#define        DT_RELACOUNT    0x6ffffff9      /* number of RELATIVE relocations */\r
-#define        DT_RELCOUNT     0x6ffffffa      /* number of RELATIVE relocations */\r
-#define        DT_FLAGS_1      0x6ffffffb      /* state flags - see DF_1_* defs */\r
-#define        DT_VERDEF       0x6ffffffc      /* Address of verdef section. */\r
-#define        DT_VERDEFNUM    0x6ffffffd      /* Number of elems in verdef section */\r
-#define        DT_VERNEED      0x6ffffffe      /* Address of verneed section. */\r
-#define        DT_VERNEEDNUM   0x6fffffff      /* Number of elems in verneed section */\r
+#define  DT_VERSYM  0x6ffffff0  /* Address of versym section. */\r
+#define  DT_RELACOUNT  0x6ffffff9  /* number of RELATIVE relocations */\r
+#define  DT_RELCOUNT  0x6ffffffa  /* number of RELATIVE relocations */\r
+#define  DT_FLAGS_1  0x6ffffffb  /* state flags - see DF_1_* defs */\r
+#define  DT_VERDEF  0x6ffffffc  /* Address of verdef section. */\r
+#define  DT_VERDEFNUM  0x6ffffffd  /* Number of elems in verdef section */\r
+#define  DT_VERNEED  0x6ffffffe  /* Address of verneed section. */\r
+#define  DT_VERNEEDNUM  0x6fffffff  /* Number of elems in verneed section */\r
 \r
-#define        DT_LOPROC       0x70000000      /* First processor-specific type. */\r
-#define        DT_DEPRECATED_SPARC_REGISTER    0x7000001\r
-#define        DT_AUXILIARY    0x7ffffffd      /* shared library auxiliary name */\r
-#define        DT_USED         0x7ffffffe      /* ignored - same as needed */\r
-#define        DT_FILTER       0x7fffffff      /* shared library filter name */\r
-#define        DT_HIPROC       0x7fffffff      /* Last processor-specific type. */\r
+#define  DT_LOPROC  0x70000000  /* First processor-specific type. */\r
+#define  DT_DEPRECATED_SPARC_REGISTER  0x7000001\r
+#define  DT_AUXILIARY  0x7ffffffd  /* shared library auxiliary name */\r
+#define  DT_USED    0x7ffffffe  /* ignored - same as needed */\r
+#define  DT_FILTER  0x7fffffff  /* shared library filter name */\r
+#define  DT_HIPROC  0x7fffffff  /* Last processor-specific type. */\r
 \r
 /* Values for DT_FLAGS */\r
-#define        DF_ORIGIN       0x0001  /* Indicates that the object being loaded may\r
-                                  make reference to the $ORIGIN substitution\r
-                                  string */\r
-#define        DF_SYMBOLIC     0x0002  /* Indicates "symbolic" linking. */\r
-#define        DF_TEXTREL      0x0004  /* Indicates there may be relocations in\r
-                                  non-writable segments. */\r
-#define        DF_BIND_NOW     0x0008  /* Indicates that the dynamic linker should\r
-                                  process all relocations for the object\r
-                                  containing this entry before transferring\r
-                                  control to the program. */\r
-#define        DF_STATIC_TLS   0x0010  /* Indicates that the shared object or\r
-                                  executable contains code using a static\r
-                                  thread-local storage scheme. */\r
+#define  DF_ORIGIN  0x0001  /* Indicates that the object being loaded may\r
+           make reference to the $ORIGIN substitution\r
+           string */\r
+#define  DF_SYMBOLIC  0x0002  /* Indicates "symbolic" linking. */\r
+#define  DF_TEXTREL  0x0004  /* Indicates there may be relocations in\r
+           non-writable segments. */\r
+#define  DF_BIND_NOW  0x0008  /* Indicates that the dynamic linker should\r
+           process all relocations for the object\r
+           containing this entry before transferring\r
+           control to the program. */\r
+#define  DF_STATIC_TLS  0x0010  /* Indicates that the shared object or\r
+           executable contains code using a static\r
+           thread-local storage scheme. */\r
 \r
 /* Values for n_type.  Used in core files. */\r
-#define NT_PRSTATUS    1       /* Process status. */\r
-#define NT_FPREGSET    2       /* Floating point registers. */\r
-#define NT_PRPSINFO    3       /* Process state info. */\r
+#define NT_PRSTATUS  1  /* Process status. */\r
+#define NT_FPREGSET  2  /* Floating point registers. */\r
+#define NT_PRPSINFO  3  /* Process state info. */\r
 \r
 /* Symbol Binding - ELFNN_ST_BIND - st_info */\r
-#define STB_LOCAL      0       /* Local symbol */\r
-#define STB_GLOBAL     1       /* Global symbol */\r
-#define STB_WEAK       2       /* like global - lower precedence */\r
-#define STB_LOOS       10      /* Reserved range for operating system */\r
-#define STB_HIOS       12      /*   specific semantics. */\r
-#define STB_LOPROC     13      /* reserved range for processor */\r
-#define STB_HIPROC     15      /*   specific semantics. */\r
+#define STB_LOCAL  0  /* Local symbol */\r
+#define STB_GLOBAL  1  /* Global symbol */\r
+#define STB_WEAK  2  /* like global - lower precedence */\r
+#define STB_LOOS  10  /* Reserved range for operating system */\r
+#define STB_HIOS  12  /*   specific semantics. */\r
+#define STB_LOPROC  13  /* reserved range for processor */\r
+#define STB_HIPROC  15  /*   specific semantics. */\r
 \r
 /* Symbol type - ELFNN_ST_TYPE - st_info */\r
-#define STT_NOTYPE     0       /* Unspecified type. */\r
-#define STT_OBJECT     1       /* Data object. */\r
-#define STT_FUNC       2       /* Function. */\r
-#define STT_SECTION    3       /* Section. */\r
-#define STT_FILE       4       /* Source file. */\r
-#define STT_COMMON     5       /* Uninitialized common block. */\r
-#define STT_TLS                6       /* TLS object. */\r
-#define STT_NUM                7\r
-#define STT_LOOS       10      /* Reserved range for operating system */\r
-#define STT_HIOS       12      /*   specific semantics. */\r
-#define STT_LOPROC     13      /* reserved range for processor */\r
-#define STT_HIPROC     15      /*   specific semantics. */\r
+#define STT_NOTYPE  0  /* Unspecified type. */\r
+#define STT_OBJECT  1  /* Data object. */\r
+#define STT_FUNC  2  /* Function. */\r
+#define STT_SECTION  3  /* Section. */\r
+#define STT_FILE  4  /* Source file. */\r
+#define STT_COMMON  5  /* Uninitialized common block. */\r
+#define STT_TLS    6  /* TLS object. */\r
+#define STT_NUM    7\r
+#define STT_LOOS  10  /* Reserved range for operating system */\r
+#define STT_HIOS  12  /*   specific semantics. */\r
+#define STT_LOPROC  13  /* reserved range for processor */\r
+#define STT_HIPROC  15  /*   specific semantics. */\r
 \r
 /* Symbol visibility - ELFNN_ST_VISIBILITY - st_other */\r
-#define STV_DEFAULT    0x0     /* Default visibility (see binding). */\r
-#define STV_INTERNAL   0x1     /* Special meaning in relocatable objects. */\r
-#define STV_HIDDEN     0x2     /* Not visible. */\r
-#define STV_PROTECTED  0x3     /* Visible but not preemptible. */\r
+#define STV_DEFAULT  0x0  /* Default visibility (see binding). */\r
+#define STV_INTERNAL  0x1  /* Special meaning in relocatable objects. */\r
+#define STV_HIDDEN  0x2  /* Not visible. */\r
+#define STV_PROTECTED  0x3  /* Visible but not preemptible. */\r
 \r
 /* Special symbol table indexes. */\r
-#define STN_UNDEF      0       /* Undefined symbol index. */\r
+#define STN_UNDEF  0  /* Undefined symbol index. */\r
 \r
 /* Symbol versioning flags. */\r
-#define        VER_DEF_CURRENT 1\r
-#define VER_DEF_IDX(x) VER_NDX(x)\r
+#define  VER_DEF_CURRENT  1\r
+#define VER_DEF_IDX(x)  VER_NDX(x)\r
 \r
-#define        VER_FLG_BASE    0x01\r
-#define        VER_FLG_WEAK    0x02\r
+#define  VER_FLG_BASE  0x01\r
+#define  VER_FLG_WEAK  0x02\r
 \r
-#define        VER_NEED_CURRENT        1\r
-#define VER_NEED_WEAK  (1u << 15)\r
-#define VER_NEED_HIDDEN        VER_NDX_HIDDEN\r
-#define VER_NEED_IDX(x)        VER_NDX(x)\r
+#define  VER_NEED_CURRENT  1\r
+#define VER_NEED_WEAK  (1u << 15)\r
+#define VER_NEED_HIDDEN  VER_NDX_HIDDEN\r
+#define VER_NEED_IDX(x)  VER_NDX(x)\r
 \r
-#define        VER_NDX_LOCAL   0\r
-#define        VER_NDX_GLOBAL  1\r
-#define VER_NDX_GIVEN  2\r
+#define  VER_NDX_LOCAL  0\r
+#define  VER_NDX_GLOBAL  1\r
+#define VER_NDX_GIVEN  2\r
 \r
-#define VER_NDX_HIDDEN (1u << 15)\r
-#define VER_NDX(x)     ((x) & ~(1u << 15))\r
+#define VER_NDX_HIDDEN  (1u << 15)\r
+#define VER_NDX(x)  ((x) & ~(1u << 15))\r
 \r
-#define        CA_SUNW_NULL    0\r
-#define        CA_SUNW_HW_1    1               /* first hardware capabilities entry */\r
-#define        CA_SUNW_SF_1    2               /* first software capabilities entry */\r
+#define  CA_SUNW_NULL  0\r
+#define  CA_SUNW_HW_1  1    /* first hardware capabilities entry */\r
+#define  CA_SUNW_SF_1  2    /* first software capabilities entry */\r
 \r
 /*\r
  * Syminfo flag values\r
  */\r
-#define        SYMINFO_FLG_DIRECT      0x0001  /* symbol ref has direct association */\r
-                                       /*      to object containing defn. */\r
-#define        SYMINFO_FLG_PASSTHRU    0x0002  /* ignored - see SYMINFO_FLG_FILTER */\r
-#define        SYMINFO_FLG_COPY        0x0004  /* symbol is a copy-reloc */\r
-#define        SYMINFO_FLG_LAZYLOAD    0x0008  /* object containing defn should be */\r
-                                       /*      lazily-loaded */\r
-#define        SYMINFO_FLG_DIRECTBIND  0x0010  /* ref should be bound directly to */\r
-                                       /*      object containing defn. */\r
-#define        SYMINFO_FLG_NOEXTDIRECT 0x0020  /* don't let an external reference */\r
-                                       /*      directly bind to this symbol */\r
-#define        SYMINFO_FLG_FILTER      0x0002  /* symbol ref is associated to a */\r
-#define        SYMINFO_FLG_AUXILIARY   0x0040  /*      standard or auxiliary filter */\r
+#define  SYMINFO_FLG_DIRECT  0x0001  /* symbol ref has direct association */\r
+          /*  to object containing defn. */\r
+#define  SYMINFO_FLG_PASSTHRU  0x0002  /* ignored - see SYMINFO_FLG_FILTER */\r
+#define  SYMINFO_FLG_COPY  0x0004  /* symbol is a copy-reloc */\r
+#define  SYMINFO_FLG_LAZYLOAD  0x0008  /* object containing defn should be */\r
+          /*  lazily-loaded */\r
+#define  SYMINFO_FLG_DIRECTBIND  0x0010  /* ref should be bound directly to */\r
+          /*  object containing defn. */\r
+#define  SYMINFO_FLG_NOEXTDIRECT  0x0020  /* don't let an external reference */\r
+          /*  directly bind to this symbol */\r
+#define  SYMINFO_FLG_FILTER  0x0002  /* symbol ref is associated to a */\r
+#define  SYMINFO_FLG_AUXILIARY  0x0040  /*   standard or auxiliary filter */\r
 \r
 /*\r
  * Syminfo.si_boundto values.\r
  */\r
-#define        SYMINFO_BT_SELF         0xffff  /* symbol bound to self */\r
-#define        SYMINFO_BT_PARENT       0xfffe  /* symbol bound to parent */\r
-#define        SYMINFO_BT_NONE         0xfffd  /* no special symbol binding */\r
-#define        SYMINFO_BT_EXTERN       0xfffc  /* symbol defined as external */\r
-#define        SYMINFO_BT_LOWRESERVE   0xff00  /* beginning of reserved entries */\r
+#define  SYMINFO_BT_SELF    0xffff  /* symbol bound to self */\r
+#define  SYMINFO_BT_PARENT  0xfffe  /* symbol bound to parent */\r
+#define  SYMINFO_BT_NONE    0xfffd  /* no special symbol binding */\r
+#define  SYMINFO_BT_EXTERN  0xfffc  /* symbol defined as external */\r
+#define  SYMINFO_BT_LOWRESERVE  0xff00  /* beginning of reserved entries */\r
 \r
 /*\r
  * Syminfo version values.\r
  */\r
-#define        SYMINFO_NONE            0       /* Syminfo version */\r
-#define        SYMINFO_CURRENT         1\r
-#define        SYMINFO_NUM             2\r
+#define  SYMINFO_NONE    0  /* Syminfo version */\r
+#define  SYMINFO_CURRENT    1\r
+#define  SYMINFO_NUM    2\r
 \r
 /*\r
  * Relocation types.\r
@@ -513,231 +513,231 @@ typedef struct {
  * handle others.\r
  */\r
 \r
-#define        R_386_NONE              0       /* No relocation. */\r
-#define        R_386_32                1       /* Add symbol value. */\r
-#define        R_386_PC32              2       /* Add PC-relative symbol value. */\r
-#define        R_386_GOT32             3       /* Add PC-relative GOT offset. */\r
-#define        R_386_PLT32             4       /* Add PC-relative PLT offset. */\r
-#define        R_386_COPY              5       /* Copy data from shared object. */\r
-#define        R_386_GLOB_DAT          6       /* Set GOT entry to data address. */\r
-#define        R_386_JMP_SLOT          7       /* Set GOT entry to code address. */\r
-#define        R_386_RELATIVE          8       /* Add load address of shared object. */\r
-#define        R_386_GOTOFF            9       /* Add GOT-relative symbol address. */\r
-#define        R_386_GOTPC             10      /* Add PC-relative GOT table address. */\r
-#define        R_386_TLS_TPOFF         14      /* Negative offset in static TLS block */\r
-#define        R_386_TLS_IE            15      /* Absolute address of GOT for -ve static TLS */\r
-#define        R_386_TLS_GOTIE         16      /* GOT entry for negative static TLS block */\r
-#define        R_386_TLS_LE            17      /* Negative offset relative to static TLS */\r
-#define        R_386_TLS_GD            18      /* 32 bit offset to GOT (index,off) pair */\r
-#define        R_386_TLS_LDM           19      /* 32 bit offset to GOT (index,zero) pair */\r
-#define        R_386_TLS_GD_32         24      /* 32 bit offset to GOT (index,off) pair */\r
-#define        R_386_TLS_GD_PUSH       25      /* pushl instruction for Sun ABI GD sequence */\r
-#define        R_386_TLS_GD_CALL       26      /* call instruction for Sun ABI GD sequence */\r
-#define        R_386_TLS_GD_POP        27      /* popl instruction for Sun ABI GD sequence */\r
-#define        R_386_TLS_LDM_32        28      /* 32 bit offset to GOT (index,zero) pair */\r
-#define        R_386_TLS_LDM_PUSH      29      /* pushl instruction for Sun ABI LD sequence */\r
-#define        R_386_TLS_LDM_CALL      30      /* call instruction for Sun ABI LD sequence */\r
-#define        R_386_TLS_LDM_POP       31      /* popl instruction for Sun ABI LD sequence */\r
-#define        R_386_TLS_LDO_32        32      /* 32 bit offset from start of TLS block */\r
-#define        R_386_TLS_IE_32         33      /* 32 bit offset to GOT static TLS offset entry */\r
-#define        R_386_TLS_LE_32         34      /* 32 bit offset within static TLS block */\r
-#define        R_386_TLS_DTPMOD32      35      /* GOT entry containing TLS index */\r
-#define        R_386_TLS_DTPOFF32      36      /* GOT entry containing TLS offset */\r
-#define        R_386_TLS_TPOFF32       37      /* GOT entry of -ve static TLS offset */\r
+#define  R_386_NONE    0  /* No relocation. */\r
+#define  R_386_32    1  /* Add symbol value. */\r
+#define  R_386_PC32    2  /* Add PC-relative symbol value. */\r
+#define  R_386_GOT32    3  /* Add PC-relative GOT offset. */\r
+#define  R_386_PLT32    4  /* Add PC-relative PLT offset. */\r
+#define  R_386_COPY    5  /* Copy data from shared object. */\r
+#define  R_386_GLOB_DAT    6  /* Set GOT entry to data address. */\r
+#define  R_386_JMP_SLOT    7  /* Set GOT entry to code address. */\r
+#define  R_386_RELATIVE    8  /* Add load address of shared object. */\r
+#define  R_386_GOTOFF    9  /* Add GOT-relative symbol address. */\r
+#define  R_386_GOTPC    10  /* Add PC-relative GOT table address. */\r
+#define  R_386_TLS_TPOFF    14  /* Negative offset in static TLS block */\r
+#define  R_386_TLS_IE    15  /* Absolute address of GOT for -ve static TLS */\r
+#define  R_386_TLS_GOTIE    16  /* GOT entry for negative static TLS block */\r
+#define  R_386_TLS_LE    17  /* Negative offset relative to static TLS */\r
+#define  R_386_TLS_GD    18  /* 32 bit offset to GOT (index,off) pair */\r
+#define  R_386_TLS_LDM    19  /* 32 bit offset to GOT (index,zero) pair */\r
+#define  R_386_TLS_GD_32    24  /* 32 bit offset to GOT (index,off) pair */\r
+#define  R_386_TLS_GD_PUSH  25  /* pushl instruction for Sun ABI GD sequence */\r
+#define  R_386_TLS_GD_CALL  26  /* call instruction for Sun ABI GD sequence */\r
+#define  R_386_TLS_GD_POP  27  /* popl instruction for Sun ABI GD sequence */\r
+#define  R_386_TLS_LDM_32  28  /* 32 bit offset to GOT (index,zero) pair */\r
+#define  R_386_TLS_LDM_PUSH  29  /* pushl instruction for Sun ABI LD sequence */\r
+#define  R_386_TLS_LDM_CALL  30  /* call instruction for Sun ABI LD sequence */\r
+#define  R_386_TLS_LDM_POP  31  /* popl instruction for Sun ABI LD sequence */\r
+#define  R_386_TLS_LDO_32  32  /* 32 bit offset from start of TLS block */\r
+#define  R_386_TLS_IE_32    33  /* 32 bit offset to GOT static TLS offset entry */\r
+#define  R_386_TLS_LE_32    34  /* 32 bit offset within static TLS block */\r
+#define  R_386_TLS_DTPMOD32  35  /* GOT entry containing TLS index */\r
+#define  R_386_TLS_DTPOFF32  36  /* GOT entry containing TLS offset */\r
+#define  R_386_TLS_TPOFF32  37  /* GOT entry of -ve static TLS offset */\r
 \r
 /* Null relocation */\r
-#define        R_AARCH64_NONE                          256     /* No relocation */\r
+#define  R_AARCH64_NONE        256  /* No relocation */\r
 /* Static AArch64 relocations */\r
  /* Static data relocations */\r
-#define        R_AARCH64_ABS64                         257     /* S + A */\r
-#define        R_AARCH64_ABS32                         258     /* S + A */\r
-#define        R_AARCH64_ABS16                         259     /* S + A */\r
-#define        R_AARCH64_PREL64                        260     /* S + A - P */\r
-#define        R_AARCH64_PREL32                        261     /* S + A - P */\r
-#define        R_AARCH64_PREL16                        262     /* S + A - P */\r
+#define  R_AARCH64_ABS64        257  /* S + A */\r
+#define  R_AARCH64_ABS32        258  /* S + A */\r
+#define  R_AARCH64_ABS16        259  /* S + A */\r
+#define  R_AARCH64_PREL64      260  /* S + A - P */\r
+#define  R_AARCH64_PREL32      261  /* S + A - P */\r
+#define  R_AARCH64_PREL16      262  /* S + A - P */\r
  /* Group relocations to create a 16, 32, 48, or 64 bit unsigned data value or address inline */\r
-#define        R_AARCH64_MOVW_UABS_G0                  263     /* S + A */\r
-#define        R_AARCH64_MOVW_UABS_G0_NC               264     /* S + A */\r
-#define        R_AARCH64_MOVW_UABS_G1                  265     /* S + A */\r
-#define        R_AARCH64_MOVW_UABS_G1_NC               266     /* S + A */\r
-#define        R_AARCH64_MOVW_UABS_G2                  267     /* S + A */\r
-#define        R_AARCH64_MOVW_UABS_G2_NC               268     /* S + A */\r
-#define        R_AARCH64_MOVW_UABS_G3                  269     /* S + A */\r
+#define  R_AARCH64_MOVW_UABS_G0      263  /* S + A */\r
+#define  R_AARCH64_MOVW_UABS_G0_NC    264  /* S + A */\r
+#define  R_AARCH64_MOVW_UABS_G1      265  /* S + A */\r
+#define  R_AARCH64_MOVW_UABS_G1_NC    266  /* S + A */\r
+#define  R_AARCH64_MOVW_UABS_G2      267  /* S + A */\r
+#define  R_AARCH64_MOVW_UABS_G2_NC    268  /* S + A */\r
+#define  R_AARCH64_MOVW_UABS_G3      269  /* S + A */\r
  /* Group relocations to create a 16, 32, 48, or 64 bit signed data or offset value inline */\r
-#define        R_AARCH64_MOVW_SABS_G0                  270     /* S + A */\r
-#define        R_AARCH64_MOVW_SABS_G1                  271     /* S + A */\r
-#define        R_AARCH64_MOVW_SABS_G2                  272     /* S + A */\r
+#define  R_AARCH64_MOVW_SABS_G0      270  /* S + A */\r
+#define  R_AARCH64_MOVW_SABS_G1      271  /* S + A */\r
+#define  R_AARCH64_MOVW_SABS_G2      272  /* S + A */\r
  /* Relocations to generate 19, 21 and 33 bit PC-relative addresses */\r
-#define        R_AARCH64_LD_PREL_LO19                  273     /* S + A - P */\r
-#define        R_AARCH64_ADR_PREL_LO21                 274     /* S + A - P */\r
-#define        R_AARCH64_ADR_PREL_PG_HI21              275     /* Page(S+A) - Page(P) */\r
-#define        R_AARCH64_ADR_PREL_PG_HI21_NC           276     /* Page(S+A) - Page(P) */\r
-#define        R_AARCH64_ADD_ABS_LO12_NC               277     /* S + A */\r
-#define        R_AARCH64_LDST8_ABS_LO12_NC             278     /* S + A */\r
-#define        R_AARCH64_LDST16_ABS_LO12_NC            284     /* S + A */\r
-#define        R_AARCH64_LDST32_ABS_LO12_NC            285     /* S + A */\r
-#define        R_AARCH64_LDST64_ABS_LO12_NC            286     /* S + A */\r
-#define        R_AARCH64_LDST128_ABS_LO12_NC           299     /* S + A */\r
+#define  R_AARCH64_LD_PREL_LO19      273  /* S + A - P */\r
+#define  R_AARCH64_ADR_PREL_LO21      274  /* S + A - P */\r
+#define  R_AARCH64_ADR_PREL_PG_HI21    275  /* Page(S+A) - Page(P) */\r
+#define  R_AARCH64_ADR_PREL_PG_HI21_NC    276  /* Page(S+A) - Page(P) */\r
+#define  R_AARCH64_ADD_ABS_LO12_NC    277  /* S + A */\r
+#define  R_AARCH64_LDST8_ABS_LO12_NC    278  /* S + A */\r
+#define  R_AARCH64_LDST16_ABS_LO12_NC    284  /* S + A */\r
+#define  R_AARCH64_LDST32_ABS_LO12_NC    285  /* S + A */\r
+#define  R_AARCH64_LDST64_ABS_LO12_NC    286  /* S + A */\r
+#define  R_AARCH64_LDST128_ABS_LO12_NC    299  /* S + A */\r
  /* Relocations for control-flow instructions - all offsets are a multiple of 4 */\r
-#define        R_AARCH64_TSTBR14                       279     /* S+A-P */\r
-#define        R_AARCH64_CONDBR19                      280     /* S+A-P */\r
-#define        R_AARCH64_JUMP26                        282     /* S+A-P */\r
-#define        R_AARCH64_CALL26                        283     /* S+A-P */\r
+#define  R_AARCH64_TSTBR14      279  /* S+A-P */\r
+#define  R_AARCH64_CONDBR19      280  /* S+A-P */\r
+#define  R_AARCH64_JUMP26      282  /* S+A-P */\r
+#define  R_AARCH64_CALL26      283  /* S+A-P */\r
  /* Group relocations to create a 16, 32, 48, or 64 bit PC-relative offset inline */\r
-#define        R_AARCH64_MOVW_PREL_G0                  287     /* S+A-P */\r
-#define        R_AARCH64_MOVW_PREL_G0_NC               288     /* S+A-P */\r
-#define        R_AARCH64_MOVW_PREL_G1                  289     /* S+A-P */\r
-#define        R_AARCH64_MOVW_PREL_G1_NC               290     /* S+A-P */\r
-#define        R_AARCH64_MOVW_PREL_G2                  291     /* S+A-P */\r
-#define        R_AARCH64_MOVW_PREL_G2_NC               292     /* S+A-P */\r
-#define        R_AARCH64_MOVW_PREL_G3                  293     /* S+A-P */\r
+#define  R_AARCH64_MOVW_PREL_G0      287  /* S+A-P */\r
+#define  R_AARCH64_MOVW_PREL_G0_NC    288  /* S+A-P */\r
+#define  R_AARCH64_MOVW_PREL_G1      289  /* S+A-P */\r
+#define  R_AARCH64_MOVW_PREL_G1_NC    290  /* S+A-P */\r
+#define  R_AARCH64_MOVW_PREL_G2      291  /* S+A-P */\r
+#define  R_AARCH64_MOVW_PREL_G2_NC    292  /* S+A-P */\r
+#define  R_AARCH64_MOVW_PREL_G3      293  /* S+A-P */\r
  /* Group relocations to create a 16, 32, 48, or 64 bit GOT-relative offsets inline */\r
-#define        R_AARCH64_MOVW_GOTOFF_G0                300     /* G(S)-GOT */\r
-#define        R_AARCH64_MOVW_GOTOFF_G0_NC             301     /* G(S)-GOT */\r
-#define        R_AARCH64_MOVW_GOTOFF_G1                302     /* G(S)-GOT */\r
-#define        R_AARCH64_MOVW_GOTOFF_G1_NC             303     /* G(S)-GOT */\r
-#define        R_AARCH64_MOVW_GOTOFF_G2                304     /* G(S)-GOT */\r
-#define        R_AARCH64_MOVW_GOTOFF_G2_NC             305     /* G(S)-GOT */\r
-#define        R_AARCH64_MOVW_GOTOFF_G3                306     /* G(S)-GOT */\r
+#define  R_AARCH64_MOVW_GOTOFF_G0    300  /* G(S)-GOT */\r
+#define  R_AARCH64_MOVW_GOTOFF_G0_NC    301  /* G(S)-GOT */\r
+#define  R_AARCH64_MOVW_GOTOFF_G1    302  /* G(S)-GOT */\r
+#define  R_AARCH64_MOVW_GOTOFF_G1_NC    303  /* G(S)-GOT */\r
+#define  R_AARCH64_MOVW_GOTOFF_G2    304  /* G(S)-GOT */\r
+#define  R_AARCH64_MOVW_GOTOFF_G2_NC    305  /* G(S)-GOT */\r
+#define  R_AARCH64_MOVW_GOTOFF_G3    306  /* G(S)-GOT */\r
  /*  GOT-relative data relocations */\r
-#define        R_AARCH64_GOTREL64                      307     /* S+A-GOT */\r
-#define        R_AARCH64_GOTREL32                      308     /* S+A-GOT */\r
+#define  R_AARCH64_GOTREL64      307  /* S+A-GOT */\r
+#define  R_AARCH64_GOTREL32      308  /* S+A-GOT */\r
  /* GOT-relative instruction relocations */\r
-#define        R_AARCH64_GOT_LD_PREL19                 309     /* G(S)-P */\r
-#define        R_AARCH64_LD64_GOTOFF_LO15              310     /* G(S)-GOT */\r
-#define        R_AARCH64_ADR_GOT_PAGE                  311     /* Page(G(S))-Page(P) */\r
-#define        R_AARCH64_LD64_GOT_LO12_NC              312     /* G(S) */\r
-#define        R_AARCH64_LD64_GOTPAGE_LO15             313     /* G(S)-Page(GOT) */\r
+#define  R_AARCH64_GOT_LD_PREL19      309  /* G(S)-P */\r
+#define  R_AARCH64_LD64_GOTOFF_LO15    310  /* G(S)-GOT */\r
+#define  R_AARCH64_ADR_GOT_PAGE      311  /* Page(G(S))-Page(P) */\r
+#define  R_AARCH64_LD64_GOT_LO12_NC    312  /* G(S) */\r
+#define  R_AARCH64_LD64_GOTPAGE_LO15    313  /* G(S)-Page(GOT) */\r
 /* Relocations for thread-local storage */\r
  /* General Dynamic TLS relocations */\r
-#define        R_AARCH64_TLSGD_ADR_PREL21              512     /* G(TLSIDX(S+A)) - P */\r
-#define        R_AARCH64_TLSGD_ADR_PAGE21              513     /* Page(G(TLSIDX(S+A))) - Page(P) */\r
-#define        R_AARCH64_TLSGD_ADD_LO12_NC             514     /* G(TLSIDX(S+A)) */\r
-#define        R_AARCH64_TLSGD_MOVW_G1                 515     /* G(TLSIDX(S+A)) - GOT */\r
-#define        R_AARCH64_TLSGD_MOVW_G0_NC              516     /* G(TLSIDX(S+A)) - GOT */\r
+#define  R_AARCH64_TLSGD_ADR_PREL21    512  /* G(TLSIDX(S+A)) - P */\r
+#define  R_AARCH64_TLSGD_ADR_PAGE21    513  /* Page(G(TLSIDX(S+A))) - Page(P) */\r
+#define  R_AARCH64_TLSGD_ADD_LO12_NC    514  /* G(TLSIDX(S+A)) */\r
+#define  R_AARCH64_TLSGD_MOVW_G1      515  /* G(TLSIDX(S+A)) - GOT */\r
+#define  R_AARCH64_TLSGD_MOVW_G0_NC    516  /* G(TLSIDX(S+A)) - GOT */\r
  /* Local Dynamic TLS relocations */\r
-#define        R_AARCH64_TLSLD_ADR_PREL21              517     /* G(LDM(S))) - P */\r
-#define        R_AARCH64_TLSLD_ADR_PAGE21              518     /* Page(G(LDM(S)))-Page(P) */\r
-#define        R_AARCH64_TLSLD_ADD_LO12_NC             519     /* G(LDM(S)) */\r
-#define        R_AARCH64_TLSLD_MOVW_G1                 520     /* G(LDM(S)) - GOT */\r
-#define        R_AARCH64_TLSLD_MOVW_G0_NC              521     /* G(LDM(S)) - GOT */\r
-#define        R_AARCH64_TLSLD_LD_PREL19               522     /* G(LDM(S)) - P */\r
-#define        R_AARCH64_TLSLD_MOVW_DTPREL_G2          523     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_MOVW_DTPREL_G1          524     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC       525     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_MOVW_DTPREL_G0          526     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC       527     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_ADD_DTPREL_HI12         528     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_ADD_DTPREL_LO12         529     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC      530     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_LDST8_DTPREL_LO12       531     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC    532     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_LDST16_DTPREL_LO12      533     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC   534     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_LDST32_DTPREL_LO12      535     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC   536     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_LDST64_DTPREL_LO12      537     /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC   538     /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_ADR_PREL21    517  /* G(LDM(S))) - P */\r
+#define  R_AARCH64_TLSLD_ADR_PAGE21    518  /* Page(G(LDM(S)))-Page(P) */\r
+#define  R_AARCH64_TLSLD_ADD_LO12_NC    519  /* G(LDM(S)) */\r
+#define  R_AARCH64_TLSLD_MOVW_G1      520  /* G(LDM(S)) - GOT */\r
+#define  R_AARCH64_TLSLD_MOVW_G0_NC    521  /* G(LDM(S)) - GOT */\r
+#define  R_AARCH64_TLSLD_LD_PREL19    522  /* G(LDM(S)) - P */\r
+#define  R_AARCH64_TLSLD_MOVW_DTPREL_G2    523  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_MOVW_DTPREL_G1    524  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC  525  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_MOVW_DTPREL_G0    526  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC  527  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_ADD_DTPREL_HI12    528  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_ADD_DTPREL_LO12    529  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC  530  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_LDST8_DTPREL_LO12  531  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC  532  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_LDST16_DTPREL_LO12  533  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC  534  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_LDST32_DTPREL_LO12  535  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC  536  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_LDST64_DTPREL_LO12  537  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC  538  /* DTPREL(S+A) */\r
  /* Initial Exec TLS relocations */\r
-#define        R_AARCH64_TLSIE_MOVW_GOTTPREL_G1        539     /* G(TPREL(S+A)) - GOT */\r
-#define        R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC     540     /* G(TPREL(S+A)) - GOT */\r
-#define        R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21     541     /* Page(G(TPREL(S+A))) - Page(P) */\r
-#define        R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC   542     /* G(TPREL(S+A)) */\r
-#define        R_AARCH64_TLSIE_LD_GOTTPREL_PREL19      543     /* G(TPREL(S+A)) - P */\r
+#define  R_AARCH64_TLSIE_MOVW_GOTTPREL_G1  539  /* G(TPREL(S+A)) - GOT */\r
+#define  R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC  540  /* G(TPREL(S+A)) - GOT */\r
+#define  R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21  541  /* Page(G(TPREL(S+A))) - Page(P) */\r
+#define  R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC  542  /* G(TPREL(S+A)) */\r
+#define  R_AARCH64_TLSIE_LD_GOTTPREL_PREL19  543  /* G(TPREL(S+A)) - P */\r
  /* Local Exec TLS relocations */\r
-#define        R_AARCH64_TLSLE_MOVW_TPREL_G2           544     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_MOVW_TPREL_G1           545     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_MOVW_TPREL_G1_NC        546     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_MOVW_TPREL_G0           547     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_MOVW_TPREL_G0_NC        548     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_ADD_TPREL_HI12          549     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_ADD_TPREL_LO12          550     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_ADD_TPREL_LO12_NC       551     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_LDST8_TPREL_LO12        552     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC     553     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_LDST16_TPREL_LO12       554     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC    555     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_LDST32_TPREL_LO12       556     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC    557     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_LDST64_TPREL_LO12       558     /* TPREL(S+A) */\r
-#define        R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC    559     /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_MOVW_TPREL_G2    544  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_MOVW_TPREL_G1    545  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_MOVW_TPREL_G1_NC  546  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_MOVW_TPREL_G0    547  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_MOVW_TPREL_G0_NC  548  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_ADD_TPREL_HI12    549  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_ADD_TPREL_LO12    550  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_ADD_TPREL_LO12_NC  551  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_LDST8_TPREL_LO12  552  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC  553  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_LDST16_TPREL_LO12  554  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC  555  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_LDST32_TPREL_LO12  556  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC  557  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_LDST64_TPREL_LO12  558  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC  559  /* TPREL(S+A) */\r
 /* Dynamic relocations */\r
  /* Dynamic relocations */\r
-#define        R_AARCH64_COPY                          1024\r
-#define        R_AARCH64_GLOB_DAT                      1025    /* S + A */\r
-#define        R_AARCH64_JUMP_SLOT                     1026    /* S + A */\r
-#define        R_AARCH64_RELATIVE                      1027    /* Delta(S) + A , Delta(P) + A */\r
-#define        R_AARCH64_TLS_DTPREL64                  1028    /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLS_DTPMOD64                  1029    /* LDM(S) */\r
-#define        R_AARCH64_TLS_TPREL64                   1030    /* TPREL(S+A) */\r
-#define        R_AARCH64_TLS_DTPREL32                  1031    /* DTPREL(S+A) */\r
-#define        R_AARCH64_TLS_DTPMOD32                  1032    /* LDM(S) */\r
-#define        R_AARCH64_TLS_TPREL32                   1033    /* DTPREL(S+A) */\r
+#define  R_AARCH64_COPY        1024\r
+#define  R_AARCH64_GLOB_DAT      1025  /* S + A */\r
+#define  R_AARCH64_JUMP_SLOT      1026  /* S + A */\r
+#define  R_AARCH64_RELATIVE      1027  /* Delta(S) + A , Delta(P) + A */\r
+#define  R_AARCH64_TLS_DTPREL64      1028  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLS_DTPMOD64      1029  /* LDM(S) */\r
+#define  R_AARCH64_TLS_TPREL64      1030  /* TPREL(S+A) */\r
+#define  R_AARCH64_TLS_DTPREL32      1031  /* DTPREL(S+A) */\r
+#define  R_AARCH64_TLS_DTPMOD32      1032  /* LDM(S) */\r
+#define  R_AARCH64_TLS_TPREL32      1033  /* DTPREL(S+A) */\r
 \r
-#define        R_ALPHA_NONE            0       /* No reloc */\r
-#define        R_ALPHA_REFLONG         1       /* Direct 32 bit */\r
-#define        R_ALPHA_REFQUAD         2       /* Direct 64 bit */\r
-#define        R_ALPHA_GPREL32         3       /* GP relative 32 bit */\r
-#define        R_ALPHA_LITERAL         4       /* GP relative 16 bit w/optimization */\r
-#define        R_ALPHA_LITUSE          5       /* Optimization hint for LITERAL */\r
-#define        R_ALPHA_GPDISP          6       /* Add displacement to GP */\r
-#define        R_ALPHA_BRADDR          7       /* PC+4 relative 23 bit shifted */\r
-#define        R_ALPHA_HINT            8       /* PC+4 relative 16 bit shifted */\r
-#define        R_ALPHA_SREL16          9       /* PC relative 16 bit */\r
-#define        R_ALPHA_SREL32          10      /* PC relative 32 bit */\r
-#define        R_ALPHA_SREL64          11      /* PC relative 64 bit */\r
-#define        R_ALPHA_OP_PUSH         12      /* OP stack push */\r
-#define        R_ALPHA_OP_STORE        13      /* OP stack pop and store */\r
-#define        R_ALPHA_OP_PSUB         14      /* OP stack subtract */\r
-#define        R_ALPHA_OP_PRSHIFT      15      /* OP stack right shift */\r
-#define        R_ALPHA_GPVALUE         16\r
-#define        R_ALPHA_GPRELHIGH       17\r
-#define        R_ALPHA_GPRELLOW        18\r
-#define        R_ALPHA_IMMED_GP_16     19\r
-#define        R_ALPHA_IMMED_GP_HI32   20\r
-#define        R_ALPHA_IMMED_SCN_HI32  21\r
-#define        R_ALPHA_IMMED_BR_HI32   22\r
-#define        R_ALPHA_IMMED_LO32      23\r
-#define        R_ALPHA_COPY            24      /* Copy symbol at runtime */\r
-#define        R_ALPHA_GLOB_DAT        25      /* Create GOT entry */\r
-#define        R_ALPHA_JMP_SLOT        26      /* Create PLT entry */\r
-#define        R_ALPHA_RELATIVE        27      /* Adjust by program base */\r
+#define  R_ALPHA_NONE    0  /* No reloc */\r
+#define  R_ALPHA_REFLONG    1  /* Direct 32 bit */\r
+#define  R_ALPHA_REFQUAD    2  /* Direct 64 bit */\r
+#define  R_ALPHA_GPREL32    3  /* GP relative 32 bit */\r
+#define  R_ALPHA_LITERAL    4  /* GP relative 16 bit w/optimization */\r
+#define  R_ALPHA_LITUSE    5  /* Optimization hint for LITERAL */\r
+#define  R_ALPHA_GPDISP    6  /* Add displacement to GP */\r
+#define  R_ALPHA_BRADDR    7  /* PC+4 relative 23 bit shifted */\r
+#define  R_ALPHA_HINT    8  /* PC+4 relative 16 bit shifted */\r
+#define  R_ALPHA_SREL16    9  /* PC relative 16 bit */\r
+#define  R_ALPHA_SREL32    10  /* PC relative 32 bit */\r
+#define  R_ALPHA_SREL64    11  /* PC relative 64 bit */\r
+#define  R_ALPHA_OP_PUSH    12  /* OP stack push */\r
+#define  R_ALPHA_OP_STORE  13  /* OP stack pop and store */\r
+#define  R_ALPHA_OP_PSUB    14  /* OP stack subtract */\r
+#define  R_ALPHA_OP_PRSHIFT  15  /* OP stack right shift */\r
+#define  R_ALPHA_GPVALUE    16\r
+#define  R_ALPHA_GPRELHIGH  17\r
+#define  R_ALPHA_GPRELLOW  18\r
+#define  R_ALPHA_IMMED_GP_16  19\r
+#define  R_ALPHA_IMMED_GP_HI32  20\r
+#define  R_ALPHA_IMMED_SCN_HI32  21\r
+#define  R_ALPHA_IMMED_BR_HI32  22\r
+#define  R_ALPHA_IMMED_LO32  23\r
+#define  R_ALPHA_COPY    24  /* Copy symbol at runtime */\r
+#define  R_ALPHA_GLOB_DAT  25  /* Create GOT entry */\r
+#define  R_ALPHA_JMP_SLOT  26  /* Create PLT entry */\r
+#define  R_ALPHA_RELATIVE  27  /* Adjust by program base */\r
 \r
-#define        R_ARM_NONE              0       /* No relocation. */\r
-#define        R_ARM_PC24              1\r
-#define        R_ARM_ABS32             2\r
-#define        R_ARM_REL32             3\r
-#define        R_ARM_PC13              4\r
-#define        R_ARM_ABS16             5\r
-#define        R_ARM_ABS12             6\r
-#define        R_ARM_THM_ABS5          7\r
-#define        R_ARM_ABS8              8\r
-#define        R_ARM_SBREL32           9\r
-#define        R_ARM_THM_PC22          10\r
-#define        R_ARM_THM_PC8           11\r
-#define        R_ARM_AMP_VCALL9        12\r
-#define        R_ARM_SWI24             13\r
-#define        R_ARM_THM_SWI8          14\r
-#define        R_ARM_XPC25             15\r
-#define        R_ARM_THM_XPC22         16\r
-#define        R_ARM_COPY              20      /* Copy data from shared object. */\r
-#define        R_ARM_GLOB_DAT          21      /* Set GOT entry to data address. */\r
-#define        R_ARM_JUMP_SLOT         22      /* Set GOT entry to code address. */\r
-#define        R_ARM_RELATIVE          23      /* Add load address of shared object. */\r
-#define        R_ARM_GOTOFF            24      /* Add GOT-relative symbol address. */\r
-#define        R_ARM_GOTPC             25      /* Add PC-relative GOT table address. */\r
-#define        R_ARM_GOT32             26      /* Add PC-relative GOT offset. */\r
-#define        R_ARM_PLT32             27      /* Add PC-relative PLT offset. */\r
+#define  R_ARM_NONE    0  /* No relocation. */\r
+#define  R_ARM_PC24    1\r
+#define  R_ARM_ABS32    2\r
+#define  R_ARM_REL32    3\r
+#define  R_ARM_PC13    4\r
+#define  R_ARM_ABS16    5\r
+#define  R_ARM_ABS12    6\r
+#define  R_ARM_THM_ABS5    7\r
+#define  R_ARM_ABS8    8\r
+#define  R_ARM_SBREL32    9\r
+#define  R_ARM_THM_PC22    10\r
+#define  R_ARM_THM_PC8    11\r
+#define  R_ARM_AMP_VCALL9  12\r
+#define  R_ARM_SWI24    13\r
+#define  R_ARM_THM_SWI8    14\r
+#define  R_ARM_XPC25    15\r
+#define  R_ARM_THM_XPC22    16\r
+#define  R_ARM_COPY    20  /* Copy data from shared object. */\r
+#define  R_ARM_GLOB_DAT    21  /* Set GOT entry to data address. */\r
+#define  R_ARM_JUMP_SLOT    22  /* Set GOT entry to code address. */\r
+#define  R_ARM_RELATIVE    23  /* Add load address of shared object. */\r
+#define  R_ARM_GOTOFF    24  /* Add GOT-relative symbol address. */\r
+#define  R_ARM_GOTPC    25  /* Add PC-relative GOT table address. */\r
+#define  R_ARM_GOT32    26  /* Add PC-relative GOT offset. */\r
+#define  R_ARM_PLT32    27  /* Add PC-relative PLT offset. */\r
 #define R_ARM_CALL            28\r
 #define R_ARM_JMP24           29\r
-#define R_ARM_THM_MOVW_ABS_NC 47 \r
+#define R_ARM_THM_MOVW_ABS_NC 47\r
 #define R_ARM_THM_MOVT_ABS    48\r
 \r
 // Block of PC-relative relocations added to work around gcc putting\r
 // object relocations in static executables.\r
-#define R_ARM_THM_JUMP24        30  \r
-#define R_ARM_PREL31            42  \r
-#define R_ARM_MOVW_PREL_NC      45  \r
+#define R_ARM_THM_JUMP24        30\r
+#define R_ARM_PREL31            42\r
+#define R_ARM_MOVW_PREL_NC      45\r
 #define R_ARM_MOVT_PREL         46\r
 #define R_ARM_THM_MOVW_PREL_NC  49\r
 #define R_ARM_THM_MOVT_PREL     50\r
@@ -745,19 +745,19 @@ typedef struct {
 #define R_ARM_THM_ALU_PREL_11_0 53\r
 #define R_ARM_THM_PC12          54\r
 #define R_ARM_REL32_NOI         56\r
-#define R_ARM_ALU_PC_G0_NC         57\r
-#define R_ARM_ALU_PC_G0                58\r
-#define R_ARM_ALU_PC_G1_NC         59\r
-#define R_ARM_ALU_PC_G1                60\r
+#define R_ARM_ALU_PC_G0_NC      57\r
+#define R_ARM_ALU_PC_G0          58\r
+#define R_ARM_ALU_PC_G1_NC      59\r
+#define R_ARM_ALU_PC_G1          60\r
 #define R_ARM_ALU_PC_G2         61\r
-#define R_ARM_LDR_PC_G1                62\r
-#define R_ARM_LDR_PC_G2                63\r
-#define R_ARM_LDRS_PC_G0             64\r
-#define R_ARM_LDRS_PC_G1             65\r
-#define R_ARM_LDRS_PC_G2             66\r
-#define R_ARM_LDC_PC_G0                67\r
-#define R_ARM_LDC_PC_G1                68\r
-#define R_ARM_LDC_PC_G2                69\r
+#define R_ARM_LDR_PC_G1          62\r
+#define R_ARM_LDR_PC_G2          63\r
+#define R_ARM_LDRS_PC_G0        64\r
+#define R_ARM_LDRS_PC_G1        65\r
+#define R_ARM_LDRS_PC_G2        66\r
+#define R_ARM_LDC_PC_G0          67\r
+#define R_ARM_LDC_PC_G1          68\r
+#define R_ARM_LDC_PC_G2          69\r
 #define R_ARM_GOT_PREL          96\r
 #define R_ARM_THM_JUMP11       102\r
 #define R_ARM_THM_JUMP8        103\r
@@ -766,292 +766,292 @@ typedef struct {
 #define R_ARM_TLS_IE32         107\r
 \r
 #define R_ARM_THM_JUMP19    51\r
-#define        R_ARM_GNU_VTENTRY       100\r
-#define        R_ARM_GNU_VTINHERIT     101\r
-#define        R_ARM_RSBREL32          250\r
-#define        R_ARM_THM_RPC22         251\r
-#define        R_ARM_RREL32            252\r
-#define        R_ARM_RABS32            253\r
-#define        R_ARM_RPC24             254\r
-#define        R_ARM_RBASE             255\r
+#define  R_ARM_GNU_VTENTRY  100\r
+#define  R_ARM_GNU_VTINHERIT  101\r
+#define  R_ARM_RSBREL32    250\r
+#define  R_ARM_THM_RPC22    251\r
+#define  R_ARM_RREL32    252\r
+#define  R_ARM_RABS32    253\r
+#define  R_ARM_RPC24    254\r
+#define  R_ARM_RBASE    255\r
 \r
 \r
 \r
-/*     Name                    Value      Field        Calculation */\r
-#define        R_IA_64_NONE            0       /* None */\r
-#define        R_IA_64_IMM14           0x21    /* immediate14  S + A */\r
-#define        R_IA_64_IMM22           0x22    /* immediate22  S + A */\r
-#define        R_IA_64_IMM64           0x23    /* immediate64  S + A */\r
-#define        R_IA_64_DIR32MSB        0x24    /* word32 MSB   S + A */\r
-#define        R_IA_64_DIR32LSB        0x25    /* word32 LSB   S + A */\r
-#define        R_IA_64_DIR64MSB        0x26    /* word64 MSB   S + A */\r
-#define        R_IA_64_DIR64LSB        0x27    /* word64 LSB   S + A */\r
-#define        R_IA_64_GPREL22         0x2a    /* immediate22  @gprel(S + A) */\r
-#define        R_IA_64_GPREL64I        0x2b    /* immediate64  @gprel(S + A) */\r
-#define        R_IA_64_GPREL32MSB      0x2c    /* word32 MSB   @gprel(S + A) */\r
-#define        R_IA_64_GPREL32LSB      0x2d    /* word32 LSB   @gprel(S + A) */\r
-#define        R_IA_64_GPREL64MSB      0x2e    /* word64 MSB   @gprel(S + A) */\r
-#define        R_IA_64_GPREL64LSB      0x2f    /* word64 LSB   @gprel(S + A) */\r
-#define        R_IA_64_LTOFF22         0x32    /* immediate22  @ltoff(S + A) */\r
-#define        R_IA_64_LTOFF64I        0x33    /* immediate64  @ltoff(S + A) */\r
-#define        R_IA_64_PLTOFF22        0x3a    /* immediate22  @pltoff(S + A) */\r
-#define        R_IA_64_PLTOFF64I       0x3b    /* immediate64  @pltoff(S + A) */\r
-#define        R_IA_64_PLTOFF64MSB     0x3e    /* word64 MSB   @pltoff(S + A) */\r
-#define        R_IA_64_PLTOFF64LSB     0x3f    /* word64 LSB   @pltoff(S + A) */\r
-#define        R_IA_64_FPTR64I         0x43    /* immediate64  @fptr(S + A) */\r
-#define        R_IA_64_FPTR32MSB       0x44    /* word32 MSB   @fptr(S + A) */\r
-#define        R_IA_64_FPTR32LSB       0x45    /* word32 LSB   @fptr(S + A) */\r
-#define        R_IA_64_FPTR64MSB       0x46    /* word64 MSB   @fptr(S + A) */\r
-#define        R_IA_64_FPTR64LSB       0x47    /* word64 LSB   @fptr(S + A) */\r
-#define        R_IA_64_PCREL60B        0x48    /* immediate60 form1 S + A - P */\r
-#define        R_IA_64_PCREL21B        0x49    /* immediate21 form1 S + A - P */\r
-#define        R_IA_64_PCREL21M        0x4a    /* immediate21 form2 S + A - P */\r
-#define        R_IA_64_PCREL21F        0x4b    /* immediate21 form3 S + A - P */\r
-#define        R_IA_64_PCREL32MSB      0x4c    /* word32 MSB   S + A - P */\r
-#define        R_IA_64_PCREL32LSB      0x4d    /* word32 LSB   S + A - P */\r
-#define        R_IA_64_PCREL64MSB      0x4e    /* word64 MSB   S + A - P */\r
-#define        R_IA_64_PCREL64LSB      0x4f    /* word64 LSB   S + A - P */\r
-#define        R_IA_64_LTOFF_FPTR22    0x52    /* immediate22  @ltoff(@fptr(S + A)) */\r
-#define        R_IA_64_LTOFF_FPTR64I   0x53    /* immediate64  @ltoff(@fptr(S + A)) */\r
-#define        R_IA_64_LTOFF_FPTR32MSB 0x54    /* word32 MSB   @ltoff(@fptr(S + A)) */\r
-#define        R_IA_64_LTOFF_FPTR32LSB 0x55    /* word32 LSB   @ltoff(@fptr(S + A)) */\r
-#define        R_IA_64_LTOFF_FPTR64MSB 0x56    /* word64 MSB   @ltoff(@fptr(S + A)) */\r
-#define        R_IA_64_LTOFF_FPTR64LSB 0x57    /* word64 LSB   @ltoff(@fptr(S + A)) */\r
-#define        R_IA_64_SEGREL32MSB     0x5c    /* word32 MSB   @segrel(S + A) */\r
-#define        R_IA_64_SEGREL32LSB     0x5d    /* word32 LSB   @segrel(S + A) */\r
-#define        R_IA_64_SEGREL64MSB     0x5e    /* word64 MSB   @segrel(S + A) */\r
-#define        R_IA_64_SEGREL64LSB     0x5f    /* word64 LSB   @segrel(S + A) */\r
-#define        R_IA_64_SECREL32MSB     0x64    /* word32 MSB   @secrel(S + A) */\r
-#define        R_IA_64_SECREL32LSB     0x65    /* word32 LSB   @secrel(S + A) */\r
-#define        R_IA_64_SECREL64MSB     0x66    /* word64 MSB   @secrel(S + A) */\r
-#define        R_IA_64_SECREL64LSB     0x67    /* word64 LSB   @secrel(S + A) */\r
-#define        R_IA_64_REL32MSB        0x6c    /* word32 MSB   BD + A */\r
-#define        R_IA_64_REL32LSB        0x6d    /* word32 LSB   BD + A */\r
-#define        R_IA_64_REL64MSB        0x6e    /* word64 MSB   BD + A */\r
-#define        R_IA_64_REL64LSB        0x6f    /* word64 LSB   BD + A */\r
-#define        R_IA_64_LTV32MSB        0x74    /* word32 MSB   S + A */\r
-#define        R_IA_64_LTV32LSB        0x75    /* word32 LSB   S + A */\r
-#define        R_IA_64_LTV64MSB        0x76    /* word64 MSB   S + A */\r
-#define        R_IA_64_LTV64LSB        0x77    /* word64 LSB   S + A */\r
-#define        R_IA_64_PCREL21BI       0x79    /* immediate21 form1 S + A - P */\r
-#define        R_IA_64_PCREL22         0x7a    /* immediate22  S + A - P */\r
-#define        R_IA_64_PCREL64I        0x7b    /* immediate64  S + A - P */\r
-#define        R_IA_64_IPLTMSB         0x80    /* function descriptor MSB special */\r
-#define        R_IA_64_IPLTLSB         0x81    /* function descriptor LSB speciaal */\r
-#define        R_IA_64_SUB             0x85    /* immediate64  A - S */\r
-#define        R_IA_64_LTOFF22X        0x86    /* immediate22  special */\r
-#define        R_IA_64_LDXMOV          0x87    /* immediate22  special */\r
-#define        R_IA_64_TPREL14         0x91    /* imm14        @tprel(S + A) */\r
-#define        R_IA_64_TPREL22         0x92    /* imm22        @tprel(S + A) */\r
-#define        R_IA_64_TPREL64I        0x93    /* imm64        @tprel(S + A) */\r
-#define        R_IA_64_TPREL64MSB      0x96    /* word64 MSB   @tprel(S + A) */\r
-#define        R_IA_64_TPREL64LSB      0x97    /* word64 LSB   @tprel(S + A) */\r
-#define        R_IA_64_LTOFF_TPREL22   0x9a    /* imm22        @ltoff(@tprel(S+A)) */\r
-#define        R_IA_64_DTPMOD64MSB     0xa6    /* word64 MSB   @dtpmod(S + A) */\r
-#define        R_IA_64_DTPMOD64LSB     0xa7    /* word64 LSB   @dtpmod(S + A) */\r
-#define        R_IA_64_LTOFF_DTPMOD22  0xaa    /* imm22        @ltoff(@dtpmod(S+A)) */\r
-#define        R_IA_64_DTPREL14        0xb1    /* imm14        @dtprel(S + A) */\r
-#define        R_IA_64_DTPREL22        0xb2    /* imm22        @dtprel(S + A) */\r
-#define        R_IA_64_DTPREL64I       0xb3    /* imm64        @dtprel(S + A) */\r
-#define        R_IA_64_DTPREL32MSB     0xb4    /* word32 MSB   @dtprel(S + A) */\r
-#define        R_IA_64_DTPREL32LSB     0xb5    /* word32 LSB   @dtprel(S + A) */\r
-#define        R_IA_64_DTPREL64MSB     0xb6    /* word64 MSB   @dtprel(S + A) */\r
-#define        R_IA_64_DTPREL64LSB     0xb7    /* word64 LSB   @dtprel(S + A) */\r
-#define        R_IA_64_LTOFF_DTPREL22  0xba    /* imm22        @ltoff(@dtprel(S+A)) */\r
+/*  Name      Value     Field  Calculation */\r
+#define  R_IA_64_NONE    0  /* None */\r
+#define  R_IA_64_IMM14    0x21  /* immediate14  S + A */\r
+#define  R_IA_64_IMM22    0x22  /* immediate22  S + A */\r
+#define  R_IA_64_IMM64    0x23  /* immediate64  S + A */\r
+#define  R_IA_64_DIR32MSB  0x24  /* word32 MSB  S + A */\r
+#define  R_IA_64_DIR32LSB  0x25  /* word32 LSB  S + A */\r
+#define  R_IA_64_DIR64MSB  0x26  /* word64 MSB  S + A */\r
+#define  R_IA_64_DIR64LSB  0x27  /* word64 LSB  S + A */\r
+#define  R_IA_64_GPREL22    0x2a  /* immediate22  @gprel(S + A) */\r
+#define  R_IA_64_GPREL64I  0x2b  /* immediate64  @gprel(S + A) */\r
+#define  R_IA_64_GPREL32MSB  0x2c  /* word32 MSB  @gprel(S + A) */\r
+#define  R_IA_64_GPREL32LSB  0x2d  /* word32 LSB  @gprel(S + A) */\r
+#define  R_IA_64_GPREL64MSB  0x2e  /* word64 MSB  @gprel(S + A) */\r
+#define  R_IA_64_GPREL64LSB  0x2f  /* word64 LSB  @gprel(S + A) */\r
+#define  R_IA_64_LTOFF22    0x32  /* immediate22  @ltoff(S + A) */\r
+#define  R_IA_64_LTOFF64I  0x33  /* immediate64  @ltoff(S + A) */\r
+#define  R_IA_64_PLTOFF22  0x3a  /* immediate22  @pltoff(S + A) */\r
+#define  R_IA_64_PLTOFF64I  0x3b  /* immediate64  @pltoff(S + A) */\r
+#define  R_IA_64_PLTOFF64MSB  0x3e  /* word64 MSB  @pltoff(S + A) */\r
+#define  R_IA_64_PLTOFF64LSB  0x3f  /* word64 LSB  @pltoff(S + A) */\r
+#define  R_IA_64_FPTR64I    0x43  /* immediate64  @fptr(S + A) */\r
+#define  R_IA_64_FPTR32MSB  0x44  /* word32 MSB  @fptr(S + A) */\r
+#define  R_IA_64_FPTR32LSB  0x45  /* word32 LSB  @fptr(S + A) */\r
+#define  R_IA_64_FPTR64MSB  0x46  /* word64 MSB  @fptr(S + A) */\r
+#define  R_IA_64_FPTR64LSB  0x47  /* word64 LSB  @fptr(S + A) */\r
+#define  R_IA_64_PCREL60B  0x48  /* immediate60 form1 S + A - P */\r
+#define  R_IA_64_PCREL21B  0x49  /* immediate21 form1 S + A - P */\r
+#define  R_IA_64_PCREL21M  0x4a  /* immediate21 form2 S + A - P */\r
+#define  R_IA_64_PCREL21F  0x4b  /* immediate21 form3 S + A - P */\r
+#define  R_IA_64_PCREL32MSB  0x4c  /* word32 MSB  S + A - P */\r
+#define  R_IA_64_PCREL32LSB  0x4d  /* word32 LSB  S + A - P */\r
+#define  R_IA_64_PCREL64MSB  0x4e  /* word64 MSB  S + A - P */\r
+#define  R_IA_64_PCREL64LSB  0x4f  /* word64 LSB  S + A - P */\r
+#define  R_IA_64_LTOFF_FPTR22  0x52  /* immediate22  @ltoff(@fptr(S + A)) */\r
+#define  R_IA_64_LTOFF_FPTR64I  0x53  /* immediate64  @ltoff(@fptr(S + A)) */\r
+#define  R_IA_64_LTOFF_FPTR32MSB  0x54  /* word32 MSB  @ltoff(@fptr(S + A)) */\r
+#define  R_IA_64_LTOFF_FPTR32LSB  0x55  /* word32 LSB  @ltoff(@fptr(S + A)) */\r
+#define  R_IA_64_LTOFF_FPTR64MSB  0x56  /* word64 MSB  @ltoff(@fptr(S + A)) */\r
+#define  R_IA_64_LTOFF_FPTR64LSB  0x57  /* word64 LSB  @ltoff(@fptr(S + A)) */\r
+#define  R_IA_64_SEGREL32MSB  0x5c  /* word32 MSB  @segrel(S + A) */\r
+#define  R_IA_64_SEGREL32LSB  0x5d  /* word32 LSB  @segrel(S + A) */\r
+#define  R_IA_64_SEGREL64MSB  0x5e  /* word64 MSB  @segrel(S + A) */\r
+#define  R_IA_64_SEGREL64LSB  0x5f  /* word64 LSB  @segrel(S + A) */\r
+#define  R_IA_64_SECREL32MSB  0x64  /* word32 MSB  @secrel(S + A) */\r
+#define  R_IA_64_SECREL32LSB  0x65  /* word32 LSB  @secrel(S + A) */\r
+#define  R_IA_64_SECREL64MSB  0x66  /* word64 MSB  @secrel(S + A) */\r
+#define  R_IA_64_SECREL64LSB  0x67  /* word64 LSB  @secrel(S + A) */\r
+#define  R_IA_64_REL32MSB  0x6c  /* word32 MSB  BD + A */\r
+#define  R_IA_64_REL32LSB  0x6d  /* word32 LSB  BD + A */\r
+#define  R_IA_64_REL64MSB  0x6e  /* word64 MSB  BD + A */\r
+#define  R_IA_64_REL64LSB  0x6f  /* word64 LSB  BD + A */\r
+#define  R_IA_64_LTV32MSB  0x74  /* word32 MSB  S + A */\r
+#define  R_IA_64_LTV32LSB  0x75  /* word32 LSB  S + A */\r
+#define  R_IA_64_LTV64MSB  0x76  /* word64 MSB  S + A */\r
+#define  R_IA_64_LTV64LSB  0x77  /* word64 LSB  S + A */\r
+#define  R_IA_64_PCREL21BI  0x79  /* immediate21 form1 S + A - P */\r
+#define  R_IA_64_PCREL22    0x7a  /* immediate22  S + A - P */\r
+#define  R_IA_64_PCREL64I  0x7b  /* immediate64  S + A - P */\r
+#define  R_IA_64_IPLTMSB    0x80  /* function descriptor MSB special */\r
+#define  R_IA_64_IPLTLSB    0x81  /* function descriptor LSB speciaal */\r
+#define  R_IA_64_SUB    0x85  /* immediate64  A - S */\r
+#define  R_IA_64_LTOFF22X  0x86  /* immediate22  special */\r
+#define  R_IA_64_LDXMOV    0x87  /* immediate22  special */\r
+#define  R_IA_64_TPREL14    0x91  /* imm14  @tprel(S + A) */\r
+#define  R_IA_64_TPREL22    0x92  /* imm22  @tprel(S + A) */\r
+#define  R_IA_64_TPREL64I  0x93  /* imm64  @tprel(S + A) */\r
+#define  R_IA_64_TPREL64MSB  0x96  /* word64 MSB  @tprel(S + A) */\r
+#define  R_IA_64_TPREL64LSB  0x97  /* word64 LSB  @tprel(S + A) */\r
+#define  R_IA_64_LTOFF_TPREL22  0x9a  /* imm22  @ltoff(@tprel(S+A)) */\r
+#define  R_IA_64_DTPMOD64MSB  0xa6  /* word64 MSB  @dtpmod(S + A) */\r
+#define  R_IA_64_DTPMOD64LSB  0xa7  /* word64 LSB  @dtpmod(S + A) */\r
+#define  R_IA_64_LTOFF_DTPMOD22  0xaa  /* imm22  @ltoff(@dtpmod(S+A)) */\r
+#define  R_IA_64_DTPREL14  0xb1  /* imm14  @dtprel(S + A) */\r
+#define  R_IA_64_DTPREL22  0xb2  /* imm22  @dtprel(S + A) */\r
+#define  R_IA_64_DTPREL64I  0xb3  /* imm64  @dtprel(S + A) */\r
+#define  R_IA_64_DTPREL32MSB  0xb4  /* word32 MSB  @dtprel(S + A) */\r
+#define  R_IA_64_DTPREL32LSB  0xb5  /* word32 LSB  @dtprel(S + A) */\r
+#define  R_IA_64_DTPREL64MSB  0xb6  /* word64 MSB  @dtprel(S + A) */\r
+#define  R_IA_64_DTPREL64LSB  0xb7  /* word64 LSB  @dtprel(S + A) */\r
+#define  R_IA_64_LTOFF_DTPREL22  0xba  /* imm22  @ltoff(@dtprel(S+A)) */\r
 \r
-#define        R_PPC_NONE              0       /* No relocation. */\r
-#define        R_PPC_ADDR32            1\r
-#define        R_PPC_ADDR24            2\r
-#define        R_PPC_ADDR16            3\r
-#define        R_PPC_ADDR16_LO         4\r
-#define        R_PPC_ADDR16_HI         5\r
-#define        R_PPC_ADDR16_HA         6\r
-#define        R_PPC_ADDR14            7\r
-#define        R_PPC_ADDR14_BRTAKEN    8\r
-#define        R_PPC_ADDR14_BRNTAKEN   9\r
-#define        R_PPC_REL24             10\r
-#define        R_PPC_REL14             11\r
-#define        R_PPC_REL14_BRTAKEN     12\r
-#define        R_PPC_REL14_BRNTAKEN    13\r
-#define        R_PPC_GOT16             14\r
-#define        R_PPC_GOT16_LO          15\r
-#define        R_PPC_GOT16_HI          16\r
-#define        R_PPC_GOT16_HA          17\r
-#define        R_PPC_PLTREL24          18\r
-#define        R_PPC_COPY              19\r
-#define        R_PPC_GLOB_DAT          20\r
-#define        R_PPC_JMP_SLOT          21\r
-#define        R_PPC_RELATIVE          22\r
-#define        R_PPC_LOCAL24PC         23\r
-#define        R_PPC_UADDR32           24\r
-#define        R_PPC_UADDR16           25\r
-#define        R_PPC_REL32             26\r
-#define        R_PPC_PLT32             27\r
-#define        R_PPC_PLTREL32          28\r
-#define        R_PPC_PLT16_LO          29\r
-#define        R_PPC_PLT16_HI          30\r
-#define        R_PPC_PLT16_HA          31\r
-#define        R_PPC_SDAREL16          32\r
-#define        R_PPC_SECTOFF           33\r
-#define        R_PPC_SECTOFF_LO        34\r
-#define        R_PPC_SECTOFF_HI        35\r
-#define        R_PPC_SECTOFF_HA        36\r
+#define  R_PPC_NONE    0  /* No relocation. */\r
+#define  R_PPC_ADDR32    1\r
+#define  R_PPC_ADDR24    2\r
+#define  R_PPC_ADDR16    3\r
+#define  R_PPC_ADDR16_LO    4\r
+#define  R_PPC_ADDR16_HI    5\r
+#define  R_PPC_ADDR16_HA    6\r
+#define  R_PPC_ADDR14    7\r
+#define  R_PPC_ADDR14_BRTAKEN  8\r
+#define  R_PPC_ADDR14_BRNTAKEN  9\r
+#define  R_PPC_REL24    10\r
+#define  R_PPC_REL14    11\r
+#define  R_PPC_REL14_BRTAKEN  12\r
+#define  R_PPC_REL14_BRNTAKEN  13\r
+#define  R_PPC_GOT16    14\r
+#define  R_PPC_GOT16_LO    15\r
+#define  R_PPC_GOT16_HI    16\r
+#define  R_PPC_GOT16_HA    17\r
+#define  R_PPC_PLTREL24    18\r
+#define  R_PPC_COPY    19\r
+#define  R_PPC_GLOB_DAT    20\r
+#define  R_PPC_JMP_SLOT    21\r
+#define  R_PPC_RELATIVE    22\r
+#define  R_PPC_LOCAL24PC    23\r
+#define  R_PPC_UADDR32    24\r
+#define  R_PPC_UADDR16    25\r
+#define  R_PPC_REL32    26\r
+#define  R_PPC_PLT32    27\r
+#define  R_PPC_PLTREL32    28\r
+#define  R_PPC_PLT16_LO    29\r
+#define  R_PPC_PLT16_HI    30\r
+#define  R_PPC_PLT16_HA    31\r
+#define  R_PPC_SDAREL16    32\r
+#define  R_PPC_SECTOFF    33\r
+#define  R_PPC_SECTOFF_LO  34\r
+#define  R_PPC_SECTOFF_HI  35\r
+#define  R_PPC_SECTOFF_HA  36\r
 \r
 /*\r
  * TLS relocations\r
  */\r
-#define R_PPC_TLS              67\r
-#define R_PPC_DTPMOD32         68\r
-#define R_PPC_TPREL16          69\r
-#define R_PPC_TPREL16_LO       70\r
-#define R_PPC_TPREL16_HI       71\r
-#define R_PPC_TPREL16_HA       72\r
-#define R_PPC_TPREL32          73\r
-#define R_PPC_DTPREL16         74\r
-#define R_PPC_DTPREL16_LO      75\r
-#define R_PPC_DTPREL16_HI      76\r
-#define R_PPC_DTPREL16_HA      77\r
-#define R_PPC_DTPREL32         78\r
-#define R_PPC_GOT_TLSGD16      79\r
-#define R_PPC_GOT_TLSGD16_LO   80\r
-#define R_PPC_GOT_TLSGD16_HI   81\r
-#define R_PPC_GOT_TLSGD16_HA   82\r
-#define R_PPC_GOT_TLSLD16      83\r
-#define R_PPC_GOT_TLSLD16_LO   84\r
-#define R_PPC_GOT_TLSLD16_HI   85\r
-#define R_PPC_GOT_TLSLD16_HA   86\r
-#define R_PPC_GOT_TPREL16      87\r
-#define R_PPC_GOT_TPREL16_LO   88\r
-#define R_PPC_GOT_TPREL16_HI   89\r
-#define R_PPC_GOT_TPREL16_HA   90\r
+#define R_PPC_TLS    67\r
+#define R_PPC_DTPMOD32    68\r
+#define R_PPC_TPREL16    69\r
+#define R_PPC_TPREL16_LO  70\r
+#define R_PPC_TPREL16_HI  71\r
+#define R_PPC_TPREL16_HA  72\r
+#define R_PPC_TPREL32    73\r
+#define R_PPC_DTPREL16    74\r
+#define R_PPC_DTPREL16_LO  75\r
+#define R_PPC_DTPREL16_HI  76\r
+#define R_PPC_DTPREL16_HA  77\r
+#define R_PPC_DTPREL32    78\r
+#define R_PPC_GOT_TLSGD16  79\r
+#define R_PPC_GOT_TLSGD16_LO  80\r
+#define R_PPC_GOT_TLSGD16_HI  81\r
+#define R_PPC_GOT_TLSGD16_HA  82\r
+#define R_PPC_GOT_TLSLD16  83\r
+#define R_PPC_GOT_TLSLD16_LO  84\r
+#define R_PPC_GOT_TLSLD16_HI  85\r
+#define R_PPC_GOT_TLSLD16_HA  86\r
+#define R_PPC_GOT_TPREL16  87\r
+#define R_PPC_GOT_TPREL16_LO  88\r
+#define R_PPC_GOT_TPREL16_HI  89\r
+#define R_PPC_GOT_TPREL16_HA  90\r
 \r
 /*\r
  * The remaining relocs are from the Embedded ELF ABI, and are not in the\r
  *  SVR4 ELF ABI.\r
  */\r
 \r
-#define        R_PPC_EMB_NADDR32       101\r
-#define        R_PPC_EMB_NADDR16       102\r
-#define        R_PPC_EMB_NADDR16_LO    103\r
-#define        R_PPC_EMB_NADDR16_HI    104\r
-#define        R_PPC_EMB_NADDR16_HA    105\r
-#define        R_PPC_EMB_SDAI16        106\r
-#define        R_PPC_EMB_SDA2I16       107\r
-#define        R_PPC_EMB_SDA2REL       108\r
-#define        R_PPC_EMB_SDA21         109\r
-#define        R_PPC_EMB_MRKREF        110\r
-#define        R_PPC_EMB_RELSEC16      111\r
-#define        R_PPC_EMB_RELST_LO      112\r
-#define        R_PPC_EMB_RELST_HI      113\r
-#define        R_PPC_EMB_RELST_HA      114\r
-#define        R_PPC_EMB_BIT_FLD       115\r
-#define        R_PPC_EMB_RELSDA        116\r
+#define  R_PPC_EMB_NADDR32  101\r
+#define  R_PPC_EMB_NADDR16  102\r
+#define  R_PPC_EMB_NADDR16_LO  103\r
+#define  R_PPC_EMB_NADDR16_HI  104\r
+#define  R_PPC_EMB_NADDR16_HA  105\r
+#define  R_PPC_EMB_SDAI16  106\r
+#define  R_PPC_EMB_SDA2I16  107\r
+#define  R_PPC_EMB_SDA2REL  108\r
+#define  R_PPC_EMB_SDA21    109\r
+#define  R_PPC_EMB_MRKREF  110\r
+#define  R_PPC_EMB_RELSEC16  111\r
+#define  R_PPC_EMB_RELST_LO  112\r
+#define  R_PPC_EMB_RELST_HI  113\r
+#define  R_PPC_EMB_RELST_HA  114\r
+#define  R_PPC_EMB_BIT_FLD  115\r
+#define  R_PPC_EMB_RELSDA  116\r
 \r
-#define        R_SPARC_NONE            0\r
-#define        R_SPARC_8               1\r
-#define        R_SPARC_16              2\r
-#define        R_SPARC_32              3\r
-#define        R_SPARC_DISP8           4\r
-#define        R_SPARC_DISP16          5\r
-#define        R_SPARC_DISP32          6\r
-#define        R_SPARC_WDISP30         7\r
-#define        R_SPARC_WDISP22         8\r
-#define        R_SPARC_HI22            9\r
-#define        R_SPARC_22              10\r
-#define        R_SPARC_13              11\r
-#define        R_SPARC_LO10            12\r
-#define        R_SPARC_GOT10           13\r
-#define        R_SPARC_GOT13           14\r
-#define        R_SPARC_GOT22           15\r
-#define        R_SPARC_PC10            16\r
-#define        R_SPARC_PC22            17\r
-#define        R_SPARC_WPLT30          18\r
-#define        R_SPARC_COPY            19\r
-#define        R_SPARC_GLOB_DAT        20\r
-#define        R_SPARC_JMP_SLOT        21\r
-#define        R_SPARC_RELATIVE        22\r
-#define        R_SPARC_UA32            23\r
-#define        R_SPARC_PLT32           24\r
-#define        R_SPARC_HIPLT22         25\r
-#define        R_SPARC_LOPLT10         26\r
-#define        R_SPARC_PCPLT32         27\r
-#define        R_SPARC_PCPLT22         28\r
-#define        R_SPARC_PCPLT10         29\r
-#define        R_SPARC_10              30\r
-#define        R_SPARC_11              31\r
-#define        R_SPARC_64              32\r
-#define        R_SPARC_OLO10           33\r
-#define        R_SPARC_HH22            34\r
-#define        R_SPARC_HM10            35\r
-#define        R_SPARC_LM22            36\r
-#define        R_SPARC_PC_HH22         37\r
-#define        R_SPARC_PC_HM10         38\r
-#define        R_SPARC_PC_LM22         39\r
-#define        R_SPARC_WDISP16         40\r
-#define        R_SPARC_WDISP19         41\r
-#define        R_SPARC_GLOB_JMP        42\r
-#define        R_SPARC_7               43\r
-#define        R_SPARC_5               44\r
-#define        R_SPARC_6               45\r
-#define        R_SPARC_DISP64          46\r
-#define        R_SPARC_PLT64           47\r
-#define        R_SPARC_HIX22           48\r
-#define        R_SPARC_LOX10           49\r
-#define        R_SPARC_H44             50\r
-#define        R_SPARC_M44             51\r
-#define        R_SPARC_L44             52\r
-#define        R_SPARC_REGISTER        53\r
-#define        R_SPARC_UA64            54\r
-#define        R_SPARC_UA16            55\r
-#define        R_SPARC_TLS_GD_HI22     56\r
-#define        R_SPARC_TLS_GD_LO10     57\r
-#define        R_SPARC_TLS_GD_ADD      58\r
-#define        R_SPARC_TLS_GD_CALL     59\r
-#define        R_SPARC_TLS_LDM_HI22    60\r
-#define        R_SPARC_TLS_LDM_LO10    61\r
-#define        R_SPARC_TLS_LDM_ADD     62\r
-#define        R_SPARC_TLS_LDM_CALL    63\r
-#define        R_SPARC_TLS_LDO_HIX22   64\r
-#define        R_SPARC_TLS_LDO_LOX10   65\r
-#define        R_SPARC_TLS_LDO_ADD     66\r
-#define        R_SPARC_TLS_IE_HI22     67\r
-#define        R_SPARC_TLS_IE_LO10     68\r
-#define        R_SPARC_TLS_IE_LD       69\r
-#define        R_SPARC_TLS_IE_LDX      70\r
-#define        R_SPARC_TLS_IE_ADD      71\r
-#define        R_SPARC_TLS_LE_HIX22    72\r
-#define        R_SPARC_TLS_LE_LOX10    73\r
-#define        R_SPARC_TLS_DTPMOD32    74\r
-#define        R_SPARC_TLS_DTPMOD64    75\r
-#define        R_SPARC_TLS_DTPOFF32    76\r
-#define        R_SPARC_TLS_DTPOFF64    77\r
-#define        R_SPARC_TLS_TPOFF32     78\r
-#define        R_SPARC_TLS_TPOFF64     79\r
+#define  R_SPARC_NONE    0\r
+#define  R_SPARC_8    1\r
+#define  R_SPARC_16    2\r
+#define  R_SPARC_32    3\r
+#define  R_SPARC_DISP8    4\r
+#define  R_SPARC_DISP16    5\r
+#define  R_SPARC_DISP32    6\r
+#define  R_SPARC_WDISP30    7\r
+#define  R_SPARC_WDISP22    8\r
+#define  R_SPARC_HI22    9\r
+#define  R_SPARC_22    10\r
+#define  R_SPARC_13    11\r
+#define  R_SPARC_LO10    12\r
+#define  R_SPARC_GOT10    13\r
+#define  R_SPARC_GOT13    14\r
+#define  R_SPARC_GOT22    15\r
+#define  R_SPARC_PC10    16\r
+#define  R_SPARC_PC22    17\r
+#define  R_SPARC_WPLT30    18\r
+#define  R_SPARC_COPY    19\r
+#define  R_SPARC_GLOB_DAT  20\r
+#define  R_SPARC_JMP_SLOT  21\r
+#define  R_SPARC_RELATIVE  22\r
+#define  R_SPARC_UA32    23\r
+#define  R_SPARC_PLT32    24\r
+#define  R_SPARC_HIPLT22    25\r
+#define  R_SPARC_LOPLT10    26\r
+#define  R_SPARC_PCPLT32    27\r
+#define  R_SPARC_PCPLT22    28\r
+#define  R_SPARC_PCPLT10    29\r
+#define  R_SPARC_10    30\r
+#define  R_SPARC_11    31\r
+#define  R_SPARC_64    32\r
+#define  R_SPARC_OLO10    33\r
+#define  R_SPARC_HH22    34\r
+#define  R_SPARC_HM10    35\r
+#define  R_SPARC_LM22    36\r
+#define  R_SPARC_PC_HH22    37\r
+#define  R_SPARC_PC_HM10    38\r
+#define  R_SPARC_PC_LM22    39\r
+#define  R_SPARC_WDISP16    40\r
+#define  R_SPARC_WDISP19    41\r
+#define  R_SPARC_GLOB_JMP  42\r
+#define  R_SPARC_7    43\r
+#define  R_SPARC_5    44\r
+#define  R_SPARC_6    45\r
+#define  R_SPARC_DISP64    46\r
+#define  R_SPARC_PLT64    47\r
+#define  R_SPARC_HIX22    48\r
+#define  R_SPARC_LOX10    49\r
+#define  R_SPARC_H44    50\r
+#define  R_SPARC_M44    51\r
+#define  R_SPARC_L44    52\r
+#define  R_SPARC_REGISTER  53\r
+#define  R_SPARC_UA64    54\r
+#define  R_SPARC_UA16    55\r
+#define  R_SPARC_TLS_GD_HI22  56\r
+#define  R_SPARC_TLS_GD_LO10  57\r
+#define  R_SPARC_TLS_GD_ADD  58\r
+#define  R_SPARC_TLS_GD_CALL  59\r
+#define  R_SPARC_TLS_LDM_HI22  60\r
+#define  R_SPARC_TLS_LDM_LO10  61\r
+#define  R_SPARC_TLS_LDM_ADD  62\r
+#define  R_SPARC_TLS_LDM_CALL  63\r
+#define  R_SPARC_TLS_LDO_HIX22  64\r
+#define  R_SPARC_TLS_LDO_LOX10  65\r
+#define  R_SPARC_TLS_LDO_ADD  66\r
+#define  R_SPARC_TLS_IE_HI22  67\r
+#define  R_SPARC_TLS_IE_LO10  68\r
+#define  R_SPARC_TLS_IE_LD  69\r
+#define  R_SPARC_TLS_IE_LDX  70\r
+#define  R_SPARC_TLS_IE_ADD  71\r
+#define  R_SPARC_TLS_LE_HIX22  72\r
+#define  R_SPARC_TLS_LE_LOX10  73\r
+#define  R_SPARC_TLS_DTPMOD32  74\r
+#define  R_SPARC_TLS_DTPMOD64  75\r
+#define  R_SPARC_TLS_DTPOFF32  76\r
+#define  R_SPARC_TLS_DTPOFF64  77\r
+#define  R_SPARC_TLS_TPOFF32  78\r
+#define  R_SPARC_TLS_TPOFF64  79\r
 \r
-#define        R_X86_64_NONE           0       /* No relocation. */\r
-#define        R_X86_64_64             1       /* Add 64 bit symbol value. */\r
-#define        R_X86_64_PC32           2       /* PC-relative 32 bit signed sym value. */\r
-#define        R_X86_64_GOT32          3       /* PC-relative 32 bit GOT offset. */\r
-#define        R_X86_64_PLT32          4       /* PC-relative 32 bit PLT offset. */\r
-#define        R_X86_64_COPY           5       /* Copy data from shared object. */\r
-#define        R_X86_64_GLOB_DAT       6       /* Set GOT entry to data address. */\r
-#define        R_X86_64_JMP_SLOT       7       /* Set GOT entry to code address. */\r
-#define        R_X86_64_RELATIVE       8       /* Add load address of shared object. */\r
-#define        R_X86_64_GOTPCREL       9       /* Add 32 bit signed pcrel offset to GOT. */\r
-#define        R_X86_64_32             10      /* Add 32 bit zero extended symbol value */\r
-#define        R_X86_64_32S            11      /* Add 32 bit sign extended symbol value */\r
-#define        R_X86_64_16             12      /* Add 16 bit zero extended symbol value */\r
-#define        R_X86_64_PC16           13      /* Add 16 bit signed extended pc relative symbol value */\r
-#define        R_X86_64_8              14      /* Add 8 bit zero extended symbol value */\r
-#define        R_X86_64_PC8            15      /* Add 8 bit signed extended pc relative symbol value */\r
-#define        R_X86_64_DTPMOD64       16      /* ID of module containing symbol */\r
-#define        R_X86_64_DTPOFF64       17      /* Offset in TLS block */\r
-#define        R_X86_64_TPOFF64        18      /* Offset in static TLS block */\r
-#define        R_X86_64_TLSGD          19      /* PC relative offset to GD GOT entry */\r
-#define        R_X86_64_TLSLD          20      /* PC relative offset to LD GOT entry */\r
-#define        R_X86_64_DTPOFF32       21      /* Offset in TLS block */\r
-#define        R_X86_64_GOTTPOFF       22      /* PC relative offset to IE GOT entry */\r
-#define        R_X86_64_TPOFF32        23      /* Offset in static TLS block */\r
+#define  R_X86_64_NONE    0  /* No relocation. */\r
+#define  R_X86_64_64    1  /* Add 64 bit symbol value. */\r
+#define  R_X86_64_PC32    2  /* PC-relative 32 bit signed sym value. */\r
+#define  R_X86_64_GOT32    3  /* PC-relative 32 bit GOT offset. */\r
+#define  R_X86_64_PLT32    4  /* PC-relative 32 bit PLT offset. */\r
+#define  R_X86_64_COPY    5  /* Copy data from shared object. */\r
+#define  R_X86_64_GLOB_DAT  6  /* Set GOT entry to data address. */\r
+#define  R_X86_64_JMP_SLOT  7  /* Set GOT entry to code address. */\r
+#define  R_X86_64_RELATIVE  8  /* Add load address of shared object. */\r
+#define  R_X86_64_GOTPCREL  9  /* Add 32 bit signed pcrel offset to GOT. */\r
+#define  R_X86_64_32    10  /* Add 32 bit zero extended symbol value */\r
+#define  R_X86_64_32S    11  /* Add 32 bit sign extended symbol value */\r
+#define  R_X86_64_16    12  /* Add 16 bit zero extended symbol value */\r
+#define  R_X86_64_PC16    13  /* Add 16 bit signed extended pc relative symbol value */\r
+#define  R_X86_64_8    14  /* Add 8 bit zero extended symbol value */\r
+#define  R_X86_64_PC8    15  /* Add 8 bit signed extended pc relative symbol value */\r
+#define  R_X86_64_DTPMOD64  16  /* ID of module containing symbol */\r
+#define  R_X86_64_DTPOFF64  17  /* Offset in TLS block */\r
+#define  R_X86_64_TPOFF64  18  /* Offset in static TLS block */\r
+#define  R_X86_64_TLSGD    19  /* PC relative offset to GD GOT entry */\r
+#define  R_X86_64_TLSLD    20  /* PC relative offset to LD GOT entry */\r
+#define  R_X86_64_DTPOFF32  21  /* Offset in TLS block */\r
+#define  R_X86_64_GOTTPOFF  22  /* PC relative offset to IE GOT entry */\r
+#define  R_X86_64_TPOFF32  23  /* Offset in static TLS block */\r
 \r
 \r
 #endif /* !_SYS_ELF_COMMON_H_ */\r
index 3bb05efa36cd06b86c31f4b6eb08ee8144d83058..c484b7136c3bca5557b4d12e84cac124b1084d64 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
   Pre-Create a 4G page table (2M pages).\r
   It's used in DUET x64 build needed to enter LongMode.\r
\r
+\r
   Create 4G page table (2M pages)\r
\r
+\r
                               Linear Address\r
     63    48 47   39 38           30 29       21 20                          0\r
    +--------+-------+---------------+-----------+-----------------------------+\r
                           Directory-Ptr Directory {512}\r
                         ) {4}\r
 \r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -96,7 +96,7 @@ Usage (
   )\r
 {\r
   printf ("Usage: GenPage.exe [options] EfiLoaderImageName \n\n\\r
-Copyright (c) 2008 - 2014, Intel Corporation.  All rights reserved.\n\n\\r
+Copyright (c) 2008 - 2018, Intel Corporation.  All rights reserved.\n\n\\r
   Utility to generate the EfiLoader image containing a page table.\n\n\\r
 optional arguments:\n\\r
   -h, --help            Show this help message and exit\n\\r
@@ -170,7 +170,7 @@ Return:
   for (PML4Index = 0; PML4Index < EFI_PML4_ENTRY_NUM; PML4Index++, PageMapLevel4Entry++) {\r
     //\r
     // Each Page-Map-Level-4-Table Entry points to the base address of a Page-Directory-Pointer-Table Entry\r
-    //  \r
+    //\r
     PageTablePtr += EFI_SIZE_OF_PAGE;\r
     PageDirectoryPointerEntry = (X64_PAGE_MAP_AND_DIRECTORY_POINTER_2MB_4K *)PageTablePtr;\r
 \r
@@ -184,7 +184,7 @@ Return:
     for (PDPTEIndex = 0; PDPTEIndex < EFI_PDPTE_ENTRY_NUM; PDPTEIndex++, PageDirectoryPointerEntry++) {\r
       //\r
       // Each Page-Directory-Pointer-Table Entry points to the base address of a Page-Directory Entry\r
-      //       \r
+      //\r
       PageTablePtr += EFI_SIZE_OF_PAGE;\r
       PageDirectoryEntry2MB = (X64_PAGE_TABLE_ENTRY_2M *)PageTablePtr;\r
 \r
@@ -310,20 +310,20 @@ main (
     Usage();\r
     return STATUS_ERROR;\r
   }\r
-  \r
+\r
   argc --;\r
   argv ++;\r
 \r
   if ((stricmp (argv[0], "-h") == 0) || (stricmp (argv[0], "--help") == 0)) {\r
     Usage();\r
-    return 0;    \r
+    return 0;\r
   }\r
 \r
   if (stricmp (argv[0], "--version") == 0) {\r
     Version();\r
-    return 0;    \r
+    return 0;\r
   }\r
-  \r
+\r
   while (argc > 0) {\r
     if ((stricmp (argv[0], "-o") == 0) || (stricmp (argv[0], "--output") == 0)) {\r
       if (argv[1] == NULL || argv[1][0] == '-') {\r
@@ -333,9 +333,9 @@ main (
       OutputFile = argv[1];\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
-    \r
+\r
     if ((stricmp (argv[0], "-b") == 0) || (stricmp (argv[0], "--baseaddr") == 0)) {\r
       if (argv[1] == NULL || argv[1][0] == '-') {\r
         Error (NULL, 0, 1003, "Invalid option value", "Base address is missing for -b option");\r
@@ -349,9 +349,9 @@ main (
       gPageTableBaseAddress = (UINT32) TempValue;\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
-    \r
+\r
     if ((stricmp (argv[0], "-f") == 0) || (stricmp (argv[0], "--offset") == 0)) {\r
       if (argv[1] == NULL || argv[1][0] == '-') {\r
         Error (NULL, 0, 1003, "Invalid option value", "Offset is missing for -f option");\r
@@ -365,21 +365,21 @@ main (
       gPageTableOffsetInFile = (UINT32) TempValue;\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-q") == 0) || (stricmp (argv[0], "--quiet") == 0)) {\r
       argc --;\r
       argv ++;\r
-      continue; \r
+      continue;\r
     }\r
-    \r
+\r
     if ((stricmp (argv[0], "-v") ==0) || (stricmp (argv[0], "--verbose") == 0)) {\r
       argc --;\r
       argv ++;\r
-      continue; \r
+      continue;\r
     }\r
-    \r
+\r
     if ((stricmp (argv[0], "-d") == 0) || (stricmp (argv[0], "--debug") == 0)) {\r
       if (argv[1] == NULL || argv[1][0] == '-') {\r
         Error (NULL, 0, 1003, "Invalid option value", "Debug Level is not specified.");\r
@@ -396,14 +396,14 @@ main (
       }\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if (argv[0][0] == '-') {\r
       Error (NULL, 0, 1000, "Unknown option", argv[0]);\r
       return STATUS_ERROR;\r
     }\r
-    \r
+\r
     //\r
     // Don't recognize the parameter.\r
     //\r
@@ -411,12 +411,12 @@ main (
     argc--;\r
     argv++;\r
   }\r
-  \r
+\r
   if (InputFile == NULL) {\r
     Error (NULL, 0, 1003, "Invalid option value", "Input file is not specified");\r
     return STATUS_ERROR;\r
   }\r
-  \r
+\r
   //\r
   // Create X64 page table\r
   //\r
index febf9158b1f8faf95f474182aa6756f2698b8c7d..d1a6b198c4bf6c0d6b617fd300e97837d4adcdba 100644 (file)
@@ -1,21 +1,21 @@
-/** @file \r
-x64 Long Mode Virtual Memory Management Definitions  \r
+/** @file\r
+x64 Long Mode Virtual Memory Management Definitions\r
 \r
   References:\r
     1) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 1:Basic Architecture, Intel\r
     2) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel\r
     3) IA-32 Intel(R) Atchitecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel\r
     4) AMD64 Architecture Programmer's Manual Volume 2: System Programming\r
-    \r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-  \r
+\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
 **/\r
 \r
 #ifndef _VIRTUAL_MEMORY_H_\r
@@ -82,7 +82,7 @@ typedef union {
     UINT64  CacheDisabled:1;          // 0 = Cached, 1=Non-Cached\r
     UINT64  Accessed:1;               // 0 = Not accessed, 1 = Accessed (set by CPU)\r
     UINT64  Dirty:1;                  // 0 = Not Dirty, 1 = written by processor on access to page\r
-    UINT64  PAT:1;                    // 0 = Ignore Page Attribute Table \r
+    UINT64  PAT:1;                    // 0 = Ignore Page Attribute Table\r
     UINT64  Global:1;                 // 0 = Not global page, 1 = global page TLB not cleared on CR3 write\r
     UINT64  Available:3;              // Available for use by system software\r
     UINT64  PageTableBaseAddress:40;  // Page Table Base Address\r
@@ -105,7 +105,7 @@ typedef union {
     UINT64  CacheDisabled:1;          // 0 = Cached, 1=Non-Cached\r
     UINT64  Accessed:1;               // 0 = Not accessed, 1 = Accessed (set by CPU)\r
     UINT64  Dirty:1;                  // 0 = Not Dirty, 1 = written by processor on access to page\r
-    UINT64  MustBe1:1;                // Must be 1 \r
+    UINT64  MustBe1:1;                // Must be 1\r
     UINT64  Global:1;                 // 0 = Not global page, 1 = global page TLB not cleared on CR3 write\r
     UINT64  Available:3;              // Available for use by system software\r
     UINT64  PAT:1;                    //\r
@@ -119,4 +119,4 @@ typedef union {
 \r
 #pragma pack()\r
 \r
-#endif \r
+#endif\r
index 46149762586ef0d7b849b3fa7333f462d5d40a3f..f3dfaf63bae3f1b75fc3c419efd89385707c7397 100644 (file)
@@ -2,13 +2,13 @@
 Creates output file that is a properly formed section per the PI spec.\r
 \r
 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 #ifndef __GNUC__\r
@@ -103,7 +103,7 @@ STATIC EFI_GUID  mZeroGuid                 = {0x0, 0x0, 0x0, {0x0, 0x0, 0x0, 0x0
 STATIC EFI_GUID  mEfiCrc32SectionGuid      = EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID;\r
 \r
 STATIC\r
-VOID \r
+VOID\r
 Version (\r
   VOID\r
   )\r
@@ -116,12 +116,12 @@ Routine Description:
 Arguments:\r
 \r
   None\r
-  \r
+\r
 Returns:\r
 \r
   None\r
-  \r
---*/ \r
+\r
+--*/\r
 {\r
   fprintf (stdout, "%s Version %d.%d %s \n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);\r
 }\r
@@ -151,11 +151,11 @@ Returns:
   // Summary usage\r
   //\r
   fprintf (stdout, "\nUsage: %s [options] [input_file]\n\n", UTILITY_NAME);\r
-  \r
+\r
   //\r
   // Copyright declaration\r
-  // \r
-  fprintf (stdout, "Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.\n\n");\r
+  //\r
+  fprintf (stdout, "Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.\n\n");\r
 \r
   //\r
   // Details Option\r
@@ -176,7 +176,7 @@ Returns:
                         EFI_SECTION_ALL is default section type.\n");\r
   fprintf (stdout, "  -c [Type], --compress [Type]\n\\r
                         Compress method type can be PI_NONE or PI_STD.\n\\r
-                        if -c option is not given, PI_STD is default type.\n"); \r
+                        if -c option is not given, PI_STD is default type.\n");\r
   fprintf (stdout, "  -g GuidValue, --vendor GuidValue\n\\r
                         GuidValue is one specific vendor guid value.\n\\r
                         Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n");\r
@@ -215,7 +215,7 @@ Ascii2UnicodeString (
 \r
 Routine Description:\r
 \r
-  Write ascii string as unicode string format to FILE \r
+  Write ascii string as unicode string format to FILE\r
 \r
 Arguments:\r
 \r
@@ -235,7 +235,7 @@ Returns:
   // End the UniString with a NULL.\r
   //\r
   *UniString = '\0';\r
-} \r
+}\r
 \r
 STATUS\r
 GenSectionCommonLeafSection (\r
@@ -245,19 +245,19 @@ GenSectionCommonLeafSection (
   UINT8   **OutFileBuffer\r
   )\r
 /*++\r
-        \r
+\r
 Routine Description:\r
-           \r
+\r
   Generate a leaf section of type other than EFI_SECTION_VERSION\r
   and EFI_SECTION_USER_INTERFACE. Input file must be well formed.\r
   The function won't validate the input file's contents. For\r
   common leaf sections, the input file may be a binary file.\r
   The utility will add section header to the file.\r
-            \r
+\r
 Arguments:\r
-               \r
+\r
   InputFileName  - Name of the input file.\r
-                \r
+\r
   InputFileNum   - Number of input files. Should be 1 for leaf section.\r
 \r
   SectionType    - A valid section type string\r
@@ -265,7 +265,7 @@ Arguments:
   OutFileBuffer  - Buffer pointer to Output file contents\r
 \r
 Returns:\r
-                       \r
+\r
   STATUS_ERROR            - can't continue\r
   STATUS_SUCCESS          - successful return\r
 \r
@@ -323,7 +323,7 @@ Returns:
   //\r
   Buffer = (UINT8 *) malloc ((size_t) TotalLength);\r
   if (Buffer == NULL) {\r
-    Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated"); \r
+    Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
     goto Done;\r
   }\r
   CommonSect = (EFI_COMMON_SECTION_HEADER *) Buffer;\r
@@ -336,7 +336,7 @@ Returns:
     memset(CommonSect->Size, 0xff, sizeof(UINT8) * 3);\r
     ((EFI_COMMON_SECTION_HEADER2 *)CommonSect)->ExtendedSize = TotalLength;\r
   }\r
-  \r
+\r
   //\r
   // read data from the input file.\r
   //\r
@@ -348,7 +348,7 @@ Returns:
   }\r
 \r
   //\r
-  // Set OutFileBuffer \r
+  // Set OutFileBuffer\r
   //\r
   *OutFileBuffer = Buffer;\r
   Status = STATUS_SUCCESS;\r
@@ -408,14 +408,14 @@ GetSectionContents (
   UINT32  *BufferLength\r
   )\r
 /*++\r
-        \r
+\r
 Routine Description:\r
-           \r
+\r
   Get the contents of all section files specified in InputFileName\r
   into FileBuffer.\r
-            \r
+\r
 Arguments:\r
-               \r
+\r
   InputFileName  - Name of the input file.\r
 \r
   InputFileAlign - Alignment required by the input file data.\r
@@ -424,11 +424,11 @@ Arguments:
 \r
   FileBuffer     - Output buffer to contain data\r
 \r
-  BufferLength   - On input, this is size of the FileBuffer. \r
+  BufferLength   - On input, this is size of the FileBuffer.\r
                    On output, this is the actual length of the data.\r
 \r
 Returns:\r
-                       \r
+\r
   EFI_SUCCESS on successful return\r
   EFI_INVALID_PARAMETER if InputFileNum is less than 1 or BufferLength point is NULL.\r
   EFI_ABORTED if unable to open input file.\r
@@ -475,8 +475,8 @@ Returns:
       }\r
       Size++;\r
     }\r
-    \r
-    // \r
+\r
+    //\r
     // Open file and read contents\r
     //\r
     InFile = fopen (LongFilePath (InputFileName[Index]), "rb");\r
@@ -488,7 +488,7 @@ Returns:
     fseek (InFile, 0, SEEK_END);\r
     FileSize = ftell (InFile);\r
     fseek (InFile, 0, SEEK_SET);\r
-    DebugMsg (NULL, 0, 9, "Input files", "the input file name is %s and the size is %u bytes", InputFileName[Index], (unsigned) FileSize); \r
+    DebugMsg (NULL, 0, 9, "Input files", "the input file name is %s and the size is %u bytes", InputFileName[Index], (unsigned) FileSize);\r
     //\r
     // Adjust section buffer when section alignment is required.\r
     //\r
@@ -525,7 +525,7 @@ Returns:
             HeaderSize = GuidSectHeader.DataOffset;\r
           }\r
         }\r
-      } \r
+      }\r
 \r
       fseek (InFile, 0, SEEK_SET);\r
 \r
@@ -544,7 +544,7 @@ Returns:
       if ((InputFileAlign [Index] != 0) && (((Size + HeaderSize + TeOffset) % InputFileAlign [Index]) != 0)) {\r
         Offset = (Size + sizeof (EFI_COMMON_SECTION_HEADER) + HeaderSize + TeOffset + InputFileAlign [Index] - 1) & ~(InputFileAlign [Index] - 1);\r
         Offset = Offset - Size - HeaderSize - TeOffset;\r
-         \r
+\r
         if (FileBuffer != NULL && ((Size + Offset) < *BufferLength)) {\r
           //\r
           // The maximal alignment is 64K, the raw section size must be less than 0xffffff\r
@@ -577,7 +577,7 @@ Returns:
     fclose (InFile);\r
     Size += FileSize;\r
   }\r
-  \r
+\r
   //\r
   // Set the real required buffer size.\r
   //\r
@@ -599,28 +599,28 @@ GenSectionCompressionSection (
   UINT8   **OutFileBuffer\r
   )\r
 /*++\r
-        \r
+\r
 Routine Description:\r
-           \r
+\r
   Generate an encapsulating section of type EFI_SECTION_COMPRESSION\r
   Input file must be already sectioned. The function won't validate\r
-  the input files' contents. Caller should hand in files already \r
+  the input files' contents. Caller should hand in files already\r
   with section header.\r
-            \r
+\r
 Arguments:\r
-               \r
+\r
   InputFileName  - Name of the input file.\r
 \r
   InputFileAlign - Alignment required by the input file data.\r
 \r
   InputFileNum   - Number of input files. Should be at least 1.\r
 \r
-  SectCompSubType - Specify the compression algorithm requested. \r
-  \r
+  SectCompSubType - Specify the compression algorithm requested.\r
+\r
   OutFileBuffer   - Buffer pointer to Output file contents\r
 \r
 Returns:\r
-                       \r
+\r
   EFI_SUCCESS           on successful return\r
   EFI_INVALID_PARAMETER if InputFileNum is less than 1\r
   EFI_ABORTED           if unable to open input file.\r
@@ -754,7 +754,7 @@ Returns:
     }\r
   }\r
 \r
-  DebugMsg (NULL, 0, 9, "comprss file size", \r
+  DebugMsg (NULL, 0, 9, "comprss file size",\r
             "the original section size is %d bytes and the compressed section size is %u bytes", (unsigned) InputLength, (unsigned) CompressedLength);\r
 \r
   //if (TotalLength >= MAX_SECTION_SIZE) {\r
@@ -782,7 +782,7 @@ Returns:
     CompressionSect2->UncompressedLength        = InputLength;\r
   } else {\r
     CompressionSect = (EFI_COMPRESSION_SECTION *) FileBuffer;\r
-    \r
+\r
     CompressionSect->CommonHeader.Type     = EFI_SECTION_COMPRESSION;\r
     CompressionSect->CommonHeader.Size[0]  = (UINT8) (TotalLength & 0xff);\r
     CompressionSect->CommonHeader.Size[1]  = (UINT8) ((TotalLength & 0xff00) >> 8);\r
@@ -792,7 +792,7 @@ Returns:
   }\r
 \r
   //\r
-  // Set OutFileBuffer \r
+  // Set OutFileBuffer\r
   //\r
   *OutFileBuffer = FileBuffer;\r
 \r
@@ -810,32 +810,32 @@ GenSectionGuidDefinedSection (
   UINT8    **OutFileBuffer\r
   )\r
 /*++\r
-        \r
+\r
 Routine Description:\r
-           \r
+\r
   Generate an encapsulating section of type EFI_SECTION_GUID_DEFINED\r
   Input file must be already sectioned. The function won't validate\r
-  the input files' contents. Caller should hand in files already \r
+  the input files' contents. Caller should hand in files already\r
   with section header.\r
-            \r
+\r
 Arguments:\r
-               \r
+\r
   InputFileName - Name of the input file.\r
-                \r
+\r
   InputFileAlign - Alignment required by the input file data.\r
 \r
   InputFileNum  - Number of input files. Should be at least 1.\r
 \r
   VendorGuid    - Specify vendor guid value.\r
 \r
-  DataAttribute - Specify attribute for the vendor guid data. \r
-  \r
+  DataAttribute - Specify attribute for the vendor guid data.\r
+\r
   DataHeaderSize- Guided Data Header Size\r
-  \r
+\r
   OutFileBuffer   - Buffer pointer to Output file contents\r
 \r
 Returns:\r
-                       \r
+\r
   EFI_SUCCESS on successful return\r
   EFI_INVALID_PARAMETER if InputFileNum is less than 1\r
   EFI_ABORTED if unable to open input file.\r
@@ -935,7 +935,7 @@ Returns:
     //\r
     Crc32Checksum = 0;\r
     CalculateCrc32 (FileBuffer + Offset, InputLength, &Crc32Checksum);\r
-    \r
+\r
     if (TotalLength >= MAX_SECTION_SIZE) {\r
       Crc32GuidSect2 = (CRC32_SECTION_HEADER2 *) FileBuffer;\r
       Crc32GuidSect2->GuidSectionHeader.CommonHeader.Type     = EFI_SECTION_GUID_DEFINED;\r
@@ -985,9 +985,9 @@ Returns:
     }\r
   }\r
   VerboseMsg ("the size of the created section file is %u bytes", (unsigned) TotalLength);\r
-  \r
+\r
   //\r
-  // Set OutFileBuffer \r
+  // Set OutFileBuffer\r
   //\r
   *OutFileBuffer = FileBuffer;\r
 \r
@@ -1126,7 +1126,7 @@ Returns:
   int                       VersionNumber;\r
   UINT8                     SectType;\r
   UINT8                     SectCompSubType;\r
-  UINT16                    SectGuidAttribute; \r
+  UINT16                    SectGuidAttribute;\r
   UINT64                    SectGuidHeaderLength;\r
   EFI_VERSION_SECTION       *VersionSect;\r
   EFI_USER_INTERFACE_SECTION *UiSect;\r
@@ -1172,9 +1172,9 @@ Returns:
   InFile                = NULL;\r
   InFileSize            = 0;\r
   InFileBuffer          = NULL;\r
-  \r
+\r
   SetUtilityName (UTILITY_NAME);\r
-  \r
+\r
   if (argc == 1) {\r
     Error (NULL, 0, 1001, "Missing options", "No options input");\r
     Usage ();\r
@@ -1190,12 +1190,12 @@ Returns:
   if ((stricmp (argv[0], "-h") == 0) || (stricmp (argv[0], "--help") == 0)) {\r
     Version ();\r
     Usage ();\r
-    return STATUS_SUCCESS;    \r
+    return STATUS_SUCCESS;\r
   }\r
 \r
   if (stricmp (argv[0], "--version") == 0) {\r
     Version ();\r
-    return STATUS_SUCCESS;    \r
+    return STATUS_SUCCESS;\r
   }\r
 \r
   while (argc > 0) {\r
@@ -1207,7 +1207,7 @@ Returns:
       }\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-o") == 0) || (stricmp (argv[0], "--outputfile") == 0)) {\r
@@ -1218,7 +1218,7 @@ Returns:
       }\r
       argc -= 2;\r
       argv += 2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if ((stricmp (argv[0], "-c") == 0) || (stricmp (argv[0], "--compress") == 0)) {\r
@@ -1387,7 +1387,7 @@ Returns:
       argc -= 2;\r
       argv += 2;\r
       InputFileAlignNum ++;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     //\r
@@ -1529,14 +1529,14 @@ Returns:
     VerboseMsg ("Compress method is %s", mCompressionTypeName [SectCompSubType]);\r
   } else if (stricmp (SectionName, mSectionTypeName[EFI_SECTION_GUID_DEFINED]) == 0) {\r
     SectType     = EFI_SECTION_GUID_DEFINED;\r
-    \r
+\r
     if ((SectGuidAttribute & EFI_GUIDED_SECTION_NONE) != 0) {\r
       //\r
       // NONE attribute, clear attribute value.\r
       //\r
       SectGuidAttribute = SectGuidAttribute & ~EFI_GUIDED_SECTION_NONE;\r
     }\r
-    VerboseMsg ("Vendor Guid is %08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", \r
+    VerboseMsg ("Vendor Guid is %08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",\r
                 (unsigned) VendorGuid.Data1,\r
                 VendorGuid.Data2,\r
                 VendorGuid.Data3,\r
@@ -1595,7 +1595,7 @@ Returns:
     Error (NULL, 0, 1003, "Invalid option value", "SectionType = %s", SectionName);\r
     goto Finish;\r
   }\r
-  \r
+\r
   //\r
   // GuidValue is only required by Guided section.\r
   //\r
@@ -1604,10 +1604,10 @@ Returns:
     (CompareGuid (&VendorGuid, &mZeroGuid) != 0)) {\r
     fprintf (stdout, "Warning: the input guid value is not required for this section type %s\n", SectionName);\r
   }\r
-  \r
+\r
   //\r
   // Check whether there is input file\r
-  //  \r
+  //\r
   if ((SectType != EFI_SECTION_VERSION) && (SectType != EFI_SECTION_USER_INTERFACE)) {\r
     //\r
     // The input file are required for other section type.\r
@@ -1730,7 +1730,7 @@ Returns:
               OutFileBuffer,\r
               &InputLength\r
               );\r
-  \r
+\r
     if (Status == EFI_BUFFER_TOO_SMALL) {\r
       OutFileBuffer = (UINT8 *) malloc (InputLength);\r
       if (OutFileBuffer == NULL) {\r
@@ -1762,10 +1762,10 @@ Returns:
               );\r
     break;\r
   }\r
-  \r
+\r
   if (Status != EFI_SUCCESS || OutFileBuffer == NULL) {\r
     Error (NULL, 0, 2000, "Status is not successful", "Status value is 0x%X", (int) Status);\r
-         goto Finish;\r
+    goto Finish;\r
   }\r
 \r
   //\r
@@ -1778,7 +1778,7 @@ Returns:
       InputLength = ((EFI_COMMON_SECTION_HEADER2 *)SectionHeader)->ExtendedSize;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Write the output file\r
   //\r
index fc7ae02203ff9716133f65c46bab7401eb086dec..3a7ac0615606a341c46eb2b5a40515a5bb758097 100644 (file)
@@ -1,10 +1,10 @@
 /** @file\r
-This file contains functions required to generate a boot strap file (BSF) also \r
+This file contains functions required to generate a boot strap file (BSF) also\r
 known as the Volume Top File (VTF)\r
 \r
-Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available \r
-under the terms and conditions of the BSD License which accompanies this \r
+Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available\r
+under the terms and conditions of the BSD License which accompanies this\r
 distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
@@ -133,7 +133,7 @@ Returns:
     } else {\r
       memcpy (TemStr, Str + Length - 4, 4);\r
     }\r
-  \r
+\r
     sscanf (\r
       TemStr,\r
       "%02x%02x",\r
@@ -2362,7 +2362,7 @@ Returns:
       TokenAddress += BaseAddress &~IPF_CACHE_BIT;\r
 \r
       fprintf (DestFile, "%s | %016llX | ", Type, (unsigned long long) TokenAddress);\r
-      fprintf (DestFile, "%s | %s\n    %s\n", Section, Token, BaseToken); \r
+      fprintf (DestFile, "%s | %s\n    %s\n", Section, Token, BaseToken);\r
     }\r
   }\r
 \r
@@ -2479,7 +2479,7 @@ Returns:
   //\r
   // Copyright declaration\r
   //\r
-  fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");\r
+  fprintf (stdout, "Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.\n\n");\r
   //\r
   // Details Option\r
   //\r
@@ -2628,7 +2628,7 @@ Returns:
       }\r
       continue;\r
     }\r
-    \r
+\r
     if ((stricmp (argv[Index], "-r") == 0) || (stricmp (argv[Index], "--baseaddr") == 0)) {\r
       if (FirstRoundB) {\r
         Status      = AsciiStringToUint64 (argv[Index + 1], FALSE, &StartAddress1);\r
@@ -2639,7 +2639,7 @@ Returns:
       if (Status != EFI_SUCCESS) {\r
         Error (NULL, 0, 2000, "Invalid option value", "%s is Bad FV start address.", argv[Index + 1]);\r
         goto ERROR;\r
-      }  \r
+      }\r
       continue;\r
     }\r
 \r
@@ -2649,7 +2649,7 @@ Returns:
         FirstRoundS = FALSE;\r
       } else {\r
         Status = AsciiStringToUint64 (argv[Index + 1], FALSE, &FwVolSize2);\r
-         SecondVTF = TRUE;\r
+        SecondVTF = TRUE;\r
       }\r
 \r
       if (Status != EFI_SUCCESS) {\r
@@ -2660,8 +2660,8 @@ Returns:
     }\r
 \r
     if ((stricmp (argv[Index], "-v") == 0) || (stricmp (argv[Index], "--verbose") == 0)) {\r
-           VerboseMode = TRUE;\r
-           Index--;\r
+      VerboseMode = TRUE;\r
+      Index--;\r
       continue;\r
     }\r
 \r
@@ -2729,7 +2729,7 @@ Returns:
     if (SecondVTF == TRUE) {\r
       OutFileName1 = VTF_OUTPUT_FILE1;\r
       OutFileName2 = VTF_OUTPUT_FILE2;\r
-         } else {\r
+    } else {\r
       OutFileName1 = VTF_OUTPUT_FILE1;\r
     }\r
     SymFileName = VTF_SYM_FILE;\r
index 37d5f6050605234878ec6e07606e6afad915f0dd..62c61aa84e7f26d4a19549571bcf9bbef8691a6f 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
 This file contains the relevant declarations required to generate Boot Strap File\r
-  \r
-Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available \r
-under the terms and conditions of the BSD License which accompanies this \r
+\r
+Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available\r
+under the terms and conditions of the BSD License which accompanies this\r
 distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
@@ -80,7 +80,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define SIZE_IA32_RESET_VECT      0x10        // 16 Bytes\r
 #define SIZE_SALE_ENTRY_POINT     0x08        // 8 Byte\r
 #define SIZE_FIT_TABLE_ADD        0x08        // 8 Byte\r
-#define SIZE_FIT_TABLE_PAL_A      0x10     \r
+#define SIZE_FIT_TABLE_PAL_A      0x10\r
 #define SIZE_RESERVED             0x10\r
 \r
 \r
@@ -116,7 +116,7 @@ static BOOLEAN VerboseMode = FALSE;
 //\r
 // Internal Data Structure\r
 //\r
-typedef enum _LOC_TYPE \r
+typedef enum _LOC_TYPE\r
 {\r
   NONE,                   // In case there is - INF file\r
   FIRST_VTF,              // First VTF\r
@@ -174,18 +174,18 @@ UpdateVtfBuffer(
 Routine Description:\r
 \r
   Update the Firmware Volume Buffer with requested buffer data\r
-  \r
+\r
 Arguments:\r
 \r
   StartAddress   - StartAddress in buffer. This number will automatically\r
-                  point to right address in buffer where data needed \r
+                  point to right address in buffer where data needed\r
                   to be updated.\r
   Buffer         - Buffer pointer from data will be copied to memory mapped buffer.\r
   DataSize       - Size of the data needed to be copied.\r
   LocType        - The type of the VTF\r
 \r
 Returns:\r
-  \r
+\r
   EFI_ABORTED  - The input parameter is error\r
   EFI_SUCCESS  - The function completed successfully\r
 \r
@@ -227,22 +227,22 @@ CalculateFitTableChecksum (
   VOID\r
   )\r
 /*++\r
-  \r
+\r
 Routine Description:\r
 \r
   This function will perform byte checksum on the FIT table, if the the checksum required\r
   field is set to CheckSum required. If the checksum is not required then checksum byte\r
   will have value as 0;.\r
-  \r
+\r
 Arguments:\r
 \r
   NONE\r
-  \r
+\r
 Returns:\r
 \r
   Status       - Value returned by call to CalculateChecksum8 ()\r
   EFI_SUCCESS  - The function completed successfully\r
-    \r
+\r
 --*/\r
 ;\r
 \r
@@ -262,22 +262,22 @@ Routine Description:
 \r
 Arguments:\r
 \r
-  StartAddress1  - The start address of the first VTF      \r
+  StartAddress1  - The start address of the first VTF\r
   Size1          - The size of the first VTF\r
-  StartAddress2  - The start address of the second VTF      \r
+  StartAddress2  - The start address of the second VTF\r
   Size2          - The size of the second VTF\r
 \r
 Returns:\r
\r
+\r
   EFI_OUT_OF_RESOURCES - Can not allocate memory\r
-  The return value can be any of the values \r
+  The return value can be any of the values\r
   returned by the calls to following functions:\r
       GetVtfRelatedInfoFromInfFile\r
       ProcessAndCreateVtf\r
       UpdateIA32ResetVector\r
       UpdateFfsHeader\r
       WriteVtfBinary\r
-  \r
+\r
 --*/\r
 ;\r
 \r
@@ -294,11 +294,11 @@ Routine Description:
 Arguments:\r
 \r
   StartAddress - StartAddress for PEIM.....\r
-    \r
+\r
 Returns:\r
\r
+\r
   EFI_SUCCESS   - The function completed successfully\r
-  EFI_ABORTED   - Error Opening File \r
+  EFI_ABORTED   - Error Opening File\r
 \r
 --*/\r
 ;\r
index 1f77e879b313907c40ba42144e1c6325893807a9..e244f1507c166d7b599ebefb5352399c3339563b 100644 (file)
@@ -2,14 +2,14 @@
 \r
   Fat file system structure and definition.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 --*/\r
 \r
index 1804e683fb9114158d777609b06aa9d03953c547..6cdffcba3ac578f426dd60622ac0f88861a1c475 100644 (file)
@@ -3,15 +3,15 @@ Reading/writing MBR/DBR.
   NOTE:\r
     If we write MBR to disk, we just update the MBR code and the partition table wouldn't be over written.\r
     If we process DBR, we will patch MBR to set first partition active if no active partition exists.\r
-    \r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -132,21 +132,21 @@ GetPathInfo (
   if (strncmp(PathInfo->Path, "/dev/", 5) == 0) {\r
     //\r
     // Process disk path here.\r
-    // \r
-    \r
+    //\r
+\r
     // Process floppy disk\r
     if (PathInfo->Path[5] == 'f' && PathInfo->Path[6] == 'd' && PathInfo->Path[8] == '\0') {\r
       PathInfo->Type = PathFloppy;\r
       strcpy (PathInfo->PhysicalPath, PathInfo->Path);\r
-      \r
+\r
       return ErrorSuccess;\r
     } else {\r
     // Other disk types is not supported yet.\r
     fprintf (stderr, "ERROR: It's not a floppy disk!\n");\r
     return ErrorPath;\r
-    }  \r
-     \r
-    // Try to open the device.   \r
+    }\r
+\r
+    // Try to open the device.\r
     f = fopen (LongFilePath (PathInfo->Path),"r");\r
     if (f == NULL) {\r
       printf ("error :open device failed!\n");\r
@@ -155,7 +155,7 @@ GetPathInfo (
     fclose (f);\r
     return ErrorSuccess;\r
   }\r
\r
+\r
   // Process file path here.\r
   PathInfo->Type = PathFile;\r
   if (PathInfo->Input) {\r
@@ -183,12 +183,12 @@ ListDrive (
 }\r
 \r
 /**\r
-  Writing or reading boot sector or MBR according to the argument. \r
-   \r
+  Writing or reading boot sector or MBR according to the argument.\r
+\r
   @param InputInfo PATH_INFO instance for input path\r
   @param OutputInfo PATH_INFO instance for output path\r
   @param ProcessMbr TRUE is to process MBR, otherwise, processing boot sector\r
-  \r
+\r
   @return ERROR_STATUS\r
  **/\r
 ERROR_STATUS\r
@@ -200,34 +200,34 @@ ProcessBsOrMbr (
 {\r
   CHAR8 FirstSector[0x200] = {0};\r
   CHAR8 FirstSectorBackup[0x200] = {0};\r
-  \r
+\r
   FILE *InputFile;\r
   FILE *OutputFile;\r
-  \r
-  \r
+\r
+\r
   InputFile = fopen (LongFilePath (InputInfo->PhysicalPath), "r");\r
   if (InputFile == NULL) {\r
     return ErrorFileReadWrite;\r
   }\r
-   \r
+\r
   if (0x200 != fread(FirstSector, 1, 0x200, InputFile)) {\r
     fclose(InputFile);\r
     return ErrorFileReadWrite;\r
   }\r
-  \r
+\r
   fclose(InputFile);\r
-  \r
+\r
   //Not support USB and IDE.\r
   if (InputInfo->Type == PathUsb) {\r
     printf("USB has not been supported yet!");\r
     return ErrorSuccess;\r
   }\r
-  \r
+\r
   if (InputInfo->Type == PathIde) {\r
     printf("IDE has not been supported yet!");\r
     return ErrorSuccess;\r
-  } \r
-  \r
+  }\r
+\r
   //Process Floppy Disk\r
   OutputFile = fopen (LongFilePath (OutputInfo->PhysicalPath), "r+");\r
   if (OutputFile == NULL) {\r
@@ -236,7 +236,7 @@ ProcessBsOrMbr (
       return ErrorFileReadWrite;\r
     }\r
   }\r
-  \r
+\r
   if (OutputInfo->Type != PathFile) {\r
     if (ProcessMbr) {\r
       //\r
@@ -244,16 +244,16 @@ ProcessBsOrMbr (
       //\r
       if (0x200 != fread (FirstSectorBackup, 1, 0x200, OutputFile)) {\r
         fclose(OutputFile);\r
-        return ErrorFileReadWrite; \r
+        return ErrorFileReadWrite;\r
         }\r
-      memcpy (FirstSector + 0x1BE, FirstSectorBackup + 0x1BE, 0x40);  \r
+      memcpy (FirstSector + 0x1BE, FirstSectorBackup + 0x1BE, 0x40);\r
     }\r
   }\r
   if(0x200 != fwrite(FirstSector, 1, 0x200, OutputFile)) {\r
     fclose(OutputFile);\r
     return ErrorFileReadWrite;\r
   }\r
-  \r
+\r
   fclose(OutputFile);\r
   return ErrorSuccess;\r
 }\r
@@ -308,20 +308,20 @@ main (
   UINT64         LogLevel;\r
 \r
   SetUtilityName (UTILITY_NAME);\r
-  \r
+\r
   ZeroMem(&InputPathInfo, sizeof(PATH_INFO));\r
   ZeroMem(&OutputPathInfo, sizeof(PATH_INFO));\r
-  \r
+\r
   argv ++;\r
   argc --;\r
-  \r
+\r
   ProcessMbr    = FALSE;\r
 \r
   if (argc == 0) {\r
     PrintUsage();\r
     return 0;\r
   }\r
-   \r
+\r
   //\r
   // Parse command line\r
   //\r
@@ -329,61 +329,61 @@ main (
     if ((stricmp (argv[Index], "-l") == 0) || (stricmp (argv[Index], "--list") == 0)) {\r
       ListDrive ();\r
       return 0;\r
-    } \r
-    \r
+    }\r
+\r
     if ((stricmp (argv[Index], "-m") == 0) || (stricmp (argv[Index], "--mbr") == 0)) {\r
       ProcessMbr = TRUE;\r
       continue;\r
     }\r
-    \r
+\r
     if ((stricmp (argv[Index], "-i") == 0) || (stricmp (argv[Index], "--input") == 0)) {\r
       InputPathInfo.Path  = argv[Index + 1];\r
       InputPathInfo.Input = TRUE;\r
       if (InputPathInfo.Path == NULL) {\r
         Error (NULL, 0, 1003, "Invalid option value", "Input file name can't be NULL");\r
         return 1;\r
-      } \r
+      }\r
       if (InputPathInfo.Path[0] == '-') {\r
         Error (NULL, 0, 1003, "Invalid option value", "Input file is missing");\r
-        return 1;       \r
+        return 1;\r
       }\r
       ++Index;\r
       continue;\r
     }\r
-    \r
+\r
     if ((stricmp (argv[Index], "-o") == 0) || (stricmp (argv[Index], "--output") == 0)) {\r
       OutputPathInfo.Path  = argv[Index + 1];\r
       OutputPathInfo.Input = FALSE;\r
       if (OutputPathInfo.Path == NULL) {\r
         Error (NULL, 0, 1003, "Invalid option value", "Output file name can't be NULL");\r
         return 1;\r
-      } \r
+      }\r
       if (OutputPathInfo.Path[0] == '-') {\r
         Error (NULL, 0, 1003, "Invalid option value", "Output file is missing");\r
-        return 1;       \r
+        return 1;\r
       }\r
       ++Index;\r
       continue;\r
     }\r
-    \r
+\r
     if ((stricmp (argv[Index], "-h") == 0) || (stricmp (argv[Index], "--help") == 0)) {\r
       PrintUsage ();\r
       return 0;\r
     }\r
-    \r
+\r
     if (stricmp (argv[Index], "--version") == 0) {\r
       Version ();\r
       return 0;\r
-    } \r
-    \r
+    }\r
+\r
     if ((stricmp (argv[Index], "-v") == 0) || (stricmp (argv[Index], "--verbose") == 0)) {\r
       continue;\r
-    } \r
-    \r
+    }\r
+\r
     if ((stricmp (argv[Index], "-q") == 0) || (stricmp (argv[Index], "--quiet") == 0)) {\r
       continue;\r
-    } \r
-    \r
+    }\r
+\r
     if ((stricmp (argv[Index], "-d") == 0) || (stricmp (argv[Index], "--debug") == 0)) {\r
       EfiStatus = AsciiStringToUint64 (argv[Index + 1], FALSE, &LogLevel);\r
       if (EFI_ERROR (EfiStatus)) {\r
@@ -406,7 +406,7 @@ main (
     Error (NULL, 0, 1000, "Unknown option", "%s", argv[Index]);\r
     return 1;\r
   }\r
-  \r
+\r
   if (InputPathInfo.Path == NULL) {\r
     Error (NULL, 0, 1001, "Missing options", "Input file is missing");\r
     return 1;\r
@@ -416,7 +416,7 @@ main (
     Error (NULL, 0, 1001, "Missing options", "Output file is missing");\r
     return 1;\r
   }\r
-  \r
+\r
   if (GetPathInfo(&InputPathInfo) != ErrorSuccess) {\r
     Error (NULL, 0, 1003, "Invalid option value", "Input file can't be found.");\r
     return 1;\r
@@ -426,7 +426,7 @@ main (
     Error (NULL, 0, 1003, "Invalid option value", "Output file can't be found.");\r
     return 1;\r
   }\r
-  \r
+\r
   //\r
   // Process DBR (Patch or Read)\r
   //\r
@@ -434,21 +434,21 @@ main (
 \r
   if (Status == ErrorSuccess) {\r
     fprintf (\r
-      stdout, \r
-      "%s %s: successful!\n", \r
-      (OutputPathInfo.Type != PathFile) ? "Write" : "Read", \r
+      stdout,\r
+      "%s %s: successful!\n",\r
+      (OutputPathInfo.Type != PathFile) ? "Write" : "Read",\r
       ProcessMbr ? "MBR" : "DBR"\r
       );\r
     return 0;\r
   } else {\r
     fprintf (\r
-      stderr, \r
+      stderr,\r
       "%s: %s %s: failed - %s (LastError: 0x%x)!\n",\r
       (Status == ErrorNoMbr) ? "WARNING" : "ERROR",\r
-      (OutputPathInfo.Type != PathFile) ? "Write" : "Read", \r
-      ProcessMbr ? "MBR" : "DBR", \r
+      (OutputPathInfo.Type != PathFile) ? "Write" : "Read",\r
+      ProcessMbr ? "MBR" : "DBR",\r
       ErrorStatusDesc[Status],\r
-      errno \r
+      errno\r
       );\r
     return 1;\r
   }\r
index 4d184c4c41f0f1f950f6bc3600694a592e1fa5e5..e7e9d83198a6aefd2c01a713af1520ccf4b87450 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Processor or Compiler specific defines and types for AArch64.\r
 \r
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
   Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
   Portions copyright (c) 2013, ARM Ltd. All rights reserved.<BR>\r
 \r
@@ -32,7 +32,7 @@
 \r
 #if _MSC_EXTENSIONS\r
   //\r
-  // use Microsoft* C complier dependent integer width types \r
+  // use Microsoft* C complier dependent integer width types\r
   //\r
   typedef unsigned __int64    UINT64;\r
   typedef __int64             INT64;\r
@@ -124,21 +124,21 @@ typedef INT64   INTN;
 \r
     #define GCC_ASM_EXPORT(func__)  \\r
              .global  _CONCATENATE (__USER_LABEL_PREFIX__, func__)    ;\\r
-             .type ASM_PFX(func__), %function  \r
+             .type ASM_PFX(func__), %function\r
 \r
     #define GCC_ASM_IMPORT(func__)  \\r
              .extern  _CONCATENATE (__USER_LABEL_PREFIX__, func__)\r
-             \r
+\r
   #else\r
     //\r
-    // .type not supported by Apple Xcode tools \r
+    // .type not supported by Apple Xcode tools\r
     //\r
-    #define INTERWORK_FUNC(func__)  \r
+    #define INTERWORK_FUNC(func__)\r
 \r
     #define GCC_ASM_EXPORT(func__)  \\r
              .globl  _CONCATENATE (__USER_LABEL_PREFIX__, func__)    \\r
-  \r
-    #define GCC_ASM_IMPORT(name)  \r
+\r
+    #define GCC_ASM_IMPORT(name)\r
 \r
   #endif\r
 #endif\r
index d84f16e7ba188f9fe48ca116886346401ca56709..be4aac97664dcecabfab57bf3ab246126a2c1b3c 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
   Processor or Compiler specific defines and types for ARM.\r
 \r
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
   Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
-  This program and the accompanying materials                          \r
-  are licensed and made available under the terms and conditions of the BSD License         \r
-  which accompanies this distribution.  The full text of the license may be found at        \r
-  http://opensource.org/licenses/bsd-license.php                                            \r
+  This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
 \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -28,9 +28,9 @@
 #pragma pack()\r
 #endif\r
 \r
-#if _MSC_EXTENSIONS \r
+#if _MSC_EXTENSIONS\r
   //\r
-  // use Microsoft* C complier dependent integer width types \r
+  // use Microsoft* C complier dependent integer width types\r
   //\r
   typedef unsigned __int64    UINT64;\r
   typedef __int64             INT64;\r
@@ -45,7 +45,7 @@
   typedef signed char         INT8;\r
 #else\r
   //\r
-  // Assume standard ARM alignment. \r
+  // Assume standard ARM alignment.\r
   //\r
   typedef unsigned long long  UINT64;\r
   typedef long long           INT64;\r
@@ -103,7 +103,7 @@ typedef INT32   INTN;
 // use the correct C calling convention. All protocol member functions and\r
 // EFI intrinsics are required to modify their member functions with EFIAPI.\r
 //\r
-#define EFIAPI    \r
+#define EFIAPI\r
 \r
 #if defined(__GNUC__)\r
   ///\r
@@ -122,34 +122,34 @@ typedef INT32   INTN;
 \r
     #define GCC_ASM_EXPORT(func__)  \\r
              .global  _CONCATENATE (__USER_LABEL_PREFIX__, func__)    ;\\r
-             .type ASM_PFX(func__), %function  \r
+             .type ASM_PFX(func__), %function\r
 \r
     #define GCC_ASM_IMPORT(func__)  \\r
              .extern  _CONCATENATE (__USER_LABEL_PREFIX__, func__)\r
-             \r
+\r
   #else\r
     //\r
-    // .type not supported by Apple Xcode tools \r
+    // .type not supported by Apple Xcode tools\r
     //\r
-    #define INTERWORK_FUNC(func__)  \r
+    #define INTERWORK_FUNC(func__)\r
 \r
     #define GCC_ASM_EXPORT(func__)  \\r
              .globl  _CONCATENATE (__USER_LABEL_PREFIX__, func__)    \\r
-  \r
-    #define GCC_ASM_IMPORT(name)  \r
+\r
+    #define GCC_ASM_IMPORT(name)\r
 \r
   #endif\r
 #endif\r
 \r
 /**\r
   Return the pointer to the first instruction of a function given a function pointer.\r
-  On ARM CPU architectures, these two pointer values are the same, \r
+  On ARM CPU architectures, these two pointer values are the same,\r
   so the implementation of this macro is very simple.\r
-  \r
+\r
   @param  FunctionPointer   A pointer to a function.\r
 \r
   @return The pointer to the first instruction of a function given a function pointer.\r
-  \r
+\r
 **/\r
 #define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)\r
 \r
index e1282b3a89878c60ce46aaffd3f92d4858b3f94a..751b6f1b3b42d77da38c02596ab2450ff1e03afe 100644 (file)
@@ -1,16 +1,16 @@
 /** @file\r
   Processor or Compiler specific defines for all supported processors.\r
 \r
-  This file is stand alone self consistent set of definitions. \r
+  This file is stand alone self consistent set of definitions.\r
 \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials                          \r
-  are licensed and made available under the terms and conditions of the BSD License         \r
-  which accompanies this distribution.  The full text of the license may be found at        \r
-  http://opensource.org/licenses/bsd-license.php                                            \r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
 \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -49,7 +49,7 @@
 //\r
 #ifndef TRUE\r
 //\r
-// BugBug: UEFI specification claims 1 and 0. We are concerned about the \r
+// BugBug: UEFI specification claims 1 and 0. We are concerned about the\r
 //  complier portability so we did it this way.\r
 //\r
 #define TRUE  ((BOOLEAN)(1==1))\r
@@ -65,7 +65,7 @@
 \r
 //\r
 //  Support for variable length argument lists using the ANSI standard.\r
-//  \r
+//\r
 //  Since we are using the ANSI standard we used the standard naming and\r
 //  did not follow the coding convention\r
 //\r
@@ -151,7 +151,7 @@ typedef struct {
 } IPv6_ADDRESS;\r
 \r
 //\r
-// Macro that returns the byte offset of a field in a data structure. \r
+// Macro that returns the byte offset of a field in a data structure.\r
 //\r
 #define OFFSET_OF(TYPE, Field) ((UINTN) &(((TYPE *)0)->Field))\r
 \r
@@ -177,8 +177,8 @@ typedef struct {
   (Value) = (UINTN)((UINTN) (Value) + (UINTN) (Adjustment))\r
 \r
 //\r
-// Return the maximum of two operands. \r
-// This macro returns the maximum of two operand specified by a and b.  \r
+// Return the maximum of two operands.\r
+// This macro returns the maximum of two operand specified by a and b.\r
 // Both a and b must be the same numerical types, signed or unsigned.\r
 //\r
 #define MAX(a, b)                       \\r
@@ -186,8 +186,8 @@ typedef struct {
 \r
 \r
 //\r
-// Return the minimum of two operands. \r
-// This macro returns the minimal of two operand specified by a and b.  \r
+// Return the minimum of two operands.\r
+// This macro returns the minimal of two operand specified by a and b.\r
 // Both a and b must be the same numerical types, signed or unsigned.\r
 //\r
 #define MIN(a, b)                       \\r
index d5bc56cb873c18d734bbe06f4ec22f6a2584f713..e81d693e7830eed82964aafe6dd090b62accc1f5 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 This file is for build version number auto generation\r
 \r
-Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,4 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#define __BUILD_VERSION ""\r
+#define __BUILD_VERSION "Developer Build based on Revision: Unknown"\r
index 133c88c56e3c45d5cd3e2b2da901c7926d8b4e5c..737f63bbb242c082d7cc16efffb80ef7b1f69cb6 100644 (file)
@@ -1,10 +1,10 @@
 /** @file\r
   The firmware file related definitions in PI.\r
-  \r
+\r
   @par Revision Reference:\r
   Version 1.4.\r
 \r
-  Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -22,7 +22,7 @@
 #pragma pack(1)\r
 //\r
 // Used to verify the integrity of the file.\r
-// \r
+//\r
 typedef union {\r
   struct {\r
     UINT8   Header;\r
@@ -37,7 +37,7 @@ typedef UINT8 EFI_FFS_FILE_STATE;
 \r
 //\r
 // File Types Definitions\r
-// \r
+//\r
 #define EFI_FV_FILETYPE_ALL                   0x00\r
 #define EFI_FV_FILETYPE_RAW                   0x01\r
 #define EFI_FV_FILETYPE_FREEFORM              0x02\r
@@ -61,9 +61,9 @@ typedef UINT8 EFI_FFS_FILE_STATE;
 #define EFI_FV_FILETYPE_FFS_MIN               0xf0\r
 #define EFI_FV_FILETYPE_FFS_MAX               0xff\r
 #define EFI_FV_FILETYPE_FFS_PAD               0xf0\r
-// \r
+//\r
 // FFS File Attributes.\r
-// \r
+//\r
 #define FFS_ATTRIB_LARGE_FILE         0x01\r
 #define FFS_ATTRIB_DATA_ALIGNMENT2    0x02\r
 #define FFS_ATTRIB_FIXED              0x04\r
@@ -75,9 +75,9 @@ typedef UINT8 EFI_FFS_FILE_STATE;
 //\r
 #define FFS_FIXED_CHECKSUM  0xAA\r
 \r
-// \r
+//\r
 // FFS File State Bits.\r
-// \r
+//\r
 #define EFI_FILE_HEADER_CONSTRUCTION  0x01\r
 #define EFI_FILE_HEADER_VALID         0x02\r
 #define EFI_FILE_DATA_VALID           0x04\r
@@ -94,9 +94,9 @@ typedef UINT8 EFI_FFS_FILE_STATE;
                                   )\r
 \r
 //\r
-// Each file begins with the header that describe the \r
+// Each file begins with the header that describe the\r
 // contents and state of the files.\r
-// \r
+//\r
 typedef struct {\r
   EFI_GUID                Name;\r
   EFI_FFS_INTEGRITY_CHECK IntegrityCheck;\r
@@ -164,21 +164,21 @@ typedef struct {
 #define MAX_SECTION_SIZE        0x1000000\r
 \r
 //\r
-// Leaf section type that contains an \r
+// Leaf section type that contains an\r
 // IA-32 16-bit executable image.\r
-// \r
+//\r
 typedef EFI_COMMON_SECTION_HEADER EFI_COMPATIBILITY16_SECTION;\r
 typedef EFI_COMMON_SECTION_HEADER2 EFI_COMPATIBILITY16_SECTION2;\r
 \r
 //\r
 // CompressionType of EFI_COMPRESSION_SECTION.\r
-// \r
+//\r
 #define EFI_NOT_COMPRESSED        0x00\r
 #define EFI_STANDARD_COMPRESSION  0x01\r
 //\r
-// An encapsulation section type in which the \r
+// An encapsulation section type in which the\r
 // section data is compressed.\r
-// \r
+//\r
 typedef struct {\r
   EFI_COMMON_SECTION_HEADER   CommonHeader;\r
   UINT32                      UncompressedLength;\r
@@ -193,19 +193,19 @@ typedef struct {
 \r
 //\r
 // Leaf section which could be used to determine the dispatch order of DXEs.\r
-// \r
+//\r
 typedef EFI_COMMON_SECTION_HEADER EFI_DXE_DEPEX_SECTION;\r
 typedef EFI_COMMON_SECTION_HEADER2 EFI_DXE_DEPEX_SECTION2;\r
 \r
 //\r
 // Leaf section witch contains a PI FV.\r
-// \r
+//\r
 typedef EFI_COMMON_SECTION_HEADER EFI_FIRMWARE_VOLUME_IMAGE_SECTION;\r
 typedef EFI_COMMON_SECTION_HEADER2 EFI_FIRMWARE_VOLUME_IMAGE_SECTION2;\r
 \r
 //\r
 // Leaf section which contains a single GUID.\r
-// \r
+//\r
 typedef struct {\r
   EFI_COMMON_SECTION_HEADER   CommonHeader;\r
   EFI_GUID                    SubTypeGuid;\r
@@ -218,12 +218,12 @@ typedef struct {
 \r
 //\r
 // Attributes of EFI_GUID_DEFINED_SECTION\r
-// \r
+//\r
 #define EFI_GUIDED_SECTION_PROCESSING_REQUIRED  0x01\r
 #define EFI_GUIDED_SECTION_AUTH_STATUS_VALID    0x02\r
 //\r
 // Leaf section which is encapsulation defined by specific GUID\r
-// \r
+//\r
 typedef struct {\r
   EFI_COMMON_SECTION_HEADER   CommonHeader;\r
   EFI_GUID                    SectionDefinitionGuid;\r
@@ -240,44 +240,44 @@ typedef struct {
 \r
 //\r
 // Leaf section which contains PE32+ image.\r
-// \r
+//\r
 typedef EFI_COMMON_SECTION_HEADER EFI_PE32_SECTION;\r
 typedef EFI_COMMON_SECTION_HEADER2 EFI_PE32_SECTION2;\r
 \r
 //\r
 // Leaf section which contains PIC image.\r
-// \r
+//\r
 typedef EFI_COMMON_SECTION_HEADER EFI_PIC_SECTION;\r
 typedef EFI_COMMON_SECTION_HEADER2 EFI_PIC_SECTION2;\r
 \r
 //\r
 // Leaf section which used to determine the dispatch order of PEIMs.\r
-// \r
+//\r
 typedef EFI_COMMON_SECTION_HEADER EFI_PEI_DEPEX_SECTION;\r
 typedef EFI_COMMON_SECTION_HEADER2 EFI_PEI_DEPEX_SECTION2;\r
 \r
 //\r
 // Leaf section which constains the position-independent-code image.\r
-// \r
+//\r
 typedef EFI_COMMON_SECTION_HEADER EFI_TE_SECTION;\r
 typedef EFI_COMMON_SECTION_HEADER2 EFI_TE_SECTION2;\r
 \r
 //\r
 // Leaf section which contains an array of zero or more bytes.\r
-// \r
+//\r
 typedef EFI_COMMON_SECTION_HEADER EFI_RAW_SECTION;\r
 typedef EFI_COMMON_SECTION_HEADER2 EFI_RAW_SECTION2;\r
 \r
 //\r
-// Leaf section which contains a unicode string that \r
+// Leaf section which contains a unicode string that\r
 // is human readable file name.\r
-// \r
+//\r
 typedef struct {\r
   EFI_COMMON_SECTION_HEADER   CommonHeader;\r
 \r
   //\r
   // Array of unicode string.\r
-  // \r
+  //\r
   CHAR16                      FileNameString[1];\r
 } EFI_USER_INTERFACE_SECTION;\r
 \r
@@ -286,14 +286,14 @@ typedef struct {
 \r
   //\r
   // Array of unicode string.\r
-  // \r
+  //\r
   CHAR16                      FileNameString[1];\r
 } EFI_USER_INTERFACE_SECTION2;\r
 \r
 //\r
 // Leaf section which contains a numeric build number and\r
-// an optional unicode string that represent the file revision. \r
-// \r
+// an optional unicode string that represent the file revision.\r
+//\r
 typedef struct {\r
   EFI_COMMON_SECTION_HEADER   CommonHeader;\r
   UINT16                      BuildNumber;\r
index c3089e8b70d0cfee45d53467327a86b40ebed845..dcc52cd5e4c21fbbf6a31e0d7dab6c36106c1b7a 100644 (file)
@@ -4,7 +4,7 @@
   @par Revision Reference:\r
   Version 1.2C\r
 \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -26,16 +26,16 @@ typedef UINT32  EFI_FV_FILE_ATTRIBUTES;
 \r
 //\r
 // Value of EFI_FV_FILE_ATTRIBUTES.\r
-// \r
+//\r
 #define EFI_FV_FILE_ATTRIB_ALIGNMENT      0x0000001F\r
 #define EFI_FV_FILE_ATTRIB_FIXED          0x00000100\r
 #define EFI_FV_FILE_ATTRIB_MEMORY_MAPPED  0x00000200\r
 \r
 typedef UINT32  EFI_FVB_ATTRIBUTES_2;\r
 \r
-// \r
+//\r
 // Attributes bit definitions\r
-// \r
+//\r
 #define EFI_FVB2_READ_DISABLED_CAP  0x00000001\r
 #define EFI_FVB2_READ_ENABLED_CAP   0x00000002\r
 #define EFI_FVB2_READ_STATUS        0x00000004\r
@@ -118,7 +118,7 @@ typedef struct {
 \r
 //\r
 // Extension header pointed by ExtHeaderOffset of volume header.\r
-// \r
+//\r
 typedef struct {\r
   EFI_GUID  FvName;\r
   UINT32    ExtHeaderSize;\r
@@ -135,9 +135,9 @@ typedef struct {
   UINT32    TypeMask;\r
 \r
   //\r
-  // Array of GUIDs. \r
+  // Array of GUIDs.\r
   // Each GUID represents an OEM file type.\r
-  // \r
+  //\r
   // EFI_GUID  Types[1];\r
   //\r
 } EFI_FIRMWARE_VOLUME_EXT_ENTRY_OEM_TYPE;\r
index b7364b6201a06eb610715326560c431fb0cc6cb1..aa1aef3ce638f94160edf25396d2c2b14e7c8967 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Defines data types and constants introduced in UEFI.\r
 \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -20,7 +20,7 @@
 \r
 //\r
 // Basical data type definitions introduced in UEFI.\r
-// \r
+//\r
 typedef struct {\r
   UINT32  Data1;\r
   UINT16  Data2;\r
@@ -94,41 +94,41 @@ typedef union {
 \r
 //\r
 // Enumeration of EFI_STATUS.\r
-// \r
-#define EFI_SUCCESS               RETURN_SUCCESS              \r
-#define EFI_LOAD_ERROR            RETURN_LOAD_ERROR           \r
-#define EFI_INVALID_PARAMETER     RETURN_INVALID_PARAMETER    \r
-#define EFI_UNSUPPORTED           RETURN_UNSUPPORTED          \r
-#define EFI_BAD_BUFFER_SIZE       RETURN_BAD_BUFFER_SIZE      \r
-#define EFI_BUFFER_TOO_SMALL      RETURN_BUFFER_TOO_SMALL     \r
-#define EFI_NOT_READY             RETURN_NOT_READY            \r
-#define EFI_DEVICE_ERROR          RETURN_DEVICE_ERROR         \r
-#define EFI_WRITE_PROTECTED       RETURN_WRITE_PROTECTED      \r
-#define EFI_OUT_OF_RESOURCES      RETURN_OUT_OF_RESOURCES     \r
-#define EFI_VOLUME_CORRUPTED      RETURN_VOLUME_CORRUPTED     \r
-#define EFI_VOLUME_FULL           RETURN_VOLUME_FULL          \r
-#define EFI_NO_MEDIA              RETURN_NO_MEDIA             \r
-#define EFI_MEDIA_CHANGED         RETURN_MEDIA_CHANGED        \r
-#define EFI_NOT_FOUND             RETURN_NOT_FOUND            \r
-#define EFI_ACCESS_DENIED         RETURN_ACCESS_DENIED        \r
-#define EFI_NO_RESPONSE           RETURN_NO_RESPONSE          \r
-#define EFI_NO_MAPPING            RETURN_NO_MAPPING           \r
-#define EFI_TIMEOUT               RETURN_TIMEOUT              \r
-#define EFI_NOT_STARTED           RETURN_NOT_STARTED          \r
-#define EFI_ALREADY_STARTED       RETURN_ALREADY_STARTED      \r
-#define EFI_ABORTED               RETURN_ABORTED              \r
-#define EFI_ICMP_ERROR            RETURN_ICMP_ERROR           \r
-#define EFI_TFTP_ERROR            RETURN_TFTP_ERROR           \r
-#define EFI_PROTOCOL_ERROR        RETURN_PROTOCOL_ERROR       \r
-#define EFI_INCOMPATIBLE_VERSION  RETURN_INCOMPATIBLE_VERSION \r
-#define EFI_SECURITY_VIOLATION    RETURN_SECURITY_VIOLATION   \r
-#define EFI_CRC_ERROR             RETURN_CRC_ERROR   \r
+//\r
+#define EFI_SUCCESS               RETURN_SUCCESS\r
+#define EFI_LOAD_ERROR            RETURN_LOAD_ERROR\r
+#define EFI_INVALID_PARAMETER     RETURN_INVALID_PARAMETER\r
+#define EFI_UNSUPPORTED           RETURN_UNSUPPORTED\r
+#define EFI_BAD_BUFFER_SIZE       RETURN_BAD_BUFFER_SIZE\r
+#define EFI_BUFFER_TOO_SMALL      RETURN_BUFFER_TOO_SMALL\r
+#define EFI_NOT_READY             RETURN_NOT_READY\r
+#define EFI_DEVICE_ERROR          RETURN_DEVICE_ERROR\r
+#define EFI_WRITE_PROTECTED       RETURN_WRITE_PROTECTED\r
+#define EFI_OUT_OF_RESOURCES      RETURN_OUT_OF_RESOURCES\r
+#define EFI_VOLUME_CORRUPTED      RETURN_VOLUME_CORRUPTED\r
+#define EFI_VOLUME_FULL           RETURN_VOLUME_FULL\r
+#define EFI_NO_MEDIA              RETURN_NO_MEDIA\r
+#define EFI_MEDIA_CHANGED         RETURN_MEDIA_CHANGED\r
+#define EFI_NOT_FOUND             RETURN_NOT_FOUND\r
+#define EFI_ACCESS_DENIED         RETURN_ACCESS_DENIED\r
+#define EFI_NO_RESPONSE           RETURN_NO_RESPONSE\r
+#define EFI_NO_MAPPING            RETURN_NO_MAPPING\r
+#define EFI_TIMEOUT               RETURN_TIMEOUT\r
+#define EFI_NOT_STARTED           RETURN_NOT_STARTED\r
+#define EFI_ALREADY_STARTED       RETURN_ALREADY_STARTED\r
+#define EFI_ABORTED               RETURN_ABORTED\r
+#define EFI_ICMP_ERROR            RETURN_ICMP_ERROR\r
+#define EFI_TFTP_ERROR            RETURN_TFTP_ERROR\r
+#define EFI_PROTOCOL_ERROR        RETURN_PROTOCOL_ERROR\r
+#define EFI_INCOMPATIBLE_VERSION  RETURN_INCOMPATIBLE_VERSION\r
+#define EFI_SECURITY_VIOLATION    RETURN_SECURITY_VIOLATION\r
+#define EFI_CRC_ERROR             RETURN_CRC_ERROR\r
 #define EFI_END_OF_MEDIA          RETURN_END_OF_MEDIA\r
 #define EFI_END_OF_FILE           RETURN_END_OF_FILE\r
 \r
-#define EFI_WARN_UNKNOWN_GLYPH    RETURN_WARN_UNKNOWN_GLYPH   \r
-#define EFI_WARN_DELETE_FAILURE   RETURN_WARN_DELETE_FAILURE  \r
-#define EFI_WARN_WRITE_FAILURE    RETURN_WARN_WRITE_FAILURE   \r
+#define EFI_WARN_UNKNOWN_GLYPH    RETURN_WARN_UNKNOWN_GLYPH\r
+#define EFI_WARN_DELETE_FAILURE   RETURN_WARN_DELETE_FAILURE\r
+#define EFI_WARN_WRITE_FAILURE    RETURN_WARN_WRITE_FAILURE\r
 #define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL\r
 \r
 \r
@@ -136,7 +136,7 @@ typedef union {
 \r
 //\r
 // Define macro to encode the status code.\r
-// \r
+//\r
 #define EFIERR(_a)                ENCODE_ERROR(_a)\r
 \r
 #define EFI_ERROR(A)              RETURN_ERROR(A)\r
index c41120fd3020982de16f22605aebc6a506fa65b1..a4e62a76d0c46bf000c2d701ad2b2a849352ffdf 100644 (file)
@@ -3,7 +3,7 @@
   IFR is primarily consumed by the EFI presentation engine, and produced by EFI\r
   internal application and drivers as well as all add-in card option-ROM drivers\r
 \r
-  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
@@ -55,27 +55,27 @@ typedef struct {
 } EFI_HII_PACKAGE_LIST_HEADER;\r
 \r
 /**\r
-    \r
-  Each package starts with a header, as defined above, which  \r
-  indicates the size and type of the package. When added to a  \r
-  pointer pointing to the start of the header, Length points at  \r
-  the next package. The package lists form a package list when  \r
-  concatenated together and terminated with an  \r
-  EFI_HII_PACKAGE_HEADER with a Type of EFI_HII_PACKAGE_END. The  \r
-  type EFI_HII_PACKAGE_TYPE_GUID is used for vendor-defined HII  \r
-  packages, whose contents are determined by the Guid. The range  \r
-  of package types starting with EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN  \r
-  through EFI_HII_PACKAGE_TYPE_SYSTEM_END are reserved for system  \r
-  firmware implementers.  \r
-  \r
+\r
+  Each package starts with a header, as defined above, which\r
+  indicates the size and type of the package. When added to a\r
+  pointer pointing to the start of the header, Length points at\r
+  the next package. The package lists form a package list when\r
+  concatenated together and terminated with an\r
+  EFI_HII_PACKAGE_HEADER with a Type of EFI_HII_PACKAGE_END. The\r
+  type EFI_HII_PACKAGE_TYPE_GUID is used for vendor-defined HII\r
+  packages, whose contents are determined by the Guid. The range\r
+  of package types starting with EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN\r
+  through EFI_HII_PACKAGE_TYPE_SYSTEM_END are reserved for system\r
+  firmware implementers.\r
+\r
   @param Length The size of the package in bytes.\r
-  \r
+\r
   @param Type   The package type. See EFI_HII_PACKAGE_TYPE_x,\r
                 below.\r
-  \r
+\r
   @param Data   The package data, the format of which is\r
                 determined by Type.\r
-  \r
+\r
 **/\r
 typedef struct {\r
   UINT32  Length:24;\r
@@ -85,7 +85,7 @@ typedef struct {
 \r
 //\r
 // EFI_HII_PACKAGE_TYPE_x.\r
-// \r
+//\r
 #define EFI_HII_PACKAGE_TYPE_ALL             0x00\r
 #define EFI_HII_PACKAGE_TYPE_GUID            0x01\r
 #define EFI_HII_PACKAGE_FORM                 0x02\r
@@ -222,7 +222,7 @@ typedef struct _EFI_HII_GIBT_GLYPH_BLOCK {
 typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK {\r
   EFI_HII_GLYPH_BLOCK    Header;\r
   EFI_HII_GLYPH_INFO     Cell;\r
-  UINT16                 Count;  \r
+  UINT16                 Count;\r
   UINT8                  BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Cell.Width+7)/8)*Cell.Height\r
 } EFI_HII_GIBT_GLYPHS_BLOCK;\r
 \r
@@ -1360,12 +1360,12 @@ typedef struct _EFI_IFR_SECURITY {
 \r
 typedef struct _EFI_IFR_FORM_MAP_METHOD {\r
   ///\r
-  /// The string identifier which provides the human-readable name of \r
+  /// The string identifier which provides the human-readable name of\r
   /// the configuration method for this standards map form.\r
   ///\r
   EFI_STRING_ID            MethodTitle;\r
   ///\r
-  /// Identifier which uniquely specifies the configuration methods \r
+  /// Identifier which uniquely specifies the configuration methods\r
   /// associated with this standards map form.\r
   ///\r
   EFI_GUID                 MethodIdentifier;\r
@@ -1373,8 +1373,8 @@ typedef struct _EFI_IFR_FORM_MAP_METHOD {
 \r
 typedef struct _EFI_IFR_FORM_MAP {\r
   ///\r
-  /// The sequence that defines the type of opcode as well as the length \r
-  /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP. \r
+  /// The sequence that defines the type of opcode as well as the length\r
+  /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.\r
   ///\r
   EFI_IFR_OP_HEADER        Header;\r
   ///\r
@@ -1389,13 +1389,13 @@ typedef struct _EFI_IFR_FORM_MAP {
 \r
 typedef struct _EFI_IFR_SET {\r
   ///\r
-  /// The sequence that defines the type of opcode as well as the length \r
-  /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP. \r
+  /// The sequence that defines the type of opcode as well as the length\r
+  /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.\r
   ///\r
   EFI_IFR_OP_HEADER  Header;\r
   ///\r
-  /// Specifies the identifier of a previously declared variable store to \r
-  /// use when storing the question's value. \r
+  /// Specifies the identifier of a previously declared variable store to\r
+  /// use when storing the question's value.\r
   ///\r
   EFI_VARSTORE_ID    VarStoreId;\r
   union {\r
@@ -1409,20 +1409,20 @@ typedef struct _EFI_IFR_SET {
     UINT16           VarOffset;\r
   }                  VarStoreInfo;\r
   ///\r
-  /// Specifies the type used for storage. \r
+  /// Specifies the type used for storage.\r
   ///\r
   UINT8              VarStoreType;\r
 } EFI_IFR_SET;\r
 \r
 typedef struct _EFI_IFR_GET {\r
   ///\r
-  /// The sequence that defines the type of opcode as well as the length \r
-  /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP. \r
+  /// The sequence that defines the type of opcode as well as the length\r
+  /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.\r
   ///\r
   EFI_IFR_OP_HEADER  Header;\r
   ///\r
-  /// Specifies the identifier of a previously declared variable store to \r
-  /// use when retrieving the value. \r
+  /// Specifies the identifier of a previously declared variable store to\r
+  /// use when retrieving the value.\r
   ///\r
   EFI_VARSTORE_ID    VarStoreId;\r
   union {\r
@@ -1436,7 +1436,7 @@ typedef struct _EFI_IFR_GET {
     UINT16           VarOffset;\r
   }                  VarStoreInfo;\r
   ///\r
-  /// Specifies the type used for storage. \r
+  /// Specifies the type used for storage.\r
   ///\r
   UINT8              VarStoreType;\r
 } EFI_IFR_GET;\r
@@ -1456,9 +1456,9 @@ typedef struct _EFI_IFR_MAP {
 // Keyboard Package\r
 //\r
 \r
-typedef enum {    \r
+typedef enum {\r
   EfiKeyLCtrl,\r
-  EfiKeyA0, \r
+  EfiKeyA0,\r
   EfiKeyLAlt,\r
   EfiKeySpaceBar,\r
   EfiKeyA2,\r
@@ -1575,7 +1575,7 @@ typedef struct {
 } EFI_KEY_DESCRIPTOR;\r
 \r
 //\r
-// A key which is affected by all the standard shift modifiers.  \r
+// A key which is affected by all the standard shift modifiers.\r
 // Most keys would be expected to have this bit active.\r
 //\r
 #define EFI_AFFECTED_BY_STANDARD_SHIFT       0x0001\r
@@ -1677,7 +1677,7 @@ typedef struct {
 // token usages.\r
 //\r
 //\r
-// STRING_TOKEN is not defined in UEFI specification. But it is placed \r
+// STRING_TOKEN is not defined in UEFI specification. But it is placed\r
 // here for the easy access by C files and VFR source files.\r
 //\r
 #define STRING_TOKEN(t) t\r
index f4f9dbe113de36fe0e9b2855d9a3fffb21044b8d..0982da499813f2b146a5fb9a0bec648208b4c668 100644 (file)
@@ -1,5 +1,5 @@
 /** @file\r
-  This includes some definitions introduced in UEFI that will be used in both PEI \r
+  This includes some definitions introduced in UEFI that will be used in both PEI\r
   and DXE phases.\r
 \r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
@@ -20,7 +20,7 @@
 \r
 //\r
 // Enumeration of memory types introduced in UEFI.\r
-// \r
+//\r
 typedef enum {\r
   EfiReservedMemoryType,\r
   EfiLoaderCode,\r
@@ -43,7 +43,7 @@ typedef enum {
 \r
 //\r
 // Data structure that precedes all of the standard EFI table types.\r
-// \r
+//\r
 typedef struct {\r
   UINT64  Signature;\r
   UINT32  Revision;\r
@@ -54,28 +54,28 @@ typedef struct {
 \r
 //\r
 // Attributes of variable.\r
-// \r
+//\r
 #define EFI_VARIABLE_NON_VOLATILE                 0x00000001\r
 #define EFI_VARIABLE_BOOTSERVICE_ACCESS           0x00000002\r
 #define EFI_VARIABLE_RUNTIME_ACCESS               0x00000004\r
 #define EFI_VARIABLE_HARDWARE_ERROR_RECORD        0x00000008\r
 \r
 //\r
-// This attribute is identified by the mnemonic 'HR' \r
+// This attribute is identified by the mnemonic 'HR'\r
 // elsewhere in this specification.\r
-// \r
+//\r
 #define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS   0x00000010\r
 \r
 \r
 \r
 //\r
 // _WIN_CERTIFICATE.wCertificateType\r
-// \r
+//\r
 #define WIN_CERT_TYPE_EFI_PKCS115   0x0EF0\r
 #define WIN_CERT_TYPE_EFI_GUID      0x0EF1\r
 \r
 /**\r
-   \r
+\r
   The WIN_CERTIFICATE structure is part of the PE/COFF\r
   specification and has the following definition:\r
 \r
@@ -110,13 +110,13 @@ typedef struct _WIN_CERTIFICATE {
 \r
 //\r
 // WIN_CERTIFICATE_UEFI_GUID.CertType\r
-// \r
+//\r
 #define EFI_CERT_TYPE_RSA2048_SHA256_GUID \\r
   {0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf } }\r
 \r
 //\r
 // WIN_CERTIFICATE_UEFI_GUID.CertData\r
-// \r
+//\r
 typedef struct _EFI_CERT_BLOCK_RSA_2048_SHA256 {\r
   EFI_GUID  HashType;\r
   UINT8     PublicKey[256];\r
@@ -125,7 +125,7 @@ typedef struct _EFI_CERT_BLOCK_RSA_2048_SHA256 {
 \r
 \r
 /**\r
-   \r
+\r
   @param Hdr  This is the standard WIN_CERTIFICATE header, where\r
               wCertificateType is set to\r
               WIN_CERT_TYPE_EFI_GUID.\r
@@ -158,26 +158,26 @@ typedef struct _WIN_CERTIFICATE_UEFI_GUID {
 \r
 \r
 /**\r
-   \r
+\r
   Certificate which encapsulates the RSASSA_PKCS1-v1_5 digital\r
   signature.\r
-  \r
+\r
   The WIN_CERTIFICATE_UEFI_PKCS1_15 structure is derived from\r
-  WIN_CERTIFICATE and encapsulate the information needed to  \r
-  implement the RSASSA-PKCS1-v1_5 digital signature algorithm as  \r
-  specified in RFC2437.  \r
-  \r
+  WIN_CERTIFICATE and encapsulate the information needed to\r
+  implement the RSASSA-PKCS1-v1_5 digital signature algorithm as\r
+  specified in RFC2437.\r
+\r
   @param Hdr  This is the standard WIN_CERTIFICATE header, where\r
               wCertificateType is set to\r
               WIN_CERT_TYPE_UEFI_PKCS1_15.\r
-  \r
+\r
   @param HashAlgorithm  This is the hashing algorithm which was\r
                         performed on the UEFI executable when\r
                         creating the digital signature. It is\r
                         one of the enumerated values pre-defined\r
                         in Section 26.4.1. See\r
                         EFI_HASH_ALGORITHM_x.\r
-  \r
+\r
   @param Signature  This is the actual digital signature. The\r
                     size of the signature is the same size as\r
                     the key (1024-bit key is 128 bytes) and can\r
@@ -195,7 +195,7 @@ typedef struct _WIN_CERTIFICATE_EFI_PKCS1_15 {
 \r
 \r
 /**\r
-   \r
+\r
   AuthInfo is a WIN_CERTIFICATE using the wCertificateType\r
   WIN_CERTIFICATE_UEFI_GUID and the CertType\r
   EFI_CERT_TYPE_RSA2048_SHA256. If the attribute specifies\r
@@ -209,12 +209,12 @@ typedef struct _WIN_CERTIFICATE_EFI_PKCS1_15 {
   WIN_CERTIFICATE shall be used to describe the signature of the\r
   Variable data *Data. In addition, the signature will also\r
   include the MonotonicCount value to guard against replay attacks\r
-  \r
+\r
   @param  MonotonicCount  Included in the signature of\r
                           AuthInfo.Used to ensure freshness/no\r
                           replay. Incremented during each\r
                           "Write" access.\r
-  \r
+\r
   @param AuthInfo   Provides the authorization for the variable\r
                     access. It is a signature across the\r
                     variable data and the  Monotonic Count\r
index 6e484200beebdadd6513bf1edeef209dd582f22c..cf7a6dc62a32b22b6e6ba4ab2d65091983da73a0 100644 (file)
@@ -1,13 +1,13 @@
 /**@file\r
   Header file for EFI Variable Services.\r
 \r
-  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
   distribution.  The full text of the license may be found at\r
     http://opensource.org/licenses/bsd-license.php\r
-  \r
+\r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
index 9f12ca2a48d5e48e8abdd0ef55927f3795264d3e..8c7a646e61e18750d9ae117e2d801384151848a9 100644 (file)
@@ -2,8 +2,8 @@
   Terminal Device Path Vendor Guid.\r
   @par Revision Reference:\r
   GUIDs defined in UEFI 2.0 spec.\r
-  \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -42,7 +42,7 @@
   { \\r
     0x37499a9d, 0x542f, 0x4c89, {0xa0, 0x26, 0x35, 0xda, 0x14, 0x20, 0x94, 0xe4 } \\r
   }\r
-  \r
+\r
 #define EFI_SAS_DEVICE_PATH_GUID \\r
   { \\r
     0xd487ddb4, 0x008b, 0x11d9, {0xaf, 0xdc, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \\r
index 03d0c71d2da8c878e05b7262813be1628acd7be3..d7d471536751aa04cfa098ab22cb2d3422dbd491 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
   Guid used to define the Firmware File System. See PI spec volume 3 for more\r
   details.\r
-  \r
+\r
   @par Revision Reference:\r
   Guids defined in PI Spec Volume 3\r
 \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
index bbe59a51c7d84f473fd55fc2f38e2141d5403719..4719b53d37fadc6762d2ad427ffea3719e8598b7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Processor or Compiler specific defines and types for x64.\r
 \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
   //\r
   // No ANSI C 2000 stdint.h integer width declarations, so define equivalents\r
   //\r
\r
-  #if _MSC_EXTENSIONS \r
-    \r
+\r
+  #if _MSC_EXTENSIONS\r
+\r
     //\r
-    // use Microsoft* C complier dependent integer width types \r
+    // use Microsoft* C complier dependent integer width types\r
     //\r
     typedef unsigned __int64    UINT64;\r
     typedef __int64             INT64;\r
@@ -84,7 +84,7 @@
   #else\r
 \r
     //\r
-    // Assume standard IA-32 alignment. \r
+    // Assume standard IA-32 alignment.\r
     // BugBug: Need to check portability of long long\r
     //\r
     typedef unsigned long long  UINT64;\r
@@ -144,17 +144,17 @@ typedef INT32   INTN;
 #if _MSC_EXTENSIONS\r
   //\r
   // Microsoft* compiler requires _EFIAPI useage, __cdecl is Microsoft* specific C.\r
-  // \r
-  #define EFIAPI __cdecl  \r
+  //\r
+  #define EFIAPI __cdecl\r
 #endif\r
 \r
 #if __GNUC__\r
-  #define EFIAPI __attribute__((cdecl))    \r
+  #define EFIAPI __attribute__((cdecl))\r
 #endif\r
 \r
 //\r
 // The Microsoft* C compiler can removed references to unreferenced data items\r
-//  if the /OPT:REF linker option is used. We defined a macro as this is a \r
+//  if the /OPT:REF linker option is used. We defined a macro as this is a\r
 //  a non standard extension\r
 //\r
 #if _MSC_EXTENSIONS\r
index 552c457f80f757c168201f0b3fded78605769d1c..2bfb311a723911a5ab58b4d2faf2fcb7c5fc4c61 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
-  ACPI memory mapped configuration space access table definition, defined at \r
+  ACPI memory mapped configuration space access table definition, defined at\r
   in the PCI Firmware Specification, version 3.0 draft version 0.5.\r
   Specification is available at http://www.pcisig.com.\r
 \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
index 8c197f43bb148a48398ddf072bd7f861b0b7c0f1..6ce7fe527f84a14070a6f55ceba778b2b5955bd5 100644 (file)
@@ -4,7 +4,7 @@
 \r
   @bug Fix text - doc as defined in MSFT EFI specification.\r
 \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
   Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
 //\r
 // Support old names for backward compatible\r
 //\r
-#define EFI_IMAGE_MACHINE_IA32      IMAGE_FILE_MACHINE_I386 \r
-#define EFI_IMAGE_MACHINE_IA64      IMAGE_FILE_MACHINE_IA64  \r
-#define EFI_IMAGE_MACHINE_IPF       IMAGE_FILE_MACHINE_IA64  \r
-#define EFI_IMAGE_MACHINE_EBC       IMAGE_FILE_MACHINE_EBC  \r
+#define EFI_IMAGE_MACHINE_IA32      IMAGE_FILE_MACHINE_I386\r
+#define EFI_IMAGE_MACHINE_IA64      IMAGE_FILE_MACHINE_IA64\r
+#define EFI_IMAGE_MACHINE_IPF       IMAGE_FILE_MACHINE_IA64\r
+#define EFI_IMAGE_MACHINE_EBC       IMAGE_FILE_MACHINE_EBC\r
 #define EFI_IMAGE_MACHINE_X64       IMAGE_FILE_MACHINE_X64\r
 #define EFI_IMAGE_MACHINE_ARMT      IMAGE_FILE_MACHINE_ARMT\r
 #define EFI_IMAGE_MACHINE_AARCH64   IMAGE_FILE_MACHINE_ARM64\r
@@ -475,23 +475,23 @@ typedef struct {
 //\r
 // x64 processor relocation types.\r
 //\r
-#define IMAGE_REL_AMD64_ABSOLUTE       0x0000\r
-#define IMAGE_REL_AMD64_ADDR64   0x0001\r
-#define IMAGE_REL_AMD64_ADDR32   0x0002\r
-#define IMAGE_REL_AMD64_ADDR32NB       0x0003\r
-#define IMAGE_REL_AMD64_REL32      0x0004\r
-#define IMAGE_REL_AMD64_REL32_1          0x0005\r
-#define IMAGE_REL_AMD64_REL32_2          0x0006\r
-#define IMAGE_REL_AMD64_REL32_3          0x0007\r
-#define IMAGE_REL_AMD64_REL32_4          0x0008\r
-#define IMAGE_REL_AMD64_REL32_5          0x0009\r
-#define IMAGE_REL_AMD64_SECTION          0x000A\r
-#define IMAGE_REL_AMD64_SECREL   0x000B\r
-#define IMAGE_REL_AMD64_SECREL7          0x000C\r
-#define IMAGE_REL_AMD64_TOKEN      0x000D\r
-#define IMAGE_REL_AMD64_SREL32   0x000E\r
-#define IMAGE_REL_AMD64_PAIR       0x000F\r
-#define IMAGE_REL_AMD64_SSPAN32          0x0010\r
+#define IMAGE_REL_AMD64_ABSOLUTE  0x0000\r
+#define IMAGE_REL_AMD64_ADDR64    0x0001\r
+#define IMAGE_REL_AMD64_ADDR32    0x0002\r
+#define IMAGE_REL_AMD64_ADDR32NB  0x0003\r
+#define IMAGE_REL_AMD64_REL32      0x0004\r
+#define IMAGE_REL_AMD64_REL32_1    0x0005\r
+#define IMAGE_REL_AMD64_REL32_2    0x0006\r
+#define IMAGE_REL_AMD64_REL32_3    0x0007\r
+#define IMAGE_REL_AMD64_REL32_4    0x0008\r
+#define IMAGE_REL_AMD64_REL32_5    0x0009\r
+#define IMAGE_REL_AMD64_SECTION    0x000A\r
+#define IMAGE_REL_AMD64_SECREL    0x000B\r
+#define IMAGE_REL_AMD64_SECREL7    0x000C\r
+#define IMAGE_REL_AMD64_TOKEN      0x000D\r
+#define IMAGE_REL_AMD64_SREL32    0x000E\r
+#define IMAGE_REL_AMD64_PAIR      0x000F\r
+#define IMAGE_REL_AMD64_SSPAN32    0x0010\r
 \r
 ///\r
 /// Based relocation format.\r
index 26c1541e399c79f581a37807b829e822b1d2967b..d7c5f0c858fabf3e3ce5e100913fd282a052931f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Support for PCI 2.2 standard.\r
 \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -168,7 +168,7 @@ typedef struct {
 #define PCI_CLASS_BRIDGE_ISA_PDECODE  0x80\r
 #define PCI_CLASS_ISA_POSITIVE_DECODE 0x80  // obsolete\r
 \r
-#define PCI_CLASS_SCC                 0x07  // Simple communications controllers \r
+#define PCI_CLASS_SCC                 0x07  // Simple communications controllers\r
 #define PCI_SUBCLASS_SERIAL           0x00\r
 #define PCI_IF_GENERIC_XT             0x00\r
 #define PCI_IF_16450                  0x01\r
@@ -197,8 +197,8 @@ typedef struct {
 #define PCI_IF_8259_PIC               0x00\r
 #define PCI_IF_ISA_PIC                0x01\r
 #define PCI_IF_EISA_PIC               0x02\r
-#define PCI_IF_APIC_CONTROLLER        0x10 // I/O APIC interrupt controller , 32 bye none-prefectable memory.  \r
-#define PCI_IF_APIC_CONTROLLER2       0x20 \r
+#define PCI_IF_APIC_CONTROLLER        0x10 // I/O APIC interrupt controller , 32 bye none-prefectable memory.\r
+#define PCI_IF_APIC_CONTROLLER2       0x20\r
 #define PCI_SUBCLASS_TIMER            0x02\r
 #define PCI_IF_8254_TIMER             0x00\r
 #define PCI_IF_ISA_TIMER              0x01\r
@@ -249,7 +249,7 @@ typedef struct {
 \r
 #define PCI_SECURITY_CONTROLLER       0x10 // Encryption and decryption controller\r
 #define PCI_SUBCLASS_NET_COMPUT       0x00\r
-#define PCI_SUBCLASS_ENTERTAINMENT    0x10 \r
+#define PCI_SUBCLASS_ENTERTAINMENT    0x10\r
 \r
 #define PCI_CLASS_DPIO                0x11\r
 \r
index 5b55fc57b8180da757505d202eb4ea1238b53a58..e03bda80c8e1da1a2b207e8d22a021e880a25cd0 100644 (file)
@@ -3,7 +3,7 @@
 \r
   Abstraction of a very simple graphics device.\r
 \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -108,7 +108,7 @@ typedef union {
 typedef enum {\r
   EfiBltVideoFill,\r
   EfiBltVideoToBltBuffer,\r
-  EfiBltBufferToVideo, \r
+  EfiBltBufferToVideo,\r
   EfiBltVideoToVideo,\r
   EfiGraphicsOutputBltOperationMax\r
 } EFI_GRAPHICS_OUTPUT_BLT_OPERATION;\r
@@ -116,28 +116,28 @@ typedef enum {
 /**\r
   The following table defines actions for BltOperations:\r
 \r
-  <B>EfiBltVideoFill</B> - Write data from the  BltBuffer pixel (SourceX, SourceY) \r
-  directly to every pixel of the video display rectangle \r
-  (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). \r
+  <B>EfiBltVideoFill</B> - Write data from the  BltBuffer pixel (SourceX, SourceY)\r
+  directly to every pixel of the video display rectangle\r
+  (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).\r
   Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
 \r
-  <B>EfiBltVideoToBltBuffer</B> - Read data from the video display rectangle \r
-  (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in \r
-  the BltBuffer rectangle (DestinationX, DestinationY ) \r
-  (DestinationX + Width, DestinationY + Height). If DestinationX or \r
-  DestinationY is not zero then Delta must be set to the length in bytes \r
+  <B>EfiBltVideoToBltBuffer</B> - Read data from the video display rectangle\r
+  (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
+  the BltBuffer rectangle (DestinationX, DestinationY )\r
+  (DestinationX + Width, DestinationY + Height). If DestinationX or\r
+  DestinationY is not zero then Delta must be set to the length in bytes\r
   of a row in the BltBuffer.\r
 \r
-  <B>EfiBltBufferToVideo</B> - Write data from the  BltBuffer rectangle \r
-  (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the \r
-  video display rectangle (DestinationX, DestinationY) \r
-  (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is \r
-  not zero then Delta must be set to the length in bytes of a row in the \r
+  <B>EfiBltBufferToVideo</B> - Write data from the  BltBuffer rectangle\r
+  (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
+  video display rectangle (DestinationX, DestinationY)\r
+  (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
+  not zero then Delta must be set to the length in bytes of a row in the\r
   BltBuffer.\r
 \r
   <B>EfiBltVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY)\r
-  (SourceX + Width, SourceY + Height) .to the video display rectangle \r
-  (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). \r
+  (SourceX + Width, SourceY + Height) .to the video display rectangle\r
+  (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).\r
   The BltBuffer and Delta  are not used in this mode.\r
 \r
   @param  This         Protocol instance pointer.\r
index 597601a7f427fabe95489dedd677afa9fc5ed857..83d7466586a52bdbb9220604ff58fbc27ed0e297 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
   This file declares GUIDed section extraction protocol.\r
 \r
-  This interface provides a means of decoding a GUID defined encapsulation \r
+  This interface provides a means of decoding a GUID defined encapsulation\r
   section. There may be multiple different GUIDs associated with the GUIDed\r
   section extraction protocol. That is, all instances of the GUIDed section\r
   extraction protocol must have the same interface structure.\r
-  \r
+\r
   @par Revision Reference: PI\r
   Version 1.00.\r
-  \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -56,10 +56,10 @@ typedef struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL EFI_GUIDED_SECTION_EXTRAC
   EFI_TPL above TPL_NOTIFY is undefined. Type EFI_TPL is\r
   defined in RaiseTPL() in the UEFI 2.0 specification.\r
 \r
-  \r
+\r
   @param This   Indicates the\r
                 EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL instance.\r
-  \r
+\r
   @param InputSection Buffer containing the input GUIDed section\r
                       to be processed. OutputBuffer OutputBuffer\r
                       is allocated from boot services pool\r
@@ -124,7 +124,7 @@ EFI_STATUS
 \r
 \r
 /**\r
-  \r
+\r
   Takes the GUIDed section as input and produces the section\r
   stream data. See the ExtractSection() function description.\r
 \r
index e97b252ae332faf0608bcd6d7e2c1d1754a70216..5e1b3addbdccd2ccdbe5fd04954765eb1a87d141 100644 (file)
@@ -2,11 +2,11 @@
   This file defines the Human Interface Infrastructure protocol which will\r
   be used by resources which want to publish IFR/Font/String data and have it\r
   collected by the Configuration engine.\r
-  \r
+\r
   @par Revision Reference:\r
   This protocol is defined in HII spec 0.92.\r
 \r
-  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
index 3911fa98849bca7eeaa0ff9f08b386214a878a73..a89a867ac3c5d00a91f477e2a5be70bf3e4055f8 100644 (file)
@@ -3,7 +3,7 @@
 \r
   Abstraction of a very simple graphics device.\r
 \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -99,33 +99,33 @@ typedef enum {
 \r
     The following table defines actions for BltOperations:\r
 \r
-    <B>EfiUgaVideoFill</B> - Write data from the  BltBuffer pixel (SourceX, SourceY) \r
-      directly to every pixel of the video display rectangle \r
-      (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). \r
+    <B>EfiUgaVideoFill</B> - Write data from the  BltBuffer pixel (SourceX, SourceY)\r
+      directly to every pixel of the video display rectangle\r
+      (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).\r
       Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
 \r
-    <B>EfiUgaVideoToBltBuffer</B> - Read data from the video display rectangle \r
-      (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in \r
-      the BltBuffer rectangle (DestinationX, DestinationY ) \r
-      (DestinationX + Width, DestinationY + Height). If DestinationX or \r
-      DestinationY is not zero then Delta must be set to the length in bytes \r
+    <B>EfiUgaVideoToBltBuffer</B> - Read data from the video display rectangle\r
+      (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
+      the BltBuffer rectangle (DestinationX, DestinationY )\r
+      (DestinationX + Width, DestinationY + Height). If DestinationX or\r
+      DestinationY is not zero then Delta must be set to the length in bytes\r
       of a row in the BltBuffer.\r
 \r
-    <B>EfiUgaBltBufferToVideo</B> - Write data from the  BltBuffer rectangle \r
-      (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the \r
-      video display rectangle (DestinationX, DestinationY) \r
-      (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is \r
-      not zero then Delta must be set to the length in bytes of a row in the \r
+    <B>EfiUgaBltBufferToVideo</B> - Write data from the  BltBuffer rectangle\r
+      (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
+      video display rectangle (DestinationX, DestinationY)\r
+      (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
+      not zero then Delta must be set to the length in bytes of a row in the\r
       BltBuffer.\r
 \r
     <B>EfiUgaVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY)\r
-     (SourceX + Width, SourceY + Height) .to the video display rectangle \r
-     (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). \r
+     (SourceX + Width, SourceY + Height) .to the video display rectangle\r
+     (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).\r
      The BltBuffer and Delta  are not used in this mode.\r
 \r
 \r
     @param[in] This          - Protocol instance pointer.\r
-    @param[in] BltBuffer     - Buffer containing data to blit into video buffer. This \r
+    @param[in] BltBuffer     - Buffer containing data to blit into video buffer. This\r
                                buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)\r
     @param[in] BltOperation  - Operation to perform on BlitBuffer and video memory\r
     @param[in] SourceX       - X coordinate of source for the BltBuffer.\r
@@ -135,7 +135,7 @@ typedef enum {
     @param[in] Width         - Width of rectangle in BltBuffer in pixels.\r
     @param[in] Height        - Hight of rectangle in BltBuffer in pixels.\r
     @param[in] Delta         - OPTIONAL\r
-  \r
+\r
     @retval EFI_SUCCESS           - The Blt operation completed.\r
     @retval EFI_INVALID_PARAMETER - BltOperation is not valid.\r
     @retval EFI_DEVICE_ERROR      - A hardware error occured writting to the video buffer.\r
index a02a41913f2716246451ce51d6de0a34dc0260f4..c625f8cef4a1f6e6222b550ef84020a350aad9ea 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Processor or Compiler specific defines and types x64 (Intel(r) EM64T, AMD64).\r
 \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -30,8 +30,8 @@
 #endif\r
 \r
 \r
-#if _MSC_EXTENSIONS \r
-    \r
+#if _MSC_EXTENSIONS\r
+\r
 //\r
 // Disable warning that make it impossible to compile at /W4\r
 // This only works for Microsoft* tools\r
   //\r
   // No ANSI C 2000 stdint.h integer width declarations, so define equivalents\r
   //\r
\r
-  #if _MSC_EXTENSIONS \r
-    \r
+\r
+  #if _MSC_EXTENSIONS\r
+\r
 \r
     //\r
-    // use Microsoft C complier dependent integer width types \r
+    // use Microsoft C complier dependent integer width types\r
     //\r
     typedef unsigned __int64    UINT64;\r
     typedef __int64             INT64;\r
@@ -85,9 +85,9 @@
     typedef char                CHAR8;\r
     typedef char                INT8;\r
   #else\r
-    #ifdef _EFI_P64 \r
+    #ifdef _EFI_P64\r
       //\r
-      // P64 - is Intel Itanium(TM) speak for pointers being 64-bit and longs and ints \r
+      // P64 - is Intel Itanium(TM) speak for pointers being 64-bit and longs and ints\r
       //  are 32-bits\r
       //\r
       typedef unsigned long long  UINT64;\r
@@ -160,28 +160,28 @@ typedef INT64   INTN;
 // use the correct C calling convention. All protocol member functions and\r
 // EFI intrinsics are required to modify thier member functions with EFIAPI.\r
 //\r
-#if _MSC_EXTENSIONS \r
+#if _MSC_EXTENSIONS\r
   ///\r
   /// Define the standard calling convention reguardless of optimization level.\r
   /// __cdecl is Microsoft* specific C extension.\r
-  /// \r
-  #define EFIAPI __cdecl  \r
+  ///\r
+  #define EFIAPI __cdecl\r
 #elif __GNUC__\r
   ///\r
   /// Define the standard calling convention reguardless of optimization level.\r
   /// efidecl is an extension to GCC that supports the differnece between x64\r
   /// GCC ABI and x64 Microsoft* ABI. EFI is closer to the Microsoft* ABI and\r
-  /// EFIAPI makes sure the right ABI is used for public interfaces. \r
+  /// EFIAPI makes sure the right ABI is used for public interfaces.\r
   /// eficecl is a work in progress and we do not yet have the compiler\r
   ///\r
-  #define EFIAPI \r
+  #define EFIAPI\r
 #else\r
-  #define EFIAPI       \r
+  #define EFIAPI\r
 #endif\r
 \r
 //\r
 // The Microsoft* C compiler can removed references to unreferenced data items\r
-//  if the /OPT:REF linker option is used. We defined a macro as this is a \r
+//  if the /OPT:REF linker option is used. We defined a macro as this is a\r
 //  a non standard extension\r
 //\r
 #if _MSC_EXTENSIONS\r
index 6882e7465b39ebbe91d262948d67639993a04ee0..bc9e29fd9fe8e42b8392ab25b9d6120646a86ae8 100644 (file)
@@ -1,3 +1,3 @@
 LzmaCompress is based on the LZMA SDK 16.04.  LZMA SDK 16.04\r
 was placed in the public domain on 2016-10-04.  It was\r
-released on the http://www.7-zip.org/sdk.html website.
\ No newline at end of file
+released on the http://www.7-zip.org/sdk.html website.\r
index be8790219699279ce831029d28b616eedfcce91f..ceb6a5bc77345d73448f77446e5b8f919639ee7d 100644 (file)
@@ -5,7 +5,7 @@
     LzmaUtil.c -- Test application for LZMA compression\r
     2016-10-04 : Igor Pavlov : Public domain\r
 \r
-  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -33,7 +33,7 @@
 #define LZMA_HEADER_SIZE (LZMA_PROPS_SIZE + 8)\r
 \r
 typedef enum {\r
-  NoConverter, \r
+  NoConverter,\r
   X86Converter,\r
   MaxConverter\r
 } CONVERTER_TYPE;\r
@@ -50,7 +50,7 @@ static CONVERTER_TYPE mConType = NoConverter;
 #define UTILITY_MAJOR_VERSION 0\r
 #define UTILITY_MINOR_VERSION 2\r
 #define INTEL_COPYRIGHT \\r
-  "Copyright (c) 2009-2016, Intel Corporation. All rights reserved."\r
+  "Copyright (c) 2009-2018, Intel Corporation. All rights reserved."\r
 void PrintHelp(char *buffer)\r
 {\r
   strcat(buffer,\r
@@ -113,7 +113,7 @@ static SRes Encode(ISeqOutStream *outStream, ISeqInStream *inStream, UInt64 file
   } else {\r
     return SZ_ERROR_INPUT_EOF;\r
   }\r
-  \r
+\r
   if (SeqInStream_Read(inStream, inBuffer, inSize) != SZ_OK) {\r
     res = SZ_ERROR_READ;\r
     goto Done;\r
@@ -126,7 +126,7 @@ static SRes Encode(ISeqOutStream *outStream, ISeqInStream *inStream, UInt64 file
     res = SZ_ERROR_MEM;\r
     goto Done;\r
   }\r
-  \r
+\r
   {\r
     int i;\r
     for (i = 0; i < 8; i++)\r
@@ -141,7 +141,7 @@ static SRes Encode(ISeqOutStream *outStream, ISeqInStream *inStream, UInt64 file
       goto Done;\r
     }\r
     memcpy(filteredStream, inBuffer, inSize);\r
-    \r
+\r
     if (mConType == X86Converter) {\r
       {\r
         UInt32 x86State;\r
@@ -154,12 +154,12 @@ static SRes Encode(ISeqOutStream *outStream, ISeqInStream *inStream, UInt64 file
   {\r
     size_t outSizeProcessed = outSize - LZMA_HEADER_SIZE;\r
     size_t outPropsSize = LZMA_PROPS_SIZE;\r
-    \r
+\r
     res = LzmaEncode(outBuffer + LZMA_HEADER_SIZE, &outSizeProcessed,\r
         mConType != NoConverter ? filteredStream : inBuffer, inSize,\r
         &props, outBuffer, &outPropsSize, 0,\r
         NULL, &g_Alloc, &g_Alloc);\r
-    \r
+\r
     if (res != SZ_OK)\r
       goto Done;\r
 \r
@@ -190,13 +190,13 @@ static SRes Decode(ISeqOutStream *outStream, ISeqInStream *inStream, UInt64 file
 \r
   int i;\r
 \r
-  if (inSize < LZMA_HEADER_SIZE) \r
+  if (inSize < LZMA_HEADER_SIZE)\r
     return SZ_ERROR_INPUT_EOF;\r
 \r
   inBuffer = (Byte *)MyAlloc(inSize);\r
   if (inBuffer == 0)\r
     return SZ_ERROR_MEM;\r
-  \r
+\r
   if (SeqInStream_Read(inStream, inBuffer, inSize) != SZ_OK) {\r
     res = SZ_ERROR_READ;\r
     goto Done;\r
index f059ad6b2bd157172358740c297006aeae2f8ab0..fb45d9742abf7fddbd397621fdd31396688033e5 100644 (file)
@@ -1,8 +1,8 @@
 @REM @file\r
-@REM This script will exec LzmaCompress tool with --f86 option that enables \r
+@REM This script will exec LzmaCompress tool with --f86 option that enables\r
 @REM converter for x86 code.\r
 @REM\r
-@REM Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>\r
+@REM Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
 @REM This program and the accompanying materials\r
 @REM are licensed and made available under the terms and conditions of the BSD License\r
 @REM which accompanies this distribution.  The full text of the license may be found at\r
index 816d4fa54ff79b1ee056dd54632d39355b8530e4..d267b791227a4e5f3e1d7ffd343bd3c6ba2b0864 100644 (file)
@@ -1,7 +1,7 @@
 @REM ## @file\r
 @REM # Makefile\r
 @REM #\r
-@REM # Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+@REM # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 @REM # This program and the accompanying materials\r
 @REM # are licensed and made available under the terms and conditions of the BSD License\r
 @REM # which accompanies this distribution.    The full text of the license may be found at\r
@@ -9,7 +9,7 @@
 @REM #\r
 @REM # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 @REM # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-@REM # \r
+@REM #\r
 \r
 @echo off\r
 setlocal\r
index eb4aa2583acd38c46c3a6c1568cdcee3c52528e5..9a9cefea45eb200e732a83002cfe31531180a0a0 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
 Efi Compressor\r
 \r
-Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available \r
-under the terms and conditions of the BSD License which accompanies this \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available\r
+under the terms and conditions of the BSD License which accompanies this\r
 distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
index 6b3fcaff58e5a7d4336b094b387ca5a6487b7114..d14b87228d85310d2e0d2d7e0a78c74a07106d67 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
 Python Utility\r
 \r
-Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available \r
-under the terms and conditions of the BSD License which accompanies this \r
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available\r
+under the terms and conditions of the BSD License which accompanies this\r
 distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
@@ -75,9 +75,9 @@ SaveFileToDisk (
     goto Done;\r
   }\r
 \r
-  // \r
+  //\r
   // Flush buffer may slow down the whole build performance (average 10s slower)\r
-  // \r
+  //\r
   //if (!FlushFileBuffers(FileHandle)) {\r
   //  PyErr_SetString(PyExc_Exception, "File flush failure");\r
   //  goto Done;\r
index 046fb36a178d44a49bb5a30effda492b2230ae43..9a548fae1e13eaacdad99f97c0de43a844976564 100644 (file)
@@ -1,18 +1,18 @@
 /** @file\r
-Compression routine. The compression algorithm is a mixture of LZ77 and Huffman \r
-coding. LZ77 transforms the source data into a sequence of Original Characters \r
+Compression routine. The compression algorithm is a mixture of LZ77 and Huffman\r
+coding. LZ77 transforms the source data into a sequence of Original Characters\r
 and Pointers to repeated strings.\r
-This sequence is further divided into Blocks and Huffman codings are applied to \r
+This sequence is further divided into Blocks and Huffman codings are applied to\r
 each Block.\r
-  \r
-Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -100,7 +100,7 @@ Arguments:
   SrcBuffer   - The buffer storing the source data\r
   SrcSize     - The size of source data\r
   DstBuffer   - The buffer to store the compressed data\r
-  \r
+\r
   Version     - The version of de/compression algorithm.\r
                 Version 1 for EFI 1.1 de/compression algorithm.\r
                 Version 2 for Tiano de/compression algorithm.\r
@@ -135,12 +135,12 @@ Returns:
   mSrcUpperLimit  = mSrc + SrcSize;\r
   mDst            = DstBuffer;\r
   mDstUpperLimit  = mDst +*DstSize;\r
-    \r
+\r
   PutDword (0L);\r
   PutDword (0L);\r
-  \r
+\r
   MakeCrcTable ();\r
-  \r
+\r
   mOrigSize             = mCompSize = 0;\r
   mCrc                  = INIT_CRC;\r
 \r
@@ -151,7 +151,7 @@ Returns:
   if (EFI_ERROR (Status)) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   //\r
   // Null terminate the compressed data\r
   //\r
@@ -163,8 +163,8 @@ Returns:
   //\r
   // Fill in compressed size and original size\r
   //\r
-  mDst = DstBuffer; \r
\r
+  mDst = DstBuffer;\r
+\r
   PutDword (mCompSize + 1);\r
   PutDword (mOrigSize);\r
   //\r
@@ -172,10 +172,10 @@ Returns:
   //\r
 \r
   if (mCompSize + 1 + 8 > *DstSize) {\r
-    *DstSize = mCompSize + 1 + 8;    \r
+    *DstSize = mCompSize + 1 + 8;\r
     return EFI_BUFFER_TOO_SMALL;\r
   } else {\r
-    *DstSize = mCompSize + 1 + 8;   \r
+    *DstSize = mCompSize + 1 + 8;\r
     return EFI_SUCCESS;\r
   }\r
 }\r
@@ -190,13 +190,13 @@ PutDword (
 Routine Description:\r
 \r
   Put a dword to output stream\r
-  \r
+\r
 Arguments:\r
 \r
   Data    - the dword to put\r
-  \r
+\r
 Returns: (VOID)\r
-  \r
+\r
 --*/\r
 {\r
   if (mDst < mDstUpperLimit) {\r
@@ -226,8 +226,8 @@ AllocateMemory (
 Routine Description:\r
 \r
   Allocate memory spaces for data structures used in compression process\r
-  \r
-Argements: \r
+\r
+Argements:\r
   VOID\r
 \r
 Returns:\r
@@ -285,7 +285,7 @@ FreeMemory (
 Routine Description:\r
 \r
   Called when compression is completed to free memory previously allocated.\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -337,7 +337,7 @@ InitSlide (
 Routine Description:\r
 \r
   Initialize String Info Log data structures\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -377,16 +377,16 @@ Child (
 Routine Description:\r
 \r
   Find child node given the parent node and the edge character\r
-  \r
+\r
 Arguments:\r
 \r
   NodeQ       - the parent node\r
   CharC       - the edge character\r
-  \r
+\r
 Returns:\r
 \r
-  The child node (NIL if not found)  \r
-  \r
+  The child node (NIL if not found)\r
+\r
 --*/\r
 {\r
   NODE  NodeR;\r
@@ -415,13 +415,13 @@ MakeChild (
 Routine Description:\r
 \r
   Create a new child for a given parent node.\r
-  \r
+\r
 Arguments:\r
 \r
   Parent       - the parent node\r
   CharC   - the edge character\r
   Child       - the child node\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -449,11 +449,11 @@ Split (
 Routine Description:\r
 \r
   Split a node.\r
-  \r
+\r
 Arguments:\r
 \r
   Old     - the node to split\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -487,7 +487,7 @@ InsertNode (
 Routine Description:\r
 \r
   Insert string info for current position into the String Info Log\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -620,7 +620,7 @@ Routine Description:
 \r
   Delete outdated string info. (The Usage of PERC_FLAG\r
   ensures a clean deletion)\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -751,7 +751,7 @@ Routine Description:
 Arguments: (VOID)\r
 \r
 Returns:\r
-  \r
+\r
   EFI_SUCCESS           - The compression is successful\r
   EFI_OUT_0F_RESOURCES  - Not enough memory for compression process\r
 \r
@@ -837,7 +837,7 @@ CountTFreq (
 Routine Description:\r
 \r
   Count the frequencies for the Extra Set\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -896,13 +896,13 @@ WritePTLen (
 Routine Description:\r
 \r
   Outputs the code length array for the Extra Set or the Position Set.\r
-  \r
+\r
 Arguments:\r
 \r
   Number       - the number of symbols\r
   nbit    - the number of bits needed to represent 'n'\r
   Special - the special symbol that needs to be take care of\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -944,7 +944,7 @@ WriteCLen (
 Routine Description:\r
 \r
   Outputs the code length array for Char&Length Set\r
-  \r
+\r
 Arguments: (VOID)\r
 \r
 Returns: (VOID)\r
@@ -1034,11 +1034,11 @@ SendBlock (
 Routine Description:\r
 \r
   Huffman code the block and output it.\r
-  \r
-Arguments: \r
+\r
+Arguments:\r
   (VOID)\r
 \r
-Returns: \r
+Returns:\r
   (VOID)\r
 \r
 --*/\r
@@ -1246,7 +1246,7 @@ Routine Description:
 Arguments:\r
 \r
   Number   - the rightmost n bits of the data is used\r
-  x   - the data \r
+  x   - the data\r
 \r
 Returns: (VOID)\r
 \r
@@ -1283,7 +1283,7 @@ FreadCrc (
 Routine Description:\r
 \r
   Read in source data\r
-  \r
+\r
 Arguments:\r
 \r
   Pointer   - the buffer to hold the data\r
@@ -1292,7 +1292,7 @@ Arguments:
 Returns:\r
 \r
   number of bytes actually read\r
-  \r
+\r
 --*/\r
 {\r
   INT32 Index;\r
@@ -1335,11 +1335,11 @@ CountLen (
 Routine Description:\r
 \r
   Count the number of each code length for a Huffman tree.\r
-  \r
+\r
 Arguments:\r
 \r
   Index   - the top node\r
-  \r
+\r
 Returns: (VOID)\r
 \r
 --*/\r
@@ -1366,11 +1366,11 @@ MakeLen (
 Routine Description:\r
 \r
   Create code length array for a Huffman tree\r
-  \r
+\r
 Arguments:\r
 \r
   Root   - the root of the tree\r
-  \r
+\r
 Returns:\r
 \r
   VOID\r
@@ -1462,7 +1462,7 @@ MakeCode (
 Routine Description:\r
 \r
   Assign code to each symbol based on the code length array\r
-  \r
+\r
 Arguments:\r
 \r
   Number     - number of symbols\r
@@ -1499,18 +1499,18 @@ MakeTree (
 Routine Description:\r
 \r
   Generates Huffman codes given a frequency distribution of symbols\r
-  \r
+\r
 Arguments:\r
 \r
   NParm    - number of symbols\r
   FreqParm - frequency of each symbol\r
   LenParm  - code length for each symbol\r
   CodeParm - code for each symbol\r
-  \r
+\r
 Returns:\r
 \r
   Root of the Huffman tree.\r
-  \r
+\r
 --*/\r
 {\r
   INT32 Index;\r
@@ -1586,22 +1586,22 @@ GetFileContents (
   OUT UINT32  *BufferLength\r
   )\r
 /*++\r
-        \r
+\r
 Routine Description:\r
-           \r
+\r
   Get the contents of file specified in InputFileName\r
   into FileBuffer.\r
-            \r
+\r
 Arguments:\r
-               \r
+\r
   InputFileName  - Name of the input file.\r
-                \r
+\r
   FileBuffer     - Output buffer to contain data\r
 \r
-  BufferLength   - Actual length of the data \r
+  BufferLength   - Actual length of the data\r
 \r
 Returns:\r
-                       \r
+\r
   EFI_SUCCESS on successful return\r
   EFI_ABORTED if unable to open input file.\r
 \r
@@ -1620,13 +1620,13 @@ Returns:
       Error (NULL, 0, 0001, "Error opening file: %s", InputFileName);\r
       return EFI_ABORTED;\r
     }\r
-  \r
+\r
   fseek (InputFile, 0, SEEK_END);\r
   FileSize = ftell (InputFile);\r
   fseek (InputFile, 0, SEEK_SET);\r
     //\r
     // Now read the contents of the file into the buffer\r
-    // \r
+    //\r
     if (FileSize > 0 && FileBuffer != NULL) {\r
       if (fread (FileBuffer, FileSize, 1, InputFile) != 1) {\r
         Error (NULL, 0, 0004, "Error reading contents of input file: %s", InputFileName);\r
@@ -1638,7 +1638,7 @@ Returns:
   fclose (InputFile);\r
   Size += (UINTN) FileSize;\r
   *BufferLength = Size;\r
-  \r
+\r
   if (FileBuffer != NULL) {\r
     return EFI_SUCCESS;\r
   } else {\r
@@ -1693,11 +1693,11 @@ Returns:
   // Summary usage\r
   //\r
   fprintf (stdout, "Usage: %s -e|-d [options] <input_file>\n\n", UTILITY_NAME);\r
-  \r
+\r
   //\r
   // Copyright declaration\r
-  // \r
-  fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");\r
+  //\r
+  fprintf (stdout, "Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.\n\n");\r
 \r
   //\r
   // Details Option\r
@@ -1739,7 +1739,7 @@ Returns:
   EFI_ABORTED    Could not generate the section\r
   EFI_OUT_OF_RESOURCES  No resource to complete the operation.\r
 \r
---*/  \r
+--*/\r
 {\r
   FILE       *OutputFile;\r
   char       *OutputFileName;\r
@@ -1755,7 +1755,7 @@ Returns:
   UINT32     OrigSize;\r
 \r
   SetUtilityName(UTILITY_NAME);\r
-  \r
+\r
   FileBuffer = NULL;\r
   Src = NULL;\r
   OutBuffer = NULL;\r
@@ -1778,12 +1778,12 @@ Returns:
     Usage();\r
     return 0;\r
   }\r
-  \r
+\r
   if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0)) {\r
     Usage();\r
     return 0;\r
   }\r
-  \r
+\r
   if ((strcmp(argv[1], "--version") == 0)) {\r
     Version();\r
     return 0;\r
@@ -1854,7 +1854,7 @@ Returns:
       OutputFileName = argv[1];\r
       argc -=2;\r
       argv +=2;\r
-      continue; \r
+      continue;\r
     }\r
 \r
     if (argv[0][0]!='-') {\r
@@ -1865,7 +1865,7 @@ Returns:
     }\r
 \r
     Error (NULL, 0, 1000, "Unknown option", argv[0]);\r
-    goto ERROR;     \r
+    goto ERROR;\r
   }\r
 \r
   if (InputFileName == NULL) {\r
@@ -1883,7 +1883,7 @@ Returns:
   } else if (DebugMode) {\r
     SetPrintLevel(DebugLevel);\r
   }\r
-  \r
+\r
   if (VerboseMode) {\r
     VerboseMsg("%s tool start.\n", UTILITY_NAME);\r
    }\r
@@ -1892,13 +1892,13 @@ Returns:
     Error (NULL, 0, 4001, "Resource:", "Memory cannot be allocated!");\r
     goto ERROR;\r
   }\r
-    \r
+\r
   InputFile = fopen (LongFilePath (InputFileName), "rb");\r
   if (InputFile == NULL) {\r
     Error (NULL, 0, 0001, "Error opening input file", InputFileName);\r
     goto ERROR;\r
   }\r
-        \r
+\r
   Status = GetFileContents(\r
             InputFileName,\r
             FileBuffer,\r
@@ -1931,7 +1931,7 @@ Returns:
     Error (NULL, 0, 0001, "Error opening output file for writing", OutputFileName);\r
     goto ERROR;\r
   }\r
-    \r
+\r
   if (ENCODE) {\r
   //\r
   // First call TianoCompress to get DstSize\r
@@ -1940,7 +1940,7 @@ Returns:
     DebugMsg(UTILITY_NAME, 0, DebugLevel, "Encoding", NULL);\r
   }\r
   Status = TianoCompress ((UINT8 *)FileBuffer, InputLength, OutBuffer, &DstSize);\r
-  \r
+\r
   if (Status == EFI_BUFFER_TOO_SMALL) {\r
     OutBuffer = (UINT8 *) malloc (DstSize);\r
     if (OutBuffer == NULL) {\r
@@ -1973,7 +1973,7 @@ Returns:
   if (VerboseMode) {\r
     VerboseMsg("Encoding successful\n");\r
   }\r
-  return 0;  \r
+  return 0;\r
   }\r
   else if (DECODE) {\r
   if (DebugMode) {\r
@@ -1981,10 +1981,10 @@ Returns:
   }\r
   //\r
   // Get Compressed file original size\r
-  // \r
-  Src     = (UINT8 *)FileBuffer;                     \r
-  OrigSize  = Src[4] + (Src[5] << 8) + (Src[6] << 16) + (Src[7] << 24);  \r
-  \r
+  //\r
+  Src     = (UINT8 *)FileBuffer;\r
+  OrigSize  = Src[4] + (Src[5] << 8) + (Src[6] << 16) + (Src[7] << 24);\r
+\r
   //\r
   // Allocate OutputBuffer\r
   //\r
@@ -1992,11 +1992,11 @@ Returns:
   if (OutBuffer == NULL) {\r
     Error (NULL, 0, 4001, "Resource:", "Memory cannot be allocated!");\r
     goto ERROR;\r
-   }  \r
+   }\r
 \r
   Status = Decompress((VOID *)FileBuffer, (VOID *)OutBuffer, (VOID *)Scratch, 2);\r
   if (Status != EFI_SUCCESS) {\r
-   goto ERROR;         \r
+   goto ERROR;\r
   }\r
 \r
   fwrite(OutBuffer, (size_t)(Scratch->mOrigSize), 1, OutputFile);\r
@@ -2009,13 +2009,13 @@ Returns:
   if (DebugMode) {\r
     DebugMsg(UTILITY_NAME, 0, DebugLevel, "Encoding successful!\n", NULL);\r
   }\r
-  \r
+\r
   if (VerboseMode) {\r
     VerboseMsg("Decoding successful\n");\r
   }\r
   return 0;\r
   }\r
-  \r
+\r
 ERROR:\r
   if (DebugMode) {\r
     if (ENCODE) {\r
@@ -2039,7 +2039,7 @@ ERROR:
   if (OutBuffer != NULL) {\r
     free(OutBuffer);\r
   }\r
-    \r
+\r
   if (VerboseMode) {\r
     VerboseMsg("%s tool done with return code is 0x%x.\n", UTILITY_NAME, GetUtilityStatus ());\r
   }\r
@@ -2104,8 +2104,8 @@ GetBits (
 \r
 Routine Description:\r
 \r
-  Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent \r
-  NumOfBits of bits from source. Returns NumOfBits of bits that are \r
+  Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent\r
+  NumOfBits of bits from source. Returns NumOfBits of bits that are\r
   popped out.\r
 \r
 Arguments:\r
@@ -2149,9 +2149,9 @@ Arguments:
   BitLen    - Code length array\r
   TableBits - The width of the mapping table\r
   Table     - The table\r
-  \r
+\r
 Returns:\r
-  \r
+\r
   0         - OK.\r
   BAD_TABLE - The table is corrupted.\r
 \r
@@ -2341,7 +2341,7 @@ Arguments:
   Sd        - The global scratch data\r
   nn        - Number of symbols\r
   nbit      - Number of bits needed to represent nn\r
-  Special   - The special symbol that needs to be taken care of \r
+  Special   - The special symbol that needs to be taken care of\r
 \r
 Returns:\r
 \r
@@ -2673,14 +2673,14 @@ Returns:
   assert(Source);\r
 //  assert(Destination);\r
   assert(Scratch);\r
-  \r
+\r
   Src     = (UINT8 *)Source;\r
   Dst     = (UINT8 *)Destination;\r
 \r
   Sd      = (SCRATCH_DATA *) Scratch;\r
   CompSize  = Src[0] + (Src[1] << 8) + (Src[2] << 16) + (Src[3] << 24);\r
   OrigSize  = Src[4] + (Src[5] << 8) + (Src[6] << 16) + (Src[7] << 24);\r
-  \r
+\r
   //\r
   // If compressed file size is 0, return\r
   //\r
@@ -2721,9 +2721,9 @@ Returns:
   //\r
   // Decompress it\r
   //\r
-  \r
+\r
   Decode (Sd);\r
-  \r
+\r
   if (Sd->mBadTableFlag != 0) {\r
     //\r
     // Something wrong with the source\r
index 2971225d1b582231896e24d3d3ba6e15960f49af..d75c00d26fd92bd39c2479c2cf460f79974e4dbc 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Internal include file for Tiano Decompress Library.\r
 \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -95,7 +95,7 @@ GetFileContents (
   OUT UINT8   *FileBuffer,\r
   OUT UINT32  *BufferLength\r
   );\r
-  \r
+\r
 STATIC\r
 VOID\r
 PutDword(\r
@@ -228,7 +228,7 @@ MakeCrcTable (
   VOID\r
   );\r
 \r
-  \r
+\r
 STATIC\r
 VOID\r
 PutBits (\r
@@ -283,7 +283,7 @@ MakeTree (
   OUT UINT8   LenParm[ ],\r
   OUT UINT16  CodeParm[]\r
   );\r
-  \r
+\r
 /**\r
   Read NumOfBit of bits from source into mBitBuf\r
 \r
@@ -302,8 +302,8 @@ FillBuf (
 /**\r
   Get NumOfBits of bits out from mBitBuf\r
 \r
-  Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent \r
-  NumOfBits of bits from source. Returns NumOfBits of bits that are \r
+  Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent\r
+  NumOfBits of bits from source. Returns NumOfBits of bits that are\r
   popped out.\r
 \r
   @param  Sd        The global scratch data.\r
@@ -321,7 +321,7 @@ GetBits (
 /**\r
   Creates Huffman Code mapping table according to code length array.\r
 \r
-  Creates Huffman Code mapping table for Extra Set, Char&Len Set \r
+  Creates Huffman Code mapping table for Extra Set, Char&Len Set\r
   and Position Set according to code length array.\r
 \r
   @param  Sd        The global scratch data\r
@@ -347,7 +347,7 @@ MakeTable (
   Decodes a position value.\r
 \r
   Get a position value according to Position Huffman Table.\r
-  \r
+\r
   @param  Sd the global scratch data\r
 \r
   @return The position value decoded.\r
@@ -383,7 +383,7 @@ ReadPTLen (
 \r
 /**\r
   Reads code lengths for Char&Len Set.\r
-  \r
+\r
   Read in and decode the Char&Len Set Code Length Array, then\r
   generate the Huffman Code mapping table for the Char&Len Set.\r
 \r
@@ -397,7 +397,7 @@ ReadCLen (
 \r
 /**\r
   Decode a character/length value.\r
-  \r
+\r
   Read one value from mBitBuf, Get one code from mBitBuf. If it is at block boundary, generates\r
   Huffman code mapping table for Extra Set, Code&Len Set and\r
   Position Set.\r
@@ -416,7 +416,7 @@ DecodeC (
   Decode the source data and put the resulting data into the destination buffer.\r
 \r
   Decode the source data and put the resulting data into the destination buffer.\r
-  \r
+\r
   @param  Sd The global scratch data\r
 \r
 **/\r
index 10d12578d308ea089c3e92d425e21b9a94a9cf7d..427f1e7806a4ed2ba0b0f4614b810ca0d97fec5e 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
 Defines and prototypes for the UEFI VFR compiler internal use.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
 **/\r
 \r
 #ifndef _EFIVFR_H_\r
index 84c0e59b76f2c47af519066d8cbb000e0d568966..0e9c2df48d93b1ef09b8fa7caaf2ba3bb7e65350 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
-  \r
+\r
   VfrCompiler main class and main function.\r
 \r
 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -24,7 +24,7 @@ PACKAGE_DATA  gCBuffer;
 PACKAGE_DATA  gRBuffer;\r
 CVfrStringDB  gCVfrStringDB;\r
 \r
-VOID \r
+VOID\r
 CVfrCompiler::DebugError (\r
   IN CHAR8         *FileName,\r
   IN UINT32        LineNumber,\r
@@ -32,7 +32,7 @@ CVfrCompiler::DebugError (
   IN CONST CHAR8   *Text,\r
   IN CONST CHAR8   *MsgFmt,\r
   ...\r
-  ) \r
+  )\r
 {\r
   va_list List;\r
   va_start (List, MsgFmt);\r
@@ -58,7 +58,7 @@ CVfrCompiler::IS_RUN_STATUS (
 \r
 VOID\r
 CVfrCompiler::OptionInitialization (\r
-  IN INT32      Argc, \r
+  IN INT32      Argc,\r
   IN CHAR8      **Argv\r
   )\r
 {\r
@@ -86,7 +86,7 @@ CVfrCompiler::OptionInitialization (
   mOptions.AutoDefault                   = FALSE;\r
   mOptions.CheckDefault                  = FALSE;\r
   memset (&mOptions.OverrideClassGuid, 0, sizeof (EFI_GUID));\r
-  \r
+\r
   if (Argc == 1) {\r
     Usage ();\r
     SET_RUN_STATUS (STATUS_DEAD);\r
@@ -108,7 +108,7 @@ CVfrCompiler::OptionInitialization (
     } else if (stricmp(Argv[Index], "-i") == 0) {\r
       Index++;\r
       if ((Index >= Argc) || (Argv[Index][0] == '-')) {\r
-        DebugError (NULL, 0, 1001, "Missing option", "-i missing path argument"); \r
+        DebugError (NULL, 0, 1001, "Missing option", "-i missing path argument");\r
         goto Fail;\r
       }\r
 \r
@@ -126,7 +126,7 @@ CVfrCompiler::OptionInitialization (
         goto Fail;\r
       }\r
       strcpy (mOptions.OutputDirectory, Argv[Index]);\r
-      \r
+\r
       CHAR8 lastChar = mOptions.OutputDirectory[strlen(mOptions.OutputDirectory) - 1];\r
       if ((lastChar != '/') && (lastChar != '\\')) {\r
         if (strchr(mOptions.OutputDirectory, '/') != NULL) {\r
@@ -253,7 +253,7 @@ Fail:
   if (mOptions.IncludePaths != NULL) {\r
     delete mOptions.IncludePaths;\r
     mOptions.IncludePaths                = NULL;\r
-  } \r
+  }\r
   if (mOptions.CPreprocessorOptions != NULL) {\r
     delete mOptions.CPreprocessorOptions;\r
     mOptions.CPreprocessorOptions        = NULL;\r
@@ -473,7 +473,7 @@ CVfrCompiler::SetRecordListFileName (
 }\r
 \r
 CVfrCompiler::CVfrCompiler (\r
-  IN INT32      Argc, \r
+  IN INT32      Argc,\r
   IN CHAR8      **Argv\r
   )\r
 {\r
@@ -543,14 +543,14 @@ CVfrCompiler::~CVfrCompiler (
   SET_RUN_STATUS(STATUS_DEAD);\r
 }\r
 \r
-VOID \r
+VOID\r
 CVfrCompiler::Usage (\r
   VOID\r
   )\r
 {\r
   UINT32 Index;\r
   CONST  CHAR8 *Help[] = {\r
-    " ", \r
+    " ",\r
     "VfrCompile version " VFR_COMPILER_VERSION "Build " __BUILD_VERSION,\r
     "Copyright (c) 2004-2016 Intel Corporation. All rights reserved.",\r
     " ",\r
@@ -585,7 +585,7 @@ CVfrCompiler::Usage (
   }\r
 }\r
 \r
-VOID \r
+VOID\r
 CVfrCompiler::Version (\r
   VOID\r
   )\r
@@ -623,8 +623,8 @@ CVfrCompiler::PreProcess (
   }\r
   fclose (pVfrFile);\r
 \r
-  CmdLen = strlen (mPreProcessCmd) + strlen (mPreProcessOpt) + \r
-              strlen (mOptions.VfrFileName) + strlen (mOptions.PreprocessorOutputFileName);\r
+  CmdLen = strlen (mPreProcessCmd) + strlen (mPreProcessOpt) +\r
+           strlen (mOptions.VfrFileName) + strlen (mOptions.PreprocessorOutputFileName);\r
   if (mOptions.CPreprocessorOptions != NULL) {\r
     CmdLen += strlen (mOptions.CPreprocessorOptions);\r
   }\r
@@ -756,7 +756,7 @@ CVfrCompiler::AdjustBin (
   // Get Package Data and IfrRecord Data\r
   //\r
   gCFormPkg.BuildPkg (gCBuffer);\r
-  gCIfrRecordInfoDB.IfrRecordOutput (gRBuffer); \r
+  gCIfrRecordInfoDB.IfrRecordOutput (gRBuffer);\r
 \r
   //\r
   // Compare Form and Record data\r
@@ -799,7 +799,7 @@ CVfrCompiler::AdjustBin (
     //\r
     // Re get the IfrRecord Buffer.\r
     //\r
-    gCIfrRecordInfoDB.IfrRecordOutput (gRBuffer); \r
+    gCIfrRecordInfoDB.IfrRecordOutput (gRBuffer);\r
   }\r
 \r
   return;\r
@@ -858,7 +858,7 @@ CVfrCompiler::GenCFile (
   if (!IS_RUN_STATUS(STATUS_GENBINARY)) {\r
     goto Fail;\r
   }\r
-  \r
+\r
   if (!mOptions.CreateIfrPkgFile || mOptions.CompatibleMode) {\r
     if ((pFile = fopen (LongFilePath (mOptions.COutputFileName), "w")) == NULL) {\r
       DebugError (NULL, 0, 0001, "Error opening output C file", "%s", mOptions.COutputFileName);\r
@@ -869,7 +869,7 @@ CVfrCompiler::GenCFile (
       fprintf (pFile, "%s\n", gSourceFileHeader[Index]);\r
     }\r
 \r
-    if (mOptions.CompatibleMode) { \r
+    if (mOptions.CompatibleMode) {\r
       gCVfrBufferConfig.OutputCFile (pFile, mOptions.VfrBaseFileName);\r
     }\r
 \r
@@ -926,7 +926,7 @@ CVfrCompiler::GenRecordListFile (
         gCIfrRecordInfoDB.IfrRecordOutput (pOutFile, LineNo);\r
       }\r
     }\r
-    \r
+\r
     fprintf (pOutFile, "\n//\n// All Opcode Record List \n//\n");\r
     gCIfrRecordInfoDB.IfrRecordOutput (pOutFile, 0);\r
     gCVfrVarDataTypeDB.Dump(pOutFile);\r
@@ -943,7 +943,7 @@ Err1:
 \r
 int\r
 main (\r
-  IN int             Argc, \r
+  IN int             Argc,\r
   IN char            **Argv\r
   )\r
 {\r
@@ -951,7 +951,7 @@ main (
 \r
   SetPrintLevel(WARNING_LOG_LEVEL);\r
   CVfrCompiler         Compiler(Argc, Argv);\r
-  \r
+\r
   Compiler.PreProcess();\r
   Compiler.Compile();\r
   Compiler.AdjustBin();\r
@@ -967,7 +967,7 @@ main (
   if (gCBuffer.Buffer != NULL) {\r
     delete[] gCBuffer.Buffer;\r
   }\r
-  \r
+\r
   if (gRBuffer.Buffer != NULL) {\r
     delete[] gRBuffer.Buffer;\r
   }\r
index b8f39dfa6ca7b500972af60c4f98c063239cb3bc..35339d01c5e2bc885d865c66d5b5908c52f49909 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
-  \r
+\r
   VfrCompiler internal defintions.\r
 \r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index 14771a20449aaec5b655e5ce7a116936b0ff349a..bbf738c21766bbfa397605c64aee9130fa5cddcf 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
-  \r
+\r
   VfrCompiler error handler.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -112,7 +112,7 @@ CVfrErrorHandle::SetInputFile (
 }\r
 \r
 SVfrFileScopeRecord::SVfrFileScopeRecord (\r
-  IN CHAR8    *Record, \r
+  IN CHAR8    *Record,\r
   IN UINT32   LineNum\r
   )\r
 {\r
@@ -153,7 +153,7 @@ SVfrFileScopeRecord::~SVfrFileScopeRecord (
 \r
 VOID\r
 CVfrErrorHandle::ParseFileScopeRecord (\r
-  IN CHAR8     *Record, \r
+  IN CHAR8     *Record,\r
   IN UINT32    WholeScopeLine\r
   )\r
 {\r
@@ -222,7 +222,7 @@ CVfrErrorHandle::PrintMsg (
 {\r
   CHAR8                  *FileName = NULL;\r
   UINT32                 FileLine;\r
-  \r
+\r
   if (strncmp ("Warning", MsgType, strlen ("Warning")) == 0) {\r
     VerboseMsg ((CHAR8 *) ErrorMsg);\r
     return;\r
index 8bae04953191e616137dc0137c59667f00449f6c..e83ae900fab75439f1103aeb4a714740b45b21cb 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
-  \r
+\r
   VfrCompiler Error definition\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
index b40bcdf21fd08231c04fa513ed49c89b9eecc2bd..2944ffc76b9c30b13b277bd5d4dbfff71c4dbc72 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
-  \r
+\r
   The definition of CFormPkg's member function\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -22,9 +22,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  */\r
 \r
 SPendingAssign::SPendingAssign (\r
-  IN CHAR8  *Key, \r
-  IN VOID   *Addr, \r
-  IN UINT32 Len, \r
+  IN CHAR8  *Key,\r
+  IN VOID   *Addr,\r
+  IN UINT32 Len,\r
   IN UINT32 LineNo,\r
   IN CONST CHAR8  *Msg\r
   )\r
@@ -69,7 +69,7 @@ SPendingAssign::~SPendingAssign (
 \r
 VOID\r
 SPendingAssign::SetAddrAndLen (\r
-  IN VOID   *Addr, \r
+  IN VOID   *Addr,\r
   IN UINT32 LineNo\r
   )\r
 {\r
@@ -79,7 +79,7 @@ SPendingAssign::SetAddrAndLen (
 \r
 VOID\r
 SPendingAssign::AssignValue (\r
-  IN VOID   *Addr, \r
+  IN VOID   *Addr,\r
   IN UINT32 Len\r
   )\r
 {\r
@@ -255,7 +255,7 @@ CFormPkg::Close (
 \r
 UINT32\r
 CFormPkg::Read (\r
-  IN CHAR8     *Buffer, \r
+  IN CHAR8     *Buffer,\r
   IN UINT32    Size\r
   )\r
 {\r
@@ -309,7 +309,7 @@ CFormPkg::BuildPkg (
   OUT PACKAGE_DATA &TBuffer\r
   )\r
 {\r
-  \r
+\r
   CHAR8  *Temp;\r
   UINT32 Size;\r
   CHAR8  Buffer[1024];\r
@@ -357,7 +357,7 @@ CFormPkg::BuildPkg (
   }\r
   fwrite (PkgHdr, sizeof (EFI_HII_PACKAGE_HEADER), 1, Output);\r
   delete PkgHdr;\r
-  \r
+\r
   if (PkgData == NULL) {\r
     Open ();\r
     while ((Size = Read (Buffer, 1024)) != 0) {\r
@@ -427,7 +427,7 @@ UINT32   gAdjustOpcodeOffset = 0;
 BOOLEAN  gNeedAdjustOpcode   = FALSE;\r
 UINT32   gAdjustOpcodeLen    = 0;\r
 \r
-EFI_VFR_RETURN_CODE \r
+EFI_VFR_RETURN_CODE\r
 CFormPkg::GenCFile (\r
   IN CHAR8 *BaseName,\r
   IN FILE *pFile,\r
@@ -454,24 +454,24 @@ CFormPkg::GenCFile (
   // For framework vfr file, the extension framework header will be added.\r
   //\r
   if (VfrCompatibleMode) {\r
-         fprintf (pFile, "  // FRAMEWORK PACKAGE HEADER Length\n");\r
-         PkgLength = PkgHdr->Length + sizeof (UINT32) + 2;\r
-         _WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, "  ", (CHAR8 *)&PkgLength, sizeof (UINT32));   \r
-         fprintf (pFile, "\n\n  // FRAMEWORK PACKAGE HEADER Type\n");\r
-         PkgLength = 3;\r
-         _WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, "  ", (CHAR8 *)&PkgLength, sizeof (UINT16));   \r
-       } else {\r
-         fprintf (pFile, "  // ARRAY LENGTH\n");\r
-         PkgLength = PkgHdr->Length + sizeof (UINT32);\r
-         _WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, "  ", (CHAR8 *)&PkgLength, sizeof (UINT32));   \r
-       }\r
+    fprintf (pFile, "  // FRAMEWORK PACKAGE HEADER Length\n");\r
+    PkgLength = PkgHdr->Length + sizeof (UINT32) + 2;\r
+    _WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, "  ", (CHAR8 *)&PkgLength, sizeof (UINT32));\r
+    fprintf (pFile, "\n\n  // FRAMEWORK PACKAGE HEADER Type\n");\r
+    PkgLength = 3;\r
+    _WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, "  ", (CHAR8 *)&PkgLength, sizeof (UINT16));\r
+  } else {\r
+    fprintf (pFile, "  // ARRAY LENGTH\n");\r
+    PkgLength = PkgHdr->Length + sizeof (UINT32);\r
+    _WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, "  ", (CHAR8 *)&PkgLength, sizeof (UINT32));\r
+  }\r
 \r
   fprintf (pFile, "\n\n  // PACKAGE HEADER\n");\r
   _WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, "  ", (CHAR8 *)PkgHdr, sizeof (EFI_HII_PACKAGE_HEADER));\r
   PkgLength = sizeof (EFI_HII_PACKAGE_HEADER);\r
 \r
   fprintf (pFile, "\n\n  // PACKAGE DATA\n");\r
-  \r
+\r
   if (PkgData == NULL) {\r
     Open ();\r
     while ((ReadSize = Read ((CHAR8 *)Buffer, BYTES_PRE_LINE * 8)) != 0) {\r
@@ -503,8 +503,8 @@ CFormPkg::GenCFile (
 \r
 EFI_VFR_RETURN_CODE\r
 CFormPkg::AssignPending (\r
-  IN CHAR8  *Key, \r
-  IN VOID   *ValAddr, \r
+  IN CHAR8  *Key,\r
+  IN VOID   *ValAddr,\r
   IN UINT32 ValLen,\r
   IN UINT32 LineNo,\r
   IN CONST CHAR8  *Msg\r
@@ -524,8 +524,8 @@ CFormPkg::AssignPending (
 \r
 VOID\r
 CFormPkg::DoPendingAssign (\r
-  IN CHAR8  *Key, \r
-  IN VOID   *ValAddr, \r
+  IN CHAR8  *Key,\r
+  IN VOID   *ValAddr,\r
   IN UINT32 ValLen\r
   )\r
 {\r
@@ -845,14 +845,14 @@ CFormPkg::DeclarePendingQuestion (
   CIfrDisableIf DIObj;\r
   DIObj.SetLineNo (LineNo);\r
   *InsertOpcodeAddr = DIObj.GetObjBinAddr<CHAR8>();\r
-  \r
+\r
   //TrueOpcode\r
   CIfrTrue TObj (LineNo);\r
 \r
   // Declare Numeric qeustion for each undefined question.\r
   for (pNode = PendingAssignList; pNode != NULL; pNode = pNode->mNext) {\r
     if (pNode->mFlag == PENDING) {\r
-      EFI_VARSTORE_INFO Info; \r
+      EFI_VARSTORE_INFO Info;\r
       EFI_QUESTION_ID   QId   = EFI_QUESTION_ID_INVALID;\r
       //\r
       // Register this question, assume it is normal question, not date or time question\r
@@ -863,7 +863,7 @@ CFormPkg::DeclarePendingQuestion (
         gCVfrErrorHandle.HandleError (ReturnCode, pNode->mLineNo, pNode->mKey);\r
         return ReturnCode;\r
       }\r
\r
+\r
 #ifdef VFREXP_DEBUG\r
       printf ("Undefined Question name is %s and Id is 0x%x\n", VarStr, QId);\r
 #endif\r
@@ -883,7 +883,7 @@ CFormPkg::DeclarePendingQuestion (
         gCVfrErrorHandle.PrintMsg (pNode->mLineNo, FName, "Error", "Var Store Type is not defined");\r
         return ReturnCode;\r
       }\r
-      VarStoreType = lCVfrDataStorage.GetVarStoreType (Info.mVarStoreId); \r
+      VarStoreType = lCVfrDataStorage.GetVarStoreType (Info.mVarStoreId);\r
 \r
       if (*VarStr == '\0' && ArrayIdx != INVALID_ARRAY_INDEX) {\r
         ReturnCode = lCVfrDataStorage.GetNameVarStoreInfo (&Info, ArrayIdx);\r
@@ -1149,7 +1149,7 @@ CIfrRecordInfoDB::IfrRecordOutput (
   )\r
 {\r
   CHAR8      *Temp;\r
-  SIfrRecord *pNode; \r
+  SIfrRecord *pNode;\r
 \r
   if (TBuffer.Buffer != NULL) {\r
     delete[] TBuffer.Buffer;\r
@@ -1161,18 +1161,18 @@ CIfrRecordInfoDB::IfrRecordOutput (
 \r
   if (mSwitch == FALSE) {\r
     return;\r
-  } \r
-   \r
+  }\r
+\r
   for (pNode = mIfrRecordListHead; pNode != NULL; pNode = pNode->mNext) {\r
     TBuffer.Size += pNode->mBinBufLen;\r
   }\r
-  \r
+\r
   if (TBuffer.Size != 0) {\r
     TBuffer.Buffer = new CHAR8[TBuffer.Size];\r
   } else {\r
     return;\r
   }\r
-  \r
+\r
   Temp = TBuffer.Buffer;\r
 \r
   for (pNode = mIfrRecordListHead; pNode != NULL; pNode = pNode->mNext) {\r
@@ -1182,8 +1182,8 @@ CIfrRecordInfoDB::IfrRecordOutput (
     }\r
   }\r
 \r
-  return;   \r
-}   \r
+  return;\r
+}\r
 \r
 VOID\r
 CIfrRecordInfoDB::IfrRecordOutput (\r
@@ -1217,7 +1217,7 @@ CIfrRecordInfoDB::IfrRecordOutput (
       fprintf (File, "\n");\r
     }\r
   }\r
-  \r
+\r
   if (LineNo == 0) {\r
     fprintf (File, "\nTotal Size of all record is 0x%08X\n", TotalSize);\r
   }\r
@@ -1264,7 +1264,7 @@ CIfrRecordInfoDB::CheckIdOpCode (
   default:\r
     return FALSE;\r
   }\r
-} \r
+}\r
 \r
 EFI_QUESTION_ID\r
 CIfrRecordInfoDB::GetOpcodeQuestionId (\r
@@ -1272,9 +1272,9 @@ CIfrRecordInfoDB::GetOpcodeQuestionId (
   )\r
 {\r
   EFI_IFR_QUESTION_HEADER *QuestionHead;\r
-  \r
+\r
   QuestionHead = (EFI_IFR_QUESTION_HEADER *) (OpHead + 1);\r
-  \r
+\r
   return QuestionHead->QuestionId;\r
 }\r
 \r
@@ -1458,7 +1458,7 @@ CIfrRecordInfoDB::IfrRecordAdjust (
   QuestionScope = 0;\r
   while (pNode != NULL) {\r
     OpHead = (EFI_IFR_OP_HEADER *) pNode->mIfrBinBuf;\r
-    \r
+\r
     //\r
     // make sure the inconsistent opcode in question scope\r
     //\r
@@ -1468,7 +1468,7 @@ CIfrRecordInfoDB::IfrRecordAdjust (
         QuestionScope --;\r
       }\r
     }\r
-    \r
+\r
     if (CheckQuestionOpCode (OpHead->OpCode)) {\r
       QuestionScope = 1;\r
     }\r
@@ -1481,7 +1481,7 @@ CIfrRecordInfoDB::IfrRecordAdjust (
       //\r
 \r
       //\r
-      // Count inconsistent opcode Scope \r
+      // Count inconsistent opcode Scope\r
       //\r
       StackCount = OpHead->Scope;\r
       QuestionId = EFI_QUESTION_ID_INVALID;\r
@@ -1499,7 +1499,7 @@ CIfrRecordInfoDB::IfrRecordAdjust (
         //\r
         // by IdEqual opcode to get QuestionId\r
         //\r
-        if (QuestionId == EFI_QUESTION_ID_INVALID && \r
+        if (QuestionId == EFI_QUESTION_ID_INVALID &&\r
             CheckIdOpCode (tOpHead->OpCode)) {\r
           QuestionId = *(EFI_QUESTION_ID *) (tOpHead + 1);\r
         }\r
@@ -1517,13 +1517,13 @@ CIfrRecordInfoDB::IfrRecordAdjust (
       // extract inconsistent opcode list\r
       // pNode is Incosistent opcode, tNode is End Opcode\r
       //\r
-      \r
+\r
       //\r
       // insert inconsistent opcode list into the right question scope by questionid\r
       //\r
       for (uNode = mIfrRecordListHead; uNode != NULL; uNode = uNode->mNext) {\r
         tOpHead = (EFI_IFR_OP_HEADER *) uNode->mIfrBinBuf;\r
-        if (CheckQuestionOpCode (tOpHead->OpCode) && \r
+        if (CheckQuestionOpCode (tOpHead->OpCode) &&\r
             (QuestionId == GetOpcodeQuestionId (tOpHead))) {\r
           break;\r
         }\r
@@ -1538,7 +1538,7 @@ CIfrRecordInfoDB::IfrRecordAdjust (
           //\r
           OpHead->OpCode = EFI_IFR_NO_SUBMIT_IF_OP;\r
         }\r
-        \r
+\r
         //\r
         // skip the default storage for Date and Time\r
         //\r
@@ -1565,7 +1565,7 @@ CIfrRecordInfoDB::IfrRecordAdjust (
         Status = VFR_RETURN_MISMATCHED;\r
         break;\r
       }\r
-    } else if (OpHead->OpCode == EFI_IFR_VARSTORE_OP || \r
+    } else if (OpHead->OpCode == EFI_IFR_VARSTORE_OP ||\r
                OpHead->OpCode == EFI_IFR_VARSTORE_EFI_OP) {\r
       //\r
       // for new added group of varstore opcode\r
@@ -1573,9 +1573,9 @@ CIfrRecordInfoDB::IfrRecordAdjust (
       tNode = pNode;\r
       while (tNode->mNext != NULL) {\r
         tOpHead = (EFI_IFR_OP_HEADER *) tNode->mNext->mIfrBinBuf;\r
-        if (tOpHead->OpCode != EFI_IFR_VARSTORE_OP && \r
+        if (tOpHead->OpCode != EFI_IFR_VARSTORE_OP &&\r
             tOpHead->OpCode != EFI_IFR_VARSTORE_EFI_OP) {\r
-          break;    \r
+          break;\r
         }\r
         tNode = tNode->mNext;\r
       }\r
@@ -1583,22 +1583,22 @@ CIfrRecordInfoDB::IfrRecordAdjust (
       if (tNode->mNext == NULL) {\r
         //\r
         // invalid IfrCode, IfrCode end by EndOpCode\r
-        // \r
+        //\r
         gCVfrErrorHandle.PrintMsg (0, NULL, "Error", "No found End Opcode in the end");\r
         Status = VFR_RETURN_MISMATCHED;\r
         break;\r
       }\r
-      \r
+\r
       if (tOpHead->OpCode != EFI_IFR_END_OP) {\r
           //\r
           // not new added varstore, which are not needed to be adjust.\r
           //\r
           preNode = tNode;\r
           pNode   = tNode->mNext;\r
-          continue;        \r
+          continue;\r
       } else {\r
         //\r
-        // move new added varstore opcode to the position befor form opcode \r
+        // move new added varstore opcode to the position befor form opcode\r
         // varstore opcode between pNode and tNode\r
         //\r
 \r
@@ -1639,9 +1639,9 @@ CIfrRecordInfoDB::IfrRecordAdjust (
     // next node\r
     //\r
     preNode = pNode;\r
-    pNode = pNode->mNext; \r
+    pNode = pNode->mNext;\r
   }\r
-  \r
+\r
   //\r
   // Update Ifr Opcode Offset\r
   //\r
@@ -2238,7 +2238,7 @@ CIfrObj::_EMIT_PENDING_OBJ (
   )\r
 {\r
   CHAR8  *ObjBinBuf = NULL;\r
-  \r
+\r
   //\r
   // do nothing\r
   //\r
@@ -2254,7 +2254,7 @@ CIfrObj::_EMIT_PENDING_OBJ (
   if (ObjBinBuf != NULL) {\r
     memmove (ObjBinBuf, mObjBinBuf, mObjBinLen);\r
   }\r
-  \r
+\r
   //\r
   // update bin buffer to package data buffer\r
   //\r
@@ -2262,7 +2262,7 @@ CIfrObj::_EMIT_PENDING_OBJ (
     delete[] mObjBinBuf;\r
     mObjBinBuf = ObjBinBuf;\r
   }\r
-  \r
+\r
   mDelayEmit = FALSE;\r
 }\r
 \r
index 822f861983f8c77a1fc4969032dfcd452645ba81..6fe4b8d8191162205b3f92cd7ce38a14b637f143 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
-  \r
+\r
   The definition of CFormPkg's member function\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -273,7 +273,7 @@ public:
   virtual ~CIfrObj(VOID);\r
 \r
   VOID    _EMIT_PENDING_OBJ (VOID);\r
-  \r
+\r
   inline VOID    SetLineNo (IN UINT32 LineNo) {\r
     mLineNo = LineNo;\r
   }\r
@@ -421,7 +421,7 @@ public:
 \r
 public:\r
   CIfrQuestionHeader (\r
-    IN EFI_IFR_QUESTION_HEADER *StartAddr, \r
+    IN EFI_IFR_QUESTION_HEADER *StartAddr,\r
     IN UINT8 Flags = EFI_IFR_QUESTION_FLAG_DEFAULT\r
   ) : CIfrStatementHeader (QH2SH(StartAddr)) {\r
     mHeader                         = StartAddr;\r
@@ -452,7 +452,7 @@ public:
     if (_FLAG_TEST_AND_CLEAR (Flags, EFI_IFR_FLAG_CALLBACK)) {\r
       mHeader->Flags |= EFI_IFR_FLAG_CALLBACK;\r
     }\r
-    \r
+\r
     //\r
     // ignore NVAccessFlag\r
     //\r
@@ -1055,7 +1055,7 @@ private:
 \r
 public:\r
   CIfrGet (\r
-  IN UINT32 LineNo  \r
+  IN UINT32 LineNo\r
   ) : CIfrObj (EFI_IFR_GET_OP),\r
       CIfrOpHeader (EFI_IFR_GET_OP, &(GetObjBinAddr<EFI_IFR_GET>())->Header), mGet(GetObjBinAddr<EFI_IFR_GET>()) {\r
     SetLineNo (LineNo);\r
@@ -2071,8 +2071,8 @@ public:
     mEqIdVList->ListLength   = 0;\r
     mEqIdVList->ValueList[0] = 0;\r
   }\r
-  \r
-  VOID UpdateIfrBuffer ( \r
+\r
+  VOID UpdateIfrBuffer (\r
   ) {\r
     _EMIT_PENDING_OBJ();\r
     mEqIdVList = GetObjBinAddr<EFI_IFR_EQ_ID_VAL_LIST>();\r
@@ -2607,7 +2607,7 @@ public:
 class CIfrMap : public CIfrObj, public CIfrOpHeader{\r
 public:\r
   CIfrMap (\r
-  IN UINT32 LineNo  \r
+  IN UINT32 LineNo\r
   ) : CIfrObj (EFI_IFR_MAP_OP),\r
       CIfrOpHeader (EFI_IFR_MAP_OP, &(GetObjBinAddr<EFI_IFR_MAP>())->Header) {\r
     SetLineNo (LineNo);\r
index d795ef01bda11778bac7233e45dcde7683426e44..2ebaf58f17c59a66167a526157b6dde163774f75 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
-  \r
+\r
   Vfr common library functions.\r
 \r
 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -72,9 +72,9 @@ CVfrBinaryOutput::WriteEnd (
 }\r
 \r
 SConfigInfo::SConfigInfo (\r
-  IN UINT8              Type, \r
-  IN UINT16             Offset, \r
-  IN UINT32             Width, \r
+  IN UINT8              Type,\r
+  IN UINT16             Offset,\r
+  IN UINT32             Width,\r
   IN EFI_IFR_TYPE_VALUE Value\r
   )\r
 {\r
@@ -553,7 +553,7 @@ _STR2U32 (
     //\r
     // BUG: does not handle overflow here\r
     //\r
-       (IsHex == TRUE) ? (Value <<= 4) : (Value *= 10);\r
+  (IsHex == TRUE) ? (Value <<= 4) : (Value *= 10);\r
 \r
     if ((IsHex == TRUE) && (c >= 'a') && (c <= 'f')) {\r
       Value += (c - 'a' + 10);\r
@@ -764,7 +764,7 @@ CVfrVarDataTypeDB::GetFieldOffset (
   if (Field == NULL) {\r
     return VFR_RETURN_FATAL_ERROR;\r
   }\r
-  \r
+\r
   //\r
   // Framework Vfr file Array Index is from 1.\r
   // But Uefi Vfr file Array Index is from 0.\r
@@ -779,7 +779,7 @@ CVfrVarDataTypeDB::GetFieldOffset (
   if ((ArrayIdx != INVALID_ARRAY_INDEX) && ((Field->mArrayNum == 0) || (Field->mArrayNum <= ArrayIdx))) {\r
     return VFR_RETURN_ERROR_ARRARY_NUM;\r
   }\r
-  \r
+\r
   //\r
   // Be compatible with the current usage\r
   // If ArraryIdx is not specified, the first one is used.\r
@@ -983,7 +983,7 @@ CVfrVarDataTypeDB::~CVfrVarDataTypeDB (
       pType->mMembers = pType->mMembers->mNext;\r
       delete pField;\r
     }\r
-       delete pType;\r
+  delete pType;\r
   }\r
 \r
   while (mPackStack != NULL) {\r
@@ -1505,10 +1505,10 @@ CVfrVarDataTypeDB::Dump (
     fprintf (File, "\t\tstruct %s {\n", pTNode->mTypeName);\r
     for (pFNode = pTNode->mMembers; pFNode != NULL; pFNode = pFNode->mNext) {\r
       if (pFNode->mArrayNum > 0) {\r
-        fprintf (File, "\t\t\t+%08d[%08x] %s[%d] <%s>\n", pFNode->mOffset, pFNode->mOffset, \r
+        fprintf (File, "\t\t\t+%08d[%08x] %s[%d] <%s>\n", pFNode->mOffset, pFNode->mOffset,\r
                   pFNode->mFieldName, pFNode->mArrayNum, pFNode->mFieldType->mTypeName);\r
       } else {\r
-        fprintf (File, "\t\t\t+%08d[%08x] %s <%s>\n", pFNode->mOffset, pFNode->mOffset, \r
+        fprintf (File, "\t\t\t+%08d[%08x] %s <%s>\n", pFNode->mOffset, pFNode->mOffset,\r
                   pFNode->mFieldName, pFNode->mFieldType->mTypeName);\r
       }\r
     }\r
@@ -1536,7 +1536,7 @@ CVfrVarDataTypeDB::ParserDB (
       printf ("\t\t\t%s\t%s\n", pFNode->mFieldType->mTypeName, pFNode->mFieldName);\r
     }\r
     printf ("\t\t};\n");\r
-       printf ("---------------------------------------------------------------\n");\r
+  printf ("---------------------------------------------------------------\n");\r
   }\r
   printf ("***************************************************************\n");\r
 }\r
@@ -1688,7 +1688,7 @@ CVfrDataStorage::GetFreeVarStoreId (
   )\r
 {\r
   UINT32  Index, Mask, Offset;\r
-  \r
+\r
   //\r
   // Assign the different ID range for the different type VarStore to support Framework Vfr\r
   //\r
@@ -1770,7 +1770,7 @@ CVfrDataStorage::DeclareNameVarStoreBegin (
   if (GetVarStoreId (StoreName, &TmpVarStoreId) == VFR_RETURN_SUCCESS) {\r
     return VFR_RETURN_REDEFINED;\r
   }\r
-  \r
+\r
   if (VarStoreId == EFI_VARSTORE_ID_INVALID) {\r
     VarStoreId = GetFreeVarStoreId (EFI_VFR_VARSTORE_NAME);\r
   } else {\r
@@ -1828,10 +1828,10 @@ CVfrDataStorage::DeclareNameVarStoreEnd (
   return VFR_RETURN_SUCCESS;\r
 }\r
 \r
-EFI_VFR_RETURN_CODE \r
+EFI_VFR_RETURN_CODE\r
 CVfrDataStorage::DeclareEfiVarStore (\r
-  IN CHAR8          *StoreName, \r
-  IN EFI_GUID       *Guid, \r
+  IN CHAR8          *StoreName,\r
+  IN EFI_GUID       *Guid,\r
   IN EFI_STRING_ID  NameStrId,\r
   IN UINT32         VarSize,\r
   IN BOOLEAN        Flag\r
@@ -1863,10 +1863,10 @@ CVfrDataStorage::DeclareEfiVarStore (
   return VFR_RETURN_SUCCESS;\r
 }\r
 \r
-EFI_VFR_RETURN_CODE \r
+EFI_VFR_RETURN_CODE\r
 CVfrDataStorage::DeclareBufferVarStore (\r
-  IN CHAR8             *StoreName, \r
-  IN EFI_GUID          *Guid, \r
+  IN CHAR8             *StoreName,\r
+  IN EFI_GUID          *Guid,\r
   IN CVfrVarDataTypeDB *DataTypeDB,\r
   IN CHAR8             *TypeName,\r
   IN EFI_VARSTORE_ID   VarStoreId,\r
@@ -1911,7 +1911,7 @@ CVfrDataStorage::DeclareBufferVarStore (
   return VFR_RETURN_SUCCESS;\r
 }\r
 \r
-EFI_VFR_RETURN_CODE \r
+EFI_VFR_RETURN_CODE\r
 CVfrDataStorage::GetVarStoreByDataType (\r
   IN  CHAR8              *DataTypeName,\r
   OUT SVfrVarStorageNode **VarNode,\r
@@ -1920,7 +1920,7 @@ CVfrDataStorage::GetVarStoreByDataType (
 {\r
   SVfrVarStorageNode    *pNode;\r
   SVfrVarStorageNode    *MatchNode;\r
-  \r
+\r
   //\r
   // Framework VFR uses Data type name as varstore name, so don't need check again.\r
   //\r
@@ -1950,7 +1950,7 @@ CVfrDataStorage::GetVarStoreByDataType (
       }\r
     }\r
   }\r
-  \r
+\r
   if (MatchNode == NULL) {\r
     return VFR_RETURN_UNDEFINED;\r
   }\r
@@ -1959,7 +1959,7 @@ CVfrDataStorage::GetVarStoreByDataType (
   return VFR_RETURN_SUCCESS;\r
 }\r
 \r
-EFI_VARSTORE_ID \r
+EFI_VARSTORE_ID\r
 CVfrDataStorage::CheckGuidField (\r
   IN  SVfrVarStorageNode   *pNode,\r
   IN  EFI_GUID             *StoreGuid,\r
@@ -1999,7 +1999,7 @@ CVfrDataStorage::CheckGuidField (
 }\r
 \r
 /**\r
-  Base on the input store name and guid to find the varstore id. \r
+  Base on the input store name and guid to find the varstore id.\r
 \r
   If both name and guid are inputed, base on the name and guid to\r
   found the varstore. If only name inputed, base on the name to\r
@@ -2007,10 +2007,10 @@ CVfrDataStorage::CheckGuidField (
   has the same name. If only has found one varstore, return this\r
   varstore; if more than one varstore has same name, return varstore\r
   name redefined error. If no varstore found by varstore name, call\r
-  function GetVarStoreByDataType and use inputed varstore name as \r
+  function GetVarStoreByDataType and use inputed varstore name as\r
   data type name to search.\r
 **/\r
-EFI_VFR_RETURN_CODE \r
+EFI_VFR_RETURN_CODE\r
 CVfrDataStorage::GetVarStoreId (\r
   IN  CHAR8           *StoreName,\r
   OUT EFI_VARSTORE_ID *VarStoreId,\r
@@ -2058,14 +2058,14 @@ CVfrDataStorage::GetVarStoreId (
   *VarStoreId         = EFI_VARSTORE_ID_INVALID;\r
 \r
   //\r
-  // Assume that Data strucutre name is used as StoreName, and check again. \r
+  // Assume that Data strucutre name is used as StoreName, and check again.\r
   //\r
   ReturnCode = GetVarStoreByDataType (StoreName, &pNode, StoreGuid);\r
   if (pNode != NULL) {\r
     mCurrVarStorageNode = pNode;\r
     *VarStoreId = pNode->mVarStoreId;\r
   }\r
-  \r
+\r
   return ReturnCode;\r
 }\r
 \r
@@ -2169,7 +2169,7 @@ CVfrDataStorage::GetVarStoreGuid (
 \r
 EFI_VFR_RETURN_CODE\r
 CVfrDataStorage::GetVarStoreName (\r
-  IN  EFI_VARSTORE_ID VarStoreId, \r
+  IN  EFI_VARSTORE_ID VarStoreId,\r
   OUT CHAR8           **VarStoreName\r
   )\r
 {\r
@@ -2294,7 +2294,7 @@ CVfrDataStorage::GetNameVarStoreInfo (
   if (mCurrVarStorageNode == NULL) {\r
     return VFR_RETURN_GET_NVVARSTORE_ERROR;\r
   }\r
-  \r
+\r
   //\r
   // Framework Vfr file Index is from 1, but Uefi Vfr file Index is from 0.\r
   //\r
@@ -2312,8 +2312,8 @@ CVfrDataStorage::GetNameVarStoreInfo (
 \r
 SVfrDefaultStoreNode::SVfrDefaultStoreNode (\r
   IN EFI_IFR_DEFAULTSTORE *ObjBinAddr,\r
-  IN CHAR8                *RefName, \r
-  IN EFI_STRING_ID        DefaultStoreNameId, \r
+  IN CHAR8                *RefName,\r
+  IN EFI_STRING_ID        DefaultStoreNameId,\r
   IN UINT16               DefaultId\r
   )\r
 {\r
@@ -2391,7 +2391,7 @@ CVfrDefaultStore::RegisterDefaultStore (
 }\r
 \r
 /*\r
- * assign new reference name or new default store name id only if \r
+ * assign new reference name or new default store name id only if\r
  * the original is invalid\r
  */\r
 EFI_VFR_RETURN_CODE\r
@@ -2507,7 +2507,7 @@ CVfrDefaultStore::BufferVarStoreAltConfigAdd (
       goto WriteError;\r
     }\r
   }\r
-  \r
+\r
   gCVfrBufferConfig.Close ();\r
 \r
   return VFR_RETURN_SUCCESS;\r
@@ -2649,7 +2649,7 @@ EFI_VARSTORE_INFO::operator == (
   )\r
 {\r
   if ((mVarStoreId == Info->mVarStoreId) &&\r
-         (mInfo.mVarName == Info->mInfo.mVarName) &&\r
+      (mInfo.mVarName == Info->mInfo.mVarName) &&\r
       (mInfo.mVarOffset == Info->mInfo.mVarOffset) &&\r
       (mVarType == Info->mVarType) &&\r
       (mVarTotalSize == Info->mVarTotalSize) &&\r
@@ -2832,7 +2832,7 @@ CVfrQuestionDB::ResetInit(
 \r
   // Question ID 0 is reserved.\r
   mFreeQIdBitMap[0] = 0x80000000;\r
-  mQuestionList     = NULL;   \r
+  mQuestionList     = NULL;\r
 }\r
 \r
 VOID\r
@@ -3242,7 +3242,7 @@ Err:
   }\r
 }\r
 \r
-VOID \r
+VOID\r
 CVfrQuestionDB::RegisterRefQuestion (\r
   IN     CHAR8           *Name,\r
   IN     CHAR8           *BaseVarId,\r
@@ -3331,15 +3331,15 @@ CVfrQuestionDB::RegisterRefQuestion (
   pNode[0]->mQuestionId = QuestionId;\r
   pNode[1]->mQuestionId = QuestionId;\r
   pNode[2]->mQuestionId = QuestionId;\r
-  pNode[3]->mQuestionId = QuestionId;  \r
+  pNode[3]->mQuestionId = QuestionId;\r
   pNode[0]->mQtype      = QUESTION_REF;\r
   pNode[1]->mQtype      = QUESTION_REF;\r
   pNode[2]->mQtype      = QUESTION_REF;\r
-  pNode[3]->mQtype      = QUESTION_REF;  \r
+  pNode[3]->mQtype      = QUESTION_REF;\r
   pNode[0]->mNext       = pNode[1];\r
   pNode[1]->mNext       = pNode[2];\r
   pNode[2]->mNext       = pNode[3];\r
-  pNode[3]->mNext       = mQuestionList;  \r
+  pNode[3]->mNext       = mQuestionList;\r
   mQuestionList         = pNode[0];\r
 \r
   gCFormPkg.DoPendingAssign (VarIdStr[0], (VOID *)&QuestionId, sizeof(EFI_QUESTION_ID));\r
@@ -3368,15 +3368,15 @@ CVfrQuestionDB::UpdateQuestionId (
   )\r
 {\r
   SVfrQuestionNode *pNode = NULL;\r
-  \r
+\r
   if (QId == NewQId) {\r
     // don't update\r
     return VFR_RETURN_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // For Framework Vfr, don't check question ID conflict.\r
-  //  \r
+  //\r
   if (!VfrCompatibleMode && ChekQuestionIdFree (NewQId) == FALSE) {\r
     return VFR_RETURN_REDEFINED;\r
   }\r
@@ -3432,7 +3432,7 @@ CVfrQuestionDB::GetQuestionId (
       if (strcmp (pNode->mVarIdStr, VarIdStr) != 0) {\r
         continue;\r
       }\r
-       }\r
+    }\r
 \r
     QuestionId = pNode->mQuestionId;\r
     BitMask    = pNode->mBitMask;\r
@@ -3499,7 +3499,7 @@ CVfrStringDB::~CVfrStringDB ()
 }\r
 \r
 \r
-VOID \r
+VOID\r
 CVfrStringDB::SetStringFileName(IN CHAR8 *StringFileName)\r
 {\r
   UINT32 FileLen = 0;\r
@@ -3524,7 +3524,7 @@ CVfrStringDB::SetStringFileName(IN CHAR8 *StringFileName)
 \r
 \r
 /**\r
-  Returns TRUE or FALSE whether SupportedLanguages contains the best matching language \r
+  Returns TRUE or FALSE whether SupportedLanguages contains the best matching language\r
   from a set of supported languages.\r
 \r
   @param[in]  SupportedLanguages  A pointer to a Null-terminated ASCII string that\r
@@ -3587,13 +3587,13 @@ CVfrStringDB::GetBestLanguage (
     }\r
 \r
     //\r
-    // Trim Language from the right to the next '-' character \r
+    // Trim Language from the right to the next '-' character\r
     //\r
     for (LanguageLength--; LanguageLength > 0 && Language[LanguageLength] != '-'; LanguageLength--);\r
   }\r
 \r
   //\r
-  // No matches were found \r
+  // No matches were found\r
   //\r
   return FALSE;\r
 }\r
@@ -3617,7 +3617,7 @@ CVfrStringDB::GetVarStoreNameFormStringId (
   CHAR8       LineBuf[EFI_IFR_MAX_LENGTH];\r
   UINT8       BlockType;\r
   EFI_HII_STRING_PACKAGE_HDR *PkgHeader;\r
-  \r
+\r
   if (mStringFileName == NULL) {\r
     return NULL;\r
   }\r
index 70af9119e6597a7098bb4bf609330ceb4ba6f472..8c538a018dba8890a4f03b9af3caaed092ff3220 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
-  \r
+\r
   Vfr common library functions.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -229,7 +229,7 @@ public:
 \r
   VOID                Dump(IN FILE *);\r
   //\r
-  // First the declared \r
+  // First the declared\r
   //\r
   CHAR8               *mFirstNewDataTypeName;\r
 #ifdef CVFR_VARDATATYPEDB_DEBUG\r
@@ -270,7 +270,7 @@ struct SVfrVarStorageNode {
     SVfrDataType            *mDataType;\r
 \r
     // NameValue Storage\r
-       struct {\r
+  struct {\r
       EFI_STRING_ID         *mNameTable;\r
       UINT32                mTableSize;\r
     } mNameSpace;\r
@@ -333,15 +333,15 @@ private:
   BOOLEAN         ChekVarStoreIdFree (IN EFI_VARSTORE_ID);\r
   VOID            MarkVarStoreIdUsed (IN EFI_VARSTORE_ID);\r
   VOID            MarkVarStoreIdUnused (IN EFI_VARSTORE_ID);\r
-  EFI_VARSTORE_ID CheckGuidField (IN SVfrVarStorageNode *, \r
-                                  IN EFI_GUID *, \r
-                                  IN BOOLEAN *, \r
+  EFI_VARSTORE_ID CheckGuidField (IN SVfrVarStorageNode *,\r
+                                  IN EFI_GUID *,\r
+                                  IN BOOLEAN *,\r
                                   OUT EFI_VFR_RETURN_CODE *);\r
 \r
 public:\r
   CVfrDataStorage ();\r
   ~CVfrDataStorage ();\r
-  \r
+\r
   SVfrVarStorageNode * GetBufferVarStoreList () {\r
     return mBufferVarStoreList;\r
   }\r
@@ -422,13 +422,13 @@ public:
   VOID                RegisterNewDateQuestion (IN CHAR8 *, IN CHAR8 *, IN OUT EFI_QUESTION_ID &);\r
   VOID                RegisterOldTimeQuestion (IN CHAR8 *, IN CHAR8 *, IN CHAR8 *, IN OUT EFI_QUESTION_ID &);\r
   VOID                RegisterNewTimeQuestion (IN CHAR8 *, IN CHAR8 *, IN OUT EFI_QUESTION_ID &);\r
-  VOID                RegisterRefQuestion (IN CHAR8 *, IN CHAR8 *, IN OUT EFI_QUESTION_ID &);  \r
+  VOID                RegisterRefQuestion (IN CHAR8 *, IN CHAR8 *, IN OUT EFI_QUESTION_ID &);\r
   EFI_VFR_RETURN_CODE UpdateQuestionId (IN EFI_QUESTION_ID, IN EFI_QUESTION_ID);\r
   VOID                GetQuestionId (IN CHAR8 *, IN CHAR8 *, OUT EFI_QUESTION_ID &, OUT UINT32 &, OUT EFI_QUESION_TYPE *QType = NULL);\r
   EFI_VFR_RETURN_CODE FindQuestion (IN EFI_QUESTION_ID);\r
   EFI_VFR_RETURN_CODE FindQuestion (IN CHAR8 *);\r
   VOID                PrintAllQuestion (IN VOID);\r
-  VOID                ResetInit (IN VOID); \r
+  VOID                ResetInit (IN VOID);\r
 \r
   VOID SetCompatibleMode (IN BOOLEAN Mode) {\r
     VfrCompatibleMode = Mode;\r
@@ -523,7 +523,7 @@ private:
   UINT32 GetUnicodeStringTextSize (\r
     IN  UINT8            *StringSrc\r
     );\r
-    \r
+\r
   BOOLEAN GetBestLanguage (\r
     IN CONST CHAR8  *SupportedLanguages,\r
     IN CHAR8        *Language\r
index 7c2f72ef42c6fd57e1f319c1defe6326e7447337..bf00af05669cf2bfef5cc2ddda5e46507778a819 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 The tool dumps the contents of a firmware volume\r
 \r
-Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -541,16 +541,16 @@ GetOccupiedSize (
 \r
 Routine Description:\r
 \r
-  This function returns the next larger size that meets the alignment \r
+  This function returns the next larger size that meets the alignment\r
   requirement specified.\r
 \r
 Arguments:\r
 \r
   ActualSize      The size.\r
   Alignment       The desired alignment.\r
-    \r
+\r
 Returns:\r
\r
+\r
   EFI_SUCCESS             Function completed successfully.\r
   EFI_ABORTED             The function encountered an error.\r
 \r
@@ -600,7 +600,7 @@ Returns:
     //\r
     // 0x02\r
     //\r
-    "EFI_SECTION_GUID_DEFINED",    \r
+    "EFI_SECTION_GUID_DEFINED",\r
     //\r
     // 0x03\r
     //\r
@@ -664,11 +664,11 @@ Returns:
     //\r
     // 0x12\r
     //\r
-    "EFI_SECTION_TE",    \r
+    "EFI_SECTION_TE",\r
     //\r
     // 0x13\r
     //\r
-    "EFI_SECTION_DXE_DEPEX", \r
+    "EFI_SECTION_DXE_DEPEX",\r
     //\r
     // 0x14\r
     //\r
@@ -735,7 +735,7 @@ ReadHeader (
 \r
 Routine Description:\r
 \r
-  This function determines the size of the FV and the erase polarity.  The \r
+  This function determines the size of the FV and the erase polarity.  The\r
   erase polarity is the FALSE value for file state.\r
 \r
 Arguments:\r
@@ -743,9 +743,9 @@ Arguments:
   InputFile       The file that contains the FV image.\r
   FvSize          The size of the FV.\r
   ErasePolarity   The FV erase polarity.\r
-    \r
+\r
 Returns:\r
\r
+\r
   EFI_SUCCESS             Function completed successfully.\r
   EFI_INVALID_PARAMETER   A required parameter was NULL or is out of range.\r
   EFI_ABORTED             The function encountered an error.\r
@@ -894,7 +894,7 @@ Returns:
   if (VolumeHeader.Attributes & EFI_FVB2_ALIGNMENT_64K) {\r
     printf ("        EFI_FVB2_ALIGNMENT_64K\n");\r
   }\r
-  \r
+\r
 #else\r
 \r
   if (VolumeHeader.Attributes & EFI_FVB2_READ_LOCK_CAP) {\r
@@ -1123,7 +1123,7 @@ Returns:
   EFI_STATUS          Status;\r
   UINT8               GuidBuffer[PRINTED_GUID_BUFFER_SIZE];\r
   UINT32              HeaderSize;\r
-#if (PI_SPECIFICATION_VERSION < 0x00010000) \r
+#if (PI_SPECIFICATION_VERSION < 0x00010000)\r
   UINT16              *Tail;\r
 #endif\r
   //\r
@@ -1225,7 +1225,7 @@ Returns:
         return EFI_ABORTED;\r
       }\r
     }\r
-#if (PI_SPECIFICATION_VERSION < 0x00010000)    \r
+#if (PI_SPECIFICATION_VERSION < 0x00010000)\r
     //\r
     // Verify tail if present\r
     //\r
@@ -1240,7 +1240,7 @@ Returns:
         return EFI_ABORTED;\r
       }\r
     }\r
- #endif   \r
+ #endif\r
     break;\r
 \r
   default:\r
@@ -1643,7 +1643,7 @@ Returns:
 \r
   EFI_SECTION_ERROR - Problem with section parsing.\r
                       (a) compression errors\r
-                      (b) unrecognized section \r
+                      (b) unrecognized section\r
   EFI_UNSUPPORTED - Do not know how to parse the section.\r
   EFI_SUCCESS - Section successfully parsed.\r
   EFI_OUT_OF_RESOURCES - Memory allocation failed.\r
@@ -2392,8 +2392,8 @@ Returns:
 \r
   //\r
   // Copyright declaration\r
-  // \r
-  fprintf (stdout, "Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.\n\n");\r
+  //\r
+  fprintf (stdout, "Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.\n\n");\r
   fprintf (stdout, "  Display Tiano Firmware Volume FFS image information\n\n");\r
 \r
   //\r
index 6d76afd81ac121da87a07b1289f5cf7887a2318a..b0801c787acc97f80076846fcd768781372ceb92 100644 (file)
@@ -241,7 +241,7 @@ class WorkspaceAutoGen(AutoGen):
             super(WorkspaceAutoGen, self).__init__(Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs)\r
             self._InitWorker(Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs)\r
             self._Init = True\r
-    \r
+\r
     ## Initialize WorkspaceAutoGen\r
     #\r
     #   @param  WorkspaceDir            Root directory of workspace\r
@@ -310,7 +310,7 @@ class WorkspaceAutoGen(AutoGen):
                             ExtraData="Build target [%s] is not supported by the platform. [Valid target: %s]"\r
                                       % (self.BuildTarget, " ".join(self.Platform.BuildTargets)))\r
 \r
-        \r
+\r
         # parse FDF file to get PCDs in it, if any\r
         if not self.FdfFile:\r
             self.FdfFile = self.Platform.FlashDefinition\r
@@ -763,7 +763,7 @@ class WorkspaceAutoGen(AutoGen):
 \r
     ## _CheckDuplicateInFV() method\r
     #\r
-    # Check whether there is duplicate modules/files exist in FV section. \r
+    # Check whether there is duplicate modules/files exist in FV section.\r
     # The check base on the file GUID;\r
     #\r
     def _CheckDuplicateInFV(self, Fdf):\r
@@ -794,7 +794,7 @@ class WorkspaceAutoGen(AutoGen):
                                                                                                                                    Module.Guid.upper()),\r
                                                     ExtraData=self.FdfFile)\r
                     #\r
-                    # Some INF files not have entity in DSC file. \r
+                    # Some INF files not have entity in DSC file.\r
                     #\r
                     if not InfFoundFlag:\r
                         if FfsFile.InfFileName.find('$') == -1:\r
@@ -804,7 +804,7 @@ class WorkspaceAutoGen(AutoGen):
 \r
                             PathClassObj = PathClass(FfsFile.InfFileName, self.WorkspaceDir)\r
                             #\r
-                            # Here we just need to get FILE_GUID from INF file, use 'COMMON' as ARCH attribute. and use \r
+                            # Here we just need to get FILE_GUID from INF file, use 'COMMON' as ARCH attribute. and use\r
                             # BuildObject from one of AutoGenObjectList is enough.\r
                             #\r
                             InfObj = self.AutoGenObjectList[0].BuildDatabase.WorkspaceDb.BuildObject[PathClassObj, TAB_ARCH_COMMON, self.BuildTarget, self.ToolChain]\r
@@ -823,7 +823,7 @@ class WorkspaceAutoGen(AutoGen):
 \r
                 if FfsFile.NameGuid is not None:\r
                     #\r
-                    # If the NameGuid reference a PCD name. \r
+                    # If the NameGuid reference a PCD name.\r
                     # The style must match: PCD(xxxx.yyy)\r
                     #\r
                     if gPCDAsGuidPattern.match(FfsFile.NameGuid):\r
@@ -900,7 +900,7 @@ class WorkspaceAutoGen(AutoGen):
             for Pcd in Pa.Platform.Pcds:\r
                 PcdType = Pa.Platform.Pcds[Pcd].Type\r
 \r
-                # If no PCD type, this PCD comes from FDF \r
+                # If no PCD type, this PCD comes from FDF\r
                 if not PcdType:\r
                     continue\r
 \r
@@ -992,14 +992,14 @@ class WorkspaceAutoGen(AutoGen):
     ## Check the PCDs token value conflict in each DEC file.\r
     #\r
     # Will cause build break and raise error message while two PCDs conflict.\r
-    # \r
+    #\r
     # @return  None\r
     #\r
     def _CheckAllPcdsTokenValueConflict(self):\r
         for Pa in self.AutoGenObjectList:\r
             for Package in Pa.PackageList:\r
                 PcdList = Package.Pcds.values()\r
-                PcdList.sort(lambda x, y: cmp(int(x.TokenValue, 0), int(y.TokenValue, 0))) \r
+                PcdList.sort(lambda x, y: cmp(int(x.TokenValue, 0), int(y.TokenValue, 0)))\r
                 Count = 0\r
                 while (Count < len(PcdList) - 1) :\r
                     Item = PcdList[Count]\r
@@ -1124,20 +1124,20 @@ class PlatformAutoGen(AutoGen):
             self._InitWorker(Workspace, MetaFile, Target, Toolchain, Arch)\r
             self._Init = True\r
     #\r
-    # Used to store all PCDs for both PEI and DXE phase, in order to generate \r
+    # Used to store all PCDs for both PEI and DXE phase, in order to generate\r
     # correct PCD database\r
-    # \r
+    #\r
     _DynaPcdList_ = []\r
     _NonDynaPcdList_ = []\r
     _PlatformPcds = {}\r
-    \r
+\r
     #\r
-    # The priority list while override build option \r
+    # The priority list while override build option\r
     #\r
     PrioList = {"0x11111"  : 16,     #  TARGET_TOOLCHAIN_ARCH_COMMANDTYPE_ATTRIBUTE (Highest)\r
                 "0x01111"  : 15,     #  ******_TOOLCHAIN_ARCH_COMMANDTYPE_ATTRIBUTE\r
                 "0x10111"  : 14,     #  TARGET_*********_ARCH_COMMANDTYPE_ATTRIBUTE\r
-                "0x00111"  : 13,     #  ******_*********_ARCH_COMMANDTYPE_ATTRIBUTE \r
+                "0x00111"  : 13,     #  ******_*********_ARCH_COMMANDTYPE_ATTRIBUTE\r
                 "0x11011"  : 12,     #  TARGET_TOOLCHAIN_****_COMMANDTYPE_ATTRIBUTE\r
                 "0x01011"  : 11,     #  ******_TOOLCHAIN_****_COMMANDTYPE_ATTRIBUTE\r
                 "0x10011"  : 10,     #  TARGET_*********_****_COMMANDTYPE_ATTRIBUTE\r
@@ -1289,9 +1289,9 @@ class PlatformAutoGen(AutoGen):
     #\r
     def CollectFixedAtBuildPcds(self):\r
         for LibAuto in self.LibraryAutoGenList:\r
-            FixedAtBuildPcds = {}  \r
-            ShareFixedAtBuildPcdsSameValue = {} \r
-            for Module in LibAuto._ReferenceModules:                \r
+            FixedAtBuildPcds = {}\r
+            ShareFixedAtBuildPcdsSameValue = {}\r
+            for Module in LibAuto._ReferenceModules:\r
                 for Pcd in Module.FixedAtBuildPcds + LibAuto.FixedAtBuildPcds:\r
                     key = ".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName))\r
                     if key not in FixedAtBuildPcds:\r
@@ -1299,7 +1299,7 @@ class PlatformAutoGen(AutoGen):
                         FixedAtBuildPcds[key] = Pcd.DefaultValue\r
                     else:\r
                         if FixedAtBuildPcds[key] != Pcd.DefaultValue:\r
-                            ShareFixedAtBuildPcdsSameValue[key] = False      \r
+                            ShareFixedAtBuildPcdsSameValue[key] = False\r
             for Pcd in LibAuto.FixedAtBuildPcds:\r
                 key = ".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName))\r
                 if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) not in self.NonDynamicPcdDict:\r
@@ -1308,7 +1308,7 @@ class PlatformAutoGen(AutoGen):
                     DscPcd = self.NonDynamicPcdDict[(Pcd.TokenCName, Pcd.TokenSpaceGuidCName)]\r
                     if DscPcd.Type != TAB_PCDS_FIXED_AT_BUILD:\r
                         continue\r
-                if key in ShareFixedAtBuildPcdsSameValue and ShareFixedAtBuildPcdsSameValue[key]:                    \r
+                if key in ShareFixedAtBuildPcdsSameValue and ShareFixedAtBuildPcdsSameValue[key]:\r
                     LibAuto.ConstPcd[key] = FixedAtBuildPcds[key]\r
 \r
     def CollectVariables(self, DynamicPcdSet):\r
@@ -1405,7 +1405,7 @@ class PlatformAutoGen(AutoGen):
         for F in self.Platform.Modules.keys():\r
             M = ModuleAutoGen(self.Workspace, F, self.BuildTarget, self.ToolChain, self.Arch, self.MetaFile)\r
             #GuidValue.update(M.Guids)\r
-            \r
+\r
             self.Platform.Modules[F].M = M\r
 \r
             for PcdFromModule in M.ModulePcdList + M.LibraryPcdList:\r
@@ -1417,27 +1417,27 @@ class PlatformAutoGen(AutoGen):
                 if M.IsBinaryModule == True:\r
                     PcdFromModule.IsFromBinaryInf = True\r
 \r
-                # Check the PCD from DSC or not \r
+                # Check the PCD from DSC or not\r
                 PcdFromModule.IsFromDsc = (PcdFromModule.TokenCName, PcdFromModule.TokenSpaceGuidCName) in self.Platform.Pcds\r
 \r
                 if PcdFromModule.Type in PCD_DYNAMIC_TYPE_SET or PcdFromModule.Type in PCD_DYNAMIC_EX_TYPE_SET:\r
                     if F.Path not in FdfModuleList:\r
-                        # If one of the Source built modules listed in the DSC is not listed \r
-                        # in FDF modules, and the INF lists a PCD can only use the PcdsDynamic \r
-                        # access method (it is only listed in the DEC file that declares the \r
+                        # If one of the Source built modules listed in the DSC is not listed\r
+                        # in FDF modules, and the INF lists a PCD can only use the PcdsDynamic\r
+                        # access method (it is only listed in the DEC file that declares the\r
                         # PCD as PcdsDynamic), then build tool will report warning message\r
-                        # notify the PI that they are attempting to build a module that must \r
-                        # be included in a flash image in order to be functional. These Dynamic \r
-                        # PCD will not be added into the Database unless it is used by other \r
+                        # notify the PI that they are attempting to build a module that must\r
+                        # be included in a flash image in order to be functional. These Dynamic\r
+                        # PCD will not be added into the Database unless it is used by other\r
                         # modules that are included in the FDF file.\r
                         if PcdFromModule.Type in PCD_DYNAMIC_TYPE_SET and \\r
                             PcdFromModule.IsFromBinaryInf == False:\r
                             # Print warning message to let the developer make a determine.\r
                             continue\r
-                        # If one of the Source built modules listed in the DSC is not listed in \r
-                        # FDF modules, and the INF lists a PCD can only use the PcdsDynamicEx \r
-                        # access method (it is only listed in the DEC file that declares the \r
-                        # PCD as PcdsDynamicEx), then DO NOT break the build; DO NOT add the \r
+                        # If one of the Source built modules listed in the DSC is not listed in\r
+                        # FDF modules, and the INF lists a PCD can only use the PcdsDynamicEx\r
+                        # access method (it is only listed in the DEC file that declares the\r
+                        # PCD as PcdsDynamicEx), then DO NOT break the build; DO NOT add the\r
                         # PCD to the Platform's PCD Database.\r
                         if PcdFromModule.Type in PCD_DYNAMIC_EX_TYPE_SET:\r
                             continue\r
@@ -1465,14 +1465,14 @@ class PlatformAutoGen(AutoGen):
                         PcdFromModule.Pending = False\r
                         self._NonDynaPcdList_.append (PcdFromModule)\r
         DscModuleSet = {os.path.normpath(ModuleInf.Path) for ModuleInf in self.Platform.Modules}\r
-        # add the PCD from modules that listed in FDF but not in DSC to Database \r
+        # add the PCD from modules that listed in FDF but not in DSC to Database\r
         for InfName in FdfModuleList:\r
             if InfName not in DscModuleSet:\r
                 InfClass = PathClass(InfName)\r
                 M = self.BuildDatabase[InfClass, self.Arch, self.BuildTarget, self.ToolChain]\r
-                # If a module INF in FDF but not in current arch's DSC module list, it must be module (either binary or source) \r
-                # for different Arch. PCDs in source module for different Arch is already added before, so skip the source module here. \r
-                # For binary module, if in current arch, we need to list the PCDs into database.   \r
+                # If a module INF in FDF but not in current arch's DSC module list, it must be module (either binary or source)\r
+                # for different Arch. PCDs in source module for different Arch is already added before, so skip the source module here.\r
+                # For binary module, if in current arch, we need to list the PCDs into database.\r
                 if not M.IsSupportedArch:\r
                     continue\r
                 # Override the module PCD setting by platform setting\r
@@ -1497,20 +1497,20 @@ class PlatformAutoGen(AutoGen):
                         self._NonDynaPcdList_.append(PcdFromModule)\r
                     if PcdFromModule in self._DynaPcdList_ and PcdFromModule.Phase == 'PEI' and PcdFromModule.Type in PCD_DYNAMIC_EX_TYPE_SET:\r
                         # Overwrite the phase of any the same PCD existing, if Phase is PEI.\r
-                        # It is to solve the case that a dynamic PCD used by a PEM module/PEI \r
+                        # It is to solve the case that a dynamic PCD used by a PEM module/PEI\r
                         # module & DXE module at a same time.\r
                         # Overwrite the type of the PCDs in source INF by the type of AsBuild\r
-                        # INF file as DynamicEx. \r
+                        # INF file as DynamicEx.\r
                         Index = self._DynaPcdList_.index(PcdFromModule)\r
                         self._DynaPcdList_[Index].Phase = PcdFromModule.Phase\r
                         self._DynaPcdList_[Index].Type = PcdFromModule.Type\r
         for PcdFromModule in self._NonDynaPcdList_:\r
-            # If a PCD is not listed in the DSC file, but binary INF files used by \r
-            # this platform all (that use this PCD) list the PCD in a [PatchPcds] \r
-            # section, AND all source INF files used by this platform the build \r
-            # that use the PCD list the PCD in either a [Pcds] or [PatchPcds] \r
+            # If a PCD is not listed in the DSC file, but binary INF files used by\r
+            # this platform all (that use this PCD) list the PCD in a [PatchPcds]\r
+            # section, AND all source INF files used by this platform the build\r
+            # that use the PCD list the PCD in either a [Pcds] or [PatchPcds]\r
             # section, then the tools must NOT add the PCD to the Platform's PCD\r
-            # Database; the build must assign the access method for this PCD as \r
+            # Database; the build must assign the access method for this PCD as\r
             # PcdsPatchableInModule.\r
             if PcdFromModule not in self._DynaPcdList_:\r
                 continue\r
@@ -1533,7 +1533,7 @@ class PlatformAutoGen(AutoGen):
         self._DynamicPcdList = self._DynaPcdList_\r
         #\r
         # Sort dynamic PCD list to:\r
-        # 1) If PCD's datum type is VOID* and value is unicode string which starts with L, the PCD item should \r
+        # 1) If PCD's datum type is VOID* and value is unicode string which starts with L, the PCD item should\r
         #    try to be put header of dynamicd List\r
         # 2) If PCD is HII type, the PCD item should be put after unicode type PCD\r
         #\r
@@ -1554,7 +1554,7 @@ class PlatformAutoGen(AutoGen):
             if self._PlatformPcds[item].DatumType and self._PlatformPcds[item].DatumType not in [TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64, TAB_VOID, "BOOLEAN"]:\r
                 self._PlatformPcds[item].DatumType = TAB_VOID\r
 \r
-        if (self.Workspace.ArchList[-1] == self.Arch): \r
+        if (self.Workspace.ArchList[-1] == self.Arch):\r
             for Pcd in self._DynamicPcdList:\r
                 # just pick the a value to determine whether is unicode string type\r
                 Sku = Pcd.SkuInfoList.values()[0]\r
@@ -1637,7 +1637,7 @@ class PlatformAutoGen(AutoGen):
             #\r
             # Fix the PCDs define in VPD PCD section that never referenced by module.\r
             # An example is PCD for signature usage.\r
-            #            \r
+            #\r
             for DscPcd in PlatformPcds:\r
                 DscPcdEntry = self._PlatformPcds[DscPcd]\r
                 if DscPcdEntry.Type in [TAB_PCDS_DYNAMIC_VPD, TAB_PCDS_DYNAMIC_EX_VPD]:\r
@@ -1659,8 +1659,8 @@ class PlatformAutoGen(AutoGen):
                                 defaultindex = SkuObjList.index((TAB_DEFAULT, DefaultSku))\r
                                 SkuObjList[0], SkuObjList[defaultindex] = SkuObjList[defaultindex], SkuObjList[0]\r
                             for (SkuName, Sku) in SkuObjList:\r
-                                Sku.VpdOffset = Sku.VpdOffset.strip() \r
-                                \r
+                                Sku.VpdOffset = Sku.VpdOffset.strip()\r
+\r
                                 # Need to iterate DEC pcd information to get the value & datumtype\r
                                 for eachDec in self.PackageList:\r
                                     for DecPcd in eachDec.Pcds:\r
@@ -1671,8 +1671,8 @@ class PlatformAutoGen(AutoGen):
                                             EdkLogger.warn("build", "Unreferenced vpd pcd used!",\r
                                                             File=self.MetaFile, \\r
                                                             ExtraData = "PCD: %s.%s used in the DSC file %s is unreferenced." \\r
-                                                            %(DscPcdEntry.TokenSpaceGuidCName, DscPcdEntry.TokenCName, self.Platform.MetaFile.Path))  \r
-                                                                                  \r
+                                                            %(DscPcdEntry.TokenSpaceGuidCName, DscPcdEntry.TokenCName, self.Platform.MetaFile.Path))\r
+\r
                                             DscPcdEntry.DatumType    = DecPcdEntry.DatumType\r
                                             DscPcdEntry.DefaultValue = DecPcdEntry.DefaultValue\r
                                             DscPcdEntry.TokenValue = DecPcdEntry.TokenValue\r
@@ -1680,7 +1680,7 @@ class PlatformAutoGen(AutoGen):
                                             # Only fix the value while no value provided in DSC file.\r
                                             if not Sku.DefaultValue:\r
                                                 DscPcdEntry.SkuInfoList[DscPcdEntry.SkuInfoList.keys()[0]].DefaultValue = DecPcdEntry.DefaultValue\r
-                                                                                                                    \r
+\r
                                 if DscPcdEntry not in self._DynamicPcdList:\r
                                     self._DynamicPcdList.append(DscPcdEntry)\r
                                 Sku.VpdOffset = Sku.VpdOffset.strip()\r
@@ -1711,7 +1711,7 @@ class PlatformAutoGen(AutoGen):
                                     VpdFile.Add(DscPcdEntry, SkuName, Sku.VpdOffset)\r
                                 SkuValueMap[PcdValue].append(Sku)\r
                                 if not NeedProcessVpdMapFile and Sku.VpdOffset == "*":\r
-                                    NeedProcessVpdMapFile = True \r
+                                    NeedProcessVpdMapFile = True\r
                             if DscPcdEntry.DatumType == TAB_VOID and PcdValue.startswith("L"):\r
                                 UnicodePcdArray.add(DscPcdEntry)\r
                             elif len(Sku.VariableName) > 0:\r
@@ -1723,7 +1723,7 @@ class PlatformAutoGen(AutoGen):
                             VpdSkuMap[DscPcd] = SkuValueMap\r
             if (self.Platform.FlashDefinition is None or self.Platform.FlashDefinition == '') and \\r
                VpdFile.GetCount() != 0:\r
-                EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE, \r
+                EdkLogger.error("build", ATTRIBUTE_NOT_AVAILABLE,\r
                                 "Fail to get FLASH_DEFINITION definition in DSC file %s which is required when DSC contains VPD PCD." % str(self.Platform.MetaFile))\r
 \r
             if VpdFile.GetCount() != 0:\r
@@ -2071,9 +2071,9 @@ class PlatformAutoGen(AutoGen):
             self._PcdTokenNumber = OrderedDict()\r
             TokenNumber = 1\r
             #\r
-            # Make the Dynamic and DynamicEx PCD use within different TokenNumber area. \r
+            # Make the Dynamic and DynamicEx PCD use within different TokenNumber area.\r
             # Such as:\r
-            # \r
+            #\r
             # Dynamic PCD:\r
             # TokenNumber 0 ~ 10\r
             # DynamicEx PCD:\r
@@ -2388,7 +2388,7 @@ class PlatformAutoGen(AutoGen):
     #   @param  Options     Options to be expanded\r
     #\r
     #   @retval options     Options expanded\r
-    #      \r
+    #\r
     def _ExpandBuildOption(self, Options, ModuleStyle=None):\r
         BuildOptions = {}\r
         FamilyMatch  = False\r
@@ -2414,9 +2414,9 @@ class PlatformAutoGen(AutoGen):
                     if OverrideList.get(Key[1]) is not None:\r
                         OverrideList.pop(Key[1])\r
                     OverrideList[Key[1]] = Options[Key]\r
-        \r
+\r
         #\r
-        # Use the highest priority value. \r
+        # Use the highest priority value.\r
         #\r
         if (len(OverrideList) >= 2):\r
             KeyList = OverrideList.keys()\r
@@ -2427,7 +2427,7 @@ class PlatformAutoGen(AutoGen):
                     NextKey = KeyList[Index1 + Index + 1]\r
                     #\r
                     # Compare two Key, if one is included by another, choose the higher priority one\r
-                    #                    \r
+                    #\r
                     Target2, ToolChain2, Arch2, CommandType2, Attr2 = NextKey.split("_")\r
                     if (Target1 == Target2 or Target1 == "*" or Target2 == "*") and\\r
                         (ToolChain1 == ToolChain2 or ToolChain1 == "*" or ToolChain2 == "*") and\\r
@@ -2441,7 +2441,7 @@ class PlatformAutoGen(AutoGen):
                         else:\r
                             if Options.get((self.BuildRuleFamily, NowKey)) is not None:\r
                                 Options.pop((self.BuildRuleFamily, NowKey))\r
-                                                           \r
+\r
         for Key in Options:\r
             if ModuleStyle is not None and len (Key) > 2:\r
                 # Check Module style is EDK or EDKII.\r
@@ -2639,7 +2639,7 @@ class ModuleAutoGen(AutoGen):
                               % (MetaFile, Arch))\r
             return None\r
         return obj\r
-            \r
+\r
     ## Initialize ModuleAutoGen\r
     #\r
     #   @param      Workspace           EdkIIWorkspaceBuild object\r
@@ -2737,13 +2737,13 @@ class ModuleAutoGen(AutoGen):
 \r
         self.AutoGenDepSet = set()\r
 \r
-        \r
+\r
         ## The Modules referenced to this Library\r
         #  Only Library has this attribute\r
-        self._ReferenceModules        = []        \r
-        \r
+        self._ReferenceModules        = []\r
+\r
         ## Store the FixedAtBuild Pcds\r
-        #  \r
+        #\r
         self._FixedAtBuildPcds         = []\r
         self.ConstPcd                  = {}\r
 \r
@@ -2759,8 +2759,8 @@ class ModuleAutoGen(AutoGen):
                 continue\r
             if Pcd not in self._FixedAtBuildPcds:\r
                 self._FixedAtBuildPcds.append(Pcd)\r
-                \r
-        return self._FixedAtBuildPcds        \r
+\r
+        return self._FixedAtBuildPcds\r
 \r
     def _GetUniqueBaseName(self):\r
         BaseName = self.Name\r
@@ -2959,7 +2959,7 @@ class ModuleAutoGen(AutoGen):
                     continue\r
                 PackageList.append(Package)\r
         return PackageList\r
-    \r
+\r
     ## Get the depex string\r
     #\r
     # @return : a string contain all depex expresion.\r
@@ -2988,7 +2988,7 @@ class ModuleAutoGen(AutoGen):
                           (Arch.upper() == self.Arch.upper() and \\r
                           ModuleType.upper() in [TAB_ARCH_COMMON, self.ModuleType.upper()]):\r
                             DepexList.append({(Arch, ModuleType): DepexExpr})\r
-        \r
+\r
         #the type of build module is USER_DEFINED.\r
         if self.ModuleType.upper() == SUP_MODULE_USER_DEFINED:\r
             for Depex in DepexList:\r
@@ -2999,7 +2999,7 @@ class ModuleAutoGen(AutoGen):
             if not DepexStr:\r
                 return '[Depex.%s]\n' % self.Arch\r
             return DepexStr\r
-        \r
+\r
         #the type of build module not is USER_DEFINED.\r
         Count = 0\r
         for Depex in DepexList:\r
@@ -3019,7 +3019,7 @@ class ModuleAutoGen(AutoGen):
         if not DepexStr:\r
             return '[Depex.%s]\n' % self.Arch\r
         return '[Depex.%s]\n#  ' % self.Arch + DepexStr\r
-    \r
+\r
     ## Merge dependency expression\r
     #\r
     #   @retval     list    The token list of the dependency expression after parsed\r
@@ -3155,14 +3155,14 @@ class ModuleAutoGen(AutoGen):
                 #\r
                 self._BuildOptionIncPathList = []\r
                 return self._BuildOptionIncPathList\r
-            \r
+\r
             BuildOptionIncPathList = []\r
             for Tool in ('CC', 'PP', 'VFRPP', 'ASLPP', 'ASLCC', 'APP', 'ASM'):\r
                 try:\r
                     FlagOption = self.BuildOption[Tool]['FLAGS']\r
                 except KeyError:\r
                     FlagOption = ''\r
-                \r
+\r
                 if self.PlatformInfo.ToolChainFamily != 'RVCT':\r
                     IncPathList = [NormPath(Path, self.Macros) for Path in BuildOptIncludeRegEx.findall(FlagOption)]\r
                 else:\r
@@ -3175,7 +3175,7 @@ class ModuleAutoGen(AutoGen):
                         IncPathList.extend(NormPath(PathEntry, self.Macros) for PathEntry in PathList)\r
 \r
                 #\r
-                # EDK II modules must not reference header files outside of the packages they depend on or \r
+                # EDK II modules must not reference header files outside of the packages they depend on or\r
                 # within the module's directory tree. Report error if violation.\r
                 #\r
                 if self.AutoGenVersion >= 0x00010005:\r
@@ -3187,13 +3187,13 @@ class ModuleAutoGen(AutoGen):
                                             ExtraData=ErrMsg,\r
                                             File=str(self.MetaFile))\r
 \r
-                \r
+\r
                 BuildOptionIncPathList += IncPathList\r
-            \r
+\r
             self._BuildOptionIncPathList = BuildOptionIncPathList\r
-        \r
+\r
         return self._BuildOptionIncPathList\r
-        \r
+\r
     ## Return a list of files which can be built from source\r
     #\r
     #  What kind of files can be built is determined by build rules in\r
@@ -3247,7 +3247,7 @@ class ModuleAutoGen(AutoGen):
                 Order_Dict[F].sort(key=lambda i: self.BuildRuleOrder.index(i))\r
                 for Ext in Order_Dict[F][1:]:\r
                     RemoveList.append(F + Ext)\r
-                   \r
+\r
         for item in RemoveList:\r
             FileList.remove(item)\r
 \r
@@ -3690,12 +3690,12 @@ class ModuleAutoGen(AutoGen):
         for SourceFile in self.Module.Sources:\r
             if SourceFile.Type.upper() == ".VFR" :\r
                 #\r
-                # search the .map file to find the offset of vfr binary in the PE32+/TE file. \r
+                # search the .map file to find the offset of vfr binary in the PE32+/TE file.\r
                 #\r
                 VfrUniBaseName[SourceFile.BaseName] = (SourceFile.BaseName + "Bin")\r
             elif SourceFile.Type.upper() == ".UNI" :\r
                 #\r
-                # search the .map file to find the offset of Uni strings binary in the PE32+/TE file. \r
+                # search the .map file to find the offset of Uni strings binary in the PE32+/TE file.\r
                 #\r
                 VfrUniBaseName["UniOffsetName"] = (self.Name + "Strings")\r
 \r
@@ -3727,7 +3727,7 @@ class ModuleAutoGen(AutoGen):
                 #\r
                 UniGuid = [0xe0, 0xc5, 0x13, 0x89, 0xf6, 0x33, 0x86, 0x4d, 0x9b, 0xf1, 0x43, 0xef, 0x89, 0xfc, 0x6, 0x66]\r
                 UniGuid = [chr(ItemGuid) for ItemGuid in UniGuid]\r
-                fStringIO.write(''.join(UniGuid))            \r
+                fStringIO.write(''.join(UniGuid))\r
                 UniValue = pack ('Q', int (Item[1], 16))\r
                 fStringIO.write (UniValue)\r
             else:\r
@@ -3738,13 +3738,13 @@ class ModuleAutoGen(AutoGen):
                 #\r
                 VfrGuid = [0xb4, 0x7c, 0xbc, 0xd0, 0x47, 0x6a, 0x5f, 0x49, 0xaa, 0x11, 0x71, 0x7, 0x46, 0xda, 0x6, 0xa2]\r
                 VfrGuid = [chr(ItemGuid) for ItemGuid in VfrGuid]\r
-                fStringIO.write(''.join(VfrGuid))                   \r
+                fStringIO.write(''.join(VfrGuid))\r
                 VfrValue = pack ('Q', int (Item[1], 16))\r
                 fStringIO.write (VfrValue)\r
         #\r
         # write data into file.\r
         #\r
-        try :  \r
+        try :\r
             fInputfile.write (fStringIO.getvalue())\r
         except:\r
             EdkLogger.error("build", FILE_WRITE_FAILURE, "Write data to file %s failed, please check whether the "\r
@@ -3764,15 +3764,15 @@ class ModuleAutoGen(AutoGen):
 \r
         if self.IsAsBuiltInfCreated:\r
             return\r
-            \r
+\r
         # Skip the following code for EDK I inf\r
         if self.AutoGenVersion < 0x00010005:\r
             return\r
-            \r
+\r
         # Skip the following code for libraries\r
         if self.IsLibrary:\r
             return\r
-            \r
+\r
         # Skip the following code for modules with no source files\r
         if not self.SourceFileList:\r
             return\r
@@ -3780,7 +3780,7 @@ class ModuleAutoGen(AutoGen):
         # Skip the following code for modules without any binary files\r
         if self.BinaryFileList:\r
             return\r
-            \r
+\r
         ### TODO: How to handles mixed source and binary modules\r
 \r
         # Find all DynamicEx and PatchableInModule PCDs used by this module and dependent libraries\r
@@ -4054,7 +4054,7 @@ class ModuleAutoGen(AutoGen):
                             UsageIndex = Index\r
                             break\r
                 if UsageIndex != -1:\r
-                    PcdCommentList[UsageIndex] = '## %s %s %s' % (UsageStr, HiiInfo, PcdCommentList[UsageIndex].replace(UsageStr, '')) \r
+                    PcdCommentList[UsageIndex] = '## %s %s %s' % (UsageStr, HiiInfo, PcdCommentList[UsageIndex].replace(UsageStr, ''))\r
                 else:\r
                     PcdCommentList.append('## UNDEFINED ' + HiiInfo)\r
             PcdComments = '\n  '.join(PcdCommentList)\r
@@ -4069,7 +4069,7 @@ class ModuleAutoGen(AutoGen):
         # Generated LibraryClasses section in comments.\r
         for Library in self.LibraryAutoGenList:\r
             AsBuiltInfDict['libraryclasses_item'].append(Library.MetaFile.File.replace('\\', '/'))\r
-        \r
+\r
         # Generated UserExtensions TianoCore section.\r
         # All tianocore user extensions are copied.\r
         UserExtStr = ''\r
@@ -4083,12 +4083,12 @@ class ModuleAutoGen(AutoGen):
         # Generated depex expression section in comments.\r
         DepexExpresion = self._GetDepexExpresionString()\r
         AsBuiltInfDict['depexsection_item'] = DepexExpresion if DepexExpresion else ''\r
-        \r
+\r
         AsBuiltInf = TemplateString()\r
         AsBuiltInf.Append(gAsBuiltInfHeaderString.Replace(AsBuiltInfDict))\r
-        \r
+\r
         SaveFileOnChange(os.path.join(self.OutputDir, self.Name + '.inf'), str(AsBuiltInf), False)\r
-        \r
+\r
         self.IsAsBuiltInfCreated = True\r
         if GlobalData.gBinCacheDest:\r
             self.CopyModuleToCache()\r
@@ -4408,7 +4408,7 @@ class ModuleAutoGen(AutoGen):
     BuildOption             = property(_GetModuleBuildOption)\r
     BuildOptionIncPathList  = property(_GetBuildOptionIncPathList)\r
     BuildCommand            = property(_GetBuildCommand)\r
-    \r
+\r
     FixedAtBuildPcds         = property(_GetFixedAtBuildPcds)\r
     UniqueBaseName          = property(_GetUniqueBaseName)\r
 \r
index e205589c6bd1110e1cb1f929fc30a77ccdee9bd7..8a32343846569f33258c2de62029615fdca13afe 100644 (file)
@@ -360,7 +360,7 @@ class BuildRule:
             # Clean up the line and replace path separator with native one\r
             Line = self.RuleContent[Index].strip().replace(self._PATH_SEP, os.path.sep)\r
             self.RuleContent[Index] = Line\r
-            \r
+\r
             # find the build_rule_version\r
             if Line and Line[0] == "#" and Line.find(TAB_BUILD_RULE_VERSION) != -1:\r
                 if Line.find("=") != -1 and Line.find("=") < (len(Line) - 1) and (Line[(Line.find("=") + 1):]).split():\r
index 5c3552a773c02fb4d082eb3e301b741a1f26a4e2..eac41ed9bf81a7b8910b9a95ea679efc0ec818b8 100644 (file)
@@ -784,7 +784,7 @@ gModuleTypeHeaderFile = {
     SUP_MODULE_USER_DEFINED      :   [gBasicHeaderFile]\r
 }\r
 \r
-## Autogen internal worker macro to define DynamicEx PCD name includes both the TokenSpaceGuidName \r
+## Autogen internal worker macro to define DynamicEx PCD name includes both the TokenSpaceGuidName\r
 #  the TokenName and Guid comparison to avoid define name collisions.\r
 #\r
 #   @param      Info        The ModuleAutoGen object\r
@@ -804,7 +804,7 @@ def DynExPcdTokenNumberMapping(Info, AutoGenH):
         return\r
     AutoGenH.Append('\n#define COMPAREGUID(Guid1, Guid2) (BOOLEAN)(*(CONST UINT64*)Guid1 == *(CONST UINT64*)Guid2 && *((CONST UINT64*)Guid1 + 1) == *((CONST UINT64*)Guid2 + 1))\n')\r
     # AutoGen for each PCD listed in a [PcdEx] section of a Module/Lib INF file.\r
-    # Auto generate a macro for each TokenName that takes a Guid pointer as a parameter.  \r
+    # Auto generate a macro for each TokenName that takes a Guid pointer as a parameter.\r
     # Use the Guid pointer to see if it matches any of the token space GUIDs.\r
     TokenCNameList = set()\r
     for TokenCName in ExTokenCNameList:\r
@@ -822,15 +822,15 @@ def DynExPcdTokenNumberMapping(Info, AutoGenH):
                 Index = Index + 1\r
                 if Index == 1:\r
                     AutoGenH.Append('\n#define __PCD_%s_ADDR_CMP(GuidPtr)  (' % (RealTokenCName))\r
-                    AutoGenH.Append('\\\n  (GuidPtr == &%s) ? _PCD_TOKEN_%s_%s:' \r
+                    AutoGenH.Append('\\\n  (GuidPtr == &%s) ? _PCD_TOKEN_%s_%s:'\r
                                     % (Pcd.TokenSpaceGuidCName, Pcd.TokenSpaceGuidCName, RealTokenCName))\r
                 else:\r
-                    AutoGenH.Append('\\\n  (GuidPtr == &%s) ? _PCD_TOKEN_%s_%s:' \r
+                    AutoGenH.Append('\\\n  (GuidPtr == &%s) ? _PCD_TOKEN_%s_%s:'\r
                                     % (Pcd.TokenSpaceGuidCName, Pcd.TokenSpaceGuidCName, RealTokenCName))\r
                 if Index == Count:\r
                     AutoGenH.Append('0 \\\n  )\n')\r
                 TokenCNameList.add(TokenCName)\r
-    \r
+\r
     TokenCNameList = set()\r
     for TokenCName in ExTokenCNameList:\r
         if TokenCName in TokenCNameList:\r
@@ -848,14 +848,14 @@ def DynExPcdTokenNumberMapping(Info, AutoGenH):
                 if Index == 1:\r
                     AutoGenH.Append('\n#define __PCD_%s_VAL_CMP(GuidPtr)  (' % (RealTokenCName))\r
                     AutoGenH.Append('\\\n  (GuidPtr == NULL) ? 0:')\r
-                    AutoGenH.Append('\\\n  COMPAREGUID (GuidPtr, &%s) ? _PCD_TOKEN_%s_%s:' \r
+                    AutoGenH.Append('\\\n  COMPAREGUID (GuidPtr, &%s) ? _PCD_TOKEN_%s_%s:'\r
                                     % (Pcd.TokenSpaceGuidCName, Pcd.TokenSpaceGuidCName, RealTokenCName))\r
                 else:\r
-                    AutoGenH.Append('\\\n  COMPAREGUID (GuidPtr, &%s) ? _PCD_TOKEN_%s_%s:' \r
+                    AutoGenH.Append('\\\n  COMPAREGUID (GuidPtr, &%s) ? _PCD_TOKEN_%s_%s:'\r
                                     % (Pcd.TokenSpaceGuidCName, Pcd.TokenSpaceGuidCName, RealTokenCName))\r
                 if Index == Count:\r
                     AutoGenH.Append('0 \\\n  )\n')\r
-                    # Autogen internal worker macro to compare GUIDs.  Guid1 is a pointer to a GUID.  \r
+                    # Autogen internal worker macro to compare GUIDs.  Guid1 is a pointer to a GUID.\r
                     # Guid2 is a C name for a GUID. Compare pointers first because optimizing compiler\r
                     # can do this at build time on CONST GUID pointers and optimize away call to COMPAREGUID().\r
                     #  COMPAREGUID() will only be used if the Guid passed in is local to the module.\r
@@ -890,22 +890,22 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
 \r
     if Pcd.PcdValueFromComm:\r
         Pcd.DefaultValue = Pcd.PcdValueFromComm\r
-    \r
+\r
     if Pcd.Type in PCD_DYNAMIC_EX_TYPE_SET:\r
         TokenNumber = int(Pcd.TokenValue, 0)\r
-        # Add TokenSpaceGuidValue value to PcdTokenName to discriminate the DynamicEx PCDs with \r
+        # Add TokenSpaceGuidValue value to PcdTokenName to discriminate the DynamicEx PCDs with\r
         # different Guids but same TokenCName\r
         PcdExTokenName = '_PCD_TOKEN_' + Pcd.TokenSpaceGuidCName + '_' + TokenCName\r
         AutoGenH.Append('\n#define %s  %dU\n' % (PcdExTokenName, TokenNumber))\r
     else:\r
         if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) not in PcdTokenNumber:\r
-            # If one of the Source built modules listed in the DSC is not listed in FDF modules, \r
-            # and the INF lists a PCD can only use the PcdsDynamic access method (it is only \r
-            # listed in the DEC file that declares the PCD as PcdsDynamic), then build tool will \r
-            # report warning message notify the PI that they are attempting to build a module \r
-            # that must be included in a flash image in order to be functional. These Dynamic PCD \r
-            # will not be added into the Database unless it is used by other modules that are \r
-            # included in the FDF file. \r
+            # If one of the Source built modules listed in the DSC is not listed in FDF modules,\r
+            # and the INF lists a PCD can only use the PcdsDynamic access method (it is only\r
+            # listed in the DEC file that declares the PCD as PcdsDynamic), then build tool will\r
+            # report warning message notify the PI that they are attempting to build a module\r
+            # that must be included in a flash image in order to be functional. These Dynamic PCD\r
+            # will not be added into the Database unless it is used by other modules that are\r
+            # included in the FDF file.\r
             # In this case, just assign an invalid token number to make it pass build.\r
             if Pcd.Type in PCD_DYNAMIC_TYPE_SET:\r
                 TokenNumber = 0\r
@@ -929,7 +929,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
     SetModeName = '_PCD_SET_MODE_' + gDatumSizeStringDatabaseH[Pcd.DatumType] + '_' + TokenCName if Pcd.DatumType in gDatumSizeStringDatabaseH else '_PCD_SET_MODE_' + gDatumSizeStringDatabaseH[TAB_VOID] + '_' + TokenCName\r
     SetModeStatusName = '_PCD_SET_MODE_' + gDatumSizeStringDatabaseH[Pcd.DatumType] + '_S_' + TokenCName if Pcd.DatumType in gDatumSizeStringDatabaseH else '_PCD_SET_MODE_' + gDatumSizeStringDatabaseH[TAB_VOID] + '_S_' + TokenCName\r
     GetModeSizeName = '_PCD_GET_MODE_SIZE' + '_' + TokenCName\r
-    \r
+\r
     if Pcd.Type in PCD_DYNAMIC_EX_TYPE_SET:\r
         if Info.IsLibrary:\r
             PcdList = Info.LibraryPcdList\r
@@ -1044,7 +1044,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
                                     "Too large PCD value for datum type [%s] of PCD %s.%s" % (Pcd.DatumType, Pcd.TokenSpaceGuidCName, TokenCName),\r
                                     ExtraData="[%s]" % str(Info))\r
                 if not Value.endswith('U'):\r
-                    Value += 'U'                    \r
+                    Value += 'U'\r
             elif Pcd.DatumType == TAB_UINT8:\r
                 if ValueNumber < 0:\r
                     EdkLogger.error("build", AUTOGEN_ERROR,\r
@@ -1102,7 +1102,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
             PcdValueName = '_PCD_PATCHABLE_VALUE_' + TokenCName\r
         else:\r
             PcdValueName = '_PCD_VALUE_' + TokenCName\r
-            \r
+\r
         if Pcd.DatumType not in TAB_PCD_NUMERIC_TYPES:\r
             #\r
             # For unicode, UINT16 array will be generated, so the alignment of unicode is guaranteed.\r
@@ -1115,7 +1115,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
                 AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s UINT8 %s%s = %s;\n' % (Const, PcdVariableName, Array, Value))\r
                 AutoGenH.Append('extern %s UINT8 %s%s;\n' %(Const, PcdVariableName, Array))\r
             AutoGenH.Append('#define %s  %s%s\n' %(GetModeName, Type, PcdVariableName))\r
-                \r
+\r
             PcdDataSize = Pcd.GetPcdSize()\r
             if Pcd.Type == TAB_PCDS_FIXED_AT_BUILD:\r
                 AutoGenH.Append('#define %s %s\n' % (FixPcdSizeTokenName, PcdDataSize))\r
@@ -1132,10 +1132,10 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
             AutoGenC.Append('volatile %s %s %s = %s;\n' %(Const, Pcd.DatumType, PcdVariableName, PcdValueName))\r
             AutoGenH.Append('extern volatile %s  %s  %s%s;\n' % (Const, Pcd.DatumType, PcdVariableName, Array))\r
             AutoGenH.Append('#define %s  %s%s\n' % (GetModeName, Type, PcdVariableName))\r
-            \r
+\r
             PcdDataSize = Pcd.GetPcdSize()\r
             AutoGenH.Append('#define %s %s\n' % (PatchPcdSizeTokenName, PcdDataSize))\r
-            \r
+\r
             AutoGenH.Append('#define %s  %s \n' % (GetModeSizeName, PatchPcdSizeVariableName))\r
             AutoGenH.Append('extern UINTN %s; \n' % PatchPcdSizeVariableName)\r
             AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED UINTN %s = %s;\n' % (PatchPcdSizeVariableName, PcdDataSize))\r
@@ -1143,7 +1143,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
             PcdDataSize = Pcd.GetPcdSize()\r
             AutoGenH.Append('#define %s %s\n' % (FixPcdSizeTokenName, PcdDataSize))\r
             AutoGenH.Append('#define %s  %s \n' % (GetModeSizeName, FixPcdSizeTokenName))\r
-            \r
+\r
             AutoGenH.Append('#define %s  %s\n' %(PcdValueName, Value))\r
             AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s %s = %s;\n' %(Const, Pcd.DatumType, PcdVariableName, PcdValueName))\r
             AutoGenH.Append('extern %s  %s  %s%s;\n' % (Const, Pcd.DatumType, PcdVariableName, Array))\r
@@ -1190,13 +1190,13 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd):
         TokenNumber = int(Pcd.TokenValue, 0)\r
     else:\r
         if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) not in PcdTokenNumber:\r
-            # If one of the Source built modules listed in the DSC is not listed in FDF modules, \r
-            # and the INF lists a PCD can only use the PcdsDynamic access method (it is only \r
-            # listed in the DEC file that declares the PCD as PcdsDynamic), then build tool will \r
-            # report warning message notify the PI that they are attempting to build a module \r
-            # that must be included in a flash image in order to be functional. These Dynamic PCD \r
-            # will not be added into the Database unless it is used by other modules that are \r
-            # included in the FDF file. \r
+            # If one of the Source built modules listed in the DSC is not listed in FDF modules,\r
+            # and the INF lists a PCD can only use the PcdsDynamic access method (it is only\r
+            # listed in the DEC file that declares the PCD as PcdsDynamic), then build tool will\r
+            # report warning message notify the PI that they are attempting to build a module\r
+            # that must be included in a flash image in order to be functional. These Dynamic PCD\r
+            # will not be added into the Database unless it is used by other modules that are\r
+            # included in the FDF file.\r
             # In this case, just assign an invalid token number to make it pass build.\r
             if Pcd.Type in PCD_DYNAMIC_TYPE_SET:\r
                 TokenNumber = 0\r
@@ -1230,7 +1230,7 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd):
     if PcdItemType in PCD_DYNAMIC_EX_TYPE_SET:\r
         PcdExTokenName = '_PCD_TOKEN_' + TokenSpaceGuidCName + '_' + TokenCName\r
         AutoGenH.Append('\n#define %s  %dU\n' % (PcdExTokenName, TokenNumber))\r
-        \r
+\r
         if Info.IsLibrary:\r
             PcdList = Info.LibraryPcdList\r
         else:\r
@@ -1312,7 +1312,7 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd):
 \r
         AutoGenH.Append('#define %s %s\n' % (GetModeSizeName, PatchPcdSizeVariableName))\r
         AutoGenH.Append('extern UINTN %s; \n' % PatchPcdSizeVariableName)\r
-        \r
+\r
     if PcdItemType == TAB_PCDS_FIXED_AT_BUILD or PcdItemType == TAB_PCDS_FEATURE_FLAG:\r
         key = ".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName))\r
         PcdVariableName = '_gPcd_' + gItemTypeStringDatabase[Pcd.Type] + '_' + TokenCName\r
@@ -1323,7 +1323,7 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd):
         AutoGenH.Append('extern const %s _gPcd_FixedAtBuild_%s%s;\n' %(DatumType, TokenCName, Array))\r
         AutoGenH.Append('#define %s  %s_gPcd_FixedAtBuild_%s\n' %(GetModeName, Type, TokenCName))\r
         AutoGenH.Append('//#define %s  ASSERT(FALSE)  // It is not allowed to set value for a FIXED_AT_BUILD PCD\n' % SetModeName)\r
-        \r
+\r
         ConstFixedPcd = False\r
         if PcdItemType == TAB_PCDS_FIXED_AT_BUILD and (key in Info.ConstPcd or (Info.IsLibrary and not Info._ReferenceModules)):\r
             ConstFixedPcd = True\r
@@ -1656,7 +1656,7 @@ def CreatePcdCode(Info, AutoGenC, AutoGenH):
     for Pcd in Info.ModulePcdList:\r
         if Pcd.Type in PCD_DYNAMIC_EX_TYPE_SET and Pcd.TokenSpaceGuidCName not in TokenSpaceList:\r
             TokenSpaceList.append(Pcd.TokenSpaceGuidCName)\r
-            \r
+\r
     SkuMgr = Info.Workspace.Platform.SkuIdMgr\r
     AutoGenH.Append("\n// Definition of SkuId Array\n")\r
     AutoGenH.Append("extern UINT64 _gPcd_SkuId_Array[];\n")\r
@@ -1666,7 +1666,7 @@ def CreatePcdCode(Info, AutoGenC, AutoGenH):
         if Info.ModuleType in [SUP_MODULE_USER_DEFINED, SUP_MODULE_BASE]:\r
             GuidType = TAB_GUID\r
         else:\r
-            GuidType = "EFI_GUID"              \r
+            GuidType = "EFI_GUID"\r
         for Item in TokenSpaceList:\r
             AutoGenH.Append('extern %s %s;\n' % (GuidType, Item))\r
 \r
@@ -2016,7 +2016,7 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH):
         if Info.ModuleType in gModuleTypeHeaderFile:\r
             AutoGenH.Append("#include <%s>\n" % gModuleTypeHeaderFile[Info.ModuleType][0])\r
         #\r
-        # if either PcdLib in [LibraryClasses] sections or there exist Pcd section, add PcdLib.h \r
+        # if either PcdLib in [LibraryClasses] sections or there exist Pcd section, add PcdLib.h\r
         # As if modules only uses FixedPcd, then PcdLib is not needed in [LibraryClasses] section.\r
         #\r
         if 'PcdLib' in Info.Module.LibraryClasses or Info.Module.Pcds:\r
index 9fcd7fcc97a97e44d8e61db7d4e75b05553013e3..c90b814e7dbd88e876171eb9946410176c969881 100644 (file)
@@ -182,10 +182,10 @@ typedef struct {
   //UINT32                UninitDataBaseSize;// Total size for PCD those default value with 0.\r
   //TABLE_OFFSET          LocalTokenNumberTableOffset;\r
   //TABLE_OFFSET          ExMapTableOffset;\r
-  //TABLE_OFFSET          GuidTableOffset;     \r
+  //TABLE_OFFSET          GuidTableOffset;\r
   //TABLE_OFFSET          StringTableOffset;\r
   //TABLE_OFFSET          SizeTableOffset;\r
-  //TABLE_OFFSET          SkuIdTableOffset; \r
+  //TABLE_OFFSET          SkuIdTableOffset;\r
   //TABLE_OFFSET          PcdNameTableOffset;\r
   //UINT16                LocalTokenCount;  // LOCAL_TOKEN_NUMBER for all\r
   //UINT16                ExTokenCount;     // EX_TOKEN_NUMBER for DynamicEx\r
@@ -237,11 +237,11 @@ ${PHASE}_PCD_DATABASE_INIT g${PHASE}PcdDbInit = {
 \r
 ## DbItemList\r
 #\r
-#  The class holds the Pcd database items. ItemSize if not zero should match the item datum type in the C structure. \r
+#  The class holds the Pcd database items. ItemSize if not zero should match the item datum type in the C structure.\r
 #  When the structure is changed, remember to check the ItemSize and the related  PackStr in PackData()\r
-#  RawDataList is the RawData that may need some kind of calculation or transformation, \r
+#  RawDataList is the RawData that may need some kind of calculation or transformation,\r
 #  the DataList corresponds to the data that need to be written to database. If DataList is not present, then RawDataList\r
-#  will be written to the database. \r
+#  will be written to the database.\r
 #\r
 class DbItemList:\r
     def __init__(self, ItemSize, DataList=None, RawDataList=None):\r
@@ -309,7 +309,7 @@ class DbItemList:
 \r
 ## DbExMapTblItemList\r
 #\r
-#  The class holds the ExMap table \r
+#  The class holds the ExMap table\r
 #\r
 class DbExMapTblItemList (DbItemList):\r
     def __init__(self, ItemSize, DataList=None, RawDataList=None):\r
@@ -319,15 +319,15 @@ class DbExMapTblItemList (DbItemList):
         Buffer = ''\r
         PackStr = "=LHH"\r
         for Datas in self.RawDataList:\r
-            Buffer += pack(PackStr, \r
+            Buffer += pack(PackStr,\r
                            GetIntegerValue(Datas[0]),\r
                            GetIntegerValue(Datas[1]),\r
-                           GetIntegerValue(Datas[2]))      \r
+                           GetIntegerValue(Datas[2]))\r
         return Buffer\r
 \r
 ## DbComItemList\r
 #\r
-# The DbComItemList is a special kind of DbItemList in case that the size of the List can not be computed by the \r
+# The DbComItemList is a special kind of DbItemList in case that the size of the List can not be computed by the\r
 # ItemSize multiply the ItemCount.\r
 #\r
 class DbComItemList (DbItemList):\r
@@ -345,7 +345,7 @@ class DbComItemList (DbItemList):
         else:\r
             assert(Index < len(self.RawDataList))\r
             for ItemIndex in xrange(Index):\r
-                Offset += len(self.RawDataList[ItemIndex]) * self.ItemSize         \r
+                Offset += len(self.RawDataList[ItemIndex]) * self.ItemSize\r
 \r
         return Offset\r
 \r
@@ -373,12 +373,12 @@ class DbComItemList (DbItemList):
                         Buffer += pack(PackStr, GetIntegerValue(SingleData))\r
                 else:\r
                     Buffer += pack(PackStr, GetIntegerValue(Data))\r
-        \r
+\r
         return Buffer\r
 \r
 ## DbVariableTableItemList\r
 #\r
-#  The class holds the Variable header value table \r
+#  The class holds the Variable header value table\r
 #\r
 class DbVariableTableItemList (DbComItemList):\r
     def __init__(self, ItemSize, DataList=None, RawDataList=None):\r
@@ -389,7 +389,7 @@ class DbVariableTableItemList (DbComItemList):
         Buffer = ''\r
         for DataList in self.RawDataList:\r
             for Data in DataList:\r
-                Buffer += pack(PackStr, \r
+                Buffer += pack(PackStr,\r
                                GetIntegerValue(Data[0]),\r
                                GetIntegerValue(Data[1]),\r
                                GetIntegerValue(Data[2]),\r
@@ -402,7 +402,7 @@ class DbVariableTableItemList (DbComItemList):
 class DbStringHeadTableItemList(DbItemList):\r
     def __init__(self,ItemSize,DataList=None,RawDataList=None):\r
         DbItemList.__init__(self, ItemSize, DataList, RawDataList)\r
-        \r
+\r
     def GetInterOffset(self, Index):\r
         Offset = 0\r
         if self.ItemSize == 0:\r
@@ -435,11 +435,11 @@ class DbStringHeadTableItemList(DbItemList):
                     self.ListSize += len(Datas) * self.ItemSize\r
                 else:\r
                     self.ListSize += self.ItemSize\r
-        return self.ListSize \r
+        return self.ListSize\r
 \r
 ## DbSkuHeadTableItemList\r
 #\r
-#  The class holds the Sku header value table \r
+#  The class holds the Sku header value table\r
 #\r
 class DbSkuHeadTableItemList (DbItemList):\r
     def __init__(self, ItemSize, DataList=None, RawDataList=None):\r
@@ -449,14 +449,14 @@ class DbSkuHeadTableItemList (DbItemList):
         PackStr = "=LL"\r
         Buffer = ''\r
         for Data in self.RawDataList:\r
-            Buffer += pack(PackStr, \r
+            Buffer += pack(PackStr,\r
                            GetIntegerValue(Data[0]),\r
                            GetIntegerValue(Data[1]))\r
         return Buffer\r
 \r
 ## DbSizeTableItemList\r
 #\r
-#  The class holds the size table \r
+#  The class holds the size table\r
 #\r
 class DbSizeTableItemList (DbItemList):\r
     def __init__(self, ItemSize, DataList=None, RawDataList=None):\r
@@ -471,16 +471,16 @@ class DbSizeTableItemList (DbItemList):
         PackStr = "=H"\r
         Buffer = ''\r
         for Data in self.RawDataList:\r
-            Buffer += pack(PackStr, \r
+            Buffer += pack(PackStr,\r
                            GetIntegerValue(Data[0]))\r
             for subData in Data[1]:\r
-                Buffer += pack(PackStr, \r
+                Buffer += pack(PackStr,\r
                            GetIntegerValue(subData))\r
         return Buffer\r
 \r
 ## DbStringItemList\r
 #\r
-#  The class holds the string table \r
+#  The class holds the string table\r
 #\r
 class DbStringItemList (DbComItemList):\r
     def __init__(self, ItemSize, DataList=None, RawDataList=None, LenList=None):\r
@@ -490,7 +490,7 @@ class DbStringItemList (DbComItemList):
             RawDataList = []\r
         if LenList is None:\r
             LenList = []\r
-             \r
+\r
         assert(len(RawDataList) == len(LenList))\r
         DataList = []\r
         # adjust DataList according to the LenList\r
@@ -549,7 +549,7 @@ def GetMatchedIndex(Key1, List1, Key2, List2):
             return Index\r
         else:\r
             StartPos = Index + 1\r
-    \r
+\r
     return -1\r
 \r
 \r
@@ -557,7 +557,7 @@ def GetMatchedIndex(Key1, List1, Key2, List2):
 # to List like [0x36, 0x00, 0x34, 0x00, 0x21, 0x00, 0x36, 0x00, 0x34, 0x00, 0x00, 0x00]\r
 #\r
 #   @param      StringArray A string array like {0x36, 0x00, 0x34, 0x00, 0x21, 0x00, 0x36, 0x00, 0x34, 0x00, 0x00, 0x00}\r
-#  \r
+#\r
 #   @retval                 A list object of integer items\r
 #\r
 def StringArrayToList(StringArray):\r
@@ -569,7 +569,7 @@ def StringArrayToList(StringArray):
 ## Convert TokenType String like  "PCD_DATUM_TYPE_UINT32 | PCD_TYPE_HII" to TokenType value\r
 #\r
 #   @param      TokenType  A TokenType string like "PCD_DATUM_TYPE_UINT32 | PCD_TYPE_HII"\r
-#  \r
+#\r
 #   @retval                A integer representation of the TokenType\r
 #\r
 def GetTokenTypeValue(TokenType):\r
@@ -596,7 +596,7 @@ def GetTokenTypeValue(TokenType):
 ## construct the external Pcd database using data from Dict\r
 #\r
 #   @param      Dict  A dictionary contains Pcd related tables\r
-#  \r
+#\r
 #   @retval     Buffer A byte stream of the Pcd database\r
 #\r
 def BuildExDataBase(Dict):\r
@@ -625,26 +625,26 @@ def BuildExDataBase(Dict):
     NumberOfSkuEnabledPcd = GetIntegerValue(Dict['SKU_HEAD_SIZE'])\r
 \r
     Dict['STRING_TABLE_DB_VALUE'] = [StringArrayToList(x) for x in Dict['STRING_TABLE_VALUE']]\r
-    \r
+\r
     StringTableValue = Dict['STRING_TABLE_DB_VALUE']\r
     # when calcute the offset, should use StringTableLen instead of StringTableValue, as string maxium len may be different with actual len\r
     StringTableLen = Dict['STRING_TABLE_LENGTH']\r
     DbStringTableLen = DbStringItemList(0, RawDataList = StringTableValue, LenList = StringTableLen)\r
 \r
-    \r
+\r
     PcdTokenTable = Dict['PCD_TOKENSPACE']\r
     PcdTokenLen = Dict['PCD_TOKENSPACE_LENGTH']\r
     PcdTokenTableValue = [StringArrayToList(x) for x in Dict['PCD_TOKENSPACE']]\r
     DbPcdTokenTable = DbStringItemList(0, RawDataList = PcdTokenTableValue, LenList = PcdTokenLen)\r
-    \r
+\r
     PcdCNameTable = Dict['PCD_CNAME']\r
     PcdCNameLen = Dict['PCD_CNAME_LENGTH']\r
     PcdCNameTableValue = [StringArrayToList(x) for x in Dict['PCD_CNAME']]\r
     DbPcdCNameTable = DbStringItemList(0, RawDataList = PcdCNameTableValue, LenList = PcdCNameLen)\r
-    \r
+\r
     PcdNameOffsetTable = Dict['PCD_NAME_OFFSET']\r
     DbPcdNameOffsetTable = DbItemList(4, RawDataList = PcdNameOffsetTable)\r
-    \r
+\r
     SizeTableValue = zip(Dict['SIZE_TABLE_MAXIMUM_LENGTH'], Dict['SIZE_TABLE_CURRENT_LENGTH'])\r
     DbSizeTableValue = DbSizeTableItemList(2, RawDataList = SizeTableValue)\r
     InitValueUint16 = Dict['INIT_DB_VALUE_UINT16']\r
@@ -663,7 +663,7 @@ def BuildExDataBase(Dict):
     DbSkuidValue = DbItemList(8, RawDataList = SkuidValue)\r
 \r
 \r
-    \r
+\r
     # Unit Db Items\r
     UnInitValueUint64 = Dict['UNINIT_GUID_DECL_UINT64']\r
     DbUnInitValueUint64 = DbItemList(8, RawDataList = UnInitValueUint64)\r
@@ -676,12 +676,12 @@ def BuildExDataBase(Dict):
     UnInitValueBoolean = Dict['UNINIT_GUID_DECL_BOOLEAN']\r
     DbUnInitValueBoolean = DbItemList(1, RawDataList = UnInitValueBoolean)\r
     PcdTokenNumberMap = Dict['PCD_ORDER_TOKEN_NUMBER_MAP']\r
\r
+\r
     DbNameTotle = ["SkuidValue",  "InitValueUint64", "VardefValueUint64", "InitValueUint32", "VardefValueUint32", "VpdHeadValue", "ExMapTable",\r
                "LocalTokenNumberTable", "GuidTable", "StringHeadValue",  "PcdNameOffsetTable", "VariableTable", "StringTableLen", "PcdTokenTable", "PcdCNameTable",\r
                "SizeTableValue", "InitValueUint16", "VardefValueUint16", "InitValueUint8", "VardefValueUint8", "InitValueBoolean",\r
                "VardefValueBoolean", "UnInitValueUint64", "UnInitValueUint32", "UnInitValueUint16", "UnInitValueUint8", "UnInitValueBoolean"]\r
\r
+\r
     DbTotal = [SkuidValue,  InitValueUint64, VardefValueUint64, InitValueUint32, VardefValueUint32, VpdHeadValue, ExMapTable,\r
                LocalTokenNumberTable, GuidTable, StringHeadValue,  PcdNameOffsetTable, VariableTable, StringTableLen, PcdTokenTable, PcdCNameTable,\r
                SizeTableValue, InitValueUint16, VardefValueUint16, InitValueUint8, VardefValueUint8, InitValueBoolean,\r
@@ -690,21 +690,21 @@ def BuildExDataBase(Dict):
                DbLocalTokenNumberTable, DbGuidTable, DbStringHeadValue,  DbPcdNameOffsetTable, DbVariableTable, DbStringTableLen, DbPcdTokenTable, DbPcdCNameTable,\r
                DbSizeTableValue, DbInitValueUint16, DbVardefValueUint16, DbInitValueUint8, DbVardefValueUint8, DbInitValueBoolean,\r
                DbVardefValueBoolean, DbUnInitValueUint64, DbUnInitValueUint32, DbUnInitValueUint16, DbUnInitValueUint8, DbUnInitValueBoolean]\r
-    \r
+\r
     # VardefValueBoolean is the last table in the init table items\r
     InitTableNum = DbNameTotle.index("VardefValueBoolean") + 1\r
     # The FixedHeader length of the PCD_DATABASE_INIT, from Signature to Pad\r
     FixedHeaderLen = 80\r
 \r
-    # Get offset of SkuId table in the database \r
+    # Get offset of SkuId table in the database\r
     SkuIdTableOffset = FixedHeaderLen\r
     for DbIndex in xrange(len(DbTotal)):\r
         if DbTotal[DbIndex] is SkuidValue:\r
             break\r
         SkuIdTableOffset += DbItemTotal[DbIndex].GetListSize()\r
-    \r
-    \r
-    # Get offset of SkuValue table in the database    \r
+\r
+\r
+    # Get offset of SkuValue table in the database\r
 \r
     # Fix up the LocalTokenNumberTable, SkuHeader table\r
     for (LocalTokenNumberTableIndex, (Offset, Table)) in enumerate(LocalTokenNumberTable):\r
@@ -725,11 +725,11 @@ def BuildExDataBase(Dict):
         TokenTypeValue = GetTokenTypeValue(TokenTypeValue)\r
         LocalTokenNumberTable[LocalTokenNumberTableIndex] = DbOffset|int(TokenTypeValue)\r
         # if PCD_TYPE_SKU_ENABLED, then we need to fix up the SkuTable\r
-        \r
-        \r
-    \r
 \r
-    # resolve variable table offset \r
+\r
+\r
+\r
+    # resolve variable table offset\r
     for VariableEntries in VariableTable:\r
         skuindex = 0\r
         for VariableEntryPerSku in VariableEntries:\r
@@ -747,7 +747,7 @@ def BuildExDataBase(Dict):
             else:\r
                 assert(False)\r
             if isinstance(VariableRefTable[0], list):\r
-                DbOffset += skuindex * 4   \r
+                DbOffset += skuindex * 4\r
             skuindex += 1\r
             if DbIndex >= InitTableNum:\r
                 assert(False)\r
@@ -775,17 +775,17 @@ def BuildExDataBase(Dict):
 \r
         DbTotalLength += DbItemTotal[DbIndex].GetListSize()\r
     if not Dict['PCD_INFO_FLAG']:\r
-        DbPcdNameOffset  = 0   \r
+        DbPcdNameOffset  = 0\r
     LocalTokenCount = GetIntegerValue(Dict['LOCAL_TOKEN_NUMBER'])\r
     ExTokenCount = GetIntegerValue(Dict['EX_TOKEN_NUMBER'])\r
     GuidTableCount = GetIntegerValue(Dict['GUID_TABLE_SIZE'])\r
     SystemSkuId = GetIntegerValue(Dict['SYSTEM_SKU_ID_VALUE'])\r
     Pad = 0xDA\r
-    \r
+\r
     UninitDataBaseSize  = 0\r
     for Item in (DbUnInitValueUint64, DbUnInitValueUint32, DbUnInitValueUint16, DbUnInitValueUint8, DbUnInitValueBoolean):\r
         UninitDataBaseSize += Item.GetListSize()\r
-    \r
+\r
     if (DbTotalLength - UninitDataBaseSize) % 8:\r
         DbTotalLength += (8 - (DbTotalLength - UninitDataBaseSize) % 8)\r
     # Construct the database buffer\r
@@ -812,7 +812,7 @@ def BuildExDataBase(Dict):
 \r
     Buffer += b\r
     b = pack('=L', ExMapTableOffset)\r
\r
+\r
     Buffer += b\r
     b = pack('=L', GuidTableOffset)\r
 \r
@@ -836,7 +836,7 @@ def BuildExDataBase(Dict):
 \r
     Buffer += b\r
     b = pack('=H', GuidTableCount)\r
\r
+\r
     Buffer += b\r
     b = pack('=B', Pad)\r
     Buffer += b\r
@@ -845,18 +845,18 @@ def BuildExDataBase(Dict):
     Buffer += b\r
     Buffer += b\r
     Buffer += b\r
-    \r
+\r
     Index = 0\r
     for Item in DbItemTotal:\r
         Index +=1\r
         b = Item.PackData()\r
-        Buffer += b  \r
+        Buffer += b\r
         if Index == InitTableNum:\r
             if len(Buffer) % 8:\r
                 for num in range(8 - len(Buffer) % 8):\r
                     b = pack('=B', Pad)\r
                     Buffer += b\r
-            break        \r
+            break\r
     return Buffer\r
 \r
 ## Create code for PCD database\r
@@ -1010,7 +1010,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
         'SYSTEM_SKU_ID'                 : '  SKU_ID             SystemSkuId;',\r
         'SYSTEM_SKU_ID_VALUE'           : '0U'\r
     }\r
-    \r
+\r
     SkuObj = Platform.Platform.SkuIdMgr\r
     Dict['SYSTEM_SKU_ID_VALUE'] = 0 if SkuObj.SkuUsageType == SkuObj.SINGLE else Platform.Platform.SkuIds[SkuObj.SystemSkuId][0]\r
 \r
@@ -1028,7 +1028,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
             Dict[Init+'_NUMSKUS_DECL_' + DatumType] = []\r
             Dict[Init+'_VALUE_' + DatumType]        = []\r
             Dict[Init+'_DB_VALUE_'+DatumType] = []\r
-            \r
+\r
     for Type in ['STRING_HEAD', 'VPD_HEAD', 'VARIABLE_HEAD']:\r
         Dict[Type + '_CNAME_DECL']   = []\r
         Dict[Type + '_GUID_DECL']    = []\r
@@ -1038,7 +1038,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
     Dict['STRING_DB_VALUE'] = []\r
     Dict['VPD_DB_VALUE'] = []\r
     Dict['VARIABLE_DB_VALUE'] = []\r
-    \r
+\r
     Dict['STRING_TABLE_INDEX'] = []\r
     Dict['STRING_TABLE_LENGTH']  = []\r
     Dict['STRING_TABLE_CNAME'] = []\r
@@ -1061,19 +1061,19 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
 \r
     Dict['LOCAL_TOKEN_NUMBER_DB_VALUE'] = []\r
     Dict['VARIABLE_DB_VALUE'] = []\r
-    \r
+\r
     Dict['PCD_TOKENSPACE'] = []\r
-    Dict['PCD_CNAME'] = [] \r
+    Dict['PCD_CNAME'] = []\r
     Dict['PCD_TOKENSPACE_LENGTH'] = []\r
     Dict['PCD_CNAME_LENGTH'] = []\r
     Dict['PCD_TOKENSPACE_OFFSET'] = []\r
     Dict['PCD_CNAME_OFFSET'] = []\r
     Dict['PCD_TOKENSPACE_MAP'] = []\r
     Dict['PCD_NAME_OFFSET'] = []\r
-    \r
+\r
     Dict['PCD_ORDER_TOKEN_NUMBER_MAP'] = {}\r
     PCD_STRING_INDEX_MAP = {}\r
-    \r
+\r
     StringTableIndex = 0\r
     StringTableSize = 0\r
     NumberOfLocalTokens = 0\r
@@ -1141,8 +1141,8 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
 \r
         if len(Pcd.SkuInfoList) > 1:\r
             NumberOfSkuEnabledPcd += 1\r
-        \r
-        SkuIdIndex = 1  \r
+\r
+        SkuIdIndex = 1\r
         VariableHeadList = []\r
         for SkuName in Pcd.SkuInfoList:\r
             Sku = Pcd.SkuInfoList[SkuName]\r
@@ -1150,9 +1150,9 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
             if SkuId is None or SkuId == '':\r
                 continue\r
 \r
-                \r
+\r
             SkuIdIndex += 1\r
-    \r
+\r
             if len(Sku.VariableName) > 0:\r
                 VariableGuidStructure = Sku.VariableGuidValue\r
                 VariableGuid = GuidStructureStringToGuidValueName(VariableGuidStructure)\r
@@ -1203,7 +1203,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
                 for Index in range(Dict['STRING_TABLE_VALUE'].index(VariableNameStructure)):\r
                     VariableHeadStringIndex += Dict['STRING_TABLE_LENGTH'][Index]\r
                 VariableHeadList.append(VariableHeadStringIndex)\r
-                        \r
+\r
                 VariableHeadStringIndex = VariableHeadList[SkuIdIndex - 2]\r
                 # store VariableGuid to GuidTable and get the VariableHeadGuidIndex\r
 \r
@@ -1214,11 +1214,11 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
 \r
                 if "PCD_TYPE_STRING" in Pcd.TokenTypeList:\r
                     VariableHeadValueList.append('%dU, offsetof(%s_PCD_DATABASE, Init.%s_%s), %dU, %sU' %\r
-                                                 (VariableHeadStringIndex, Phase, CName, TokenSpaceGuid, \r
+                                                 (VariableHeadStringIndex, Phase, CName, TokenSpaceGuid,\r
                                                  VariableHeadGuidIndex, Sku.VariableOffset))\r
                 else:\r
                     VariableHeadValueList.append('%dU, offsetof(%s_PCD_DATABASE, Init.%s_%s_VariableDefault_%s), %dU, %sU' %\r
-                                                 (VariableHeadStringIndex, Phase, CName, TokenSpaceGuid, SkuIdIndex, \r
+                                                 (VariableHeadStringIndex, Phase, CName, TokenSpaceGuid, SkuIdIndex,\r
                                                  VariableHeadGuidIndex, Sku.VariableOffset))\r
                 Dict['VARDEF_CNAME_'+Pcd.DatumType].append(CName)\r
                 Dict['VARDEF_GUID_'+Pcd.DatumType].append(TokenSpaceGuid)\r
@@ -1231,7 +1231,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
                     # warning under linux building environment.\r
                     #\r
                     Dict['VARDEF_DB_VALUE_'+Pcd.DatumType].append(Sku.HiiDefaultValue)\r
-                    \r
+\r
                     if Pcd.DatumType == TAB_UINT64:\r
                         Dict['VARDEF_VALUE_'+Pcd.DatumType].append(Sku.HiiDefaultValue + "ULL")\r
                     elif Pcd.DatumType in (TAB_UINT32, TAB_UINT16, TAB_UINT8):\r
@@ -1264,13 +1264,13 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
                 Pcd.InitString = 'INIT'\r
                 VpdHeadOffsetList.append(str(Sku.VpdOffset) + 'U')\r
                 VpdDbOffsetList.append(Sku.VpdOffset)\r
-                # Also add the VOID* string of VPD PCD to SizeTable \r
+                # Also add the VOID* string of VPD PCD to SizeTable\r
                 if Pcd.DatumType == TAB_VOID:\r
                     NumberOfSizeItems += 1\r
                     # For VPD type of PCD, its current size is equal to its MAX size.\r
-                    VoidStarTypeCurrSize = [str(Pcd.MaxDatumSize) + 'U']                 \r
+                    VoidStarTypeCurrSize = [str(Pcd.MaxDatumSize) + 'U']\r
                 continue\r
-          \r
+\r
             if Pcd.DatumType == TAB_VOID:\r
                 Pcd.TokenTypeList.append('PCD_TYPE_STRING')\r
                 Pcd.InitString = 'INIT'\r
@@ -1297,7 +1297,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
                         DefaultValueBinStructure = StringToArray(Sku.DefaultValue)\r
                         Size = len(Sku.DefaultValue.split(","))\r
                         Dict['STRING_TABLE_VALUE'].append(DefaultValueBinStructure)\r
-                    \r
+\r
                     StringHeadOffsetList.append(str(StringTableSize) + 'U')\r
                     StringDbOffsetList.append(StringTableSize)\r
                     if Pcd.MaxDatumSize != '':\r
@@ -1336,10 +1336,10 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
                     ValueList.append(Sku.DefaultValue + "U")\r
                 elif Pcd.DatumType == "BOOLEAN":\r
                     if Sku.DefaultValue in ["1", "0"]:\r
-                        ValueList.append(Sku.DefaultValue + "U")              \r
+                        ValueList.append(Sku.DefaultValue + "U")\r
                 else:\r
                     ValueList.append(Sku.DefaultValue)\r
-                \r
+\r
                 DbValueList.append(Sku.DefaultValue)\r
 \r
         Pcd.TokenTypeList = list(set(Pcd.TokenTypeList))\r
@@ -1348,8 +1348,8 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
             Dict['SIZE_TABLE_GUID'].append(TokenSpaceGuid)\r
             Dict['SIZE_TABLE_MAXIMUM_LENGTH'].append(str(Pcd.MaxDatumSize) + 'U')\r
             Dict['SIZE_TABLE_CURRENT_LENGTH'].append(VoidStarTypeCurrSize)\r
-        \r
-        \r
+\r
+\r
 \r
         if 'PCD_TYPE_HII' in Pcd.TokenTypeList:\r
             Dict['VARIABLE_HEAD_CNAME_DECL'].append(CName)\r
@@ -1382,7 +1382,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
             else:\r
                 Dict[Pcd.InitString+'_VALUE_'+Pcd.DatumType].append(', '.join(ValueList))\r
                 Dict[Pcd.InitString+'_DB_VALUE_'+Pcd.DatumType].append(DbValueList)\r
-                \r
+\r
     if Phase == 'PEI':\r
         NumberOfLocalTokens = NumberOfPeiLocalTokens\r
     if Phase == 'DXE':\r
@@ -1394,7 +1394,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
     Dict['TOKEN_TYPE']       = ['' for x in range(NumberOfLocalTokens)]\r
     Dict['LOCAL_TOKEN_NUMBER_DB_VALUE'] = ['' for x in range(NumberOfLocalTokens)]\r
     Dict['PCD_CNAME']        = ['' for x in range(NumberOfLocalTokens)]\r
-    Dict['PCD_TOKENSPACE_MAP'] = ['' for x in range(NumberOfLocalTokens)]  \r
+    Dict['PCD_TOKENSPACE_MAP'] = ['' for x in range(NumberOfLocalTokens)]\r
     Dict['PCD_CNAME_LENGTH'] = [0 for x in range(NumberOfLocalTokens)]\r
     SkuEnablePcdIndex = 0\r
     for Pcd in ReorderedDynPcdList:\r
@@ -1419,7 +1419,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
         EdkLogger.debug(EdkLogger.DEBUG_1, "PCD = %s.%s" % (CName, TokenSpaceGuidCName))\r
         EdkLogger.debug(EdkLogger.DEBUG_1, "phase = %s" % Phase)\r
         EdkLogger.debug(EdkLogger.DEBUG_1, "GeneratedTokenNumber = %s" % str(GeneratedTokenNumber))\r
-        \r
+\r
         #\r
         # following four Dict items hold the information for LocalTokenNumberTable\r
         #\r
@@ -1430,7 +1430,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
         Dict['TOKEN_CNAME'][GeneratedTokenNumber] = CName\r
         Dict['TOKEN_GUID'][GeneratedTokenNumber] = TokenSpaceGuid\r
         Dict['TOKEN_TYPE'][GeneratedTokenNumber] = ' | '.join(Pcd.TokenTypeList)\r
-        \r
+\r
         if Platform.Platform.PcdInfoFlag:\r
             TokenSpaceGuidCNameArray = StringToArray('"' + TokenSpaceGuidCName + '"' )\r
             if TokenSpaceGuidCNameArray not in Dict['PCD_TOKENSPACE']:\r
@@ -1439,10 +1439,10 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
             Dict['PCD_TOKENSPACE_MAP'][GeneratedTokenNumber] = Dict['PCD_TOKENSPACE'].index(TokenSpaceGuidCNameArray)\r
             CNameBinArray = StringToArray('"' + CName + '"' )\r
             Dict['PCD_CNAME'][GeneratedTokenNumber] = CNameBinArray\r
-            \r
+\r
             Dict['PCD_CNAME_LENGTH'][GeneratedTokenNumber] = len(CNameBinArray.split(","))\r
-        \r
-        \r
+\r
+\r
         Pcd.TokenTypeList = list(set(Pcd.TokenTypeList))\r
 \r
         # search the Offset and Table, used by LocalTokenNumberTableOffset\r
@@ -1468,7 +1468,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
             if Pcd.InitString == 'UNINIT':\r
                 Table =  Dict[Pcd.InitString+'_GUID_DECL_'+Pcd.DatumType]\r
             else:\r
-                Table = Dict[Pcd.InitString+'_DB_VALUE_'+Pcd.DatumType]               \r
+                Table = Dict[Pcd.InitString+'_DB_VALUE_'+Pcd.DatumType]\r
         Dict['LOCAL_TOKEN_NUMBER_DB_VALUE'][GeneratedTokenNumber] = (Offset, Table)\r
 \r
         #\r
@@ -1478,10 +1478,10 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
             Dict['VARDEF_HEADER'][GeneratedTokenNumber] = '_Variable_Header'\r
         else:\r
             Dict['VARDEF_HEADER'][GeneratedTokenNumber] = ''\r
-       \r
-        \r
+\r
+\r
         if Pcd.Type in PCD_DYNAMIC_EX_TYPE_SET:\r
-            \r
+\r
             if Phase == 'DXE':\r
                 GeneratedTokenNumber += NumberOfPeiLocalTokens\r
             #\r
@@ -1493,7 +1493,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
             # Therefore, 1 is added to GeneratedTokenNumber to generate a PCD Token Number before being inserted\r
             # to the EXMAPPING_TABLE.\r
             #\r
-            \r
+\r
 \r
             Dict['EXMAPPING_TABLE_EXTOKEN'].append(str(Pcd.TokenValue) + 'U')\r
             Dict['EXMAPPING_TABLE_LOCAL_TOKEN'].append(str(GeneratedTokenNumber + 1) + 'U')\r
@@ -1504,12 +1504,12 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
             TokenSpaceIndex = StringTableSize\r
             for i in range(Dict['PCD_TOKENSPACE_MAP'][index]):\r
                 TokenSpaceIndex += Dict['PCD_TOKENSPACE_LENGTH'][i]\r
-            Dict['PCD_TOKENSPACE_OFFSET'].append(TokenSpaceIndex)   \r
+            Dict['PCD_TOKENSPACE_OFFSET'].append(TokenSpaceIndex)\r
         for index in range(len(Dict['PCD_TOKENSPACE'])):\r
             StringTableSize += Dict['PCD_TOKENSPACE_LENGTH'][index]\r
             StringTableIndex += 1\r
         for index in range(len(Dict['PCD_CNAME'])):\r
-            Dict['PCD_CNAME_OFFSET'].append(StringTableSize)        \r
+            Dict['PCD_CNAME_OFFSET'].append(StringTableSize)\r
             Dict['PCD_NAME_OFFSET'].append(Dict['PCD_TOKENSPACE_OFFSET'][index])\r
             Dict['PCD_NAME_OFFSET'].append(StringTableSize)\r
             StringTableSize += Dict['PCD_CNAME_LENGTH'][index]\r
@@ -1552,15 +1552,15 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
 \r
     if NumberOfSizeItems != 0:\r
         Dict['SIZE_TABLE_SIZE'] = str(NumberOfSizeItems * 2) + 'U'\r
-    \r
-    if NumberOfSkuEnabledPcd != 0: \r
+\r
+    if NumberOfSkuEnabledPcd != 0:\r
         Dict['SKU_HEAD_SIZE'] = str(NumberOfSkuEnabledPcd) + 'U'\r
-    \r
+\r
     for AvailableSkuNumber in SkuObj.SkuIdNumberSet:\r
         if AvailableSkuNumber not in Dict['SKUID_VALUE']:\r
             Dict['SKUID_VALUE'].append(AvailableSkuNumber)\r
     Dict['SKUID_VALUE'][0] = len(Dict['SKUID_VALUE']) - 1\r
-    \r
+\r
     AutoGenH.Append(gPcdDatabaseAutoGenH.Replace(Dict))\r
     if NumberOfLocalTokens == 0:\r
         AutoGenC.Append(gEmptyPcdDatabaseAutoGenC.Replace(Dict))\r
@@ -1573,11 +1573,11 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
         SizeCurLenTempList = []\r
         SizeMaxLenTempList = []\r
         ReOrderFlag = True\r
-  \r
+\r
         if len(Dict['SIZE_TABLE_CNAME']) == 1:\r
             if not (Dict['SIZE_TABLE_CNAME'][0] and Dict['SIZE_TABLE_GUID'][0]):\r
                 ReOrderFlag = False\r
-        \r
+\r
         if ReOrderFlag:\r
             for Count in range(len(Dict['TOKEN_CNAME'])):\r
                 for Count1 in range(len(Dict['SIZE_TABLE_CNAME'])):\r
@@ -1587,15 +1587,15 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
                         SizeGuidTempList.append(Dict['SIZE_TABLE_GUID'][Count1])\r
                         SizeCurLenTempList.append(Dict['SIZE_TABLE_CURRENT_LENGTH'][Count1])\r
                         SizeMaxLenTempList.append(Dict['SIZE_TABLE_MAXIMUM_LENGTH'][Count1])\r
-                        \r
+\r
             for Count in range(len(Dict['SIZE_TABLE_CNAME'])):\r
                 Dict['SIZE_TABLE_CNAME'][Count] = SizeCNameTempList[Count]\r
                 Dict['SIZE_TABLE_GUID'][Count] = SizeGuidTempList[Count]\r
                 Dict['SIZE_TABLE_CURRENT_LENGTH'][Count] = SizeCurLenTempList[Count]\r
                 Dict['SIZE_TABLE_MAXIMUM_LENGTH'][Count] = SizeMaxLenTempList[Count]\r
-                \r
+\r
         AutoGenC.Append(gPcdDatabaseAutoGenC.Replace(Dict))\r
-    \r
+\r
 \r
 #     print Phase\r
     Buffer = BuildExDataBase(Dict)\r
index 2cd5a6667a0259e60a787df6bf29d32779735489..d98508973841ed61ec9562151dd3cc3d2d5983d7 100644 (file)
 import Common.EdkLogger as EdkLogger\r
 from Common.BuildToolError import *\r
 from Common.DataType import *\r
\r
+\r
 \r
 class InfSectionParser():\r
     def __init__(self, FilePath):\r
         self._FilePath = FilePath\r
         self._FileSectionDataList = []\r
         self._ParserInf()\r
-    \r
+\r
     def _ParserInf(self):\r
         FileLinesList = []\r
         UserExtFind = False\r
@@ -32,12 +32,12 @@ class InfSectionParser():
         FileLastLine = False\r
         SectionLine = ''\r
         SectionData = []\r
-        \r
+\r
         try:\r
             FileLinesList = open(self._FilePath, "r", 0).readlines()\r
         except BaseException:\r
             EdkLogger.error("build", AUTOGEN_ERROR, 'File %s is opened failed.' % self._FilePath)\r
-        \r
+\r
         for Index in range(0, len(FileLinesList)):\r
             line = str(FileLinesList[Index]).strip()\r
             if Index + 1 == len(FileLinesList):\r
@@ -52,7 +52,7 @@ class InfSectionParser():
                 SectionLine = line\r
                 UserExtFind = True\r
                 FindEnd = False\r
-            \r
+\r
             if (NextLine != '' and NextLine[0] == TAB_SECTION_START and \\r
                 NextLine[-1] == TAB_SECTION_END) or FileLastLine:\r
                 UserExtFind = False\r
@@ -60,7 +60,7 @@ class InfSectionParser():
                 self._FileSectionDataList.append({SectionLine: SectionData[:]})\r
                 del SectionData[:]\r
                 SectionLine = ''\r
-    \r
+\r
     # Get user extension TianoCore data\r
     #\r
     # @return: a list include some dictionary that key is section and value is a list contain all data.\r
index 0e74f3bfb7cb767bc8d22293f02ac888cd04764e..a702ef0dd583df6648a1ef887e5a8ee29cfd41d6 100644 (file)
@@ -1,5 +1,5 @@
 ## @file\r
-# This file is used to parse a strings file and create or add to a string database \r
+# This file is used to parse a strings file and create or add to a string database\r
 # file.\r
 #\r
 # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
@@ -144,7 +144,7 @@ def CreateHFileContent(BaseName, UniObjectClass, IsCompatibleMode, UniGenCFlag):
     Str = WriteLine(Str, Line)\r
     UnusedStr = ''\r
 \r
-    #Group the referred/Unused STRING token together. \r
+    #Group the referred/Unused STRING token together.\r
     for Index in range(2, len(UniObjectClass.OrderedStringList[UniObjectClass.LanguageDef[0][0]])):\r
         StringItem = UniObjectClass.OrderedStringList[UniObjectClass.LanguageDef[0][0]][Index]\r
         Name = StringItem.StringName\r
@@ -265,16 +265,16 @@ def GetFilteredLanguage(UniLanguageList, LanguageFilterList):
                 PrimaryTag = Language[0:Language.find('-')].lower()\r
             else:\r
                 PrimaryTag = Language\r
-            \r
+\r
             if len(PrimaryTag) == 3:\r
                 PrimaryTag = LangConvTable.get(PrimaryTag)\r
-            \r
+\r
             for UniLanguage in UniLanguageList:\r
                 if UniLanguage.find('-') != -1:\r
                     UniLanguagePrimaryTag = UniLanguage[0:UniLanguage.find('-')].lower()\r
                 else:\r
                     UniLanguagePrimaryTag = UniLanguage\r
-                \r
+\r
                 if len(UniLanguagePrimaryTag) == 3:\r
                     UniLanguagePrimaryTag = LangConvTable.get(UniLanguagePrimaryTag)\r
 \r
@@ -307,7 +307,7 @@ def GetFilteredLanguage(UniLanguageList, LanguageFilterList):
 # @param UniObjectClass   A UniObjectClass instance\r
 # @param IsCompatibleMode Compatible mode\r
 # @param UniBinBuffer     UniBinBuffer to contain UniBinary data.\r
-# @param FilterInfo       Platform language filter information \r
+# @param FilterInfo       Platform language filter information\r
 #\r
 # @retval Str:           A string of .c file content\r
 #\r
@@ -325,14 +325,14 @@ def CreateCFileContent(BaseName, UniObjectClass, IsCompatibleMode, UniBinBuffer,
     else:\r
         # EDK module is using ISO639-2 format filter, convert to the RFC4646 format\r
         LanguageFilterList = [LangConvTable.get(F.lower()) for F in FilterInfo[1]]\r
-    \r
+\r
     UniLanguageList = []\r
     for IndexI in range(len(UniObjectClass.LanguageDef)):\r
         UniLanguageList += [UniObjectClass.LanguageDef[IndexI][0]]\r
 \r
     UniLanguageListFiltered = GetFilteredLanguage(UniLanguageList, LanguageFilterList)\r
\r
-        \r
+\r
+\r
     #\r
     # Create lines for each language's strings\r
     #\r
@@ -340,7 +340,7 @@ def CreateCFileContent(BaseName, UniObjectClass, IsCompatibleMode, UniBinBuffer,
         Language = UniObjectClass.LanguageDef[IndexI][0]\r
         if Language not in UniLanguageListFiltered:\r
             continue\r
-        \r
+\r
         StringBuffer = BytesIO()\r
         StrStringValue = ''\r
         ArrayLength = 0\r
@@ -403,7 +403,7 @@ def CreateCFileContent(BaseName, UniObjectClass, IsCompatibleMode, UniBinBuffer,
         # Add an EFI_HII_SIBT_END at last\r
         #\r
         Str = WriteLine(Str, '  ' + EFI_HII_SIBT_END + ",")\r
-        \r
+\r
         #\r
         # Create binary UNI string\r
         #\r
@@ -458,7 +458,7 @@ def CreateCFileEnd():
 # @param BaseName:        The basename of strings\r
 # @param UniObjectClass   A UniObjectClass instance\r
 # @param IsCompatibleMode Compatible Mode\r
-# @param FilterInfo       Platform language filter information \r
+# @param FilterInfo       Platform language filter information\r
 #\r
 # @retval CFile:          A string of complete .c file\r
 #\r
@@ -544,7 +544,7 @@ def SearchString(UniObjectClass, FileList, IsCompatibleMode):
 # This function is used for UEFI2.1 spec\r
 #\r
 #\r
-def GetStringFiles(UniFilList, SourceFileList, IncludeList, IncludePathList, SkipList, BaseName, IsCompatibleMode = False, ShellMode = False, UniGenCFlag = True, UniGenBinBuffer = None, FilterInfo = [True, []]):  \r
+def GetStringFiles(UniFilList, SourceFileList, IncludeList, IncludePathList, SkipList, BaseName, IsCompatibleMode = False, ShellMode = False, UniGenCFlag = True, UniGenBinBuffer = None, FilterInfo = [True, []]):\r
     if len(UniFilList) > 0:\r
         if ShellMode:\r
             #\r
index 88810f1ccc0d9b2fa3e2f4d7d0d6d520526765eb..384f31b165de08222f36e8f5330549ec7182da7e 100644 (file)
@@ -284,7 +284,7 @@ class UniFileClassObject(object):
         if not IsLangInDef:\r
             #\r
             # The found STRING tokens will be added into new language string list\r
-            # so that the unique STRING identifier is reserved for all languages in the package list. \r
+            # so that the unique STRING identifier is reserved for all languages in the package list.\r
             #\r
             FirstLangName = self.LanguageDef[0][0]\r
             if LangName != FirstLangName:\r
@@ -411,10 +411,10 @@ class UniFileClassObject(object):
             #\r
             # Ignore empty line\r
             #\r
-            if len(Line) == 0: \r
-                continue \r
-            \r
-                             \r
+            if len(Line) == 0:\r
+                continue\r
+\r
+\r
             Line = Line.replace(u'/langdef', u'#langdef')\r
             Line = Line.replace(u'/string', u'#string')\r
             Line = Line.replace(u'/language', u'#language')\r
@@ -429,8 +429,8 @@ class UniFileClassObject(object):
             Line = Line.replace(u'\\r', CR)\r
             Line = Line.replace(u'\\t', u' ')\r
             Line = Line.replace(u'\t', u' ')\r
-            Line = Line.replace(u'\\"', u'"') \r
-            Line = Line.replace(u"\\'", u"'") \r
+            Line = Line.replace(u'\\"', u'"')\r
+            Line = Line.replace(u"\\'", u"'")\r
             Line = Line.replace(BACK_SLASH_PLACEHOLDER, u'\\')\r
 \r
             StartPos = Line.find(u'\\x')\r
@@ -570,7 +570,7 @@ class UniFileClassObject(object):
         else:\r
             EdkLogger.error('Unicode File Parser', FORMAT_NOT_SUPPORTED, "The language '%s' for %s is not defined in Unicode file %s." \\r
                             % (Language, Name, self.File))\r
-            \r
+\r
         if Language not in self.OrderedStringList:\r
             self.OrderedStringList[Language] = []\r
             self.OrderedStringDict[Language] = {}\r
@@ -592,7 +592,7 @@ class UniFileClassObject(object):
                 for LangName in self.LanguageDef:\r
                     #\r
                     # New STRING token will be added into all language string lists.\r
-                    # so that the unique STRING identifier is reserved for all languages in the package list. \r
+                    # so that the unique STRING identifier is reserved for all languages in the package list.\r
                     #\r
                     if LangName[0] != Language:\r
                         if UseOtherLangDef != '':\r
index 49fbdf3246a584fd895ce26f335230e71aad786b..edd40a1498ffd4ffc8c5d6247d087479127c22d1 100644 (file)
@@ -24,7 +24,7 @@ from Common.DataType import *
 class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object):\r
     def __init__(self):\r
         self.var_check_info = []\r
-        \r
+\r
     def push_back(self, var_check_tab):\r
         for tab in self.var_check_info:\r
             if tab.equal(var_check_tab):\r
@@ -32,9 +32,9 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object):
                 break\r
         else:\r
             self.var_check_info.append(var_check_tab)\r
-    \r
+\r
     def dump(self, dest, Phase):\r
-        \r
+\r
         if not os.path.isabs(dest):\r
             return\r
         if not os.path.exists(dest):\r
@@ -161,7 +161,7 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object):
                             b = pack("=B", var_check_tab.pad)\r
                             Buffer += b\r
                             realLength += 1\r
-        \r
+\r
         DbFile = BytesIO()\r
         if Phase == 'DXE' and os.path.exists(BinFilePath):\r
             BinFile = open(BinFilePath, "rb")\r
@@ -175,7 +175,7 @@ class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object):
             Buffer = BinBuffer + Buffer\r
         DbFile.write(Buffer)\r
         SaveFileOnChange(BinFilePath, DbFile.getvalue(), True)\r
-    \r
+\r
 \r
 class VAR_CHECK_PCD_VARIABLE_TAB(object):\r
     pad = 0xDA\r
@@ -193,26 +193,26 @@ class VAR_CHECK_PCD_VARIABLE_TAB(object):
     def UpdateSize(self):\r
         self.HeaderLength = 32 + len(self.Name.split(","))\r
         self.Length = 32 + len(self.Name.split(",")) + self.GetValidTabLen()\r
-    \r
+\r
     def GetValidTabLen(self):\r
         validtablen = 0\r
         for item in self.validtab:\r
-            validtablen += item.Length  \r
-        return validtablen \r
-    \r
+            validtablen += item.Length\r
+        return validtablen\r
+\r
     def SetAttributes(self, attributes):\r
         self.Attributes = attributes\r
-            \r
+\r
     def push_back(self, valid_obj):\r
         if valid_obj is not None:\r
             self.validtab.append(valid_obj)\r
-        \r
+\r
     def equal(self, varchecktab):\r
         if self.Guid == varchecktab.Guid and self.Name == varchecktab.Name:\r
             return True\r
         else:\r
             return False\r
-        \r
+\r
     def merge(self, varchecktab):\r
         for validobj in varchecktab.validtab:\r
             if validobj in self.validtab:\r
@@ -235,10 +235,10 @@ class VAR_CHECK_PCD_VALID_OBJ(object):
         except:\r
             self.StorageWidth = 0\r
             self.ValidData = False\r
-            \r
-    def __eq__(self, validObj):       \r
+\r
+    def __eq__(self, validObj):\r
         return validObj and self.VarOffset == validObj.VarOffset\r
-         \r
+\r
 class VAR_CHECK_PCD_VALID_LIST(VAR_CHECK_PCD_VALID_OBJ):\r
     def __init__(self, VarOffset, validlist, PcdDataType):\r
         super(VAR_CHECK_PCD_VALID_LIST, self).__init__(VarOffset, validlist, PcdDataType)\r
@@ -246,7 +246,7 @@ class VAR_CHECK_PCD_VALID_LIST(VAR_CHECK_PCD_VALID_OBJ):
         valid_num_list = []\r
         for item in self.rawdata:\r
             valid_num_list.extend(item.split(','))\r
-        \r
+\r
         for valid_num in valid_num_list:\r
             valid_num = valid_num.strip()\r
 \r
@@ -255,10 +255,10 @@ class VAR_CHECK_PCD_VALID_LIST(VAR_CHECK_PCD_VALID_OBJ):
             else:\r
                 self.data.add(int(valid_num))\r
 \r
-                \r
+\r
         self.Length = 5 + len(self.data) * self.StorageWidth\r
-        \r
-           \r
+\r
+\r
 class VAR_CHECK_PCD_VALID_RANGE(VAR_CHECK_PCD_VALID_OBJ):\r
     def __init__(self, VarOffset, validrange, PcdDataType):\r
         super(VAR_CHECK_PCD_VALID_RANGE, self).__init__(VarOffset, validrange, PcdDataType)\r
@@ -275,7 +275,7 @@ class VAR_CHECK_PCD_VALID_RANGE(VAR_CHECK_PCD_VALID_OBJ):
             for obj in rangelist.pop():\r
                 self.data.add((obj.start, obj.end))\r
         self.Length = 5 + len(self.data) * 2 * self.StorageWidth\r
-        \r
+\r
 \r
 def GetValidationObject(PcdClass, VarOffset):\r
     if PcdClass.validateranges:\r
index 86c44abb67a6c956a7907b4b5e82a18e93cde8a5..07cee8976208169bf6cd294b47e43cfd251014b5 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
 #  Intel Binary Product Data Generation Tool (Intel BPDG).\r
-#  This tool provide a simple process for the creation of a binary file containing read-only \r
-#  configuration data for EDK II platforms that contain Dynamic and DynamicEx PCDs described \r
-#  in VPD sections. It also provide an option for specifying an alternate name for a mapping \r
-#  file of PCD layout for use during the build when the platform integrator selects to use \r
+#  This tool provide a simple process for the creation of a binary file containing read-only\r
+#  configuration data for EDK II platforms that contain Dynamic and DynamicEx PCDs described\r
+#  in VPD sections. It also provide an option for specifying an alternate name for a mapping\r
+#  file of PCD layout for use during the build when the platform integrator selects to use\r
 #  automatic offset calculation.\r
 #\r
-#  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -47,26 +47,26 @@ VERSION            = (st.LBL_BPDG_VERSION + " Build " + gBUILD_VERSION)
 #\r
 def main():\r
     global Options, Args\r
-    \r
+\r
     # Initialize log system\r
-    EdkLogger.Initialize()          \r
+    EdkLogger.Initialize()\r
     Options, Args = MyOptionParser()\r
-    \r
+\r
     ReturnCode = 0\r
-    \r
+\r
     if Options.opt_verbose:\r
         EdkLogger.SetLevel(EdkLogger.VERBOSE)\r
     elif Options.opt_quiet:\r
         EdkLogger.SetLevel(EdkLogger.QUIET)\r
     elif Options.debug_level is not None:\r
-        EdkLogger.SetLevel(Options.debug_level + 1) \r
+        EdkLogger.SetLevel(Options.debug_level + 1)\r
     else:\r
         EdkLogger.SetLevel(EdkLogger.INFO)\r
-                  \r
+\r
     if Options.bin_filename is None:\r
-        EdkLogger.error("BPDG", ATTRIBUTE_NOT_AVAILABLE, "Please use the -o option to specify the file name for the VPD binary file")  \r
+        EdkLogger.error("BPDG", ATTRIBUTE_NOT_AVAILABLE, "Please use the -o option to specify the file name for the VPD binary file")\r
     if Options.filename is None:\r
-        EdkLogger.error("BPDG", ATTRIBUTE_NOT_AVAILABLE, "Please use the -m option to specify the file name for the mapping file")  \r
+        EdkLogger.error("BPDG", ATTRIBUTE_NOT_AVAILABLE, "Please use the -m option to specify the file name for the mapping file")\r
 \r
     Force = False\r
     if Options.opt_force is not None:\r
@@ -76,8 +76,8 @@ def main():
         StartBpdg(Args[0], Options.filename, Options.bin_filename, Force)\r
     else :\r
         EdkLogger.error("BPDG", ATTRIBUTE_NOT_AVAILABLE, "Please specify the file which contain the VPD pcd info.",\r
-                        None)         \r
-    \r
+                        None)\r
+\r
     return ReturnCode\r
 \r
 \r
@@ -87,8 +87,8 @@ def main():
 #\r
 #   @retval options   A optparse.Values object containing the parsed options\r
 #   @retval args      Target of BPDG command\r
-#            \r
-def MyOptionParser():   \r
+#\r
+def MyOptionParser():\r
     #\r
     # Process command line firstly.\r
     #\r
@@ -106,10 +106,10 @@ def MyOptionParser():
     parser.add_option('-o', '--vpd-filename', action='store', dest='bin_filename',\r
                       help=st.MSG_OPTION_VPD_FILENAME)\r
     parser.add_option('-m', '--map-filename', action='store', dest='filename',\r
-                      help=st.MSG_OPTION_MAP_FILENAME)   \r
+                      help=st.MSG_OPTION_MAP_FILENAME)\r
     parser.add_option('-f', '--force', action='store_true', dest='opt_force',\r
-                      help=st.MSG_OPTION_FORCE)     \r
-    \r
+                      help=st.MSG_OPTION_FORCE)\r
+\r
     (options, args) = parser.parse_args()\r
     if len(args) == 0:\r
         EdkLogger.info("Please specify the filename.txt file which contain the VPD pcd info!")\r
@@ -118,7 +118,7 @@ def MyOptionParser():
     return options, args\r
 \r
 \r
-## Start BPDG and call the main functions \r
+## Start BPDG and call the main functions\r
 #\r
 # This method mainly focus on call GenVPD class member functions to complete\r
 # BPDG's target. It will process VpdFile override, and provide the interface file\r
@@ -137,19 +137,19 @@ def StartBpdg(InputFileName, MapFileName, VpdFileName, Force):
         choice = sys.stdin.readline()\r
         if choice.strip().lower() not in ['y', 'yes', '']:\r
             return\r
-        \r
+\r
     GenVPD = GenVpd.GenVPD (InputFileName, MapFileName, VpdFileName)\r
-    \r
-    EdkLogger.info('%-24s = %s' % ("VPD input data file: ", InputFileName))  \r
+\r
+    EdkLogger.info('%-24s = %s' % ("VPD input data file: ", InputFileName))\r
     EdkLogger.info('%-24s = %s' % ("VPD output map file: ", MapFileName))\r
-    EdkLogger.info('%-24s = %s' % ("VPD output binary file: ", VpdFileName))  \r
-          \r
+    EdkLogger.info('%-24s = %s' % ("VPD output binary file: ", VpdFileName))\r
+\r
     GenVPD.ParserInputFile()\r
     GenVPD.FormatFileLine()\r
     GenVPD.FixVpdOffset()\r
     GenVPD.GenerateVpdFile(MapFileName, VpdFileName)\r
-    \r
-    EdkLogger.info("- Vpd pcd fixed done! -")    \r
+\r
+    EdkLogger.info("- Vpd pcd fixed done! -")\r
 \r
 if __name__ == '__main__':\r
     r = main()\r
@@ -157,4 +157,4 @@ if __name__ == '__main__':
     if r < 0 or r > 127: r = 1\r
     sys.exit(r)\r
 \r
-    \r
+\r
index 3bae803467a882d3fe6a9890425b44644960b847..2eefcc24905fcddc34165678a907149340af368d 100644 (file)
@@ -31,10 +31,10 @@ _FORMAT_CHAR = {1: 'B',
 \r
 ## The VPD PCD data structure for store and process each VPD PCD entry.\r
 #\r
-#  This class contain method to format and pack pcd's value.          \r
+#  This class contain method to format and pack pcd's value.\r
 #\r
 class PcdEntry:\r
-    def __init__(self, PcdCName, SkuId,PcdOffset, PcdSize, PcdValue, Lineno=None, FileName=None, PcdUnpackValue=None, \r
+    def __init__(self, PcdCName, SkuId,PcdOffset, PcdSize, PcdValue, Lineno=None, FileName=None, PcdUnpackValue=None,\r
                  PcdBinOffset=None, PcdBinSize=None, Alignment=None):\r
         self.PcdCName       = PcdCName.strip()\r
         self.SkuId          = SkuId.strip()\r
@@ -47,7 +47,7 @@ class PcdEntry:
         self.PcdBinOffset   = PcdBinOffset\r
         self.PcdBinSize     = PcdBinSize\r
         self.Alignment       = Alignment\r
-        \r
+\r
         if self.PcdValue == '' :\r
             EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID,\r
                             "Invalid PCD format(Name: %s File: %s line: %s) , no Value specified!" % (self.PcdCName, self.FileName, self.Lineno))\r
@@ -63,13 +63,13 @@ class PcdEntry:
         self._GenOffsetValue ()\r
 \r
     ## Analyze the string value to judge the PCD's datum type equal to Boolean or not.\r
-    # \r
+    #\r
     #  @param   ValueString      PCD's value\r
     #  @param   Size             PCD's size\r
-    #  \r
+    #\r
     #  @retval  True   PCD's datum type is Boolean\r
-    #  @retval  False  PCD's datum type is not Boolean.              \r
-    #    \r
+    #  @retval  False  PCD's datum type is not Boolean.\r
+    #\r
     def _IsBoolean(self, ValueString, Size):\r
         if (Size == "1"):\r
             if ValueString.upper() in ["TRUE", "FALSE"]:\r
@@ -80,10 +80,10 @@ class PcdEntry:
         return False\r
 \r
     ## Convert the PCD's value from string to integer.\r
-    #              \r
+    #\r
     #  This function will try to convert the Offset value form string to integer\r
     #  for both hexadecimal and decimal.\r
-    #    \r
+    #\r
     def _GenOffsetValue(self):\r
         if self.PcdOffset != "*" :\r
             try:\r
@@ -96,10 +96,10 @@ class PcdEntry:
                                     "Invalid offset value %s for PCD %s (File: %s Line: %s)" % (self.PcdOffset, self.PcdCName, self.FileName, self.Lineno))\r
 \r
     ## Pack Boolean type VPD PCD's value form string to binary type.\r
-    # \r
+    #\r
     #  @param ValueString     The boolean type string for pack.\r
-    # \r
-    # \r
+    #\r
+    #\r
     def _PackBooleanValue(self, ValueString):\r
         if ValueString.upper() == "TRUE" or ValueString in ["1", "0x1", "0x01"]:\r
             try:\r
@@ -115,10 +115,10 @@ class PcdEntry:
                                 "Invalid size or value for PCD %s to pack(File: %s Line: %s)." % (self.PcdCName, self.FileName, self.Lineno))\r
 \r
     ## Pack Integer type VPD PCD's value form string to binary type.\r
-    # \r
+    #\r
     #  @param ValueString     The Integer type string for pack.\r
-    # \r
-    #                                \r
+    #\r
+    #\r
     def _PackIntValue(self, IntValue, Size):\r
         if Size not in _FORMAT_CHAR:\r
             EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID,\r
@@ -170,7 +170,7 @@ class PcdEntry:
     #    3:    {bytearray}, only support byte-array.\r
     #\r
     #  @param ValueString     The Integer type string for pack.\r
-    #       \r
+    #\r
     def _PackPtrValue(self, ValueString, Size):\r
         if ValueString.startswith('L"') or ValueString.startswith("L'"):\r
             self._PackUnicode(ValueString, Size)\r
@@ -183,9 +183,9 @@ class PcdEntry:
                             "Invalid VOID* type PCD %s value %s (File: %s Line: %s)" % (self.PcdCName, ValueString, self.FileName, self.Lineno))\r
 \r
     ## Pack an Ascii PCD value.\r
-    #  \r
+    #\r
     #  An Ascii string for a PCD should be in format as  ""/''.\r
-    #                   \r
+    #\r
     def _PackString(self, ValueString, Size):\r
         if (Size < 0):\r
             EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID,\r
@@ -198,7 +198,7 @@ class PcdEntry:
             QuotedFlag = False\r
 \r
         ValueString = ValueString[1:-1]\r
-        # No null-terminator in 'string' \r
+        # No null-terminator in 'string'\r
         if (QuotedFlag and len(ValueString) + 1 > Size) or (not QuotedFlag and len(ValueString) > Size):\r
             EdkLogger.error("BPDG", BuildToolError.RESOURCE_OVERFLOW,\r
                             "PCD value string %s is exceed to size %d(File: %s Line: %s)" % (ValueString, Size, self.FileName, self.Lineno))\r
@@ -209,9 +209,9 @@ class PcdEntry:
                             "Invalid size or value for PCD %s to pack(File: %s Line: %s)." % (self.PcdCName, self.FileName, self.Lineno))\r
 \r
     ## Pack a byte-array PCD value.\r
-    #  \r
+    #\r
     #  A byte-array for a PCD should be in format as  {0x01, 0x02, ...}.\r
-    #         \r
+    #\r
     def _PackByteArray(self, ValueString, Size):\r
         if (Size < 0):\r
             EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID, "Invalid parameter Size %s of PCD %s!(File: %s Line: %s)" % (self.PcdBinSize, self.PcdCName, self.FileName, self.Lineno))\r
@@ -261,7 +261,7 @@ class PcdEntry:
         self.PcdValue = ReturnArray.tolist()\r
 \r
     ## Pack a unicode PCD value into byte array.\r
-    #  \r
+    #\r
     #  A unicode string for a PCD should be in format as  L""/L''.\r
     #\r
     def _PackUnicode(self, UnicodeString, Size):\r
@@ -271,7 +271,7 @@ class PcdEntry:
 \r
         QuotedFlag = True\r
         if UnicodeString.startswith("L'"):\r
-            QuotedFlag = False \r
+            QuotedFlag = False\r
         UnicodeString = UnicodeString[2:-1]\r
 \r
         # No null-terminator in L'string'\r
@@ -304,7 +304,7 @@ class PcdEntry:
 #       2. Format the input file data to remove unused lines;\r
 #       3. Fixed offset if needed;\r
 #       4. Generate output file, including guided.map and guided.bin file;\r
-#        \r
+#\r
 class GenVPD :\r
     ## Constructor of DscBuildData\r
     #\r
@@ -334,9 +334,9 @@ class GenVPD :
             EdkLogger.error("BPDG", BuildToolError.FILE_OPEN_FAILURE, "File open failed for %s" % InputFileName, None)\r
 \r
     ##\r
-    # Parser the input file which is generated by the build tool. Convert the value of each pcd's \r
+    # Parser the input file which is generated by the build tool. Convert the value of each pcd's\r
     # from string to it's real format. Also remove the useless line in the input file.\r
-    # \r
+    #\r
     def ParserInputFile (self):\r
         count = 0\r
         for line in self.FileLinesList:\r
@@ -390,7 +390,7 @@ class GenVPD :
         #\r
         # After remove the useless line, if there are no data remain in the file line list,\r
         # Report warning messages to user's.\r
-        # \r
+        #\r
         if len(self.FileLinesList) == 0 :\r
             EdkLogger.warn('BPDG', BuildToolError.RESOURCE_NOT_AVAILABLE,\r
                            "There are no VPD type pcds defined in DSC file, Please check it.")\r
@@ -480,14 +480,14 @@ class GenVPD :
                 continue\r
 \r
     ##\r
-    # This function used to create a clean list only contain useful information and reorganized to make it \r
+    # This function used to create a clean list only contain useful information and reorganized to make it\r
     # easy to be sorted\r
     #\r
     def FormatFileLine (self) :\r
 \r
         for eachPcd in self.FileLinesList :\r
             if eachPcd.PcdOffset != '*' :\r
-                # Use pcd's Offset value as key, and pcd's Value as value \r
+                # Use pcd's Offset value as key, and pcd's Value as value\r
                 self.PcdFixedOffsetSizeList.append(eachPcd)\r
             else :\r
                 # Use pcd's CName as key, and pcd's Size as value\r
@@ -497,11 +497,11 @@ class GenVPD :
     ##\r
     # This function is use to fix the offset value which the not specified in the map file.\r
     # Usually it use the star (meaning any offset) character in the offset field\r
-    #    \r
+    #\r
     def FixVpdOffset (self):\r
         # At first, the offset should start at 0\r
         # Sort fixed offset list in order to find out where has free spaces for the pcd's offset\r
-        # value is "*" to insert into.      \r
+        # value is "*" to insert into.\r
 \r
         self.PcdFixedOffsetSizeList.sort(lambda x, y: cmp(x.PcdBinOffset, y.PcdBinOffset))\r
 \r
@@ -530,57 +530,57 @@ class GenVPD :
                 Pcd.PcdBinOffset = NowOffset\r
                 Pcd.PcdOffset    = str(hex(Pcd.PcdBinOffset))\r
                 NowOffset       += Pcd.PcdOccupySize\r
-                \r
+\r
             self.PcdFixedOffsetSizeList = self.PcdUnknownOffsetList\r
             return\r
 \r
-        # Check the offset of VPD type pcd's offset start from 0.    \r
+        # Check the offset of VPD type pcd's offset start from 0.\r
         if self.PcdFixedOffsetSizeList[0].PcdBinOffset != 0 :\r
             EdkLogger.warn("BPDG", "The offset of VPD type pcd should start with 0, please check it.",\r
                             None)\r
 \r
         # Judge whether the offset in fixed pcd offset list is overlapped or not.\r
         lenOfList = len(self.PcdFixedOffsetSizeList)\r
-        count     = 0                       \r
+        count     = 0\r
         while (count < lenOfList - 1) :\r
             PcdNow  = self.PcdFixedOffsetSizeList[count]\r
             PcdNext = self.PcdFixedOffsetSizeList[count+1]\r
-            # Two pcd's offset is same            \r
+            # Two pcd's offset is same\r
             if PcdNow.PcdBinOffset == PcdNext.PcdBinOffset :\r
                 EdkLogger.error("BPDG", BuildToolError.ATTRIBUTE_GET_FAILURE,\r
                                 "The offset of %s at line: %s is same with %s at line: %s in file %s" % \\r
                                 (PcdNow.PcdCName, PcdNow.Lineno, PcdNext.PcdCName, PcdNext.Lineno, PcdNext.FileName),\r
                                 None)\r
 \r
-            # Overlapped   \r
+            # Overlapped\r
             if PcdNow.PcdBinOffset + PcdNow.PcdOccupySize > PcdNext.PcdBinOffset :\r
                 EdkLogger.error("BPDG", BuildToolError.ATTRIBUTE_GET_FAILURE,\r
                                 "The offset of %s at line: %s is overlapped with %s at line: %s in file %s" % \\r
                                 (PcdNow.PcdCName, PcdNow.Lineno, PcdNext.PcdCName, PcdNext.Lineno, PcdNext.FileName),\r
                                 None)\r
 \r
-            # Has free space, raise a warning message   \r
+            # Has free space, raise a warning message\r
             if PcdNow.PcdBinOffset + PcdNow.PcdOccupySize < PcdNext.PcdBinOffset :\r
                 EdkLogger.warn("BPDG", BuildToolError.ATTRIBUTE_GET_FAILURE,\r
                                "The offsets have free space of between %s at line: %s and %s at line: %s in file %s" % \\r
                                (PcdNow.PcdCName, PcdNow.Lineno, PcdNext.PcdCName, PcdNext.Lineno, PcdNext.FileName),\r
                                 None)\r
             count += 1\r
-                             \r
+\r
         LastOffset              = self.PcdFixedOffsetSizeList[0].PcdBinOffset\r
         FixOffsetSizeListCount  = 0\r
         lenOfList               = len(self.PcdFixedOffsetSizeList)\r
         lenOfUnfixedList        = len(self.PcdUnknownOffsetList)\r
-                \r
+\r
         ##\r
-        # Insert the un-fixed offset pcd's list into fixed offset pcd's list if has free space between those pcds. \r
-        # \r
+        # Insert the un-fixed offset pcd's list into fixed offset pcd's list if has free space between those pcds.\r
+        #\r
         while (FixOffsetSizeListCount < lenOfList) :\r
-            \r
-            eachFixedPcd     = self.PcdFixedOffsetSizeList[FixOffsetSizeListCount]                       \r
+\r
+            eachFixedPcd     = self.PcdFixedOffsetSizeList[FixOffsetSizeListCount]\r
             NowOffset        = eachFixedPcd.PcdBinOffset\r
-            \r
-            # Has free space               \r
+\r
+            # Has free space\r
             if LastOffset < NowOffset :\r
                 if lenOfUnfixedList != 0 :\r
                     countOfUnfixedList = 0\r
@@ -598,42 +598,42 @@ class GenVPD :
                                 eachUnfixedPcd.PcdBinOffset = LastOffset\r
                                 # Insert this pcd into fixed offset pcd list.\r
                                 self.PcdFixedOffsetSizeList.insert(FixOffsetSizeListCount, eachUnfixedPcd)\r
-                                \r
+\r
                                 # Delete the item's offset that has been fixed and added into fixed offset list\r
                                 self.PcdUnknownOffsetList.pop(countOfUnfixedList)\r
-                                \r
+\r
                                 # After item added, should enlarge the length of fixed pcd offset list\r
-                                lenOfList               += 1                                \r
+                                lenOfList               += 1\r
                                 FixOffsetSizeListCount  += 1\r
-                                \r
+\r
                                 # Decrease the un-fixed pcd offset list's length\r
                                 lenOfUnfixedList        -= 1\r
-                                \r
-                                # Modify the last offset value \r
-                                LastOffset              += needFixPcdSize                            \r
+\r
+                                # Modify the last offset value\r
+                                LastOffset              += needFixPcdSize\r
                             else :\r
                                 # It can not insert into those two pcds, need to check still has other space can store it.\r
                                 LastOffset             = NowOffset + self.PcdFixedOffsetSizeList[FixOffsetSizeListCount].PcdOccupySize\r
                                 FixOffsetSizeListCount += 1\r
                                 break\r
-                                                                                 \r
+\r
                 # Set the FixOffsetSizeListCount = lenOfList for quit the loop\r
                 else :\r
-                    FixOffsetSizeListCount = lenOfList                    \r
-                        \r
-            # No free space, smoothly connect with previous pcd. \r
+                    FixOffsetSizeListCount = lenOfList\r
+\r
+            # No free space, smoothly connect with previous pcd.\r
             elif LastOffset == NowOffset :\r
                 LastOffset = NowOffset + eachFixedPcd.PcdOccupySize\r
                 FixOffsetSizeListCount += 1\r
-            # Usually it will not enter into this thunk, if so, means it overlapped. \r
+            # Usually it will not enter into this thunk, if so, means it overlapped.\r
             else :\r
                 EdkLogger.error("BPDG", BuildToolError.ATTRIBUTE_NOT_AVAILABLE,\r
                                 "The offset value definition has overlapped at pcd: %s, it's offset is: %s, in file: %s line: %s" % \\r
                                 (eachFixedPcd.PcdCName, eachFixedPcd.PcdOffset, eachFixedPcd.InputFileName, eachFixedPcd.Lineno),\r
                                 None)\r
                 FixOffsetSizeListCount += 1\r
-        \r
-        # Continue to process the un-fixed offset pcd's list, add this time, just append them behind the fixed pcd's offset list.    \r
+\r
+        # Continue to process the un-fixed offset pcd's list, add this time, just append them behind the fixed pcd's offset list.\r
         lenOfUnfixedList  = len(self.PcdUnknownOffsetList)\r
         lenOfList         = len(self.PcdFixedOffsetSizeList)\r
         while (lenOfUnfixedList > 0) :\r
@@ -641,23 +641,23 @@ class GenVPD :
             # The last pcd instance\r
             LastPcd    = self.PcdFixedOffsetSizeList[lenOfList-1]\r
             NeedFixPcd = self.PcdUnknownOffsetList[0]\r
-            \r
+\r
             NeedFixPcd.PcdBinOffset = LastPcd.PcdBinOffset + LastPcd.PcdOccupySize\r
             if NeedFixPcd.PcdBinOffset % NeedFixPcd.Alignment != 0:\r
                 NeedFixPcd.PcdBinOffset = (NeedFixPcd.PcdBinOffset / NeedFixPcd.Alignment + 1) * NeedFixPcd.Alignment\r
 \r
             NeedFixPcd.PcdOffset    = str(hex(NeedFixPcd.PcdBinOffset))\r
-            \r
+\r
             # Insert this pcd into fixed offset pcd list's tail.\r
             self.PcdFixedOffsetSizeList.insert(lenOfList, NeedFixPcd)\r
             # Delete the item's offset that has been fixed and added into fixed offset list\r
             self.PcdUnknownOffsetList.pop(0)\r
-            \r
+\r
             lenOfList          += 1\r
-            lenOfUnfixedList   -= 1                                                                                                                \r
+            lenOfUnfixedList   -= 1\r
     ##\r
     # Write the final data into output files.\r
-    #   \r
+    #\r
     def GenerateVpdFile (self, MapFileName, BinFileName):\r
         #Open an VPD file to process\r
 \r
@@ -705,4 +705,4 @@ class GenVPD :
         fStringIO.close ()\r
         fVpdFile.close ()\r
         fMapFile.close ()\r
-        \r
+\r
index bbcb451198686d80d0b02d33b3046ef81335a2e2..dc116f05f4aca0d7aa00b2f84d2d3285319f27cc 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to define strings used in the BPDG tool\r
 #\r
-# Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -31,8 +31,8 @@ MAP_FILE_COMMENT_TEMPLATE = \
 #  THIS IS AUTO-GENERATED FILE BY BPDG TOOLS AND PLEASE DO NOT MAKE MODIFICATION.\r
 #\r
 #  This file lists all VPD informations for a platform fixed/adjusted by BPDG tool.\r
-# \r
-# Copyright (c) 2010 -2016, Intel Corporation. All rights reserved.<BR>\r
+#\r
+# Copyright (c) 2010 -2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -50,18 +50,18 @@ LBL_BPDG_VERSION            = (u"1.0")
 LBL_BPDG_USAGE              = \\r
 (\r
 """BPDG options -o Filename.bin -m Filename.map Filename.txt\r
-Copyright (c) 2010 - 2016, Intel Corporation All Rights Reserved.\r
+Copyright (c) 2010 - 2018, Intel Corporation All Rights Reserved.\r
 \r
   Intel(r) Binary Product Data Generation Tool (Intel(r) BPDG)\r
-  \r
+\r
 Required Flags:\r
   -o BIN_FILENAME, --vpd-filename=BIN_FILENAME\r
             Specify the file name for the VPD binary file\r
   -m FILENAME, --map-filename=FILENAME\r
-            Generate file name for consumption during the build that contains \r
-            the mapping of Pcd name, offset, datum size and value derived \r
+            Generate file name for consumption during the build that contains\r
+            the mapping of Pcd name, offset, datum size and value derived\r
             from the input file and any automatic calculations.\r
-""" \r
+"""\r
 )\r
 \r
 MSG_OPTION_HELP             = ("Show this help message and exit.")\r
index 7414d30f49eaed39241c26a71192e5227b760ae6..c889dea2f03ee062e63e5feefe6057b2608cdc55 100644 (file)
@@ -2,15 +2,15 @@
 #\r
 # This file is for build version number auto generation\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 #\r
 \r
-gBUILD_VERSION = ""\r
+gBUILD_VERSION = "Developer Build based on Revision: Unknown"\r
index d3340f5a90369058dfe7356e72c1ab848ec9a622..6abfa1f15e35ef3ea1e0c6347959ec98d025464b 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create a database used by ECC tool\r
 #\r
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -33,7 +33,7 @@ from Table.TableDsc import TableDsc
 # This class defined the build databse\r
 # During the phase of initialization, the database will create all tables and\r
 # insert all records of table DataModel\r
-# \r
+#\r
 # @param object:      Inherited from object class\r
 # @param DbPath:      A string for the path of the ECC database\r
 #\r
@@ -54,7 +54,7 @@ class Database(object):
         self.TblInf = TableInf(self.Cur)\r
         self.TblDec = TableDec(self.Cur)\r
         self.TblDsc = TableDsc(self.Cur)\r
-    \r
+\r
     ## Initialize build database\r
     #\r
     # 1. Delete all old existing tables\r
@@ -69,7 +69,7 @@ class Database(object):
 #        self.TblDataModel.Drop()\r
 #        self.TblDsc.Drop()\r
 #        self.TblFile.Drop()\r
-        \r
+\r
         #\r
         # Create new tables\r
         #\r
@@ -78,7 +78,7 @@ class Database(object):
         self.TblInf.Create()\r
         self.TblDec.Create()\r
         self.TblDsc.Create()\r
-        \r
+\r
         #\r
         # Initialize table DataModel\r
         #\r
@@ -91,10 +91,10 @@ class Database(object):
     #\r
     def QueryTable(self, Table):\r
         Table.Query()\r
-    \r
+\r
     ## Close entire database\r
     #\r
-    # Commit all first \r
+    # Commit all first\r
     # Close the connection and cursor\r
     #\r
     def Close(self):\r
@@ -110,11 +110,11 @@ class Database(object):
 if __name__ == '__main__':\r
     EdkLogger.Initialize()\r
     EdkLogger.SetLevel(EdkLogger.DEBUG_0)\r
-    \r
+\r
     Db = Database(DATABASE_PATH)\r
     Db.InitDatabase()\r
-    Db.QueryTable(Db.TblDataModel)   \r
+    Db.QueryTable(Db.TblDataModel)\r
     Db.QueryTable(Db.TblFile)\r
     Db.QueryTable(Db.TblDsc)\r
     Db.Close()\r
-    
\ No newline at end of file
+\r
index 044ef8d62bfe62ea4573fb3b94c7eb6c567d5296..b56ddd5324711d5e8412be5a0f391cf0256fc555 100644 (file)
@@ -63,11 +63,11 @@ gDependencyDatabase = {}    # arch : {file path : [dependent files list]}
 _TempInfs = []\r
 \r
 def GetVariableOffset(mapfilepath, efifilepath, varnames):\r
-    """ Parse map file to get variable offset in current EFI file \r
+    """ Parse map file to get variable offset in current EFI file\r
     @param mapfilepath    Map file absolution path\r
     @param efifilepath:   EFI binary file full path\r
     @param varnames       iteratable container whose elements are variable names to be searched\r
-    \r
+\r
     @return List whos elements are tuple with variable name and raw offset\r
     """\r
     lines = []\r
@@ -77,7 +77,7 @@ def GetVariableOffset(mapfilepath, efifilepath, varnames):
         f.close()\r
     except:\r
         return None\r
-    \r
+\r
     if len(lines) == 0: return None\r
     firstline = lines[0].strip()\r
     if (firstline.startswith("Archive member included ") and\r
@@ -177,7 +177,7 @@ def _parseGeneral(lines, efifilepath, varnames):
             continue\r
         if line.startswith("entry point at"):\r
             status = 3\r
-            continue        \r
+            continue\r
         if status == 1 and len(line) != 0:\r
             m =  secReGeneral.match(line)\r
             assert m is not None, "Fail to parse the section in map file , line is %s" % line\r
@@ -257,7 +257,7 @@ def ProcessDuplicatedInf(Path, BaseName, Workspace):
     #\r
     # A temporary INF is copied to database path which must have write permission\r
     # The temporary will be removed at the end of build\r
-    # In case of name conflict, the file name is \r
+    # In case of name conflict, the file name is\r
     # FILE_GUIDBaseName (0D1B936F-68F3-4589-AFCC-FB8B7AEBC836module.inf)\r
     #\r
     TempFullPath = os.path.join(DbDir,\r
@@ -268,7 +268,7 @@ def ProcessDuplicatedInf(Path, BaseName, Workspace):
     #\r
     # To build same module more than once, the module path with FILE_GUID overridden has\r
     # the file name FILE_GUIDmodule.inf, but the relative path (self.MetaFile.File) is the real path\r
-    # in DSC which is used as relative path by C files and other files in INF. \r
+    # in DSC which is used as relative path by C files and other files in INF.\r
     # A trick was used: all module paths are PathClass instances, after the initialization\r
     # of PathClass, the PathClass.Path is overridden by the temporary INF path.\r
     #\r
@@ -287,7 +287,7 @@ def ProcessDuplicatedInf(Path, BaseName, Workspace):
     # If file exists, compare contents\r
     #\r
     if os.path.exists(TempFullPath):\r
-        with open(str(Path), 'rb') as f1, open(TempFullPath, 'rb') as f2: \r
+        with open(str(Path), 'rb') as f1, open(TempFullPath, 'rb') as f2:\r
             if f1.read() == f2.read():\r
                 return RtPath\r
     _TempInfs.append(TempFullPath)\r
@@ -1545,29 +1545,29 @@ def AnalyzeDscPcd(Setting, PcdType, DataType=''):
 #  Used to avoid split issue while the value string contain "|" character\r
 #\r
 #  @param[in] Setting:  A String contain value/datum type/token number information;\r
-#  \r
-#  @retval   ValueList: A List contain value, datum type and toke number. \r
+#\r
+#  @retval   ValueList: A List contain value, datum type and toke number.\r
 #\r
 def AnalyzePcdData(Setting):\r
     ValueList = ['', '', '']\r
 \r
     ValueRe = re.compile(r'^\s*L?\".*\|.*\"')\r
     PtrValue = ValueRe.findall(Setting)\r
-    \r
+\r
     ValueUpdateFlag = False\r
-    \r
+\r
     if len(PtrValue) >= 1:\r
         Setting = re.sub(ValueRe, '', Setting)\r
         ValueUpdateFlag = True\r
 \r
     TokenList = Setting.split(TAB_VALUE_SPLIT)\r
     ValueList[0:len(TokenList)] = TokenList\r
-    \r
+\r
     if ValueUpdateFlag:\r
         ValueList[0] = PtrValue[0]\r
-        \r
-    return ValueList   \r
\r
+\r
+    return ValueList\r
+\r
 ## check format of PCD value against its the datum type\r
 #\r
 # For PCD value setting\r
@@ -1770,7 +1770,7 @@ class PathClass(object):
             OtherKey = Other.Path\r
         else:\r
             OtherKey = str(Other)\r
-            \r
+\r
         SelfKey = self.Path\r
         if SelfKey == OtherKey:\r
             return 0\r
@@ -1908,7 +1908,7 @@ class PeImageClass():
     def _ByteListToStr(self, ByteList):\r
         String = ''\r
         for index in range(len(ByteList)):\r
-            if ByteList[index] == 0: \r
+            if ByteList[index] == 0:\r
                 break\r
             String += chr(ByteList[index])\r
         return String\r
@@ -1945,11 +1945,11 @@ class DefaultStore():
             if sid == minid:\r
                 return name\r
 class SkuClass():\r
-    \r
+\r
     DEFAULT = 0\r
     SINGLE = 1\r
     MULTIPLE =2\r
-    \r
+\r
     def __init__(self,SkuIdentifier='', SkuIds=None):\r
         if SkuIds is None:\r
             SkuIds = {}\r
@@ -1961,7 +1961,7 @@ class SkuClass():
                 EdkLogger.error("build", PARAMETER_INVALID,\r
                             ExtraData = "SKU-ID [%s] value %s exceeds the max value of UINT64"\r
                                       % (SkuName, SkuId))\r
-        \r
+\r
         self.AvailableSkuIds = sdict()\r
         self.SkuIdSet = []\r
         self.SkuIdNumberSet = []\r
@@ -1975,10 +1975,10 @@ class SkuClass():
             self.SkuIdSet = SkuIds.keys()\r
             self.SkuIdNumberSet = [num[0].strip() + 'U' for num in SkuIds.values()]\r
         else:\r
-            r = SkuIdentifier.split('|') \r
+            r = SkuIdentifier.split('|')\r
             self.SkuIdSet=[(r[k].strip()).upper() for k in range(len(r))]\r
             k = None\r
-            try: \r
+            try:\r
                 self.SkuIdNumberSet = [SkuIds[k][0].strip() + 'U' for k in self.SkuIdSet]\r
             except Exception:\r
                 EdkLogger.error("build", PARAMETER_INVALID,\r
@@ -2027,7 +2027,7 @@ class SkuClass():
         skuorderset = []\r
         for skuname in self.SkuIdSet:\r
             skuorderset.append(self.GetSkuChain(skuname))\r
-        \r
+\r
         skuorder = []\r
         for index in range(max(len(item) for item in skuorderset)):\r
             for subset in skuorderset:\r
@@ -2039,8 +2039,8 @@ class SkuClass():
 \r
         return skuorder\r
 \r
-    def __SkuUsageType(self): \r
-        \r
+    def __SkuUsageType(self):\r
+\r
         if self.__SkuIdentifier.upper() == "ALL":\r
             return SkuClass.MULTIPLE\r
 \r
@@ -2073,7 +2073,7 @@ class SkuClass():
         return ArrayStr\r
     def __GetAvailableSkuIds(self):\r
         return self.AvailableSkuIds\r
-    \r
+\r
     def __GetSystemSkuID(self):\r
         if self.__SkuUsageType() == SkuClass.SINGLE:\r
             if len(self.SkuIdSet) == 1:\r
index 2a76d49cc627ad6cd96ceef1818cb2a7d215f184..81594e22cd9feaf746950101148446aec43bd816 100644 (file)
@@ -4,7 +4,7 @@
 # This file is required to make Python interpreter treat the directory\r
 # as containing package.\r
 #\r
-# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -20,16 +20,16 @@ from Common.DataType import TAB_WORKSPACE
 ## MultipleWorkspace\r
 #\r
 # This class manage multiple workspace behavior\r
-# \r
+#\r
 # @param class:\r
 #\r
 # @var WORKSPACE:      defined the current WORKSPACE\r
 # @var PACKAGES_PATH:  defined the other WORKSAPCE, if current WORKSPACE is invalid, search valid WORKSPACE from PACKAGES_PATH\r
-# \r
+#\r
 class MultipleWorkspace(object):\r
     WORKSPACE = ''\r
     PACKAGES_PATH = None\r
-    \r
+\r
     ## convertPackagePath()\r
     #\r
     #   Convert path to match workspace.\r
@@ -59,7 +59,7 @@ class MultipleWorkspace(object):
             cls.PACKAGES_PATH = [cls.convertPackagePath (Ws, os.path.normpath(Path.strip())) for Path in PackagesPath.split(os.pathsep)]\r
         else:\r
             cls.PACKAGES_PATH = []\r
-    \r
+\r
     ## join()\r
     #\r
     #   rewrite os.path.join function\r
@@ -79,7 +79,7 @@ class MultipleWorkspace(object):
                     return Path\r
             Path = os.path.join(Ws, *p)\r
         return Path\r
-    \r
+\r
     ## relpath()\r
     #\r
     #   rewrite os.path.relpath function\r
@@ -98,7 +98,7 @@ class MultipleWorkspace(object):
         if Path.lower().startswith(Ws.lower()):\r
             Path = os.path.relpath(Path, Ws)\r
         return Path\r
-    \r
+\r
     ## getWs()\r
     #\r
     #   get valid workspace for the path\r
@@ -117,7 +117,7 @@ class MultipleWorkspace(object):
                 if os.path.exists(absPath):\r
                     return Pkg\r
         return Ws\r
-    \r
+\r
     ## handleWsMacro()\r
     #\r
     #   handle the $(WORKSPACE) tag, if current workspace is invalid path relative the tool, replace it.\r
@@ -143,7 +143,7 @@ class MultipleWorkspace(object):
                         PathList[i] = str[0:MacroStartPos] + Path\r
             PathStr = ' '.join(PathList)\r
         return PathStr\r
-    \r
+\r
     ## getPkgPath()\r
     #\r
     #   get all package pathes.\r
@@ -153,4 +153,4 @@ class MultipleWorkspace(object):
     @classmethod\r
     def getPkgPath(cls):\r
         return cls.PACKAGES_PATH\r
-            
\ No newline at end of file
+\r
index 014c75b8cebde26893395b38f15203da6e00d662..20581edadf3f5c9c14a1abe113bd1e309a1d614f 100644 (file)
@@ -43,7 +43,7 @@ ERR_IN_OPERAND = 'Macro after IN operator can only be: $(FAMILY), $(ARCH), $(TOO
 \r
 class RangeObject(object):\r
     def __init__(self, start, end, empty = False):\r
-        \r
+\r
         if int(start) < int(end):\r
             self.start = int(start)\r
             self.end = int(end)\r
@@ -55,24 +55,24 @@ class RangeObject(object):
 class RangeContainer(object):\r
     def __init__(self):\r
         self.rangelist = []\r
-        \r
+\r
     def push(self, RangeObject):\r
         self.rangelist.append(RangeObject)\r
         self.rangelist = sorted(self.rangelist, key = lambda rangeobj : rangeobj.start)\r
         self.merge()\r
-        \r
+\r
     def pop(self):\r
         for item in self.rangelist:\r
             yield item\r
-   \r
-    def __clean__(self):   \r
+\r
+    def __clean__(self):\r
         newrangelist = []\r
         for rangeobj in self.rangelist:\r
             if rangeobj.empty == True:\r
                 continue\r
             else:\r
                 newrangelist.append(rangeobj)\r
-        self.rangelist = newrangelist      \r
+        self.rangelist = newrangelist\r
     def merge(self):\r
         self.__clean__()\r
         for i in range(0, len(self.rangelist) - 1):\r
@@ -80,23 +80,23 @@ class RangeContainer(object):
                 continue\r
             else:\r
                 self.rangelist[i + 1].start = self.rangelist[i].start\r
-                self.rangelist[i + 1].end = self.rangelist[i + 1].end > self.rangelist[i].end and self.rangelist[i + 1].end or self.rangelist[i].end \r
+                self.rangelist[i + 1].end = self.rangelist[i + 1].end > self.rangelist[i].end and self.rangelist[i + 1].end or self.rangelist[i].end\r
                 self.rangelist[i].empty = True\r
 \r
         self.__clean__()\r
-        \r
+\r
     def dump(self):\r
         print("----------------------")\r
         rangelist = ""\r
         for object in self.rangelist:\r
             rangelist = rangelist + "[%d , %d]" % (object.start, object.end)\r
         print(rangelist)\r
-        \r
-        \r
-class XOROperatorObject(object):   \r
-    def __init__(self):     \r
+\r
+\r
+class XOROperatorObject(object):\r
+    def __init__(self):\r
         pass\r
-    def Calculate(self, Operand, DataType, SymbolTable): \r
+    def Calculate(self, Operand, DataType, SymbolTable):\r
         if isinstance(Operand, type('')) and not Operand.isalnum():\r
             Expr = "XOR ..."\r
             raise BadExpression(ERR_SNYTAX % Expr)\r
@@ -108,9 +108,9 @@ class XOROperatorObject(object):
         return rangeId\r
 \r
 class LEOperatorObject(object):\r
-    def __init__(self):     \r
+    def __init__(self):\r
         pass\r
-    def Calculate(self, Operand, DataType, SymbolTable): \r
+    def Calculate(self, Operand, DataType, SymbolTable):\r
         if isinstance(Operand, type('')) and not Operand.isalnum():\r
             Expr = "LE ..."\r
             raise BadExpression(ERR_SNYTAX % Expr)\r
@@ -120,22 +120,22 @@ class LEOperatorObject(object):
         SymbolTable[rangeId1] = rangeContainer\r
         return rangeId1\r
 class LTOperatorObject(object):\r
-    def __init__(self):     \r
+    def __init__(self):\r
         pass\r
     def Calculate(self, Operand, DataType, SymbolTable):\r
         if isinstance(Operand, type('')) and not Operand.isalnum():\r
-            Expr = "LT ..." \r
-            raise BadExpression(ERR_SNYTAX % Expr) \r
+            Expr = "LT ..."\r
+            raise BadExpression(ERR_SNYTAX % Expr)\r
         rangeId1 = str(uuid.uuid1())\r
         rangeContainer = RangeContainer()\r
         rangeContainer.push(RangeObject(0, int(Operand) - 1))\r
         SymbolTable[rangeId1] = rangeContainer\r
-        return rangeId1   \r
+        return rangeId1\r
 \r
 class GEOperatorObject(object):\r
-    def __init__(self):     \r
+    def __init__(self):\r
         pass\r
-    def Calculate(self, Operand, DataType, SymbolTable): \r
+    def Calculate(self, Operand, DataType, SymbolTable):\r
         if isinstance(Operand, type('')) and not Operand.isalnum():\r
             Expr = "GE ..."\r
             raise BadExpression(ERR_SNYTAX % Expr)\r
@@ -143,12 +143,12 @@ class GEOperatorObject(object):
         rangeContainer = RangeContainer()\r
         rangeContainer.push(RangeObject(int(Operand), MAX_VAL_TYPE[DataType]))\r
         SymbolTable[rangeId1] = rangeContainer\r
-        return rangeId1   \r
-      \r
+        return rangeId1\r
+\r
 class GTOperatorObject(object):\r
-    def __init__(self):     \r
+    def __init__(self):\r
         pass\r
-    def Calculate(self, Operand, DataType, SymbolTable): \r
+    def Calculate(self, Operand, DataType, SymbolTable):\r
         if isinstance(Operand, type('')) and not Operand.isalnum():\r
             Expr = "GT ..."\r
             raise BadExpression(ERR_SNYTAX % Expr)\r
@@ -156,12 +156,12 @@ class GTOperatorObject(object):
         rangeContainer = RangeContainer()\r
         rangeContainer.push(RangeObject(int(Operand) + 1, MAX_VAL_TYPE[DataType]))\r
         SymbolTable[rangeId1] = rangeContainer\r
-        return rangeId1   \r
-    \r
+        return rangeId1\r
+\r
 class EQOperatorObject(object):\r
-    def __init__(self):     \r
+    def __init__(self):\r
         pass\r
-    def Calculate(self, Operand, DataType, SymbolTable): \r
+    def Calculate(self, Operand, DataType, SymbolTable):\r
         if isinstance(Operand, type('')) and not Operand.isalnum():\r
             Expr = "EQ ..."\r
             raise BadExpression(ERR_SNYTAX % Expr)\r
@@ -169,8 +169,8 @@ class EQOperatorObject(object):
         rangeContainer = RangeContainer()\r
         rangeContainer.push(RangeObject(int(Operand), int(Operand)))\r
         SymbolTable[rangeId1] = rangeContainer\r
-        return rangeId1   \r
-    \r
+        return rangeId1\r
+\r
 def GetOperatorObject(Operator):\r
     if Operator == '>':\r
         return GTOperatorObject()\r
@@ -214,8 +214,8 @@ class RangeExpression(BaseExpression):
             NumberDict[HexNumber] = Number\r
         for HexNum in NumberDict:\r
             expr = expr.replace(HexNum, NumberDict[HexNum])\r
-        \r
-        rangedict = {}    \r
+\r
+        rangedict = {}\r
         for validrange in self.RangePattern.findall(expr):\r
             start, end = validrange.split(" - ")\r
             start = start.strip()\r
@@ -225,19 +225,19 @@ class RangeExpression(BaseExpression):
             rangeContainer.push(RangeObject(start, end))\r
             self.operanddict[str(rangeid)] = rangeContainer\r
             rangedict[validrange] = str(rangeid)\r
-            \r
+\r
         for validrange in rangedict:\r
             expr = expr.replace(validrange, rangedict[validrange])\r
-         \r
-        self._Expr = expr    \r
+\r
+        self._Expr = expr\r
         return expr\r
-            \r
-        \r
+\r
+\r
     def EvalRange(self, Operator, Oprand):\r
 \r
         operatorobj = GetOperatorObject(Operator)\r
         return operatorobj.Calculate(Oprand, self.PcdDataType, self.operanddict)\r
-        \r
+\r
     def Rangeintersection(self, Oprand1, Oprand2):\r
         rangeContainer1 = self.operanddict[Oprand1]\r
         rangeContainer2 = self.operanddict[Oprand2]\r
@@ -266,35 +266,35 @@ class RangeExpression(BaseExpression):
                 elif end1 >= end2:\r
                     rangeid = str(uuid.uuid1())\r
                     rangeContainer.push(RangeObject(start2, end2))\r
-        \r
+\r
         self.operanddict[rangeid] = rangeContainer\r
 #        rangeContainer.dump()\r
         return rangeid\r
-            \r
+\r
     def Rangecollections(self, Oprand1, Oprand2):\r
 \r
         rangeContainer1 = self.operanddict[Oprand1]\r
         rangeContainer2 = self.operanddict[Oprand2]\r
         rangeContainer = RangeContainer()\r
-        \r
+\r
         for rangeobj in rangeContainer2.pop():\r
             rangeContainer.push(rangeobj)\r
         for rangeobj in rangeContainer1.pop():\r
             rangeContainer.push(rangeobj)\r
-        \r
+\r
         rangeid = str(uuid.uuid1())\r
         self.operanddict[rangeid] = rangeContainer\r
-        \r
+\r
 #        rangeContainer.dump()\r
         return rangeid\r
-        \r
-            \r
+\r
+\r
     def NegtiveRange(self, Oprand1):\r
         rangeContainer1 = self.operanddict[Oprand1]\r
-        \r
-        \r
+\r
+\r
         rangeids = []\r
-        \r
+\r
         for rangeobj in rangeContainer1.pop():\r
             rangeContainer = RangeContainer()\r
             rangeid = str(uuid.uuid1())\r
@@ -321,13 +321,13 @@ class RangeExpression(BaseExpression):
         re = self.Rangeintersection(rangeids[0], rangeids[1])\r
         for i in range(2, len(rangeids)):\r
             re = self.Rangeintersection(re, rangeids[i])\r
-            \r
+\r
         rangeid2 = str(uuid.uuid1())\r
         self.operanddict[rangeid2] = self.operanddict[re]\r
         return rangeid2\r
-        \r
+\r
     def Eval(self, Operator, Oprand1, Oprand2 = None):\r
-        \r
+\r
         if Operator in ["!", "NOT", "not"]:\r
             if not gGuidPattern.match(Oprand1.strip()):\r
                 raise BadExpression(ERR_STRING_EXPR % Operator)\r
@@ -338,7 +338,7 @@ class RangeExpression(BaseExpression):
             elif Operator == 'and' :\r
                 if not gGuidPatternEnd.match(Oprand1.strip()) or not gGuidPatternEnd.match(Oprand2.strip()):\r
                     raise BadExpression(ERR_STRING_EXPR % Operator)\r
-                return self.Rangeintersection(Oprand1, Oprand2)    \r
+                return self.Rangeintersection(Oprand1, Oprand2)\r
             elif Operator == 'or':\r
                 if not gGuidPatternEnd.match(Oprand1.strip()) or not gGuidPatternEnd.match(Oprand2.strip()):\r
                     raise BadExpression(ERR_STRING_EXPR % Operator)\r
@@ -369,11 +369,11 @@ class RangeExpression(BaseExpression):
         self._Len = len(self._Expr)\r
         self._Token = ''\r
         self._WarnExcept = None\r
-        \r
+\r
 \r
         # Literal token without any conversion\r
         self._LiteralToken = ''\r
-        \r
+\r
         # store the operand object\r
         self.operanddict = {}\r
         # The Pcd max value depends on PcdDataType\r
@@ -393,9 +393,9 @@ class RangeExpression(BaseExpression):
         self._Depth = Depth\r
 \r
         self._Expr = self._Expr.strip()\r
-        \r
+\r
         self.preProcessRangeExpr(self._Expr)\r
-        \r
+\r
         # check if the expression does not need to evaluate\r
         if RealValue and Depth == 0:\r
             self._Token = self._Expr\r
@@ -407,12 +407,12 @@ class RangeExpression(BaseExpression):
 \r
         Val = self._OrExpr()\r
         RealVal = Val\r
-        \r
+\r
         RangeIdList = RealVal.split("or")\r
         RangeList = []\r
         for rangeid in RangeIdList:\r
             RangeList.append(self.operanddict[rangeid.strip()])\r
-            \r
+\r
         return RangeList\r
 \r
     # Template function to parse binary operators which have same precedence\r
index 3f6bae3bdc39c740eb43ff7dc5151baded35eba9..723faac0f9f3da827b68e5703b272f9c297d4559 100644 (file)
@@ -839,7 +839,7 @@ def StringToArray(String):
             return "{%s,0x00}" % ",".join(C.strip() for C in String[1:-1].split(','))\r
         else:\r
             return "{%s}" % ",".join(C.strip() for C in String[1:-1].split(','))\r
-        \r
+\r
     else:\r
         if len(String.split()) % 2:\r
             return '{%s,0}' % ','.join(String.split())\r
index a2e22ca0409c230dc6f29a1aa3c7bdfa5a83e19f..522adac8d558562c29860f332a6328a1ba94debb 100644 (file)
@@ -1,9 +1,9 @@
 # # @file\r
-# \r
+#\r
 # This file is used to handle the variable attributes and property information\r
 #\r
 #\r
-# Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,7 +12,7 @@
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 #\r
-   \r
+\r
 class VariableAttributes(object):\r
     EFI_VARIABLE_NON_VOLATILE = 0x00000001\r
     EFI_VARIABLE_BOOTSERVICE_ACCESS = 0x00000002\r
@@ -24,22 +24,22 @@ class VariableAttributes(object):
                      "RT":EFI_VARIABLE_RUNTIME_ACCESS,\r
                      "RO":VAR_CHECK_VARIABLE_PROPERTY_READ_ONLY\r
                      }\r
-    \r
+\r
     def __init__(self):\r
         pass\r
-    \r
+\r
     @staticmethod\r
     def GetVarAttributes(var_attr_str):\r
         VarAttr = 0x00000000\r
         VarProp = 0x00000000\r
-        \r
+\r
         attr_list = var_attr_str.split(",")\r
         for attr in attr_list:\r
             attr = attr.strip()\r
             if attr == 'RO':\r
                 VarProp = VariableAttributes.VAR_CHECK_VARIABLE_PROPERTY_READ_ONLY\r
             else:\r
-                VarAttr = VarAttr | VariableAttributes.VarAttributesMap.get(attr, 0x00000000)   \r
+                VarAttr = VarAttr | VariableAttributes.VarAttributesMap.get(attr, 0x00000000)\r
         return VarAttr, VarProp\r
     @staticmethod\r
     def ValidateVarAttributes(var_attr_str):\r
index b98c021b57770a45cb9cd78f224ad54542c92883..0485bf482ec0509f1af450e1b394137b80241282 100644 (file)
@@ -1,9 +1,9 @@
 ## @file\r
-# \r
+#\r
 # This package manage the VPD PCD information file which will be generated\r
 # by build tool's autogen.\r
 # The VPD PCD information file will be input for third-party BPDG tool which\r
-# is pointed by *_*_*_VPD_TOOL_GUID in conf/tools_def.txt \r
+# is pointed by *_*_*_VPD_TOOL_GUID in conf/tools_def.txt\r
 #\r
 #\r
 # Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
@@ -33,8 +33,8 @@ FILE_COMMENT_TEMPLATE = \
 #  THIS IS AUTO-GENERATED FILE BY BUILD TOOLS AND PLEASE DO NOT MAKE MODIFICATION.\r
 #\r
 #  This file lists all VPD informations for a platform collected by build.exe.\r
-# \r
-# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+#\r
+# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -70,17 +70,17 @@ FILE_COMMENT_TEMPLATE = \
 #\r
 class VpdInfoFile:\r
 \r
-    _rVpdPcdLine = None \r
+    _rVpdPcdLine = None\r
     ## Constructor\r
     def __init__(self):\r
         ## Dictionary for VPD in following format\r
         #\r
-        #  Key    : PcdClassObject instance. \r
+        #  Key    : PcdClassObject instance.\r
         #           @see BuildClassObject.PcdClassObject\r
         #  Value  : offset in different SKU such as [sku1_offset, sku2_offset]\r
         self._VpdArray = {}\r
         self._VpdInfo = {}\r
-    \r
+\r
     ## Add a VPD PCD collected from platform's autogen when building.\r
     #\r
     #  @param vpds  The list of VPD PCD collected for a platform.\r
@@ -91,40 +91,40 @@ class VpdInfoFile:
     def Add(self, Vpd, skuname, Offset):\r
         if (Vpd is None):\r
             EdkLogger.error("VpdInfoFile", BuildToolError.ATTRIBUTE_UNKNOWN_ERROR, "Invalid VPD PCD entry.")\r
-        \r
+\r
         if not (Offset >= 0 or Offset == "*"):\r
             EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID, "Invalid offset parameter: %s." % Offset)\r
-        \r
+\r
         if Vpd.DatumType == TAB_VOID:\r
             if Vpd.MaxDatumSize <= 0:\r
-                EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID, \r
+                EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID,\r
                                 "Invalid max datum size for VPD PCD %s.%s" % (Vpd.TokenSpaceGuidCName, Vpd.TokenCName))\r
-        elif Vpd.DatumType in TAB_PCD_NUMERIC_TYPES: \r
+        elif Vpd.DatumType in TAB_PCD_NUMERIC_TYPES:\r
             if not Vpd.MaxDatumSize:\r
                 Vpd.MaxDatumSize = MAX_SIZE_TYPE[Vpd.DatumType]\r
         else:\r
             if Vpd.MaxDatumSize <= 0:\r
                 EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID,\r
                                 "Invalid max datum size for VPD PCD %s.%s" % (Vpd.TokenSpaceGuidCName, Vpd.TokenCName))\r
-            \r
+\r
         if Vpd not in self._VpdArray:\r
             #\r
-            # If there is no Vpd instance in dict, that imply this offset for a given SKU is a new one \r
+            # If there is no Vpd instance in dict, that imply this offset for a given SKU is a new one\r
             #\r
             self._VpdArray[Vpd] = {}\r
 \r
         self._VpdArray[Vpd].update({skuname:Offset})\r
-            \r
-        \r
+\r
+\r
     ## Generate VPD PCD information into a text file\r
-    #  \r
+    #\r
     #  If parameter FilePath is invalid, then assert.\r
-    #  If \r
+    #  If\r
     #  @param FilePath        The given file path which would hold VPD information\r
     def Write(self, FilePath):\r
         if not (FilePath is not None or len(FilePath) != 0):\r
-            EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID,  \r
-                            "Invalid parameter FilePath: %s." % FilePath)        \r
+            EdkLogger.error("VpdInfoFile", BuildToolError.PARAMETER_INVALID,\r
+                            "Invalid parameter FilePath: %s." % FilePath)\r
 \r
         Content = FILE_COMMENT_TEMPLATE\r
         Pcds = sorted(self._VpdArray.keys())\r
@@ -155,15 +155,15 @@ class VpdInfoFile:
         try:\r
             fd = open(FilePath, "r")\r
         except:\r
-            EdkLogger.error("VpdInfoFile", \r
-                            BuildToolError.FILE_OPEN_FAILURE, \r
+            EdkLogger.error("VpdInfoFile",\r
+                            BuildToolError.FILE_OPEN_FAILURE,\r
                             "Fail to open file %s for written." % FilePath)\r
         Lines = fd.readlines()\r
         for Line in Lines:\r
             Line = Line.strip()\r
             if len(Line) == 0 or Line.startswith("#"):\r
                 continue\r
-            \r
+\r
             #\r
             # the line must follow output format defined in BPDG spec.\r
             #\r
@@ -173,9 +173,9 @@ class VpdInfoFile:
                 TokenSpaceName, PcdTokenName = PcdName.split(".")\r
             except:\r
                 EdkLogger.error("BPDG", BuildToolError.PARSER_ERROR, "Fail to parse VPD information file %s" % FilePath)\r
-            \r
+\r
             Found = False\r
-            \r
+\r
             if (TokenSpaceName, PcdTokenName) not in self._VpdInfo:\r
                 self._VpdInfo[(TokenSpaceName, PcdTokenName)] = []\r
             self._VpdInfo[(TokenSpaceName, PcdTokenName)].append((SkuId, Offset, Value))\r
@@ -188,62 +188,62 @@ class VpdInfoFile:
                     if VpdObject.TokenSpaceGuidCName == TokenSpaceName and VpdObjectTokenCName == PcdTokenName.strip() and sku == SkuId:\r
                         if self._VpdArray[VpdObject][sku] == "*":\r
                             if Offset == "*":\r
-                                EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID, "The offset of %s has not been fixed up by third-party BPDG tool." % PcdName)                              \r
+                                EdkLogger.error("BPDG", BuildToolError.FORMAT_INVALID, "The offset of %s has not been fixed up by third-party BPDG tool." % PcdName)\r
                             self._VpdArray[VpdObject][sku] = Offset\r
                         Found = True\r
             if not Found:\r
                 EdkLogger.error("BPDG", BuildToolError.PARSER_ERROR, "Can not find PCD defined in VPD guid file.")\r
-                \r
+\r
     ## Get count of VPD PCD collected from platform's autogen when building.\r
     #\r
-    #  @return The integer count value \r
+    #  @return The integer count value\r
     def GetCount(self):\r
         Count = 0\r
         for OffsetList in self._VpdArray.values():\r
             Count += len(OffsetList)\r
-            \r
+\r
         return Count\r
-    \r
+\r
     ## Get an offset value for a given VPD PCD\r
     #\r
-    #  Because BPDG only support one Sku, so only return offset for SKU default.   \r
+    #  Because BPDG only support one Sku, so only return offset for SKU default.\r
     #\r
-    #  @param vpd    A given VPD PCD \r
+    #  @param vpd    A given VPD PCD\r
     def GetOffset(self, vpd):\r
         if vpd not in self._VpdArray:\r
             return None\r
-        \r
+\r
         if len(self._VpdArray[vpd]) == 0:\r
             return None\r
-        \r
+\r
         return self._VpdArray[vpd]\r
     def GetVpdInfo(self, arg):\r
         (PcdTokenName, TokenSpaceName) = arg\r
         return self._VpdInfo.get((TokenSpaceName, PcdTokenName))\r
-    \r
+\r
 ## Call external BPDG tool to process VPD file\r
-#    \r
+#\r
 #  @param ToolPath      The string path name for BPDG tool\r
 #  @param VpdFileName   The string path name for VPD information guid.txt\r
-# \r
+#\r
 def CallExtenalBPDGTool(ToolPath, VpdFileName):\r
     assert ToolPath is not None, "Invalid parameter ToolPath"\r
     assert VpdFileName is not None and os.path.exists(VpdFileName), "Invalid parameter VpdFileName"\r
-    \r
+\r
     OutputDir = os.path.dirname(VpdFileName)\r
     FileName = os.path.basename(VpdFileName)\r
     BaseName, ext = os.path.splitext(FileName)\r
     OutputMapFileName = os.path.join(OutputDir, "%s.map" % BaseName)\r
     OutputBinFileName = os.path.join(OutputDir, "%s.bin" % BaseName)\r
-          \r
+\r
     try:\r
         PopenObject = subprocess.Popen(' '.join([ToolPath,\r
-                                        '-o', OutputBinFileName, \r
+                                        '-o', OutputBinFileName,\r
                                         '-m', OutputMapFileName,\r
                                         '-q',\r
                                         '-f',\r
                                         VpdFileName]),\r
-                                        stdout=subprocess.PIPE, \r
+                                        stdout=subprocess.PIPE,\r
                                         stderr= subprocess.PIPE,\r
                                         shell=True)\r
     except Exception as X:\r
@@ -252,11 +252,11 @@ def CallExtenalBPDGTool(ToolPath, VpdFileName):
     print(out)\r
     while PopenObject.returncode is None :\r
         PopenObject.wait()\r
-    \r
+\r
     if PopenObject.returncode != 0:\r
         if PopenObject.returncode != 0:\r
             EdkLogger.debug(EdkLogger.DEBUG_1, "Fail to call BPDG tool", str(error))\r
             EdkLogger.error("BPDG", BuildToolError.COMMAND_FAILURE, "Fail to execute BPDG tool with exit code: %d, the error message is: \n %s" % \\r
                             (PopenObject.returncode, str(error)))\r
-        \r
+\r
     return PopenObject.returncode\r
index e29f5211d5c769eb0673725ed2536fc615dcaf1e..a98cf8a7c506e90a68d60ba8a4045ae8b5ad9d82 100644 (file)
@@ -14,7 +14,7 @@
 ## SkuInfoClass\r
 #\r
 # This class defined SkuInfo item used in Module/Platform/Package files\r
-# \r
+#\r
 # @param object:           Inherited from object class\r
 # @param SkuIdName:        Input value for SkuIdName, default is ''\r
 # @param SkuId:            Input value for SkuId, default is ''\r
 # @var DefaultValue:       To store value for DefaultValue\r
 #\r
 class SkuInfoClass(object):\r
-    def __init__(self, SkuIdName = '', SkuId = '', VariableName = '', VariableGuid = '', VariableOffset = '', \r
+    def __init__(self, SkuIdName = '', SkuId = '', VariableName = '', VariableGuid = '', VariableOffset = '',\r
                  HiiDefaultValue = '', VpdOffset = '', DefaultValue = '', VariableGuidValue = '', VariableAttribute = '', DefaultStore = None):\r
         self.SkuIdName = SkuIdName\r
         self.SkuId = SkuId\r
-        \r
+\r
         #\r
         # Used by Hii\r
         #\r
@@ -52,17 +52,17 @@ class SkuInfoClass(object):
         self.HiiDefaultValue = HiiDefaultValue\r
         self.VariableAttribute = VariableAttribute\r
         self.DefaultStoreDict = DefaultStore\r
-        \r
+\r
         #\r
         # Used by Vpd\r
         #\r
         self.VpdOffset = VpdOffset\r
-        \r
+\r
         #\r
         # Used by Default\r
         #\r
         self.DefaultValue = DefaultValue\r
-        \r
+\r
     ## Convert the class to a string\r
     #\r
     #  Convert each member of the class to string\r
index 96a630f4d2cc94525371760fdff8b9e638a634c3..64b58c2078a33223d52b8684436c2920eab13e17 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # classes represent data in FDF\r
 #\r
-#  Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -83,7 +83,7 @@ class RegionClassObject:
 \r
 ## FFS data in FDF\r
 #\r
-#        \r
+#\r
 class FfsClassObject:\r
     ## The constructor\r
     #\r
@@ -98,7 +98,7 @@ class FfsClassObject:
 \r
 ## FILE statement data in FDF\r
 #\r
-#        \r
+#\r
 class FileStatementClassObject (FfsClassObject) :\r
     ## The constructor\r
     #\r
@@ -149,7 +149,7 @@ class AprioriSectionClassObject:
 \r
 ## section data in FDF\r
 #\r
-#        \r
+#\r
 class SectionClassObject:\r
     ## The constructor\r
     #\r
@@ -157,10 +157,10 @@ class SectionClassObject:
     #\r
     def __init__(self):\r
         self.Alignment = None\r
-        \r
+\r
 ## Depex expression section in FDF\r
 #\r
-#        \r
+#\r
 class DepexSectionClassObject (SectionClassObject):\r
     ## The constructor\r
     #\r
@@ -186,7 +186,7 @@ class CompressSectionClassObject (SectionClassObject) :
 \r
 ## Data section data in FDF\r
 #\r
-#        \r
+#\r
 class DataSectionClassObject (SectionClassObject):\r
     ## The constructor\r
     #\r
@@ -220,7 +220,7 @@ class EfiSectionClassObject (SectionClassObject):
 \r
 ## FV image section data in FDF\r
 #\r
-#        \r
+#\r
 class FvImageSectionClassObject (SectionClassObject):\r
     ## The constructor\r
     #\r
@@ -237,7 +237,7 @@ class FvImageSectionClassObject (SectionClassObject):
 \r
 ## GUIDed section data in FDF\r
 #\r
-#        \r
+#\r
 class GuidSectionClassObject (SectionClassObject) :\r
     ## The constructor\r
     #\r
@@ -270,7 +270,7 @@ class UiSectionClassObject (SectionClassObject):
 \r
 ## Version section data in FDF\r
 #\r
-#        \r
+#\r
 class VerSectionClassObject (SectionClassObject):\r
     ## The constructor\r
     #\r
@@ -305,7 +305,7 @@ class RuleClassObject :
 \r
 ## Complex rule data in FDF\r
 #\r
-#        \r
+#\r
 class RuleComplexFileClassObject(RuleClassObject) :\r
     ## The constructor\r
     #\r
@@ -343,7 +343,7 @@ class RuleFileExtensionClassObject(RuleClassObject):
 \r
 ## Capsule data in FDF\r
 #\r
-#        \r
+#\r
 class CapsuleClassObject :\r
     ## The constructor\r
     #\r
@@ -380,7 +380,7 @@ class VtfClassObject :
 \r
 ## VTF component data in FDF\r
 #\r
-#        \r
+#\r
 class ComponentStatementClassObject :\r
     ## The constructor\r
     #\r
@@ -396,7 +396,7 @@ class ComponentStatementClassObject :
         self.CompSym = None\r
         self.CompSize = None\r
         self.FilePos = None\r
\r
+\r
 ## OptionROM data in FDF\r
 #\r
 #\r
@@ -408,4 +408,4 @@ class OptionRomClassObject:
     def __init__(self):\r
         self.DriverName = None\r
         self.FfsList = []\r
-       \r
+\r
index a496f4344030626a0fe9c5a3da52bb2d4fc8ebe3..b9e57c1b5554949b2a430c365e9cdd3890050f0e 100644 (file)
@@ -2,7 +2,7 @@
 \r
 from antlr3 import *\r
 from antlr3.compat import set, frozenset\r
-                        \r
+\r
 ## @file\r
 # The file defines the Lexer for C source files.\r
 #\r
@@ -10,7 +10,7 @@ from antlr3.compat import set, frozenset
 # This file is generated by running:\r
 # java org.antlr.Tool C.g\r
 #\r
-# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available\r
 # under the terms and conditions of the BSD License which accompanies this\r
@@ -4341,7 +4341,7 @@ class CLexer(Lexer):
         u"\12\uffff"\r
         )\r
 \r
-            \r
+\r
     DFA25_transition = [\r
         DFA.unpack(u"\1\2\1\uffff\12\1"),\r
         DFA.unpack(u"\1\3\1\uffff\12\1\12\uffff\1\5\1\4\1\5\35\uffff\1\5"\r
@@ -4479,7 +4479,7 @@ class CLexer(Lexer):
         u"\u0192\uffff"\r
         )\r
 \r
-            \r
+\r
     DFA35_transition = [\r
         DFA.unpack(u"\6\73\2\70\1\73\2\70\22\73\1\70\1\50\1\65\1\72\1\63"\r
         u"\1\45\1\46\1\64\1\34\1\35\1\40\1\42\1\3\1\43\1\41\1\44\1\66\11"\r
@@ -4943,5 +4943,5 @@ class CLexer(Lexer):
     # class definition for DFA #35\r
 \r
     DFA35 = DFA\r
\r
+\r
 \r
index d7eff138da5761f1b97ef7fb895922b391216561..b66ac2d8d5450f857cd069f34cebec9d7161274c 100644 (file)
@@ -3,7 +3,7 @@
 from __future__ import print_function\r
 from antlr3 import *\r
 from antlr3.compat import set, frozenset\r
-         \r
+\r
 ## @file\r
 # The file defines the parser for C source files.\r
 #\r
@@ -11,7 +11,7 @@ from antlr3.compat import set, frozenset
 # This file is generated by running:\r
 # java org.antlr.Tool C.g\r
 #\r
-# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available\r
 # under the terms and conditions of the BSD License which accompanies this\r
@@ -57,23 +57,23 @@ OctalEscape=17
 \r
 # token names\r
 tokenNames = [\r
-    "<invalid>", "<EOR>", "<DOWN>", "<UP>", \r
-    "IDENTIFIER", "HEX_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", "CHARACTER_LITERAL", \r
-    "STRING_LITERAL", "FLOATING_POINT_LITERAL", "LETTER", "EscapeSequence", \r
-    "HexDigit", "IntegerTypeSuffix", "Exponent", "FloatTypeSuffix", "OctalEscape", \r
-    "UnicodeEscape", "WS", "BS", "UnicodeVocabulary", "COMMENT", "LINE_COMMENT", \r
-    "LINE_COMMAND", "';'", "'typedef'", "','", "'='", "'extern'", "'static'", \r
-    "'auto'", "'register'", "'STATIC'", "'void'", "'char'", "'short'", "'int'", \r
-    "'long'", "'float'", "'double'", "'signed'", "'unsigned'", "'{'", "'}'", \r
-    "'struct'", "'union'", "':'", "'enum'", "'const'", "'volatile'", "'IN'", \r
-    "'OUT'", "'OPTIONAL'", "'CONST'", "'UNALIGNED'", "'VOLATILE'", "'GLOBAL_REMOVE_IF_UNREFERENCED'", \r
-    "'EFIAPI'", "'EFI_BOOTSERVICE'", "'EFI_RUNTIMESERVICE'", "'PACKED'", \r
-    "'('", "')'", "'['", "']'", "'*'", "'...'", "'+'", "'-'", "'/'", "'%'", \r
-    "'++'", "'--'", "'sizeof'", "'.'", "'->'", "'&'", "'~'", "'!'", "'*='", \r
-    "'/='", "'%='", "'+='", "'-='", "'<<='", "'>>='", "'&='", "'^='", "'|='", \r
-    "'?'", "'||'", "'&&'", "'|'", "'^'", "'=='", "'!='", "'<'", "'>'", "'<='", \r
-    "'>='", "'<<'", "'>>'", "'__asm__'", "'_asm'", "'__asm'", "'case'", \r
-    "'default'", "'if'", "'else'", "'switch'", "'while'", "'do'", "'for'", \r
+    "<invalid>", "<EOR>", "<DOWN>", "<UP>",\r
+    "IDENTIFIER", "HEX_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", "CHARACTER_LITERAL",\r
+    "STRING_LITERAL", "FLOATING_POINT_LITERAL", "LETTER", "EscapeSequence",\r
+    "HexDigit", "IntegerTypeSuffix", "Exponent", "FloatTypeSuffix", "OctalEscape",\r
+    "UnicodeEscape", "WS", "BS", "UnicodeVocabulary", "COMMENT", "LINE_COMMENT",\r
+    "LINE_COMMAND", "';'", "'typedef'", "','", "'='", "'extern'", "'static'",\r
+    "'auto'", "'register'", "'STATIC'", "'void'", "'char'", "'short'", "'int'",\r
+    "'long'", "'float'", "'double'", "'signed'", "'unsigned'", "'{'", "'}'",\r
+    "'struct'", "'union'", "':'", "'enum'", "'const'", "'volatile'", "'IN'",\r
+    "'OUT'", "'OPTIONAL'", "'CONST'", "'UNALIGNED'", "'VOLATILE'", "'GLOBAL_REMOVE_IF_UNREFERENCED'",\r
+    "'EFIAPI'", "'EFI_BOOTSERVICE'", "'EFI_RUNTIMESERVICE'", "'PACKED'",\r
+    "'('", "')'", "'['", "']'", "'*'", "'...'", "'+'", "'-'", "'/'", "'%'",\r
+    "'++'", "'--'", "'sizeof'", "'.'", "'->'", "'&'", "'~'", "'!'", "'*='",\r
+    "'/='", "'%='", "'+='", "'-='", "'<<='", "'>>='", "'&='", "'^='", "'|='",\r
+    "'?'", "'||'", "'&&'", "'|'", "'^'", "'=='", "'!='", "'<'", "'>'", "'<='",\r
+    "'>='", "'<<'", "'>>'", "'__asm__'", "'_asm'", "'__asm'", "'case'",\r
+    "'default'", "'if'", "'else'", "'switch'", "'while'", "'do'", "'for'",\r
     "'goto'", "'continue'", "'break'", "'return'"\r
 ]\r
 \r
@@ -106,33 +106,33 @@ class CParser(Parser):
         print(str(line)+ ',' + str(offset) + ':' + str(tokenText))\r
 \r
     def StorePredicateExpression(self, StartLine, StartOffset, EndLine, EndOffset, Text):\r
-       PredExp = CodeFragment.PredicateExpression(Text, (StartLine, StartOffset), (EndLine, EndOffset))\r
-       FileProfile.PredicateExpressionList.append(PredExp)\r
-       \r
+      PredExp = CodeFragment.PredicateExpression(Text, (StartLine, StartOffset), (EndLine, EndOffset))\r
+      FileProfile.PredicateExpressionList.append(PredExp)\r
+\r
     def StoreEnumerationDefinition(self, StartLine, StartOffset, EndLine, EndOffset, Text):\r
-       EnumDef = CodeFragment.EnumerationDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset))\r
-       FileProfile.EnumerationDefinitionList.append(EnumDef)\r
-       \r
+      EnumDef = CodeFragment.EnumerationDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset))\r
+      FileProfile.EnumerationDefinitionList.append(EnumDef)\r
+\r
     def StoreStructUnionDefinition(self, StartLine, StartOffset, EndLine, EndOffset, Text):\r
-       SUDef = CodeFragment.StructUnionDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset))\r
-       FileProfile.StructUnionDefinitionList.append(SUDef)\r
-       \r
+      SUDef = CodeFragment.StructUnionDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset))\r
+      FileProfile.StructUnionDefinitionList.append(SUDef)\r
+\r
     def StoreTypedefDefinition(self, StartLine, StartOffset, EndLine, EndOffset, FromText, ToText):\r
-       Tdef = CodeFragment.TypedefDefinition(FromText, ToText, (StartLine, StartOffset), (EndLine, EndOffset))\r
-       FileProfile.TypedefDefinitionList.append(Tdef)\r
-    \r
+      Tdef = CodeFragment.TypedefDefinition(FromText, ToText, (StartLine, StartOffset), (EndLine, EndOffset))\r
+      FileProfile.TypedefDefinitionList.append(Tdef)\r
+\r
     def StoreFunctionDefinition(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText, LeftBraceLine, LeftBraceOffset, DeclLine, DeclOffset):\r
-       FuncDef = CodeFragment.FunctionDefinition(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset), (LeftBraceLine, LeftBraceOffset), (DeclLine, DeclOffset))\r
-       FileProfile.FunctionDefinitionList.append(FuncDef)\r
-       \r
+      FuncDef = CodeFragment.FunctionDefinition(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset), (LeftBraceLine, LeftBraceOffset), (DeclLine, DeclOffset))\r
+      FileProfile.FunctionDefinitionList.append(FuncDef)\r
+\r
     def StoreVariableDeclaration(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText):\r
-       VarDecl = CodeFragment.VariableDeclaration(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset))\r
-       FileProfile.VariableDeclarationList.append(VarDecl)\r
-    \r
+      VarDecl = CodeFragment.VariableDeclaration(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset))\r
+      FileProfile.VariableDeclarationList.append(VarDecl)\r
+\r
     def StoreFunctionCalling(self, StartLine, StartOffset, EndLine, EndOffset, FuncName, ParamList):\r
-       FuncCall = CodeFragment.FunctionCalling(FuncName, ParamList, (StartLine, StartOffset), (EndLine, EndOffset))\r
-       FileProfile.FunctionCallingList.append(FuncCall)\r
-    \r
+      FuncCall = CodeFragment.FunctionCalling(FuncName, ParamList, (StartLine, StartOffset), (EndLine, EndOffset))\r
+      FileProfile.FunctionCallingList.append(FuncCall)\r
+\r
 \r
 \r
 \r
@@ -144,7 +144,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 1):\r
-                    return \r
+                    return\r
 \r
                 # C.g:103:2: ( ( external_declaration )* )\r
                 # C.g:103:4: ( external_declaration )*\r
@@ -163,7 +163,7 @@ class CParser(Parser):
                         self.external_declaration()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -183,7 +183,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end translation_unit\r
 \r
@@ -196,7 +196,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 2):\r
-                    return \r
+                    return\r
 \r
                 # C.g:119:2: ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? )\r
                 alt3 = 3\r
@@ -212,7 +212,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 1, self.input)\r
 \r
@@ -228,7 +228,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 2, self.input)\r
 \r
@@ -244,7 +244,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 3, self.input)\r
 \r
@@ -260,7 +260,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 4, self.input)\r
 \r
@@ -276,7 +276,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 5, self.input)\r
 \r
@@ -292,7 +292,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 6, self.input)\r
 \r
@@ -308,7 +308,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 7, self.input)\r
 \r
@@ -324,7 +324,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 8, self.input)\r
 \r
@@ -340,7 +340,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 9, self.input)\r
 \r
@@ -356,7 +356,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 10, self.input)\r
 \r
@@ -372,7 +372,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 11, self.input)\r
 \r
@@ -388,7 +388,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 12, self.input)\r
 \r
@@ -406,7 +406,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 13, self.input)\r
 \r
@@ -422,7 +422,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 14, self.input)\r
 \r
@@ -440,7 +440,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 16, self.input)\r
 \r
@@ -456,7 +456,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 17, self.input)\r
 \r
@@ -472,7 +472,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 18, self.input)\r
 \r
@@ -485,7 +485,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 0, self.input)\r
 \r
@@ -497,7 +497,7 @@ class CParser(Parser):
                     self.function_definition()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt3 == 2:\r
@@ -506,7 +506,7 @@ class CParser(Parser):
                     self.declaration()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt3 == 3:\r
@@ -515,7 +515,7 @@ class CParser(Parser):
                     self.macro_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:121:20: ( ';' )?\r
                     alt2 = 2\r
                     LA2_0 = self.input.LA(1)\r
@@ -526,7 +526,7 @@ class CParser(Parser):
                         # C.g:121:21: ';'\r
                         self.match(self.input, 25, self.FOLLOW_25_in_external_declaration126)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -542,7 +542,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end external_declaration\r
 \r
@@ -569,7 +569,7 @@ class CParser(Parser):
         declarator1 = None\r
 \r
 \r
-               \r
+\r
         self.function_definition_stack[-1].ModifierText =  ''\r
         self.function_definition_stack[-1].DeclText =  ''\r
         self.function_definition_stack[-1].LBLine =  0\r
@@ -783,7 +783,7 @@ class CParser(Parser):
 \r
 \r
                 if self.backtracking == 0:\r
-                          \r
+\r
                     if d is not None:\r
                       self.function_definition_stack[-1].ModifierText = self.input.toString(d.start, d.stop)\r
                     else:\r
@@ -797,7 +797,7 @@ class CParser(Parser):
                     else:\r
                       self.function_definition_stack[-1].LBLine = b.start.line\r
                       self.function_definition_stack[-1].LBOffset = b.start.charPositionInLine\r
-                                 \r
+\r
 \r
 \r
 \r
@@ -805,7 +805,7 @@ class CParser(Parser):
                 retval.stop = self.input.LT(-1)\r
 \r
                 if self.backtracking == 0:\r
-                           \r
+\r
                     self.StoreFunctionDefinition(retval.start.line, retval.start.charPositionInLine, retval.stop.line, retval.stop.charPositionInLine, self.function_definition_stack[-1].ModifierText, self.function_definition_stack[-1].DeclText, self.function_definition_stack[-1].LBLine, self.function_definition_stack[-1].LBOffset, self.function_definition_stack[-1].DeclLine, self.function_definition_stack[-1].DeclOffset)\r
 \r
 \r
@@ -845,7 +845,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 4):\r
-                    return \r
+                    return\r
 \r
                 # C.g:167:2: (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' )\r
                 alt9 = 2\r
@@ -858,7 +858,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("166:1: declaration : (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' );", 9, 0, self.input)\r
 \r
@@ -869,7 +869,7 @@ class CParser(Parser):
                     a = self.input.LT(1)\r
                     self.match(self.input, 26, self.FOLLOW_26_in_declaration203)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:167:17: (b= declaration_specifiers )?\r
                     alt7 = 2\r
                     LA7 = self.input.LA(1)\r
@@ -906,7 +906,7 @@ class CParser(Parser):
                         b = self.declaration_specifiers()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -914,18 +914,18 @@ class CParser(Parser):
                     c = self.init_declarator_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     d = self.input.LT(1)\r
                     self.match(self.input, 25, self.FOLLOW_25_in_declaration220)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
-                            \r
+\r
                         if b is not None:\r
                           self.StoreTypedefDefinition(a.line, a.charPositionInLine, d.line, d.charPositionInLine, self.input.toString(b.start, b.stop), self.input.toString(c.start, c.stop))\r
                         else:\r
                           self.StoreTypedefDefinition(a.line, a.charPositionInLine, d.line, d.charPositionInLine, '', self.input.toString(c.start, c.stop))\r
-                                 \r
+\r
 \r
 \r
 \r
@@ -935,7 +935,7 @@ class CParser(Parser):
                     s = self.declaration_specifiers()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:175:30: (t= init_declarator_list )?\r
                     alt8 = 2\r
                     LA8_0 = self.input.LA(1)\r
@@ -948,19 +948,19 @@ class CParser(Parser):
                         t = self.init_declarator_list()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
                     e = self.input.LT(1)\r
                     self.match(self.input, 25, self.FOLLOW_25_in_declaration243)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
-                          \r
+\r
                         if t is not None:\r
                           self.StoreVariableDeclaration(s.start.line, s.start.charPositionInLine, t.start.line, t.start.charPositionInLine, self.input.toString(s.start, s.stop), self.input.toString(t.start, t.stop))\r
-                               \r
+\r
 \r
 \r
 \r
@@ -974,7 +974,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end declaration\r
 \r
@@ -1185,7 +1185,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 7):\r
-                    return \r
+                    return\r
 \r
                 # C.g:194:2: ( declarator ( '=' initializer )? )\r
                 # C.g:194:4: declarator ( '=' initializer )?\r
@@ -1193,7 +1193,7 @@ class CParser(Parser):
                 self.declarator()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:194:15: ( '=' initializer )?\r
                 alt12 = 2\r
                 LA12_0 = self.input.LA(1)\r
@@ -1204,12 +1204,12 @@ class CParser(Parser):
                     # C.g:194:16: '=' initializer\r
                     self.match(self.input, 28, self.FOLLOW_28_in_init_declarator329)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_initializer_in_init_declarator331)\r
                     self.initializer()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -1226,7 +1226,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end init_declarator\r
 \r
@@ -1239,7 +1239,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 8):\r
-                    return \r
+                    return\r
 \r
                 # C.g:198:2: ( 'extern' | 'static' | 'auto' | 'register' | 'STATIC' )\r
                 # C.g:\r
@@ -1251,7 +1251,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     mse = MismatchedSetException(None, self.input)\r
                     self.recoverFromMismatchedSet(\r
@@ -1273,7 +1273,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end storage_class_specifier\r
 \r
@@ -1291,7 +1291,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 9):\r
-                    return \r
+                    return\r
 \r
                 # C.g:206:2: ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id )\r
                 alt13 = 12\r
@@ -1324,7 +1324,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("205:1: type_specifier : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id );", 13, 0, self.input)\r
 \r
@@ -1334,63 +1334,63 @@ class CParser(Parser):
                     # C.g:206:4: 'void'\r
                     self.match(self.input, 34, self.FOLLOW_34_in_type_specifier376)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 2:\r
                     # C.g:207:4: 'char'\r
                     self.match(self.input, 35, self.FOLLOW_35_in_type_specifier381)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 3:\r
                     # C.g:208:4: 'short'\r
                     self.match(self.input, 36, self.FOLLOW_36_in_type_specifier386)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 4:\r
                     # C.g:209:4: 'int'\r
                     self.match(self.input, 37, self.FOLLOW_37_in_type_specifier391)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 5:\r
                     # C.g:210:4: 'long'\r
                     self.match(self.input, 38, self.FOLLOW_38_in_type_specifier396)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 6:\r
                     # C.g:211:4: 'float'\r
                     self.match(self.input, 39, self.FOLLOW_39_in_type_specifier401)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 7:\r
                     # C.g:212:4: 'double'\r
                     self.match(self.input, 40, self.FOLLOW_40_in_type_specifier406)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 8:\r
                     # C.g:213:4: 'signed'\r
                     self.match(self.input, 41, self.FOLLOW_41_in_type_specifier411)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 9:\r
                     # C.g:214:4: 'unsigned'\r
                     self.match(self.input, 42, self.FOLLOW_42_in_type_specifier416)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 10:\r
@@ -1399,12 +1399,12 @@ class CParser(Parser):
                     s = self.struct_or_union_specifier()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
-                          \r
+\r
                         if s.stop is not None:\r
                           self.StoreStructUnionDefinition(s.start.line, s.start.charPositionInLine, s.stop.line, s.stop.charPositionInLine, self.input.toString(s.start, s.stop))\r
-                               \r
+\r
 \r
 \r
 \r
@@ -1414,12 +1414,12 @@ class CParser(Parser):
                     e = self.enum_specifier()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
-                          \r
+\r
                         if e.stop is not None:\r
                           self.StoreEnumerationDefinition(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start, e.stop))\r
-                               \r
+\r
 \r
 \r
 \r
@@ -1429,7 +1429,7 @@ class CParser(Parser):
                     self.type_id()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -1442,7 +1442,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end type_specifier\r
 \r
@@ -1455,13 +1455,13 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 10):\r
-                    return \r
+                    return\r
 \r
                 # C.g:229:5: ( IDENTIFIER )\r
                 # C.g:229:9: IDENTIFIER\r
                 self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_type_id467)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -1475,7 +1475,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end type_id\r
 \r
@@ -1612,7 +1612,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 12):\r
-                    return \r
+                    return\r
 \r
                 # C.g:240:2: ( 'struct' | 'union' )\r
                 # C.g:\r
@@ -1624,7 +1624,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     mse = MismatchedSetException(None, self.input)\r
                     self.recoverFromMismatchedSet(\r
@@ -1646,7 +1646,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end struct_or_union\r
 \r
@@ -1659,7 +1659,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 13):\r
-                    return \r
+                    return\r
 \r
                 # C.g:245:2: ( ( struct_declaration )+ )\r
                 # C.g:245:4: ( struct_declaration )+\r
@@ -1679,7 +1679,7 @@ class CParser(Parser):
                         self.struct_declaration()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -1688,7 +1688,7 @@ class CParser(Parser):
 \r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         eee = EarlyExitException(16, self.input)\r
                         raise eee\r
@@ -1709,7 +1709,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end struct_declaration_list\r
 \r
@@ -1722,7 +1722,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 14):\r
-                    return \r
+                    return\r
 \r
                 # C.g:249:2: ( specifier_qualifier_list struct_declarator_list ';' )\r
                 # C.g:249:4: specifier_qualifier_list struct_declarator_list ';'\r
@@ -1730,15 +1730,15 @@ class CParser(Parser):
                 self.specifier_qualifier_list()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.following.append(self.FOLLOW_struct_declarator_list_in_struct_declaration551)\r
                 self.struct_declarator_list()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.match(self.input, 25, self.FOLLOW_25_in_struct_declaration553)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -1752,7 +1752,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end struct_declaration\r
 \r
@@ -1765,7 +1765,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 15):\r
-                    return \r
+                    return\r
 \r
                 # C.g:253:2: ( ( type_qualifier | type_specifier )+ )\r
                 # C.g:253:4: ( type_qualifier | type_specifier )+\r
@@ -1832,7 +1832,7 @@ class CParser(Parser):
                         self.type_qualifier()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt17 == 2:\r
@@ -1841,7 +1841,7 @@ class CParser(Parser):
                         self.type_specifier()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -1850,7 +1850,7 @@ class CParser(Parser):
 \r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         eee = EarlyExitException(17, self.input)\r
                         raise eee\r
@@ -1871,7 +1871,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end specifier_qualifier_list\r
 \r
@@ -1884,7 +1884,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 16):\r
-                    return \r
+                    return\r
 \r
                 # C.g:257:2: ( struct_declarator ( ',' struct_declarator )* )\r
                 # C.g:257:4: struct_declarator ( ',' struct_declarator )*\r
@@ -1892,7 +1892,7 @@ class CParser(Parser):
                 self.struct_declarator()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:257:22: ( ',' struct_declarator )*\r
                 while True: #loop18\r
                     alt18 = 2\r
@@ -1906,12 +1906,12 @@ class CParser(Parser):
                         # C.g:257:23: ',' struct_declarator\r
                         self.match(self.input, 27, self.FOLLOW_27_in_struct_declarator_list587)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list589)\r
                         self.struct_declarator()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -1931,7 +1931,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end struct_declarator_list\r
 \r
@@ -1944,7 +1944,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 17):\r
-                    return \r
+                    return\r
 \r
                 # C.g:261:2: ( declarator ( ':' constant_expression )? | ':' constant_expression )\r
                 alt20 = 2\r
@@ -1957,7 +1957,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("260:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression );", 20, 0, self.input)\r
 \r
@@ -1969,7 +1969,7 @@ class CParser(Parser):
                     self.declarator()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:261:15: ( ':' constant_expression )?\r
                     alt19 = 2\r
                     LA19_0 = self.input.LA(1)\r
@@ -1980,12 +1980,12 @@ class CParser(Parser):
                         # C.g:261:16: ':' constant_expression\r
                         self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator605)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_constant_expression_in_struct_declarator607)\r
                         self.constant_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -1995,12 +1995,12 @@ class CParser(Parser):
                     # C.g:262:4: ':' constant_expression\r
                     self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator614)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_constant_expression_in_struct_declarator616)\r
                     self.constant_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -2013,7 +2013,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end struct_declarator\r
 \r
@@ -2181,7 +2181,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 19):\r
-                    return \r
+                    return\r
 \r
                 # C.g:273:2: ( enumerator ( ',' enumerator )* )\r
                 # C.g:273:4: enumerator ( ',' enumerator )*\r
@@ -2189,7 +2189,7 @@ class CParser(Parser):
                 self.enumerator()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:273:15: ( ',' enumerator )*\r
                 while True: #loop24\r
                     alt24 = 2\r
@@ -2208,12 +2208,12 @@ class CParser(Parser):
                         # C.g:273:16: ',' enumerator\r
                         self.match(self.input, 27, self.FOLLOW_27_in_enumerator_list680)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_enumerator_in_enumerator_list682)\r
                         self.enumerator()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -2233,7 +2233,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end enumerator_list\r
 \r
@@ -2246,13 +2246,13 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 20):\r
-                    return \r
+                    return\r
 \r
                 # C.g:277:2: ( IDENTIFIER ( '=' constant_expression )? )\r
                 # C.g:277:4: IDENTIFIER ( '=' constant_expression )?\r
                 self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enumerator695)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:277:15: ( '=' constant_expression )?\r
                 alt25 = 2\r
                 LA25_0 = self.input.LA(1)\r
@@ -2263,12 +2263,12 @@ class CParser(Parser):
                     # C.g:277:16: '=' constant_expression\r
                     self.match(self.input, 28, self.FOLLOW_28_in_enumerator698)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_constant_expression_in_enumerator700)\r
                     self.constant_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -2285,7 +2285,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end enumerator\r
 \r
@@ -2298,7 +2298,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 21):\r
-                    return \r
+                    return\r
 \r
                 # C.g:281:2: ( 'const' | 'volatile' | 'IN' | 'OUT' | 'OPTIONAL' | 'CONST' | 'UNALIGNED' | 'VOLATILE' | 'GLOBAL_REMOVE_IF_UNREFERENCED' | 'EFIAPI' | 'EFI_BOOTSERVICE' | 'EFI_RUNTIMESERVICE' | 'PACKED' )\r
                 # C.g:\r
@@ -2310,7 +2310,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     mse = MismatchedSetException(None, self.input)\r
                     self.recoverFromMismatchedSet(\r
@@ -2332,7 +2332,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end type_qualifier\r
 \r
@@ -2487,7 +2487,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 23):\r
-                    return \r
+                    return\r
 \r
                 # C.g:303:2: ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ )\r
                 alt34 = 2\r
@@ -2500,7 +2500,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("302:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ );", 34, 0, self.input)\r
 \r
@@ -2510,7 +2510,7 @@ class CParser(Parser):
                     # C.g:303:4: IDENTIFIER ( declarator_suffix )*\r
                     self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_direct_declarator819)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:303:15: ( declarator_suffix )*\r
                     while True: #loop31\r
                         alt31 = 2\r
@@ -2754,7 +2754,7 @@ class CParser(Parser):
                             self.declarator_suffix()\r
                             self.following.pop()\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         else:\r
@@ -2767,7 +2767,7 @@ class CParser(Parser):
                     # C.g:304:4: '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+\r
                     self.match(self.input, 62, self.FOLLOW_62_in_direct_declarator827)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:304:8: ( 'EFIAPI' )?\r
                     alt32 = 2\r
                     LA32_0 = self.input.LA(1)\r
@@ -2781,7 +2781,7 @@ class CParser(Parser):
                         # C.g:304:9: 'EFIAPI'\r
                         self.match(self.input, 58, self.FOLLOW_58_in_direct_declarator830)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -2789,10 +2789,10 @@ class CParser(Parser):
                     self.declarator()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_direct_declarator836)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:304:35: ( declarator_suffix )+\r
                     cnt33 = 0\r
                     while True: #loop33\r
@@ -3037,7 +3037,7 @@ class CParser(Parser):
                             self.declarator_suffix()\r
                             self.following.pop()\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         else:\r
@@ -3046,7 +3046,7 @@ class CParser(Parser):
 \r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             eee = EarlyExitException(33, self.input)\r
                             raise eee\r
@@ -3066,7 +3066,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end direct_declarator\r
 \r
@@ -3079,7 +3079,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 24):\r
-                    return \r
+                    return\r
 \r
                 # C.g:308:2: ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' )\r
                 alt35 = 5\r
@@ -3095,7 +3095,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 1, self.input)\r
 \r
@@ -3117,7 +3117,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 29, self.input)\r
 \r
@@ -3126,7 +3126,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 2, self.input)\r
 \r
@@ -3135,7 +3135,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 0, self.input)\r
 \r
@@ -3145,65 +3145,65 @@ class CParser(Parser):
                     # C.g:308:6: '[' constant_expression ']'\r
                     self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix852)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_constant_expression_in_declarator_suffix854)\r
                     self.constant_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 65, self.FOLLOW_65_in_declarator_suffix856)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt35 == 2:\r
                     # C.g:309:9: '[' ']'\r
                     self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix866)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 65, self.FOLLOW_65_in_declarator_suffix868)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt35 == 3:\r
                     # C.g:310:9: '(' parameter_type_list ')'\r
                     self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix878)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_parameter_type_list_in_declarator_suffix880)\r
                     self.parameter_type_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix882)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt35 == 4:\r
                     # C.g:311:9: '(' identifier_list ')'\r
                     self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix892)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_identifier_list_in_declarator_suffix894)\r
                     self.identifier_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix896)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt35 == 5:\r
                     # C.g:312:9: '(' ')'\r
                     self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix906)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix908)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -3216,7 +3216,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end declarator_suffix\r
 \r
@@ -3229,7 +3229,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 25):\r
-                    return \r
+                    return\r
 \r
                 # C.g:316:2: ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' )\r
                 alt38 = 3\r
@@ -3247,7 +3247,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 2, self.input)\r
 \r
@@ -3263,7 +3263,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 3, self.input)\r
 \r
@@ -3279,7 +3279,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 4, self.input)\r
 \r
@@ -3295,7 +3295,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 5, self.input)\r
 \r
@@ -3313,7 +3313,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 21, self.input)\r
 \r
@@ -3329,7 +3329,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 29, self.input)\r
 \r
@@ -3338,7 +3338,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 1, self.input)\r
 \r
@@ -3347,7 +3347,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 0, self.input)\r
 \r
@@ -3357,7 +3357,7 @@ class CParser(Parser):
                     # C.g:316:4: '*' ( type_qualifier )+ ( pointer )?\r
                     self.match(self.input, 66, self.FOLLOW_66_in_pointer919)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:316:8: ( type_qualifier )+\r
                     cnt36 = 0\r
                     while True: #loop36\r
@@ -3405,7 +3405,7 @@ class CParser(Parser):
                             self.type_qualifier()\r
                             self.following.pop()\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         else:\r
@@ -3414,7 +3414,7 @@ class CParser(Parser):
 \r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             eee = EarlyExitException(36, self.input)\r
                             raise eee\r
@@ -3437,7 +3437,7 @@ class CParser(Parser):
                         self.pointer()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -3447,19 +3447,19 @@ class CParser(Parser):
                     # C.g:317:4: '*' pointer\r
                     self.match(self.input, 66, self.FOLLOW_66_in_pointer930)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_pointer_in_pointer932)\r
                     self.pointer()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt38 == 3:\r
                     # C.g:318:4: '*'\r
                     self.match(self.input, 66, self.FOLLOW_66_in_pointer937)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -3472,7 +3472,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end pointer\r
 \r
@@ -3485,7 +3485,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 26):\r
-                    return \r
+                    return\r
 \r
                 # C.g:322:2: ( parameter_list ( ',' ( 'OPTIONAL' )? '...' )? )\r
                 # C.g:322:4: parameter_list ( ',' ( 'OPTIONAL' )? '...' )?\r
@@ -3493,7 +3493,7 @@ class CParser(Parser):
                 self.parameter_list()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:322:19: ( ',' ( 'OPTIONAL' )? '...' )?\r
                 alt40 = 2\r
                 LA40_0 = self.input.LA(1)\r
@@ -3504,7 +3504,7 @@ class CParser(Parser):
                     # C.g:322:20: ',' ( 'OPTIONAL' )? '...'\r
                     self.match(self.input, 27, self.FOLLOW_27_in_parameter_type_list951)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:322:24: ( 'OPTIONAL' )?\r
                     alt39 = 2\r
                     LA39_0 = self.input.LA(1)\r
@@ -3515,13 +3515,13 @@ class CParser(Parser):
                         # C.g:322:25: 'OPTIONAL'\r
                         self.match(self.input, 53, self.FOLLOW_53_in_parameter_type_list954)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
                     self.match(self.input, 67, self.FOLLOW_67_in_parameter_type_list958)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -3538,7 +3538,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end parameter_type_list\r
 \r
@@ -3551,7 +3551,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 27):\r
-                    return \r
+                    return\r
 \r
                 # C.g:326:2: ( parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )* )\r
                 # C.g:326:4: parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )*\r
@@ -3559,7 +3559,7 @@ class CParser(Parser):
                 self.parameter_declaration()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:326:26: ( ',' ( 'OPTIONAL' )? parameter_declaration )*\r
                 while True: #loop42\r
                     alt42 = 2\r
@@ -3585,7 +3585,7 @@ class CParser(Parser):
                         # C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration\r
                         self.match(self.input, 27, self.FOLLOW_27_in_parameter_list974)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         # C.g:326:31: ( 'OPTIONAL' )?\r
                         alt41 = 2\r
                         LA41_0 = self.input.LA(1)\r
@@ -3599,7 +3599,7 @@ class CParser(Parser):
                             # C.g:326:32: 'OPTIONAL'\r
                             self.match(self.input, 53, self.FOLLOW_53_in_parameter_list977)\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
 \r
@@ -3607,7 +3607,7 @@ class CParser(Parser):
                         self.parameter_declaration()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -3627,7 +3627,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end parameter_list\r
 \r
@@ -3640,7 +3640,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 28):\r
-                    return \r
+                    return\r
 \r
                 # C.g:330:2: ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER )\r
                 alt46 = 2\r
@@ -3657,7 +3657,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 13, self.input)\r
 \r
@@ -3668,7 +3668,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 0, self.input)\r
 \r
@@ -3680,7 +3680,7 @@ class CParser(Parser):
                     self.declaration_specifiers()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:330:27: ( declarator | abstract_declarator )*\r
                     while True: #loop43\r
                         alt43 = 3\r
@@ -3764,7 +3764,7 @@ class CParser(Parser):
                             self.declarator()\r
                             self.following.pop()\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         elif alt43 == 2:\r
@@ -3773,7 +3773,7 @@ class CParser(Parser):
                             self.abstract_declarator()\r
                             self.following.pop()\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         else:\r
@@ -3790,7 +3790,7 @@ class CParser(Parser):
                         # C.g:330:62: 'OPTIONAL'\r
                         self.match(self.input, 53, self.FOLLOW_53_in_parameter_declaration1004)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -3813,7 +3813,7 @@ class CParser(Parser):
                             self.pointer()\r
                             self.following.pop()\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         else:\r
@@ -3822,7 +3822,7 @@ class CParser(Parser):
 \r
                     self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_parameter_declaration1016)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -3835,7 +3835,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end parameter_declaration\r
 \r
@@ -3848,13 +3848,13 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 29):\r
-                    return \r
+                    return\r
 \r
                 # C.g:336:2: ( IDENTIFIER ( ',' IDENTIFIER )* )\r
                 # C.g:336:4: IDENTIFIER ( ',' IDENTIFIER )*\r
                 self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1027)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:337:2: ( ',' IDENTIFIER )*\r
                 while True: #loop47\r
                     alt47 = 2\r
@@ -3868,10 +3868,10 @@ class CParser(Parser):
                         # C.g:337:3: ',' IDENTIFIER\r
                         self.match(self.input, 27, self.FOLLOW_27_in_identifier_list1031)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1033)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -3891,7 +3891,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end identifier_list\r
 \r
@@ -3904,7 +3904,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 30):\r
-                    return \r
+                    return\r
 \r
                 # C.g:341:2: ( specifier_qualifier_list ( abstract_declarator )? | type_id )\r
                 alt49 = 2\r
@@ -3922,7 +3922,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 13, self.input)\r
 \r
@@ -3931,7 +3931,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 0, self.input)\r
 \r
@@ -3943,7 +3943,7 @@ class CParser(Parser):
                     self.specifier_qualifier_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:341:29: ( abstract_declarator )?\r
                     alt48 = 2\r
                     LA48_0 = self.input.LA(1)\r
@@ -3956,7 +3956,7 @@ class CParser(Parser):
                         self.abstract_declarator()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -3968,7 +3968,7 @@ class CParser(Parser):
                     self.type_id()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -3981,7 +3981,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end type_name\r
 \r
@@ -3994,7 +3994,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 31):\r
-                    return \r
+                    return\r
 \r
                 # C.g:346:2: ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator )\r
                 alt51 = 2\r
@@ -4007,7 +4007,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("345:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator );", 51, 0, self.input)\r
 \r
@@ -4019,7 +4019,7 @@ class CParser(Parser):
                     self.pointer()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:346:12: ( direct_abstract_declarator )?\r
                     alt50 = 2\r
                     LA50_0 = self.input.LA(1)\r
@@ -4204,7 +4204,7 @@ class CParser(Parser):
                         self.direct_abstract_declarator()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -4216,7 +4216,7 @@ class CParser(Parser):
                     self.direct_abstract_declarator()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -4229,7 +4229,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end abstract_declarator\r
 \r
@@ -4242,7 +4242,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 32):\r
-                    return \r
+                    return\r
 \r
                 # C.g:351:2: ( ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* )\r
                 # C.g:351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )*\r
@@ -4264,7 +4264,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 18, self.input)\r
 \r
@@ -4275,7 +4275,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 1, self.input)\r
 \r
@@ -4286,7 +4286,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 0, self.input)\r
 \r
@@ -4296,15 +4296,15 @@ class CParser(Parser):
                     # C.g:351:6: '(' abstract_declarator ')'\r
                     self.match(self.input, 62, self.FOLLOW_62_in_direct_abstract_declarator1086)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_abstract_declarator_in_direct_abstract_declarator1088)\r
                     self.abstract_declarator()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_direct_abstract_declarator1090)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt52 == 2:\r
@@ -4313,7 +4313,7 @@ class CParser(Parser):
                     self.abstract_declarator_suffix()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -4560,7 +4560,7 @@ class CParser(Parser):
                         self.abstract_declarator_suffix()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -4580,7 +4580,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end direct_abstract_declarator\r
 \r
@@ -4593,7 +4593,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 33):\r
-                    return \r
+                    return\r
 \r
                 # C.g:355:2: ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' )\r
                 alt54 = 4\r
@@ -4609,7 +4609,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 1, self.input)\r
 \r
@@ -4625,7 +4625,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 2, self.input)\r
 \r
@@ -4634,7 +4634,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 0, self.input)\r
 \r
@@ -4644,50 +4644,50 @@ class CParser(Parser):
                     # C.g:355:4: '[' ']'\r
                     self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1110)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 65, self.FOLLOW_65_in_abstract_declarator_suffix1112)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt54 == 2:\r
                     # C.g:356:4: '[' constant_expression ']'\r
                     self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1117)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_constant_expression_in_abstract_declarator_suffix1119)\r
                     self.constant_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 65, self.FOLLOW_65_in_abstract_declarator_suffix1121)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt54 == 3:\r
                     # C.g:357:4: '(' ')'\r
                     self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1126)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1128)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt54 == 4:\r
                     # C.g:358:4: '(' parameter_type_list ')'\r
                     self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1133)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_parameter_type_list_in_abstract_declarator_suffix1135)\r
                     self.parameter_type_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1137)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -4700,7 +4700,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end abstract_declarator_suffix\r
 \r
@@ -4713,7 +4713,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 34):\r
-                    return \r
+                    return\r
 \r
                 # C.g:363:2: ( assignment_expression | '{' initializer_list ( ',' )? '}' )\r
                 alt56 = 2\r
@@ -4726,7 +4726,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("361:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' );", 56, 0, self.input)\r
 \r
@@ -4738,19 +4738,19 @@ class CParser(Parser):
                     self.assignment_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt56 == 2:\r
                     # C.g:364:4: '{' initializer_list ( ',' )? '}'\r
                     self.match(self.input, 43, self.FOLLOW_43_in_initializer1155)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_initializer_list_in_initializer1157)\r
                     self.initializer_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:364:25: ( ',' )?\r
                     alt55 = 2\r
                     LA55_0 = self.input.LA(1)\r
@@ -4761,13 +4761,13 @@ class CParser(Parser):
                         # C.g:0:0: ','\r
                         self.match(self.input, 27, self.FOLLOW_27_in_initializer1159)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
                     self.match(self.input, 44, self.FOLLOW_44_in_initializer1162)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -4780,7 +4780,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end initializer\r
 \r
@@ -4793,7 +4793,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 35):\r
-                    return \r
+                    return\r
 \r
                 # C.g:368:2: ( initializer ( ',' initializer )* )\r
                 # C.g:368:4: initializer ( ',' initializer )*\r
@@ -4801,7 +4801,7 @@ class CParser(Parser):
                 self.initializer()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:368:16: ( ',' initializer )*\r
                 while True: #loop57\r
                     alt57 = 2\r
@@ -4820,12 +4820,12 @@ class CParser(Parser):
                         # C.g:368:17: ',' initializer\r
                         self.match(self.input, 27, self.FOLLOW_27_in_initializer_list1176)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_initializer_in_initializer_list1178)\r
                         self.initializer()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -4845,7 +4845,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end initializer_list\r
 \r
@@ -4956,7 +4956,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 37):\r
-                    return \r
+                    return\r
 \r
                 # C.g:378:2: ( ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* )\r
                 # C.g:378:4: ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )*\r
@@ -4966,7 +4966,7 @@ class CParser(Parser):
                 self.multiplicative_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -4985,24 +4985,24 @@ class CParser(Parser):
                         # C.g:378:33: '+' multiplicative_expression\r
                         self.match(self.input, 68, self.FOLLOW_68_in_additive_expression1229)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1231)\r
                         self.multiplicative_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt61 == 2:\r
                         # C.g:378:65: '-' multiplicative_expression\r
                         self.match(self.input, 69, self.FOLLOW_69_in_additive_expression1235)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1237)\r
                         self.multiplicative_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -5022,7 +5022,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end additive_expression\r
 \r
@@ -5035,7 +5035,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 38):\r
-                    return \r
+                    return\r
 \r
                 # C.g:382:2: ( ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* )\r
                 # C.g:382:4: ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )*\r
@@ -5045,7 +5045,7 @@ class CParser(Parser):
                 self.cast_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -5064,36 +5064,36 @@ class CParser(Parser):
                         # C.g:382:23: '*' cast_expression\r
                         self.match(self.input, 66, self.FOLLOW_66_in_multiplicative_expression1255)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1257)\r
                         self.cast_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt62 == 2:\r
                         # C.g:382:45: '/' cast_expression\r
                         self.match(self.input, 70, self.FOLLOW_70_in_multiplicative_expression1261)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1263)\r
                         self.cast_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt62 == 3:\r
                         # C.g:382:67: '%' cast_expression\r
                         self.match(self.input, 71, self.FOLLOW_71_in_multiplicative_expression1267)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1269)\r
                         self.cast_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -5113,7 +5113,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end multiplicative_expression\r
 \r
@@ -5126,7 +5126,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 39):\r
-                    return \r
+                    return\r
 \r
                 # C.g:386:2: ( '(' type_name ')' cast_expression | unary_expression )\r
                 alt63 = 2\r
@@ -5146,7 +5146,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 25, self.input)\r
 \r
@@ -5157,7 +5157,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 1, self.input)\r
 \r
@@ -5168,7 +5168,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 0, self.input)\r
 \r
@@ -5178,20 +5178,20 @@ class CParser(Parser):
                     # C.g:386:4: '(' type_name ')' cast_expression\r
                     self.match(self.input, 62, self.FOLLOW_62_in_cast_expression1282)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_type_name_in_cast_expression1284)\r
                     self.type_name()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_cast_expression1286)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_cast_expression_in_cast_expression1288)\r
                     self.cast_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt63 == 2:\r
@@ -5200,7 +5200,7 @@ class CParser(Parser):
                     self.unary_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -5213,7 +5213,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end cast_expression\r
 \r
@@ -5226,7 +5226,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 40):\r
-                    return \r
+                    return\r
 \r
                 # C.g:391:2: ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' )\r
                 alt64 = 6\r
@@ -5252,7 +5252,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 13, self.input)\r
 \r
@@ -5263,7 +5263,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 12, self.input)\r
 \r
@@ -5272,7 +5272,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 0, self.input)\r
 \r
@@ -5284,31 +5284,31 @@ class CParser(Parser):
                     self.postfix_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt64 == 2:\r
                     # C.g:392:4: '++' unary_expression\r
                     self.match(self.input, 72, self.FOLLOW_72_in_unary_expression1309)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_unary_expression_in_unary_expression1311)\r
                     self.unary_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt64 == 3:\r
                     # C.g:393:4: '--' unary_expression\r
                     self.match(self.input, 73, self.FOLLOW_73_in_unary_expression1316)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_unary_expression_in_unary_expression1318)\r
                     self.unary_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt64 == 4:\r
@@ -5317,42 +5317,42 @@ class CParser(Parser):
                     self.unary_operator()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_cast_expression_in_unary_expression1325)\r
                     self.cast_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt64 == 5:\r
                     # C.g:395:4: 'sizeof' unary_expression\r
                     self.match(self.input, 74, self.FOLLOW_74_in_unary_expression1330)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_unary_expression_in_unary_expression1332)\r
                     self.unary_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt64 == 6:\r
                     # C.g:396:4: 'sizeof' '(' type_name ')'\r
                     self.match(self.input, 74, self.FOLLOW_74_in_unary_expression1337)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 62, self.FOLLOW_62_in_unary_expression1339)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_type_name_in_unary_expression1341)\r
                     self.type_name()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_unary_expression1343)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -5365,7 +5365,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end unary_expression\r
 \r
@@ -5385,13 +5385,13 @@ class CParser(Parser):
         c = None\r
 \r
 \r
-               \r
+\r
         self.postfix_expression_stack[-1].FuncCallText =  ''\r
 \r
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 41):\r
-                    return \r
+                    return\r
 \r
                 # C.g:406:2: (p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )* )\r
                 # C.g:406:6: p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )*\r
@@ -5399,7 +5399,7 @@ class CParser(Parser):
                 p = self.primary_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 if self.backtracking == 0:\r
                     self.postfix_expression_stack[-1].FuncCallText += self.input.toString(p.start, p.stop)\r
 \r
@@ -5461,26 +5461,26 @@ class CParser(Parser):
                         # C.g:407:13: '[' expression ']'\r
                         self.match(self.input, 64, self.FOLLOW_64_in_postfix_expression1383)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_expression_in_postfix_expression1385)\r
                         self.expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.match(self.input, 65, self.FOLLOW_65_in_postfix_expression1387)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt65 == 2:\r
                         # C.g:408:13: '(' a= ')'\r
                         self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1401)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         a = self.input.LT(1)\r
                         self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1405)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         if self.backtracking == 0:\r
                             self.StoreFunctionCalling(p.start.line, p.start.charPositionInLine, a.line, a.charPositionInLine, self.postfix_expression_stack[-1].FuncCallText, '')\r
 \r
@@ -5490,16 +5490,16 @@ class CParser(Parser):
                         # C.g:409:13: '(' c= argument_expression_list b= ')'\r
                         self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1420)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_argument_expression_list_in_postfix_expression1424)\r
                         c = self.argument_expression_list()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         b = self.input.LT(1)\r
                         self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1428)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         if self.backtracking == 0:\r
                             self.StoreFunctionCalling(p.start.line, p.start.charPositionInLine, b.line, b.charPositionInLine, self.postfix_expression_stack[-1].FuncCallText, self.input.toString(c.start, c.stop))\r
 \r
@@ -5509,26 +5509,26 @@ class CParser(Parser):
                         # C.g:410:13: '(' macro_parameter_list ')'\r
                         self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1444)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_macro_parameter_list_in_postfix_expression1446)\r
                         self.macro_parameter_list()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1448)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt65 == 5:\r
                         # C.g:411:13: '.' x= IDENTIFIER\r
                         self.match(self.input, 75, self.FOLLOW_75_in_postfix_expression1462)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         x = self.input.LT(1)\r
                         self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1466)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         if self.backtracking == 0:\r
                             self.postfix_expression_stack[-1].FuncCallText += '.' + x.text\r
 \r
@@ -5538,11 +5538,11 @@ class CParser(Parser):
                         # C.g:412:13: '*' y= IDENTIFIER\r
                         self.match(self.input, 66, self.FOLLOW_66_in_postfix_expression1482)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         y = self.input.LT(1)\r
                         self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1486)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         if self.backtracking == 0:\r
                             self.postfix_expression_stack[-1].FuncCallText = y.text\r
 \r
@@ -5552,11 +5552,11 @@ class CParser(Parser):
                         # C.g:413:13: '->' z= IDENTIFIER\r
                         self.match(self.input, 76, self.FOLLOW_76_in_postfix_expression1502)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         z = self.input.LT(1)\r
                         self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1506)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         if self.backtracking == 0:\r
                             self.postfix_expression_stack[-1].FuncCallText += '->' + z.text\r
 \r
@@ -5566,14 +5566,14 @@ class CParser(Parser):
                         # C.g:414:13: '++'\r
                         self.match(self.input, 72, self.FOLLOW_72_in_postfix_expression1522)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt65 == 9:\r
                         # C.g:415:13: '--'\r
                         self.match(self.input, 73, self.FOLLOW_73_in_postfix_expression1536)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -5594,7 +5594,7 @@ class CParser(Parser):
             self.postfix_expression_stack.pop()\r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end postfix_expression\r
 \r
@@ -5607,7 +5607,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 42):\r
-                    return \r
+                    return\r
 \r
                 # C.g:420:2: ( parameter_declaration ( ',' parameter_declaration )* )\r
                 # C.g:420:4: parameter_declaration ( ',' parameter_declaration )*\r
@@ -5615,7 +5615,7 @@ class CParser(Parser):
                 self.parameter_declaration()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:420:26: ( ',' parameter_declaration )*\r
                 while True: #loop66\r
                     alt66 = 2\r
@@ -5629,12 +5629,12 @@ class CParser(Parser):
                         # C.g:420:27: ',' parameter_declaration\r
                         self.match(self.input, 27, self.FOLLOW_27_in_macro_parameter_list1562)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_parameter_declaration_in_macro_parameter_list1564)\r
                         self.parameter_declaration()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -5654,7 +5654,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end macro_parameter_list\r
 \r
@@ -5667,7 +5667,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 43):\r
-                    return \r
+                    return\r
 \r
                 # C.g:424:2: ( '&' | '*' | '+' | '-' | '~' | '!' )\r
                 # C.g:\r
@@ -5679,7 +5679,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     mse = MismatchedSetException(None, self.input)\r
                     self.recoverFromMismatchedSet(\r
@@ -5701,7 +5701,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end unary_operator\r
 \r
@@ -5812,7 +5812,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 45):\r
-                    return \r
+                    return\r
 \r
                 # C.g:439:5: ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL )\r
                 alt72 = 6\r
@@ -5832,7 +5832,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("438:1: constant : ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL );", 72, 0, self.input)\r
 \r
@@ -5842,28 +5842,28 @@ class CParser(Parser):
                     # C.g:439:9: HEX_LITERAL\r
                     self.match(self.input, HEX_LITERAL, self.FOLLOW_HEX_LITERAL_in_constant1643)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt72 == 2:\r
                     # C.g:440:9: OCTAL_LITERAL\r
                     self.match(self.input, OCTAL_LITERAL, self.FOLLOW_OCTAL_LITERAL_in_constant1653)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt72 == 3:\r
                     # C.g:441:9: DECIMAL_LITERAL\r
                     self.match(self.input, DECIMAL_LITERAL, self.FOLLOW_DECIMAL_LITERAL_in_constant1663)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt72 == 4:\r
                     # C.g:442:7: CHARACTER_LITERAL\r
                     self.match(self.input, CHARACTER_LITERAL, self.FOLLOW_CHARACTER_LITERAL_in_constant1671)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt72 == 5:\r
@@ -5907,7 +5907,7 @@ class CParser(Parser):
                                     # C.g:0:0: IDENTIFIER\r
                                     self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1680)\r
                                     if self.failed:\r
-                                        return \r
+                                        return\r
 \r
 \r
                                 else:\r
@@ -5933,7 +5933,7 @@ class CParser(Parser):
                                     # C.g:0:0: STRING_LITERAL\r
                                     self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_constant1683)\r
                                     if self.failed:\r
-                                        return \r
+                                        return\r
 \r
 \r
                                 else:\r
@@ -5942,7 +5942,7 @@ class CParser(Parser):
 \r
                                     if self.backtracking > 0:\r
                                         self.failed = True\r
-                                        return \r
+                                        return\r
 \r
                                     eee = EarlyExitException(69, self.input)\r
                                     raise eee\r
@@ -5958,7 +5958,7 @@ class CParser(Parser):
 \r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             eee = EarlyExitException(70, self.input)\r
                             raise eee\r
@@ -5979,7 +5979,7 @@ class CParser(Parser):
                             # C.g:0:0: IDENTIFIER\r
                             self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1688)\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         else:\r
@@ -5992,7 +5992,7 @@ class CParser(Parser):
                     # C.g:444:9: FLOATING_POINT_LITERAL\r
                     self.match(self.input, FLOATING_POINT_LITERAL, self.FOLLOW_FLOATING_POINT_LITERAL_in_constant1699)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -6005,7 +6005,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end constant\r
 \r
@@ -6088,7 +6088,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 47):\r
-                    return \r
+                    return\r
 \r
                 # C.g:454:2: ( conditional_expression )\r
                 # C.g:454:4: conditional_expression\r
@@ -6096,7 +6096,7 @@ class CParser(Parser):
                 self.conditional_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -6110,7 +6110,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end constant_expression\r
 \r
@@ -6123,7 +6123,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 48):\r
-                    return \r
+                    return\r
 \r
                 # C.g:458:2: ( lvalue assignment_operator assignment_expression | conditional_expression )\r
                 alt74 = 2\r
@@ -6140,7 +6140,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 13, self.input)\r
 \r
@@ -6156,7 +6156,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 14, self.input)\r
 \r
@@ -6172,7 +6172,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 15, self.input)\r
 \r
@@ -6188,7 +6188,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 16, self.input)\r
 \r
@@ -6204,7 +6204,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 17, self.input)\r
 \r
@@ -6220,7 +6220,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 18, self.input)\r
 \r
@@ -6236,7 +6236,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 19, self.input)\r
 \r
@@ -6254,7 +6254,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 21, self.input)\r
 \r
@@ -6270,7 +6270,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 22, self.input)\r
 \r
@@ -6281,7 +6281,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 1, self.input)\r
 \r
@@ -6299,7 +6299,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 44, self.input)\r
 \r
@@ -6315,7 +6315,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 45, self.input)\r
 \r
@@ -6331,7 +6331,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 46, self.input)\r
 \r
@@ -6347,7 +6347,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 47, self.input)\r
 \r
@@ -6363,7 +6363,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 48, self.input)\r
 \r
@@ -6379,7 +6379,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 49, self.input)\r
 \r
@@ -6395,7 +6395,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 50, self.input)\r
 \r
@@ -6408,7 +6408,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 2, self.input)\r
 \r
@@ -6426,7 +6426,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 73, self.input)\r
 \r
@@ -6442,7 +6442,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 74, self.input)\r
 \r
@@ -6458,7 +6458,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 75, self.input)\r
 \r
@@ -6474,7 +6474,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 76, self.input)\r
 \r
@@ -6490,7 +6490,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 77, self.input)\r
 \r
@@ -6506,7 +6506,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 78, self.input)\r
 \r
@@ -6522,7 +6522,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 79, self.input)\r
 \r
@@ -6535,7 +6535,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 3, self.input)\r
 \r
@@ -6553,7 +6553,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 102, self.input)\r
 \r
@@ -6569,7 +6569,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 103, self.input)\r
 \r
@@ -6585,7 +6585,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 104, self.input)\r
 \r
@@ -6601,7 +6601,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 105, self.input)\r
 \r
@@ -6617,7 +6617,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 106, self.input)\r
 \r
@@ -6633,7 +6633,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 107, self.input)\r
 \r
@@ -6649,7 +6649,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 108, self.input)\r
 \r
@@ -6662,7 +6662,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 4, self.input)\r
 \r
@@ -6680,7 +6680,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 131, self.input)\r
 \r
@@ -6696,7 +6696,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 132, self.input)\r
 \r
@@ -6712,7 +6712,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 133, self.input)\r
 \r
@@ -6728,7 +6728,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 134, self.input)\r
 \r
@@ -6744,7 +6744,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 135, self.input)\r
 \r
@@ -6760,7 +6760,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 136, self.input)\r
 \r
@@ -6776,7 +6776,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 137, self.input)\r
 \r
@@ -6789,7 +6789,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 5, self.input)\r
 \r
@@ -6807,7 +6807,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 160, self.input)\r
 \r
@@ -6823,7 +6823,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 161, self.input)\r
 \r
@@ -6839,7 +6839,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 162, self.input)\r
 \r
@@ -6855,7 +6855,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 163, self.input)\r
 \r
@@ -6871,7 +6871,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 164, self.input)\r
 \r
@@ -6887,7 +6887,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 165, self.input)\r
 \r
@@ -6903,7 +6903,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 166, self.input)\r
 \r
@@ -6919,7 +6919,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 167, self.input)\r
 \r
@@ -6937,7 +6937,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 189, self.input)\r
 \r
@@ -6948,7 +6948,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 6, self.input)\r
 \r
@@ -6966,7 +6966,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 191, self.input)\r
 \r
@@ -6982,7 +6982,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 192, self.input)\r
 \r
@@ -6998,7 +6998,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 193, self.input)\r
 \r
@@ -7014,7 +7014,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 194, self.input)\r
 \r
@@ -7030,7 +7030,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 195, self.input)\r
 \r
@@ -7046,7 +7046,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 196, self.input)\r
 \r
@@ -7062,7 +7062,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 197, self.input)\r
 \r
@@ -7075,7 +7075,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 7, self.input)\r
 \r
@@ -7093,7 +7093,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 220, self.input)\r
 \r
@@ -7109,7 +7109,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 221, self.input)\r
 \r
@@ -7125,7 +7125,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 222, self.input)\r
 \r
@@ -7141,7 +7141,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 223, self.input)\r
 \r
@@ -7157,7 +7157,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 224, self.input)\r
 \r
@@ -7173,7 +7173,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 225, self.input)\r
 \r
@@ -7189,7 +7189,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 226, self.input)\r
 \r
@@ -7205,7 +7205,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 227, self.input)\r
 \r
@@ -7221,7 +7221,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 228, self.input)\r
 \r
@@ -7237,7 +7237,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 229, self.input)\r
 \r
@@ -7253,7 +7253,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 230, self.input)\r
 \r
@@ -7269,7 +7269,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 231, self.input)\r
 \r
@@ -7280,7 +7280,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 8, self.input)\r
 \r
@@ -7298,7 +7298,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 244, self.input)\r
 \r
@@ -7314,7 +7314,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 245, self.input)\r
 \r
@@ -7330,7 +7330,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 246, self.input)\r
 \r
@@ -7346,7 +7346,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 247, self.input)\r
 \r
@@ -7362,7 +7362,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 248, self.input)\r
 \r
@@ -7378,7 +7378,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 249, self.input)\r
 \r
@@ -7394,7 +7394,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 250, self.input)\r
 \r
@@ -7410,7 +7410,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 251, self.input)\r
 \r
@@ -7426,7 +7426,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 252, self.input)\r
 \r
@@ -7442,7 +7442,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 253, self.input)\r
 \r
@@ -7458,7 +7458,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 254, self.input)\r
 \r
@@ -7474,7 +7474,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 255, self.input)\r
 \r
@@ -7483,7 +7483,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 9, self.input)\r
 \r
@@ -7501,7 +7501,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 256, self.input)\r
 \r
@@ -7517,7 +7517,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 257, self.input)\r
 \r
@@ -7533,7 +7533,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 258, self.input)\r
 \r
@@ -7549,7 +7549,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 259, self.input)\r
 \r
@@ -7565,7 +7565,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 260, self.input)\r
 \r
@@ -7581,7 +7581,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 261, self.input)\r
 \r
@@ -7597,7 +7597,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 262, self.input)\r
 \r
@@ -7613,7 +7613,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 263, self.input)\r
 \r
@@ -7629,7 +7629,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 264, self.input)\r
 \r
@@ -7645,7 +7645,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 265, self.input)\r
 \r
@@ -7661,7 +7661,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 266, self.input)\r
 \r
@@ -7677,7 +7677,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 267, self.input)\r
 \r
@@ -7686,7 +7686,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 10, self.input)\r
 \r
@@ -7704,7 +7704,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 268, self.input)\r
 \r
@@ -7720,7 +7720,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 269, self.input)\r
 \r
@@ -7736,7 +7736,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 270, self.input)\r
 \r
@@ -7752,7 +7752,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 271, self.input)\r
 \r
@@ -7768,7 +7768,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 272, self.input)\r
 \r
@@ -7784,7 +7784,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 273, self.input)\r
 \r
@@ -7800,7 +7800,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 274, self.input)\r
 \r
@@ -7816,7 +7816,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 275, self.input)\r
 \r
@@ -7832,7 +7832,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 276, self.input)\r
 \r
@@ -7848,7 +7848,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 277, self.input)\r
 \r
@@ -7864,7 +7864,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 278, self.input)\r
 \r
@@ -7880,7 +7880,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 279, self.input)\r
 \r
@@ -7889,7 +7889,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 11, self.input)\r
 \r
@@ -7907,7 +7907,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 280, self.input)\r
 \r
@@ -7923,7 +7923,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 281, self.input)\r
 \r
@@ -7939,7 +7939,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 282, self.input)\r
 \r
@@ -7955,7 +7955,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 283, self.input)\r
 \r
@@ -7971,7 +7971,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 284, self.input)\r
 \r
@@ -7987,7 +7987,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 285, self.input)\r
 \r
@@ -8003,7 +8003,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 286, self.input)\r
 \r
@@ -8019,7 +8019,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 287, self.input)\r
 \r
@@ -8035,7 +8035,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 288, self.input)\r
 \r
@@ -8051,7 +8051,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 289, self.input)\r
 \r
@@ -8067,7 +8067,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 290, self.input)\r
 \r
@@ -8083,7 +8083,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 291, self.input)\r
 \r
@@ -8092,7 +8092,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 12, self.input)\r
 \r
@@ -8101,7 +8101,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 0, self.input)\r
 \r
@@ -8113,17 +8113,17 @@ class CParser(Parser):
                     self.lvalue()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_assignment_operator_in_assignment_expression1746)\r
                     self.assignment_operator()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_assignment_expression_in_assignment_expression1748)\r
                     self.assignment_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt74 == 2:\r
@@ -8132,7 +8132,7 @@ class CParser(Parser):
                     self.conditional_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -8145,7 +8145,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end assignment_expression\r
 \r
@@ -8158,7 +8158,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 49):\r
-                    return \r
+                    return\r
 \r
                 # C.g:463:2: ( unary_expression )\r
                 # C.g:463:4: unary_expression\r
@@ -8166,7 +8166,7 @@ class CParser(Parser):
                 self.unary_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -8180,7 +8180,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end lvalue\r
 \r
@@ -8193,7 +8193,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 50):\r
-                    return \r
+                    return\r
 \r
                 # C.g:467:2: ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' )\r
                 # C.g:\r
@@ -8205,7 +8205,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     mse = MismatchedSetException(None, self.input)\r
                     self.recoverFromMismatchedSet(\r
@@ -8227,7 +8227,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end assignment_operator\r
 \r
@@ -8243,7 +8243,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 51):\r
-                    return \r
+                    return\r
 \r
                 # C.g:481:2: (e= logical_or_expression ( '?' expression ':' conditional_expression )? )\r
                 # C.g:481:4: e= logical_or_expression ( '?' expression ':' conditional_expression )?\r
@@ -8251,7 +8251,7 @@ class CParser(Parser):
                 e = self.logical_or_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:481:28: ( '?' expression ':' conditional_expression )?\r
                 alt75 = 2\r
                 LA75_0 = self.input.LA(1)\r
@@ -8262,20 +8262,20 @@ class CParser(Parser):
                     # C.g:481:29: '?' expression ':' conditional_expression\r
                     self.match(self.input, 90, self.FOLLOW_90_in_conditional_expression1842)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_in_conditional_expression1844)\r
                     self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 47, self.FOLLOW_47_in_conditional_expression1846)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_conditional_expression_in_conditional_expression1848)\r
                     self.conditional_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
                         self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start, e.stop))\r
 \r
@@ -8295,7 +8295,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end conditional_expression\r
 \r
@@ -8378,7 +8378,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 53):\r
-                    return \r
+                    return\r
 \r
                 # C.g:489:2: ( inclusive_or_expression ( '&&' inclusive_or_expression )* )\r
                 # C.g:489:4: inclusive_or_expression ( '&&' inclusive_or_expression )*\r
@@ -8386,7 +8386,7 @@ class CParser(Parser):
                 self.inclusive_or_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:489:28: ( '&&' inclusive_or_expression )*\r
                 while True: #loop77\r
                     alt77 = 2\r
@@ -8400,12 +8400,12 @@ class CParser(Parser):
                         # C.g:489:29: '&&' inclusive_or_expression\r
                         self.match(self.input, 92, self.FOLLOW_92_in_logical_and_expression1884)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1886)\r
                         self.inclusive_or_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8425,7 +8425,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end logical_and_expression\r
 \r
@@ -8438,7 +8438,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 54):\r
-                    return \r
+                    return\r
 \r
                 # C.g:493:2: ( exclusive_or_expression ( '|' exclusive_or_expression )* )\r
                 # C.g:493:4: exclusive_or_expression ( '|' exclusive_or_expression )*\r
@@ -8446,7 +8446,7 @@ class CParser(Parser):
                 self.exclusive_or_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:493:28: ( '|' exclusive_or_expression )*\r
                 while True: #loop78\r
                     alt78 = 2\r
@@ -8460,12 +8460,12 @@ class CParser(Parser):
                         # C.g:493:29: '|' exclusive_or_expression\r
                         self.match(self.input, 93, self.FOLLOW_93_in_inclusive_or_expression1902)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1904)\r
                         self.exclusive_or_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8485,7 +8485,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end inclusive_or_expression\r
 \r
@@ -8498,7 +8498,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 55):\r
-                    return \r
+                    return\r
 \r
                 # C.g:497:2: ( and_expression ( '^' and_expression )* )\r
                 # C.g:497:4: and_expression ( '^' and_expression )*\r
@@ -8506,7 +8506,7 @@ class CParser(Parser):
                 self.and_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:497:19: ( '^' and_expression )*\r
                 while True: #loop79\r
                     alt79 = 2\r
@@ -8520,12 +8520,12 @@ class CParser(Parser):
                         # C.g:497:20: '^' and_expression\r
                         self.match(self.input, 94, self.FOLLOW_94_in_exclusive_or_expression1920)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1922)\r
                         self.and_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8545,7 +8545,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end exclusive_or_expression\r
 \r
@@ -8558,7 +8558,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 56):\r
-                    return \r
+                    return\r
 \r
                 # C.g:501:2: ( equality_expression ( '&' equality_expression )* )\r
                 # C.g:501:4: equality_expression ( '&' equality_expression )*\r
@@ -8566,7 +8566,7 @@ class CParser(Parser):
                 self.equality_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:501:24: ( '&' equality_expression )*\r
                 while True: #loop80\r
                     alt80 = 2\r
@@ -8580,12 +8580,12 @@ class CParser(Parser):
                         # C.g:501:25: '&' equality_expression\r
                         self.match(self.input, 77, self.FOLLOW_77_in_and_expression1938)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_equality_expression_in_and_expression1940)\r
                         self.equality_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8605,7 +8605,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end and_expression\r
 \r
@@ -8618,7 +8618,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 57):\r
-                    return \r
+                    return\r
 \r
                 # C.g:504:2: ( relational_expression ( ( '==' | '!=' ) relational_expression )* )\r
                 # C.g:504:4: relational_expression ( ( '==' | '!=' ) relational_expression )*\r
@@ -8626,7 +8626,7 @@ class CParser(Parser):
                 self.relational_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:504:26: ( ( '==' | '!=' ) relational_expression )*\r
                 while True: #loop81\r
                     alt81 = 2\r
@@ -8646,7 +8646,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             mse = MismatchedSetException(None, self.input)\r
                             self.recoverFromMismatchedSet(\r
@@ -8659,7 +8659,7 @@ class CParser(Parser):
                         self.relational_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8679,7 +8679,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end equality_expression\r
 \r
@@ -8692,7 +8692,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 58):\r
-                    return \r
+                    return\r
 \r
                 # C.g:508:2: ( shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* )\r
                 # C.g:508:4: shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*\r
@@ -8700,7 +8700,7 @@ class CParser(Parser):
                 self.shift_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:508:21: ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*\r
                 while True: #loop82\r
                     alt82 = 2\r
@@ -8720,7 +8720,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             mse = MismatchedSetException(None, self.input)\r
                             self.recoverFromMismatchedSet(\r
@@ -8733,7 +8733,7 @@ class CParser(Parser):
                         self.shift_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8753,7 +8753,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end relational_expression\r
 \r
@@ -8766,7 +8766,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 59):\r
-                    return \r
+                    return\r
 \r
                 # C.g:512:2: ( additive_expression ( ( '<<' | '>>' ) additive_expression )* )\r
                 # C.g:512:4: additive_expression ( ( '<<' | '>>' ) additive_expression )*\r
@@ -8774,7 +8774,7 @@ class CParser(Parser):
                 self.additive_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:512:24: ( ( '<<' | '>>' ) additive_expression )*\r
                 while True: #loop83\r
                     alt83 = 2\r
@@ -8794,7 +8794,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             mse = MismatchedSetException(None, self.input)\r
                             self.recoverFromMismatchedSet(\r
@@ -8807,7 +8807,7 @@ class CParser(Parser):
                         self.additive_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8827,7 +8827,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end shift_expression\r
 \r
@@ -8840,7 +8840,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 60):\r
-                    return \r
+                    return\r
 \r
                 # C.g:518:2: ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration )\r
                 alt84 = 11\r
@@ -8861,7 +8861,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 43, self.input)\r
 \r
@@ -8881,7 +8881,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 47, self.input)\r
 \r
@@ -8897,7 +8897,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 53, self.input)\r
 \r
@@ -8913,7 +8913,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 68, self.input)\r
 \r
@@ -8924,7 +8924,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 1, self.input)\r
 \r
@@ -8953,7 +8953,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 0, self.input)\r
 \r
@@ -8965,7 +8965,7 @@ class CParser(Parser):
                     self.labeled_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 2:\r
@@ -8974,7 +8974,7 @@ class CParser(Parser):
                     self.compound_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 3:\r
@@ -8983,7 +8983,7 @@ class CParser(Parser):
                     self.expression_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 4:\r
@@ -8992,7 +8992,7 @@ class CParser(Parser):
                     self.selection_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 5:\r
@@ -9001,7 +9001,7 @@ class CParser(Parser):
                     self.iteration_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 6:\r
@@ -9010,7 +9010,7 @@ class CParser(Parser):
                     self.jump_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 7:\r
@@ -9019,7 +9019,7 @@ class CParser(Parser):
                     self.macro_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 8:\r
@@ -9028,7 +9028,7 @@ class CParser(Parser):
                     self.asm2_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 9:\r
@@ -9037,7 +9037,7 @@ class CParser(Parser):
                     self.asm1_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 10:\r
@@ -9046,7 +9046,7 @@ class CParser(Parser):
                     self.asm_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 11:\r
@@ -9055,7 +9055,7 @@ class CParser(Parser):
                     self.declaration()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -9068,7 +9068,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end statement\r
 \r
@@ -9081,7 +9081,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 61):\r
-                    return \r
+                    return\r
 \r
                 # C.g:532:2: ( ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';' )\r
                 # C.g:532:4: ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';'\r
@@ -9095,16 +9095,16 @@ class CParser(Parser):
                     # C.g:0:0: '__asm__'\r
                     self.match(self.input, 103, self.FOLLOW_103_in_asm2_statement2086)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
                 self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_asm2_statement2089)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.match(self.input, 62, self.FOLLOW_62_in_asm2_statement2091)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:532:30: (~ ( ';' ) )*\r
                 while True: #loop86\r
                     alt86 = 2\r
@@ -9131,7 +9131,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             mse = MismatchedSetException(None, self.input)\r
                             self.recoverFromMismatchedSet(\r
@@ -9148,10 +9148,10 @@ class CParser(Parser):
 \r
                 self.match(self.input, 63, self.FOLLOW_63_in_asm2_statement2101)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.match(self.input, 25, self.FOLLOW_25_in_asm2_statement2103)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -9165,7 +9165,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end asm2_statement\r
 \r
@@ -9178,16 +9178,16 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 62):\r
-                    return \r
+                    return\r
 \r
                 # C.g:536:2: ( '_asm' '{' (~ ( '}' ) )* '}' )\r
                 # C.g:536:4: '_asm' '{' (~ ( '}' ) )* '}'\r
                 self.match(self.input, 104, self.FOLLOW_104_in_asm1_statement2115)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.match(self.input, 43, self.FOLLOW_43_in_asm1_statement2117)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:536:15: (~ ( '}' ) )*\r
                 while True: #loop87\r
                     alt87 = 2\r
@@ -9207,7 +9207,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             mse = MismatchedSetException(None, self.input)\r
                             self.recoverFromMismatchedSet(\r
@@ -9224,7 +9224,7 @@ class CParser(Parser):
 \r
                 self.match(self.input, 44, self.FOLLOW_44_in_asm1_statement2127)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -9238,7 +9238,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end asm1_statement\r
 \r
@@ -9251,16 +9251,16 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 63):\r
-                    return \r
+                    return\r
 \r
                 # C.g:540:2: ( '__asm' '{' (~ ( '}' ) )* '}' )\r
                 # C.g:540:4: '__asm' '{' (~ ( '}' ) )* '}'\r
                 self.match(self.input, 105, self.FOLLOW_105_in_asm_statement2138)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.match(self.input, 43, self.FOLLOW_43_in_asm_statement2140)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:540:16: (~ ( '}' ) )*\r
                 while True: #loop88\r
                     alt88 = 2\r
@@ -9280,7 +9280,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             mse = MismatchedSetException(None, self.input)\r
                             self.recoverFromMismatchedSet(\r
@@ -9297,7 +9297,7 @@ class CParser(Parser):
 \r
                 self.match(self.input, 44, self.FOLLOW_44_in_asm_statement2150)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -9311,7 +9311,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end asm_statement\r
 \r
@@ -9324,16 +9324,16 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 64):\r
-                    return \r
+                    return\r
 \r
                 # C.g:544:2: ( IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')' )\r
                 # C.g:544:4: IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')'\r
                 self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_macro_statement2162)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.match(self.input, 62, self.FOLLOW_62_in_macro_statement2164)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:544:19: ( declaration )*\r
                 while True: #loop89\r
                     alt89 = 2\r
@@ -11235,7 +11235,7 @@ class CParser(Parser):
                         self.declaration()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -12441,7 +12441,7 @@ class CParser(Parser):
                     self.statement_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -12457,13 +12457,13 @@ class CParser(Parser):
                     self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
                 self.match(self.input, 63, self.FOLLOW_63_in_macro_statement2176)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -12477,7 +12477,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end macro_statement\r
 \r
@@ -12490,7 +12490,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 65):\r
-                    return \r
+                    return\r
 \r
                 # C.g:548:2: ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement )\r
                 alt92 = 3\r
@@ -12504,7 +12504,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("547:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement );", 92, 0, self.input)\r
 \r
@@ -12514,50 +12514,50 @@ class CParser(Parser):
                     # C.g:548:4: IDENTIFIER ':' statement\r
                     self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_labeled_statement2188)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2190)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_labeled_statement2192)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt92 == 2:\r
                     # C.g:549:4: 'case' constant_expression ':' statement\r
                     self.match(self.input, 106, self.FOLLOW_106_in_labeled_statement2197)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_constant_expression_in_labeled_statement2199)\r
                     self.constant_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2201)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_labeled_statement2203)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt92 == 3:\r
                     # C.g:550:4: 'default' ':' statement\r
                     self.match(self.input, 107, self.FOLLOW_107_in_labeled_statement2208)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2210)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_labeled_statement2212)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -12570,7 +12570,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end labeled_statement\r
 \r
@@ -14553,7 +14553,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 67):\r
-                    return \r
+                    return\r
 \r
                 # C.g:558:2: ( ( statement )+ )\r
                 # C.g:558:4: ( statement )+\r
@@ -16231,7 +16231,7 @@ class CParser(Parser):
                         self.statement()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -16240,7 +16240,7 @@ class CParser(Parser):
 \r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         eee = EarlyExitException(95, self.input)\r
                         raise eee\r
@@ -16261,7 +16261,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end statement_list\r
 \r
@@ -16348,7 +16348,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 69):\r
-                    return \r
+                    return\r
 \r
                 # C.g:567:2: ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement )\r
                 alt98 = 2\r
@@ -16361,7 +16361,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("566:1: selection_statement : ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement );", 98, 0, self.input)\r
 \r
@@ -16371,18 +16371,18 @@ class CParser(Parser):
                     # C.g:567:4: 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )?\r
                     self.match(self.input, 108, self.FOLLOW_108_in_selection_statement2272)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2274)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_in_selection_statement2278)\r
                     e = self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_selection_statement2280)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
                         self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start, e.stop))\r
 \r
@@ -16390,7 +16390,7 @@ class CParser(Parser):
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:567:167: ( options {k=1; backtrack=false; } : 'else' statement )?\r
                     alt97 = 2\r
                     LA97_0 = self.input.LA(1)\r
@@ -16401,12 +16401,12 @@ class CParser(Parser):
                         # C.g:567:200: 'else' statement\r
                         self.match(self.input, 109, self.FOLLOW_109_in_selection_statement2299)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_statement_in_selection_statement2301)\r
                         self.statement()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -16416,23 +16416,23 @@ class CParser(Parser):
                     # C.g:568:4: 'switch' '(' expression ')' statement\r
                     self.match(self.input, 110, self.FOLLOW_110_in_selection_statement2308)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2310)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_in_selection_statement2312)\r
                     self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_selection_statement2314)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_selection_statement2316)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -16445,7 +16445,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end selection_statement\r
 \r
@@ -16461,7 +16461,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 70):\r
-                    return \r
+                    return\r
 \r
                 # C.g:572:2: ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement )\r
                 alt100 = 3\r
@@ -16475,7 +16475,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("571:1: iteration_statement : ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement );", 100, 0, self.input)\r
 \r
@@ -16485,23 +16485,23 @@ class CParser(Parser):
                     # C.g:572:4: 'while' '(' e= expression ')' statement\r
                     self.match(self.input, 111, self.FOLLOW_111_in_iteration_statement2327)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2329)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_in_iteration_statement2333)\r
                     e = self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2335)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_iteration_statement2337)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
                         self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start, e.stop))\r
 \r
@@ -16511,29 +16511,29 @@ class CParser(Parser):
                     # C.g:573:4: 'do' statement 'while' '(' e= expression ')' ';'\r
                     self.match(self.input, 112, self.FOLLOW_112_in_iteration_statement2344)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_iteration_statement2346)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 111, self.FOLLOW_111_in_iteration_statement2348)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2350)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_in_iteration_statement2354)\r
                     e = self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2356)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 25, self.FOLLOW_25_in_iteration_statement2358)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
                         self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start, e.stop))\r
 \r
@@ -16543,20 +16543,20 @@ class CParser(Parser):
                     # C.g:574:4: 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement\r
                     self.match(self.input, 113, self.FOLLOW_113_in_iteration_statement2365)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2367)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2369)\r
                     self.expression_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2373)\r
                     e = self.expression_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:574:58: ( expression )?\r
                     alt99 = 2\r
                     LA99_0 = self.input.LA(1)\r
@@ -16569,18 +16569,18 @@ class CParser(Parser):
                         self.expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
                     self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2378)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_iteration_statement2380)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
                         self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start, e.stop))\r
 \r
@@ -16596,7 +16596,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end iteration_statement\r
 \r
@@ -16609,7 +16609,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 71):\r
-                    return \r
+                    return\r
 \r
                 # C.g:578:2: ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' )\r
                 alt101 = 5\r
@@ -16630,7 +16630,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 4, self.input)\r
 \r
@@ -16639,7 +16639,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 0, self.input)\r
 \r
@@ -16649,58 +16649,58 @@ class CParser(Parser):
                     # C.g:578:4: 'goto' IDENTIFIER ';'\r
                     self.match(self.input, 114, self.FOLLOW_114_in_jump_statement2393)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_jump_statement2395)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2397)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt101 == 2:\r
                     # C.g:579:4: 'continue' ';'\r
                     self.match(self.input, 115, self.FOLLOW_115_in_jump_statement2402)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2404)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt101 == 3:\r
                     # C.g:580:4: 'break' ';'\r
                     self.match(self.input, 116, self.FOLLOW_116_in_jump_statement2409)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2411)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt101 == 4:\r
                     # C.g:581:4: 'return' ';'\r
                     self.match(self.input, 117, self.FOLLOW_117_in_jump_statement2416)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2418)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt101 == 5:\r
                     # C.g:582:4: 'return' expression ';'\r
                     self.match(self.input, 117, self.FOLLOW_117_in_jump_statement2423)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_in_jump_statement2425)\r
                     self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2427)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -16713,7 +16713,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end jump_statement\r
 \r
@@ -16725,7 +16725,7 @@ class CParser(Parser):
         self.declaration_specifiers()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred2\r
@@ -16856,7 +16856,7 @@ class CParser(Parser):
             self.declaration_specifiers()\r
             self.following.pop()\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -16864,7 +16864,7 @@ class CParser(Parser):
         self.declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         # C.g:119:41: ( declaration )*\r
         while True: #loop103\r
             alt103 = 2\r
@@ -16880,7 +16880,7 @@ class CParser(Parser):
                 self.declaration()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             else:\r
@@ -16889,7 +16889,7 @@ class CParser(Parser):
 \r
         self.match(self.input, 43, self.FOLLOW_43_in_synpred4108)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred4\r
@@ -16904,7 +16904,7 @@ class CParser(Parser):
         self.declaration()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred5\r
@@ -16919,7 +16919,7 @@ class CParser(Parser):
         self.declaration_specifiers()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred7\r
@@ -16934,7 +16934,7 @@ class CParser(Parser):
         self.declaration_specifiers()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred10\r
@@ -16949,7 +16949,7 @@ class CParser(Parser):
         self.type_specifier()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred14\r
@@ -16964,7 +16964,7 @@ class CParser(Parser):
         self.type_qualifier()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred15\r
@@ -16979,7 +16979,7 @@ class CParser(Parser):
         self.type_qualifier()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred33\r
@@ -16992,7 +16992,7 @@ class CParser(Parser):
         # C.g:225:5: IDENTIFIER ( type_qualifier )* declarator\r
         self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred34442)\r
         if self.failed:\r
-            return \r
+            return\r
         # C.g:225:16: ( type_qualifier )*\r
         while True: #loop106\r
             alt106 = 2\r
@@ -17027,7 +17027,7 @@ class CParser(Parser):
                 self.type_qualifier()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             else:\r
@@ -17038,7 +17038,7 @@ class CParser(Parser):
         self.declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred34\r
@@ -17053,7 +17053,7 @@ class CParser(Parser):
         self.type_qualifier()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred39\r
@@ -17068,7 +17068,7 @@ class CParser(Parser):
         self.type_specifier()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred40\r
@@ -17091,7 +17091,7 @@ class CParser(Parser):
             self.pointer()\r
             self.following.pop()\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17105,7 +17105,7 @@ class CParser(Parser):
             # C.g:297:14: 'EFIAPI'\r
             self.match(self.input, 58, self.FOLLOW_58_in_synpred66788)\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17119,7 +17119,7 @@ class CParser(Parser):
             # C.g:297:26: 'EFI_BOOTSERVICE'\r
             self.match(self.input, 59, self.FOLLOW_59_in_synpred66793)\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17133,7 +17133,7 @@ class CParser(Parser):
             # C.g:297:47: 'EFI_RUNTIMESERVICE'\r
             self.match(self.input, 60, self.FOLLOW_60_in_synpred66798)\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17141,7 +17141,7 @@ class CParser(Parser):
         self.direct_declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred66\r
@@ -17156,7 +17156,7 @@ class CParser(Parser):
         self.declarator_suffix()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred67\r
@@ -17169,7 +17169,7 @@ class CParser(Parser):
         # C.g:304:9: 'EFIAPI'\r
         self.match(self.input, 58, self.FOLLOW_58_in_synpred69830)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred69\r
@@ -17184,7 +17184,7 @@ class CParser(Parser):
         self.declarator_suffix()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred70\r
@@ -17197,15 +17197,15 @@ class CParser(Parser):
         # C.g:310:9: '(' parameter_type_list ')'\r
         self.match(self.input, 62, self.FOLLOW_62_in_synpred73878)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_parameter_type_list_in_synpred73880)\r
         self.parameter_type_list()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, 63, self.FOLLOW_63_in_synpred73882)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred73\r
@@ -17218,15 +17218,15 @@ class CParser(Parser):
         # C.g:311:9: '(' identifier_list ')'\r
         self.match(self.input, 62, self.FOLLOW_62_in_synpred74892)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_identifier_list_in_synpred74894)\r
         self.identifier_list()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, 63, self.FOLLOW_63_in_synpred74896)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred74\r
@@ -17241,7 +17241,7 @@ class CParser(Parser):
         self.type_qualifier()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred75\r
@@ -17256,7 +17256,7 @@ class CParser(Parser):
         self.pointer()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred76\r
@@ -17269,7 +17269,7 @@ class CParser(Parser):
         # C.g:316:4: '*' ( type_qualifier )+ ( pointer )?\r
         self.match(self.input, 66, self.FOLLOW_66_in_synpred77919)\r
         if self.failed:\r
-            return \r
+            return\r
         # C.g:316:8: ( type_qualifier )+\r
         cnt116 = 0\r
         while True: #loop116\r
@@ -17286,7 +17286,7 @@ class CParser(Parser):
                 self.type_qualifier()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             else:\r
@@ -17295,7 +17295,7 @@ class CParser(Parser):
 \r
                 if self.backtracking > 0:\r
                     self.failed = True\r
-                    return \r
+                    return\r
 \r
                 eee = EarlyExitException(116, self.input)\r
                 raise eee\r
@@ -17315,7 +17315,7 @@ class CParser(Parser):
             self.pointer()\r
             self.following.pop()\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17331,12 +17331,12 @@ class CParser(Parser):
         # C.g:317:4: '*' pointer\r
         self.match(self.input, 66, self.FOLLOW_66_in_synpred78930)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_pointer_in_synpred78932)\r
         self.pointer()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred78\r
@@ -17349,7 +17349,7 @@ class CParser(Parser):
         # C.g:326:32: 'OPTIONAL'\r
         self.match(self.input, 53, self.FOLLOW_53_in_synpred81977)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred81\r
@@ -17362,7 +17362,7 @@ class CParser(Parser):
         # C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration\r
         self.match(self.input, 27, self.FOLLOW_27_in_synpred82974)\r
         if self.failed:\r
-            return \r
+            return\r
         # C.g:326:31: ( 'OPTIONAL' )?\r
         alt119 = 2\r
         LA119_0 = self.input.LA(1)\r
@@ -17376,7 +17376,7 @@ class CParser(Parser):
             # C.g:326:32: 'OPTIONAL'\r
             self.match(self.input, 53, self.FOLLOW_53_in_synpred82977)\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17384,7 +17384,7 @@ class CParser(Parser):
         self.parameter_declaration()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred82\r
@@ -17399,7 +17399,7 @@ class CParser(Parser):
         self.declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred83\r
@@ -17414,7 +17414,7 @@ class CParser(Parser):
         self.abstract_declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred84\r
@@ -17429,7 +17429,7 @@ class CParser(Parser):
         self.declaration_specifiers()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         # C.g:330:27: ( declarator | abstract_declarator )*\r
         while True: #loop120\r
             alt120 = 3\r
@@ -17513,7 +17513,7 @@ class CParser(Parser):
                 self.declarator()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             elif alt120 == 2:\r
@@ -17522,7 +17522,7 @@ class CParser(Parser):
                 self.abstract_declarator()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             else:\r
@@ -17539,7 +17539,7 @@ class CParser(Parser):
             # C.g:330:62: 'OPTIONAL'\r
             self.match(self.input, 53, self.FOLLOW_53_in_synpred861004)\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17557,7 +17557,7 @@ class CParser(Parser):
         self.specifier_qualifier_list()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         # C.g:341:29: ( abstract_declarator )?\r
         alt122 = 2\r
         LA122_0 = self.input.LA(1)\r
@@ -17570,7 +17570,7 @@ class CParser(Parser):
             self.abstract_declarator()\r
             self.following.pop()\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17588,7 +17588,7 @@ class CParser(Parser):
         self.direct_abstract_declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred91\r
@@ -17601,15 +17601,15 @@ class CParser(Parser):
         # C.g:351:6: '(' abstract_declarator ')'\r
         self.match(self.input, 62, self.FOLLOW_62_in_synpred931086)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_abstract_declarator_in_synpred931088)\r
         self.abstract_declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, 63, self.FOLLOW_63_in_synpred931090)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred93\r
@@ -17624,7 +17624,7 @@ class CParser(Parser):
         self.abstract_declarator_suffix()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred94\r
@@ -17637,20 +17637,20 @@ class CParser(Parser):
         # C.g:386:4: '(' type_name ')' cast_expression\r
         self.match(self.input, 62, self.FOLLOW_62_in_synpred1091282)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_type_name_in_synpred1091284)\r
         self.type_name()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, 63, self.FOLLOW_63_in_synpred1091286)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_cast_expression_in_synpred1091288)\r
         self.cast_expression()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred109\r
@@ -17663,12 +17663,12 @@ class CParser(Parser):
         # C.g:395:4: 'sizeof' unary_expression\r
         self.match(self.input, 74, self.FOLLOW_74_in_synpred1141330)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_unary_expression_in_synpred1141332)\r
         self.unary_expression()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred114\r
@@ -17681,15 +17681,15 @@ class CParser(Parser):
         # C.g:409:13: '(' argument_expression_list ')'\r
         self.match(self.input, 62, self.FOLLOW_62_in_synpred1171420)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_argument_expression_list_in_synpred1171424)\r
         self.argument_expression_list()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, 63, self.FOLLOW_63_in_synpred1171428)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred117\r
@@ -17702,15 +17702,15 @@ class CParser(Parser):
         # C.g:410:13: '(' macro_parameter_list ')'\r
         self.match(self.input, 62, self.FOLLOW_62_in_synpred1181444)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_macro_parameter_list_in_synpred1181446)\r
         self.macro_parameter_list()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, 63, self.FOLLOW_63_in_synpred1181448)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred118\r
@@ -17723,10 +17723,10 @@ class CParser(Parser):
         # C.g:412:13: '*' IDENTIFIER\r
         self.match(self.input, 66, self.FOLLOW_66_in_synpred1201482)\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1201486)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred120\r
@@ -17739,7 +17739,7 @@ class CParser(Parser):
         # C.g:443:20: STRING_LITERAL\r
         self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1371683)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred137\r
@@ -17763,7 +17763,7 @@ class CParser(Parser):
                 # C.g:0:0: IDENTIFIER\r
                 self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1381680)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             else:\r
@@ -17784,7 +17784,7 @@ class CParser(Parser):
                 # C.g:0:0: STRING_LITERAL\r
                 self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1381683)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             else:\r
@@ -17793,7 +17793,7 @@ class CParser(Parser):
 \r
                 if self.backtracking > 0:\r
                     self.failed = True\r
-                    return \r
+                    return\r
 \r
                 eee = EarlyExitException(126, self.input)\r
                 raise eee\r
@@ -17815,17 +17815,17 @@ class CParser(Parser):
         self.lvalue()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_assignment_operator_in_synpred1421746)\r
         self.assignment_operator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_assignment_expression_in_synpred1421748)\r
         self.assignment_expression()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred142\r
@@ -17840,7 +17840,7 @@ class CParser(Parser):
         self.expression_statement()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred169\r
@@ -17855,7 +17855,7 @@ class CParser(Parser):
         self.macro_statement()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred173\r
@@ -17870,7 +17870,7 @@ class CParser(Parser):
         self.asm2_statement()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred174\r
@@ -17885,7 +17885,7 @@ class CParser(Parser):
         self.declaration()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred181\r
@@ -17900,7 +17900,7 @@ class CParser(Parser):
         self.statement_list()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred182\r
@@ -17915,7 +17915,7 @@ class CParser(Parser):
         self.declaration()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred186\r
@@ -17930,7 +17930,7 @@ class CParser(Parser):
         self.statement()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred188\r
@@ -18389,7 +18389,7 @@ class CParser(Parser):
 \r
 \r
 \r
\r
+\r
 \r
     FOLLOW_external_declaration_in_translation_unit74 = frozenset([1, 4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66])\r
     FOLLOW_function_definition_in_external_declaration113 = frozenset([1])\r
index ea739043e0bca88c58b52d2e5025941e938e15d5..540d9cb7edc742984ff72b69161fdd44f0366106 100644 (file)
@@ -563,17 +563,17 @@ class Check(object):
                         op = open(FullName).readlines()\r
                         FileLinesList = op\r
                         LineNo             = 0\r
-                        CurrentSection     = MODEL_UNKNOWN \r
+                        CurrentSection     = MODEL_UNKNOWN\r
                         HeaderSectionLines       = []\r
-                        HeaderCommentStart = False \r
+                        HeaderCommentStart = False\r
                         HeaderCommentEnd   = False\r
-                        \r
+\r
                         for Line in FileLinesList:\r
                             LineNo   = LineNo + 1\r
                             Line     = Line.strip()\r
                             if (LineNo < len(FileLinesList) - 1):\r
                                 NextLine = FileLinesList[LineNo].strip()\r
-            \r
+\r
                             #\r
                             # blank line\r
                             #\r
@@ -600,8 +600,8 @@ class Check(object):
                                     #\r
                                     HeaderSectionLines.append((Line, LineNo))\r
                                     HeaderCommentStart = True\r
-                                    continue        \r
-            \r
+                                    continue\r
+\r
                             #\r
                             # Collect Header content.\r
                             #\r
@@ -635,7 +635,7 @@ class Check(object):
                                 if EccGlobalData.gConfig.HeaderCheckFileCommentEnd == '1' or EccGlobalData.gConfig.HeaderCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
                                     EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0])\r
 \r
-                                     \r
+\r
 \r
     # Check whether the function headers are followed Doxygen special documentation blocks in section 2.3.5\r
     def DoxygenCheckFunctionHeader(self):\r
@@ -827,7 +827,7 @@ class Check(object):
                     for FilePath in FilePathList:\r
                         if not EccGlobalData.gException.IsException(ERROR_META_DATA_FILE_CHECK_LIBRARY_NAME_DUPLICATE, Record[1]):\r
                             EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_LIBRARY_NAME_DUPLICATE, OtherMsg="The Library Class [%s] is duplicated in '%s' line %s and line %s." % (Record[1], FilePath, Record[3], Record[4]), BelongsToTable='Dsc', BelongsToItem=Record[0])\r
-    \r
+\r
     # Check the header file in Include\Library directory whether be defined in the package DEC file.\r
     def MetaDataFileCheckLibraryDefinedInDec(self):\r
         if EccGlobalData.gConfig.MetaDataFileCheckLibraryDefinedInDec == '1' or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
@@ -842,9 +842,9 @@ class Check(object):
                 if not LibraryDec:\r
                     if not EccGlobalData.gException.IsException(ERROR_META_DATA_FILE_CHECK_LIBRARY_NOT_DEFINED, LibraryInInf):\r
                         EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_LIBRARY_NOT_DEFINED, \\r
-                                            OtherMsg="The Library Class [%s] in %s line is not defined in the associated package file." % (LibraryInInf, Line), \r
+                                            OtherMsg="The Library Class [%s] in %s line is not defined in the associated package file." % (LibraryInInf, Line),\r
                                             BelongsToTable='Inf', BelongsToItem=ID)\r
-    \r
+\r
     # Check whether an Inf file is specified in the FDF file, but not in the Dsc file, then the Inf file must be for a Binary module only\r
     def MetaDataFileCheckBinaryInfInFdf(self):\r
         if EccGlobalData.gConfig.MetaDataFileCheckBinaryInfInFdf == '1' or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
@@ -1244,7 +1244,7 @@ class Check(object):
                      group by A.ID\r
                      """ % (Table.Table, Table.Table, Model, Model)\r
         RecordSet = Table.Exec(SqlCommand)\r
-        for Record in RecordSet:     \r
+        for Record in RecordSet:\r
             if not EccGlobalData.gException.IsException(ErrorID, Record[2]):\r
                 EccGlobalData.gDb.TblReport.Insert(ErrorID, OtherMsg="The %s value [%s] is used more than one time" % (Name.upper(), Record[2]), BelongsToTable=Table.Table, BelongsToItem=Record[0])\r
 \r
index 3bf1c451502046768346ec93b3e98bf15245b629..b4fe9bed9613321d25117107a3c9e651146cf442 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # fragments of source file\r
 #\r
-#  Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -161,5 +161,5 @@ class FunctionCalling:
         self.FuncName = Name\r
         self.ParamList = Param\r
         self.StartPos = Begin\r
-        self.EndPos = End        \r
-        
\ No newline at end of file
+        self.EndPos = End\r
+\r
index 2efae2c7c1de9c0dfe92ba9fa9cfcc14cd385acc..b4f421342f60d0188a3ea8e559671f3feaf7f21a 100644 (file)
@@ -47,7 +47,7 @@ from ParserWarning import Warning
 T_CHAR_BACKSLASH, T_CHAR_DOUBLE_QUOTE, T_CHAR_SINGLE_QUOTE, T_CHAR_STAR, T_CHAR_HASH) = \\r
 (' ', '\0', '\r', '\t', '\n', '/', '\\', '\"', '\'', '*', '#')\r
 \r
-SEPERATOR_TUPLE = ('=', '|', ',', '{', '}') \r
+SEPERATOR_TUPLE = ('=', '|', ',', '{', '}')\r
 \r
 (T_COMMENT_TWO_SLASH, T_COMMENT_SLASH_STAR) = (0, 1)\r
 \r
@@ -59,7 +59,7 @@ SEPERATOR_TUPLE = ('=', '|', ',', '{', '}')
 #\r
 # GetNext*** procedures mean these procedures will get next token first, then make judgement.\r
 # Get*** procedures mean these procedures will make judgement on current token only.\r
-#        \r
+#\r
 class CodeFragmentCollector:\r
     ## The constructor\r
     #\r
@@ -89,7 +89,7 @@ class CodeFragmentCollector:
         SizeOfLastLine = NumberOfLines\r
         if NumberOfLines > 0:\r
             SizeOfLastLine = len(self.Profile.FileLinesList[-1])\r
-            \r
+\r
         if self.CurrentLineNumber == NumberOfLines and self.CurrentOffsetWithinLine >= SizeOfLastLine - 1:\r
             return True\r
         elif self.CurrentLineNumber > NumberOfLines:\r
@@ -111,7 +111,7 @@ class CodeFragmentCollector:
             return True\r
         else:\r
             return False\r
-    \r
+\r
     ## Rewind() method\r
     #\r
     #   Reset file data buffer to the initial state\r
@@ -121,7 +121,7 @@ class CodeFragmentCollector:
     def Rewind(self):\r
         self.CurrentLineNumber = 1\r
         self.CurrentOffsetWithinLine = 0\r
-    \r
+\r
     ## __UndoOneChar() method\r
     #\r
     #   Go back one char in the file buffer\r
@@ -129,9 +129,9 @@ class CodeFragmentCollector:
     #   @param  self        The object pointer\r
     #   @retval True        Successfully go back one char\r
     #   @retval False       Not able to go back one char as file beginning reached\r
-    #    \r
+    #\r
     def __UndoOneChar(self):\r
-        \r
+\r
         if self.CurrentLineNumber == 1 and self.CurrentOffsetWithinLine == 0:\r
             return False\r
         elif self.CurrentOffsetWithinLine == 0:\r
@@ -140,13 +140,13 @@ class CodeFragmentCollector:
         else:\r
             self.CurrentOffsetWithinLine -= 1\r
         return True\r
-        \r
+\r
     ## __GetOneChar() method\r
     #\r
     #   Move forward one char in the file buffer\r
     #\r
     #   @param  self        The object pointer\r
-    #  \r
+    #\r
     def __GetOneChar(self):\r
         if self.CurrentOffsetWithinLine == len(self.Profile.FileLinesList[self.CurrentLineNumber - 1]) - 1:\r
                 self.CurrentLineNumber += 1\r
@@ -160,13 +160,13 @@ class CodeFragmentCollector:
     #\r
     #   @param  self        The object pointer\r
     #   @retval Char        Current char\r
-    #  \r
+    #\r
     def __CurrentChar(self):\r
         CurrentChar = self.Profile.FileLinesList[self.CurrentLineNumber - 1][self.CurrentOffsetWithinLine]\r
 #        if CurrentChar > 255:\r
 #            raise Warning("Non-Ascii char found At Line %d, offset %d" % (self.CurrentLineNumber, self.CurrentOffsetWithinLine), self.FileName, self.CurrentLineNumber)\r
         return CurrentChar\r
-    \r
+\r
     ## __NextChar() method\r
     #\r
     #   Get the one char pass the char pointed to by the file buffer pointer\r
@@ -179,7 +179,7 @@ class CodeFragmentCollector:
             return self.Profile.FileLinesList[self.CurrentLineNumber][0]\r
         else:\r
             return self.Profile.FileLinesList[self.CurrentLineNumber - 1][self.CurrentOffsetWithinLine + 1]\r
-        \r
+\r
     ## __SetCurrentCharValue() method\r
     #\r
     #   Modify the value of current char\r
@@ -189,7 +189,7 @@ class CodeFragmentCollector:
     #\r
     def __SetCurrentCharValue(self, Value):\r
         self.Profile.FileLinesList[self.CurrentLineNumber - 1][self.CurrentOffsetWithinLine] = Value\r
-        \r
+\r
     ## __SetCharValue() method\r
     #\r
     #   Modify the value of current char\r
@@ -199,7 +199,7 @@ class CodeFragmentCollector:
     #\r
     def __SetCharValue(self, Line, Offset, Value):\r
         self.Profile.FileLinesList[Line - 1][Offset] = Value\r
-        \r
+\r
     ## __CurrentLine() method\r
     #\r
     #   Get the list that contains current line contents\r
@@ -209,7 +209,7 @@ class CodeFragmentCollector:
     #\r
     def __CurrentLine(self):\r
         return self.Profile.FileLinesList[self.CurrentLineNumber - 1]\r
-    \r
+\r
     ## __InsertComma() method\r
     #\r
     #   Insert ',' to replace PP\r
@@ -218,24 +218,24 @@ class CodeFragmentCollector:
     #   @retval List        current line contents\r
     #\r
     def __InsertComma(self, Line):\r
-        \r
-        \r
+\r
+\r
         if self.Profile.FileLinesList[Line - 1][0] != T_CHAR_HASH:\r
             BeforeHashPart = str(self.Profile.FileLinesList[Line - 1]).split(T_CHAR_HASH)[0]\r
             if BeforeHashPart.rstrip().endswith(T_CHAR_COMMA) or BeforeHashPart.rstrip().endswith(';'):\r
                 return\r
-        \r
+\r
         if Line - 2 >= 0 and str(self.Profile.FileLinesList[Line - 2]).rstrip().endswith(','):\r
             return\r
-        \r
+\r
         if Line - 2 >= 0 and str(self.Profile.FileLinesList[Line - 2]).rstrip().endswith(';'):\r
             return\r
-        \r
+\r
         if str(self.Profile.FileLinesList[Line]).lstrip().startswith(',') or str(self.Profile.FileLinesList[Line]).lstrip().startswith(';'):\r
             return\r
-        \r
+\r
         self.Profile.FileLinesList[Line - 1].insert(self.CurrentOffsetWithinLine, ',')\r
-        \r
+\r
     ## PreprocessFile() method\r
     #\r
     #   Preprocess file contents, replace comments with spaces.\r
@@ -244,7 +244,7 @@ class CodeFragmentCollector:
     #   !include statement should be expanded at the same FileLinesList[CurrentLineNumber - 1]\r
     #\r
     #   @param  self        The object pointer\r
-    #   \r
+    #\r
     def PreprocessFile(self):\r
 \r
         self.Rewind()\r
@@ -256,14 +256,14 @@ class CodeFragmentCollector:
         PPDirectiveObj = None\r
         # HashComment in quoted string " " is ignored.\r
         InString = False\r
-        InCharLiteral = False \r
-        \r
+        InCharLiteral = False\r
+\r
         self.Profile.FileLinesList = [list(s) for s in self.Profile.FileLinesListFromFile]\r
         while not self.__EndOfFile():\r
-            \r
+\r
             if not InComment and self.__CurrentChar() == T_CHAR_DOUBLE_QUOTE:\r
                 InString = not InString\r
-                \r
+\r
             if not InComment and self.__CurrentChar() == T_CHAR_SINGLE_QUOTE:\r
                 InCharLiteral = not InCharLiteral\r
             # meet new line, then no longer in a comment for // and '#'\r
@@ -274,9 +274,9 @@ class CodeFragmentCollector:
                         PPExtend = True\r
                     else:\r
                         PPExtend = False\r
-                        \r
+\r
                 EndLinePos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine)\r
-                \r
+\r
                 if InComment and DoubleSlashComment:\r
                     InComment = False\r
                     DoubleSlashComment = False\r
@@ -291,17 +291,17 @@ class CodeFragmentCollector:
                     PPDirectiveObj.EndPos = EndLinePos\r
                     FileProfile.PPDirectiveList.append(PPDirectiveObj)\r
                     PPDirectiveObj = None\r
-                \r
+\r
                 if InString or InCharLiteral:\r
                     CurrentLine = "".join(self.__CurrentLine())\r
                     if CurrentLine.rstrip(T_CHAR_LF).rstrip(T_CHAR_CR).endswith(T_CHAR_BACKSLASH):\r
                         SlashIndex = CurrentLine.rindex(T_CHAR_BACKSLASH)\r
                         self.__SetCharValue(self.CurrentLineNumber, SlashIndex, T_CHAR_SPACE)\r
-                \r
+\r
                 if InComment and not DoubleSlashComment and not HashComment:\r
                     CommentObj.Content += T_CHAR_LF\r
                 self.CurrentLineNumber += 1\r
-                self.CurrentOffsetWithinLine = 0    \r
+                self.CurrentOffsetWithinLine = 0\r
             # check for */ comment end\r
             elif InComment and not DoubleSlashComment and not HashComment and self.__CurrentChar() == T_CHAR_STAR and self.__NextChar() == T_CHAR_SLASH:\r
                 CommentObj.Content += self.__CurrentChar()\r
@@ -315,7 +315,7 @@ class CodeFragmentCollector:
                 self.__GetOneChar()\r
                 InComment = False\r
             # set comments to spaces\r
-            elif InComment:                   \r
+            elif InComment:\r
                 if HashComment:\r
                     # // follows hash PP directive\r
                     if self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_SLASH:\r
@@ -341,7 +341,7 @@ class CodeFragmentCollector:
             # check for '#' comment\r
             elif self.__CurrentChar() == T_CHAR_HASH and not InString and not InCharLiteral:\r
                 InComment = True\r
-                HashComment = True \r
+                HashComment = True\r
                 PPDirectiveObj = PP_Directive('', (self.CurrentLineNumber, self.CurrentOffsetWithinLine), None)\r
             # check for /* comment start\r
             elif self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_STAR:\r
@@ -355,9 +355,9 @@ class CodeFragmentCollector:
                 InComment = True\r
             else:\r
                 self.__GetOneChar()\r
-        \r
+\r
         EndLinePos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine)\r
-                \r
+\r
         if InComment and DoubleSlashComment:\r
             CommentObj.EndPos = EndLinePos\r
             FileProfile.CommentList.append(CommentObj)\r
@@ -378,14 +378,14 @@ class CodeFragmentCollector:
         PPDirectiveObj = None\r
         # HashComment in quoted string " " is ignored.\r
         InString = False\r
-        InCharLiteral = False \r
+        InCharLiteral = False\r
 \r
         self.Profile.FileLinesList = [list(s) for s in self.Profile.FileLinesListFromFile]\r
         while not self.__EndOfFile():\r
-            \r
+\r
             if not InComment and self.__CurrentChar() == T_CHAR_DOUBLE_QUOTE:\r
                 InString = not InString\r
-                \r
+\r
             if not InComment and self.__CurrentChar() == T_CHAR_SINGLE_QUOTE:\r
                 InCharLiteral = not InCharLiteral\r
             # meet new line, then no longer in a comment for // and '#'\r
@@ -396,9 +396,9 @@ class CodeFragmentCollector:
                         PPExtend = True\r
                     else:\r
                         PPExtend = False\r
-                        \r
+\r
                 EndLinePos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine)\r
-                \r
+\r
                 if InComment and DoubleSlashComment:\r
                     InComment = False\r
                     DoubleSlashComment = False\r
@@ -413,17 +413,17 @@ class CodeFragmentCollector:
                     PPDirectiveObj.EndPos = EndLinePos\r
                     FileProfile.PPDirectiveList.append(PPDirectiveObj)\r
                     PPDirectiveObj = None\r
-                \r
+\r
                 if InString or InCharLiteral:\r
                     CurrentLine = "".join(self.__CurrentLine())\r
                     if CurrentLine.rstrip(T_CHAR_LF).rstrip(T_CHAR_CR).endswith(T_CHAR_BACKSLASH):\r
                         SlashIndex = CurrentLine.rindex(T_CHAR_BACKSLASH)\r
                         self.__SetCharValue(self.CurrentLineNumber, SlashIndex, T_CHAR_SPACE)\r
-                \r
+\r
                 if InComment and not DoubleSlashComment and not HashComment:\r
                     CommentObj.Content += T_CHAR_LF\r
                 self.CurrentLineNumber += 1\r
-                self.CurrentOffsetWithinLine = 0    \r
+                self.CurrentOffsetWithinLine = 0\r
             # check for */ comment end\r
             elif InComment and not DoubleSlashComment and not HashComment and self.__CurrentChar() == T_CHAR_STAR and self.__NextChar() == T_CHAR_SLASH:\r
                 CommentObj.Content += self.__CurrentChar()\r
@@ -437,7 +437,7 @@ class CodeFragmentCollector:
                 self.__GetOneChar()\r
                 InComment = False\r
             # set comments to spaces\r
-            elif InComment:                   \r
+            elif InComment:\r
                 if HashComment:\r
                     # // follows hash PP directive\r
                     if self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_SLASH:\r
@@ -463,7 +463,7 @@ class CodeFragmentCollector:
             # check for '#' comment\r
             elif self.__CurrentChar() == T_CHAR_HASH and not InString and not InCharLiteral:\r
                 InComment = True\r
-                HashComment = True \r
+                HashComment = True\r
                 PPDirectiveObj = PP_Directive('', (self.CurrentLineNumber, self.CurrentOffsetWithinLine), None)\r
             # check for /* comment start\r
             elif self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_STAR:\r
@@ -479,7 +479,7 @@ class CodeFragmentCollector:
                 self.__GetOneChar()\r
 \r
         EndLinePos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine)\r
-                \r
+\r
         if InComment and DoubleSlashComment:\r
             CommentObj.EndPos = EndLinePos\r
             FileProfile.CommentList.append(CommentObj)\r
@@ -507,7 +507,7 @@ class CodeFragmentCollector:
         tStream = antlr3.CommonTokenStream(lexer)\r
         parser = CParser(tStream)\r
         parser.translation_unit()\r
-        \r
+\r
     def ParseFileWithClearedPPDirective(self):\r
         self.PreprocessFileWithClear()\r
         # restore from ListOfList to ListOfString\r
@@ -520,7 +520,7 @@ class CodeFragmentCollector:
         tStream = antlr3.CommonTokenStream(lexer)\r
         parser = CParser(tStream)\r
         parser.translation_unit()\r
-        \r
+\r
     def CleanFileProfileBuffer(self):\r
         FileProfile.CommentList = []\r
         FileProfile.PPDirectiveList = []\r
@@ -531,61 +531,61 @@ class CodeFragmentCollector:
         FileProfile.StructUnionDefinitionList = []\r
         FileProfile.TypedefDefinitionList = []\r
         FileProfile.FunctionCallingList = []\r
-        \r
+\r
     def PrintFragments(self):\r
-        \r
+\r
         print('################# ' + self.FileName + '#####################')\r
-        \r
+\r
         print('/****************************************/')\r
         print('/*************** COMMENTS ***************/')\r
         print('/****************************************/')\r
         for comment in FileProfile.CommentList:\r
             print(str(comment.StartPos) + comment.Content)\r
-        \r
+\r
         print('/****************************************/')\r
         print('/********* PREPROCESS DIRECTIVES ********/')\r
         print('/****************************************/')\r
         for pp in FileProfile.PPDirectiveList:\r
             print(str(pp.StartPos) + pp.Content)\r
-        \r
+\r
         print('/****************************************/')\r
         print('/********* VARIABLE DECLARATIONS ********/')\r
         print('/****************************************/')\r
         for var in FileProfile.VariableDeclarationList:\r
             print(str(var.StartPos) + var.Modifier + ' '+ var.Declarator)\r
-            \r
+\r
         print('/****************************************/')\r
         print('/********* FUNCTION DEFINITIONS *********/')\r
         print('/****************************************/')\r
         for func in FileProfile.FunctionDefinitionList:\r
             print(str(func.StartPos) + func.Modifier + ' '+ func.Declarator + ' ' + str(func.NamePos))\r
-            \r
+\r
         print('/****************************************/')\r
         print('/************ ENUMERATIONS **************/')\r
         print('/****************************************/')\r
         for enum in FileProfile.EnumerationDefinitionList:\r
             print(str(enum.StartPos) + enum.Content)\r
-        \r
+\r
         print('/****************************************/')\r
         print('/*********** STRUCTS/UNIONS *************/')\r
         print('/****************************************/')\r
         for su in FileProfile.StructUnionDefinitionList:\r
             print(str(su.StartPos) + su.Content)\r
-            \r
+\r
         print('/****************************************/')\r
         print('/********* PREDICATE EXPRESSIONS ********/')\r
         print('/****************************************/')\r
         for predexp in FileProfile.PredicateExpressionList:\r
             print(str(predexp.StartPos) + predexp.Content)\r
-        \r
+\r
         print('/****************************************/')\r
         print('/************** TYPEDEFS ****************/')\r
         print('/****************************************/')\r
         for typedef in FileProfile.TypedefDefinitionList:\r
             print(str(typedef.StartPos) + typedef.ToType)\r
-        \r
+\r
 if __name__ == "__main__":\r
-    \r
+\r
     collector = CodeFragmentCollector(sys.argv[1])\r
     collector.PreprocessFile()\r
     print("For Test.")\r
index 4711bbd54fdccffbc37f5648eb000240853eb951..29a1220761f139429eca14ef686fdbcf20542e51 100644 (file)
@@ -215,7 +215,7 @@ class Configuration(object):
         self.HeaderCheckCFileCommentReferenceFormat = 1\r
         # Check whether C File header Comment have the License immediately after the ""Copyright"" line\r
         self.HeaderCheckCFileCommentLicenseFormat = 1\r
-  \r
+\r
         ## C Function Layout Checking\r
         self.CFunctionLayoutCheckAll = 0\r
 \r
@@ -352,7 +352,7 @@ class Configuration(object):
         self.MetaDataFileCheckModuleFilePpiFormat = 1\r
         # Check Pcd Format in INF files\r
         self.MetaDataFileCheckModuleFilePcdFormat = 1\r
-        \r
+\r
         # Check UNI file\r
         self.UniCheckAll = 0\r
         # Check INF or DEC file whether defined the localized information in the associated UNI file.\r
@@ -374,16 +374,16 @@ class Configuration(object):
 \r
         # The directory listed here will not be parsed, split with ','\r
         self.SkipDirList = []\r
-        \r
+\r
         # The file listed here will not be parsed, split with ','\r
         self.SkipFileList = []\r
 \r
         # A list for binary file ext name\r
         self.BinaryExtList = []\r
-        \r
+\r
         # A list for only scanned folders\r
         self.ScanOnlyDirList = []\r
-        \r
+\r
         # A list for Copyright format\r
         self.Copyright = []\r
 \r
index e78d70372e36ce354be7b49f45de69d3410a5e8a..ccd563a4660e87f9da6b9a131c37f855b7134d4a 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to be the main entrance of ECC tool\r
 #\r
-# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -51,7 +51,7 @@ class Ecc(object):
         # Version and Copyright\r
         self.VersionNumber = ("1.0" + " Build " + gBUILD_VERSION)\r
         self.Version = "%prog Version " + self.VersionNumber\r
-        self.Copyright = "Copyright (c) 2009 - 2016, Intel Corporation  All rights reserved."\r
+        self.Copyright = "Copyright (c) 2009 - 2018, Intel Corporation  All rights reserved."\r
 \r
         self.InitDefaultConfigIni()\r
         self.OutputFile = 'output.txt'\r
@@ -66,17 +66,17 @@ class Ecc(object):
         # Parse the options and args\r
         self.ParseOption()\r
         EdkLogger.info(time.strftime("%H:%M:%S, %b.%d %Y ", time.localtime()) + "[00:00]" + "\n")\r
-        \r
+\r
         #\r
         # Check EFI_SOURCE (Edk build convention). EDK_SOURCE will always point to ECP\r
         #\r
         WorkspaceDir = os.path.normcase(os.path.normpath(os.environ["WORKSPACE"]))\r
         os.environ["WORKSPACE"] = WorkspaceDir\r
-        \r
+\r
         # set multiple workspace\r
         PackagesPath = os.getenv("PACKAGES_PATH")\r
         mws.setWs(WorkspaceDir, PackagesPath)\r
-        \r
+\r
         if "ECP_SOURCE" not in os.environ:\r
             os.environ["ECP_SOURCE"] = mws.join(WorkspaceDir, GlobalData.gEdkCompatibilityPkg)\r
         if "EFI_SOURCE" not in os.environ:\r
@@ -90,11 +90,11 @@ class Ecc(object):
         EfiSourceDir = os.path.normcase(os.path.normpath(os.environ["EFI_SOURCE"]))\r
         EdkSourceDir = os.path.normcase(os.path.normpath(os.environ["EDK_SOURCE"]))\r
         EcpSourceDir = os.path.normcase(os.path.normpath(os.environ["ECP_SOURCE"]))\r
-        \r
+\r
         os.environ["EFI_SOURCE"] = EfiSourceDir\r
         os.environ["EDK_SOURCE"] = EdkSourceDir\r
         os.environ["ECP_SOURCE"] = EcpSourceDir\r
-        \r
+\r
         GlobalData.gWorkspace = WorkspaceDir\r
         GlobalData.gEfiSource = EfiSourceDir\r
         GlobalData.gEdkSource = EdkSourceDir\r
@@ -104,7 +104,7 @@ class Ecc(object):
         GlobalData.gGlobalDefines["EFI_SOURCE"] = EfiSourceDir\r
         GlobalData.gGlobalDefines["EDK_SOURCE"] = EdkSourceDir\r
         GlobalData.gGlobalDefines["ECP_SOURCE"] = EcpSourceDir\r
-        \r
+\r
         EdkLogger.info("Loading ECC configuration ... done")\r
         # Generate checkpoints list\r
         EccGlobalData.gConfig = Configuration(self.ConfigFile)\r
@@ -120,11 +120,11 @@ class Ecc(object):
         # Get files real name in workspace dir\r
         #\r
         GlobalData.gAllFiles = DirCache(GlobalData.gWorkspace)\r
-         \r
+\r
         # Build ECC database\r
 #         self.BuildDatabase()\r
         self.DetectOnlyScanDirs()\r
-        \r
+\r
         # Start to check\r
         self.Check()\r
 \r
@@ -160,8 +160,8 @@ class Ecc(object):
                 EdkLogger.error("ECC", BuildToolError.OPTION_VALUE_INVALID, ExtraData="Use -f option need to fill specific folders in config.ini file")\r
         else:\r
             self.BuildDatabase()\r
-            \r
-    \r
+\r
+\r
     ## BuildDatabase\r
     #\r
     # Build the database for target\r
@@ -172,7 +172,7 @@ class Ecc(object):
         EccGlobalData.gDb.TblReport.Create()\r
 \r
         # Build database\r
-        if self.IsInit:            \r
+        if self.IsInit:\r
             if self.ScanMetaData:\r
                 EdkLogger.quiet("Building database for Meta Data File ...")\r
                 self.BuildMetaDataFileDatabase(SpeciDirs)\r
@@ -198,7 +198,7 @@ class Ecc(object):
         if SpecificDirs is None:\r
             ScanFolders.append(EccGlobalData.gTarget)\r
         else:\r
-            for specificDir in SpecificDirs:    \r
+            for specificDir in SpecificDirs:\r
                 ScanFolders.append(os.path.join(EccGlobalData.gTarget, specificDir))\r
         EdkLogger.quiet("Building database for meta data files ...")\r
         Op = open(EccGlobalData.gConfig.MetaDataFileCheckPathOfGenerateFileList, 'w+')\r
@@ -219,7 +219,7 @@ class Ecc(object):
                             # symlinks to directories are treated as directories\r
                             Dirs.remove(Dir)\r
                             Dirs.append(Dirname)\r
-    \r
+\r
                 for File in Files:\r
                     if len(File) > 4 and File[-4:].upper() == ".DEC":\r
                         Filename = os.path.normpath(os.path.join(Root, File))\r
index c0b00a4265d69beaf91a64c4afbf3fb909d0faed..79d0de680c66aeb9b00b9893c367ce5bfbc26670 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to save global datas used by ECC tool\r
 #\r
-# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -24,4 +24,4 @@ gIdentifierTableList = []
 gCFileList = []\r
 gHFileList = []\r
 gUFileList = []\r
-gException = None
\ No newline at end of file
+gException = None\r
index bde41c3a4b570931d9b2cc2336b483d1800c5b75..0498a503d774484a96abc80a04c336e1675a44a9 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to parse exception items found by ECC tool\r
 #\r
-# Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -24,12 +24,12 @@ class ExceptionXml(object):
         self.KeyWord = ''\r
         self.ErrorID = ''\r
         self.FilePath = ''\r
-        \r
+\r
     def FromXml(self, Item, Key):\r
         self.KeyWord = XmlElement(Item, '%s/KeyWord' % Key)\r
         self.ErrorID = XmlElement(Item, '%s/ErrorID' % Key)\r
         self.FilePath = os.path.normpath(XmlElement(Item, '%s/FilePath' % Key))\r
-        \r
+\r
     def __str__(self):\r
         return 'ErrorID = %s KeyWord = %s FilePath = %s' %(self.ErrorID, self.KeyWord, self.FilePath)\r
 \r
@@ -37,22 +37,22 @@ class ExceptionXml(object):
 class ExceptionListXml(object):\r
     def __init__(self):\r
         self.List = []\r
-    \r
+\r
     def FromXmlFile(self, FilePath):\r
         XmlContent = XmlParseFile(FilePath)\r
         for Item in XmlList(XmlContent, '/ExceptionList/Exception'):\r
             Exp = ExceptionXml()\r
             Exp.FromXml(Item, 'Exception')\r
             self.List.append(Exp)\r
-    \r
+\r
     def ToList(self):\r
         RtnList = []\r
         for Item in self.List:\r
             #RtnList.append((Item.ErrorID, Item.KeyWord, Item.FilePath))\r
             RtnList.append((Item.ErrorID, Item.KeyWord))\r
-    \r
+\r
         return RtnList\r
-        \r
+\r
     def __str__(self):\r
         RtnStr = ''\r
         if self.List:\r
@@ -71,7 +71,7 @@ class ExceptionCheck(object):
         if FilePath and os.path.isfile(FilePath):\r
             self.ExceptionListXml.FromXmlFile(FilePath)\r
             self.ExceptionList = self.ExceptionListXml.ToList()\r
-    \r
+\r
     def IsException(self, ErrorID, KeyWord, FileID=-1):\r
         if (str(ErrorID), KeyWord.replace('\r\n', '\n')) in self.ExceptionList:\r
             return True\r
index f31d37ff9683c9865215fb1c4657639134016350..a071fd020eb4c747b4fab267693acfdb1d6b1180 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # fragments of source file\r
 #\r
-#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -36,7 +36,7 @@ FunctionCallingList = []
 # May raise Exception when opening file.\r
 #\r
 class FileProfile :\r
-    \r
+\r
     ## The constructor\r
     #\r
     #   @param  self        The object pointer\r
@@ -54,5 +54,5 @@ class FileProfile :
 \r
         except IOError:\r
             raise Warning("Error when opening file %s" % FileName)\r
-        \r
-        
\ No newline at end of file
+\r
+\r
index 82ede3eb330c93dff68c2ca9692f6f47fb0e2899..6060d67581be752e3cfe38ea5b54d00ec37146d5 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to define common parser functions for meta-data\r
 #\r
-# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -87,16 +87,16 @@ def GetTableList(FileModelList, Table, Db):
 # @param FileName:      FileName of the comment\r
 #\r
 def ParseHeaderCommentSection(CommentList, FileName = None):\r
-    \r
+\r
     Abstract = ''\r
     Description = ''\r
     Copyright = ''\r
     License = ''\r
     EndOfLine = "\n"\r
     STR_HEADER_COMMENT_START = "@file"\r
-    \r
+\r
     #\r
-    # used to indicate the state of processing header comment section of dec, \r
+    # used to indicate the state of processing header comment section of dec,\r
     # inf files\r
     #\r
     HEADER_COMMENT_NOT_STARTED = -1\r
@@ -117,11 +117,11 @@ def ParseHeaderCommentSection(CommentList, FileName = None):
         if _IsCopyrightLine(Line):\r
             Last = Index\r
             break\r
-    \r
+\r
     for Item in CommentList:\r
         Line = Item[0]\r
         LineNo = Item[1]\r
-        \r
+\r
         if not Line.startswith('#') and Line:\r
             SqlStatement = """ select ID from File where FullPath like '%s'""" % FileName\r
             ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement)\r
@@ -131,14 +131,14 @@ def ParseHeaderCommentSection(CommentList, FileName = None):
         Comment = CleanString2(Line)[1]\r
         Comment = Comment.strip()\r
         #\r
-        # if there are blank lines between License or Description, keep them as they would be \r
+        # if there are blank lines between License or Description, keep them as they would be\r
         # indication of different block; or in the position that Abstract should be, also keep it\r
         # as it indicates that no abstract\r
         #\r
         if not Comment and HeaderCommentStage not in [HEADER_COMMENT_LICENSE, \\r
                                                       HEADER_COMMENT_DESCRIPTION, HEADER_COMMENT_ABSTRACT]:\r
             continue\r
-        \r
+\r
         if HeaderCommentStage == HEADER_COMMENT_NOT_STARTED:\r
             if Comment.startswith(STR_HEADER_COMMENT_START):\r
                 HeaderCommentStage = HEADER_COMMENT_ABSTRACT\r
@@ -152,39 +152,39 @@ def ParseHeaderCommentSection(CommentList, FileName = None):
                 if not Comment:\r
                     Abstract = ''\r
                     HeaderCommentStage = HEADER_COMMENT_DESCRIPTION\r
-                elif _IsCopyrightLine(Comment):                    \r
+                elif _IsCopyrightLine(Comment):\r
                     Copyright += Comment + EndOfLine\r
                     HeaderCommentStage = HEADER_COMMENT_COPYRIGHT\r
-                else:                    \r
+                else:\r
                     Abstract += Comment + EndOfLine\r
                     HeaderCommentStage = HEADER_COMMENT_DESCRIPTION\r
             elif HeaderCommentStage == HEADER_COMMENT_DESCRIPTION:\r
                 #\r
                 # in case there is no description\r
-                #                \r
-                if _IsCopyrightLine(Comment):                    \r
+                #\r
+                if _IsCopyrightLine(Comment):\r
                     Copyright += Comment + EndOfLine\r
                     HeaderCommentStage = HEADER_COMMENT_COPYRIGHT\r
                 else:\r
-                    Description += Comment + EndOfLine                \r
+                    Description += Comment + EndOfLine\r
             elif HeaderCommentStage == HEADER_COMMENT_COPYRIGHT:\r
-                if _IsCopyrightLine(Comment):                    \r
+                if _IsCopyrightLine(Comment):\r
                     Copyright += Comment + EndOfLine\r
                 else:\r
                     #\r
                     # Contents after copyright line are license, those non-copyright lines in between\r
-                    # copyright line will be discarded \r
+                    # copyright line will be discarded\r
                     #\r
                     if LineNo > Last:\r
                         if License:\r
                             License += EndOfLine\r
                         License += Comment + EndOfLine\r
-                        HeaderCommentStage = HEADER_COMMENT_LICENSE                \r
+                        HeaderCommentStage = HEADER_COMMENT_LICENSE\r
             else:\r
                 if not Comment and not License:\r
                     continue\r
                 License += Comment + EndOfLine\r
-    \r
+\r
     if not Copyright.strip():\r
         SqlStatement = """ select ID from File where FullPath like '%s'""" % FileName\r
         ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement)\r
@@ -198,19 +198,19 @@ def ParseHeaderCommentSection(CommentList, FileName = None):
         for Result in ResultSet:\r
             Msg = 'Header comment section must have license information'\r
             EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0])\r
-                       \r
+\r
     if not Abstract.strip() or Abstract.find('Component description file') > -1:\r
         SqlStatement = """ select ID from File where FullPath like '%s'""" % FileName\r
         ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement)\r
         for Result in ResultSet:\r
             Msg = 'Header comment section must have Abstract information.'\r
             EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0])\r
-                     \r
+\r
     return Abstract.strip(), Description.strip(), Copyright.strip(), License.strip()\r
 \r
 ## _IsCopyrightLine\r
-# check whether current line is copyright line, the criteria is whether there is case insensitive keyword "Copyright" \r
-# followed by zero or more white space characters followed by a "(" character \r
+# check whether current line is copyright line, the criteria is whether there is case insensitive keyword "Copyright"\r
+# followed by zero or more white space characters followed by a "(" character\r
 #\r
 # @param LineContent:  the line need to be checked\r
 # @return: True if current line is copyright line, False else\r
@@ -218,11 +218,11 @@ def ParseHeaderCommentSection(CommentList, FileName = None):
 def _IsCopyrightLine (LineContent):\r
     LineContent = LineContent.upper()\r
     Result = False\r
-    \r
+\r
     ReIsCopyrightRe = re.compile(r"""(^|\s)COPYRIGHT *\(""", re.DOTALL)\r
     if ReIsCopyrightRe.search(LineContent):\r
         Result = True\r
-        \r
+\r
     return Result\r
 \r
 \r
@@ -232,7 +232,7 @@ def _IsCopyrightLine (LineContent):
 # Remove spaces\r
 #\r
 # @param Line:              The string to be cleaned\r
-# @param CommentCharacter:  Comment char, used to ignore comment content, \r
+# @param CommentCharacter:  Comment char, used to ignore comment content,\r
 #                           default is DataType.TAB_COMMENT_SPLIT\r
 #\r
 def CleanString2(Line, CommentCharacter='#', AllowCppStyleComment=False):\r
index a41223f285fffcd39d0f1d4e9125a787ca24abcf..111a25ed92603fd988ef63895d786fda3d93ad81 100644 (file)
@@ -92,7 +92,7 @@ def ParseMacro(Parser):
         elif (Name in self._FileLocalMacros) and (self._FileLocalMacros[Name] != Value):\r
             EdkLogger.error('Parser', FORMAT_INVALID, "EDK_GLOBAL defined a macro with the same name and different value as one defined by 'DEFINE'",\r
                             ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex+1)\r
-            \r
+\r
         self._ValueList = [Type, Name, Value]\r
 \r
     return MacroParser\r
@@ -334,7 +334,7 @@ class MetaFileParser(object):
 \r
         self._ValueList = [ReplaceMacro(Value, self._Macros) for Value in self._ValueList]\r
         Name, Value = self._ValueList[1], self._ValueList[2]\r
-        # Sometimes, we need to make differences between EDK and EDK2 modules \r
+        # Sometimes, we need to make differences between EDK and EDK2 modules\r
         if Name == 'INF_VERSION':\r
             try:\r
                 self._Version = int(Value, 0)\r
@@ -354,7 +354,7 @@ class MetaFileParser(object):
             UniFile = os.path.join(os.path.dirname(self.MetaFile), Value)\r
             if os.path.exists(UniFile):\r
                 self._UniObj = UniParser(UniFile, IsExtraUni=False, IsModuleUni=False)\r
-        \r
+\r
         if isinstance(self, InfParser) and self._Version < 0x00010005:\r
             # EDK module allows using defines as macros\r
             self._FileLocalMacros[Name] = Value\r
@@ -390,7 +390,7 @@ class MetaFileParser(object):
         return Macros\r
 \r
 \r
-    ## Get section Macros that are applicable to current line, which may come from other sections \r
+    ## Get section Macros that are applicable to current line, which may come from other sections\r
     ## that share the same name while scope is wider\r
     def _GetApplicableSectionMacro(self):\r
         Macros = {}\r
@@ -473,7 +473,7 @@ class InfParser(MetaFileParser):
             self.FileID = FileID\r
         else:\r
             self.FileID = self.TblFile.InsertFile(Filename, MODEL_FILE_INF)\r
-            \r
+\r
         # parse the file line by line\r
         IsFindBlockComment = False\r
 \r
@@ -591,7 +591,7 @@ class InfParser(MetaFileParser):
                             )\r
             Usage = ''\r
         if IsFindBlockComment:\r
-            EdkLogger.error("Parser", FORMAT_INVALID, "Open block comments (starting with /*) are expected to end with */", \r
+            EdkLogger.error("Parser", FORMAT_INVALID, "Open block comments (starting with /*) are expected to end with */",\r
                             File=self.MetaFile)\r
         self._Done()\r
 \r
@@ -818,7 +818,7 @@ class DscParser(MetaFileParser):
         #  the owner item\r
         #\r
         self._IdMapping = {-1:-1}\r
-        \r
+\r
         self.TblFile = EccGlobalData.gDb.TblFile\r
         self.FileID = -1\r
 \r
@@ -838,8 +838,8 @@ class DscParser(MetaFileParser):
             self.FileID = FileID\r
         else:\r
             self.FileID = self.TblFile.InsertFile(Filename, MODEL_FILE_DSC)\r
-        \r
-        \r
+\r
+\r
         for Index in range(0, len(Content)):\r
             Line = CleanString(Content[Index])\r
             # skip empty line\r
@@ -850,7 +850,7 @@ class DscParser(MetaFileParser):
             self._LineIndex = Index\r
             if self._InSubsection and self._Owner[-1] == -1:\r
                 self._Owner.append(self._LastItem)\r
-            \r
+\r
             # section header\r
             if Line[0] == TAB_SECTION_START and Line[-1] == TAB_SECTION_END:\r
                 self._SectionType = MODEL_META_DATA_SECTION_HEADER\r
@@ -960,7 +960,7 @@ class DscParser(MetaFileParser):
         elif self._From > 0:\r
             EdkLogger.error('Parser', FORMAT_INVALID,\r
                             "No '!include' allowed in included file",\r
-                            ExtraData=self._CurrentLine, File=self.MetaFile, \r
+                            ExtraData=self._CurrentLine, File=self.MetaFile,\r
                             Line=self._LineIndex+1)\r
 \r
         #\r
@@ -1154,7 +1154,7 @@ class DscParser(MetaFileParser):
             MODEL_META_DATA_USER_EXTENSION                  :   self._Skip,\r
             MODEL_META_DATA_CONDITIONAL_STATEMENT_ERROR     :   self._Skip,\r
         }\r
-        \r
+\r
         self._RawTable = self._Table\r
         self._Table = MetaFileStorage(self._RawTable.Cur, self.MetaFile, MODEL_FILE_DSC, True)\r
         self._DirectiveStack = []\r
@@ -1184,7 +1184,7 @@ class DscParser(MetaFileParser):
             try:\r
                 Processer[self._ItemType]()\r
             except EvaluationException as Excpt:\r
-                # \r
+                #\r
                 # Only catch expression evaluation error here. We need to report\r
                 # the precise number of line on which the error occurred\r
                 #\r
@@ -1194,11 +1194,11 @@ class DscParser(MetaFileParser):
 #                                 Line=self._LineIndex+1)\r
             except MacroException as Excpt:\r
                 EdkLogger.error('Parser', FORMAT_INVALID, str(Excpt),\r
-                                File=self._FileWithError, ExtraData=' '.join(self._ValueList), \r
+                                File=self._FileWithError, ExtraData=' '.join(self._ValueList),\r
                                 Line=self._LineIndex+1)\r
 \r
             if self._ValueList is None:\r
-                continue \r
+                continue\r
 \r
             NewOwner = self._IdMapping.get(Owner, -1)\r
             self._Enabled = int((not self._DirectiveEvalStack) or (False not in self._DirectiveEvalStack))\r
@@ -1221,7 +1221,7 @@ class DscParser(MetaFileParser):
             self._IdMapping[Id] = self._LastItem\r
 \r
         RecordList = self._Table.GetAll()\r
-        \r
+\r
         self._RawTable.Drop()\r
         self._Table.Drop()\r
         for Record in RecordList:\r
@@ -1255,7 +1255,7 @@ class DscParser(MetaFileParser):
             # Don't use PCD with different values.\r
             if Name in self._Symbols and self._Symbols[Name] != Value:\r
                 self._Symbols.pop(Name)\r
-                continue \r
+                continue\r
             self._Symbols[Name] = Value\r
 \r
         Records = self._RawTable.Query(MODEL_PCD_FIXED_AT_BUILD, BelongsToItem=-1.0)\r
@@ -1263,12 +1263,12 @@ class DscParser(MetaFileParser):
             Value, DatumType, MaxDatumSize = AnalyzePcdData(Value)\r
             # Only use PCD whose value is straitforward (no macro and PCD)\r
             if self.SymbolPattern.findall(Value):\r
-                continue \r
+                continue\r
             Name = TokenSpaceGuid+'.'+PcdName\r
             # Don't use PCD with different values.\r
             if Name in self._Symbols and self._Symbols[Name] != Value:\r
                 self._Symbols.pop(Name)\r
-                continue \r
+                continue\r
             self._Symbols[Name] = Value\r
 \r
     def __ProcessDefine(self):\r
@@ -1288,13 +1288,13 @@ class DscParser(MetaFileParser):
                 SectionLocalMacros[Name] = Value\r
         elif self._ItemType == MODEL_META_DATA_GLOBAL_DEFINE:\r
             GlobalData.gEdkGlobal[Name] = Value\r
-        \r
+\r
         #\r
         # Keyword in [Defines] section can be used as Macros\r
         #\r
         if (self._ItemType == MODEL_META_DATA_HEADER) and (self._SectionType == MODEL_META_DATA_HEADER):\r
             self._FileLocalMacros[Name] = Value\r
-            \r
+\r
         self._ValueList = [Type, Name, Value]\r
 \r
     def __ProcessDirective(self):\r
@@ -1309,12 +1309,12 @@ class DscParser(MetaFileParser):
                 EdkLogger.debug(EdkLogger.DEBUG_5, str(Exc), self._ValueList[1])\r
                 Result = False\r
             except WrnExpression as Excpt:\r
-                # \r
+                #\r
                 # Catch expression evaluation warning here. We need to report\r
                 # the precise number of line and return the evaluation result\r
                 #\r
                 EdkLogger.warn('Parser', "Suspicious expression: %s" % str(Excpt),\r
-                                File=self._FileWithError, ExtraData=' '.join(self._ValueList), \r
+                                File=self._FileWithError, ExtraData=' '.join(self._ValueList),\r
                                 Line=self._LineIndex+1)\r
                 Result = Excpt.result\r
             except BadExpression as Exc:\r
@@ -1365,14 +1365,14 @@ class DscParser(MetaFileParser):
             #\r
             elif "ECP_SOURCE" in GlobalData.gCommandLineDefines.keys():\r
                 __IncludeMacros['ECP_SOURCE'] = GlobalData.gCommandLineDefines['ECP_SOURCE']\r
-                \r
+\r
             __IncludeMacros['EFI_SOURCE'] = GlobalData.gGlobalDefines['EFI_SOURCE']\r
             __IncludeMacros['EDK_SOURCE'] = GlobalData.gGlobalDefines['EDK_SOURCE']\r
             #\r
-            # Allow using MACROs comes from [Defines] section to keep compatible. \r
+            # Allow using MACROs comes from [Defines] section to keep compatible.\r
             #\r
             __IncludeMacros.update(self._Macros)\r
-            \r
+\r
             IncludedFile = NormPath(ReplaceMacro(self._ValueList[1], __IncludeMacros, RaiseError=True))\r
             #\r
             # First search the include file under the same directory as DSC file\r
@@ -1386,14 +1386,14 @@ class DscParser(MetaFileParser):
                 IncludedFile1 = PathClass(IncludedFile, GlobalData.gWorkspace)\r
                 ErrorCode, ErrorInfo2 = IncludedFile1.Validate()\r
                 if ErrorCode != 0:\r
-                    EdkLogger.error('parser', ErrorCode, File=self._FileWithError, \r
+                    EdkLogger.error('parser', ErrorCode, File=self._FileWithError,\r
                                     Line=self._LineIndex+1, ExtraData=ErrorInfo1 + "\n"+ ErrorInfo2)\r
 \r
             self._FileWithError = IncludedFile1\r
 \r
             IncludedFileTable = MetaFileStorage(self._Table.Cur, IncludedFile1, MODEL_FILE_DSC, True)\r
             Owner = self._Content[self._ContentIndex-1][0]\r
-            Parser = DscParser(IncludedFile1, self._FileType, IncludedFileTable, \r
+            Parser = DscParser(IncludedFile1, self._FileType, IncludedFileTable,\r
                                Owner=Owner, From=Owner)\r
 \r
             # set the parser status with current status\r
@@ -1417,7 +1417,7 @@ class DscParser(MetaFileParser):
                 self._Content.pop(self._ContentIndex-1)\r
                 self._ValueList = None\r
                 self._ContentIndex -= 1\r
-                \r
+\r
     def __ProcessSkuId(self):\r
         self._ValueList = [ReplaceMacro(Value, self._Macros, RaiseError=True)\r
                            for Value in self._ValueList]\r
@@ -1434,22 +1434,22 @@ class DscParser(MetaFileParser):
         # PCD value can be an expression\r
         #\r
         if len(ValueList) > 1 and ValueList[1] == TAB_VOID:\r
-            PcdValue = ValueList[0]      \r
+            PcdValue = ValueList[0]\r
             try:\r
                 ValueList[0] = ValueExpression(PcdValue, self._Macros)(True)\r
             except WrnExpression as Value:\r
-                ValueList[0] = Value.result          \r
+                ValueList[0] = Value.result\r
         else:\r
             PcdValue = ValueList[-1]\r
             try:\r
                 ValueList[-1] = ValueExpression(PcdValue, self._Macros)(True)\r
             except WrnExpression as Value:\r
                 ValueList[-1] = Value.result\r
-            \r
+\r
             if ValueList[-1] == 'True':\r
                 ValueList[-1] = '1'\r
             if ValueList[-1] == 'False':\r
-                ValueList[-1] = '0'      \r
+                ValueList[-1] = '0'\r
 \r
         self._ValueList[2] = '|'.join(ValueList)\r
 \r
@@ -1548,7 +1548,7 @@ class DecParser(MetaFileParser):
             self.FileID = FileID\r
         else:\r
             self.FileID = self.TblFile.InsertFile(Filename, MODEL_FILE_DEC)\r
-        \r
+\r
         for Index in range(0, len(Content)):\r
             Line, Comment = CleanString2(Content[Index])\r
             self._CurrentLine = Line\r
@@ -1750,19 +1750,19 @@ class DecParser(MetaFileParser):
                                       " (<TokenSpaceGuidCName>.<PcdCName>|<DefaultValue>|<DatumType>|<Token>)",\r
                             File=self.MetaFile, Line=self._LineIndex+1)\r
 \r
-        \r
+\r
         ValueRe  = re.compile(r'^\s*L?\".*\|.*\"')\r
         PtrValue = ValueRe.findall(TokenList[1])\r
-        \r
-        # Has VOID* type string, may contain "|" character in the string. \r
+\r
+        # Has VOID* type string, may contain "|" character in the string.\r
         if len(PtrValue) != 0:\r
             ptrValueList = re.sub(ValueRe, '', TokenList[1])\r
             ValueList    = GetSplitValueList(ptrValueList)\r
             ValueList[0] = PtrValue[0]\r
         else:\r
             ValueList = GetSplitValueList(TokenList[1])\r
-            \r
-        \r
+\r
+\r
         # check if there's enough datum information given\r
         if len(ValueList) != 3:\r
             EdkLogger.error('Parser', FORMAT_INVALID, "Invalid PCD Datum information given",\r
@@ -1792,7 +1792,7 @@ class DecParser(MetaFileParser):
         if not IsValid:\r
             EdkLogger.error('Parser', FORMAT_INVALID, Cause, ExtraData=self._CurrentLine,\r
                             File=self.MetaFile, Line=self._LineIndex+1)\r
-        \r
+\r
         if EccGlobalData.gConfig.UniCheckPCDInfo == '1' or EccGlobalData.gConfig.UniCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
             # check Description, Prompt information\r
             PatternDesc = re.compile('##\s*([\x21-\x7E\s]*)', re.S)\r
@@ -1903,7 +1903,7 @@ class DecParser(MetaFileParser):
 ## Fdf\r
 #\r
 # This class defined the structure used in Fdf object\r
-# \r
+#\r
 # @param Filename:      Input value for Ffilename of Fdf file, default is None\r
 # @param WorkspaceDir:  Input value for current workspace directory, default is None\r
 #\r
@@ -1911,7 +1911,7 @@ class Fdf(object):
     def __init__(self, Filename = None, IsToDatabase = False, WorkspaceDir = None, Database = None):\r
         self.WorkspaceDir = WorkspaceDir\r
         self.IsToDatabase = IsToDatabase\r
-        \r
+\r
         self.Cur = Database.Cur\r
         self.TblFile = Database.TblFile\r
         self.TblFdf = Database.TblFdf\r
@@ -1938,15 +1938,15 @@ class Fdf(object):
             self.FileList[Filename] = FileID\r
 \r
         return self.FileList[Filename]\r
-            \r
-    \r
+\r
+\r
     ## Load Fdf file\r
     #\r
     # Load the file if it exists\r
     #\r
     # @param Filename:  Input value for filename of Fdf file\r
     #\r
-    def LoadFdfFile(self, Filename):     \r
+    def LoadFdfFile(self, Filename):\r
         FileList = []\r
         #\r
         # Parse Fdf file\r
@@ -1991,7 +1991,7 @@ class UniParser(object):
         self.FileIn = None\r
         self.Missing = []\r
         self.__read()\r
-    \r
+\r
     def __read(self):\r
         try:\r
             self.FileIn = CodecOpenLongFilePath(self.FilePath, Mode='rb', Encoding='utf_8').read()\r
@@ -2001,7 +2001,7 @@ class UniParser(object):
             self.FileIn = CodecOpenLongFilePath(self.FilePath, Mode='rb', Encoding='utf_16_le').read()\r
         except IOError:\r
             self.FileIn = ""\r
-    \r
+\r
     def Start(self):\r
         if self.IsModuleUni:\r
             if self.IsExtraUni:\r
@@ -2021,7 +2021,7 @@ class UniParser(object):
                 self.PrintLog('STR_PACKAGE_ABSTRACT', PackageAbstract)\r
                 PackageDescription = self.CheckKeyValid('STR_PACKAGE_DESCRIPTION')\r
                 self.PrintLog('STR_PACKAGE_DESCRIPTION', PackageDescription)\r
-                \r
+\r
     def CheckKeyValid(self, Key, Contents=None):\r
         if not Contents:\r
             Contents = self.FileIn\r
@@ -2029,7 +2029,7 @@ class UniParser(object):
         if KeyPattern.search(Contents):\r
             return True\r
         return False\r
-    \r
+\r
     def CheckPcdInfo(self, PcdCName):\r
         PromptKey = 'STR_%s_PROMPT' % PcdCName.replace('.', '_')\r
         PcdPrompt = self.CheckKeyValid(PromptKey)\r
@@ -2037,7 +2037,7 @@ class UniParser(object):
         HelpKey = 'STR_%s_HELP' % PcdCName.replace('.', '_')\r
         PcdHelp = self.CheckKeyValid(HelpKey)\r
         self.PrintLog(HelpKey, PcdHelp)\r
-    \r
+\r
     def PrintLog(self, Key, Value):\r
         if not Value and Key not in self.Missing:\r
             Msg = '%s is missing in the %s file.' % (Key, self.FileName)\r
index 9faa6b58b001ad927f33a48ef80d450da52c3741..ad3cf36a1cbd40364909232f46252d292f5d5a26 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase a meta file table\r
 #\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -25,7 +25,7 @@ from CommonDataClass.DataClass import MODEL_FILE_DSC, MODEL_FILE_DEC, MODEL_FILE
                                       MODEL_FILE_OTHERS\r
 \r
 class MetaFileTable(Table):\r
-    ## Constructor \r
+    ## Constructor\r
     def __init__(self, Cursor, MetaFile, FileType, TableName, Temporary = False):\r
         self.MetaFile = MetaFile\r
         self.TblFile = EccGlobalData.gDb.TblFile\r
@@ -88,30 +88,30 @@ class ModuleTable(MetaFileTable):
                BelongsToItem=-1, BelongsToFile = -1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=0, Usage=''):\r
         (Value1, Value2, Value3, Usage, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Usage, Scope1, Scope2))\r
         return Table.Insert(\r
-                        self, \r
-                        Model, \r
-                        Value1, \r
-                        Value2, \r
-                        Value3, \r
-                        Usage,                         \r
-                        Scope1, \r
+                        self,\r
+                        Model,\r
+                        Value1,\r
+                        Value2,\r
+                        Value3,\r
+                        Usage,\r
+                        Scope1,\r
                         Scope2,\r
                         BelongsToItem,\r
-                        BelongsToFile, \r
-                        StartLine, \r
-                        StartColumn, \r
-                        EndLine, \r
-                        EndColumn, \r
+                        BelongsToFile,\r
+                        StartLine,\r
+                        StartColumn,\r
+                        EndLine,\r
+                        EndColumn,\r
                         Enabled\r
                         )\r
 \r
     ## Query table\r
     #\r
-    # @param    Model:      The Model of Record \r
-    # @param    Arch:       The Arch attribute of Record \r
-    # @param    Platform    The Platform attribute of Record \r
+    # @param    Model:      The Model of Record\r
+    # @param    Arch:       The Arch attribute of Record\r
+    # @param    Platform    The Platform attribute of Record\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self, Model, Arch=None, Platform=None):\r
         ConditionString = "Model=%s AND Enabled>=0" % Model\r
@@ -171,28 +171,28 @@ class PackageTable(MetaFileTable):
                BelongsToItem=-1, BelongsToFile = -1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=0):\r
         (Value1, Value2, Value3, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2))\r
         return Table.Insert(\r
-                        self, \r
-                        Model, \r
-                        Value1, \r
-                        Value2, \r
-                        Value3, \r
-                        Scope1, \r
+                        self,\r
+                        Model,\r
+                        Value1,\r
+                        Value2,\r
+                        Value3,\r
+                        Scope1,\r
                         Scope2,\r
                         BelongsToItem,\r
-                        BelongsToFile, \r
-                        StartLine, \r
-                        StartColumn, \r
-                        EndLine, \r
-                        EndColumn, \r
+                        BelongsToFile,\r
+                        StartLine,\r
+                        StartColumn,\r
+                        EndLine,\r
+                        EndColumn,\r
                         Enabled\r
                         )\r
 \r
     ## Query table\r
     #\r
-    # @param    Model:  The Model of Record \r
-    # @param    Arch:   The Arch attribute of Record \r
+    # @param    Model:  The Model of Record\r
+    # @param    Arch:   The Arch attribute of Record\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self, Model, Arch=None):\r
         ConditionString = "Model=%s AND Enabled>=0" % Model\r
@@ -252,32 +252,32 @@ class PlatformTable(MetaFileTable):
                FromItem=-1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=1):\r
         (Value1, Value2, Value3, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2))\r
         return Table.Insert(\r
-                        self, \r
-                        Model, \r
-                        Value1, \r
-                        Value2, \r
-                        Value3, \r
-                        Scope1, \r
+                        self,\r
+                        Model,\r
+                        Value1,\r
+                        Value2,\r
+                        Value3,\r
+                        Scope1,\r
                         Scope2,\r
-                        BelongsToItem, \r
+                        BelongsToItem,\r
                         BelongsToFile,\r
                         FromItem,\r
-                        StartLine, \r
-                        StartColumn, \r
-                        EndLine, \r
-                        EndColumn, \r
+                        StartLine,\r
+                        StartColumn,\r
+                        EndLine,\r
+                        EndColumn,\r
                         Enabled\r
                         )\r
 \r
     ## Query table\r
     #\r
-    # @param Model:          The Model of Record \r
+    # @param Model:          The Model of Record\r
     # @param Scope1:         Arch of a Dsc item\r
     # @param Scope2:         Module type of a Dsc item\r
     # @param BelongsToItem:  The item belongs to which another item\r
     # @param FromItem:       The item belongs to which dsc file\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self, Model, Scope1=None, Scope2=None, BelongsToItem=None, FromItem=None):\r
         ConditionString = "Model=%s AND Enabled>0" % Model\r
index a52c78ec3194dec39b6b5c657220b1c5f9e3d047..0e62ba2bb7cd8cf4c81c344e0d4dad33da24e51b 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to be the warning class of ECC tool\r
 #\r
-# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -27,4 +27,4 @@ class Warning (Exception):
         self.message = Str\r
         self.FileName = File\r
         self.LineNumber = Line\r
-        self.ToolName = 'ECC PP'
\ No newline at end of file
+        self.ToolName = 'ECC PP'\r
index 1e45806fa65738320e5e2e36a8ece14fb3b15299..4294016ae3213422d614dbc448372621cf1b4804 100644 (file)
@@ -2,7 +2,7 @@
 # This is an XML API that uses a syntax similar to XPath, but it is written in\r
 # standard python so that no extra python packages are required to use it.\r
 #\r
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -33,7 +33,7 @@ def CreateXmlElement(Name, String, NodeList, AttributeList):
     Element = Doc.createElement(Name)\r
     if String != '' and String is not None:\r
         Element.appendChild(Doc.createTextNode(String))\r
-    \r
+\r
     for Item in NodeList:\r
         if isinstance(Item, type([])):\r
             Key = Item[0]\r
@@ -49,7 +49,7 @@ def CreateXmlElement(Name, String, NodeList, AttributeList):
         Value = Item[1]\r
         if Key != '' and Key is not None and Value != '' and Value is not None:\r
             Element.setAttribute(Key, Value)\r
-    \r
+\r
     return Element\r
 \r
 ## Get a list of XML nodes using XPath style syntax.\r
index f09eece5fb0e3110cd09961f21b4a48d74e65b16..e8283c03cb3684fb5bb6fc9f90b6324a14d800be 100644 (file)
@@ -4,11 +4,11 @@
 # This file is required to make Python interpreter treat the directory\r
 # as containing package.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,4 +17,4 @@
 \r
 '''\r
 Xml\r
-'''
\ No newline at end of file
+'''\r
index e2a5cc8487fabeaaa65aa15e52f82cf4e962a39a..12dbf664ba9bda6590a05fbf6063d7e05adad93a 100644 (file)
@@ -2349,13 +2349,13 @@ def CheckFileHeaderDoxygenComments(FullFileName):
         if (len(CommentStrListTemp) <= 1):\r
             # For Mac\r
             CommentStrListTemp = CommentStr.split('\r')\r
-        # Skip the content before the file  header    \r
+        # Skip the content before the file  header\r
         for CommentLine in CommentStrListTemp:\r
             if CommentLine.strip().startswith('/** @file'):\r
                 FileStartFlag = True\r
             if FileStartFlag ==  True:\r
                 CommentStrList.append(CommentLine)\r
-                       \r
+\r
         ID = Result[1]\r
         Index = 0\r
         if CommentStrList and CommentStrList[0].strip().startswith('/** @file'):\r
@@ -2378,7 +2378,7 @@ def CheckFileHeaderDoxygenComments(FullFileName):
             if EccGlobalData.gConfig.HeaderCheckCFileCommentStartSpacesNum == '1' or EccGlobalData.gConfig.HeaderCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
                 if CommentLine.startswith('/** @file') == False and CommentLine.startswith('**/') == False and CommentLine.strip() and CommentLine.startswith('  ') == False:\r
                     PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'File header comment content should start with two spaces at each line', FileTable, ID)\r
-            \r
+\r
             CommentLine = CommentLine.strip()\r
             if CommentLine.startswith('Copyright'):\r
                 NoCopyrightFlag = False\r
@@ -2403,9 +2403,9 @@ def CheckFileHeaderDoxygenComments(FullFileName):
                     # Check whether C File header Comment's each reference at list should begin with a bullet character.\r
                     if EccGlobalData.gConfig.HeaderCheckCFileCommentReferenceFormat == '1' or EccGlobalData.gConfig.HeaderCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':\r
                         if RefListFlag == True:\r
-                            if RefLine.strip() and RefLine.strip().startswith('**/') == False and RefLine.startswith('  -') == False:                            \r
-                                PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'Each reference on a separate line should begin with a bullet character ""-"" ', FileTable, ID)                    \r
-    \r
+                            if RefLine.strip() and RefLine.strip().startswith('**/') == False and RefLine.startswith('  -') == False:\r
+                                PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'Each reference on a separate line should begin with a bullet character ""-"" ', FileTable, ID)\r
+\r
     if NoHeaderCommentStartFlag:\r
         PrintErrorMsg(ERROR_DOXYGEN_CHECK_FILE_HEADER, 'File header comment should begin with ""/** @file""', FileTable, ID)\r
         return\r
index a496f4344030626a0fe9c5a3da52bb2d4fc8ebe3..b9e57c1b5554949b2a430c365e9cdd3890050f0e 100644 (file)
@@ -2,7 +2,7 @@
 \r
 from antlr3 import *\r
 from antlr3.compat import set, frozenset\r
-                        \r
+\r
 ## @file\r
 # The file defines the Lexer for C source files.\r
 #\r
@@ -10,7 +10,7 @@ from antlr3.compat import set, frozenset
 # This file is generated by running:\r
 # java org.antlr.Tool C.g\r
 #\r
-# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available\r
 # under the terms and conditions of the BSD License which accompanies this\r
@@ -4341,7 +4341,7 @@ class CLexer(Lexer):
         u"\12\uffff"\r
         )\r
 \r
-            \r
+\r
     DFA25_transition = [\r
         DFA.unpack(u"\1\2\1\uffff\12\1"),\r
         DFA.unpack(u"\1\3\1\uffff\12\1\12\uffff\1\5\1\4\1\5\35\uffff\1\5"\r
@@ -4479,7 +4479,7 @@ class CLexer(Lexer):
         u"\u0192\uffff"\r
         )\r
 \r
-            \r
+\r
     DFA35_transition = [\r
         DFA.unpack(u"\6\73\2\70\1\73\2\70\22\73\1\70\1\50\1\65\1\72\1\63"\r
         u"\1\45\1\46\1\64\1\34\1\35\1\40\1\42\1\3\1\43\1\41\1\44\1\66\11"\r
@@ -4943,5 +4943,5 @@ class CLexer(Lexer):
     # class definition for DFA #35\r
 \r
     DFA35 = DFA\r
\r
+\r
 \r
index d7eff138da5761f1b97ef7fb895922b391216561..b66ac2d8d5450f857cd069f34cebec9d7161274c 100644 (file)
@@ -3,7 +3,7 @@
 from __future__ import print_function\r
 from antlr3 import *\r
 from antlr3.compat import set, frozenset\r
-         \r
+\r
 ## @file\r
 # The file defines the parser for C source files.\r
 #\r
@@ -11,7 +11,7 @@ from antlr3.compat import set, frozenset
 # This file is generated by running:\r
 # java org.antlr.Tool C.g\r
 #\r
-# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available\r
 # under the terms and conditions of the BSD License which accompanies this\r
@@ -57,23 +57,23 @@ OctalEscape=17
 \r
 # token names\r
 tokenNames = [\r
-    "<invalid>", "<EOR>", "<DOWN>", "<UP>", \r
-    "IDENTIFIER", "HEX_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", "CHARACTER_LITERAL", \r
-    "STRING_LITERAL", "FLOATING_POINT_LITERAL", "LETTER", "EscapeSequence", \r
-    "HexDigit", "IntegerTypeSuffix", "Exponent", "FloatTypeSuffix", "OctalEscape", \r
-    "UnicodeEscape", "WS", "BS", "UnicodeVocabulary", "COMMENT", "LINE_COMMENT", \r
-    "LINE_COMMAND", "';'", "'typedef'", "','", "'='", "'extern'", "'static'", \r
-    "'auto'", "'register'", "'STATIC'", "'void'", "'char'", "'short'", "'int'", \r
-    "'long'", "'float'", "'double'", "'signed'", "'unsigned'", "'{'", "'}'", \r
-    "'struct'", "'union'", "':'", "'enum'", "'const'", "'volatile'", "'IN'", \r
-    "'OUT'", "'OPTIONAL'", "'CONST'", "'UNALIGNED'", "'VOLATILE'", "'GLOBAL_REMOVE_IF_UNREFERENCED'", \r
-    "'EFIAPI'", "'EFI_BOOTSERVICE'", "'EFI_RUNTIMESERVICE'", "'PACKED'", \r
-    "'('", "')'", "'['", "']'", "'*'", "'...'", "'+'", "'-'", "'/'", "'%'", \r
-    "'++'", "'--'", "'sizeof'", "'.'", "'->'", "'&'", "'~'", "'!'", "'*='", \r
-    "'/='", "'%='", "'+='", "'-='", "'<<='", "'>>='", "'&='", "'^='", "'|='", \r
-    "'?'", "'||'", "'&&'", "'|'", "'^'", "'=='", "'!='", "'<'", "'>'", "'<='", \r
-    "'>='", "'<<'", "'>>'", "'__asm__'", "'_asm'", "'__asm'", "'case'", \r
-    "'default'", "'if'", "'else'", "'switch'", "'while'", "'do'", "'for'", \r
+    "<invalid>", "<EOR>", "<DOWN>", "<UP>",\r
+    "IDENTIFIER", "HEX_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", "CHARACTER_LITERAL",\r
+    "STRING_LITERAL", "FLOATING_POINT_LITERAL", "LETTER", "EscapeSequence",\r
+    "HexDigit", "IntegerTypeSuffix", "Exponent", "FloatTypeSuffix", "OctalEscape",\r
+    "UnicodeEscape", "WS", "BS", "UnicodeVocabulary", "COMMENT", "LINE_COMMENT",\r
+    "LINE_COMMAND", "';'", "'typedef'", "','", "'='", "'extern'", "'static'",\r
+    "'auto'", "'register'", "'STATIC'", "'void'", "'char'", "'short'", "'int'",\r
+    "'long'", "'float'", "'double'", "'signed'", "'unsigned'", "'{'", "'}'",\r
+    "'struct'", "'union'", "':'", "'enum'", "'const'", "'volatile'", "'IN'",\r
+    "'OUT'", "'OPTIONAL'", "'CONST'", "'UNALIGNED'", "'VOLATILE'", "'GLOBAL_REMOVE_IF_UNREFERENCED'",\r
+    "'EFIAPI'", "'EFI_BOOTSERVICE'", "'EFI_RUNTIMESERVICE'", "'PACKED'",\r
+    "'('", "')'", "'['", "']'", "'*'", "'...'", "'+'", "'-'", "'/'", "'%'",\r
+    "'++'", "'--'", "'sizeof'", "'.'", "'->'", "'&'", "'~'", "'!'", "'*='",\r
+    "'/='", "'%='", "'+='", "'-='", "'<<='", "'>>='", "'&='", "'^='", "'|='",\r
+    "'?'", "'||'", "'&&'", "'|'", "'^'", "'=='", "'!='", "'<'", "'>'", "'<='",\r
+    "'>='", "'<<'", "'>>'", "'__asm__'", "'_asm'", "'__asm'", "'case'",\r
+    "'default'", "'if'", "'else'", "'switch'", "'while'", "'do'", "'for'",\r
     "'goto'", "'continue'", "'break'", "'return'"\r
 ]\r
 \r
@@ -106,33 +106,33 @@ class CParser(Parser):
         print(str(line)+ ',' + str(offset) + ':' + str(tokenText))\r
 \r
     def StorePredicateExpression(self, StartLine, StartOffset, EndLine, EndOffset, Text):\r
-       PredExp = CodeFragment.PredicateExpression(Text, (StartLine, StartOffset), (EndLine, EndOffset))\r
-       FileProfile.PredicateExpressionList.append(PredExp)\r
-       \r
+      PredExp = CodeFragment.PredicateExpression(Text, (StartLine, StartOffset), (EndLine, EndOffset))\r
+      FileProfile.PredicateExpressionList.append(PredExp)\r
+\r
     def StoreEnumerationDefinition(self, StartLine, StartOffset, EndLine, EndOffset, Text):\r
-       EnumDef = CodeFragment.EnumerationDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset))\r
-       FileProfile.EnumerationDefinitionList.append(EnumDef)\r
-       \r
+      EnumDef = CodeFragment.EnumerationDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset))\r
+      FileProfile.EnumerationDefinitionList.append(EnumDef)\r
+\r
     def StoreStructUnionDefinition(self, StartLine, StartOffset, EndLine, EndOffset, Text):\r
-       SUDef = CodeFragment.StructUnionDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset))\r
-       FileProfile.StructUnionDefinitionList.append(SUDef)\r
-       \r
+      SUDef = CodeFragment.StructUnionDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset))\r
+      FileProfile.StructUnionDefinitionList.append(SUDef)\r
+\r
     def StoreTypedefDefinition(self, StartLine, StartOffset, EndLine, EndOffset, FromText, ToText):\r
-       Tdef = CodeFragment.TypedefDefinition(FromText, ToText, (StartLine, StartOffset), (EndLine, EndOffset))\r
-       FileProfile.TypedefDefinitionList.append(Tdef)\r
-    \r
+      Tdef = CodeFragment.TypedefDefinition(FromText, ToText, (StartLine, StartOffset), (EndLine, EndOffset))\r
+      FileProfile.TypedefDefinitionList.append(Tdef)\r
+\r
     def StoreFunctionDefinition(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText, LeftBraceLine, LeftBraceOffset, DeclLine, DeclOffset):\r
-       FuncDef = CodeFragment.FunctionDefinition(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset), (LeftBraceLine, LeftBraceOffset), (DeclLine, DeclOffset))\r
-       FileProfile.FunctionDefinitionList.append(FuncDef)\r
-       \r
+      FuncDef = CodeFragment.FunctionDefinition(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset), (LeftBraceLine, LeftBraceOffset), (DeclLine, DeclOffset))\r
+      FileProfile.FunctionDefinitionList.append(FuncDef)\r
+\r
     def StoreVariableDeclaration(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText):\r
-       VarDecl = CodeFragment.VariableDeclaration(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset))\r
-       FileProfile.VariableDeclarationList.append(VarDecl)\r
-    \r
+      VarDecl = CodeFragment.VariableDeclaration(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset))\r
+      FileProfile.VariableDeclarationList.append(VarDecl)\r
+\r
     def StoreFunctionCalling(self, StartLine, StartOffset, EndLine, EndOffset, FuncName, ParamList):\r
-       FuncCall = CodeFragment.FunctionCalling(FuncName, ParamList, (StartLine, StartOffset), (EndLine, EndOffset))\r
-       FileProfile.FunctionCallingList.append(FuncCall)\r
-    \r
+      FuncCall = CodeFragment.FunctionCalling(FuncName, ParamList, (StartLine, StartOffset), (EndLine, EndOffset))\r
+      FileProfile.FunctionCallingList.append(FuncCall)\r
+\r
 \r
 \r
 \r
@@ -144,7 +144,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 1):\r
-                    return \r
+                    return\r
 \r
                 # C.g:103:2: ( ( external_declaration )* )\r
                 # C.g:103:4: ( external_declaration )*\r
@@ -163,7 +163,7 @@ class CParser(Parser):
                         self.external_declaration()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -183,7 +183,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end translation_unit\r
 \r
@@ -196,7 +196,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 2):\r
-                    return \r
+                    return\r
 \r
                 # C.g:119:2: ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? )\r
                 alt3 = 3\r
@@ -212,7 +212,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 1, self.input)\r
 \r
@@ -228,7 +228,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 2, self.input)\r
 \r
@@ -244,7 +244,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 3, self.input)\r
 \r
@@ -260,7 +260,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 4, self.input)\r
 \r
@@ -276,7 +276,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 5, self.input)\r
 \r
@@ -292,7 +292,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 6, self.input)\r
 \r
@@ -308,7 +308,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 7, self.input)\r
 \r
@@ -324,7 +324,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 8, self.input)\r
 \r
@@ -340,7 +340,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 9, self.input)\r
 \r
@@ -356,7 +356,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 10, self.input)\r
 \r
@@ -372,7 +372,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 11, self.input)\r
 \r
@@ -388,7 +388,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 12, self.input)\r
 \r
@@ -406,7 +406,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 13, self.input)\r
 \r
@@ -422,7 +422,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 14, self.input)\r
 \r
@@ -440,7 +440,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 16, self.input)\r
 \r
@@ -456,7 +456,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 17, self.input)\r
 \r
@@ -472,7 +472,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 18, self.input)\r
 \r
@@ -485,7 +485,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("114:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 0, self.input)\r
 \r
@@ -497,7 +497,7 @@ class CParser(Parser):
                     self.function_definition()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt3 == 2:\r
@@ -506,7 +506,7 @@ class CParser(Parser):
                     self.declaration()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt3 == 3:\r
@@ -515,7 +515,7 @@ class CParser(Parser):
                     self.macro_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:121:20: ( ';' )?\r
                     alt2 = 2\r
                     LA2_0 = self.input.LA(1)\r
@@ -526,7 +526,7 @@ class CParser(Parser):
                         # C.g:121:21: ';'\r
                         self.match(self.input, 25, self.FOLLOW_25_in_external_declaration126)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -542,7 +542,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end external_declaration\r
 \r
@@ -569,7 +569,7 @@ class CParser(Parser):
         declarator1 = None\r
 \r
 \r
-               \r
+\r
         self.function_definition_stack[-1].ModifierText =  ''\r
         self.function_definition_stack[-1].DeclText =  ''\r
         self.function_definition_stack[-1].LBLine =  0\r
@@ -783,7 +783,7 @@ class CParser(Parser):
 \r
 \r
                 if self.backtracking == 0:\r
-                          \r
+\r
                     if d is not None:\r
                       self.function_definition_stack[-1].ModifierText = self.input.toString(d.start, d.stop)\r
                     else:\r
@@ -797,7 +797,7 @@ class CParser(Parser):
                     else:\r
                       self.function_definition_stack[-1].LBLine = b.start.line\r
                       self.function_definition_stack[-1].LBOffset = b.start.charPositionInLine\r
-                                 \r
+\r
 \r
 \r
 \r
@@ -805,7 +805,7 @@ class CParser(Parser):
                 retval.stop = self.input.LT(-1)\r
 \r
                 if self.backtracking == 0:\r
-                           \r
+\r
                     self.StoreFunctionDefinition(retval.start.line, retval.start.charPositionInLine, retval.stop.line, retval.stop.charPositionInLine, self.function_definition_stack[-1].ModifierText, self.function_definition_stack[-1].DeclText, self.function_definition_stack[-1].LBLine, self.function_definition_stack[-1].LBOffset, self.function_definition_stack[-1].DeclLine, self.function_definition_stack[-1].DeclOffset)\r
 \r
 \r
@@ -845,7 +845,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 4):\r
-                    return \r
+                    return\r
 \r
                 # C.g:167:2: (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' )\r
                 alt9 = 2\r
@@ -858,7 +858,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("166:1: declaration : (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' );", 9, 0, self.input)\r
 \r
@@ -869,7 +869,7 @@ class CParser(Parser):
                     a = self.input.LT(1)\r
                     self.match(self.input, 26, self.FOLLOW_26_in_declaration203)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:167:17: (b= declaration_specifiers )?\r
                     alt7 = 2\r
                     LA7 = self.input.LA(1)\r
@@ -906,7 +906,7 @@ class CParser(Parser):
                         b = self.declaration_specifiers()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -914,18 +914,18 @@ class CParser(Parser):
                     c = self.init_declarator_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     d = self.input.LT(1)\r
                     self.match(self.input, 25, self.FOLLOW_25_in_declaration220)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
-                            \r
+\r
                         if b is not None:\r
                           self.StoreTypedefDefinition(a.line, a.charPositionInLine, d.line, d.charPositionInLine, self.input.toString(b.start, b.stop), self.input.toString(c.start, c.stop))\r
                         else:\r
                           self.StoreTypedefDefinition(a.line, a.charPositionInLine, d.line, d.charPositionInLine, '', self.input.toString(c.start, c.stop))\r
-                                 \r
+\r
 \r
 \r
 \r
@@ -935,7 +935,7 @@ class CParser(Parser):
                     s = self.declaration_specifiers()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:175:30: (t= init_declarator_list )?\r
                     alt8 = 2\r
                     LA8_0 = self.input.LA(1)\r
@@ -948,19 +948,19 @@ class CParser(Parser):
                         t = self.init_declarator_list()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
                     e = self.input.LT(1)\r
                     self.match(self.input, 25, self.FOLLOW_25_in_declaration243)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
-                          \r
+\r
                         if t is not None:\r
                           self.StoreVariableDeclaration(s.start.line, s.start.charPositionInLine, t.start.line, t.start.charPositionInLine, self.input.toString(s.start, s.stop), self.input.toString(t.start, t.stop))\r
-                               \r
+\r
 \r
 \r
 \r
@@ -974,7 +974,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end declaration\r
 \r
@@ -1185,7 +1185,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 7):\r
-                    return \r
+                    return\r
 \r
                 # C.g:194:2: ( declarator ( '=' initializer )? )\r
                 # C.g:194:4: declarator ( '=' initializer )?\r
@@ -1193,7 +1193,7 @@ class CParser(Parser):
                 self.declarator()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:194:15: ( '=' initializer )?\r
                 alt12 = 2\r
                 LA12_0 = self.input.LA(1)\r
@@ -1204,12 +1204,12 @@ class CParser(Parser):
                     # C.g:194:16: '=' initializer\r
                     self.match(self.input, 28, self.FOLLOW_28_in_init_declarator329)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_initializer_in_init_declarator331)\r
                     self.initializer()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -1226,7 +1226,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end init_declarator\r
 \r
@@ -1239,7 +1239,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 8):\r
-                    return \r
+                    return\r
 \r
                 # C.g:198:2: ( 'extern' | 'static' | 'auto' | 'register' | 'STATIC' )\r
                 # C.g:\r
@@ -1251,7 +1251,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     mse = MismatchedSetException(None, self.input)\r
                     self.recoverFromMismatchedSet(\r
@@ -1273,7 +1273,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end storage_class_specifier\r
 \r
@@ -1291,7 +1291,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 9):\r
-                    return \r
+                    return\r
 \r
                 # C.g:206:2: ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id )\r
                 alt13 = 12\r
@@ -1324,7 +1324,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("205:1: type_specifier : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER ( type_qualifier )* declarator )=> type_id );", 13, 0, self.input)\r
 \r
@@ -1334,63 +1334,63 @@ class CParser(Parser):
                     # C.g:206:4: 'void'\r
                     self.match(self.input, 34, self.FOLLOW_34_in_type_specifier376)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 2:\r
                     # C.g:207:4: 'char'\r
                     self.match(self.input, 35, self.FOLLOW_35_in_type_specifier381)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 3:\r
                     # C.g:208:4: 'short'\r
                     self.match(self.input, 36, self.FOLLOW_36_in_type_specifier386)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 4:\r
                     # C.g:209:4: 'int'\r
                     self.match(self.input, 37, self.FOLLOW_37_in_type_specifier391)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 5:\r
                     # C.g:210:4: 'long'\r
                     self.match(self.input, 38, self.FOLLOW_38_in_type_specifier396)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 6:\r
                     # C.g:211:4: 'float'\r
                     self.match(self.input, 39, self.FOLLOW_39_in_type_specifier401)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 7:\r
                     # C.g:212:4: 'double'\r
                     self.match(self.input, 40, self.FOLLOW_40_in_type_specifier406)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 8:\r
                     # C.g:213:4: 'signed'\r
                     self.match(self.input, 41, self.FOLLOW_41_in_type_specifier411)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 9:\r
                     # C.g:214:4: 'unsigned'\r
                     self.match(self.input, 42, self.FOLLOW_42_in_type_specifier416)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt13 == 10:\r
@@ -1399,12 +1399,12 @@ class CParser(Parser):
                     s = self.struct_or_union_specifier()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
-                          \r
+\r
                         if s.stop is not None:\r
                           self.StoreStructUnionDefinition(s.start.line, s.start.charPositionInLine, s.stop.line, s.stop.charPositionInLine, self.input.toString(s.start, s.stop))\r
-                               \r
+\r
 \r
 \r
 \r
@@ -1414,12 +1414,12 @@ class CParser(Parser):
                     e = self.enum_specifier()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
-                          \r
+\r
                         if e.stop is not None:\r
                           self.StoreEnumerationDefinition(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start, e.stop))\r
-                               \r
+\r
 \r
 \r
 \r
@@ -1429,7 +1429,7 @@ class CParser(Parser):
                     self.type_id()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -1442,7 +1442,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end type_specifier\r
 \r
@@ -1455,13 +1455,13 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 10):\r
-                    return \r
+                    return\r
 \r
                 # C.g:229:5: ( IDENTIFIER )\r
                 # C.g:229:9: IDENTIFIER\r
                 self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_type_id467)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -1475,7 +1475,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end type_id\r
 \r
@@ -1612,7 +1612,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 12):\r
-                    return \r
+                    return\r
 \r
                 # C.g:240:2: ( 'struct' | 'union' )\r
                 # C.g:\r
@@ -1624,7 +1624,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     mse = MismatchedSetException(None, self.input)\r
                     self.recoverFromMismatchedSet(\r
@@ -1646,7 +1646,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end struct_or_union\r
 \r
@@ -1659,7 +1659,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 13):\r
-                    return \r
+                    return\r
 \r
                 # C.g:245:2: ( ( struct_declaration )+ )\r
                 # C.g:245:4: ( struct_declaration )+\r
@@ -1679,7 +1679,7 @@ class CParser(Parser):
                         self.struct_declaration()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -1688,7 +1688,7 @@ class CParser(Parser):
 \r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         eee = EarlyExitException(16, self.input)\r
                         raise eee\r
@@ -1709,7 +1709,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end struct_declaration_list\r
 \r
@@ -1722,7 +1722,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 14):\r
-                    return \r
+                    return\r
 \r
                 # C.g:249:2: ( specifier_qualifier_list struct_declarator_list ';' )\r
                 # C.g:249:4: specifier_qualifier_list struct_declarator_list ';'\r
@@ -1730,15 +1730,15 @@ class CParser(Parser):
                 self.specifier_qualifier_list()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.following.append(self.FOLLOW_struct_declarator_list_in_struct_declaration551)\r
                 self.struct_declarator_list()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.match(self.input, 25, self.FOLLOW_25_in_struct_declaration553)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -1752,7 +1752,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end struct_declaration\r
 \r
@@ -1765,7 +1765,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 15):\r
-                    return \r
+                    return\r
 \r
                 # C.g:253:2: ( ( type_qualifier | type_specifier )+ )\r
                 # C.g:253:4: ( type_qualifier | type_specifier )+\r
@@ -1832,7 +1832,7 @@ class CParser(Parser):
                         self.type_qualifier()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt17 == 2:\r
@@ -1841,7 +1841,7 @@ class CParser(Parser):
                         self.type_specifier()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -1850,7 +1850,7 @@ class CParser(Parser):
 \r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         eee = EarlyExitException(17, self.input)\r
                         raise eee\r
@@ -1871,7 +1871,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end specifier_qualifier_list\r
 \r
@@ -1884,7 +1884,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 16):\r
-                    return \r
+                    return\r
 \r
                 # C.g:257:2: ( struct_declarator ( ',' struct_declarator )* )\r
                 # C.g:257:4: struct_declarator ( ',' struct_declarator )*\r
@@ -1892,7 +1892,7 @@ class CParser(Parser):
                 self.struct_declarator()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:257:22: ( ',' struct_declarator )*\r
                 while True: #loop18\r
                     alt18 = 2\r
@@ -1906,12 +1906,12 @@ class CParser(Parser):
                         # C.g:257:23: ',' struct_declarator\r
                         self.match(self.input, 27, self.FOLLOW_27_in_struct_declarator_list587)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list589)\r
                         self.struct_declarator()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -1931,7 +1931,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end struct_declarator_list\r
 \r
@@ -1944,7 +1944,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 17):\r
-                    return \r
+                    return\r
 \r
                 # C.g:261:2: ( declarator ( ':' constant_expression )? | ':' constant_expression )\r
                 alt20 = 2\r
@@ -1957,7 +1957,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("260:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression );", 20, 0, self.input)\r
 \r
@@ -1969,7 +1969,7 @@ class CParser(Parser):
                     self.declarator()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:261:15: ( ':' constant_expression )?\r
                     alt19 = 2\r
                     LA19_0 = self.input.LA(1)\r
@@ -1980,12 +1980,12 @@ class CParser(Parser):
                         # C.g:261:16: ':' constant_expression\r
                         self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator605)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_constant_expression_in_struct_declarator607)\r
                         self.constant_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -1995,12 +1995,12 @@ class CParser(Parser):
                     # C.g:262:4: ':' constant_expression\r
                     self.match(self.input, 47, self.FOLLOW_47_in_struct_declarator614)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_constant_expression_in_struct_declarator616)\r
                     self.constant_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -2013,7 +2013,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end struct_declarator\r
 \r
@@ -2181,7 +2181,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 19):\r
-                    return \r
+                    return\r
 \r
                 # C.g:273:2: ( enumerator ( ',' enumerator )* )\r
                 # C.g:273:4: enumerator ( ',' enumerator )*\r
@@ -2189,7 +2189,7 @@ class CParser(Parser):
                 self.enumerator()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:273:15: ( ',' enumerator )*\r
                 while True: #loop24\r
                     alt24 = 2\r
@@ -2208,12 +2208,12 @@ class CParser(Parser):
                         # C.g:273:16: ',' enumerator\r
                         self.match(self.input, 27, self.FOLLOW_27_in_enumerator_list680)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_enumerator_in_enumerator_list682)\r
                         self.enumerator()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -2233,7 +2233,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end enumerator_list\r
 \r
@@ -2246,13 +2246,13 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 20):\r
-                    return \r
+                    return\r
 \r
                 # C.g:277:2: ( IDENTIFIER ( '=' constant_expression )? )\r
                 # C.g:277:4: IDENTIFIER ( '=' constant_expression )?\r
                 self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enumerator695)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:277:15: ( '=' constant_expression )?\r
                 alt25 = 2\r
                 LA25_0 = self.input.LA(1)\r
@@ -2263,12 +2263,12 @@ class CParser(Parser):
                     # C.g:277:16: '=' constant_expression\r
                     self.match(self.input, 28, self.FOLLOW_28_in_enumerator698)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_constant_expression_in_enumerator700)\r
                     self.constant_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -2285,7 +2285,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end enumerator\r
 \r
@@ -2298,7 +2298,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 21):\r
-                    return \r
+                    return\r
 \r
                 # C.g:281:2: ( 'const' | 'volatile' | 'IN' | 'OUT' | 'OPTIONAL' | 'CONST' | 'UNALIGNED' | 'VOLATILE' | 'GLOBAL_REMOVE_IF_UNREFERENCED' | 'EFIAPI' | 'EFI_BOOTSERVICE' | 'EFI_RUNTIMESERVICE' | 'PACKED' )\r
                 # C.g:\r
@@ -2310,7 +2310,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     mse = MismatchedSetException(None, self.input)\r
                     self.recoverFromMismatchedSet(\r
@@ -2332,7 +2332,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end type_qualifier\r
 \r
@@ -2487,7 +2487,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 23):\r
-                    return \r
+                    return\r
 \r
                 # C.g:303:2: ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ )\r
                 alt34 = 2\r
@@ -2500,7 +2500,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("302:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+ );", 34, 0, self.input)\r
 \r
@@ -2510,7 +2510,7 @@ class CParser(Parser):
                     # C.g:303:4: IDENTIFIER ( declarator_suffix )*\r
                     self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_direct_declarator819)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:303:15: ( declarator_suffix )*\r
                     while True: #loop31\r
                         alt31 = 2\r
@@ -2754,7 +2754,7 @@ class CParser(Parser):
                             self.declarator_suffix()\r
                             self.following.pop()\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         else:\r
@@ -2767,7 +2767,7 @@ class CParser(Parser):
                     # C.g:304:4: '(' ( 'EFIAPI' )? declarator ')' ( declarator_suffix )+\r
                     self.match(self.input, 62, self.FOLLOW_62_in_direct_declarator827)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:304:8: ( 'EFIAPI' )?\r
                     alt32 = 2\r
                     LA32_0 = self.input.LA(1)\r
@@ -2781,7 +2781,7 @@ class CParser(Parser):
                         # C.g:304:9: 'EFIAPI'\r
                         self.match(self.input, 58, self.FOLLOW_58_in_direct_declarator830)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -2789,10 +2789,10 @@ class CParser(Parser):
                     self.declarator()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_direct_declarator836)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:304:35: ( declarator_suffix )+\r
                     cnt33 = 0\r
                     while True: #loop33\r
@@ -3037,7 +3037,7 @@ class CParser(Parser):
                             self.declarator_suffix()\r
                             self.following.pop()\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         else:\r
@@ -3046,7 +3046,7 @@ class CParser(Parser):
 \r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             eee = EarlyExitException(33, self.input)\r
                             raise eee\r
@@ -3066,7 +3066,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end direct_declarator\r
 \r
@@ -3079,7 +3079,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 24):\r
-                    return \r
+                    return\r
 \r
                 # C.g:308:2: ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' )\r
                 alt35 = 5\r
@@ -3095,7 +3095,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 1, self.input)\r
 \r
@@ -3117,7 +3117,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 29, self.input)\r
 \r
@@ -3126,7 +3126,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 2, self.input)\r
 \r
@@ -3135,7 +3135,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("307:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 35, 0, self.input)\r
 \r
@@ -3145,65 +3145,65 @@ class CParser(Parser):
                     # C.g:308:6: '[' constant_expression ']'\r
                     self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix852)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_constant_expression_in_declarator_suffix854)\r
                     self.constant_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 65, self.FOLLOW_65_in_declarator_suffix856)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt35 == 2:\r
                     # C.g:309:9: '[' ']'\r
                     self.match(self.input, 64, self.FOLLOW_64_in_declarator_suffix866)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 65, self.FOLLOW_65_in_declarator_suffix868)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt35 == 3:\r
                     # C.g:310:9: '(' parameter_type_list ')'\r
                     self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix878)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_parameter_type_list_in_declarator_suffix880)\r
                     self.parameter_type_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix882)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt35 == 4:\r
                     # C.g:311:9: '(' identifier_list ')'\r
                     self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix892)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_identifier_list_in_declarator_suffix894)\r
                     self.identifier_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix896)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt35 == 5:\r
                     # C.g:312:9: '(' ')'\r
                     self.match(self.input, 62, self.FOLLOW_62_in_declarator_suffix906)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_declarator_suffix908)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -3216,7 +3216,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end declarator_suffix\r
 \r
@@ -3229,7 +3229,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 25):\r
-                    return \r
+                    return\r
 \r
                 # C.g:316:2: ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' )\r
                 alt38 = 3\r
@@ -3247,7 +3247,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 2, self.input)\r
 \r
@@ -3263,7 +3263,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 3, self.input)\r
 \r
@@ -3279,7 +3279,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 4, self.input)\r
 \r
@@ -3295,7 +3295,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 5, self.input)\r
 \r
@@ -3313,7 +3313,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 21, self.input)\r
 \r
@@ -3329,7 +3329,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 29, self.input)\r
 \r
@@ -3338,7 +3338,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 1, self.input)\r
 \r
@@ -3347,7 +3347,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("315:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | '*' );", 38, 0, self.input)\r
 \r
@@ -3357,7 +3357,7 @@ class CParser(Parser):
                     # C.g:316:4: '*' ( type_qualifier )+ ( pointer )?\r
                     self.match(self.input, 66, self.FOLLOW_66_in_pointer919)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:316:8: ( type_qualifier )+\r
                     cnt36 = 0\r
                     while True: #loop36\r
@@ -3405,7 +3405,7 @@ class CParser(Parser):
                             self.type_qualifier()\r
                             self.following.pop()\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         else:\r
@@ -3414,7 +3414,7 @@ class CParser(Parser):
 \r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             eee = EarlyExitException(36, self.input)\r
                             raise eee\r
@@ -3437,7 +3437,7 @@ class CParser(Parser):
                         self.pointer()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -3447,19 +3447,19 @@ class CParser(Parser):
                     # C.g:317:4: '*' pointer\r
                     self.match(self.input, 66, self.FOLLOW_66_in_pointer930)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_pointer_in_pointer932)\r
                     self.pointer()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt38 == 3:\r
                     # C.g:318:4: '*'\r
                     self.match(self.input, 66, self.FOLLOW_66_in_pointer937)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -3472,7 +3472,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end pointer\r
 \r
@@ -3485,7 +3485,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 26):\r
-                    return \r
+                    return\r
 \r
                 # C.g:322:2: ( parameter_list ( ',' ( 'OPTIONAL' )? '...' )? )\r
                 # C.g:322:4: parameter_list ( ',' ( 'OPTIONAL' )? '...' )?\r
@@ -3493,7 +3493,7 @@ class CParser(Parser):
                 self.parameter_list()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:322:19: ( ',' ( 'OPTIONAL' )? '...' )?\r
                 alt40 = 2\r
                 LA40_0 = self.input.LA(1)\r
@@ -3504,7 +3504,7 @@ class CParser(Parser):
                     # C.g:322:20: ',' ( 'OPTIONAL' )? '...'\r
                     self.match(self.input, 27, self.FOLLOW_27_in_parameter_type_list951)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:322:24: ( 'OPTIONAL' )?\r
                     alt39 = 2\r
                     LA39_0 = self.input.LA(1)\r
@@ -3515,13 +3515,13 @@ class CParser(Parser):
                         # C.g:322:25: 'OPTIONAL'\r
                         self.match(self.input, 53, self.FOLLOW_53_in_parameter_type_list954)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
                     self.match(self.input, 67, self.FOLLOW_67_in_parameter_type_list958)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -3538,7 +3538,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end parameter_type_list\r
 \r
@@ -3551,7 +3551,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 27):\r
-                    return \r
+                    return\r
 \r
                 # C.g:326:2: ( parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )* )\r
                 # C.g:326:4: parameter_declaration ( ',' ( 'OPTIONAL' )? parameter_declaration )*\r
@@ -3559,7 +3559,7 @@ class CParser(Parser):
                 self.parameter_declaration()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:326:26: ( ',' ( 'OPTIONAL' )? parameter_declaration )*\r
                 while True: #loop42\r
                     alt42 = 2\r
@@ -3585,7 +3585,7 @@ class CParser(Parser):
                         # C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration\r
                         self.match(self.input, 27, self.FOLLOW_27_in_parameter_list974)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         # C.g:326:31: ( 'OPTIONAL' )?\r
                         alt41 = 2\r
                         LA41_0 = self.input.LA(1)\r
@@ -3599,7 +3599,7 @@ class CParser(Parser):
                             # C.g:326:32: 'OPTIONAL'\r
                             self.match(self.input, 53, self.FOLLOW_53_in_parameter_list977)\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
 \r
@@ -3607,7 +3607,7 @@ class CParser(Parser):
                         self.parameter_declaration()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -3627,7 +3627,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end parameter_list\r
 \r
@@ -3640,7 +3640,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 28):\r
-                    return \r
+                    return\r
 \r
                 # C.g:330:2: ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER )\r
                 alt46 = 2\r
@@ -3657,7 +3657,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 13, self.input)\r
 \r
@@ -3668,7 +3668,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("329:1: parameter_declaration : ( declaration_specifiers ( declarator | abstract_declarator )* ( 'OPTIONAL' )? | ( pointer )* IDENTIFIER );", 46, 0, self.input)\r
 \r
@@ -3680,7 +3680,7 @@ class CParser(Parser):
                     self.declaration_specifiers()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:330:27: ( declarator | abstract_declarator )*\r
                     while True: #loop43\r
                         alt43 = 3\r
@@ -3764,7 +3764,7 @@ class CParser(Parser):
                             self.declarator()\r
                             self.following.pop()\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         elif alt43 == 2:\r
@@ -3773,7 +3773,7 @@ class CParser(Parser):
                             self.abstract_declarator()\r
                             self.following.pop()\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         else:\r
@@ -3790,7 +3790,7 @@ class CParser(Parser):
                         # C.g:330:62: 'OPTIONAL'\r
                         self.match(self.input, 53, self.FOLLOW_53_in_parameter_declaration1004)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -3813,7 +3813,7 @@ class CParser(Parser):
                             self.pointer()\r
                             self.following.pop()\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         else:\r
@@ -3822,7 +3822,7 @@ class CParser(Parser):
 \r
                     self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_parameter_declaration1016)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -3835,7 +3835,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end parameter_declaration\r
 \r
@@ -3848,13 +3848,13 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 29):\r
-                    return \r
+                    return\r
 \r
                 # C.g:336:2: ( IDENTIFIER ( ',' IDENTIFIER )* )\r
                 # C.g:336:4: IDENTIFIER ( ',' IDENTIFIER )*\r
                 self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1027)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:337:2: ( ',' IDENTIFIER )*\r
                 while True: #loop47\r
                     alt47 = 2\r
@@ -3868,10 +3868,10 @@ class CParser(Parser):
                         # C.g:337:3: ',' IDENTIFIER\r
                         self.match(self.input, 27, self.FOLLOW_27_in_identifier_list1031)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list1033)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -3891,7 +3891,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end identifier_list\r
 \r
@@ -3904,7 +3904,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 30):\r
-                    return \r
+                    return\r
 \r
                 # C.g:341:2: ( specifier_qualifier_list ( abstract_declarator )? | type_id )\r
                 alt49 = 2\r
@@ -3922,7 +3922,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 13, self.input)\r
 \r
@@ -3931,7 +3931,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("340:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 49, 0, self.input)\r
 \r
@@ -3943,7 +3943,7 @@ class CParser(Parser):
                     self.specifier_qualifier_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:341:29: ( abstract_declarator )?\r
                     alt48 = 2\r
                     LA48_0 = self.input.LA(1)\r
@@ -3956,7 +3956,7 @@ class CParser(Parser):
                         self.abstract_declarator()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -3968,7 +3968,7 @@ class CParser(Parser):
                     self.type_id()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -3981,7 +3981,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end type_name\r
 \r
@@ -3994,7 +3994,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 31):\r
-                    return \r
+                    return\r
 \r
                 # C.g:346:2: ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator )\r
                 alt51 = 2\r
@@ -4007,7 +4007,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("345:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator );", 51, 0, self.input)\r
 \r
@@ -4019,7 +4019,7 @@ class CParser(Parser):
                     self.pointer()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:346:12: ( direct_abstract_declarator )?\r
                     alt50 = 2\r
                     LA50_0 = self.input.LA(1)\r
@@ -4204,7 +4204,7 @@ class CParser(Parser):
                         self.direct_abstract_declarator()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -4216,7 +4216,7 @@ class CParser(Parser):
                     self.direct_abstract_declarator()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -4229,7 +4229,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end abstract_declarator\r
 \r
@@ -4242,7 +4242,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 32):\r
-                    return \r
+                    return\r
 \r
                 # C.g:351:2: ( ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* )\r
                 # C.g:351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )*\r
@@ -4264,7 +4264,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 18, self.input)\r
 \r
@@ -4275,7 +4275,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 1, self.input)\r
 \r
@@ -4286,7 +4286,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("351:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 52, 0, self.input)\r
 \r
@@ -4296,15 +4296,15 @@ class CParser(Parser):
                     # C.g:351:6: '(' abstract_declarator ')'\r
                     self.match(self.input, 62, self.FOLLOW_62_in_direct_abstract_declarator1086)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_abstract_declarator_in_direct_abstract_declarator1088)\r
                     self.abstract_declarator()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_direct_abstract_declarator1090)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt52 == 2:\r
@@ -4313,7 +4313,7 @@ class CParser(Parser):
                     self.abstract_declarator_suffix()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -4560,7 +4560,7 @@ class CParser(Parser):
                         self.abstract_declarator_suffix()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -4580,7 +4580,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end direct_abstract_declarator\r
 \r
@@ -4593,7 +4593,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 33):\r
-                    return \r
+                    return\r
 \r
                 # C.g:355:2: ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' )\r
                 alt54 = 4\r
@@ -4609,7 +4609,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 1, self.input)\r
 \r
@@ -4625,7 +4625,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 2, self.input)\r
 \r
@@ -4634,7 +4634,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("354:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 54, 0, self.input)\r
 \r
@@ -4644,50 +4644,50 @@ class CParser(Parser):
                     # C.g:355:4: '[' ']'\r
                     self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1110)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 65, self.FOLLOW_65_in_abstract_declarator_suffix1112)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt54 == 2:\r
                     # C.g:356:4: '[' constant_expression ']'\r
                     self.match(self.input, 64, self.FOLLOW_64_in_abstract_declarator_suffix1117)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_constant_expression_in_abstract_declarator_suffix1119)\r
                     self.constant_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 65, self.FOLLOW_65_in_abstract_declarator_suffix1121)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt54 == 3:\r
                     # C.g:357:4: '(' ')'\r
                     self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1126)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1128)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt54 == 4:\r
                     # C.g:358:4: '(' parameter_type_list ')'\r
                     self.match(self.input, 62, self.FOLLOW_62_in_abstract_declarator_suffix1133)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_parameter_type_list_in_abstract_declarator_suffix1135)\r
                     self.parameter_type_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_abstract_declarator_suffix1137)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -4700,7 +4700,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end abstract_declarator_suffix\r
 \r
@@ -4713,7 +4713,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 34):\r
-                    return \r
+                    return\r
 \r
                 # C.g:363:2: ( assignment_expression | '{' initializer_list ( ',' )? '}' )\r
                 alt56 = 2\r
@@ -4726,7 +4726,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("361:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' );", 56, 0, self.input)\r
 \r
@@ -4738,19 +4738,19 @@ class CParser(Parser):
                     self.assignment_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt56 == 2:\r
                     # C.g:364:4: '{' initializer_list ( ',' )? '}'\r
                     self.match(self.input, 43, self.FOLLOW_43_in_initializer1155)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_initializer_list_in_initializer1157)\r
                     self.initializer_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:364:25: ( ',' )?\r
                     alt55 = 2\r
                     LA55_0 = self.input.LA(1)\r
@@ -4761,13 +4761,13 @@ class CParser(Parser):
                         # C.g:0:0: ','\r
                         self.match(self.input, 27, self.FOLLOW_27_in_initializer1159)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
                     self.match(self.input, 44, self.FOLLOW_44_in_initializer1162)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -4780,7 +4780,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end initializer\r
 \r
@@ -4793,7 +4793,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 35):\r
-                    return \r
+                    return\r
 \r
                 # C.g:368:2: ( initializer ( ',' initializer )* )\r
                 # C.g:368:4: initializer ( ',' initializer )*\r
@@ -4801,7 +4801,7 @@ class CParser(Parser):
                 self.initializer()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:368:16: ( ',' initializer )*\r
                 while True: #loop57\r
                     alt57 = 2\r
@@ -4820,12 +4820,12 @@ class CParser(Parser):
                         # C.g:368:17: ',' initializer\r
                         self.match(self.input, 27, self.FOLLOW_27_in_initializer_list1176)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_initializer_in_initializer_list1178)\r
                         self.initializer()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -4845,7 +4845,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end initializer_list\r
 \r
@@ -4956,7 +4956,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 37):\r
-                    return \r
+                    return\r
 \r
                 # C.g:378:2: ( ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* )\r
                 # C.g:378:4: ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )*\r
@@ -4966,7 +4966,7 @@ class CParser(Parser):
                 self.multiplicative_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -4985,24 +4985,24 @@ class CParser(Parser):
                         # C.g:378:33: '+' multiplicative_expression\r
                         self.match(self.input, 68, self.FOLLOW_68_in_additive_expression1229)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1231)\r
                         self.multiplicative_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt61 == 2:\r
                         # C.g:378:65: '-' multiplicative_expression\r
                         self.match(self.input, 69, self.FOLLOW_69_in_additive_expression1235)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1237)\r
                         self.multiplicative_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -5022,7 +5022,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end additive_expression\r
 \r
@@ -5035,7 +5035,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 38):\r
-                    return \r
+                    return\r
 \r
                 # C.g:382:2: ( ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* )\r
                 # C.g:382:4: ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )*\r
@@ -5045,7 +5045,7 @@ class CParser(Parser):
                 self.cast_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -5064,36 +5064,36 @@ class CParser(Parser):
                         # C.g:382:23: '*' cast_expression\r
                         self.match(self.input, 66, self.FOLLOW_66_in_multiplicative_expression1255)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1257)\r
                         self.cast_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt62 == 2:\r
                         # C.g:382:45: '/' cast_expression\r
                         self.match(self.input, 70, self.FOLLOW_70_in_multiplicative_expression1261)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1263)\r
                         self.cast_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt62 == 3:\r
                         # C.g:382:67: '%' cast_expression\r
                         self.match(self.input, 71, self.FOLLOW_71_in_multiplicative_expression1267)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1269)\r
                         self.cast_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -5113,7 +5113,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end multiplicative_expression\r
 \r
@@ -5126,7 +5126,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 39):\r
-                    return \r
+                    return\r
 \r
                 # C.g:386:2: ( '(' type_name ')' cast_expression | unary_expression )\r
                 alt63 = 2\r
@@ -5146,7 +5146,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 25, self.input)\r
 \r
@@ -5157,7 +5157,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 1, self.input)\r
 \r
@@ -5168,7 +5168,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("385:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 63, 0, self.input)\r
 \r
@@ -5178,20 +5178,20 @@ class CParser(Parser):
                     # C.g:386:4: '(' type_name ')' cast_expression\r
                     self.match(self.input, 62, self.FOLLOW_62_in_cast_expression1282)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_type_name_in_cast_expression1284)\r
                     self.type_name()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_cast_expression1286)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_cast_expression_in_cast_expression1288)\r
                     self.cast_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt63 == 2:\r
@@ -5200,7 +5200,7 @@ class CParser(Parser):
                     self.unary_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -5213,7 +5213,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end cast_expression\r
 \r
@@ -5226,7 +5226,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 40):\r
-                    return \r
+                    return\r
 \r
                 # C.g:391:2: ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' )\r
                 alt64 = 6\r
@@ -5252,7 +5252,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 13, self.input)\r
 \r
@@ -5263,7 +5263,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 12, self.input)\r
 \r
@@ -5272,7 +5272,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("390:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 64, 0, self.input)\r
 \r
@@ -5284,31 +5284,31 @@ class CParser(Parser):
                     self.postfix_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt64 == 2:\r
                     # C.g:392:4: '++' unary_expression\r
                     self.match(self.input, 72, self.FOLLOW_72_in_unary_expression1309)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_unary_expression_in_unary_expression1311)\r
                     self.unary_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt64 == 3:\r
                     # C.g:393:4: '--' unary_expression\r
                     self.match(self.input, 73, self.FOLLOW_73_in_unary_expression1316)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_unary_expression_in_unary_expression1318)\r
                     self.unary_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt64 == 4:\r
@@ -5317,42 +5317,42 @@ class CParser(Parser):
                     self.unary_operator()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_cast_expression_in_unary_expression1325)\r
                     self.cast_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt64 == 5:\r
                     # C.g:395:4: 'sizeof' unary_expression\r
                     self.match(self.input, 74, self.FOLLOW_74_in_unary_expression1330)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_unary_expression_in_unary_expression1332)\r
                     self.unary_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt64 == 6:\r
                     # C.g:396:4: 'sizeof' '(' type_name ')'\r
                     self.match(self.input, 74, self.FOLLOW_74_in_unary_expression1337)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 62, self.FOLLOW_62_in_unary_expression1339)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_type_name_in_unary_expression1341)\r
                     self.type_name()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_unary_expression1343)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -5365,7 +5365,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end unary_expression\r
 \r
@@ -5385,13 +5385,13 @@ class CParser(Parser):
         c = None\r
 \r
 \r
-               \r
+\r
         self.postfix_expression_stack[-1].FuncCallText =  ''\r
 \r
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 41):\r
-                    return \r
+                    return\r
 \r
                 # C.g:406:2: (p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )* )\r
                 # C.g:406:6: p= primary_expression ( '[' expression ']' | '(' a= ')' | '(' c= argument_expression_list b= ')' | '(' macro_parameter_list ')' | '.' x= IDENTIFIER | '*' y= IDENTIFIER | '->' z= IDENTIFIER | '++' | '--' )*\r
@@ -5399,7 +5399,7 @@ class CParser(Parser):
                 p = self.primary_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 if self.backtracking == 0:\r
                     self.postfix_expression_stack[-1].FuncCallText += self.input.toString(p.start, p.stop)\r
 \r
@@ -5461,26 +5461,26 @@ class CParser(Parser):
                         # C.g:407:13: '[' expression ']'\r
                         self.match(self.input, 64, self.FOLLOW_64_in_postfix_expression1383)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_expression_in_postfix_expression1385)\r
                         self.expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.match(self.input, 65, self.FOLLOW_65_in_postfix_expression1387)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt65 == 2:\r
                         # C.g:408:13: '(' a= ')'\r
                         self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1401)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         a = self.input.LT(1)\r
                         self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1405)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         if self.backtracking == 0:\r
                             self.StoreFunctionCalling(p.start.line, p.start.charPositionInLine, a.line, a.charPositionInLine, self.postfix_expression_stack[-1].FuncCallText, '')\r
 \r
@@ -5490,16 +5490,16 @@ class CParser(Parser):
                         # C.g:409:13: '(' c= argument_expression_list b= ')'\r
                         self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1420)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_argument_expression_list_in_postfix_expression1424)\r
                         c = self.argument_expression_list()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         b = self.input.LT(1)\r
                         self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1428)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         if self.backtracking == 0:\r
                             self.StoreFunctionCalling(p.start.line, p.start.charPositionInLine, b.line, b.charPositionInLine, self.postfix_expression_stack[-1].FuncCallText, self.input.toString(c.start, c.stop))\r
 \r
@@ -5509,26 +5509,26 @@ class CParser(Parser):
                         # C.g:410:13: '(' macro_parameter_list ')'\r
                         self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1444)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_macro_parameter_list_in_postfix_expression1446)\r
                         self.macro_parameter_list()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.match(self.input, 63, self.FOLLOW_63_in_postfix_expression1448)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt65 == 5:\r
                         # C.g:411:13: '.' x= IDENTIFIER\r
                         self.match(self.input, 75, self.FOLLOW_75_in_postfix_expression1462)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         x = self.input.LT(1)\r
                         self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1466)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         if self.backtracking == 0:\r
                             self.postfix_expression_stack[-1].FuncCallText += '.' + x.text\r
 \r
@@ -5538,11 +5538,11 @@ class CParser(Parser):
                         # C.g:412:13: '*' y= IDENTIFIER\r
                         self.match(self.input, 66, self.FOLLOW_66_in_postfix_expression1482)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         y = self.input.LT(1)\r
                         self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1486)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         if self.backtracking == 0:\r
                             self.postfix_expression_stack[-1].FuncCallText = y.text\r
 \r
@@ -5552,11 +5552,11 @@ class CParser(Parser):
                         # C.g:413:13: '->' z= IDENTIFIER\r
                         self.match(self.input, 76, self.FOLLOW_76_in_postfix_expression1502)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         z = self.input.LT(1)\r
                         self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1506)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         if self.backtracking == 0:\r
                             self.postfix_expression_stack[-1].FuncCallText += '->' + z.text\r
 \r
@@ -5566,14 +5566,14 @@ class CParser(Parser):
                         # C.g:414:13: '++'\r
                         self.match(self.input, 72, self.FOLLOW_72_in_postfix_expression1522)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     elif alt65 == 9:\r
                         # C.g:415:13: '--'\r
                         self.match(self.input, 73, self.FOLLOW_73_in_postfix_expression1536)\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -5594,7 +5594,7 @@ class CParser(Parser):
             self.postfix_expression_stack.pop()\r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end postfix_expression\r
 \r
@@ -5607,7 +5607,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 42):\r
-                    return \r
+                    return\r
 \r
                 # C.g:420:2: ( parameter_declaration ( ',' parameter_declaration )* )\r
                 # C.g:420:4: parameter_declaration ( ',' parameter_declaration )*\r
@@ -5615,7 +5615,7 @@ class CParser(Parser):
                 self.parameter_declaration()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:420:26: ( ',' parameter_declaration )*\r
                 while True: #loop66\r
                     alt66 = 2\r
@@ -5629,12 +5629,12 @@ class CParser(Parser):
                         # C.g:420:27: ',' parameter_declaration\r
                         self.match(self.input, 27, self.FOLLOW_27_in_macro_parameter_list1562)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_parameter_declaration_in_macro_parameter_list1564)\r
                         self.parameter_declaration()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -5654,7 +5654,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end macro_parameter_list\r
 \r
@@ -5667,7 +5667,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 43):\r
-                    return \r
+                    return\r
 \r
                 # C.g:424:2: ( '&' | '*' | '+' | '-' | '~' | '!' )\r
                 # C.g:\r
@@ -5679,7 +5679,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     mse = MismatchedSetException(None, self.input)\r
                     self.recoverFromMismatchedSet(\r
@@ -5701,7 +5701,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end unary_operator\r
 \r
@@ -5812,7 +5812,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 45):\r
-                    return \r
+                    return\r
 \r
                 # C.g:439:5: ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL )\r
                 alt72 = 6\r
@@ -5832,7 +5832,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("438:1: constant : ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | ( ( IDENTIFIER )* ( STRING_LITERAL )+ )+ ( IDENTIFIER )* | FLOATING_POINT_LITERAL );", 72, 0, self.input)\r
 \r
@@ -5842,28 +5842,28 @@ class CParser(Parser):
                     # C.g:439:9: HEX_LITERAL\r
                     self.match(self.input, HEX_LITERAL, self.FOLLOW_HEX_LITERAL_in_constant1643)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt72 == 2:\r
                     # C.g:440:9: OCTAL_LITERAL\r
                     self.match(self.input, OCTAL_LITERAL, self.FOLLOW_OCTAL_LITERAL_in_constant1653)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt72 == 3:\r
                     # C.g:441:9: DECIMAL_LITERAL\r
                     self.match(self.input, DECIMAL_LITERAL, self.FOLLOW_DECIMAL_LITERAL_in_constant1663)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt72 == 4:\r
                     # C.g:442:7: CHARACTER_LITERAL\r
                     self.match(self.input, CHARACTER_LITERAL, self.FOLLOW_CHARACTER_LITERAL_in_constant1671)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt72 == 5:\r
@@ -5907,7 +5907,7 @@ class CParser(Parser):
                                     # C.g:0:0: IDENTIFIER\r
                                     self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1680)\r
                                     if self.failed:\r
-                                        return \r
+                                        return\r
 \r
 \r
                                 else:\r
@@ -5933,7 +5933,7 @@ class CParser(Parser):
                                     # C.g:0:0: STRING_LITERAL\r
                                     self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_constant1683)\r
                                     if self.failed:\r
-                                        return \r
+                                        return\r
 \r
 \r
                                 else:\r
@@ -5942,7 +5942,7 @@ class CParser(Parser):
 \r
                                     if self.backtracking > 0:\r
                                         self.failed = True\r
-                                        return \r
+                                        return\r
 \r
                                     eee = EarlyExitException(69, self.input)\r
                                     raise eee\r
@@ -5958,7 +5958,7 @@ class CParser(Parser):
 \r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             eee = EarlyExitException(70, self.input)\r
                             raise eee\r
@@ -5979,7 +5979,7 @@ class CParser(Parser):
                             # C.g:0:0: IDENTIFIER\r
                             self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_constant1688)\r
                             if self.failed:\r
-                                return \r
+                                return\r
 \r
 \r
                         else:\r
@@ -5992,7 +5992,7 @@ class CParser(Parser):
                     # C.g:444:9: FLOATING_POINT_LITERAL\r
                     self.match(self.input, FLOATING_POINT_LITERAL, self.FOLLOW_FLOATING_POINT_LITERAL_in_constant1699)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -6005,7 +6005,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end constant\r
 \r
@@ -6088,7 +6088,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 47):\r
-                    return \r
+                    return\r
 \r
                 # C.g:454:2: ( conditional_expression )\r
                 # C.g:454:4: conditional_expression\r
@@ -6096,7 +6096,7 @@ class CParser(Parser):
                 self.conditional_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -6110,7 +6110,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end constant_expression\r
 \r
@@ -6123,7 +6123,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 48):\r
-                    return \r
+                    return\r
 \r
                 # C.g:458:2: ( lvalue assignment_operator assignment_expression | conditional_expression )\r
                 alt74 = 2\r
@@ -6140,7 +6140,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 13, self.input)\r
 \r
@@ -6156,7 +6156,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 14, self.input)\r
 \r
@@ -6172,7 +6172,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 15, self.input)\r
 \r
@@ -6188,7 +6188,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 16, self.input)\r
 \r
@@ -6204,7 +6204,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 17, self.input)\r
 \r
@@ -6220,7 +6220,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 18, self.input)\r
 \r
@@ -6236,7 +6236,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 19, self.input)\r
 \r
@@ -6254,7 +6254,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 21, self.input)\r
 \r
@@ -6270,7 +6270,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 22, self.input)\r
 \r
@@ -6281,7 +6281,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 1, self.input)\r
 \r
@@ -6299,7 +6299,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 44, self.input)\r
 \r
@@ -6315,7 +6315,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 45, self.input)\r
 \r
@@ -6331,7 +6331,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 46, self.input)\r
 \r
@@ -6347,7 +6347,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 47, self.input)\r
 \r
@@ -6363,7 +6363,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 48, self.input)\r
 \r
@@ -6379,7 +6379,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 49, self.input)\r
 \r
@@ -6395,7 +6395,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 50, self.input)\r
 \r
@@ -6408,7 +6408,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 2, self.input)\r
 \r
@@ -6426,7 +6426,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 73, self.input)\r
 \r
@@ -6442,7 +6442,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 74, self.input)\r
 \r
@@ -6458,7 +6458,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 75, self.input)\r
 \r
@@ -6474,7 +6474,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 76, self.input)\r
 \r
@@ -6490,7 +6490,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 77, self.input)\r
 \r
@@ -6506,7 +6506,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 78, self.input)\r
 \r
@@ -6522,7 +6522,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 79, self.input)\r
 \r
@@ -6535,7 +6535,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 3, self.input)\r
 \r
@@ -6553,7 +6553,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 102, self.input)\r
 \r
@@ -6569,7 +6569,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 103, self.input)\r
 \r
@@ -6585,7 +6585,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 104, self.input)\r
 \r
@@ -6601,7 +6601,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 105, self.input)\r
 \r
@@ -6617,7 +6617,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 106, self.input)\r
 \r
@@ -6633,7 +6633,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 107, self.input)\r
 \r
@@ -6649,7 +6649,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 108, self.input)\r
 \r
@@ -6662,7 +6662,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 4, self.input)\r
 \r
@@ -6680,7 +6680,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 131, self.input)\r
 \r
@@ -6696,7 +6696,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 132, self.input)\r
 \r
@@ -6712,7 +6712,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 133, self.input)\r
 \r
@@ -6728,7 +6728,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 134, self.input)\r
 \r
@@ -6744,7 +6744,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 135, self.input)\r
 \r
@@ -6760,7 +6760,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 136, self.input)\r
 \r
@@ -6776,7 +6776,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 137, self.input)\r
 \r
@@ -6789,7 +6789,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 5, self.input)\r
 \r
@@ -6807,7 +6807,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 160, self.input)\r
 \r
@@ -6823,7 +6823,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 161, self.input)\r
 \r
@@ -6839,7 +6839,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 162, self.input)\r
 \r
@@ -6855,7 +6855,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 163, self.input)\r
 \r
@@ -6871,7 +6871,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 164, self.input)\r
 \r
@@ -6887,7 +6887,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 165, self.input)\r
 \r
@@ -6903,7 +6903,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 166, self.input)\r
 \r
@@ -6919,7 +6919,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 167, self.input)\r
 \r
@@ -6937,7 +6937,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 189, self.input)\r
 \r
@@ -6948,7 +6948,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 6, self.input)\r
 \r
@@ -6966,7 +6966,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 191, self.input)\r
 \r
@@ -6982,7 +6982,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 192, self.input)\r
 \r
@@ -6998,7 +6998,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 193, self.input)\r
 \r
@@ -7014,7 +7014,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 194, self.input)\r
 \r
@@ -7030,7 +7030,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 195, self.input)\r
 \r
@@ -7046,7 +7046,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 196, self.input)\r
 \r
@@ -7062,7 +7062,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 197, self.input)\r
 \r
@@ -7075,7 +7075,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 7, self.input)\r
 \r
@@ -7093,7 +7093,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 220, self.input)\r
 \r
@@ -7109,7 +7109,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 221, self.input)\r
 \r
@@ -7125,7 +7125,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 222, self.input)\r
 \r
@@ -7141,7 +7141,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 223, self.input)\r
 \r
@@ -7157,7 +7157,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 224, self.input)\r
 \r
@@ -7173,7 +7173,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 225, self.input)\r
 \r
@@ -7189,7 +7189,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 226, self.input)\r
 \r
@@ -7205,7 +7205,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 227, self.input)\r
 \r
@@ -7221,7 +7221,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 228, self.input)\r
 \r
@@ -7237,7 +7237,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 229, self.input)\r
 \r
@@ -7253,7 +7253,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 230, self.input)\r
 \r
@@ -7269,7 +7269,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 231, self.input)\r
 \r
@@ -7280,7 +7280,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 8, self.input)\r
 \r
@@ -7298,7 +7298,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 244, self.input)\r
 \r
@@ -7314,7 +7314,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 245, self.input)\r
 \r
@@ -7330,7 +7330,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 246, self.input)\r
 \r
@@ -7346,7 +7346,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 247, self.input)\r
 \r
@@ -7362,7 +7362,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 248, self.input)\r
 \r
@@ -7378,7 +7378,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 249, self.input)\r
 \r
@@ -7394,7 +7394,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 250, self.input)\r
 \r
@@ -7410,7 +7410,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 251, self.input)\r
 \r
@@ -7426,7 +7426,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 252, self.input)\r
 \r
@@ -7442,7 +7442,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 253, self.input)\r
 \r
@@ -7458,7 +7458,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 254, self.input)\r
 \r
@@ -7474,7 +7474,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 255, self.input)\r
 \r
@@ -7483,7 +7483,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 9, self.input)\r
 \r
@@ -7501,7 +7501,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 256, self.input)\r
 \r
@@ -7517,7 +7517,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 257, self.input)\r
 \r
@@ -7533,7 +7533,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 258, self.input)\r
 \r
@@ -7549,7 +7549,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 259, self.input)\r
 \r
@@ -7565,7 +7565,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 260, self.input)\r
 \r
@@ -7581,7 +7581,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 261, self.input)\r
 \r
@@ -7597,7 +7597,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 262, self.input)\r
 \r
@@ -7613,7 +7613,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 263, self.input)\r
 \r
@@ -7629,7 +7629,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 264, self.input)\r
 \r
@@ -7645,7 +7645,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 265, self.input)\r
 \r
@@ -7661,7 +7661,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 266, self.input)\r
 \r
@@ -7677,7 +7677,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 267, self.input)\r
 \r
@@ -7686,7 +7686,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 10, self.input)\r
 \r
@@ -7704,7 +7704,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 268, self.input)\r
 \r
@@ -7720,7 +7720,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 269, self.input)\r
 \r
@@ -7736,7 +7736,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 270, self.input)\r
 \r
@@ -7752,7 +7752,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 271, self.input)\r
 \r
@@ -7768,7 +7768,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 272, self.input)\r
 \r
@@ -7784,7 +7784,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 273, self.input)\r
 \r
@@ -7800,7 +7800,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 274, self.input)\r
 \r
@@ -7816,7 +7816,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 275, self.input)\r
 \r
@@ -7832,7 +7832,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 276, self.input)\r
 \r
@@ -7848,7 +7848,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 277, self.input)\r
 \r
@@ -7864,7 +7864,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 278, self.input)\r
 \r
@@ -7880,7 +7880,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 279, self.input)\r
 \r
@@ -7889,7 +7889,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 11, self.input)\r
 \r
@@ -7907,7 +7907,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 280, self.input)\r
 \r
@@ -7923,7 +7923,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 281, self.input)\r
 \r
@@ -7939,7 +7939,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 282, self.input)\r
 \r
@@ -7955,7 +7955,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 283, self.input)\r
 \r
@@ -7971,7 +7971,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 284, self.input)\r
 \r
@@ -7987,7 +7987,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 285, self.input)\r
 \r
@@ -8003,7 +8003,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 286, self.input)\r
 \r
@@ -8019,7 +8019,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 287, self.input)\r
 \r
@@ -8035,7 +8035,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 288, self.input)\r
 \r
@@ -8051,7 +8051,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 289, self.input)\r
 \r
@@ -8067,7 +8067,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 290, self.input)\r
 \r
@@ -8083,7 +8083,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 291, self.input)\r
 \r
@@ -8092,7 +8092,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 12, self.input)\r
 \r
@@ -8101,7 +8101,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("457:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 74, 0, self.input)\r
 \r
@@ -8113,17 +8113,17 @@ class CParser(Parser):
                     self.lvalue()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_assignment_operator_in_assignment_expression1746)\r
                     self.assignment_operator()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_assignment_expression_in_assignment_expression1748)\r
                     self.assignment_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt74 == 2:\r
@@ -8132,7 +8132,7 @@ class CParser(Parser):
                     self.conditional_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -8145,7 +8145,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end assignment_expression\r
 \r
@@ -8158,7 +8158,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 49):\r
-                    return \r
+                    return\r
 \r
                 # C.g:463:2: ( unary_expression )\r
                 # C.g:463:4: unary_expression\r
@@ -8166,7 +8166,7 @@ class CParser(Parser):
                 self.unary_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -8180,7 +8180,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end lvalue\r
 \r
@@ -8193,7 +8193,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 50):\r
-                    return \r
+                    return\r
 \r
                 # C.g:467:2: ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' )\r
                 # C.g:\r
@@ -8205,7 +8205,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     mse = MismatchedSetException(None, self.input)\r
                     self.recoverFromMismatchedSet(\r
@@ -8227,7 +8227,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end assignment_operator\r
 \r
@@ -8243,7 +8243,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 51):\r
-                    return \r
+                    return\r
 \r
                 # C.g:481:2: (e= logical_or_expression ( '?' expression ':' conditional_expression )? )\r
                 # C.g:481:4: e= logical_or_expression ( '?' expression ':' conditional_expression )?\r
@@ -8251,7 +8251,7 @@ class CParser(Parser):
                 e = self.logical_or_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:481:28: ( '?' expression ':' conditional_expression )?\r
                 alt75 = 2\r
                 LA75_0 = self.input.LA(1)\r
@@ -8262,20 +8262,20 @@ class CParser(Parser):
                     # C.g:481:29: '?' expression ':' conditional_expression\r
                     self.match(self.input, 90, self.FOLLOW_90_in_conditional_expression1842)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_in_conditional_expression1844)\r
                     self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 47, self.FOLLOW_47_in_conditional_expression1846)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_conditional_expression_in_conditional_expression1848)\r
                     self.conditional_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
                         self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start, e.stop))\r
 \r
@@ -8295,7 +8295,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end conditional_expression\r
 \r
@@ -8378,7 +8378,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 53):\r
-                    return \r
+                    return\r
 \r
                 # C.g:489:2: ( inclusive_or_expression ( '&&' inclusive_or_expression )* )\r
                 # C.g:489:4: inclusive_or_expression ( '&&' inclusive_or_expression )*\r
@@ -8386,7 +8386,7 @@ class CParser(Parser):
                 self.inclusive_or_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:489:28: ( '&&' inclusive_or_expression )*\r
                 while True: #loop77\r
                     alt77 = 2\r
@@ -8400,12 +8400,12 @@ class CParser(Parser):
                         # C.g:489:29: '&&' inclusive_or_expression\r
                         self.match(self.input, 92, self.FOLLOW_92_in_logical_and_expression1884)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1886)\r
                         self.inclusive_or_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8425,7 +8425,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end logical_and_expression\r
 \r
@@ -8438,7 +8438,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 54):\r
-                    return \r
+                    return\r
 \r
                 # C.g:493:2: ( exclusive_or_expression ( '|' exclusive_or_expression )* )\r
                 # C.g:493:4: exclusive_or_expression ( '|' exclusive_or_expression )*\r
@@ -8446,7 +8446,7 @@ class CParser(Parser):
                 self.exclusive_or_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:493:28: ( '|' exclusive_or_expression )*\r
                 while True: #loop78\r
                     alt78 = 2\r
@@ -8460,12 +8460,12 @@ class CParser(Parser):
                         # C.g:493:29: '|' exclusive_or_expression\r
                         self.match(self.input, 93, self.FOLLOW_93_in_inclusive_or_expression1902)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1904)\r
                         self.exclusive_or_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8485,7 +8485,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end inclusive_or_expression\r
 \r
@@ -8498,7 +8498,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 55):\r
-                    return \r
+                    return\r
 \r
                 # C.g:497:2: ( and_expression ( '^' and_expression )* )\r
                 # C.g:497:4: and_expression ( '^' and_expression )*\r
@@ -8506,7 +8506,7 @@ class CParser(Parser):
                 self.and_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:497:19: ( '^' and_expression )*\r
                 while True: #loop79\r
                     alt79 = 2\r
@@ -8520,12 +8520,12 @@ class CParser(Parser):
                         # C.g:497:20: '^' and_expression\r
                         self.match(self.input, 94, self.FOLLOW_94_in_exclusive_or_expression1920)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1922)\r
                         self.and_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8545,7 +8545,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end exclusive_or_expression\r
 \r
@@ -8558,7 +8558,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 56):\r
-                    return \r
+                    return\r
 \r
                 # C.g:501:2: ( equality_expression ( '&' equality_expression )* )\r
                 # C.g:501:4: equality_expression ( '&' equality_expression )*\r
@@ -8566,7 +8566,7 @@ class CParser(Parser):
                 self.equality_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:501:24: ( '&' equality_expression )*\r
                 while True: #loop80\r
                     alt80 = 2\r
@@ -8580,12 +8580,12 @@ class CParser(Parser):
                         # C.g:501:25: '&' equality_expression\r
                         self.match(self.input, 77, self.FOLLOW_77_in_and_expression1938)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_equality_expression_in_and_expression1940)\r
                         self.equality_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8605,7 +8605,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end and_expression\r
 \r
@@ -8618,7 +8618,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 57):\r
-                    return \r
+                    return\r
 \r
                 # C.g:504:2: ( relational_expression ( ( '==' | '!=' ) relational_expression )* )\r
                 # C.g:504:4: relational_expression ( ( '==' | '!=' ) relational_expression )*\r
@@ -8626,7 +8626,7 @@ class CParser(Parser):
                 self.relational_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:504:26: ( ( '==' | '!=' ) relational_expression )*\r
                 while True: #loop81\r
                     alt81 = 2\r
@@ -8646,7 +8646,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             mse = MismatchedSetException(None, self.input)\r
                             self.recoverFromMismatchedSet(\r
@@ -8659,7 +8659,7 @@ class CParser(Parser):
                         self.relational_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8679,7 +8679,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end equality_expression\r
 \r
@@ -8692,7 +8692,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 58):\r
-                    return \r
+                    return\r
 \r
                 # C.g:508:2: ( shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* )\r
                 # C.g:508:4: shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*\r
@@ -8700,7 +8700,7 @@ class CParser(Parser):
                 self.shift_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:508:21: ( ( '<' | '>' | '<=' | '>=' ) shift_expression )*\r
                 while True: #loop82\r
                     alt82 = 2\r
@@ -8720,7 +8720,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             mse = MismatchedSetException(None, self.input)\r
                             self.recoverFromMismatchedSet(\r
@@ -8733,7 +8733,7 @@ class CParser(Parser):
                         self.shift_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8753,7 +8753,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end relational_expression\r
 \r
@@ -8766,7 +8766,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 59):\r
-                    return \r
+                    return\r
 \r
                 # C.g:512:2: ( additive_expression ( ( '<<' | '>>' ) additive_expression )* )\r
                 # C.g:512:4: additive_expression ( ( '<<' | '>>' ) additive_expression )*\r
@@ -8774,7 +8774,7 @@ class CParser(Parser):
                 self.additive_expression()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:512:24: ( ( '<<' | '>>' ) additive_expression )*\r
                 while True: #loop83\r
                     alt83 = 2\r
@@ -8794,7 +8794,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             mse = MismatchedSetException(None, self.input)\r
                             self.recoverFromMismatchedSet(\r
@@ -8807,7 +8807,7 @@ class CParser(Parser):
                         self.additive_expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -8827,7 +8827,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end shift_expression\r
 \r
@@ -8840,7 +8840,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 60):\r
-                    return \r
+                    return\r
 \r
                 # C.g:518:2: ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration )\r
                 alt84 = 11\r
@@ -8861,7 +8861,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 43, self.input)\r
 \r
@@ -8881,7 +8881,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 47, self.input)\r
 \r
@@ -8897,7 +8897,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 53, self.input)\r
 \r
@@ -8913,7 +8913,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 68, self.input)\r
 \r
@@ -8924,7 +8924,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 1, self.input)\r
 \r
@@ -8953,7 +8953,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("517:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement | asm2_statement | asm1_statement | asm_statement | declaration );", 84, 0, self.input)\r
 \r
@@ -8965,7 +8965,7 @@ class CParser(Parser):
                     self.labeled_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 2:\r
@@ -8974,7 +8974,7 @@ class CParser(Parser):
                     self.compound_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 3:\r
@@ -8983,7 +8983,7 @@ class CParser(Parser):
                     self.expression_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 4:\r
@@ -8992,7 +8992,7 @@ class CParser(Parser):
                     self.selection_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 5:\r
@@ -9001,7 +9001,7 @@ class CParser(Parser):
                     self.iteration_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 6:\r
@@ -9010,7 +9010,7 @@ class CParser(Parser):
                     self.jump_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 7:\r
@@ -9019,7 +9019,7 @@ class CParser(Parser):
                     self.macro_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 8:\r
@@ -9028,7 +9028,7 @@ class CParser(Parser):
                     self.asm2_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 9:\r
@@ -9037,7 +9037,7 @@ class CParser(Parser):
                     self.asm1_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 10:\r
@@ -9046,7 +9046,7 @@ class CParser(Parser):
                     self.asm_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt84 == 11:\r
@@ -9055,7 +9055,7 @@ class CParser(Parser):
                     self.declaration()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -9068,7 +9068,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end statement\r
 \r
@@ -9081,7 +9081,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 61):\r
-                    return \r
+                    return\r
 \r
                 # C.g:532:2: ( ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';' )\r
                 # C.g:532:4: ( '__asm__' )? IDENTIFIER '(' (~ ( ';' ) )* ')' ';'\r
@@ -9095,16 +9095,16 @@ class CParser(Parser):
                     # C.g:0:0: '__asm__'\r
                     self.match(self.input, 103, self.FOLLOW_103_in_asm2_statement2086)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
                 self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_asm2_statement2089)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.match(self.input, 62, self.FOLLOW_62_in_asm2_statement2091)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:532:30: (~ ( ';' ) )*\r
                 while True: #loop86\r
                     alt86 = 2\r
@@ -9131,7 +9131,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             mse = MismatchedSetException(None, self.input)\r
                             self.recoverFromMismatchedSet(\r
@@ -9148,10 +9148,10 @@ class CParser(Parser):
 \r
                 self.match(self.input, 63, self.FOLLOW_63_in_asm2_statement2101)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.match(self.input, 25, self.FOLLOW_25_in_asm2_statement2103)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -9165,7 +9165,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end asm2_statement\r
 \r
@@ -9178,16 +9178,16 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 62):\r
-                    return \r
+                    return\r
 \r
                 # C.g:536:2: ( '_asm' '{' (~ ( '}' ) )* '}' )\r
                 # C.g:536:4: '_asm' '{' (~ ( '}' ) )* '}'\r
                 self.match(self.input, 104, self.FOLLOW_104_in_asm1_statement2115)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.match(self.input, 43, self.FOLLOW_43_in_asm1_statement2117)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:536:15: (~ ( '}' ) )*\r
                 while True: #loop87\r
                     alt87 = 2\r
@@ -9207,7 +9207,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             mse = MismatchedSetException(None, self.input)\r
                             self.recoverFromMismatchedSet(\r
@@ -9224,7 +9224,7 @@ class CParser(Parser):
 \r
                 self.match(self.input, 44, self.FOLLOW_44_in_asm1_statement2127)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -9238,7 +9238,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end asm1_statement\r
 \r
@@ -9251,16 +9251,16 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 63):\r
-                    return \r
+                    return\r
 \r
                 # C.g:540:2: ( '__asm' '{' (~ ( '}' ) )* '}' )\r
                 # C.g:540:4: '__asm' '{' (~ ( '}' ) )* '}'\r
                 self.match(self.input, 105, self.FOLLOW_105_in_asm_statement2138)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.match(self.input, 43, self.FOLLOW_43_in_asm_statement2140)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:540:16: (~ ( '}' ) )*\r
                 while True: #loop88\r
                     alt88 = 2\r
@@ -9280,7 +9280,7 @@ class CParser(Parser):
                         else:\r
                             if self.backtracking > 0:\r
                                 self.failed = True\r
-                                return \r
+                                return\r
 \r
                             mse = MismatchedSetException(None, self.input)\r
                             self.recoverFromMismatchedSet(\r
@@ -9297,7 +9297,7 @@ class CParser(Parser):
 \r
                 self.match(self.input, 44, self.FOLLOW_44_in_asm_statement2150)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -9311,7 +9311,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end asm_statement\r
 \r
@@ -9324,16 +9324,16 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 64):\r
-                    return \r
+                    return\r
 \r
                 # C.g:544:2: ( IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')' )\r
                 # C.g:544:4: IDENTIFIER '(' ( declaration )* ( statement_list )? ( expression )? ')'\r
                 self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_macro_statement2162)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 self.match(self.input, 62, self.FOLLOW_62_in_macro_statement2164)\r
                 if self.failed:\r
-                    return \r
+                    return\r
                 # C.g:544:19: ( declaration )*\r
                 while True: #loop89\r
                     alt89 = 2\r
@@ -11235,7 +11235,7 @@ class CParser(Parser):
                         self.declaration()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -12441,7 +12441,7 @@ class CParser(Parser):
                     self.statement_list()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -12457,13 +12457,13 @@ class CParser(Parser):
                     self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
                 self.match(self.input, 63, self.FOLLOW_63_in_macro_statement2176)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
 \r
@@ -12477,7 +12477,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end macro_statement\r
 \r
@@ -12490,7 +12490,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 65):\r
-                    return \r
+                    return\r
 \r
                 # C.g:548:2: ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement )\r
                 alt92 = 3\r
@@ -12504,7 +12504,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("547:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement );", 92, 0, self.input)\r
 \r
@@ -12514,50 +12514,50 @@ class CParser(Parser):
                     # C.g:548:4: IDENTIFIER ':' statement\r
                     self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_labeled_statement2188)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2190)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_labeled_statement2192)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt92 == 2:\r
                     # C.g:549:4: 'case' constant_expression ':' statement\r
                     self.match(self.input, 106, self.FOLLOW_106_in_labeled_statement2197)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_constant_expression_in_labeled_statement2199)\r
                     self.constant_expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2201)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_labeled_statement2203)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt92 == 3:\r
                     # C.g:550:4: 'default' ':' statement\r
                     self.match(self.input, 107, self.FOLLOW_107_in_labeled_statement2208)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 47, self.FOLLOW_47_in_labeled_statement2210)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_labeled_statement2212)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -12570,7 +12570,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end labeled_statement\r
 \r
@@ -14553,7 +14553,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 67):\r
-                    return \r
+                    return\r
 \r
                 # C.g:558:2: ( ( statement )+ )\r
                 # C.g:558:4: ( statement )+\r
@@ -16231,7 +16231,7 @@ class CParser(Parser):
                         self.statement()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
                     else:\r
@@ -16240,7 +16240,7 @@ class CParser(Parser):
 \r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         eee = EarlyExitException(95, self.input)\r
                         raise eee\r
@@ -16261,7 +16261,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end statement_list\r
 \r
@@ -16348,7 +16348,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 69):\r
-                    return \r
+                    return\r
 \r
                 # C.g:567:2: ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement )\r
                 alt98 = 2\r
@@ -16361,7 +16361,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("566:1: selection_statement : ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement );", 98, 0, self.input)\r
 \r
@@ -16371,18 +16371,18 @@ class CParser(Parser):
                     # C.g:567:4: 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )?\r
                     self.match(self.input, 108, self.FOLLOW_108_in_selection_statement2272)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2274)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_in_selection_statement2278)\r
                     e = self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_selection_statement2280)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
                         self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start, e.stop))\r
 \r
@@ -16390,7 +16390,7 @@ class CParser(Parser):
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:567:167: ( options {k=1; backtrack=false; } : 'else' statement )?\r
                     alt97 = 2\r
                     LA97_0 = self.input.LA(1)\r
@@ -16401,12 +16401,12 @@ class CParser(Parser):
                         # C.g:567:200: 'else' statement\r
                         self.match(self.input, 109, self.FOLLOW_109_in_selection_statement2299)\r
                         if self.failed:\r
-                            return \r
+                            return\r
                         self.following.append(self.FOLLOW_statement_in_selection_statement2301)\r
                         self.statement()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
@@ -16416,23 +16416,23 @@ class CParser(Parser):
                     # C.g:568:4: 'switch' '(' expression ')' statement\r
                     self.match(self.input, 110, self.FOLLOW_110_in_selection_statement2308)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 62, self.FOLLOW_62_in_selection_statement2310)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_in_selection_statement2312)\r
                     self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_selection_statement2314)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_selection_statement2316)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -16445,7 +16445,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end selection_statement\r
 \r
@@ -16461,7 +16461,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 70):\r
-                    return \r
+                    return\r
 \r
                 # C.g:572:2: ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement )\r
                 alt100 = 3\r
@@ -16475,7 +16475,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("571:1: iteration_statement : ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement );", 100, 0, self.input)\r
 \r
@@ -16485,23 +16485,23 @@ class CParser(Parser):
                     # C.g:572:4: 'while' '(' e= expression ')' statement\r
                     self.match(self.input, 111, self.FOLLOW_111_in_iteration_statement2327)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2329)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_in_iteration_statement2333)\r
                     e = self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2335)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_iteration_statement2337)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
                         self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start, e.stop))\r
 \r
@@ -16511,29 +16511,29 @@ class CParser(Parser):
                     # C.g:573:4: 'do' statement 'while' '(' e= expression ')' ';'\r
                     self.match(self.input, 112, self.FOLLOW_112_in_iteration_statement2344)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_iteration_statement2346)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 111, self.FOLLOW_111_in_iteration_statement2348)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2350)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_in_iteration_statement2354)\r
                     e = self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2356)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 25, self.FOLLOW_25_in_iteration_statement2358)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
                         self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start, e.stop))\r
 \r
@@ -16543,20 +16543,20 @@ class CParser(Parser):
                     # C.g:574:4: 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement\r
                     self.match(self.input, 113, self.FOLLOW_113_in_iteration_statement2365)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 62, self.FOLLOW_62_in_iteration_statement2367)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2369)\r
                     self.expression_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2373)\r
                     e = self.expression_statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     # C.g:574:58: ( expression )?\r
                     alt99 = 2\r
                     LA99_0 = self.input.LA(1)\r
@@ -16569,18 +16569,18 @@ class CParser(Parser):
                         self.expression()\r
                         self.following.pop()\r
                         if self.failed:\r
-                            return \r
+                            return\r
 \r
 \r
 \r
                     self.match(self.input, 63, self.FOLLOW_63_in_iteration_statement2378)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_statement_in_iteration_statement2380)\r
                     self.statement()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     if self.backtracking == 0:\r
                         self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start, e.stop))\r
 \r
@@ -16596,7 +16596,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end iteration_statement\r
 \r
@@ -16609,7 +16609,7 @@ class CParser(Parser):
         try:\r
             try:\r
                 if self.backtracking > 0 and self.alreadyParsedRule(self.input, 71):\r
-                    return \r
+                    return\r
 \r
                 # C.g:578:2: ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' )\r
                 alt101 = 5\r
@@ -16630,7 +16630,7 @@ class CParser(Parser):
                     else:\r
                         if self.backtracking > 0:\r
                             self.failed = True\r
-                            return \r
+                            return\r
 \r
                         nvae = NoViableAltException("577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 4, self.input)\r
 \r
@@ -16639,7 +16639,7 @@ class CParser(Parser):
                 else:\r
                     if self.backtracking > 0:\r
                         self.failed = True\r
-                        return \r
+                        return\r
 \r
                     nvae = NoViableAltException("577:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 101, 0, self.input)\r
 \r
@@ -16649,58 +16649,58 @@ class CParser(Parser):
                     # C.g:578:4: 'goto' IDENTIFIER ';'\r
                     self.match(self.input, 114, self.FOLLOW_114_in_jump_statement2393)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_jump_statement2395)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2397)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt101 == 2:\r
                     # C.g:579:4: 'continue' ';'\r
                     self.match(self.input, 115, self.FOLLOW_115_in_jump_statement2402)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2404)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt101 == 3:\r
                     # C.g:580:4: 'break' ';'\r
                     self.match(self.input, 116, self.FOLLOW_116_in_jump_statement2409)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2411)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt101 == 4:\r
                     # C.g:581:4: 'return' ';'\r
                     self.match(self.input, 117, self.FOLLOW_117_in_jump_statement2416)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2418)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
                 elif alt101 == 5:\r
                     # C.g:582:4: 'return' expression ';'\r
                     self.match(self.input, 117, self.FOLLOW_117_in_jump_statement2423)\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.following.append(self.FOLLOW_expression_in_jump_statement2425)\r
                     self.expression()\r
                     self.following.pop()\r
                     if self.failed:\r
-                        return \r
+                        return\r
                     self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2427)\r
                     if self.failed:\r
-                        return \r
+                        return\r
 \r
 \r
 \r
@@ -16713,7 +16713,7 @@ class CParser(Parser):
 \r
             pass\r
 \r
-        return \r
+        return\r
 \r
     # $ANTLR end jump_statement\r
 \r
@@ -16725,7 +16725,7 @@ class CParser(Parser):
         self.declaration_specifiers()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred2\r
@@ -16856,7 +16856,7 @@ class CParser(Parser):
             self.declaration_specifiers()\r
             self.following.pop()\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -16864,7 +16864,7 @@ class CParser(Parser):
         self.declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         # C.g:119:41: ( declaration )*\r
         while True: #loop103\r
             alt103 = 2\r
@@ -16880,7 +16880,7 @@ class CParser(Parser):
                 self.declaration()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             else:\r
@@ -16889,7 +16889,7 @@ class CParser(Parser):
 \r
         self.match(self.input, 43, self.FOLLOW_43_in_synpred4108)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred4\r
@@ -16904,7 +16904,7 @@ class CParser(Parser):
         self.declaration()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred5\r
@@ -16919,7 +16919,7 @@ class CParser(Parser):
         self.declaration_specifiers()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred7\r
@@ -16934,7 +16934,7 @@ class CParser(Parser):
         self.declaration_specifiers()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred10\r
@@ -16949,7 +16949,7 @@ class CParser(Parser):
         self.type_specifier()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred14\r
@@ -16964,7 +16964,7 @@ class CParser(Parser):
         self.type_qualifier()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred15\r
@@ -16979,7 +16979,7 @@ class CParser(Parser):
         self.type_qualifier()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred33\r
@@ -16992,7 +16992,7 @@ class CParser(Parser):
         # C.g:225:5: IDENTIFIER ( type_qualifier )* declarator\r
         self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred34442)\r
         if self.failed:\r
-            return \r
+            return\r
         # C.g:225:16: ( type_qualifier )*\r
         while True: #loop106\r
             alt106 = 2\r
@@ -17027,7 +17027,7 @@ class CParser(Parser):
                 self.type_qualifier()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             else:\r
@@ -17038,7 +17038,7 @@ class CParser(Parser):
         self.declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred34\r
@@ -17053,7 +17053,7 @@ class CParser(Parser):
         self.type_qualifier()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred39\r
@@ -17068,7 +17068,7 @@ class CParser(Parser):
         self.type_specifier()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred40\r
@@ -17091,7 +17091,7 @@ class CParser(Parser):
             self.pointer()\r
             self.following.pop()\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17105,7 +17105,7 @@ class CParser(Parser):
             # C.g:297:14: 'EFIAPI'\r
             self.match(self.input, 58, self.FOLLOW_58_in_synpred66788)\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17119,7 +17119,7 @@ class CParser(Parser):
             # C.g:297:26: 'EFI_BOOTSERVICE'\r
             self.match(self.input, 59, self.FOLLOW_59_in_synpred66793)\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17133,7 +17133,7 @@ class CParser(Parser):
             # C.g:297:47: 'EFI_RUNTIMESERVICE'\r
             self.match(self.input, 60, self.FOLLOW_60_in_synpred66798)\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17141,7 +17141,7 @@ class CParser(Parser):
         self.direct_declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred66\r
@@ -17156,7 +17156,7 @@ class CParser(Parser):
         self.declarator_suffix()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred67\r
@@ -17169,7 +17169,7 @@ class CParser(Parser):
         # C.g:304:9: 'EFIAPI'\r
         self.match(self.input, 58, self.FOLLOW_58_in_synpred69830)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred69\r
@@ -17184,7 +17184,7 @@ class CParser(Parser):
         self.declarator_suffix()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred70\r
@@ -17197,15 +17197,15 @@ class CParser(Parser):
         # C.g:310:9: '(' parameter_type_list ')'\r
         self.match(self.input, 62, self.FOLLOW_62_in_synpred73878)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_parameter_type_list_in_synpred73880)\r
         self.parameter_type_list()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, 63, self.FOLLOW_63_in_synpred73882)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred73\r
@@ -17218,15 +17218,15 @@ class CParser(Parser):
         # C.g:311:9: '(' identifier_list ')'\r
         self.match(self.input, 62, self.FOLLOW_62_in_synpred74892)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_identifier_list_in_synpred74894)\r
         self.identifier_list()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, 63, self.FOLLOW_63_in_synpred74896)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred74\r
@@ -17241,7 +17241,7 @@ class CParser(Parser):
         self.type_qualifier()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred75\r
@@ -17256,7 +17256,7 @@ class CParser(Parser):
         self.pointer()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred76\r
@@ -17269,7 +17269,7 @@ class CParser(Parser):
         # C.g:316:4: '*' ( type_qualifier )+ ( pointer )?\r
         self.match(self.input, 66, self.FOLLOW_66_in_synpred77919)\r
         if self.failed:\r
-            return \r
+            return\r
         # C.g:316:8: ( type_qualifier )+\r
         cnt116 = 0\r
         while True: #loop116\r
@@ -17286,7 +17286,7 @@ class CParser(Parser):
                 self.type_qualifier()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             else:\r
@@ -17295,7 +17295,7 @@ class CParser(Parser):
 \r
                 if self.backtracking > 0:\r
                     self.failed = True\r
-                    return \r
+                    return\r
 \r
                 eee = EarlyExitException(116, self.input)\r
                 raise eee\r
@@ -17315,7 +17315,7 @@ class CParser(Parser):
             self.pointer()\r
             self.following.pop()\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17331,12 +17331,12 @@ class CParser(Parser):
         # C.g:317:4: '*' pointer\r
         self.match(self.input, 66, self.FOLLOW_66_in_synpred78930)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_pointer_in_synpred78932)\r
         self.pointer()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred78\r
@@ -17349,7 +17349,7 @@ class CParser(Parser):
         # C.g:326:32: 'OPTIONAL'\r
         self.match(self.input, 53, self.FOLLOW_53_in_synpred81977)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred81\r
@@ -17362,7 +17362,7 @@ class CParser(Parser):
         # C.g:326:27: ',' ( 'OPTIONAL' )? parameter_declaration\r
         self.match(self.input, 27, self.FOLLOW_27_in_synpred82974)\r
         if self.failed:\r
-            return \r
+            return\r
         # C.g:326:31: ( 'OPTIONAL' )?\r
         alt119 = 2\r
         LA119_0 = self.input.LA(1)\r
@@ -17376,7 +17376,7 @@ class CParser(Parser):
             # C.g:326:32: 'OPTIONAL'\r
             self.match(self.input, 53, self.FOLLOW_53_in_synpred82977)\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17384,7 +17384,7 @@ class CParser(Parser):
         self.parameter_declaration()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred82\r
@@ -17399,7 +17399,7 @@ class CParser(Parser):
         self.declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred83\r
@@ -17414,7 +17414,7 @@ class CParser(Parser):
         self.abstract_declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred84\r
@@ -17429,7 +17429,7 @@ class CParser(Parser):
         self.declaration_specifiers()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         # C.g:330:27: ( declarator | abstract_declarator )*\r
         while True: #loop120\r
             alt120 = 3\r
@@ -17513,7 +17513,7 @@ class CParser(Parser):
                 self.declarator()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             elif alt120 == 2:\r
@@ -17522,7 +17522,7 @@ class CParser(Parser):
                 self.abstract_declarator()\r
                 self.following.pop()\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             else:\r
@@ -17539,7 +17539,7 @@ class CParser(Parser):
             # C.g:330:62: 'OPTIONAL'\r
             self.match(self.input, 53, self.FOLLOW_53_in_synpred861004)\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17557,7 +17557,7 @@ class CParser(Parser):
         self.specifier_qualifier_list()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         # C.g:341:29: ( abstract_declarator )?\r
         alt122 = 2\r
         LA122_0 = self.input.LA(1)\r
@@ -17570,7 +17570,7 @@ class CParser(Parser):
             self.abstract_declarator()\r
             self.following.pop()\r
             if self.failed:\r
-                return \r
+                return\r
 \r
 \r
 \r
@@ -17588,7 +17588,7 @@ class CParser(Parser):
         self.direct_abstract_declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred91\r
@@ -17601,15 +17601,15 @@ class CParser(Parser):
         # C.g:351:6: '(' abstract_declarator ')'\r
         self.match(self.input, 62, self.FOLLOW_62_in_synpred931086)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_abstract_declarator_in_synpred931088)\r
         self.abstract_declarator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, 63, self.FOLLOW_63_in_synpred931090)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred93\r
@@ -17624,7 +17624,7 @@ class CParser(Parser):
         self.abstract_declarator_suffix()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred94\r
@@ -17637,20 +17637,20 @@ class CParser(Parser):
         # C.g:386:4: '(' type_name ')' cast_expression\r
         self.match(self.input, 62, self.FOLLOW_62_in_synpred1091282)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_type_name_in_synpred1091284)\r
         self.type_name()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, 63, self.FOLLOW_63_in_synpred1091286)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_cast_expression_in_synpred1091288)\r
         self.cast_expression()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred109\r
@@ -17663,12 +17663,12 @@ class CParser(Parser):
         # C.g:395:4: 'sizeof' unary_expression\r
         self.match(self.input, 74, self.FOLLOW_74_in_synpred1141330)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_unary_expression_in_synpred1141332)\r
         self.unary_expression()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred114\r
@@ -17681,15 +17681,15 @@ class CParser(Parser):
         # C.g:409:13: '(' argument_expression_list ')'\r
         self.match(self.input, 62, self.FOLLOW_62_in_synpred1171420)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_argument_expression_list_in_synpred1171424)\r
         self.argument_expression_list()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, 63, self.FOLLOW_63_in_synpred1171428)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred117\r
@@ -17702,15 +17702,15 @@ class CParser(Parser):
         # C.g:410:13: '(' macro_parameter_list ')'\r
         self.match(self.input, 62, self.FOLLOW_62_in_synpred1181444)\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_macro_parameter_list_in_synpred1181446)\r
         self.macro_parameter_list()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, 63, self.FOLLOW_63_in_synpred1181448)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred118\r
@@ -17723,10 +17723,10 @@ class CParser(Parser):
         # C.g:412:13: '*' IDENTIFIER\r
         self.match(self.input, 66, self.FOLLOW_66_in_synpred1201482)\r
         if self.failed:\r
-            return \r
+            return\r
         self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1201486)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred120\r
@@ -17739,7 +17739,7 @@ class CParser(Parser):
         # C.g:443:20: STRING_LITERAL\r
         self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1371683)\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred137\r
@@ -17763,7 +17763,7 @@ class CParser(Parser):
                 # C.g:0:0: IDENTIFIER\r
                 self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred1381680)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             else:\r
@@ -17784,7 +17784,7 @@ class CParser(Parser):
                 # C.g:0:0: STRING_LITERAL\r
                 self.match(self.input, STRING_LITERAL, self.FOLLOW_STRING_LITERAL_in_synpred1381683)\r
                 if self.failed:\r
-                    return \r
+                    return\r
 \r
 \r
             else:\r
@@ -17793,7 +17793,7 @@ class CParser(Parser):
 \r
                 if self.backtracking > 0:\r
                     self.failed = True\r
-                    return \r
+                    return\r
 \r
                 eee = EarlyExitException(126, self.input)\r
                 raise eee\r
@@ -17815,17 +17815,17 @@ class CParser(Parser):
         self.lvalue()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_assignment_operator_in_synpred1421746)\r
         self.assignment_operator()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
         self.following.append(self.FOLLOW_assignment_expression_in_synpred1421748)\r
         self.assignment_expression()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred142\r
@@ -17840,7 +17840,7 @@ class CParser(Parser):
         self.expression_statement()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred169\r
@@ -17855,7 +17855,7 @@ class CParser(Parser):
         self.macro_statement()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred173\r
@@ -17870,7 +17870,7 @@ class CParser(Parser):
         self.asm2_statement()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred174\r
@@ -17885,7 +17885,7 @@ class CParser(Parser):
         self.declaration()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred181\r
@@ -17900,7 +17900,7 @@ class CParser(Parser):
         self.statement_list()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred182\r
@@ -17915,7 +17915,7 @@ class CParser(Parser):
         self.declaration()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred186\r
@@ -17930,7 +17930,7 @@ class CParser(Parser):
         self.statement()\r
         self.following.pop()\r
         if self.failed:\r
-            return \r
+            return\r
 \r
 \r
     # $ANTLR end synpred188\r
@@ -18389,7 +18389,7 @@ class CParser(Parser):
 \r
 \r
 \r
\r
+\r
 \r
     FOLLOW_external_declaration_in_translation_unit74 = frozenset([1, 4, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 66])\r
     FOLLOW_function_definition_in_external_declaration113 = frozenset([1])\r
index dfd1146af749c89605482d6f0db42c490978db68..297847cdab9167da8c468e178c8572896ccd46a1 100644 (file)
@@ -1491,7 +1491,7 @@ class MultipleFv(FirmwareVolume):
             Fv.frombuffer(Buf, 0, len(Buf))\r
 \r
             self.BasicInfo.append([Fv.Name, Fv.FileSystemGuid, Fv.Size])\r
-            self.FfsDict.append(Fv.FfsDict)    \r
+            self.FfsDict.append(Fv.FfsDict)\r
 \r
 ## Class Eot\r
 #\r
@@ -1510,7 +1510,7 @@ class Eot(object):
         # Version and Copyright\r
         self.VersionNumber = ("0.02" + " " + gBUILD_VERSION)\r
         self.Version = "%prog Version " + self.VersionNumber\r
-        self.Copyright = "Copyright (c) 2008 - 2010, Intel Corporation  All rights reserved."\r
+        self.Copyright = "Copyright (c) 2008 - 2018, Intel Corporation  All rights reserved."\r
         self.Report = Report\r
 \r
         self.IsInit = IsInit\r
@@ -1522,7 +1522,7 @@ class Eot(object):
         self.FvFileList = FvFileList\r
         self.MapFileList = MapFileList\r
         self.Dispatch = Dispatch\r
-        \r
+\r
         # Check workspace environment\r
         if "EFI_SOURCE" not in os.environ:\r
             if "EDK_SOURCE" not in os.environ:\r
@@ -1562,13 +1562,13 @@ class Eot(object):
                 if not os.path.isfile(MapFile):\r
                     EdkLogger.error("Eot", EdkLogger.EOT_ERROR, "Can not find file %s " % MapFile)\r
                 EotGlobalData.gMAP_FILE.append(MapFile)\r
-                \r
+\r
         # Generate source file list\r
         self.GenerateSourceFileList(self.SourceFileList, self.IncludeDirList)\r
 \r
         # Generate guid list of dec file list\r
         self.ParseDecFile(self.DecFileList)\r
-        \r
+\r
         # Generate guid list from GUID list file\r
         self.ParseGuidList(self.GuidList)\r
 \r
@@ -1628,7 +1628,7 @@ class Eot(object):
                         if len(list) == 2:\r
                             EotGlobalData.gGuidDict[list[0].strip()] = GuidStructureStringToGuidString(list[1].strip())\r
 \r
-    \r
+\r
     ## ParseGuidList() method\r
     #\r
     #  Parse Guid list and get all GUID names with GUID values as {GuidName : GuidValue}\r
@@ -1643,7 +1643,7 @@ class Eot(object):
             for Line in open(Path):\r
                 (GuidName, GuidValue) = Line.split()\r
                 EotGlobalData.gGuidDict[GuidName] = GuidValue\r
-            \r
+\r
     ## ConvertLogFile() method\r
     #\r
     #  Parse a real running log file to get real dispatch order\r
@@ -1999,7 +1999,7 @@ class Eot(object):
 \r
         if Options.FvFileList:\r
             self.FvFileList = Options.FvFileList\r
\r
+\r
         if Options.MapFileList:\r
             self.MapFileList = Options.FvMapFileList\r
 \r
@@ -2011,7 +2011,7 @@ class Eot(object):
 \r
         if Options.DecFileList:\r
             self.DecFileList = Options.DecFileList\r
-        \r
+\r
         if Options.GuidList:\r
             self.GuidList = Options.GuidList\r
 \r
index 2e3f5e49831c8414a9b4973bdcb978e93730f642..d1215981539ec5cf08919c3688aad3d740e2e1e4 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # Warning information of Eot\r
 #\r
-#  Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -23,4 +23,4 @@ class Warning (Exception):
         self.message = Str\r
         self.FileName = File\r
         self.LineNumber = Line\r
-        self.ToolName = 'EOT'
\ No newline at end of file
+        self.ToolName = 'EOT'\r
index 7435b4d7c9308cde8fb3c0d1441874eea97f9e5f..e9716c988c8b4a9569c8cd1c7ad15718e1612569 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create report for Eot tool\r
 #\r
-# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -276,13 +276,13 @@ class Report(object):
       </tr>\r
       <tr id='Ffs%s' style='display:none;'>\r
         <td colspan="4"><table width="100%%"  border="1">""" % (self.FfsIndex, self.FfsIndex, self.FfsIndex, FfsPath, FfsName, FfsGuid, FfsOffset, FfsType, self.FfsIndex)\r
-            \r
+\r
             if self.DispatchList:\r
                 if FfsObj.Type in [0x04, 0x06]:\r
                     self.DispatchList.write("%s %s %s %s\n" % (FfsGuid, "P", FfsName, FfsPath))\r
                 if FfsObj.Type in [0x05, 0x07, 0x08, 0x0A]:\r
                     self.DispatchList.write("%s %s %s %s\n" % (FfsGuid, "D", FfsName, FfsPath))\r
-               \r
+\r
             self.WriteLn(Content)\r
 \r
             EotGlobalData.gOP_DISPATCH_ORDER.write('%s\n' %FfsName)\r
index 17761f2e24f3ab2cf28a4c2a8f4f8a5cb479c903..97b4ae01c6335e728a9a65fe05b5685c82b39cf9 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # name value pair\r
 #\r
-#  Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -25,4 +25,4 @@ class Attribute:
     #   @param  self        The object pointer\r
     def __init__(self):\r
         self.Name = None\r
-        self.Value = None
\ No newline at end of file
+        self.Value = None\r
index b02661d99855e5be0595a1e68156e94cd6780c78..35a25bd38037855172accbcfb5baee43cbf31548 100644 (file)
@@ -205,7 +205,7 @@ class Capsule (CapsuleClassObject) :
             return GenFds.ImageBinDict[self.UiCapsuleName.upper() + 'cap']\r
 \r
         GenFdsGlobalVariable.InfLogger( "\nGenerate %s Capsule" %self.UiCapsuleName)\r
-        if ('CAPSULE_GUID' in self.TokensDict and \r
+        if ('CAPSULE_GUID' in self.TokensDict and\r
             uuid.UUID(self.TokensDict['CAPSULE_GUID']) == uuid.UUID('6DCBD5ED-E82D-4C44-BDA1-7194199AD92A')):\r
             return self.GenFmpCapsule()\r
 \r
index 83b2731110bcead8a4ecb97c74b1336dba64adda..9d17bf5afe28015be93375bc81c812a1da68709d 100644 (file)
@@ -32,13 +32,13 @@ class CapsuleData:
     #   @param  self        The object pointer\r
     def __init__(self):\r
         pass\r
-    \r
+\r
     ## generate capsule data\r
     #\r
     #   @param  self        The object pointer\r
     def GenCapsuleSubItem(self):\r
         pass\r
-        \r
+\r
 ## FFS class for capsule data\r
 #\r
 #\r
@@ -119,7 +119,7 @@ class CapsuleFd (CapsuleData):
         else:\r
             FdFile = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FdName)\r
             return FdFile\r
-        \r
+\r
 ## AnyFile class for capsule data\r
 #\r
 #\r
@@ -139,7 +139,7 @@ class CapsuleAnyFile (CapsuleData):
     #\r
     def GenCapsuleSubItem(self):\r
         return self.FileName\r
-    \r
+\r
 ## Afile class for capsule data\r
 #\r
 #\r
@@ -208,11 +208,11 @@ class CapsulePayload(CapsuleData):
         Guid = self.ImageTypeId.split('-')\r
         Buffer = pack('=ILHHBBBBBBBBBBBBIIQ',\r
                        int(self.Version, 16),\r
-                       int(Guid[0], 16), \r
-                       int(Guid[1], 16), \r
-                       int(Guid[2], 16), \r
-                       int(Guid[3][-4:-2], 16), \r
-                       int(Guid[3][-2:], 16),  \r
+                       int(Guid[0], 16),\r
+                       int(Guid[1], 16),\r
+                       int(Guid[2], 16),\r
+                       int(Guid[3][-4:-2], 16),\r
+                       int(Guid[3][-2:], 16),\r
                        int(Guid[4][-12:-10], 16),\r
                        int(Guid[4][-10:-8], 16),\r
                        int(Guid[4][-8:-6], 16),\r
index 8ac37dd96b9be4e153b980fe78a58895853324c0..9223268749a11d917ead3c45350aa60da06742ff 100644 (file)
@@ -55,7 +55,7 @@ class EfiSection (EfiSectionClassObject):
     #   @retval tuple       (Generated file name list, section alignment)\r
     #\r
     def GenSection(self, OutputPath, ModuleName, SecNum, KeyStringList, FfsInf = None, Dict = {}, IsMakefile = False) :\r
-        \r
+\r
         if self.FileName is not None and self.FileName.startswith('PCD('):\r
             self.FileName = GenFdsGlobalVariable.GetPcdValue(self.FileName)\r
         """Prepare the parameter of GenSection"""\r
@@ -155,7 +155,7 @@ class EfiSection (EfiSectionClassObject):
                     BuildNumTuple = tuple()\r
                 BuildNumString = ' ' + ' '.join(BuildNumTuple)\r
 \r
-                #if VerString == '' and \r
+                #if VerString == '' and\r
                 if BuildNumString == '':\r
                     if self.Optional == True :\r
                         GenFdsGlobalVariable.VerboseLogger( "Optional Section don't exist!")\r
@@ -240,7 +240,7 @@ class EfiSection (EfiSectionClassObject):
                     Num = '%s.%d' %(SecNum, Index)\r
                     OutputFile = os.path.join( OutputPath, ModuleName + SUP_MODULE_SEC + Num + Ffs.SectionSuffix.get(SectionType))\r
                     File = GenFdsGlobalVariable.MacroExtend(File, Dict)\r
-                    \r
+\r
                     #Get PE Section alignment when align is set to AUTO\r
                     if self.Alignment == 'Auto' and (SectionType == BINARY_FILE_TYPE_PE32 or SectionType == BINARY_FILE_TYPE_TE):\r
                         ImageObj = PeImageClass (File)\r
@@ -284,7 +284,7 @@ class EfiSection (EfiSectionClassObject):
                                 IsMakefile = IsMakefile\r
                             )\r
                         File = StrippedFile\r
-                    \r
+\r
                     """For TE Section call GenFw to generate TE image"""\r
 \r
                     if SectionType == BINARY_FILE_TYPE_TE:\r
index 3305a470edfa8f3527b5d781baecb33c58c357bb..552719fa31145fbb3ac6e9f5dfb3419c58e24b74 100644 (file)
@@ -103,7 +103,7 @@ class FD(FDClassObject):
                     pass\r
                 GenFdsGlobalVariable.VerboseLogger('Call each region\'s AddToBuffer function')\r
                 RegionObj.AddToBuffer (TempFdBuffer, self.BaseAddress, self.BlockSizeList, self.ErasePolarity, GenFds.ImageBinDict, self.vtfRawDict, self.DefineVarDict)\r
-        \r
+\r
         FdBuffer = BytesIO('')\r
         PreviousRegionStart = -1\r
         PreviousRegionSize = 1\r
index b57ffc778f5e844cabe4fa5b4b774b87db1f7bcc..67217c3b89e3b7f17c4c91a8fd8ff4126c979dd1 100644 (file)
@@ -173,7 +173,7 @@ class IncludeFileProfile :
         self.InsertAdjust = 0\r
         self.IncludeFileList = []\r
         self.Level = 1 # first level include file\r
-    \r
+\r
     def GetTotalLines(self):\r
         TotalLines = self.InsertAdjust + len(self.FileLinesList)\r
 \r
@@ -191,7 +191,7 @@ class IncludeFileProfile :
     def GetLineInFile(self, Line):\r
         if not self.IsLineInFile (Line):\r
             return (self.FileName, -1)\r
-        \r
+\r
         InsertedLines = self.InsertStartLineNumber\r
 \r
         for Profile in self.IncludeFileList:\r
@@ -233,7 +233,7 @@ class FileProfile :
         # ECC will use this Dict and List information\r
         self.PcdFileLineDict = {}\r
         self.InfFileLineList = []\r
-        \r
+\r
         self.FdDict = {}\r
         self.FdNameNotSet = False\r
         self.FvDict = {}\r
@@ -339,11 +339,11 @@ class FdfParser:
     #\r
     #   @param  self        The object pointer\r
     #   @param  DestLine    Optional new destination line number.\r
-    #   @param  DestOffset  Optional new destination offset.     \r
+    #   @param  DestOffset  Optional new destination offset.\r
     #\r
-    def Rewind(self, DestLine = 1, DestOffset = 0):  \r
-        self.CurrentLineNumber = DestLine           \r
-        self.CurrentOffsetWithinLine = DestOffset   \r
+    def Rewind(self, DestLine = 1, DestOffset = 0):\r
+        self.CurrentLineNumber = DestLine\r
+        self.CurrentOffsetWithinLine = DestOffset\r
 \r
     ## __UndoOneChar() method\r
     #\r
@@ -459,7 +459,7 @@ class FdfParser:
         if MacroName.startswith('!'):\r
             NotFlag = True\r
             MacroName = MacroName[1:].strip()\r
-         \r
+\r
         if not MacroName.startswith('$(') or not MacroName.endswith(')'):\r
             raise Warning("Macro name expected(Please use '$(%(Token)s)' if '%(Token)s' is a macro.)" % {"Token" : MacroName},\r
                           self.FileName, self.CurrentLineNumber)\r
@@ -599,7 +599,7 @@ class FdfParser:
     #   @param  self        The object pointer\r
     #\r
     def PreprocessIncludeFile(self):\r
-           # nested include support\r
+      # nested include support\r
         Processed = False\r
         MacroDict = {}\r
         while self.__GetNextToken():\r
@@ -664,7 +664,7 @@ class FdfParser:
                         IncludedFile1 = PathClass(IncludedFile, GlobalData.gWorkspace)\r
                         ErrorCode = IncludedFile1.Validate()[0]\r
                         if ErrorCode != 0:\r
-                            raise Warning("The include file does not exist under below directories: \n%s\n%s\n%s\n"%(os.path.dirname(self.FileName), PlatformDir, GlobalData.gWorkspace), \r
+                            raise Warning("The include file does not exist under below directories: \n%s\n%s\n%s\n"%(os.path.dirname(self.FileName), PlatformDir, GlobalData.gWorkspace),\r
                                           self.FileName, self.CurrentLineNumber)\r
 \r
                 if not IsValidInclude (IncludedFile1.Path, self.CurrentLineNumber):\r
@@ -707,18 +707,18 @@ class FdfParser:
                 Processed = False\r
         # Preprocess done.\r
         self.Rewind()\r
-        \r
+\r
     @staticmethod\r
     def __GetIfListCurrentItemStat(IfList):\r
         if len(IfList) == 0:\r
             return True\r
-        \r
+\r
         for Item in IfList:\r
             if Item[1] == False:\r
                 return False\r
-        \r
+\r
         return True\r
-    \r
+\r
     ## PreprocessConditionalStatement() method\r
     #\r
     #   Preprocess conditional statement.\r
@@ -778,7 +778,7 @@ class FdfParser:
                     Macro = self.__Token\r
                     if not self.__IsToken( "="):\r
                         raise Warning("expected '='", self.FileName, self.CurrentLineNumber)\r
-    \r
+\r
                     Value = self.__GetExpression()\r
                     self.__SetMacroValue(Macro, Value)\r
                     self.__WipeOffArea.append(((DefineLine, DefineOffset), (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - 1)))\r
@@ -808,7 +808,7 @@ class FdfParser:
 \r
                 CondLabel = self.__Token\r
                 Expression = self.__GetExpression()\r
-                \r
+\r
                 if CondLabel == '!if':\r
                     ConditionSatisfied = self.__EvaluateConditional(Expression, IfList[-1][0][0] + 1, 'eval')\r
                 else:\r
@@ -819,7 +819,7 @@ class FdfParser:
                 BranchDetermined = ConditionSatisfied\r
                 IfList[-1] = [IfList[-1][0], ConditionSatisfied, BranchDetermined]\r
                 if ConditionSatisfied:\r
-                    self.__WipeOffArea.append((IfList[-1][0], (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - 1)))                 \r
+                    self.__WipeOffArea.append((IfList[-1][0], (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - 1)))\r
             elif self.__Token in ('!elseif', '!else'):\r
                 ElseStartPos = (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - len(self.__Token))\r
                 if len(IfList) <= 0:\r
@@ -891,7 +891,7 @@ class FdfParser:
             ScopeMacro = self.__MacroDict[TAB_COMMON, TAB_COMMON, TAB_COMMON]\r
             if ScopeMacro:\r
                 MacroDict.update(ScopeMacro)\r
-    \r
+\r
             # Section macro\r
             ScopeMacro = self.__MacroDict[\r
                         self.__CurSection[0],\r
@@ -923,12 +923,12 @@ class FdfParser:
                 else:\r
                     return ValueExpression(Expression, MacroPcdDict)()\r
             except WrnExpression as Excpt:\r
-                # \r
+                #\r
                 # Catch expression evaluation warning here. We need to report\r
                 # the precise number of line and return the evaluation result\r
                 #\r
                 EdkLogger.warn('Parser', "Suspicious expression: %s" % str(Excpt),\r
-                                File=self.FileName, ExtraData=self.__CurrentLine(), \r
+                                File=self.FileName, ExtraData=self.__CurrentLine(),\r
                                 Line=Line)\r
                 return Excpt.result\r
             except Exception as Excpt:\r
@@ -947,7 +947,7 @@ class FdfParser:
                     raise Warning(str(Excpt), self.FileName, Line)\r
         else:\r
             if Expression.startswith('$(') and Expression[-1] == ')':\r
-                Expression = Expression[2:-1]            \r
+                Expression = Expression[2:-1]\r
             return Expression in MacroPcdDict\r
 \r
     ## __IsToken() method\r
@@ -1432,9 +1432,9 @@ class FdfParser:
                 self.__UndoToken()\r
                 self.__GetSetStatement(None)\r
                 continue\r
-            \r
+\r
             Macro = self.__Token\r
-            \r
+\r
             if not self.__IsToken("="):\r
                 raise Warning("expected '='", self.FileName, self.CurrentLineNumber)\r
             if not self.__GetNextToken() or self.__Token.startswith('['):\r
@@ -1492,7 +1492,7 @@ class FdfParser:
             else:\r
                 raise Warning("expected FdName in [FD.] section", self.FileName, self.CurrentLineNumber)\r
         self.CurrentFdName = FdName.upper()\r
-        \r
+\r
         if self.CurrentFdName in self.Profile.FdDict:\r
             raise Warning("Unexpected the same FD name", self.FileName, self.CurrentLineNumber)\r
 \r
@@ -1578,12 +1578,12 @@ class FdfParser:
         if self.__IsKeyword( "BaseAddress"):\r
             if not self.__IsToken( "="):\r
                 raise Warning("expected '='", self.FileName, self.CurrentLineNumber)\r
-    \r
+\r
             if not self.__GetNextHexNumber():\r
                 raise Warning("expected Hex base address", self.FileName, self.CurrentLineNumber)\r
-    \r
+\r
             Obj.BaseAddress = self.__Token\r
-    \r
+\r
             if self.__IsToken( "|"):\r
                 pcdPair = self.__GetNextPcdName()\r
                 Obj.BaseAddressPcd = pcdPair\r
@@ -1595,7 +1595,7 @@ class FdfParser:
         if self.__IsKeyword( "Size"):\r
             if not self.__IsToken( "="):\r
                 raise Warning("expected '='", self.FileName, self.CurrentLineNumber)\r
-    \r
+\r
             if not self.__GetNextHexNumber():\r
                 raise Warning("expected Hex size", self.FileName, self.CurrentLineNumber)\r
 \r
@@ -1612,13 +1612,13 @@ class FdfParser:
         if self.__IsKeyword( "ErasePolarity"):\r
             if not self.__IsToken( "="):\r
                 raise Warning("expected '='", self.FileName, self.CurrentLineNumber)\r
-    \r
+\r
             if not self.__GetNextToken():\r
                 raise Warning("expected Erase Polarity", self.FileName, self.CurrentLineNumber)\r
-    \r
+\r
             if self.__Token != "1" and self.__Token != "0":\r
                 raise Warning("expected 1 or 0 Erase Polarity", self.FileName, self.CurrentLineNumber)\r
-    \r
+\r
             Obj.ErasePolarity = self.__Token\r
             return True\r
 \r
@@ -1666,7 +1666,7 @@ class FdfParser:
         IsBlock = False\r
         while self.__GetBlockStatement(Obj):\r
             IsBlock = True\r
-        \r
+\r
             Item = Obj.BlockSizeList[-1]\r
             if Item[0] is None or Item[1] is None:\r
                 raise Warning("expected block statement", self.FileName, self.CurrentLineNumber)\r
@@ -1835,7 +1835,7 @@ class FdfParser:
     #   @retval False       Not able to find\r
     #\r
     def __GetRegionLayout(self, Fd):\r
-        Offset = self.__CalcRegionExpr() \r
+        Offset = self.__CalcRegionExpr()\r
         if Offset is None:\r
             return False\r
 \r
@@ -2151,9 +2151,9 @@ class FdfParser:
         while True:\r
             self.__GetSetStatements(FvObj)\r
 \r
-            if not (self.__GetBlockStatement(FvObj) or self.__GetFvBaseAddress(FvObj) or \r
-                self.__GetFvForceRebase(FvObj) or self.__GetFvAlignment(FvObj) or \r
-                self.__GetFvAttributes(FvObj) or self.__GetFvNameGuid(FvObj) or \r
+            if not (self.__GetBlockStatement(FvObj) or self.__GetFvBaseAddress(FvObj) or\r
+                self.__GetFvForceRebase(FvObj) or self.__GetFvAlignment(FvObj) or\r
+                self.__GetFvAttributes(FvObj) or self.__GetFvNameGuid(FvObj) or\r
                 self.__GetFvExtEntryStatement(FvObj) or self.__GetFvNameString(FvObj)):\r
                 break\r
 \r
@@ -2198,7 +2198,7 @@ class FdfParser:
             raise Warning("Unknown alignment value '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
         Obj.FvAlignment = self.__Token\r
         return True\r
-    \r
+\r
     ## __GetFvBaseAddress() method\r
     #\r
     #   Get BaseAddress for FV\r
@@ -2222,8 +2222,8 @@ class FdfParser:
         if not BaseAddrValuePattern.match(self.__Token.upper()):\r
             raise Warning("Unknown FV base address value '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
         Obj.FvBaseAddress = self.__Token\r
-        return True  \r
-      \r
+        return True\r
+\r
     ## __GetFvForceRebase() method\r
     #\r
     #   Get FvForceRebase for FV\r
@@ -2246,14 +2246,14 @@ class FdfParser:
 \r
         if self.__Token.upper() not in ["TRUE", "FALSE", "0", "0X0", "0X00", "1", "0X1", "0X01"]:\r
             raise Warning("Unknown FvForceRebase value '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
-        \r
+\r
         if self.__Token.upper() in ["TRUE", "1", "0X1", "0X01"]:\r
             Obj.FvForceRebase = True\r
         elif self.__Token.upper() in ["FALSE", "0", "0X0", "0X00"]:\r
             Obj.FvForceRebase = False\r
         else:\r
             Obj.FvForceRebase = None\r
-           \r
+\r
         return True\r
 \r
 \r
@@ -2288,7 +2288,7 @@ class FdfParser:
             FvObj.FvAttributeDict[name] = self.__Token\r
 \r
         return IsWordToken\r
-    \r
+\r
     ## __GetFvNameGuid() method\r
     #\r
     #   Get FV GUID for FV\r
@@ -2334,7 +2334,7 @@ class FdfParser:
 \r
         if not self.__IsKeyword ("TYPE"):\r
             raise Warning("expected 'TYPE'", self.FileName, self.CurrentLineNumber)\r
-            \r
+\r
         if not self.__IsToken( "="):\r
             raise Warning("expected '='", self.FileName, self.CurrentLineNumber)\r
 \r
@@ -2355,7 +2355,7 @@ class FdfParser:
 \r
             if not self.__IsToken( "="):\r
                 raise Warning("expected '='", self.FileName, self.CurrentLineNumber)\r
-                \r
+\r
             if not self.__IsToken( "{"):\r
                 raise Warning("expected '{'", self.FileName, self.CurrentLineNumber)\r
 \r
@@ -2386,13 +2386,13 @@ class FdfParser:
             FvObj.FvExtEntryData.append(DataString)\r
 \r
         if self.__Token == 'FILE':\r
-        \r
+\r
             if not self.__IsToken( "="):\r
                 raise Warning("expected '='", self.FileName, self.CurrentLineNumber)\r
-                \r
+\r
             if not self.__GetNextToken():\r
                 raise Warning("expected FV Extension Entry file path At Line ", self.FileName, self.CurrentLineNumber)\r
-                \r
+\r
             FvObj.FvExtEntryData.append(self.__Token)\r
 \r
             if not self.__IsToken( "}"):\r
@@ -2555,7 +2555,7 @@ class FdfParser:
                 raise Warning("expected ARCH name", self.FileName, self.CurrentLineNumber)\r
             FfsInfObj.UseArch = self.__Token\r
 \r
-                \r
+\r
         if self.__GetNextToken():\r
             p = re.compile(r'([a-zA-Z0-9\-]+|\$\(TARGET\)|\*)_([a-zA-Z0-9\-]+|\$\(TOOL_CHAIN_TAG\)|\*)_([a-zA-Z0-9\-]+|\$\(ARCH\))')\r
             if p.match(self.__Token) and p.match(self.__Token).span()[1] == len(self.__Token):\r
@@ -2596,7 +2596,7 @@ class FdfParser:
             self.__UndoToken()\r
             self.__UndoToken()\r
             return False\r
-        \r
+\r
         FfsFileObj = FfsFileStatement.FileStatement()\r
         FfsFileObj.FvFileType = self.__Token\r
 \r
@@ -2613,9 +2613,9 @@ class FdfParser:
                 if not self.__IsToken( ")"):\r
                     raise Warning("expected ')'", self.FileName, self.CurrentLineNumber)\r
                 self.__Token = 'PCD('+PcdPair[1]+'.'+PcdPair[0]+')'\r
-                \r
+\r
         FfsFileObj.NameGuid = self.__Token\r
-        \r
+\r
         self.__GetFilePart( FfsFileObj, MacroDict.copy())\r
 \r
         if ForCapsule:\r
@@ -2891,7 +2891,7 @@ class FdfParser:
             else:\r
                 VerSectionObj.FileName = self.__Token\r
             Obj.SectionList.append(VerSectionObj)\r
-            \r
+\r
         elif self.__IsKeyword( BINARY_FILE_TYPE_UI):\r
             if AlignValue == 'Auto':\r
                 raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)\r
@@ -3345,7 +3345,7 @@ class FdfParser:
                 Value = self.__Token.strip()\r
             else:\r
                 Value = self.__Token.strip()\r
-            Obj.TokensDict[Name] = Value  \r
+            Obj.TokensDict[Name] = Value\r
             if not self.__GetNextToken():\r
                 return False\r
         self.__UndoToken()\r
@@ -3487,7 +3487,7 @@ class FdfParser:
 \r
         if not self.__GetNextToken():\r
             raise Warning("expected File name", self.FileName, self.CurrentLineNumber)\r
-        \r
+\r
         AnyFileName = self.__Token\r
         self.__VerifyFile(AnyFileName)\r
 \r
@@ -3520,7 +3520,7 @@ class FdfParser:
         else:\r
             CapsuleObj.CapsuleDataList.append(CapsuleAnyFile)\r
         return True\r
-    \r
+\r
     ## __GetAfileStatement() method\r
     #\r
     #   Get Afile for capsule\r
@@ -3540,14 +3540,14 @@ class FdfParser:
 \r
         if not self.__GetNextToken():\r
             raise Warning("expected Afile name", self.FileName, self.CurrentLineNumber)\r
-        \r
+\r
         AfileName = self.__Token\r
         AfileBaseName = os.path.basename(AfileName)\r
-        \r
+\r
         if os.path.splitext(AfileBaseName)[1]  not in [".bin", ".BIN", ".Bin", ".dat", ".DAT", ".Dat", ".data", ".DATA", ".Data"]:\r
             raise Warning('invalid binary file type, should be one of "bin",BINARY_FILE_TYPE_BIN,"Bin","dat","DAT","Dat","data","DATA","Data"', \\r
                           self.FileName, self.CurrentLineNumber)\r
-        \r
+\r
         if not os.path.isabs(AfileName):\r
             AfileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(AfileName)\r
             self.__VerifyFile(AfileName)\r
@@ -3701,7 +3701,7 @@ class FdfParser:
                 if not self.__IsToken( ")"):\r
                     raise Warning("expected ')'", self.FileName, self.CurrentLineNumber)\r
                 self.__Token = 'PCD('+PcdPair[1]+'.'+PcdPair[0]+')'\r
-            \r
+\r
         NameGuid = self.__Token\r
 \r
         KeepReloc = None\r
@@ -3963,11 +3963,11 @@ class FdfParser:
         elif self.__GetNextToken():\r
             if self.__Token not in ("}", "COMPAT16", BINARY_FILE_TYPE_PE32, BINARY_FILE_TYPE_PIC, BINARY_FILE_TYPE_TE, "FV_IMAGE", "RAW", BINARY_FILE_TYPE_DXE_DEPEX,\\r
                        BINARY_FILE_TYPE_UI, "VERSION", BINARY_FILE_TYPE_PEI_DEPEX, BINARY_FILE_TYPE_GUID, BINARY_FILE_TYPE_SMM_DEPEX):\r
-                \r
+\r
                 if self.__Token.startswith('PCD'):\r
                     self.__UndoToken()\r
                     self.__GetNextWord()\r
-                \r
+\r
                     if self.__Token == 'PCD':\r
                         if not self.__IsToken( "("):\r
                             raise Warning("expected '('", self.FileName, self.CurrentLineNumber)\r
@@ -3975,9 +3975,9 @@ class FdfParser:
                         if not self.__IsToken( ")"):\r
                             raise Warning("expected ')'", self.FileName, self.CurrentLineNumber)\r
                         self.__Token = 'PCD('+PcdPair[1]+'.'+PcdPair[0]+')'\r
-                        \r
-                EfiSectionObj.FileName = self.__Token        \r
-                            \r
+\r
+                EfiSectionObj.FileName = self.__Token\r
+\r
             else:\r
                 self.__UndoToken()\r
         else:\r
@@ -4364,7 +4364,7 @@ class FdfParser:
             self.SectionParser(S)\r
             self.__UndoToken()\r
             return False\r
-        \r
+\r
         self.__UndoToken()\r
         if not self.__IsToken("[OptionRom.", True):\r
             raise Warning("Unknown Keyword '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
@@ -4383,7 +4383,7 @@ class FdfParser:
             isFile = self.__GetOptRomFileStatement(OptRomObj)\r
             if not isInf and not isFile:\r
                 break\r
-            \r
+\r
         return True\r
 \r
     ## __GetOptRomInfStatement() method\r
@@ -4424,9 +4424,9 @@ class FdfParser:
             else:\r
                 self.Profile.InfDict['ArchTBD'].append(ffsInf.InfFileName)\r
 \r
-        \r
+\r
         self.__GetOptRomOverrides (ffsInf)\r
-            \r
+\r
         Obj.FfsList.append(ffsInf)\r
         return True\r
 \r
@@ -4488,7 +4488,7 @@ class FdfParser:
                     EdkLogger.error("FdfParser", FORMAT_INVALID, File=self.FileName, Line=self.CurrentLineNumber)\r
 \r
             Obj.OverrideAttribs = Overrides\r
-            \r
+\r
     ## __GetOptRomFileStatement() method\r
     #\r
     #   Get FILE statements\r
@@ -4520,7 +4520,7 @@ class FdfParser:
 \r
         if FfsFileObj.FileType == 'EFI':\r
             self.__GetOptRomOverrides(FfsFileObj)\r
-        \r
+\r
         Obj.FfsList.append(FfsFileObj)\r
 \r
         return True\r
@@ -4562,7 +4562,7 @@ class FdfParser:
             if hasattr(CapsuleDataObj, 'FvName') and CapsuleDataObj.FvName is not None and CapsuleDataObj.FvName.upper() not in RefFvList:\r
                 RefFvList.append (CapsuleDataObj.FvName.upper())\r
             elif hasattr(CapsuleDataObj, 'FdName') and CapsuleDataObj.FdName is not None and CapsuleDataObj.FdName.upper() not in RefFdList:\r
-                RefFdList.append (CapsuleDataObj.FdName.upper())            \r
+                RefFdList.append (CapsuleDataObj.FdName.upper())\r
             elif CapsuleDataObj.Ffs is not None:\r
                 if isinstance(CapsuleDataObj.Ffs, FfsFileStatement.FileStatement):\r
                     if CapsuleDataObj.Ffs.FvName is not None and CapsuleDataObj.Ffs.FvName.upper() not in RefFvList:\r
@@ -4657,7 +4657,7 @@ class FdfParser:
             RefFvStack = []\r
             RefFvStack.append(FvName)\r
             FdAnalyzedList = []\r
-            \r
+\r
             Index = 0\r
             while RefFvStack != [] and Index < MaxLength:\r
                 Index = Index + 1\r
@@ -4710,7 +4710,7 @@ class FdfParser:
             RefCapStack.append(CapName)\r
             FdAnalyzedList = []\r
             FvAnalyzedList = []\r
-            \r
+\r
             Index = 0\r
             while RefCapStack != [] and Index < MaxLength:\r
                 Index = Index + 1\r
index df585f3d819b60a9d9e152d651b71acaaca2ecf1..598b2d02312458e004c6a9746759457ce39430fb 100644 (file)
@@ -39,7 +39,7 @@ class Ffs(FDClassObject):
         SUP_MODULE_MM_STANDALONE     : 'EFI_FV_FILETYPE_MM_STANDALONE',\r
         SUP_MODULE_MM_CORE_STANDALONE : 'EFI_FV_FILETYPE_MM_CORE_STANDALONE'\r
     }\r
-    \r
+\r
     # mapping between section type in FDF and file suffix\r
     SectionSuffix = {\r
         BINARY_FILE_TYPE_PE32                 : '.pe32',\r
@@ -51,14 +51,14 @@ class Ffs(FDClassObject):
         'COMPAT16'             : '.com16',\r
         'RAW'                  : '.raw',\r
         'FREEFORM_SUBTYPE_GUID': '.guid',\r
-        'SUBTYPE_GUID'         : '.guid',        \r
+        'SUBTYPE_GUID'         : '.guid',\r
         'FV_IMAGE'             : 'fv.sec',\r
         'COMPRESS'             : '.com',\r
         'GUIDED'               : '.guided',\r
         BINARY_FILE_TYPE_PEI_DEPEX            : '.dpx',\r
         BINARY_FILE_TYPE_SMM_DEPEX            : '.dpx'\r
     }\r
-    \r
+\r
     ## The constructor\r
     #\r
     #   @param  self        The object pointer\r
index f5de57d0ac8207798ba5bf745cbb7d087418c1eb..5f31ac03fcf4e850ffdac092457db3de5af32b42 100644 (file)
@@ -58,7 +58,7 @@ class FileStatement (FileStatementClassObject) :
     #   @retval string       Generated FFS file name\r
     #\r
     def GenFfs(self, Dict = {}, FvChildAddr=[], FvParentAddr=None, IsMakefile=False, FvName=None):\r
-        \r
+\r
         if self.NameGuid is not None and self.NameGuid.startswith('PCD('):\r
             PcdValue = GenFdsGlobalVariable.GetPcdValue(self.NameGuid)\r
             if len(PcdValue) == 0:\r
@@ -71,7 +71,7 @@ class FileStatement (FileStatementClassObject) :
                 EdkLogger.error("GenFds", GENFDS_ERROR, 'GUID value for %s in wrong format.' \\r
                             % (self.NameGuid))\r
             self.NameGuid = RegistryGuidStr\r
-        \r
+\r
         Str = self.NameGuid\r
         if FvName:\r
             Str += FvName\r
index ef34dbf007548cdd98fd7c5bc22b944b4f23d6c8..adb9a95bebfa22e09e573a7a542d8780b7a16d69 100644 (file)
@@ -225,7 +225,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
             EdkLogger.warn("GenFds", GENFDS_ERROR, "Module %s NOT found in DSC file; Is it really a binary module?" % (self.InfFileName))\r
 \r
         if self.ModuleType == SUP_MODULE_SMM_CORE and int(self.PiSpecVersion, 16) < 0x0001000A:\r
-            EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.InfFileName)      \r
+            EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.InfFileName)\r
 \r
         if self.ModuleType == SUP_MODULE_MM_CORE_STANDALONE and int(self.PiSpecVersion, 16) < 0x00010032:\r
             EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "MM_CORE_STANDALONE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x00010032", File=self.InfFileName)\r
@@ -374,13 +374,13 @@ class FfsInfStatement(FfsInfStatementClassObject):
     def PatchEfiFile(self, EfiFile, FileType):\r
         #\r
         # If the module does not have any patches, then return path to input file\r
-        #  \r
+        #\r
         if not self.PatchPcds:\r
             return EfiFile\r
 \r
         #\r
         # Only patch file if FileType is PE32 or ModuleType is USER_DEFINED\r
-        #  \r
+        #\r
         if FileType != BINARY_FILE_TYPE_PE32 and self.ModuleType != SUP_MODULE_USER_DEFINED:\r
             return EfiFile\r
 \r
@@ -398,7 +398,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
 \r
         #\r
         # If a different file from the same module has already been patched, then generate an error\r
-        #  \r
+        #\r
         if self.PatchedBinFile:\r
             EdkLogger.error("GenFds", GENFDS_ERROR,\r
                             'Only one binary file can be patched:\n'\r
@@ -408,12 +408,12 @@ class FfsInfStatement(FfsInfStatementClassObject):
 \r
         #\r
         # Copy unpatched file contents to output file location to perform patching\r
-        #  \r
+        #\r
         CopyLongFilePath(EfiFile, Output)\r
 \r
         #\r
         # Apply patches to patched output file\r
-        #  \r
+        #\r
         for Pcd, Value in self.PatchPcds:\r
             RetVal, RetStr = PatchBinaryFile(Output, int(Pcd.Offset, 0), Pcd.DatumType, Value, Pcd.MaxDatumSize)\r
             if RetVal:\r
@@ -421,12 +421,12 @@ class FfsInfStatement(FfsInfStatementClassObject):
 \r
         #\r
         # Save the path of the patched output file\r
-        #  \r
+        #\r
         self.PatchedBinFile = Output\r
 \r
         #\r
         # Return path to patched output file\r
-        #  \r
+        #\r
         return Output\r
 \r
     ## GenFfs() method\r
@@ -448,14 +448,14 @@ class FfsInfStatement(FfsInfStatementClassObject):
         Arch = self.GetCurrentArch()\r
         SrcFile = mws.join( GenFdsGlobalVariable.WorkSpaceDir, self.InfFileName);\r
         DestFile = os.path.join( self.OutputPath, self.ModuleGuid + '.ffs')\r
-        \r
+\r
         SrcFileDir = "."\r
         SrcPath = os.path.dirname(SrcFile)\r
         SrcFileName = os.path.basename(SrcFile)\r
-        SrcFileBase, SrcFileExt = os.path.splitext(SrcFileName)   \r
+        SrcFileBase, SrcFileExt = os.path.splitext(SrcFileName)\r
         DestPath = os.path.dirname(DestFile)\r
         DestFileName = os.path.basename(DestFile)\r
-        DestFileBase, DestFileExt = os.path.splitext(DestFileName)   \r
+        DestFileBase, DestFileExt = os.path.splitext(DestFileName)\r
         self.MacroDict = {\r
             # source file\r
             "${src}"      :   SrcFile,\r
@@ -473,7 +473,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
         }\r
         #\r
         # Allow binary type module not specify override rule in FDF file.\r
-        # \r
+        #\r
         if len(self.BinFileList) > 0:\r
             if self.Rule is None or self.Rule == "":\r
                 self.Rule = "BINARY"\r
@@ -534,7 +534,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
             '$(NAMED_GUID)'  : self.ModuleGuid\r
         }\r
         String = GenFdsGlobalVariable.MacroExtend(String, MacroDict)\r
-        String = GenFdsGlobalVariable.MacroExtend(String, self.MacroDict)        \r
+        String = GenFdsGlobalVariable.MacroExtend(String, self.MacroDict)\r
         return String\r
 \r
     ## __GetRule__() method\r
@@ -960,14 +960,14 @@ class FfsInfStatement(FfsInfStatementClassObject):
                     Sect.FvAddr = FvChildAddr\r
             if FvParentAddr is not None and isinstance(Sect, GuidSection):\r
                 Sect.FvParentAddr = FvParentAddr\r
-            \r
+\r
             if Rule.KeyStringList != []:\r
                 SectList, Align = Sect.GenSection(self.OutputPath, self.ModuleGuid, SecIndex, Rule.KeyStringList, self, IsMakefile = IsMakefile)\r
             else :\r
                 SectList, Align = Sect.GenSection(self.OutputPath, self.ModuleGuid, SecIndex, self.KeyStringList, self, IsMakefile = IsMakefile)\r
-            \r
+\r
             if not HasGeneratedFlag:\r
-                UniVfrOffsetFileSection = ""    \r
+                UniVfrOffsetFileSection = ""\r
                 ModuleFileName = mws.join(GenFdsGlobalVariable.WorkSpaceDir, self.InfFileName)\r
                 InfData = GenFdsGlobalVariable.WorkSpace.BuildObject[PathClass(ModuleFileName), self.CurrentArch]\r
                 #\r
@@ -978,16 +978,16 @@ class FfsInfStatement(FfsInfStatementClassObject):
                 for SourceFile in InfData.Sources:\r
                     if SourceFile.Type.upper() == ".VFR" :\r
                         #\r
-                        # search the .map file to find the offset of vfr binary in the PE32+/TE file. \r
+                        # search the .map file to find the offset of vfr binary in the PE32+/TE file.\r
                         #\r
                         VfrUniBaseName[SourceFile.BaseName] = (SourceFile.BaseName + "Bin")\r
                     if SourceFile.Type.upper() == ".UNI" :\r
                         #\r
-                        # search the .map file to find the offset of Uni strings binary in the PE32+/TE file. \r
+                        # search the .map file to find the offset of Uni strings binary in the PE32+/TE file.\r
                         #\r
                         VfrUniBaseName["UniOffsetName"] = (self.BaseName + "Strings")\r
-                    \r
-                \r
+\r
+\r
                 if len(VfrUniBaseName) > 0:\r
                     if IsMakefile:\r
                         if InfData.BuildType != 'UEFI_HII':\r
@@ -1023,7 +1023,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
                     if UniVfrOffsetFileSection:\r
                         SectList.append(UniVfrOffsetFileSection)\r
                         HasGeneratedFlag = True\r
-                \r
+\r
             for SecName in  SectList :\r
                 SectFiles.append(SecName)\r
                 SectAlignments.append(Align)\r
@@ -1071,12 +1071,12 @@ class FfsInfStatement(FfsInfStatementClassObject):
     #   @param  self                  The object pointer\r
     #   @param  VfrUniBaseName        A name list contain the UNI/INF object name.\r
     #   @retval RetValue              A list contain offset of UNI/INF object.\r
-    #    \r
+    #\r
     def __GetBuildOutputMapFileVfrUniInfo(self, VfrUniBaseName):\r
         MapFileName = os.path.join(self.EfiOutputPath, self.BaseName + ".map")\r
         EfiFileName = os.path.join(self.EfiOutputPath, self.BaseName + ".efi")\r
         return GetVariableOffset(MapFileName, EfiFileName, VfrUniBaseName.values())\r
-    \r
+\r
     ## __GenUniVfrOffsetFile() method\r
     #\r
     #   Generate the offset file for the module which contain VFR or UNI file.\r
@@ -1089,7 +1089,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
 \r
         # Use a instance of StringIO to cache data\r
         fStringIO = BytesIO('')\r
-        \r
+\r
         for Item in VfrUniOffsetList:\r
             if (Item[0].find("Strings") != -1):\r
                 #\r
@@ -1099,7 +1099,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
                 #\r
                 UniGuid = [0xe0, 0xc5, 0x13, 0x89, 0xf6, 0x33, 0x86, 0x4d, 0x9b, 0xf1, 0x43, 0xef, 0x89, 0xfc, 0x6, 0x66]\r
                 UniGuid = [chr(ItemGuid) for ItemGuid in UniGuid]\r
-                fStringIO.write(''.join(UniGuid))            \r
+                fStringIO.write(''.join(UniGuid))\r
                 UniValue = pack ('Q', int (Item[1], 16))\r
                 fStringIO.write (UniValue)\r
             else:\r
@@ -1110,11 +1110,11 @@ class FfsInfStatement(FfsInfStatementClassObject):
                 #\r
                 VfrGuid = [0xb4, 0x7c, 0xbc, 0xd0, 0x47, 0x6a, 0x5f, 0x49, 0xaa, 0x11, 0x71, 0x7, 0x46, 0xda, 0x6, 0xa2]\r
                 VfrGuid = [chr(ItemGuid) for ItemGuid in VfrGuid]\r
-                fStringIO.write(''.join(VfrGuid))                   \r
-                type (Item[1]) \r
+                fStringIO.write(''.join(VfrGuid))\r
+                type (Item[1])\r
                 VfrValue = pack ('Q', int (Item[1], 16))\r
                 fStringIO.write (VfrValue)\r
-            \r
+\r
         #\r
         # write data into file.\r
         #\r
@@ -1122,7 +1122,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
             SaveFileOnChange(UniVfrOffsetFileName, fStringIO.getvalue())\r
         except:\r
             EdkLogger.error("GenFds", FILE_WRITE_FAILURE, "Write data to file %s failed, please check whether the file been locked or using by other applications." %UniVfrOffsetFileName, None)\r
-        \r
+\r
         fStringIO.close ()\r
 \r
-        \r
+\r
index d980020680f869e84aee691681c845e85b716fc3..798c20a0f4ee5050f5712b0c7f9017e50b546b47 100644 (file)
@@ -53,7 +53,7 @@ class FV (FvClassObject):
         self.FvForceRebase = None\r
         self.FvRegionInFD = None\r
         self.UsedSizeEnable = False\r
-        \r
+\r
     ## AddToBuffer()\r
     #\r
     #   Generate Fv and add it to the Buffer\r
@@ -72,7 +72,7 @@ class FV (FvClassObject):
 \r
         if BaseAddress is None and self.UiFvName.upper() + 'fv' in GenFds.ImageBinDict:\r
             return GenFds.ImageBinDict[self.UiFvName.upper() + 'fv']\r
-        \r
+\r
         #\r
         # Check whether FV in Capsule is in FD flash region.\r
         # If yes, return error. Doesn't support FV in Capsule image is also in FD flash region.\r
@@ -92,7 +92,7 @@ class FV (FvClassObject):
             GenFdsGlobalVariable.InfLogger( "\nGenerating %s FV" %self.UiFvName)\r
         GenFdsGlobalVariable.LargeFileInFvFlags.append(False)\r
         FFSGuid = None\r
-        \r
+\r
         if self.FvBaseAddress is not None:\r
             BaseAddress = self.FvBaseAddress\r
         if not Flag:\r
@@ -289,7 +289,7 @@ class FV (FvClassObject):
                 if not self._GetBlockSize():\r
                     #set default block size is 1\r
                     self.FvInfFile.writelines("EFI_BLOCK_SIZE  = 0x1" + TAB_LINE_BREAK)\r
-            \r
+\r
             for BlockSize in self.BlockSizeList :\r
                 if BlockSize[0] is not None:\r
                     self.FvInfFile.writelines("EFI_BLOCK_SIZE  = "  + \\r
@@ -331,7 +331,7 @@ class FV (FvClassObject):
                                        self.FvAlignment.strip() + \\r
                                        " = TRUE"                + \\r
                                        TAB_LINE_BREAK)\r
-                                       \r
+\r
         #\r
         # Generate FV extension header file\r
         #\r
@@ -387,7 +387,7 @@ class FV (FvClassObject):
                     TotalSize += (Size + 4)\r
                     FvExtFile.seek(0)\r
                     Buffer += pack('HH', (Size + 4), int(self.FvExtEntryTypeValue[Index], 16))\r
-                    Buffer += FvExtFile.read() \r
+                    Buffer += FvExtFile.read()\r
                     FvExtFile.close()\r
                 if self.FvExtEntryType[Index] == 'DATA':\r
                     ByteList = self.FvExtEntryData[Index].split(',')\r
@@ -418,7 +418,7 @@ class FV (FvClassObject):
                                            FvExtHeaderFileName                  + \\r
                                            TAB_LINE_BREAK)\r
 \r
-         \r
+\r
         #\r
         # Add [Files]\r
         #\r
index acd19e5276269b27aec1517432d6b0f8000bd72e..b90b50e53967e4215ba22d1fe13915936f606f32 100644 (file)
@@ -47,7 +47,7 @@ from struct import unpack
 ## Version and Copyright\r
 versionNumber = "1.0" + ' ' + gBUILD_VERSION\r
 __version__ = "%prog Version " + versionNumber\r
-__copyright__ = "Copyright (c) 2007 - 2017, Intel Corporation  All rights reserved."\r
+__copyright__ = "Copyright (c) 2007 - 2018, Intel Corporation  All rights reserved."\r
 \r
 ## Tool entrance method\r
 #\r
@@ -72,10 +72,10 @@ def main():
         if Options.verbose is not None:\r
             EdkLogger.SetLevel(EdkLogger.VERBOSE)\r
             GenFdsGlobalVariable.VerboseMode = True\r
-            \r
+\r
         if Options.FixedAddress is not None:\r
             GenFdsGlobalVariable.FixedLoadAddress = True\r
-            \r
+\r
         if Options.quiet is not None:\r
             EdkLogger.SetLevel(EdkLogger.QUIET)\r
         if Options.debug is not None:\r
@@ -100,7 +100,7 @@ def main():
             if Options.GenfdsMultiThread:\r
                 GenFdsGlobalVariable.EnableGenfdsMultiThread = True\r
         os.chdir(GenFdsGlobalVariable.WorkSpaceDir)\r
-        \r
+\r
         # set multiple workspace\r
         PackagesPath = os.getenv("PACKAGES_PATH")\r
         mws.setWs(GenFdsGlobalVariable.WorkSpaceDir, PackagesPath)\r
@@ -228,7 +228,7 @@ def main():
         GlobalData.gDatabasePath = os.path.normpath(os.path.join(ConfDirectoryPath, GlobalData.gDatabasePath))\r
         BuildWorkSpace = WorkspaceDatabase(GlobalData.gDatabasePath)\r
         BuildWorkSpace.InitDatabase()\r
-        \r
+\r
         #\r
         # Get files real name in workspace dir\r
         #\r
@@ -244,7 +244,7 @@ def main():
         TargetArchList = set(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, TAB_COMMON, Options.BuildTarget, Options.ToolChain].SupArchList) & set(ArchList)\r
         if len(TargetArchList) == 0:\r
             EdkLogger.error("GenFds", GENFDS_ERROR, "Target ARCH %s not in platform supported ARCH %s" % (str(ArchList), str(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, TAB_COMMON].SupArchList)))\r
-        \r
+\r
         for Arch in ArchList:\r
             GenFdsGlobalVariable.OutputDirFromDscDict[Arch] = NormPath(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, Options.BuildTarget, Options.ToolChain].OutputDirectory)\r
             GenFdsGlobalVariable.PlatformName = BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, Options.BuildTarget, Options.ToolChain].PlatformName\r
@@ -551,7 +551,7 @@ class GenFds :
                 Buffer = BytesIO('')\r
                 FvObj.AddToBuffer(Buffer)\r
                 Buffer.close()\r
-        \r
+\r
         if GenFds.OnlyGenerateThisFv is None and GenFds.OnlyGenerateThisFd is None and GenFds.OnlyGenerateThisCap is None:\r
             if GenFdsGlobalVariable.FdfParser.Profile.CapsuleDict != {}:\r
                 GenFdsGlobalVariable.VerboseLogger("\n Generate other Capsule images!")\r
@@ -617,7 +617,7 @@ class GenFds :
     #   @retval None\r
     #\r
     def DisplayFvSpaceInfo(FdfParser):\r
-        \r
+\r
         FvSpaceInfoList = []\r
         MaxFvNameLength = 0\r
         for FvName in FdfParser.Profile.FvDict:\r
@@ -644,10 +644,10 @@ class GenFds :
                         if NameValue[0].strip() == 'EFI_FV_SPACE_SIZE':\r
                             FreeFound = True\r
                             Free = NameValue[1].strip()\r
-                \r
+\r
                 if TotalFound and UsedFound and FreeFound:\r
                     FvSpaceInfoList.append((FvName, Total, Used, Free))\r
-                \r
+\r
         GenFdsGlobalVariable.InfLogger('\nFV Space Information')\r
         for FvSpaceInfo in FvSpaceInfoList:\r
             Name = FvSpaceInfo[0]\r
@@ -675,18 +675,18 @@ class GenFds :
             if PcdObj.TokenCName == 'PcdBsBaseAddress':\r
                 PcdValue = PcdObj.DefaultValue\r
                 break\r
-        \r
+\r
         if PcdValue == '':\r
             return\r
-        \r
+\r
         Int64PcdValue = long(PcdValue, 0)\r
-        if Int64PcdValue == 0 or Int64PcdValue < -1:    \r
+        if Int64PcdValue == 0 or Int64PcdValue < -1:\r
             return\r
-                \r
+\r
         TopAddress = 0\r
         if Int64PcdValue > 0:\r
             TopAddress = Int64PcdValue\r
-            \r
+\r
         ModuleDict = BuildDb.BuildObject[DscFile, TAB_COMMON, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag].Modules\r
         for Key in ModuleDict:\r
             ModuleObj = BuildDb.BuildObject[Key, TAB_COMMON, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]\r
index 6eb1201cee49ee0f9ab0f72702802092c0ef7c0c..eeb3ec2197a8f9f468f848851f02fa7ab65f62d4 100644 (file)
@@ -65,7 +65,7 @@ class GenFdsGlobalVariable:
     FdfFileTimeStamp = 0\r
     FixedLoadAddress = False\r
     PlatformName = ''\r
-    \r
+\r
     BuildRuleFamily = "MSFT"\r
     ToolChainFamily = "MSFT"\r
     __BuildRuleDatabase = None\r
@@ -75,7 +75,7 @@ class GenFdsGlobalVariable:
     CopyList   = []\r
     ModuleFile = ''\r
     EnableGenfdsMultiThread = False\r
-    \r
+\r
     #\r
     # The list whose element are flags to indicate if large FFS or SECTION files exist in FV.\r
     # At the beginning of each generation of FV, false flag is appended to the list,\r
@@ -90,7 +90,7 @@ class GenFdsGlobalVariable:
     LARGE_FILE_SIZE = 0x1000000\r
 \r
     SectionHeader = struct.Struct("3B 1B")\r
-    \r
+\r
     ## LoadBuildRule\r
     #\r
     @staticmethod\r
@@ -117,7 +117,7 @@ class GenFdsGlobalVariable:
                    and GenFdsGlobalVariable.ToolChainTag in ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY] \\r
                    and ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY][GenFdsGlobalVariable.ToolChainTag]:\r
                     GenFdsGlobalVariable.BuildRuleFamily = ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY][GenFdsGlobalVariable.ToolChainTag]\r
-                    \r
+\r
                 if DataType.TAB_TOD_DEFINES_FAMILY in ToolDefinition \\r
                    and GenFdsGlobalVariable.ToolChainTag in ToolDefinition[DataType.TAB_TOD_DEFINES_FAMILY] \\r
                    and ToolDefinition[DataType.TAB_TOD_DEFINES_FAMILY][GenFdsGlobalVariable.ToolChainTag]:\r
@@ -229,11 +229,11 @@ class GenFdsGlobalVariable:
             while Index < len(SourceList):\r
                 Source = SourceList[Index]\r
                 Index = Index + 1\r
-    \r
+\r
                 if File.IsBinary and File == Source and Inf.Binaries is not None and File in Inf.Binaries:\r
                     # Skip all files that are not binary libraries\r
                     if not Inf.LibraryClass:\r
-                        continue            \r
+                        continue\r
                     RuleObject = BuildRules[DataType.TAB_DEFAULT_BINARY_FILE]\r
                 elif FileType in BuildRules:\r
                     RuleObject = BuildRules[FileType]\r
@@ -244,15 +244,15 @@ class GenFdsGlobalVariable:
                     if LastTarget:\r
                         TargetList.add(str(LastTarget))\r
                     break\r
-    \r
+\r
                 FileType = RuleObject.SourceFileType\r
-    \r
+\r
                 # stop at STATIC_LIBRARY for library\r
                 if Inf.LibraryClass and FileType == DataType.TAB_STATIC_LIBRARY:\r
                     if LastTarget:\r
                         TargetList.add(str(LastTarget))\r
                     break\r
-    \r
+\r
                 Target = RuleObject.Apply(Source)\r
                 if not Target:\r
                     if LastTarget:\r
@@ -261,11 +261,11 @@ class GenFdsGlobalVariable:
                 elif not Target.Outputs:\r
                     # Only do build for target with outputs\r
                     TargetList.add(str(Target))\r
-    \r
+\r
                 # to avoid cyclic rule\r
                 if FileType in RuleChain:\r
                     break\r
-    \r
+\r
                 RuleChain.append(FileType)\r
                 SourceList.extend(Target.Outputs)\r
                 LastTarget = Target\r
@@ -645,19 +645,19 @@ class GenFdsGlobalVariable:
     @staticmethod\r
     def GenerateOptionRom(Output, EfiInput, BinaryInput, Compress=False, ClassCode=None,\r
                         Revision=None, DeviceId=None, VendorId=None, IsMakefile=False):\r
-        InputList = []   \r
+        InputList = []\r
         Cmd = ["EfiRom"]\r
         if len(EfiInput) > 0:\r
-            \r
+\r
             if Compress:\r
                 Cmd.append("-ec")\r
             else:\r
                 Cmd.append("-e")\r
-                \r
+\r
             for EfiFile in EfiInput:\r
                 Cmd.append(EfiFile)\r
                 InputList.append (EfiFile)\r
-        \r
+\r
         if len(BinaryInput) > 0:\r
             Cmd.append("-b")\r
             for BinFile in BinaryInput:\r
@@ -668,7 +668,7 @@ class GenFdsGlobalVariable:
         if not GenFdsGlobalVariable.NeedsUpdate(Output, InputList) and not IsMakefile:\r
             return\r
         GenFdsGlobalVariable.DebugLogger(EdkLogger.DEBUG_5, "%s needs update because of newer %s" % (Output, InputList))\r
-                        \r
+\r
         if ClassCode is not None:\r
             Cmd += ("-l", ClassCode)\r
         if Revision is not None:\r
@@ -811,7 +811,7 @@ class GenFdsGlobalVariable:
                         EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not FixedAtBuild type." % PcdPattern)\r
                     if PcdObj.DatumType != DataType.TAB_VOID:\r
                         EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not VOID* datum type." % PcdPattern)\r
-                        \r
+\r
                     PcdValue = PcdObj.DefaultValue\r
                     return PcdValue\r
 \r
@@ -827,7 +827,7 @@ class GenFdsGlobalVariable:
                             EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not FixedAtBuild type." % PcdPattern)\r
                         if PcdObj.DatumType != DataType.TAB_VOID:\r
                             EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not VOID* datum type." % PcdPattern)\r
-                            \r
+\r
                         PcdValue = PcdObj.DefaultValue\r
                         return PcdValue\r
 \r
index bda185476b95035bfeb129511331f5ac8734333a..c55fb34f2b74e0703684622e2b4bed5d4489a8d9 100644 (file)
@@ -76,7 +76,7 @@ class GuidSection(GuidSectionClassObject) :
             FvAddrIsSet = True\r
         else:\r
             FvAddrIsSet = False\r
-        \r
+\r
         if self.ProcessRequired in ("TRUE", "1"):\r
             if self.FvAddr != []:\r
                 #no use FvAddr when the image is processed.\r
index 4ef9b4d0e9a81f5eb4e844ca6bdfcbe52701ea15..8b6d2a1cb0bdea5294c696ece8e32e9bcaaee945 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # process OptionROM generation from FILE statement\r
 #\r
-#  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -18,7 +18,7 @@
 import Common.LongFilePathOs as os\r
 \r
 from GenFdsGlobalVariable import GenFdsGlobalVariable\r
-## \r
+##\r
 #\r
 #\r
 class OptRomFileStatement:\r
@@ -40,10 +40,10 @@ class OptRomFileStatement:
     #   @retval string      Generated FFS file name\r
     #\r
     def GenFfs(self, Dict = {}, IsMakefile=False):\r
-        \r
+\r
         if self.FileName is not None:\r
             self.FileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FileName)\r
-        \r
+\r
         return self.FileName\r
 \r
 \r
index 79891b3b82a4738c76b1bde910155e48e7350d6b..dff8235ef755800055c4e6c192b6a9a6067039eb 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # process OptionROM generation from INF statement\r
 #\r
-#  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -26,7 +26,7 @@ from Common.StringUtils import *
 from FfsInfStatement import FfsInfStatement\r
 from GenFdsGlobalVariable import GenFdsGlobalVariable\r
 \r
-## \r
+##\r
 #\r
 #\r
 class OptRomInfStatement (FfsInfStatement):\r
@@ -45,7 +45,7 @@ class OptRomInfStatement (FfsInfStatement):
     #   @param  self        The object pointer\r
     #\r
     def __GetOptRomParams(self):\r
-        \r
+\r
         if self.OverrideAttribs is None:\r
             self.OverrideAttribs = OptionRom.OverrideAttribs()\r
 \r
@@ -59,21 +59,21 @@ class OptRomInfStatement (FfsInfStatement):
 \r
         if self.OverrideAttribs.PciVendorId is None:\r
             self.OverrideAttribs.PciVendorId = self.OptRomDefs.get ('PCI_VENDOR_ID')\r
-        \r
+\r
         if self.OverrideAttribs.PciClassCode is None:\r
             self.OverrideAttribs.PciClassCode = self.OptRomDefs.get ('PCI_CLASS_CODE')\r
-            \r
+\r
         if self.OverrideAttribs.PciDeviceId is None:\r
             self.OverrideAttribs.PciDeviceId = self.OptRomDefs.get ('PCI_DEVICE_ID')\r
-            \r
+\r
         if self.OverrideAttribs.PciRevision is None:\r
             self.OverrideAttribs.PciRevision = self.OptRomDefs.get ('PCI_REVISION')\r
-        \r
-#        InfObj = GenFdsGlobalVariable.WorkSpace.BuildObject[self.PathClassObj, self.CurrentArch]  \r
+\r
+#        InfObj = GenFdsGlobalVariable.WorkSpace.BuildObject[self.PathClassObj, self.CurrentArch]\r
 #        RecordList = InfObj._RawData[MODEL_META_DATA_HEADER, InfObj._Arch, InfObj._Platform]\r
 #        for Record in RecordList:\r
 #            Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)\r
-#            Name = Record[0]  \r
+#            Name = Record[0]\r
     ## GenFfs() method\r
     #\r
     #   Generate FFS\r
@@ -147,8 +147,8 @@ class OptRomInfStatement (FfsInfStatement):
                     OutputFileList.append(GenSecInputFile)\r
                 else:\r
                     FileList, IsSect = Section.Section.GetFileList(self, '', Sect.FileExtension)\r
-                    OutputFileList.extend(FileList)    \r
-        \r
+                    OutputFileList.extend(FileList)\r
+\r
         return OutputFileList\r
 \r
-    
\ No newline at end of file
+\r
index 755eb01da7e15fc097dee86cfcb0be68ae09fe5b..18f3fbd0d7a2a41f78770fe10d60d411101dcfa2 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # process OptionROM generation\r
 #\r
-#  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -28,7 +28,7 @@ from Common.BuildToolError import *
 \r
 T_CHAR_LF = '\n'\r
 \r
-## \r
+##\r
 #\r
 #\r
 class OPTIONROM (OptionRomClassObject):\r
@@ -57,7 +57,7 @@ class OPTIONROM (OptionRomClassObject):
 \r
         # Process Modules in FfsList\r
         for FfsFile in self.FfsList :\r
-            \r
+\r
             if isinstance(FfsFile, OptRomInfStatement.OptRomInfStatement):\r
                 FilePathNameList = FfsFile.GenFfs(IsMakefile=Flag)\r
                 if len(FilePathNameList) == 0:\r
@@ -70,14 +70,14 @@ class OPTIONROM (OptionRomClassObject):
                     if not os.path.exists(TmpOutputDir) :\r
                         os.makedirs(TmpOutputDir)\r
                     TmpOutputFile = os.path.join(TmpOutputDir, FileName+'.tmp')\r
-                    \r
-                    GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile, \r
-                                                           FilePathNameList, \r
-                                                           [], \r
-                                                           FfsFile.OverrideAttribs.NeedCompress, \r
-                                                           FfsFile.OverrideAttribs.PciClassCode, \r
-                                                           FfsFile.OverrideAttribs.PciRevision, \r
-                                                           FfsFile.OverrideAttribs.PciDeviceId, \r
+\r
+                    GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile,\r
+                                                           FilePathNameList,\r
+                                                           [],\r
+                                                           FfsFile.OverrideAttribs.NeedCompress,\r
+                                                           FfsFile.OverrideAttribs.PciClassCode,\r
+                                                           FfsFile.OverrideAttribs.PciRevision,\r
+                                                           FfsFile.OverrideAttribs.PciDeviceId,\r
                                                            FfsFile.OverrideAttribs.PciVendorId,\r
                                                            IsMakefile = Flag)\r
                     BinFileList.append(TmpOutputFile)\r
@@ -89,14 +89,14 @@ class OPTIONROM (OptionRomClassObject):
                     if not os.path.exists(TmpOutputDir) :\r
                         os.makedirs(TmpOutputDir)\r
                     TmpOutputFile = os.path.join(TmpOutputDir, FileName+'.tmp')\r
-                    \r
-                    GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile, \r
-                                                           [FilePathName], \r
-                                                           [], \r
-                                                           FfsFile.OverrideAttribs.NeedCompress, \r
-                                                           FfsFile.OverrideAttribs.PciClassCode, \r
-                                                           FfsFile.OverrideAttribs.PciRevision, \r
-                                                           FfsFile.OverrideAttribs.PciDeviceId, \r
+\r
+                    GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile,\r
+                                                           [FilePathName],\r
+                                                           [],\r
+                                                           FfsFile.OverrideAttribs.NeedCompress,\r
+                                                           FfsFile.OverrideAttribs.PciClassCode,\r
+                                                           FfsFile.OverrideAttribs.PciRevision,\r
+                                                           FfsFile.OverrideAttribs.PciDeviceId,\r
                                                            FfsFile.OverrideAttribs.PciVendorId,\r
                                                            IsMakefile=Flag)\r
                     BinFileList.append(TmpOutputFile)\r
@@ -105,13 +105,13 @@ class OPTIONROM (OptionRomClassObject):
                         EfiFileList.append(FilePathName)\r
                     else:\r
                         BinFileList.append(FilePathName)\r
-                        \r
+\r
         #\r
         # Call EfiRom tool\r
         #\r
         OutputFile = os.path.join(GenFdsGlobalVariable.FvDir, self.DriverName)\r
         OutputFile = OutputFile + '.rom'\r
-        \r
+\r
         GenFdsGlobalVariable.GenerateOptionRom(\r
                                 OutputFile,\r
                                 EfiFileList,\r
@@ -121,17 +121,17 @@ class OPTIONROM (OptionRomClassObject):
         if not Flag:\r
             GenFdsGlobalVariable.InfLogger( "\nGenerate %s Option ROM Successfully" %self.DriverName)\r
         GenFdsGlobalVariable.SharpCounter = 0\r
-        \r
+\r
         return OutputFile\r
 \r
 class OverrideAttribs:\r
-        \r
+\r
     ## The constructor\r
     #\r
     #   @param  self        The object pointer\r
     #\r
     def __init__(self):\r
-        \r
+\r
         self.PciVendorId = None\r
         self.PciClassCode = None\r
         self.PciDeviceId = None\r
index 3b7e30ec85925b1478adf978e88131d92c9aa833..33e4ac8d3c37948eb0f3aa56780b65649559cce2 100644 (file)
@@ -311,7 +311,7 @@ class Region(RegionClassObject):
             if self.Offset >= End:\r
                 Start = End\r
                 continue\r
-            # region located in current blocks \r
+            # region located in current blocks\r
             else:\r
                 # region ended within current blocks\r
                 if self.Offset + self.Size <= End:\r
@@ -363,5 +363,5 @@ class Region(RegionClassObject):
                 else:\r
                     Index += 1\r
 \r
-            \r
+\r
 \r
index 5895998158b6dbd4dc284957716f9956ebcff1ce..ca4705a90c95fc62e7bdf11476e1c7f954c35213 100644 (file)
@@ -160,7 +160,7 @@ class Section (SectionClassObject):
                 SuffixMap = FfsInf.GetFinalTargetSuffixMap()\r
                 if Suffix in SuffixMap:\r
                     FileList.extend(SuffixMap[Suffix])\r
-                \r
+\r
         #Process the file lists is alphabetical for a same section type\r
         if len (FileList) > 1:\r
             FileList.sort()\r
index 18ea37b9afdd72312e0043707165a1413e32e25c..83abc98f07c3af30f6877d37684a6db15122921c 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # process VTF generation\r
 #\r
-#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -25,7 +25,7 @@ T_CHAR_LF = '\n'
 #\r
 #\r
 class Vtf (VtfClassObject):\r
-    \r
+\r
     ## The constructor\r
     #\r
     #   @param  self        The object pointer\r
@@ -46,7 +46,7 @@ class Vtf (VtfClassObject):
         OutputFile = os.path.join(GenFdsGlobalVariable.FvDir, self.UiName + '.Vtf')\r
         BaseAddArg = self.GetBaseAddressArg(FdAddressDict)\r
         OutputArg, VtfRawDict = self.GenOutputArg()\r
-        \r
+\r
         Cmd = (\r
             'GenVtf',\r
             ) + OutputArg + (\r
@@ -55,9 +55,9 @@ class Vtf (VtfClassObject):
 \r
         GenFdsGlobalVariable.CallExternalTool(Cmd, "GenFv -Vtf Failed!")\r
         GenFdsGlobalVariable.SharpCounter = 0\r
-        \r
+\r
         return VtfRawDict\r
-        \r
+\r
     ## GenBsfInf() method\r
     #\r
     #   Generate inf used to generate VTF\r
@@ -154,7 +154,7 @@ class Vtf (VtfClassObject):
         for component in self.ComponentStatementList :\r
             if component.CompLoc.upper() != 'NONE' and not (component.CompLoc.upper() in FvList):\r
                 FvList.append(component.CompLoc.upper())\r
-                \r
+\r
         return FvList\r
 \r
     ## GetBaseAddressArg() method\r
@@ -173,13 +173,13 @@ class Vtf (VtfClassObject):
                 '-s', '0x%x' % Size,\r
                 )\r
         return CmdStr\r
-    \r
+\r
     ## GenOutputArg() method\r
     #\r
     #   Get output arguments for GenVtf\r
     #\r
     #   @param  self        The object pointer\r
-    #                 \r
+    #\r
     def GenOutputArg(self):\r
         FvVtfDict = {}\r
         OutputFileName = ''\r
@@ -192,6 +192,6 @@ class Vtf (VtfClassObject):
             OutputFileName = os.path.join(GenFdsGlobalVariable.FvDir, OutputFileName)\r
             Arg += ('-o', OutputFileName)\r
             FvVtfDict[FvObj.upper()] = OutputFileName\r
-            \r
+\r
         return Arg, FvVtfDict\r
-                \r
+\r
index 9645e9b08db4eea5e7e143615396e52941330601..1be0a28177ff8c39f001629c93d8a84c883d897f 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # Generate PCD table for 'Patchable In Module' type PCD with given .map file.\r
 #    The Patch PCD table like:\r
-#    \r
+#\r
 #    PCD Name    Offset in binary\r
 #    ========    ================\r
 #\r
@@ -40,9 +40,9 @@ __copyright__ = "Copyright (c) 2008 - 2018, Intel Corporation. All rights reserv
 symRe = re.compile('^([\da-fA-F]+):([\da-fA-F]+) +([\.\-:\\\\\w\?@\$<>]+) +([\da-fA-F]+)', re.UNICODE)\r
 \r
 def parsePcdInfoFromMapFile(mapfilepath, efifilepath):\r
-    """ Parse map file to get binary patch pcd information \r
+    """ Parse map file to get binary patch pcd information\r
     @param path    Map file absolution path\r
-    \r
+\r
     @return a list which element hold (PcdName, Offset, SectionName)\r
     """\r
     lines = []\r
@@ -52,7 +52,7 @@ def parsePcdInfoFromMapFile(mapfilepath, efifilepath):
         f.close()\r
     except:\r
         return None\r
-    \r
+\r
     if len(lines) == 0: return None\r
     firstline = lines[0].strip()\r
     if (firstline.startswith("Archive member included ") and\r
@@ -111,7 +111,7 @@ def _parseForGCC(lines, efifilepath):
                     m = pcdPatternGcc.match(lines[index + 1].strip())\r
                     if m is not None:\r
                         bpcds.append((PcdName, int(m.groups(0)[0], 16), int(sections[-1][1], 16), sections[-1][0]))\r
-                \r
+\r
     # get section information from efi file\r
     efisecs = PeImageClass(efifilepath).SectionHeaderList\r
     if efisecs is None or len(efisecs) == 0:\r
@@ -129,11 +129,11 @@ def _parseForGCC(lines, efifilepath):
                 #assert efisec[0].strip() == pcd[3].strip() and efisec[1] + redirection == pcd[2], "There are some differences between map file and efi file"\r
                 pcds.append([pcd[0], efisec[2] + pcd[1] - efisec[1] - redirection, efisec[0]])\r
     return pcds\r
-                \r
+\r
 def _parseGeneral(lines, efifilepath):\r
-    """ For MSFT, ICC, EBC \r
+    """ For MSFT, ICC, EBC\r
     @param lines    line array for map file\r
-    \r
+\r
     @return a list which element hold (PcdName, Offset, SectionName)\r
     """\r
     status = 0    #0 - beginning of file; 1 - PE section definition; 2 - symbol table\r
@@ -177,7 +177,7 @@ def _parseGeneral(lines, efifilepath):
     efisecs = PeImageClass(efifilepath).SectionHeaderList\r
     if efisecs is None or len(efisecs) == 0:\r
         return None\r
-    \r
+\r
     pcds = []\r
     for pcd in bPcds:\r
         index = 0\r
@@ -188,7 +188,7 @@ def _parseGeneral(lines, efifilepath):
             elif pcd[4] == index:\r
                 pcds.append([pcd[0], efisec[2] + pcd[2], efisec[0]])\r
     return pcds\r
-    \r
+\r
 def generatePcdTable(list, pcdpath):\r
     try:\r
         f = open(pcdpath, 'w')\r
@@ -196,12 +196,12 @@ def generatePcdTable(list, pcdpath):
         pass\r
 \r
     f.write('PCD Name                       Offset    Section Name\r\n')\r
-    \r
+\r
     for pcditem in list:\r
         f.write('%-30s 0x%-08X %-6s\r\n' % (pcditem[0], pcditem[1], pcditem[2]))\r
     f.close()\r
 \r
-    #print 'Success to generate Binary Patch PCD table at %s!' % pcdpath \r
+    #print 'Success to generate Binary Patch PCD table at %s!' % pcdpath\r
 \r
 if __name__ == '__main__':\r
     UsageString = "%prog -m <MapFile> -e <EfiFile> -o <OutFile>"\r
@@ -213,7 +213,7 @@ if __name__ == '__main__':
                       help='Absolute path of EFI binary file.')\r
     parser.add_option('-o', '--outputfile', action='store', dest='outfile',\r
                       help='Absolute path of output file to store the got patchable PCD table.')\r
-  \r
+\r
     (options, args) = parser.parse_args()\r
 \r
     if options.mapfile is None or options.efifile is None:\r
index cf2fc7c4f70a471210c031390f1325162fce4d57..8e243aea9603f474193eaea0192c1a3b07dc4575 100644 (file)
@@ -30,14 +30,14 @@ from Common.DataType import *
 # Version and Copyright\r
 __version_number__ = ("0.10" + " " + gBUILD_VERSION)\r
 __version__ = "%prog Version " + __version_number__\r
-__copyright__ = "Copyright (c) 2010, Intel Corporation. All rights reserved."\r
+__copyright__ = "Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved."\r
 \r
 ## PatchBinaryFile method\r
 #\r
 # This method mainly patches the data into binary file.\r
-# \r
+#\r
 # @param FileName    File path of the binary file\r
-# @param ValueOffset Offset value \r
+# @param ValueOffset Offset value\r
 # @param TypeName    DataType Name\r
 # @param Value       Value String\r
 # @param MaxSize     MaxSize value\r
@@ -173,7 +173,7 @@ def PatchBinaryFile(FileName, ValueOffset, TypeName, ValueString, MaxSize=0):
                 return PARAMETER_INVALID, "PCD Value %s is not valid dec or hex string array." % (ValueString)\r
         else:\r
             #\r
-            # Patch ascii string \r
+            # Patch ascii string\r
             #\r
             Index = 0\r
             for ByteString in ValueString[1:-1]:\r
index d8048d49a2aeab5b0a9b79424f7509b749e4a9f7..a34dac423b8c1eeb5698917e3e0b9422c12ea9dc 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-# This tool can be used to generate new RSA 2048 bit private/public key pairs \r
-# in a PEM file format using OpenSSL command line utilities that are installed \r
+# This tool can be used to generate new RSA 2048 bit private/public key pairs\r
+# in a PEM file format using OpenSSL command line utilities that are installed\r
 # on the path specified by the system environment variable OPENSSL_PATH.\r
-# This tool can also optionally write one or more SHA 256 hashes of 2048 bit \r
-# public keys to a binary file, write one or more SHA 256 hashes of 2048 bit \r
-# public keys to a file in a C structure format, and in verbose mode display \r
-# one or more SHA 256 hashes of 2048 bit public keys in a C structure format \r
+# This tool can also optionally write one or more SHA 256 hashes of 2048 bit\r
+# public keys to a binary file, write one or more SHA 256 hashes of 2048 bit\r
+# public keys to a file in a C structure format, and in verbose mode display\r
+# one or more SHA 256 hashes of 2048 bit public keys in a C structure format\r
 # on STDOUT.\r
 # This tool has been tested with OpenSSL 1.0.1e 11 Feb 2013\r
 #\r
@@ -26,7 +26,7 @@ from __future__ import print_function
 \r
 import os\r
 import sys\r
-import argparse \r
+import argparse\r
 import subprocess\r
 from Common.BuildVersion import gBUILD_VERSION\r
 \r
@@ -35,14 +35,14 @@ from Common.BuildVersion import gBUILD_VERSION
 #\r
 __prog__      = 'Rsa2048Sha256GenerateKeys'\r
 __version__   = '%s Version %s' % (__prog__, '0.9 ' + gBUILD_VERSION)\r
-__copyright__ = 'Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.'\r
+__copyright__ = 'Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.'\r
 __usage__     = '%s [options]' % (__prog__)\r
 \r
 \r
 if __name__ == '__main__':\r
   #\r
   # Create command line argument parser object\r
-  #  \r
+  #\r
   parser = argparse.ArgumentParser(prog=__prog__, version=__version__, usage=__usage__, description=__copyright__, conflict_handler='resolve')\r
   group = parser.add_mutually_exclusive_group(required=True)\r
   group.add_argument("-o", "--output", dest='OutputFile', type=argparse.FileType('wb'), metavar='filename', nargs='*', help="specify the output private key filename in PEM format")\r
@@ -55,7 +55,7 @@ if __name__ == '__main__':
 \r
   #\r
   # Parse command line arguments\r
-  #  \r
+  #\r
   args = parser.parse_args()\r
 \r
   #\r
@@ -75,18 +75,18 @@ if __name__ == '__main__':
   #\r
   try:\r
     Process = subprocess.Popen('%s version' % (OpenSslCommand), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)\r
-  except:  \r
+  except:\r
     print('ERROR: Open SSL command not available.  Please verify PATH or set OPENSSL_PATH')\r
     sys.exit(1)\r
-    \r
+\r
   Version = Process.communicate()\r
   if Process.returncode != 0:\r
     print('ERROR: Open SSL command not available.  Please verify PATH or set OPENSSL_PATH')\r
     sys.exit(Process.returncode)\r
   print(Version[0])\r
-  \r
+\r
   args.PemFileName = []\r
-  \r
+\r
   #\r
   # Check for output file argument\r
   #\r
@@ -106,7 +106,7 @@ if __name__ == '__main__':
       if Process.returncode != 0:\r
         print('ERROR: RSA 2048 key generation failed')\r
         sys.exit(Process.returncode)\r
-      \r
+\r
   #\r
   # Check for input file argument\r
   #\r
@@ -158,7 +158,7 @@ if __name__ == '__main__':
   for Item in PublicKeyHash:\r
     PublicKeyHashC = PublicKeyHashC + '0x%02x, ' % (ord(Item))\r
   PublicKeyHashC = PublicKeyHashC[:-2] + '}'\r
-  \r
+\r
   #\r
   # Write SHA 256 of 2048 bit binary public key to public key hash C structure file\r
   #\r
@@ -167,7 +167,7 @@ if __name__ == '__main__':
     args.PublicKeyHashCFile.close ()\r
   except:\r
     pass\r
-    \r
+\r
   #\r
   # If verbose is enabled display the public key in C structure format\r
   #\r
index 807772daff81322c81632916b921a425ad0b37e7..3fd7eefd6af5555c7d8678fa095f9d52f6177655 100644 (file)
@@ -21,7 +21,7 @@ from __future__ import print_function
 \r
 import os\r
 import sys\r
-import argparse \r
+import argparse\r
 import subprocess\r
 import uuid\r
 import struct\r
@@ -33,7 +33,7 @@ from Common.BuildVersion import gBUILD_VERSION
 #\r
 __prog__      = 'Rsa2048Sha256Sign'\r
 __version__   = '%s Version %s' % (__prog__, '0.9 ' + gBUILD_VERSION)\r
-__copyright__ = 'Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.'\r
+__copyright__ = 'Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.'\r
 __usage__     = '%s -e|-d [options] <input_file>' % (__prog__)\r
 \r
 #\r
@@ -61,7 +61,7 @@ TEST_SIGNING_PRIVATE_KEY_FILENAME = 'TestSigningPrivateKey.pem'
 if __name__ == '__main__':\r
   #\r
   # Create command line argument parser object\r
-  #  \r
+  #\r
   parser = argparse.ArgumentParser(prog=__prog__, version=__version__, usage=__usage__, description=__copyright__, conflict_handler='resolve')\r
   group = parser.add_mutually_exclusive_group(required=True)\r
   group.add_argument("-e", action="store_true", dest='Encode', help='encode file')\r
@@ -76,7 +76,7 @@ if __name__ == '__main__':
 \r
   #\r
   # Parse command line arguments\r
-  #  \r
+  #\r
   args = parser.parse_args()\r
 \r
   #\r
@@ -96,19 +96,19 @@ if __name__ == '__main__':
   #\r
   try:\r
     Process = subprocess.Popen('%s version' % (OpenSslCommand), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)\r
-  except:  \r
+  except:\r
     print('ERROR: Open SSL command not available.  Please verify PATH or set OPENSSL_PATH')\r
     sys.exit(1)\r
-    \r
+\r
   Version = Process.communicate()\r
   if Process.returncode != 0:\r
     print('ERROR: Open SSL command not available.  Please verify PATH or set OPENSSL_PATH')\r
     sys.exit(Process.returncode)\r
   print(Version[0])\r
-  \r
+\r
   #\r
   # Read input file into a buffer and save input filename\r
-  #  \r
+  #\r
   args.InputFileName   = args.InputFile.name\r
   args.InputFileBuffer = args.InputFile.read()\r
   args.InputFile.close()\r
@@ -174,17 +174,17 @@ if __name__ == '__main__':
     if args.MonotonicCountStr:\r
       format = "%dsQ" % len(args.InputFileBuffer)\r
       FullInputFileBuffer = struct.pack(format, args.InputFileBuffer, args.MonotonicCountValue)\r
-    # \r
+    #\r
     # Sign the input file using the specified private key and capture signature from STDOUT\r
     #\r
     Process = subprocess.Popen('%s dgst -sha256 -sign "%s"' % (OpenSslCommand, args.PrivateKeyFileName), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)\r
     Signature = Process.communicate(input=FullInputFileBuffer)[0]\r
     if Process.returncode != 0:\r
       sys.exit(Process.returncode)\r
-      \r
+\r
     #\r
     # Write output file that contains hash GUID, Public Key, Signature, and Input data\r
-    #    \r
+    #\r
     args.OutputFile = open(args.OutputFileName, 'wb')\r
     args.OutputFile.write(EFI_HASH_ALGORITHM_SHA256_GUID.get_bytes_le())\r
     args.OutputFile.write(PublicKey)\r
@@ -198,7 +198,7 @@ if __name__ == '__main__':
     #\r
     Header = EFI_CERT_BLOCK_RSA_2048_SHA256._make(EFI_CERT_BLOCK_RSA_2048_SHA256_STRUCT.unpack_from(args.InputFileBuffer))\r
     args.InputFileBuffer = args.InputFileBuffer[EFI_CERT_BLOCK_RSA_2048_SHA256_STRUCT.size:]\r
-    \r
+\r
     #\r
     # Verify that the Hash Type matches the expected SHA256 type\r
     #\r
@@ -222,10 +222,10 @@ if __name__ == '__main__':
     # Write Signature to output file\r
     #\r
     open(args.OutputFileName, 'wb').write(Header.Signature)\r
-      \r
+\r
     #\r
     # Verify signature\r
-    #    \r
+    #\r
     Process = subprocess.Popen('%s dgst -sha256 -prverify "%s" -signature %s' % (OpenSslCommand, args.PrivateKeyFileName, args.OutputFileName), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)\r
     Process.communicate(input=FullInputFileBuffer)\r
     if Process.returncode != 0:\r
@@ -234,6 +234,6 @@ if __name__ == '__main__':
       sys.exit(Process.returncode)\r
 \r
     #\r
-    # Save output file contents from input file \r
-    #    \r
+    # Save output file contents from input file\r
+    #\r
     open(args.OutputFileName, 'wb').write(args.InputFileBuffer)\r
index b0492e291480858c92f0955101a0dd821ea42182..7d971627829746877cbc9f26335e81544272d89b 100644 (file)
@@ -1 +1 @@
-{0x91, 0x29, 0xc4, 0xbd, 0xea, 0x6d, 0xda, 0xb3, 0xaa, 0x6f, 0x50, 0x16, 0xfc, 0xdb, 0x4b, 0x7e, 0x3c, 0xd6, 0xdc, 0xa4, 0x7a, 0x0e, 0xdd, 0xe6, 0x15, 0x8c, 0x73, 0x96, 0xa2, 0xd4, 0xa6, 0x4d}
\ No newline at end of file
+{0x91, 0x29, 0xc4, 0xbd, 0xea, 0x6d, 0xda, 0xb3, 0xaa, 0x6f, 0x50, 0x16, 0xfc, 0xdb, 0x4b, 0x7e, 0x3c, 0xd6, 0xdc, 0xa4, 0x7a, 0x0e, 0xdd, 0xe6, 0x15, 0x8c, 0x73, 0x96, 0xa2, 0xd4, 0xa6, 0x4d}\r
index c311df91c2ec10538f0b73a9abdae54d750d820d..e89b99320d1f697ef23d32ce46fb8b7cd5d12fe5 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase a common table\r
 #\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -19,7 +19,7 @@ import Common.EdkLogger as EdkLogger
 ## TableFile\r
 #\r
 # This class defined a common table\r
-# \r
+#\r
 # @param object:     Inherited from object class\r
 #\r
 # @param Cursor:     Cursor of the database\r
@@ -30,7 +30,7 @@ class Table(object):
         self.Cur = Cursor\r
         self.Table = ''\r
         self.ID = 0\r
-    \r
+\r
     ## Create table\r
     #\r
     # Create a table\r
@@ -46,18 +46,18 @@ class Table(object):
     #\r
     def Insert(self, SqlCommand):\r
         self.Exec(SqlCommand)\r
-    \r
+\r
     ## Query table\r
     #\r
     # Query all records of the table\r
-    #  \r
+    #\r
     def Query(self):\r
         EdkLogger.verbose("\nQuery tabel %s started ..." % self.Table)\r
         SqlCommand = """select * from %s""" % self.Table\r
         self.Cur.execute(SqlCommand)\r
         for Rs in self.Cur:\r
             EdkLogger.verbose(str(Rs))\r
-        \r
+\r
         TotalCount = self.GetCount()\r
         EdkLogger.verbose("*** Total %s records in table %s ***" % (TotalCount, self.Table) )\r
         EdkLogger.verbose("Query tabel %s DONE!" % self.Table)\r
@@ -70,7 +70,7 @@ class Table(object):
         SqlCommand = """drop table IF EXISTS %s""" % self.Table\r
         self.Cur.execute(SqlCommand)\r
         EdkLogger.verbose("Drop tabel %s ... DONE!" % self.Table)\r
-    \r
+\r
     ## Get count\r
     #\r
     # Get a count of all records of the table\r
@@ -82,12 +82,12 @@ class Table(object):
         self.Cur.execute(SqlCommand)\r
         for Item in self.Cur:\r
             return Item[0]\r
-    \r
+\r
     ## Generate ID\r
     #\r
     # Generate an ID if input ID is -1\r
     #\r
-    # @param ID:   Input ID \r
+    # @param ID:   Input ID\r
     #\r
     # @retval ID:  New generated ID\r
     #\r
@@ -96,14 +96,14 @@ class Table(object):
             self.ID = self.ID + 1\r
 \r
         return self.ID\r
-    \r
+\r
     ## Init the ID of the table\r
     #\r
     # Init the ID of the table\r
     #\r
     def InitID(self):\r
         self.ID = self.GetCount()\r
-    \r
+\r
     ## Exec\r
     #\r
     # Exec Sql Command, return result\r
index 2c37592fc67cdd504d7c0ca1d34e42b4d63bbec2..f167e433599a83c1dae19628151dbd2b49b8f812 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase table for data models\r
 #\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -22,7 +22,7 @@ from Common.StringUtils import ConvertToSqlString
 ## TableDataModel\r
 #\r
 # This class defined a table used for data model\r
-# \r
+#\r
 # @param object:       Inherited from object class\r
 #\r
 #\r
@@ -30,7 +30,7 @@ class TableDataModel(Table):
     def __init__(self, Cursor):\r
         Table.__init__(self, Cursor)\r
         self.Table = 'DataModel'\r
-    \r
+\r
     ## Create table\r
     #\r
     # Create table DataModel\r
@@ -62,13 +62,13 @@ class TableDataModel(Table):
         (Name, Description) = ConvertToSqlString((Name, Description))\r
         SqlCommand = """insert into %s values(%s, %s, '%s', '%s')""" % (self.Table, self.ID, CrossIndex, Name, Description)\r
         Table.Insert(self, SqlCommand)\r
-        \r
+\r
         return self.ID\r
-    \r
+\r
     ## Init table\r
     #\r
     # Create all default records of table DataModel\r
-    #  \r
+    #\r
     def InitTable(self):\r
         EdkLogger.verbose("\nInitialize table DataModel started ...")\r
         for Item in DataClass.MODEL_LIST:\r
@@ -77,7 +77,7 @@ class TableDataModel(Table):
             Description = Item[0]\r
             self.Insert(CrossIndex, Name, Description)\r
         EdkLogger.verbose("Initialize table DataModel ... DONE!")\r
-    \r
+\r
     ## Get CrossIndex\r
     #\r
     # Get a model's cross index from its name\r
@@ -91,5 +91,5 @@ class TableDataModel(Table):
         self.Cur.execute(SqlCommand)\r
         for Item in self.Cur:\r
             CrossIndex = Item[0]\r
-        \r
+\r
         return CrossIndex\r
index 97139c58d893215506174b6d73375e6840cbd6e7..faa18e309d72a0399a3879d37c37473e8dd14056 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase table for dec datas\r
 #\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -22,7 +22,7 @@ from Common.StringUtils import ConvertToSqlString
 ## TableDec\r
 #\r
 # This class defined a table used for data model\r
-# \r
+#\r
 # @param object:       Inherited from object class\r
 #\r
 #\r
@@ -30,7 +30,7 @@ class TableDec(Table):
     def __init__(self, Cursor):\r
         Table.__init__(self, Cursor)\r
         self.Table = 'Dec'\r
-    \r
+\r
     ## Create table\r
     #\r
     # Create table Dec\r
@@ -90,14 +90,14 @@ class TableDec(Table):
         SqlCommand = """insert into %s values(%s, %s, '%s', '%s', '%s', '%s', %s, %s, %s, %s, %s, %s, %s)""" \\r
                      % (self.Table, self.ID, Model, Value1, Value2, Value3, Arch, BelongsToItem, BelongsToFile, StartLine, StartColumn, EndLine, EndColumn, Enabled)\r
         Table.Insert(self, SqlCommand)\r
-        \r
+\r
         return self.ID\r
-    \r
+\r
     ## Query table\r
     #\r
-    # @param Model:  The Model of Record \r
+    # @param Model:  The Model of Record\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self, Model):\r
         SqlCommand = """select ID, Value1, Value2, Value3, Arch, BelongsToItem, BelongsToFile, StartLine from %s\r
index 4ac54933aa3b93285fefc61f14585b4c38693501..227748951841263f00444aa16bc1ca2260d1d4ac 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase table for dsc datas\r
 #\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -22,7 +22,7 @@ from Common.StringUtils import ConvertToSqlString
 ## TableDsc\r
 #\r
 # This class defined a table used for data model\r
-# \r
+#\r
 # @param object:       Inherited from object class\r
 #\r
 #\r
@@ -30,7 +30,7 @@ class TableDsc(Table):
     def __init__(self, Cursor):\r
         Table.__init__(self, Cursor)\r
         self.Table = 'Dsc'\r
-    \r
+\r
     ## Create table\r
     #\r
     # Create table Dsc\r
@@ -90,14 +90,14 @@ class TableDsc(Table):
         SqlCommand = """insert into %s values(%s, %s, '%s', '%s', '%s', '%s', %s, %s, %s, %s, %s, %s, %s)""" \\r
                      % (self.Table, self.ID, Model, Value1, Value2, Value3, Arch, BelongsToItem, BelongsToFile, StartLine, StartColumn, EndLine, EndColumn, Enabled)\r
         Table.Insert(self, SqlCommand)\r
-        \r
+\r
         return self.ID\r
-    \r
+\r
     ## Query table\r
     #\r
-    # @param Model:  The Model of Record \r
+    # @param Model:  The Model of Record\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self, Model):\r
         SqlCommand = """select ID, Value1, Value2, Value3, Arch, BelongsToItem, BelongsToFile, StartLine from %s\r
index bccf25ca45d5ff7155c9098699de6eea97099dc1..e8291b48d7c369564a5768ffe7e557e6d62ac18b 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase table for ECC reports\r
 #\r
-# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -24,7 +24,7 @@ import Eot.EotGlobalData as EotGlobalData
 ## TableReport\r
 #\r
 # This class defined a table used for data model\r
-# \r
+#\r
 # @param object:       Inherited from object class\r
 #\r
 #\r
@@ -32,7 +32,7 @@ class TableEotReport(Table):
     def __init__(self, Cursor):\r
         Table.__init__(self, Cursor)\r
         self.Table = 'Report'\r
-    \r
+\r
     ## Create table\r
     #\r
     # Create table report\r
@@ -68,9 +68,9 @@ class TableEotReport(Table):
                      % (self.Table, self.ID, ModuleID, ModuleName, ModuleGuid, SourceFileID, SourceFileFullPath, \\r
                         ItemName, ItemType, ItemMode, GuidName, GuidMacro, GuidValue, BelongsToFunction, Enabled)\r
         Table.Insert(self, SqlCommand)\r
-        \r
+\r
     def GetMaxID(self):\r
         SqlCommand = """select max(ID) from %s""" % self.Table\r
         self.Cur.execute(SqlCommand)\r
         for Item in self.Cur:\r
-            return Item[0]
\ No newline at end of file
+            return Item[0]\r
index eea8e9404d55c605dc1a9bf8ad14ceb395792c99..872afc79ef4417a80bedfe0ed4d3ca2dd34e9ef9 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase table for fdf datas\r
 #\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -22,7 +22,7 @@ from Common.StringUtils import ConvertToSqlString
 ## TableFdf\r
 #\r
 # This class defined a table used for data model\r
-# \r
+#\r
 # @param object:       Inherited from object class\r
 #\r
 #\r
@@ -30,7 +30,7 @@ class TableFdf(Table):
     def __init__(self, Cursor):\r
         Table.__init__(self, Cursor)\r
         self.Table = 'Fdf'\r
-    \r
+\r
     ## Create table\r
     #\r
     # Create table Fdf\r
@@ -91,14 +91,14 @@ class TableFdf(Table):
         SqlCommand = """insert into %s values(%s, %s, '%s', '%s', '%s', '%s', '%s', %s, %s, %s, %s, %s, %s, %s)""" \\r
                      % (self.Table, self.ID, Model, Value1, Value2, Value3, Scope1, Scope2, BelongsToItem, BelongsToFile, StartLine, StartColumn, EndLine, EndColumn, Enabled)\r
         Table.Insert(self, SqlCommand)\r
-        \r
+\r
         return self.ID\r
-    \r
+\r
     ## Query table\r
     #\r
-    # @param Model:  The Model of Record \r
+    # @param Model:  The Model of Record\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self, Model):\r
         SqlCommand = """select ID, Value1, Value2, Value3, Scope1, Scope2, BelongsToItem, BelongsToFile, StartLine from %s\r
index ac762ea7fcc01c7f98e05a0a44a9863561c9f534..34a0b47418dce9892cf83e8bb3a47d5c3e6205d3 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase table for files\r
 #\r
-# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -23,14 +23,14 @@ from CommonDataClass.DataClass import FileClass
 ## TableFile\r
 #\r
 # This class defined a table used for file\r
-# \r
+#\r
 # @param object:       Inherited from object class\r
 #\r
 class TableFile(Table):\r
     def __init__(self, Cursor):\r
         Table.__init__(self, Cursor)\r
         self.Table = 'File'\r
-    \r
+\r
     ## Create table\r
     #\r
     # Create table File\r
@@ -72,15 +72,15 @@ class TableFile(Table):
         SqlCommand = """insert into %s values(%s, '%s', '%s', '%s', '%s', %s, '%s')""" \\r
                                            % (self.Table, self.ID, Name, ExtName, Path, FullPath, Model, TimeStamp)\r
         Table.Insert(self, SqlCommand)\r
-        \r
+\r
         return self.ID\r
     ## InsertFile\r
     #\r
     # Insert one file to table\r
     #\r
     # @param FileFullPath:  The full path of the file\r
-    # @param Model:         The model of the file \r
-    # \r
+    # @param Model:         The model of the file\r
+    #\r
     # @retval FileID:       The ID after record is inserted\r
     #\r
     def InsertFile(self, FileFullPath, Model):\r
@@ -89,7 +89,7 @@ class TableFile(Table):
         TimeStamp = os.stat(FileFullPath)[8]\r
         File = FileClass(-1, Name, Ext, Filepath, FileFullPath, Model, '', [], [], [])\r
         return self.Insert(File.Name, File.ExtName, File.Path, File.FullPath, File.Model, TimeStamp)\r
-    \r
+\r
     ## Get ID of a given file\r
     #\r
     #   @param  FilePath    Path of file\r
index 3d40bd61f6953d17aae220ca7c36f8ea5ef243ab..bf301fd2620cd9d526c3dfaf65bc464f38579225 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase table for functions\r
 #\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -21,21 +21,21 @@ from Common.StringUtils import ConvertToSqlString
 ## TableFunction\r
 #\r
 # This class defined a table used for function\r
-# \r
+#\r
 # @param Table:       Inherited from Table class\r
 #\r
 class TableFunction(Table):\r
     def __init__(self, Cursor):\r
         Table.__init__(self, Cursor)\r
         self.Table = 'Function'\r
-    \r
+\r
     ## Create table\r
     #\r
     # Create table Function\r
     #\r
     # @param ID:                  ID of a Function\r
     # @param Header:              Header of a Function\r
-    # @param Modifier:            Modifier of a Function \r
+    # @param Modifier:            Modifier of a Function\r
     # @param Name:                Name of a Function\r
     # @param ReturnStatement:     ReturnStatement of a Funciont\r
     # @param StartLine:           StartLine of a Function\r
@@ -72,7 +72,7 @@ class TableFunction(Table):
     #\r
     # @param ID:                  ID of a Function\r
     # @param Header:              Header of a Function\r
-    # @param Modifier:            Modifier of a Function \r
+    # @param Modifier:            Modifier of a Function\r
     # @param Name:                Name of a Function\r
     # @param ReturnStatement:     ReturnStatement of a Funciont\r
     # @param StartLine:           StartLine of a Function\r
index 0ec8b3c162ceaff2cd0bfe928756d69ef7067859..5ce528b26a4c713d958c4972b86080d97427689c 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase table for Identifiers\r
 #\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -21,7 +21,7 @@ from Table import Table
 ## TableIdentifier\r
 #\r
 # This class defined a table used for Identifier\r
-# \r
+#\r
 # @param object:       Inherited from object class\r
 #\r
 #\r
@@ -29,7 +29,7 @@ class TableIdentifier(Table):
     def __init__(self, Cursor):\r
         Table.__init__(self, Cursor)\r
         self.Table = 'Identifier'\r
-    \r
+\r
     ## Create table\r
     #\r
     # Create table Identifier\r
@@ -87,4 +87,4 @@ class TableIdentifier(Table):
                                            % (self.Table, self.ID, Modifier, Type, Name, Value, Model, BelongsToFile, BelongsToFunction, StartLine, StartColumn, EndLine, EndColumn)\r
         Table.Insert(self, SqlCommand)\r
 \r
-        return self.ID
\ No newline at end of file
+        return self.ID\r
index 478b77776e359e535b60f3cbe9acfb8c1a768b2d..c524256a0c5dd44a8bdd484b720304be4c83f27d 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase table for inf datas\r
 #\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -22,7 +22,7 @@ from Common.StringUtils import ConvertToSqlString
 ## TableInf\r
 #\r
 # This class defined a table used for data model\r
-# \r
+#\r
 # @param object:       Inherited from object class\r
 #\r
 #\r
@@ -30,7 +30,7 @@ class TableInf(Table):
     def __init__(self, Cursor):\r
         Table.__init__(self, Cursor)\r
         self.Table = 'Inf'\r
-    \r
+\r
     ## Create table\r
     #\r
     # Create table Inf\r
@@ -96,14 +96,14 @@ class TableInf(Table):
         SqlCommand = """insert into %s values(%s, %s, '%s', '%s', '%s', '%s', '%s', '%s', %s, %s, %s, %s, %s, %s, %s)""" \\r
                      % (self.Table, self.ID, Model, Value1, Value2, Value3, Value4, Value5, Arch, BelongsToItem, BelongsToFile, StartLine, StartColumn, EndLine, EndColumn, Enabled)\r
         Table.Insert(self, SqlCommand)\r
-        \r
+\r
         return self.ID\r
-    \r
+\r
     ## Query table\r
     #\r
-    # @param Model:  The Model of Record \r
+    # @param Model:  The Model of Record\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self, Model):\r
         SqlCommand = """select ID, Value1, Value2, Value3, Arch, BelongsToItem, BelongsToFile, StartLine from %s\r
index ca1c0f0c8ab21733d3a15eb60a100aad4de60c76..689ae22e899688143a07cb62c8b323e952b5d8b1 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase table for pcds\r
 #\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -21,7 +21,7 @@ from Common.StringUtils import ConvertToSqlString
 ## TablePcd\r
 #\r
 # This class defined a table used for pcds\r
-# \r
+#\r
 # @param object:       Inherited from object class\r
 #\r
 #\r
@@ -29,7 +29,7 @@ class TablePcd(Table):
     def __init__(self, Cursor):\r
         Table.__init__(self, Cursor)\r
         self.Table = 'Pcd'\r
-    \r
+\r
     ## Create table\r
     #\r
     # Create table Pcd\r
@@ -87,4 +87,4 @@ class TablePcd(Table):
                                            % (self.Table, self.ID, CName, TokenSpaceGuidCName, Token, DatumType, Model, BelongsToFile, BelongsToFunction, StartLine, StartColumn, EndLine, EndColumn)\r
         Table.Insert(self, SqlCommand)\r
 \r
-        return self.ID
\ No newline at end of file
+        return self.ID\r
index 9ce1d0aa25182a1e4920da8da7d3894ab402d42b..1a039249ff26e07e682c2ebb90d5b17ec15e1d41 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase table for ECC reports\r
 #\r
-# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -25,7 +25,7 @@ from Common.LongFilePathSupport import OpenLongFilePath as open
 ## TableReport\r
 #\r
 # This class defined a table used for data model\r
-# \r
+#\r
 # @param object:       Inherited from object class\r
 #\r
 #\r
@@ -33,7 +33,7 @@ class TableReport(Table):
     def __init__(self, Cursor):\r
         Table.__init__(self, Cursor)\r
         self.Table = 'Report'\r
-    \r
+\r
     ## Create table\r
     #\r
     # Create table report\r
@@ -78,7 +78,7 @@ class TableReport(Table):
 \r
     ## Query table\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self):\r
         SqlCommand = """select ID, ErrorID, OtherMsg, BelongsToTable, BelongsToItem, Corrected from %s\r
index 26d2bb9ebfce1ab4bc8dc5b253d71201810ce949..8d523a6ab8fc709a762915cbe83b37388ac6fa27 100644 (file)
@@ -86,13 +86,13 @@ class TargetTool():
             if isinstance(self.TargetTxtDictionary[Key], type([])):\r
                 print("%-30s = %s" % (Key, ''.join(elem + ' ' for elem in self.TargetTxtDictionary[Key])))\r
             elif self.TargetTxtDictionary[Key] is None:\r
-                errMsg += "  Missing %s configuration information, please use TargetTool to set value!" % Key + os.linesep \r
+                errMsg += "  Missing %s configuration information, please use TargetTool to set value!" % Key + os.linesep\r
             else:\r
                 print("%-30s = %s" % (Key, self.TargetTxtDictionary[Key]))\r
-        \r
+\r
         if errMsg != '':\r
             print(os.linesep + 'Warning:' + os.linesep + errMsg)\r
-            \r
+\r
     def RWFile(self, CommentCharacter, KeySplitCharacter, Num):\r
         try:\r
             fr = open(self.FileName, 'r')\r
@@ -111,7 +111,7 @@ class TargetTool():
                                 existKeys.append(Key)\r
                             else:\r
                                 print("Warning: Found duplicate key item in original configuration files!")\r
-                                \r
+\r
                             if Num == 0:\r
                                 Line = "%-30s = \n" % Key\r
                             else:\r
@@ -126,12 +126,12 @@ class TargetTool():
                     if Line is None:\r
                         Line = "%-30s = " % key\r
                     fw.write(Line)\r
-                \r
+\r
             fr.close()\r
             fw.close()\r
             os.remove(self.FileName)\r
             os.rename(os.path.normpath(os.path.join(self.WorkSpace, 'Conf\\targetnew.txt')), self.FileName)\r
-            \r
+\r
         except:\r
             last_type, last_value, last_tb = sys.exc_info()\r
             traceback.print_exception(last_type, last_value, last_tb)\r
@@ -143,20 +143,20 @@ def GetConfigureKeyValue(self, Key):
         if os.path.exists(dscFullPath):\r
             Line = "%-30s = %s\n" % (Key, self.Opt.DSCFILE)\r
         else:\r
-            EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND, \r
+            EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND,\r
                             "DSC file %s does not exist!" % self.Opt.DSCFILE, RaiseError=False)\r
     elif Key == TAB_TAT_DEFINES_TOOL_CHAIN_CONF and self.Opt.TOOL_DEFINITION_FILE is not None:\r
         tooldefFullPath = os.path.join(self.WorkSpace, self.Opt.TOOL_DEFINITION_FILE)\r
         if os.path.exists(tooldefFullPath):\r
             Line = "%-30s = %s\n" % (Key, self.Opt.TOOL_DEFINITION_FILE)\r
         else:\r
-            EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND, \r
+            EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND,\r
                             "Tooldef file %s does not exist!" % self.Opt.TOOL_DEFINITION_FILE, RaiseError=False)\r
 \r
     elif self.Opt.NUM >= 2:\r
         Line = "%-30s = %s\n" % (Key, 'Enable')\r
     elif self.Opt.NUM <= 1:\r
-        Line = "%-30s = %s\n" % (Key, 'Disable')        \r
+        Line = "%-30s = %s\n" % (Key, 'Disable')\r
     elif Key == TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER and self.Opt.NUM is not None:\r
         Line = "%-30s = %s\n" % (Key, str(self.Opt.NUM))\r
     elif Key == TAB_TAT_DEFINES_TARGET and self.Opt.TARGET is not None:\r
@@ -170,13 +170,13 @@ def GetConfigureKeyValue(self, Key):
         if os.path.exists(buildruleFullPath):\r
             Line = "%-30s = %s\n" % (Key, self.Opt.BUILD_RULE_FILE)\r
         else:\r
-            EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND, \r
+            EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND,\r
                             "Build rule file %s does not exist!" % self.Opt.BUILD_RULE_FILE, RaiseError=False)\r
     return Line\r
 \r
 VersionNumber = ("0.01" + " " + gBUILD_VERSION)\r
 __version__ = "%prog Version " + VersionNumber\r
-__copyright__ = "Copyright (c) 2007 - 2010, Intel Corporation  All rights reserved."\r
+__copyright__ = "Copyright (c) 2007 - 2018, Intel Corporation  All rights reserved."\r
 __usage__ = "%prog [options] {args} \\r
 \nArgs:                                                  \\r
 \n Clean  clean the all default configuration of target.txt. \\r
@@ -200,7 +200,7 @@ def RangeCheckCallback(option, opt_str, value, parser):
             setattr(parser.values, option.dest, value)\r
     else:\r
         parser.error("Option %s only allows one instance in command line!" % option)\r
-        \r
+\r
 def MyOptionParser():\r
     parser = OptionParser(version=__version__, prog="TargetTool.exe", usage=__usage__, description=__copyright__)\r
     parser.add_option("-a", "--arch", action="append", type="choice", choices=['IA32', 'X64', 'IPF', 'EBC', 'ARM', 'AARCH64', '0'], dest="TARGET_ARCH",\r
@@ -226,7 +226,7 @@ if __name__ == '__main__':
     if os.getenv('WORKSPACE') is None:\r
         print("ERROR: WORKSPACE should be specified or edksetup script should be executed before run TargetTool")\r
         sys.exit(1)\r
-        \r
+\r
     (opt, args) = MyOptionParser()\r
     if len(args) != 1 or (args[0].lower() != 'print' and args[0].lower() != 'clean' and args[0].lower() != 'set'):\r
         print("The number of args isn't 1 or the value of args is invalid.")\r
index b46d507b4e55e503712ecf0a205cb3d940f206b4..4b3091bec3df2372d4b6f3a46e4529f01e964784 100644 (file)
@@ -31,7 +31,7 @@ from Common.LongFilePathSupport import OpenLongFilePath as open
 # Version and Copyright\r
 __version_number__ = ("0.10" + " " + gBUILD_VERSION)\r
 __version__ = "%prog Version " + __version_number__\r
-__copyright__ = "Copyright (c) 2007-2017, Intel Corporation. All rights reserved."\r
+__copyright__ = "Copyright (c) 2007-2018, Intel Corporation. All rights reserved."\r
 \r
 ## Regular expression for matching Line Control directive like "#line xxx"\r
 gLineControlDirective = re.compile('^\s*#(?:line)?\s+([0-9]+)\s+"*([^"]*)"')\r
@@ -261,7 +261,7 @@ def TrimPreprocessedFile(Source, Target, ConvertHex, TrimLong):
 #\r
 def TrimPreprocessedVfr(Source, Target):\r
     CreateDirectory(os.path.dirname(Target))\r
-    \r
+\r
     try:\r
         f = open (Source, 'r')\r
     except:\r
@@ -338,7 +338,7 @@ def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None):
             SearchPathList = [LocalSearchPath] + IncludePathList\r
         else:\r
             SearchPathList = IncludePathList\r
-  \r
+\r
         for IncludePath in SearchPathList:\r
             IncludeFile = os.path.join(IncludePath, Source)\r
             if os.path.isfile(IncludeFile):\r
@@ -349,7 +349,7 @@ def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None):
     except:\r
         EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source)\r
 \r
-    \r
+\r
     # avoid A "include" B and B "include" A\r
     IncludeFile = os.path.abspath(os.path.normpath(IncludeFile))\r
     if IncludeFile in gIncludedAslFile:\r
@@ -357,7 +357,7 @@ def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None):
                        ExtraData= "%s -> %s" % (" -> ".join(gIncludedAslFile), IncludeFile))\r
         return []\r
     gIncludedAslFile.append(IncludeFile)\r
-    \r
+\r
     for Line in F:\r
         LocalSearchPath = None\r
         Result = gAslIncludePattern.findall(Line)\r
@@ -367,7 +367,7 @@ def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None):
                 NewFileContent.append("%s%s" % (Indent, Line))\r
                 continue\r
             #\r
-            # We should first search the local directory if current file are using pattern #include "XXX" \r
+            # We should first search the local directory if current file are using pattern #include "XXX"\r
             #\r
             if Result[0][2] == '"':\r
                 LocalSearchPath = os.path.dirname(IncludeFile)\r
@@ -388,20 +388,20 @@ def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None):
 #\r
 # @param  Source          File to be trimmed\r
 # @param  Target          File to store the trimmed content\r
-# @param  IncludePathFile The file to log the external include path \r
+# @param  IncludePathFile The file to log the external include path\r
 #\r
 def TrimAslFile(Source, Target, IncludePathFile):\r
     CreateDirectory(os.path.dirname(Target))\r
-    \r
+\r
     SourceDir = os.path.dirname(Source)\r
     if SourceDir == '':\r
         SourceDir = '.'\r
-    \r
+\r
     #\r
     # Add source directory as the first search directory\r
     #\r
     IncludePathList = [SourceDir]\r
-    \r
+\r
     #\r
     # If additional include path file is specified, append them all\r
     # to the search directory list.\r
@@ -672,7 +672,7 @@ def Main():
             EdkLogger.SetLevel(CommandOptions.LogLevel)\r
     except FatalError as X:\r
         return 1\r
-    \r
+\r
     try:\r
         if CommandOptions.FileType == "Vfr":\r
             if CommandOptions.OutputFile is None:\r
index edd46967533b6e4616b5b7d6371d4d0f77920c06..eca8c1ce35649d7e17f5fc49cab73ef10bc8d66a 100644 (file)
@@ -2,11 +2,11 @@
 #\r
 # This file is for build version number auto generation\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,4 +17,4 @@
 Build version information\r
 '''\r
 \r
-gBUILD_VERSION = ""\r
+gBUILD_VERSION = "Developer Build based on Revision: Unknown"\r
index 406a8a7e92de100a1fc9ca7f53c4fdd4e8c3d19a..9c3baa1b12d8d2f9e9f1322b258a3c5593ecf86f 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file is for installed package information database operations\r
 #\r
-# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 #\r
@@ -40,7 +40,7 @@ DEPEX_CHECK_PACKAGE_NOT_FOUND, DEPEX_CHECK_DP_NOT_FOUND) = (0, 1, 2, 3)
 ## DependencyRules\r
 #\r
 # This class represents the dependency rule check mechanism\r
-# \r
+#\r
 # @param object:      Inherited from object class\r
 #\r
 class DependencyRules(object):\r
@@ -53,7 +53,7 @@ class DependencyRules(object):
 \r
         # Add package info from the DIST to be installed.\r
         self.PkgsToBeDepend.extend(self.GenToBeInstalledPkgList(ToBeInstalledPkgList))\r
-        \r
+\r
     def GenToBeInstalledPkgList(self, ToBeInstalledPkgList):\r
         if not ToBeInstalledPkgList:\r
             return []\r
@@ -81,7 +81,7 @@ class DependencyRules(object):
             return True\r
         else:\r
             return False\r
-        \r
+\r
     ## Check whether a module depex satisfied.\r
     #\r
     # @param ModuleObj: A module object\r
@@ -101,7 +101,7 @@ class DependencyRules(object):
             #\r
             Exist = self.CheckPackageExists(Dep.GetGuid(), Dep.GetVersion())\r
             #\r
-            # check whether satisfied by current distribution \r
+            # check whether satisfied by current distribution\r
             #\r
             if not Exist:\r
                 if DpObj is None:\r
@@ -119,7 +119,7 @@ class DependencyRules(object):
                 else:\r
                     Result = False\r
                     break\r
-        \r
+\r
         if not Result:\r
             Logger.Error("CheckModuleDepex", UNKNOWN_ERROR, \\r
                          ST.ERR_DEPENDENCY_NOT_MATCH % (ModuleObj.GetName(), \\r
@@ -127,7 +127,7 @@ class DependencyRules(object):
                                                         Dep.GetGuid(), \\r
                                                         Dep.GetVersion()))\r
         return Result\r
-            \r
+\r
     ## Check whether a package exists in a package list specified by PkgsToBeDepend.\r
     #\r
     # @param Guid: Guid of a package\r
@@ -154,7 +154,7 @@ class DependencyRules(object):
 \r
         Logger.Verbose(ST.MSG_CHECK_PACKAGE_FINISH)\r
         return Found\r
-         \r
+\r
     ## Check whether a package depex satisfied.\r
     #\r
     # @param PkgObj: A package object\r
@@ -171,7 +171,7 @@ class DependencyRules(object):
             else:\r
                 return False\r
         return True\r
-        \r
+\r
     ## Check whether a DP exists.\r
     #\r
     # @param Guid: Guid of a Distribution\r
@@ -216,7 +216,7 @@ class DependencyRules(object):
         return True, DpObj\r
 \r
 \r
-    ## Check whether a DP depex satisfied by current workspace \r
+    ## Check whether a DP depex satisfied by current workspace\r
     #  (excluding the original distribution's packages to be replaced) for Replace\r
     #\r
     # @param DpObj:  A distribution object\r
@@ -243,17 +243,17 @@ class DependencyRules(object):
                 continue\r
             else:\r
                 return False\r
-            \r
+\r
         for ModKey in DpObj.ModuleSurfaceArea.keys():\r
             ModObj = DpObj.ModuleSurfaceArea[ModKey]\r
             if self.CheckModuleDepexSatisfied(ModObj, DpObj):\r
                 continue\r
             else:\r
                 return False\r
-        \r
+\r
         return True\r
-    \r
-    ## Check whether a DP could be removed from current workspace. \r
+\r
+    ## Check whether a DP could be removed from current workspace.\r
     #\r
     # @param DpGuid:  File's guid\r
     # @param DpVersion: File's version\r
@@ -267,7 +267,7 @@ class DependencyRules(object):
         #\r
         # remove modules that included in current DP\r
         # List of item (FilePath)\r
-        DpModuleList = self.IpiDb.GetDpModuleList(DpGuid, DpVersion) \r
+        DpModuleList = self.IpiDb.GetDpModuleList(DpGuid, DpVersion)\r
         for Module in DpModuleList:\r
             if Module in WsModuleList:\r
                 WsModuleList.remove(Module)\r
@@ -277,7 +277,7 @@ class DependencyRules(object):
         #\r
         # get packages in current Dp and find the install path\r
         # List of item (PkgGuid, PkgVersion, InstallPath)\r
-        DpPackageList = self.IpiDb.GetPackageListFromDp(DpGuid, DpVersion) \r
+        DpPackageList = self.IpiDb.GetPackageListFromDp(DpGuid, DpVersion)\r
         DpPackagePathList = []\r
         WorkSP = GlobalData.gWORKSPACE\r
         for (PkgName, PkgGuid, PkgVersion, DecFile) in self.WsPkgList:\r
@@ -290,18 +290,18 @@ class DependencyRules(object):
             else:\r
                 InstallPath = DecPath\r
                 DecFileRelaPath = DecFile\r
-                \r
+\r
             if (PkgGuid, PkgVersion, InstallPath) in DpPackageList:\r
                 DpPackagePathList.append(DecFileRelaPath)\r
                 DpPackageList.remove((PkgGuid, PkgVersion, InstallPath))\r
-        \r
+\r
         #\r
         # the left items in DpPackageList are the packages that installed but not found anymore\r
         #\r
         for (PkgGuid, PkgVersion, InstallPath) in DpPackageList:\r
             Logger.Warn("UPT",\r
                         ST.WARN_INSTALLED_PACKAGE_NOT_FOUND%(PkgGuid, PkgVersion, InstallPath))\r
-        \r
+\r
         #\r
         # check modules to see if has dependency on package of current DP\r
         #\r
@@ -320,7 +320,7 @@ class DependencyRules(object):
     # @param NewDpPkgList: a list of package information (Guid, Version) in new Dp\r
     # @retval Replaceable: True if distribution could be replaced, False Else\r
     # @retval DependModuleList: the list of modules that make distribution can not be replaced\r
-    # \r
+    #\r
     def CheckDpDepexForReplace(self, OrigDpGuid, OrigDpVersion, NewDpPkgList):\r
         Replaceable = True\r
         DependModuleList = []\r
@@ -328,19 +328,19 @@ class DependencyRules(object):
         #\r
         # remove modules that included in current DP\r
         # List of item (FilePath)\r
-        DpModuleList = self.IpiDb.GetDpModuleList(OrigDpGuid, OrigDpVersion) \r
+        DpModuleList = self.IpiDb.GetDpModuleList(OrigDpGuid, OrigDpVersion)\r
         for Module in DpModuleList:\r
             if Module in WsModuleList:\r
                 WsModuleList.remove(Module)\r
             else:\r
                 Logger.Warn("UPT\n",\r
                             ST.ERR_MODULE_NOT_INSTALLED % Module)\r
-        \r
+\r
         OtherPkgList = NewDpPkgList\r
         #\r
         # get packages in current Dp and find the install path\r
         # List of item (PkgGuid, PkgVersion, InstallPath)\r
-        DpPackageList = self.IpiDb.GetPackageListFromDp(OrigDpGuid, OrigDpVersion) \r
+        DpPackageList = self.IpiDb.GetPackageListFromDp(OrigDpGuid, OrigDpVersion)\r
         DpPackagePathList = []\r
         WorkSP = GlobalData.gWORKSPACE\r
         for (PkgName, PkgGuid, PkgVersion, DecFile) in self.WsPkgList:\r
@@ -353,7 +353,7 @@ class DependencyRules(object):
             else:\r
                 InstallPath = DecPath\r
                 DecFileRelaPath = DecFile\r
-                \r
+\r
             if (PkgGuid, PkgVersion, InstallPath) in DpPackageList:\r
                 DpPackagePathList.append(DecFileRelaPath)\r
                 DpPackageList.remove((PkgGuid, PkgVersion, InstallPath))\r
@@ -366,7 +366,7 @@ class DependencyRules(object):
         for (PkgGuid, PkgVersion, InstallPath) in DpPackageList:\r
             Logger.Warn("UPT",\r
                         ST.WARN_INSTALLED_PACKAGE_NOT_FOUND%(PkgGuid, PkgVersion, InstallPath))\r
-        \r
+\r
         #\r
         # check modules to see if it can be satisfied by package not belong to removed DP\r
         #\r
@@ -376,8 +376,8 @@ class DependencyRules(object):
                 DependModuleList.append(Module)\r
         return (Replaceable, DependModuleList)\r
 \r
-    \r
-## check whether module depends on packages in DpPackagePathList, return True \r
+\r
+## check whether module depends on packages in DpPackagePathList, return True\r
 # if found, False else\r
 #\r
 # @param Path: a module path\r
@@ -432,7 +432,7 @@ def GetPackagePath(InfPath):
 # @param DpPackagePathList:  a list of Package Paths\r
 # @param OtherPkgList:       a list of Package Information (Guid, Version)\r
 # @retval:  False: module depends on package in DpPackagePathList and can not be satisfied by OtherPkgList\r
-#           True:  either module doesn't depend on DpPackagePathList or module depends on DpPackagePathList \r
+#           True:  either module doesn't depend on DpPackagePathList or module depends on DpPackagePathList\r
 #                 but can be satisfied by OtherPkgList\r
 #\r
 def VerifyReplaceModuleDep(Path, DpPackagePathList, OtherPkgList):\r
index 81c67fb510a28014981c2647020262f9f4b17247..873e2b4de441fa9ffbc2ebfcc3a7c6e80e76df39 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file is used to define a class object to describe a distribution package\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -50,62 +50,62 @@ class DistributionPackageHeaderObject(IdentificationObject, \
         self.Date = ''\r
         self.Signature = 'Md5Sum'\r
         self.XmlSpecification = ''\r
-    \r
+\r
     def GetReadOnly(self):\r
         return self.ReadOnly\r
-    \r
+\r
     def SetReadOnly(self, ReadOnly):\r
         self.ReadOnly = ReadOnly\r
-    \r
+\r
     def GetRePackage(self):\r
         return self.RePackage\r
-    \r
+\r
     def SetRePackage(self, RePackage):\r
         self.RePackage = RePackage\r
-        \r
+\r
     def GetVendor(self):\r
         return self.Vendor\r
-    \r
+\r
     def SetDate(self, Date):\r
         self.Date = Date\r
-        \r
+\r
     def GetDate(self):\r
         return self.Date\r
-    \r
+\r
     def SetSignature(self, Signature):\r
         self.Signature = Signature\r
-        \r
+\r
     def GetSignature(self):\r
         return self.Signature\r
-    \r
+\r
     def SetXmlSpecification(self, XmlSpecification):\r
         self.XmlSpecification = XmlSpecification\r
-        \r
+\r
     def GetXmlSpecification(self):\r
         return self.XmlSpecification\r
-    \r
+\r
 ## DistributionPackageClass\r
 #\r
 # @param object: DistributionPackageClass\r
-# \r
+#\r
 class DistributionPackageClass(object):\r
     def __init__(self):\r
         self.Header = DistributionPackageHeaderObject()\r
         #\r
         # {(Guid, Version, Path) : PackageObj}\r
         #\r
-        self.PackageSurfaceArea = Sdict() \r
+        self.PackageSurfaceArea = Sdict()\r
         #\r
         # {(Guid, Version, Name, Path) : ModuleObj}\r
         #\r
-        self.ModuleSurfaceArea = Sdict()  \r
+        self.ModuleSurfaceArea = Sdict()\r
         self.Tools = MiscFileObject()\r
         self.MiscellaneousFiles = MiscFileObject()\r
         self.UserExtensions = []\r
         self.FileList = []\r
-    \r
+\r
     ## Get all included packages and modules for a distribution package\r
-    # \r
+    #\r
     # @param WorkspaceDir:  WorkspaceDir\r
     # @param PackageList:   A list of all packages\r
     # @param ModuleList:    A list of all modules\r
@@ -132,7 +132,7 @@ class DistributionPackageClass(object):
                     WsRelPath = os.path.normpath(WsRelPath)\r
                     if ModuleList and WsRelPath in ModuleList:\r
                         Logger.Error("UPT",\r
-                                     OPTION_VALUE_INVALID, \r
+                                     OPTION_VALUE_INVALID,\r
                                      ST.ERR_NOT_STANDALONE_MODULE_ERROR%\\r
                                      (WsRelPath, PackageFile))\r
                     Filename = os.path.normpath\\r
@@ -140,12 +140,12 @@ class DistributionPackageClass(object):
                     os.path.splitext(Filename)\r
                     #\r
                     # Call INF parser to generate Inf Object.\r
-                    # Actually, this call is not directly call, but wrapped by \r
+                    # Actually, this call is not directly call, but wrapped by\r
                     # Inf class in InfPomAlignment.\r
                     #\r
                     try:\r
                         ModuleObj = InfPomAlignment(Filename, WorkspaceDir, PackageObj.GetPackagePath())\r
-     \r
+\r
                         #\r
                         # Add module to package\r
                         #\r
@@ -161,7 +161,7 @@ class DistributionPackageClass(object):
                                         ST.WRN_EDK1_INF_FOUND%Filename)\r
                         else:\r
                             raise\r
-                \r
+\r
                 self.PackageSurfaceArea\\r
                 [(PackageObj.GetGuid(), PackageObj.GetVersion(), \\r
                   PackageObj.GetCombinePath())] = PackageObj\r
@@ -176,16 +176,16 @@ class DistributionPackageClass(object):
 \r
                 try:\r
                     ModuleObj = InfPomAlignment(ModuleFileFullPath, WorkspaceDir)\r
-                    ModuleKey = (ModuleObj.GetGuid(), \r
-                                 ModuleObj.GetVersion(), \r
-                                 ModuleObj.GetName(), \r
+                    ModuleKey = (ModuleObj.GetGuid(),\r
+                                 ModuleObj.GetVersion(),\r
+                                 ModuleObj.GetName(),\r
                                  ModuleObj.GetCombinePath())\r
                     self.ModuleSurfaceArea[ModuleKey] = ModuleObj\r
                 except FatalError as ErrCode:\r
                     if ErrCode.message == EDK1_INF_ERROR:\r
                         Logger.Error("UPT",\r
                                      EDK1_INF_ERROR,\r
-                                     ST.WRN_EDK1_INF_FOUND%ModuleFileFullPath, \r
+                                     ST.WRN_EDK1_INF_FOUND%ModuleFileFullPath,\r
                                      ExtraData=ST.ERR_NOT_SUPPORTED_SA_MODULE)\r
                     else:\r
                         raise\r
@@ -193,16 +193,16 @@ class DistributionPackageClass(object):
         # Recover WorkspaceDir\r
         WorkspaceDir = Root\r
 \r
-    ## Get all files included for a distribution package, except tool/misc of \r
+    ## Get all files included for a distribution package, except tool/misc of\r
     # distribution level\r
-    # \r
+    #\r
     # @retval DistFileList  A list of filepath for NonMetaDataFile, relative to workspace\r
     # @retval MetaDataFileList  A list of filepath for MetaDataFile, relative to workspace\r
     #\r
     def GetDistributionFileList(self):\r
         MetaDataFileList = []\r
         SkipModulesUniList = []\r
-        \r
+\r
         for Guid, Version, Path in self.PackageSurfaceArea:\r
             Package = self.PackageSurfaceArea[Guid, Version, Path]\r
             PackagePath = Package.GetPackagePath()\r
@@ -221,7 +221,7 @@ class DistributionPackageClass(object):
                     MiscFileFullPath = os.path.normpath(os.path.join(PackagePath, FileObj.GetURI()))\r
                     if MiscFileFullPath not in self.FileList:\r
                         self.FileList.append(MiscFileFullPath)\r
-            \r
+\r
             Module = None\r
             ModuleDict = Package.GetModuleDict()\r
             for Guid, Version, Name, Path in ModuleDict:\r
@@ -262,12 +262,12 @@ class DistributionPackageClass(object):
             for NonMetaDataFile in NonMetaDataFileList:\r
                 if NonMetaDataFile not in self.FileList:\r
                     self.FileList.append(NonMetaDataFile)\r
-            \r
+\r
         for SkipModuleUni in SkipModulesUniList:\r
             if SkipModuleUni in self.FileList:\r
                 self.FileList.remove(SkipModuleUni)\r
 \r
         return  self.FileList, MetaDataFileList\r
 \r
-        \r
+\r
 \r
index 67e86f4f74547424970f8f0b8f5b25b1a79b4fee..ceae12fb37c9793b1df34bbe32bb84b2b12745a4 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file hooks file and directory creation and removal\r
 #\r
-# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
index 3bce33748198362f36abe08f833e017bac8a770b..a781d358c86c0d742978ef6ee92366c0e791bc51 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file is for installed package information database operations\r
 #\r
-# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -33,8 +33,8 @@ import platform as pf
 #\r
 # This class represents the installed package information database\r
 # Add/Remove/Get installed distribution package information here.\r
-# \r
-# \r
+#\r
+#\r
 # @param object:      Inherited from object class\r
 # @param DbPath:      A string for the path of the database\r
 #\r
@@ -71,16 +71,16 @@ class IpiDatabase(object):
                 SqlCommand = """\r
                 create table %s (\r
                 Dummy TEXT NOT NULL,\r
-                PRIMARY KEY (Dummy)                                               \r
+                PRIMARY KEY (Dummy)\r
                 )""" % self.DummyTable\r
                 self.Cur.execute(SqlCommand)\r
                 self.Conn.commit()\r
             except sqlite3.OperationalError:\r
-                Logger.Error("UPT", \r
-                             UPT_ALREADY_RUNNING_ERROR, \r
+                Logger.Error("UPT",\r
+                             UPT_ALREADY_RUNNING_ERROR,\r
                              ST.ERR_UPT_ALREADY_RUNNING_ERROR\r
                              )\r
-        \r
+\r
         #\r
         # Create new table\r
         #\r
@@ -89,12 +89,12 @@ class IpiDatabase(object):
         DpGuid TEXT NOT NULL,DpVersion TEXT NOT NULL,\r
         InstallTime REAL NOT NULL,\r
         NewPkgFileName TEXT NOT NULL,\r
-        PkgFileName TEXT NOT NULL,                                               \r
+        PkgFileName TEXT NOT NULL,\r
         RePackage TEXT NOT NULL,\r
-        PRIMARY KEY (DpGuid, DpVersion)                                               \r
+        PRIMARY KEY (DpGuid, DpVersion)\r
         )""" % self.DpTable\r
         self.Cur.execute(SqlCommand)\r
-        \r
+\r
         SqlCommand = """\r
         create table IF NOT EXISTS %s (\r
         FilePath TEXT NOT NULL,\r
@@ -104,7 +104,7 @@ class IpiDatabase(object):
         PRIMARY KEY (FilePath)\r
         )""" % self.DpFileListTable\r
         self.Cur.execute(SqlCommand)\r
-        \r
+\r
         SqlCommand = """\r
         create table IF NOT EXISTS %s (\r
         PackageGuid TEXT NOT NULL,\r
@@ -116,7 +116,7 @@ class IpiDatabase(object):
         PRIMARY KEY (PackageGuid, PackageVersion, InstallPath)\r
         )""" % self.PkgTable\r
         self.Cur.execute(SqlCommand)\r
-                \r
+\r
         SqlCommand = """\r
         create table IF NOT EXISTS %s (\r
         ModuleGuid TEXT NOT NULL,\r
@@ -129,7 +129,7 @@ class IpiDatabase(object):
         PRIMARY KEY (ModuleGuid, ModuleVersion, ModuleName, InstallPath)\r
         )""" % self.ModInPkgTable\r
         self.Cur.execute(SqlCommand)\r
-        \r
+\r
         SqlCommand = """\r
         create table IF NOT EXISTS %s (\r
         ModuleGuid TEXT NOT NULL,\r
@@ -142,7 +142,7 @@ class IpiDatabase(object):
         PRIMARY KEY (ModuleGuid, ModuleVersion, ModuleName, InstallPath)\r
         )""" % self.StandaloneModTable\r
         self.Cur.execute(SqlCommand)\r
-        \r
+\r
         SqlCommand = """\r
         create table IF NOT EXISTS %s (\r
         ModuleGuid TEXT NOT NULL,\r
@@ -153,9 +153,9 @@ class IpiDatabase(object):
         DepexVersion TEXT\r
         )""" % self.ModDepexTable\r
         self.Cur.execute(SqlCommand)\r
-        \r
+\r
         self.Conn.commit()\r
-        \r
+\r
         Logger.Verbose(ST.MSG_INIT_IPI_FINISH)\r
 \r
     def RollBack(self):\r
@@ -199,7 +199,7 @@ class IpiDatabase(object):
                     self._AddDpFilePathList(DpObj.Header.GetGuid(), \\r
                                             DpObj.Header.GetVersion(), FilePath, \\r
                                             Md5Sum)\r
-    \r
+\r
             for ModKey in DpObj.ModuleSurfaceArea.keys():\r
                 ModGuid = ModKey[0]\r
                 ModVersion = ModKey[1]\r
@@ -219,17 +219,17 @@ class IpiDatabase(object):
                     self._AddDpFilePathList(DpObj.Header.GetGuid(), \\r
                                             DpObj.Header.GetVersion(), \\r
                                             Path, Md5Sum)\r
-    \r
+\r
             #\r
             # add tool/misc files\r
             #\r
             for (Path, Md5Sum) in DpObj.FileList:\r
                 self._AddDpFilePathList(DpObj.Header.GetGuid(), \\r
                                         DpObj.Header.GetVersion(), Path, Md5Sum)\r
-                                    \r
+\r
             self._AddDp(DpObj.Header.GetGuid(), DpObj.Header.GetVersion(), \\r
                         NewDpPkgFileName, DpPkgFileName, RePackage)\r
-    \r
+\r
         except sqlite3.IntegrityError as DetailMsg:\r
             Logger.Error("UPT",\r
                          UPT_DB_UPDATE_ERROR,\r
@@ -239,17 +239,17 @@ class IpiDatabase(object):
 \r
     ## Add a distribution install information\r
     #\r
-    # @param Guid         Guid of the distribution package  \r
-    # @param Version      Version of the distribution package  \r
+    # @param Guid         Guid of the distribution package\r
+    # @param Version      Version of the distribution package\r
     # @param NewDpFileName the saved filename of distribution package file\r
     # @param DistributionFileName the filename of distribution package file\r
     #\r
     def _AddDp(self, Guid, Version, NewDpFileName, DistributionFileName, \\r
                RePackage):\r
-        \r
+\r
         if Version is None or len(Version.strip()) == 0:\r
             Version = 'N/A'\r
-        \r
+\r
         #\r
         # Add newly installed DP information to DB.\r
         #\r
@@ -264,10 +264,10 @@ class IpiDatabase(object):
          DistributionFileName, str(RePackage).upper())\r
         self.Cur.execute(SqlCommand)\r
 \r
-        \r
+\r
     ## Add a file list from DP\r
     #\r
-    # @param DpGuid: A DpGuid \r
+    # @param DpGuid: A DpGuid\r
     # @param DpVersion: A DpVersion\r
     # @param Path: A Path\r
     # @param Path: A Md5Sum\r
@@ -284,26 +284,26 @@ class IpiDatabase(object):
         (self.DpFileListTable, Path, DpGuid, DpVersion, Md5Sum)\r
 \r
         self.Cur.execute(SqlCommand)\r
-            \r
+\r
     ## Add a package install information\r
     #\r
-    # @param Guid: A package guid \r
+    # @param Guid: A package guid\r
     # @param Version: A package version\r
-    # @param DpGuid: A DpGuid \r
+    # @param DpGuid: A DpGuid\r
     # @param DpVersion: A DpVersion\r
     # @param Path: A Path\r
     #\r
     def _AddPackage(self, Guid, Version, DpGuid=None, DpVersion=None, Path=''):\r
-        \r
+\r
         if Version is None or len(Version.strip()) == 0:\r
             Version = 'N/A'\r
-        \r
+\r
         if DpGuid is None or len(DpGuid.strip()) == 0:\r
             DpGuid = 'N/A'\r
-        \r
+\r
         if DpVersion is None or len(DpVersion.strip()) == 0:\r
             DpVersion = 'N/A'\r
-        \r
+\r
         #\r
         # Add newly installed package information to DB.\r
         #\r
@@ -312,10 +312,10 @@ class IpiDatabase(object):
         """insert into %s values('%s', '%s', %s, '%s', '%s', '%s')""" % \\r
         (self.PkgTable, Guid, Version, CurrentTime, DpGuid, DpVersion, Path)\r
         self.Cur.execute(SqlCommand)\r
-        \r
+\r
     ## Add a module that from a package install information\r
     #\r
-    # @param Guid:    Module Guid \r
+    # @param Guid:    Module Guid\r
     # @param Version: Module version\r
     # @param Name:    Module Name\r
     # @param PkgGuid: Package Guid\r
@@ -324,21 +324,21 @@ class IpiDatabase(object):
     #\r
     def _AddModuleInPackage(self, Guid, Version, Name, PkgGuid=None, \\r
                             PkgVersion=None, Path=''):\r
-        \r
+\r
         if Version is None or len(Version.strip()) == 0:\r
             Version = 'N/A'\r
-        \r
+\r
         if PkgGuid is None or len(PkgGuid.strip()) == 0:\r
             PkgGuid = 'N/A'\r
-        \r
+\r
         if PkgVersion is None or len(PkgVersion.strip()) == 0:\r
             PkgVersion = 'N/A'\r
-            \r
+\r
         if os.name == 'posix':\r
             Path = Path.replace('\\', os.sep)\r
         else:\r
             Path = Path.replace('/', os.sep)\r
-        \r
+\r
         #\r
         # Add module from package information to DB.\r
         #\r
@@ -348,7 +348,7 @@ class IpiDatabase(object):
         (self.ModInPkgTable, Guid, Version, Name, CurrentTime, PkgGuid, PkgVersion, \\r
          Path)\r
         self.Cur.execute(SqlCommand)\r
-    \r
+\r
     ## Add a module that is standalone install information\r
     #\r
     # @param Guid: a module Guid\r
@@ -360,16 +360,16 @@ class IpiDatabase(object):
     #\r
     def _AddStandaloneModule(self, Guid, Version, Name, DpGuid=None, \\r
                              DpVersion=None, Path=''):\r
-        \r
+\r
         if Version is None or len(Version.strip()) == 0:\r
             Version = 'N/A'\r
-        \r
+\r
         if DpGuid is None or len(DpGuid.strip()) == 0:\r
             DpGuid = 'N/A'\r
-        \r
+\r
         if DpVersion is None or len(DpVersion.strip()) == 0:\r
             DpVersion = 'N/A'\r
-        \r
+\r
         #\r
         # Add module standalone information to DB.\r
         #\r
@@ -379,7 +379,7 @@ class IpiDatabase(object):
         (self.StandaloneModTable, Guid, Version, Name, CurrentTime, DpGuid, \\r
          DpVersion, Path)\r
         self.Cur.execute(SqlCommand)\r
-    \r
+\r
     ## Add a module depex\r
     #\r
     # @param Guid: a module Guid\r
@@ -390,49 +390,49 @@ class IpiDatabase(object):
     #\r
     def _AddModuleDepex(self, Guid, Version, Name, Path, DepexGuid=None, \\r
                         DepexVersion=None):\r
-                \r
+\r
         if DepexGuid is None or len(DepexGuid.strip()) == 0:\r
             DepexGuid = 'N/A'\r
-        \r
+\r
         if DepexVersion is None or len(DepexVersion.strip()) == 0:\r
             DepexVersion = 'N/A'\r
-            \r
+\r
         if os.name == 'posix':\r
             Path = Path.replace('\\', os.sep)\r
         else:\r
             Path = Path.replace('/', os.sep)\r
-        \r
+\r
         #\r
         # Add module depex information to DB.\r
         #\r
         SqlCommand = """insert into %s values('%s', '%s', '%s', '%s', '%s', '%s')"""\\r
          % (self.ModDepexTable, Guid, Version, Name, Path, DepexGuid, DepexVersion)\r
         self.Cur.execute(SqlCommand)\r
-        \r
-    ## Remove a distribution install information, if no version specified, \r
+\r
+    ## Remove a distribution install information, if no version specified,\r
     # remove all DPs with this Guid.\r
     #\r
-    # @param DpGuid: guid of dpex \r
+    # @param DpGuid: guid of dpex\r
     # @param DpVersion: version of dpex\r
     #\r
     def RemoveDpObj(self, DpGuid, DpVersion):\r
-        \r
+\r
         PkgList = self.GetPackageListFromDp(DpGuid, DpVersion)\r
         #\r
         # delete from ModDepex the standalone module's dependency\r
         #\r
         SqlCommand = \\r
-        """delete from ModDepexInfo where ModDepexInfo.ModuleGuid in \r
-        (select ModuleGuid from StandaloneModInfo as B where B.DpGuid = '%s' \r
+        """delete from ModDepexInfo where ModDepexInfo.ModuleGuid in\r
+        (select ModuleGuid from StandaloneModInfo as B where B.DpGuid = '%s'\r
         and B.DpVersion = '%s')\r
         and ModDepexInfo.ModuleVersion in\r
-        (select ModuleVersion from StandaloneModInfo as B \r
+        (select ModuleVersion from StandaloneModInfo as B\r
         where B.DpGuid = '%s' and B.DpVersion = '%s')\r
         and ModDepexInfo.ModuleName in\r
-        (select ModuleName from StandaloneModInfo as B \r
+        (select ModuleName from StandaloneModInfo as B\r
         where B.DpGuid = '%s' and B.DpVersion = '%s')\r
         and ModDepexInfo.InstallPath in\r
-        (select InstallPath from StandaloneModInfo as B \r
+        (select InstallPath from StandaloneModInfo as B\r
         where B.DpGuid = '%s' and B.DpVersion = '%s') """ % \\r
         (DpGuid, DpVersion, DpGuid, DpVersion, DpGuid, DpVersion, DpGuid, DpVersion)\r
 \r
@@ -443,24 +443,24 @@ class IpiDatabase(object):
         for Pkg in PkgList:\r
 \r
             SqlCommand = \\r
-            """delete from ModDepexInfo where ModDepexInfo.ModuleGuid in \r
-            (select ModuleGuid from ModInPkgInfo \r
-            where ModInPkgInfo.PackageGuid ='%s' and \r
+            """delete from ModDepexInfo where ModDepexInfo.ModuleGuid in\r
+            (select ModuleGuid from ModInPkgInfo\r
+            where ModInPkgInfo.PackageGuid ='%s' and\r
             ModInPkgInfo.PackageVersion = '%s')\r
             and ModDepexInfo.ModuleVersion in\r
-            (select ModuleVersion from ModInPkgInfo \r
-            where ModInPkgInfo.PackageGuid ='%s' and \r
+            (select ModuleVersion from ModInPkgInfo\r
+            where ModInPkgInfo.PackageGuid ='%s' and\r
             ModInPkgInfo.PackageVersion = '%s')\r
             and ModDepexInfo.ModuleName in\r
-            (select ModuleName from ModInPkgInfo \r
-            where ModInPkgInfo.PackageGuid ='%s' and \r
+            (select ModuleName from ModInPkgInfo\r
+            where ModInPkgInfo.PackageGuid ='%s' and\r
             ModInPkgInfo.PackageVersion = '%s')\r
             and ModDepexInfo.InstallPath in\r
-            (select InstallPath from ModInPkgInfo where \r
-            ModInPkgInfo.PackageGuid ='%s' \r
+            (select InstallPath from ModInPkgInfo where\r
+            ModInPkgInfo.PackageGuid ='%s'\r
             and ModInPkgInfo.PackageVersion = '%s')""" \\r
                             % (Pkg[0], Pkg[1], Pkg[0], Pkg[1], Pkg[0], Pkg[1], Pkg[0], Pkg[1])\r
-            \r
+\r
             self.Cur.execute(SqlCommand)\r
         #\r
         # delete the standalone module\r
@@ -474,7 +474,7 @@ class IpiDatabase(object):
         #\r
         for Pkg in PkgList:\r
             SqlCommand = \\r
-            """delete from %s where %s.PackageGuid ='%s' \r
+            """delete from %s where %s.PackageGuid ='%s'\r
             and %s.PackageVersion = '%s'""" % \\r
             (self.ModInPkgTable, self.ModInPkgTable, Pkg[0], \\r
              self.ModInPkgTable, Pkg[1])\r
@@ -493,23 +493,23 @@ class IpiDatabase(object):
         """delete from %s where DpGuid ='%s' and DpVersion = '%s'""" % \\r
         (self.DpFileListTable, DpGuid, DpVersion)\r
         self.Cur.execute(SqlCommand)\r
-        #    \r
+        #\r
         # delete DP\r
         #\r
         SqlCommand = \\r
         """delete from %s where DpGuid ='%s' and DpVersion = '%s'""" % \\r
         (self.DpTable, DpGuid, DpVersion)\r
         self.Cur.execute(SqlCommand)\r
-        \r
+\r
         #self.Conn.commit()\r
-        \r
+\r
     ## Get a list of distribution install information.\r
     #\r
-    # @param Guid: distribution package guid  \r
-    # @param Version: distribution package version \r
+    # @param Guid: distribution package guid\r
+    # @param Version: distribution package version\r
     #\r
     def GetDp(self, Guid, Version):\r
-        \r
+\r
         if Version is None or len(Version.strip()) == 0:\r
             Version = 'N/A'\r
             Logger.Verbose(ST.MSG_GET_DP_INSTALL_LIST)\r
@@ -517,7 +517,7 @@ class IpiDatabase(object):
             SqlCommand = """select * from %s where DpGuid ='%s'""" % \\r
             (self.DpTable, DpGuid)\r
             self.Cur.execute(SqlCommand)\r
-        \r
+\r
         else:\r
             Logger.Verbose(ST.MSG_GET_DP_INSTALL_INFO_START)\r
             (DpGuid, DpVersion) = (Guid, Version)\r
@@ -533,14 +533,14 @@ class IpiDatabase(object):
             InstallTime = DpInfo[2]\r
             PkgFileName = DpInfo[3]\r
             DpList.append((DpGuid, DpVersion, InstallTime, PkgFileName))\r
-            \r
-        Logger.Verbose(ST.MSG_GET_DP_INSTALL_INFO_FINISH)    \r
+\r
+        Logger.Verbose(ST.MSG_GET_DP_INSTALL_INFO_FINISH)\r
         return DpList\r
-    \r
+\r
     ## Get a list of distribution install dirs\r
     #\r
-    # @param Guid: distribution package guid \r
-    # @param Version: distribution package version \r
+    # @param Guid: distribution package guid\r
+    # @param Version: distribution package version\r
     #\r
     def GetDpInstallDirList(self, Guid, Version):\r
         SqlCommand = """select InstallPath from PkgInfo where DpGuid = '%s' and DpVersion = '%s'""" % (Guid, Version)\r
@@ -562,11 +562,11 @@ class IpiDatabase(object):
 \r
     ## Get a list of distribution install file path information.\r
     #\r
-    # @param Guid: distribution package guid \r
-    # @param Version: distribution package version \r
+    # @param Guid: distribution package guid\r
+    # @param Version: distribution package version\r
     #\r
     def GetDpFileList(self, Guid, Version):\r
-        \r
+\r
         (DpGuid, DpVersion) = (Guid, Version)\r
         SqlCommand = \\r
         """select * from %s where DpGuid ='%s' and DpVersion = '%s'""" % \\r
@@ -578,7 +578,7 @@ class IpiDatabase(object):
             Path = Result[0]\r
             Md5Sum = Result[3]\r
             PathList.append((os.path.join(self.Workspace, Path), Md5Sum))\r
-        \r
+\r
         return PathList\r
 \r
     ## Get files' repackage attribute if present that are installed into current workspace\r
@@ -588,12 +588,12 @@ class IpiDatabase(object):
     def GetRePkgDict(self):\r
         SqlCommand = """select * from %s """ % (self.DpTable)\r
         self.Cur.execute(SqlCommand)\r
-        \r
+\r
         DpInfoList = []\r
         for Result in self.Cur:\r
             DpInfoList.append(Result)\r
 \r
-        FileDict = {}        \r
+        FileDict = {}\r
         for Result in DpInfoList:\r
             DpGuid = Result[0]\r
             DpVersion = Result[1]\r
@@ -606,12 +606,12 @@ class IpiDatabase(object):
             for FileInfo in self.GetDpFileList(DpGuid, DpVersion):\r
                 PathInfo = FileInfo[0]\r
                 FileDict[PathInfo] = DpGuid, DpVersion, NewDpFileName, RePackage\r
-                \r
+\r
         return FileDict\r
-    \r
+\r
     ## Get (Guid, Version) from distribution file name information.\r
     #\r
-    # @param DistributionFile: Distribution File  \r
+    # @param DistributionFile: Distribution File\r
     #\r
     def GetDpByName(self, DistributionFile):\r
         SqlCommand = """select * from %s where NewPkgFileName = '%s'""" % \\r
@@ -622,34 +622,34 @@ class IpiDatabase(object):
             DpGuid = Result[0]\r
             DpVersion = Result[1]\r
             NewDpFileName = Result[3]\r
-   \r
+\r
             return (DpGuid, DpVersion, NewDpFileName)\r
         else:\r
             return (None, None, None)\r
-        \r
+\r
     ## Get a list of package information.\r
     #\r
-    # @param Guid: package guid  \r
+    # @param Guid: package guid\r
     # @param Version: package version\r
     #\r
     def GetPackage(self, Guid, Version, DpGuid='', DpVersion=''):\r
-        \r
+\r
         if DpVersion == '' or DpGuid == '':\r
 \r
             (PackageGuid, PackageVersion) = (Guid, Version)\r
-            SqlCommand = """select * from %s where PackageGuid ='%s' \r
+            SqlCommand = """select * from %s where PackageGuid ='%s'\r
             and PackageVersion = '%s'""" % (self.PkgTable, PackageGuid, \\r
                                             PackageVersion)\r
             self.Cur.execute(SqlCommand)\r
-        \r
+\r
         elif Version is None or len(Version.strip()) == 0:\r
-            \r
+\r
             SqlCommand = """select * from %s where PackageGuid ='%s'""" % \\r
             (self.PkgTable, Guid)\r
             self.Cur.execute(SqlCommand)\r
         else:\r
             (PackageGuid, PackageVersion) = (Guid, Version)\r
-            SqlCommand = """select * from %s where PackageGuid ='%s' and \r
+            SqlCommand = """select * from %s where PackageGuid ='%s' and\r
             PackageVersion = '%s'\r
                             and DpGuid = '%s' and DpVersion = '%s'""" % \\r
                             (self.PkgTable, PackageGuid, PackageVersion, \\r
@@ -664,10 +664,10 @@ class IpiDatabase(object):
             InstallPath = PkgInfo[5]\r
             PkgList.append((PkgGuid, PkgVersion, InstallTime, DpGuid, \\r
                             DpVersion, InstallPath))\r
-        \r
+\r
         return PkgList\r
\r
-       \r
+\r
+\r
     ## Get a list of module in package information.\r
     #\r
     # @param Guid: A module guid\r
@@ -676,15 +676,15 @@ class IpiDatabase(object):
     def GetModInPackage(self, Guid, Version, Name, Path, PkgGuid='', PkgVersion=''):\r
         (ModuleGuid, ModuleVersion, ModuleName, InstallPath) = (Guid, Version, Name, Path)\r
         if PkgVersion == '' or PkgGuid == '':\r
-            SqlCommand = """select * from %s where ModuleGuid ='%s' and \r
-            ModuleVersion = '%s' and InstallPath = '%s' \r
+            SqlCommand = """select * from %s where ModuleGuid ='%s' and\r
+            ModuleVersion = '%s' and InstallPath = '%s'\r
             and ModuleName = '%s'""" % (self.ModInPkgTable, ModuleGuid, \\r
                                        ModuleVersion, InstallPath, ModuleName)\r
             self.Cur.execute(SqlCommand)\r
         else:\r
-            SqlCommand = """select * from %s where ModuleGuid ='%s' and \r
-            ModuleVersion = '%s' and InstallPath = '%s' \r
-            and ModuleName = '%s' and PackageGuid ='%s' \r
+            SqlCommand = """select * from %s where ModuleGuid ='%s' and\r
+            ModuleVersion = '%s' and InstallPath = '%s'\r
+            and ModuleName = '%s' and PackageGuid ='%s'\r
             and PackageVersion = '%s'\r
                             """ % (self.ModInPkgTable, ModuleGuid, \\r
                                    ModuleVersion, InstallPath, ModuleName, PkgGuid, PkgVersion)\r
@@ -698,26 +698,26 @@ class IpiDatabase(object):
             InstallPath = ModInfo[5]\r
             ModList.append((ModGuid, ModVersion, InstallTime, PkgGuid, \\r
                             PkgVersion, InstallPath))\r
-        \r
+\r
         return ModList\r
-    \r
+\r
     ## Get a list of module standalone.\r
     #\r
-    # @param Guid: A module guid \r
-    # @param Version: A module version \r
+    # @param Guid: A module guid\r
+    # @param Version: A module version\r
     #\r
     def GetStandaloneModule(self, Guid, Version, Name, Path, DpGuid='', DpVersion=''):\r
         (ModuleGuid, ModuleVersion, ModuleName, InstallPath) = (Guid, Version, Name, Path)\r
         if DpGuid == '':\r
-            SqlCommand = """select * from %s where ModuleGuid ='%s' and \r
-            ModuleVersion = '%s' and InstallPath = '%s' \r
+            SqlCommand = """select * from %s where ModuleGuid ='%s' and\r
+            ModuleVersion = '%s' and InstallPath = '%s'\r
             and ModuleName = '%s'""" % (self.StandaloneModTable, ModuleGuid, \\r
                                        ModuleVersion, InstallPath, ModuleName)\r
             self.Cur.execute(SqlCommand)\r
-        \r
+\r
         else:\r
-            SqlCommand = """select * from %s where ModuleGuid ='%s' and \r
-            ModuleVersion = '%s' and InstallPath = '%s' and ModuleName = '%s' and DpGuid ='%s' and DpVersion = '%s' \r
+            SqlCommand = """select * from %s where ModuleGuid ='%s' and\r
+            ModuleVersion = '%s' and InstallPath = '%s' and ModuleName = '%s' and DpGuid ='%s' and DpVersion = '%s'\r
                             """ % (self.StandaloneModTable, ModuleGuid, \\r
                                    ModuleVersion, ModuleName, InstallPath, DpGuid, DpVersion)\r
             self.Cur.execute(SqlCommand)\r
@@ -730,18 +730,18 @@ class IpiDatabase(object):
             InstallPath = ModInfo[5]\r
             ModList.append((ModGuid, ModVersion, InstallTime, DpGuid, \\r
                             DpVersion, InstallPath))\r
-        \r
+\r
         return ModList\r
-    \r
+\r
     ## Get a list of module information that comes from DP.\r
     #\r
-    # @param DpGuid: A Distrabution Guid \r
-    # @param DpVersion: A Distrabution version  \r
+    # @param DpGuid: A Distrabution Guid\r
+    # @param DpVersion: A Distrabution version\r
     #\r
     def GetSModInsPathListFromDp(self, DpGuid, DpVersion):\r
 \r
         PathList = []\r
-        SqlCommand = """select InstallPath from %s where DpGuid ='%s' \r
+        SqlCommand = """select InstallPath from %s where DpGuid ='%s'\r
         and DpVersion = '%s'\r
                         """ % (self.StandaloneModTable, DpGuid, DpVersion)\r
         self.Cur.execute(SqlCommand)\r
@@ -749,17 +749,17 @@ class IpiDatabase(object):
         for Result in self.Cur:\r
             InstallPath = Result[0]\r
             PathList.append(InstallPath)\r
-        \r
+\r
         return PathList\r
-    \r
+\r
     ## Get a list of package information.\r
     #\r
-    # @param DpGuid: A Distrabution Guid \r
-    # @param DpVersion: A Distrabution version \r
+    # @param DpGuid: A Distrabution Guid\r
+    # @param DpVersion: A Distrabution version\r
     #\r
     def GetPackageListFromDp(self, DpGuid, DpVersion):\r
 \r
-        SqlCommand = """select * from %s where DpGuid ='%s' and \r
+        SqlCommand = """select * from %s where DpGuid ='%s' and\r
         DpVersion = '%s' """ % (self.PkgTable, DpGuid, DpVersion)\r
         self.Cur.execute(SqlCommand)\r
 \r
@@ -769,31 +769,31 @@ class IpiDatabase(object):
             PkgVersion = PkgInfo[1]\r
             InstallPath = PkgInfo[5]\r
             PkgList.append((PkgGuid, PkgVersion, InstallPath))\r
-        \r
+\r
         return PkgList\r
-    \r
+\r
     ## Get a list of modules that depends on package information from a DP.\r
     #\r
-    # @param DpGuid: A Distrabution Guid \r
-    # @param DpVersion: A Distrabution version \r
+    # @param DpGuid: A Distrabution Guid\r
+    # @param DpVersion: A Distrabution version\r
     #\r
     def GetDpDependentModuleList(self, DpGuid, DpVersion):\r
-        \r
+\r
         ModList = []\r
         PkgList = self.GetPackageListFromDp(DpGuid, DpVersion)\r
         if len(PkgList) > 0:\r
             return ModList\r
-        \r
+\r
         for Pkg in PkgList:\r
             #\r
-            # get all in-package modules that depends on current \r
-            # Pkg (Guid match, Version match or NA) but not belong to \r
+            # get all in-package modules that depends on current\r
+            # Pkg (Guid match, Version match or NA) but not belong to\r
             # current Pkg\r
             #\r
-            SqlCommand = """select t1.ModuleGuid, t1.ModuleVersion, \r
-            t1.InstallPath from %s as t1, %s as t2 where \r
-            t1.ModuleGuid = t2.ModuleGuid and \r
-            t1.ModuleVersion = t2.ModuleVersion and t2.DepexGuid ='%s' \r
+            SqlCommand = """select t1.ModuleGuid, t1.ModuleVersion,\r
+            t1.InstallPath from %s as t1, %s as t2 where\r
+            t1.ModuleGuid = t2.ModuleGuid and\r
+            t1.ModuleVersion = t2.ModuleVersion and t2.DepexGuid ='%s'\r
             and (t2.DepexVersion = '%s' or t2.DepexVersion = 'N/A') and\r
             t1.PackageGuid != '%s' and t1.PackageVersion != '%s'\r
                         """ % (self.ModInPkgTable, \\r
@@ -807,13 +807,13 @@ class IpiDatabase(object):
                 ModList.append((ModGuid, ModVersion, InstallPath))\r
 \r
             #\r
-            # get all modules from standalone modules that depends on current \r
+            # get all modules from standalone modules that depends on current\r
             #Pkg (Guid match, Version match or NA) but not in current dp\r
             #\r
             SqlCommand = \\r
-            """select t1.ModuleGuid, t1.ModuleVersion, t1.InstallPath \r
-            from %s as t1, %s as t2 where t1.ModuleGuid = t2.ModuleGuid and \r
-            t1.ModuleVersion = t2.ModuleVersion and t2.DepexGuid ='%s' \r
+            """select t1.ModuleGuid, t1.ModuleVersion, t1.InstallPath\r
+            from %s as t1, %s as t2 where t1.ModuleGuid = t2.ModuleGuid and\r
+            t1.ModuleVersion = t2.ModuleVersion and t2.DepexGuid ='%s'\r
             and (t2.DepexVersion = '%s' or t2.DepexVersion = 'N/A') and\r
                             t1.DpGuid != '%s' and t1.DpVersion != '%s'\r
                         """ % \\r
@@ -825,75 +825,75 @@ class IpiDatabase(object):
                 ModVersion = ModInfo[1]\r
                 InstallPath = ModInfo[2]\r
                 ModList.append((ModGuid, ModVersion, InstallPath))\r
-        \r
-        \r
+\r
+\r
         return ModList\r
 \r
     ## Get Dp's list of modules.\r
     #\r
-    # @param DpGuid: A Distrabution Guid \r
-    # @param DpVersion: A Distrabution version \r
+    # @param DpGuid: A Distrabution Guid\r
+    # @param DpVersion: A Distrabution version\r
     #\r
-    def GetDpModuleList(self, DpGuid, DpVersion):      \r
+    def GetDpModuleList(self, DpGuid, DpVersion):\r
         ModList = []\r
         #\r
         # get Dp module list from the DpFileList table\r
         #\r
-        SqlCommand = """select FilePath \r
+        SqlCommand = """select FilePath\r
                         from %s\r
-                        where DpGuid = '%s' and DpVersion = '%s' and \r
+                        where DpGuid = '%s' and DpVersion = '%s' and\r
                         FilePath like '%%.inf'\r
                     """ % (self.DpFileListTable, DpGuid, DpVersion)\r
         self.Cur.execute(SqlCommand)\r
         for ModuleInfo in self.Cur:\r
             FilePath = ModuleInfo[0]\r
             ModList.append(os.path.join(self.Workspace, FilePath))\r
-            \r
-        return ModList        \r
 \r
-        \r
+        return ModList\r
+\r
+\r
     ## Get a module depex\r
     #\r
-    # @param DpGuid: A module Guid \r
-    # @param DpVersion: A module version \r
+    # @param DpGuid: A module Guid\r
+    # @param DpVersion: A module version\r
     # @param Path:\r
     #\r
     def GetModuleDepex(self, Guid, Version, Path):\r
-                \r
+\r
         #\r
         # Get module depex information to DB.\r
         #\r
-        SqlCommand = """select * from %s where ModuleGuid ='%s' and \r
+        SqlCommand = """select * from %s where ModuleGuid ='%s' and\r
         ModuleVersion = '%s' and InstallPath ='%s'\r
                             """ % (self.ModDepexTable, Guid, Version, Path)\r
         self.Cur.execute(SqlCommand)\r
 \r
-        \r
+\r
         DepexList = []\r
         for DepInfo in self.Cur:\r
             DepexGuid = DepInfo[3]\r
             DepexVersion = DepInfo[4]\r
             DepexList.append((DepexGuid, DepexVersion))\r
-        \r
+\r
         return DepexList\r
\r
+\r
     ## Inventory the distribution installed to current workspace\r
     #\r
     # Inventory the distribution installed to current workspace\r
-    #   \r
+    #\r
     def InventoryDistInstalled(self):\r
         SqlCommand = """select * from %s """ % (self.DpTable)\r
         self.Cur.execute(SqlCommand)\r
-        \r
+\r
         DpInfoList = []\r
         for Result in self.Cur:\r
             DpGuid = Result[0]\r
             DpVersion = Result[1]\r
             DpAliasName = Result[3]\r
-            DpFileName = Result[4]            \r
+            DpFileName = Result[4]\r
             DpInfoList.append((DpGuid, DpVersion, DpFileName, DpAliasName))\r
-        \r
-        return DpInfoList     \r
+\r
+        return DpInfoList\r
 \r
     ## Close entire database\r
     #\r
@@ -904,18 +904,18 @@ class IpiDatabase(object):
         # drop the dummy table\r
         #\r
         SqlCommand = """\r
-        drop table IF EXISTS %s \r
+        drop table IF EXISTS %s\r
         """ % self.DummyTable\r
         self.Cur.execute(SqlCommand)\r
         self.Conn.commit()\r
-        \r
+\r
         self.Cur.close()\r
         self.Conn.close()\r
 \r
     ## Convert To Sql String\r
     #\r
     # 1. Replace "'" with "''" in each item of StringList\r
-    # \r
+    #\r
     # @param StringList:  A list for strings to be converted\r
     #\r
     def __ConvertToSqlString(self, StringList):\r
@@ -925,4 +925,4 @@ class IpiDatabase(object):
 \r
 \r
 \r
-    
\ No newline at end of file
+\r
index 298d8aa9db3b543feddf6f3d74345bae24990990..5eeed2aea7d000ca73f7a140037cfe6239d8e155 100644 (file)
@@ -2,11 +2,11 @@
 #\r
 # PackageFile class represents the zip file of a distribution package.\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -52,25 +52,25 @@ class PackageFile:
             for Filename in self._ZipFile.namelist():\r
                 self._Files[os.path.normpath(Filename)] = Filename\r
         except BaseException as Xstr:\r
-            Logger.Error("PackagingTool", FILE_OPEN_FAILURE, \r
+            Logger.Error("PackagingTool", FILE_OPEN_FAILURE,\r
                             ExtraData="%s (%s)" % (FileName, str(Xstr)))\r
 \r
         BadFile = self._ZipFile.testzip()\r
         if BadFile is not None:\r
-            Logger.Error("PackagingTool", FILE_CHECKSUM_FAILURE, \r
+            Logger.Error("PackagingTool", FILE_CHECKSUM_FAILURE,\r
                             ExtraData="[%s] in %s" % (BadFile, FileName))\r
-    \r
+\r
     def GetZipFile(self):\r
         return self._ZipFile\r
-    \r
-    ## Get file name \r
+\r
+    ## Get file name\r
     #\r
     def __str__(self):\r
         return self._FileName\r
-    \r
+\r
     ## Extract the file\r
-    # \r
-    # @param To:  the destination file \r
+    #\r
+    # @param To:  the destination file\r
     #\r
     def Unpack(self, ToDest):\r
         for FileN in self._ZipFile.namelist():\r
@@ -78,11 +78,11 @@ class PackageFile:
             Msg = "%s -> %s" % (FileN, ToFile)\r
             Logger.Info(Msg)\r
             self.Extract(FileN, ToFile)\r
-    \r
+\r
     ## Extract the file\r
-    # \r
-    # @param File:  the extracted file \r
-    # @param ToFile:  the destination file \r
+    #\r
+    # @param File:  the extracted file\r
+    # @param ToFile:  the destination file\r
     #\r
     def UnpackFile(self, File, ToFile):\r
         File = File.replace('\\', '/')\r
@@ -91,13 +91,13 @@ class PackageFile:
             Logger.Info(Msg)\r
             self.Extract(File, ToFile)\r
             return ToFile\r
-        \r
+\r
         return ''\r
-    \r
+\r
     ## Extract the file\r
-    # \r
-    # @param Which:  the source path \r
-    # @param ToDest:  the destination path \r
+    #\r
+    # @param Which:  the source path\r
+    # @param ToDest:  the destination path\r
     #\r
     def Extract(self, Which, ToDest):\r
         Which = os.path.normpath(Which)\r
@@ -107,7 +107,7 @@ class PackageFile:
         try:\r
             FileContent = self._ZipFile.read(self._Files[Which])\r
         except BaseException as Xstr:\r
-            Logger.Error("PackagingTool", FILE_DECOMPRESS_FAILURE, \r
+            Logger.Error("PackagingTool", FILE_DECOMPRESS_FAILURE,\r
                             ExtraData="[%s] in %s (%s)" % (Which, \\r
                                                            self._FileName, \\r
                                                            str(Xstr)))\r
@@ -120,19 +120,19 @@ class PackageFile:
             else:\r
                 ToFile = __FileHookOpen__(ToDest, 'wb')\r
         except BaseException as Xstr:\r
-            Logger.Error("PackagingTool", FILE_OPEN_FAILURE, \r
+            Logger.Error("PackagingTool", FILE_OPEN_FAILURE,\r
                             ExtraData="%s (%s)" % (ToDest, str(Xstr)))\r
 \r
         try:\r
             ToFile.write(FileContent)\r
             ToFile.close()\r
         except BaseException as Xstr:\r
-            Logger.Error("PackagingTool", FILE_WRITE_FAILURE, \r
+            Logger.Error("PackagingTool", FILE_WRITE_FAILURE,\r
                             ExtraData="%s (%s)" % (ToDest, str(Xstr)))\r
 \r
     ## Remove the file\r
-    # \r
-    # @param Files:  the removed files \r
+    #\r
+    # @param Files:  the removed files\r
     #\r
     def Remove(self, Files):\r
         TmpDir = os.path.join(tempfile.gettempdir(), ".packaging")\r
@@ -144,7 +144,7 @@ class PackageFile:
         for SinF in Files:\r
             SinF = os.path.normpath(SinF)\r
             if SinF not in self._Files:\r
-                Logger.Error("PackagingTool", FILE_NOT_FOUND, \r
+                Logger.Error("PackagingTool", FILE_NOT_FOUND,\r
                                 ExtraData="%s is not in %s!" % \\r
                                 (SinF, self._FileName))\r
             self._Files.pop(SinF)\r
@@ -159,12 +159,12 @@ class PackageFile:
         RemoveDirectory(TmpDir, True)\r
 \r
     ## Pack the files under Top directory, the directory shown in the zipFile start from BaseDir,\r
-    # BaseDir should be the parent directory of the Top directory, for example, \r
-    # Pack(Workspace\Dir1, Workspace) will pack files under Dir1, and the path in the zipfile will \r
+    # BaseDir should be the parent directory of the Top directory, for example,\r
+    # Pack(Workspace\Dir1, Workspace) will pack files under Dir1, and the path in the zipfile will\r
     # start from Workspace\r
-    # \r
-    # @param Top:  the top directory \r
-    # @param BaseDir:  the base directory \r
+    #\r
+    # @param Top:  the top directory\r
+    # @param BaseDir:  the base directory\r
     #\r
     def Pack(self, Top, BaseDir):\r
         if not os.path.isdir(Top):\r
@@ -175,14 +175,14 @@ class PackageFile:
         Cwd = os.getcwd()\r
         os.chdir(BaseDir)\r
         RelaDir = Top[Top.upper().find(BaseDir.upper()).\\r
-                      join(len(BaseDir).join(1)):] \r
+                      join(len(BaseDir).join(1)):]\r
 \r
         for Root, Dirs, Files in os.walk(RelaDir):\r
             if 'CVS' in Dirs:\r
                 Dirs.remove('CVS')\r
             if '.svn' in Dirs:\r
                 Dirs.remove('.svn')\r
-            \r
+\r
             for Dir in Dirs:\r
                 if Dir.startswith('.'):\r
                     Dirs.remove(Dir)\r
@@ -200,8 +200,8 @@ class PackageFile:
         os.chdir(Cwd)\r
 \r
     ## Pack the file\r
-    # \r
-    # @param Files:  the files to pack \r
+    #\r
+    # @param Files:  the files to pack\r
     #\r
     def PackFiles(self, Files):\r
         for File in Files:\r
@@ -211,9 +211,9 @@ class PackageFile:
             os.chdir(Cwd)\r
 \r
     ## Pack the file\r
-    # \r
-    # @param File:  the files to pack \r
-    # @param ArcName:  the Arc Name \r
+    #\r
+    # @param File:  the files to pack\r
+    # @param ArcName:  the Arc Name\r
     #\r
     def PackFile(self, File, ArcName=None):\r
         try:\r
@@ -221,7 +221,7 @@ class PackageFile:
             # avoid packing same file multiple times\r
             #\r
             if platform.system() != 'Windows':\r
-                File = File.replace('\\', '/')            \r
+                File = File.replace('\\', '/')\r
             ZipedFilesNameList = self._ZipFile.namelist()\r
             for ZipedFile in ZipedFilesNameList:\r
                 if File == os.path.normpath(ZipedFile):\r
@@ -233,9 +233,9 @@ class PackageFile:
                             ExtraData="%s (%s)" % (File, str(Xstr)))\r
 \r
     ## Write data to the packed file\r
-    # \r
-    # @param Data:  data to write \r
-    # @param ArcName:  the Arc Name \r
+    #\r
+    # @param Data:  data to write\r
+    # @param ArcName:  the Arc Name\r
     #\r
     def PackData(self, Data, ArcName):\r
         try:\r
@@ -247,7 +247,7 @@ class PackageFile:
                             ExtraData="%s (%s)" % (ArcName, str(Xstr)))\r
 \r
     ## Close file\r
-    # \r
+    #\r
     #\r
     def Close(self):\r
         self._ZipFile.close()\r
index efe9cd09b7fb704fc050747b4ac21cd30818b79c..86c8d267e497103cc9987a08124e4ecee50d3028 100644 (file)
@@ -4,11 +4,11 @@
 # This file is required to make Python interpreter treat the directory\r
 # as containing package.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,4 +17,4 @@
 \r
 '''\r
 Core init file\r
-'''
\ No newline at end of file
+'''\r
index a1a9d38087ee854fb465bf724eb79ce56fbf9525..0ba07ccebc73398e9eb62681be030f48262f16ed 100644 (file)
@@ -4,9 +4,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -70,7 +70,7 @@ from Library.StringUtils import GetUniFileName
 def GenPcd(Package, Content):\r
     #\r
     # generate [Pcd] section\r
-    # <TokenSpcCName>.<TokenCName>|<Value>|<DatumType>|<Token>    \r
+    # <TokenSpcCName>.<TokenCName>|<Value>|<DatumType>|<Token>\r
     #\r
     ValidUsageDict = {}\r
     for Pcd in Package.GetPcdList():\r
@@ -80,16 +80,16 @@ def GenPcd(Package, Content):
         HelpTextList = Pcd.GetHelpTextList()\r
         HelpStr = _GetHelpStr(HelpTextList)\r
         CommentStr = GenGenericCommentF(HelpStr, 2)\r
-        \r
+\r
         PromptList = Pcd.GetPromptList()\r
         PromptStr = _GetHelpStr(PromptList)\r
         CommentStr += GenGenericCommentF(PromptStr.strip(), 1, True)\r
-        \r
+\r
         PcdErrList = Pcd.GetPcdErrorsList()\r
         for PcdErr in PcdErrList:\r
             CommentStr += GenPcdErrComment(PcdErr)\r
         Statement = CommentStr\r
\r
+\r
         CName = Pcd.GetCName()\r
         TokenSpaceGuidCName = Pcd.GetTokenSpaceGuidCName()\r
         DefaultValue = Pcd.GetDefaultValue()\r
@@ -107,7 +107,7 @@ def GenPcd(Package, Content):
             ValidUsage = 'PcdsDynamic'\r
         elif ValidUsage == 'PcdEx':\r
             ValidUsage = 'PcdsDynamicEx'\r
-                                \r
+\r
         if ValidUsage in ValidUsageDict:\r
             NewSectionDict = ValidUsageDict[ValidUsage]\r
         else:\r
@@ -129,17 +129,17 @@ def GenPcd(Package, Content):
             NewSectionDict[SortedArch] = \\r
             NewSectionDict[SortedArch] + [Statement]\r
         else:\r
-            NewSectionDict[SortedArch] = [Statement]            \r
-        \r
+            NewSectionDict[SortedArch] = [Statement]\r
+\r
     for ValidUsage in ValidUsageDict:\r
         Content += GenSection(ValidUsage, ValidUsageDict[ValidUsage], True, True)\r
-    \r
+\r
     return Content\r
 \r
 def GenPcdErrorMsgSection(Package, Content):\r
     if not Package.PcdErrorCommentDict:\r
         return Content\r
-    \r
+\r
     #\r
     # Generate '# [Error.<TokenSpcCName>]' section\r
     #\r
@@ -148,14 +148,14 @@ def GenPcdErrorMsgSection(Package, Content):
     SectionComment += TAB_COMMENT_SPLIT + TAB_SPACE_SPLIT + TAB_PCD_ERROR_SECTION_COMMENT + END_OF_LINE\r
     SectionComment += TAB_COMMENT_SPLIT + END_OF_LINE\r
     TokenSpcCNameList = []\r
-    \r
+\r
     #\r
     # Get TokenSpcCName list in PcdErrorCommentDict in Package object\r
     #\r
     for (TokenSpcCName, ErrorNumber) in Package.PcdErrorCommentDict:\r
         if TokenSpcCName not in TokenSpcCNameList:\r
             TokenSpcCNameList.append(TokenSpcCName)\r
-    \r
+\r
     for TokenSpcCNameItem in TokenSpcCNameList:\r
         SectionName = TAB_COMMENT_SPLIT + TAB_SPACE_SPLIT + TAB_SECTION_START + TAB_PCD_ERROR + \\r
                       TAB_SPLIT + TokenSpcCNameItem + TAB_SECTION_END + END_OF_LINE\r
@@ -168,10 +168,10 @@ def GenPcdErrorMsgSection(Package, Content):
                               ErrorNumber + TAB_SPACE_SPLIT + TAB_VALUE_SPLIT + TAB_SPACE_SPLIT + \\r
                               PcdErrorMsg + END_OF_LINE\r
                 Content += SectionItem\r
-                \r
+\r
     Content += TAB_COMMENT_SPLIT\r
     return Content\r
-            \r
+\r
 def GenGuidProtocolPpi(Package, Content):\r
     #\r
     # generate [Guids] section\r
@@ -203,17 +203,17 @@ def GenGuidProtocolPpi(Package, Content):
         # generate tail comment\r
         #\r
         if Guid.GetSupModuleList():\r
-            Statement += GenDecTailComment(Guid.GetSupModuleList())     \r
+            Statement += GenDecTailComment(Guid.GetSupModuleList())\r
         ArchList = sorted(Guid.GetSupArchList())\r
         SortedArch = ' '.join(ArchList)\r
         if SortedArch in NewSectionDict:\r
             NewSectionDict[SortedArch] = \\r
             NewSectionDict[SortedArch] + [Statement]\r
         else:\r
-            NewSectionDict[SortedArch] = [Statement]            \r
+            NewSectionDict[SortedArch] = [Statement]\r
 \r
     Content += GenSection('Guids', NewSectionDict, True, True)\r
\r
+\r
     #\r
     # generate [Protocols] section\r
     #\r
@@ -232,9 +232,9 @@ def GenGuidProtocolPpi(Package, Content):
         #\r
         HelpTextList = Protocol.GetHelpTextList()\r
         HelpStr = _GetHelpStr(HelpTextList)\r
-        CommentStr = GenGenericCommentF(HelpStr, 2)        \r
+        CommentStr = GenGenericCommentF(HelpStr, 2)\r
 \r
-        Statement = CommentStr        \r
+        Statement = CommentStr\r
         CName = Protocol.GetCName()\r
         Value = GuidStringToGuidStructureString(Protocol.GetGuid())\r
         Statement += CName.ljust(LeftOffset) + ' = ' + Value\r
@@ -250,9 +250,9 @@ def GenGuidProtocolPpi(Package, Content):
             NewSectionDict[SortedArch] = \\r
             NewSectionDict[SortedArch] + [Statement]\r
         else:\r
-            NewSectionDict[SortedArch] = [Statement]            \r
+            NewSectionDict[SortedArch] = [Statement]\r
 \r
-    Content += GenSection('Protocols', NewSectionDict, True, True) \r
+    Content += GenSection('Protocols', NewSectionDict, True, True)\r
 \r
     #\r
     # generate [Ppis] section\r
@@ -290,28 +290,28 @@ def GenGuidProtocolPpi(Package, Content):
             NewSectionDict[SortedArch] = \\r
             NewSectionDict[SortedArch] + [Statement]\r
         else:\r
-            NewSectionDict[SortedArch] = [Statement]            \r
+            NewSectionDict[SortedArch] = [Statement]\r
 \r
     Content += GenSection('Ppis', NewSectionDict, True, True)\r
-    \r
+\r
     return Content\r
 \r
 ## Transfer Package Object to Dec files\r
 #\r
-# Transfer all contents of a standard Package Object to a Dec file \r
+# Transfer all contents of a standard Package Object to a Dec file\r
 #\r
-# @param Package:  A Package \r
+# @param Package:  A Package\r
 #\r
 def PackageToDec(Package, DistHeader = None):\r
     #\r
     # Init global information for the file\r
     #\r
     ContainerFile = Package.GetFullPath()\r
-    \r
+\r
     Content = ''\r
-    \r
+\r
     #\r
-    # Generate file header \r
+    # Generate file header\r
     #\r
     PackageAbstract = GetLocalValue(Package.GetAbstract())\r
     PackageDescription = GetLocalValue(Package.GetDescription())\r
@@ -335,7 +335,7 @@ def PackageToDec(Package, DistHeader = None):
     if not PackageLicense and DistHeader:\r
         for (Lang, License) in DistHeader.GetLicense():\r
             PackageLicense = License\r
-         \r
+\r
     #\r
     # Generate header comment section of DEC file\r
     #\r
@@ -345,7 +345,7 @@ def PackageToDec(Package, DistHeader = None):
                                        PackageLicense).replace('\r\n', '\n')\r
 \r
     #\r
-    # Generate Binary header \r
+    # Generate Binary header\r
     #\r
     for UserExtension in Package.GetUserExtensionList():\r
         if UserExtension.GetUserID() == TAB_BINARY_HEADER_USERID \\r
@@ -357,12 +357,12 @@ def PackageToDec(Package, DistHeader = None):
             for (Lang, Copyright) in UserExtension.GetBinaryCopyright():\r
                 PackageBinaryCopyright = Copyright\r
             for (Lang, License) in UserExtension.GetBinaryLicense():\r
-                PackageBinaryLicense = License \r
+                PackageBinaryLicense = License\r
             if PackageBinaryAbstract and PackageBinaryDescription and \\r
             PackageBinaryCopyright and PackageBinaryLicense:\r
-                Content += GenHeaderCommentSection(PackageBinaryAbstract, \r
-                                           PackageBinaryDescription, \r
-                                           PackageBinaryCopyright, \r
+                Content += GenHeaderCommentSection(PackageBinaryAbstract,\r
+                                           PackageBinaryDescription,\r
+                                           PackageBinaryCopyright,\r
                                            PackageBinaryLicense,\r
                                            True)\r
 \r
@@ -374,23 +374,23 @@ def PackageToDec(Package, DistHeader = None):
     GenPackageUNIEncodeFile(Package, FileHeader)\r
 \r
     #\r
-    # for each section, maintain a dict, sorted arch will be its key, \r
+    # for each section, maintain a dict, sorted arch will be its key,\r
     #statement list will be its data\r
     # { 'Arch1 Arch2 Arch3': [statement1, statement2],\r
-    #   'Arch1' : [statement1, statement3] \r
+    #   'Arch1' : [statement1, statement3]\r
     #  }\r
     #\r
-    \r
+\r
     #\r
-    # generate [Defines] section                     \r
+    # generate [Defines] section\r
     #\r
     LeftOffset = 31\r
     NewSectionDict = {TAB_ARCH_COMMON : []}\r
     SpecialItemList = []\r
-    \r
+\r
     Statement = (u'%s ' % TAB_DEC_DEFINES_DEC_SPECIFICATION).ljust(LeftOffset) + u'= %s' % '0x00010017'\r
     SpecialItemList.append(Statement)\r
-    \r
+\r
     BaseName = Package.GetBaseName()\r
     if BaseName.startswith('.') or BaseName.startswith('-'):\r
         BaseName = '_' + BaseName\r
@@ -405,7 +405,7 @@ def PackageToDec(Package, DistHeader = None):
 \r
     if Package.UNIFlag:\r
         Statement = (u'%s ' % TAB_DEC_DEFINES_PKG_UNI_FILE).ljust(LeftOffset) + u'= %s' % Package.GetBaseName() + '.uni'\r
-        SpecialItemList.append(Statement)               \r
+        SpecialItemList.append(Statement)\r
 \r
     for SortedArch in NewSectionDict:\r
         NewSectionDict[SortedArch] = \\r
@@ -417,7 +417,7 @@ def PackageToDec(Package, DistHeader = None):
     #\r
     NewSectionDict = {}\r
     IncludeArchList = Package.GetIncludeArchList()\r
-    if IncludeArchList:            \r
+    if IncludeArchList:\r
         for Path, ArchList in IncludeArchList:\r
             Statement = Path\r
             ArchList.sort()\r
@@ -465,7 +465,7 @@ def PackageToDec(Package, DistHeader = None):
             NewSectionDict[SortedArch] = \\r
             NewSectionDict[SortedArch] + [Statement]\r
         else:\r
-            NewSectionDict[SortedArch] = [Statement]            \r
+            NewSectionDict[SortedArch] = [Statement]\r
 \r
     Content += GenSection('LibraryClasses', NewSectionDict, True, True)\r
 \r
@@ -473,7 +473,7 @@ def PackageToDec(Package, DistHeader = None):
     # Generate '# [Error.<TokenSpcCName>]' section\r
     #\r
     Content = GenPcdErrorMsgSection(Package, Content)\r
-    \r
+\r
     Content = GenPcd(Package, Content)\r
 \r
     #\r
@@ -498,7 +498,7 @@ def PackageToDec(Package, DistHeader = None):
             NewStatement = ""\r
             for Line in LineList:\r
                 NewStatement += "  %s\n" % Line\r
-        \r
+\r
         SectionList = []\r
         SectionName = 'UserExtensions'\r
         UserId = UserExtension.GetUserID()\r
@@ -533,7 +533,7 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO
     BinaryAbstract = []\r
     BinaryDescription = []\r
     #\r
-    # If more than one language code is used for any element that would be present in the PACKAGE_UNI_FILE, \r
+    # If more than one language code is used for any element that would be present in the PACKAGE_UNI_FILE,\r
     # then the PACKAGE_UNI_FILE must be created.\r
     #\r
     for (Key, Value) in PackageObject.GetAbstract() + PackageObject.GetDescription():\r
@@ -541,7 +541,7 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO
             GenUNIFlag = True\r
         else:\r
             OnlyLANGUAGE_EN_X = False\r
-            \r
+\r
     for UserExtension in PackageObject.GetUserExtensionList():\r
         if UserExtension.GetUserID() == TAB_BINARY_HEADER_USERID \\r
         and UserExtension.GetIdentifier() == TAB_BINARY_HEADER_IDENTIFIER:\r
@@ -565,7 +565,7 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO
                 GenUNIFlag = True\r
             else:\r
                 OnlyLANGUAGE_EN_X = False\r
-                \r
+\r
         for PcdError in Pcd.GetPcdErrorsList():\r
             if PcdError.GetErrorNumber().startswith('0x') or PcdError.GetErrorNumber().startswith('0X'):\r
                 for (Key, Value) in PcdError.GetErrorMessageList():\r
@@ -579,26 +579,26 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO
         return\r
     else:\r
         PackageObject.UNIFlag = True\r
-        \r
+\r
     if not os.path.exists(os.path.dirname(PackageObject.GetFullPath())):\r
         os.makedirs(os.path.dirname(PackageObject.GetFullPath()))\r
-    \r
+\r
     ContainerFile = GetUniFileName(os.path.dirname(PackageObject.GetFullPath()), PackageObject.GetBaseName())\r
 \r
     Content = UniFileHeader + '\r\n'\r
     Content += '\r\n'\r
-    \r
+\r
     Content += FormatUniEntry('#string ' + TAB_DEC_PACKAGE_ABSTRACT, PackageObject.GetAbstract(), ContainerFile) + '\r\n'\r
-        \r
+\r
     Content += FormatUniEntry('#string ' + TAB_DEC_PACKAGE_DESCRIPTION, PackageObject.GetDescription(), ContainerFile) \\r
     + '\r\n'\r
-    \r
+\r
     Content += FormatUniEntry('#string ' + TAB_DEC_BINARY_ABSTRACT, BinaryAbstract, ContainerFile) + '\r\n'\r
-    \r
+\r
     Content += FormatUniEntry('#string ' + TAB_DEC_BINARY_DESCRIPTION, BinaryDescription, ContainerFile) + '\r\n'\r
-    \r
+\r
     PromptGenList = []\r
-    HelpTextGenList = []    \r
+    HelpTextGenList = []\r
     for Pcd in PackageObject.GetPcdList():\r
         # Generate Prompt for each Pcd\r
         PcdPromptStrName = '#string ' + 'STR_' + Pcd.GetTokenSpaceGuidCName() + '_' + Pcd.GetCName() + '_PROMPT '\r
@@ -607,7 +607,7 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO
             Lang = TxtObj.GetLang()\r
             PromptStr = TxtObj.GetString()\r
             #\r
-            # Avoid generating the same PROMPT entry more than one time. \r
+            # Avoid generating the same PROMPT entry more than one time.\r
             #\r
             if (PcdPromptStrName, Lang) not in PromptGenList:\r
                 TokenValueList.append((Lang, PromptStr))\r
@@ -615,7 +615,7 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO
         PromptString = FormatUniEntry(PcdPromptStrName, TokenValueList, ContainerFile) + '\r\n'\r
         if PromptString not in Content:\r
             Content += PromptString\r
-            \r
+\r
         # Generate Help String for each Pcd\r
         PcdHelpStrName = '#string ' + 'STR_' + Pcd.GetTokenSpaceGuidCName() + '_' + Pcd.GetCName() + '_HELP '\r
         TokenValueList = []\r
@@ -623,7 +623,7 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO
             Lang = TxtObj.GetLang()\r
             HelpStr = TxtObj.GetString()\r
             #\r
-            # Avoid generating the same HELP entry more than one time. \r
+            # Avoid generating the same HELP entry more than one time.\r
             #\r
             if (PcdHelpStrName, Lang) not in HelpTextGenList:\r
                 TokenValueList.append((Lang, HelpStr))\r
@@ -631,7 +631,7 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO
         HelpTextString = FormatUniEntry(PcdHelpStrName, TokenValueList, ContainerFile) + '\r\n'\r
         if HelpTextString not in Content:\r
             Content += HelpTextString\r
-            \r
+\r
         # Generate PcdError for each Pcd if ErrorNo exist.\r
         for PcdError in Pcd.GetPcdErrorsList():\r
             ErrorNo = PcdError.GetErrorNumber()\r
@@ -642,7 +642,7 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO
                 PcdErrString = FormatUniEntry(PcdErrStrName, PcdError.GetErrorMessageList(), ContainerFile) + '\r\n'\r
                 if PcdErrString not in Content:\r
                     Content += PcdErrString\r
-                    \r
+\r
     File = codecs.open(ContainerFile, 'w', Encoding)\r
     File.write(u'\uFEFF' + Content)\r
     File.stream.close()\r
@@ -652,23 +652,23 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO
         PackageObject.FileList.append((ContainerFile, Md5Sum))\r
 \r
     return ContainerFile\r
-    \r
+\r
 ## GenPcdErrComment\r
 #\r
 #  @param PcdErrObject:  PcdErrorObject\r
-#  \r
+#\r
 #  @retval CommentStr:   Generated comment lines, with prefix "#"\r
-# \r
+#\r
 def GenPcdErrComment (PcdErrObject):\r
-    CommentStr = '' \r
+    CommentStr = ''\r
     ErrorCode = PcdErrObject.GetErrorNumber()\r
     ValidValueRange = PcdErrObject.GetValidValueRange()\r
     if ValidValueRange:\r
-        CommentStr = TAB_COMMENT_SPLIT + TAB_SPACE_SPLIT + TAB_PCD_VALIDRANGE + TAB_SPACE_SPLIT \r
+        CommentStr = TAB_COMMENT_SPLIT + TAB_SPACE_SPLIT + TAB_PCD_VALIDRANGE + TAB_SPACE_SPLIT\r
         if ErrorCode:\r
             CommentStr += ErrorCode + TAB_SPACE_SPLIT + TAB_VALUE_SPLIT + TAB_SPACE_SPLIT\r
         CommentStr += ValidValueRange + END_OF_LINE\r
-    \r
+\r
     ValidValue = PcdErrObject.GetValidValue()\r
     if ValidValue:\r
         ValidValueList = \\r
@@ -677,13 +677,13 @@ def GenPcdErrComment (PcdErrObject):
         if ErrorCode:\r
             CommentStr += ErrorCode + TAB_SPACE_SPLIT + TAB_VALUE_SPLIT + TAB_SPACE_SPLIT\r
         CommentStr += TAB_COMMA_SPLIT.join(ValidValueList) + END_OF_LINE\r
-        \r
+\r
     Expression = PcdErrObject.GetExpression()\r
     if Expression:\r
         CommentStr = TAB_COMMENT_SPLIT + TAB_SPACE_SPLIT + TAB_PCD_EXPRESSION + TAB_SPACE_SPLIT\r
         if ErrorCode:\r
             CommentStr += ErrorCode + TAB_SPACE_SPLIT + TAB_VALUE_SPLIT + TAB_SPACE_SPLIT\r
         CommentStr += Expression + END_OF_LINE\r
-        \r
+\r
     return CommentStr\r
 \r
index 9457f851f4ec21aac68905e1a1f0f6eeb12e0712..b62c70513774395ba72d71a5cdd78bfb19fc549c 100644 (file)
@@ -4,9 +4,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -46,8 +46,8 @@ from Library.StringUtils import GetUniFileName
 \r
 ## Transfer Module Object to Inf files\r
 #\r
-# Transfer all contents of a standard Module Object to an Inf file \r
-# @param ModuleObject: A Module Object  \r
+# Transfer all contents of a standard Module Object to an Inf file\r
+# @param ModuleObject: A Module Object\r
 #\r
 def ModuleToInf(ModuleObject, PackageObject=None, DistHeader=None):\r
     if not GlobalData.gWSPKG_LIST:\r
@@ -59,9 +59,9 @@ def ModuleToInf(ModuleObject, PackageObject=None, DistHeader=None):
 \r
     Content = ''\r
     #\r
-    # Generate file header, If any Abstract, Description, Copyright or License XML elements are missing, \r
-    # should 1) use the Abstract, Description, Copyright or License from the PackageSurfaceArea.Header elements \r
-    # that the module belongs to, or 2) if this is a stand-alone module that is not included in a PackageSurfaceArea, \r
+    # Generate file header, If any Abstract, Description, Copyright or License XML elements are missing,\r
+    # should 1) use the Abstract, Description, Copyright or License from the PackageSurfaceArea.Header elements\r
+    # that the module belongs to, or 2) if this is a stand-alone module that is not included in a PackageSurfaceArea,\r
     # use the abstract, description, copyright or license from the DistributionPackage.Header elements.\r
     #\r
     ModuleAbstract = GetLocalValue(ModuleObject.GetAbstract())\r
@@ -107,15 +107,15 @@ def ModuleToInf(ModuleObject, PackageObject=None, DistHeader=None):
 \r
     #\r
     # Generate header comment section of INF file\r
-    #        \r
+    #\r
     Content += GenHeaderCommentSection(ModuleAbstract,\r
                                        ModuleDescription,\r
                                        ModuleCopyright,\r
                                        ModuleLicense).replace('\r\n', '\n')\r
 \r
     #\r
-    # Generate Binary Header \r
-    # \r
+    # Generate Binary Header\r
+    #\r
     for UserExtension in ModuleObject.GetUserExtensionList():\r
         if UserExtension.GetUserID() == DT.TAB_BINARY_HEADER_USERID \\r
         and UserExtension.GetIdentifier() == DT.TAB_BINARY_HEADER_IDENTIFIER:\r
@@ -152,10 +152,10 @@ def ModuleToInf(ModuleObject, PackageObject=None, DistHeader=None):
     else:\r
         GlobalData.gIS_BINARY_INF = False\r
     #\r
-    # for each section, maintain a dict, sorted arch will be its key, \r
+    # for each section, maintain a dict, sorted arch will be its key,\r
     # statement list will be its data\r
     # { 'Arch1 Arch2 Arch3': [statement1, statement2],\r
-    #   'Arch1' : [statement1, statement3] \r
+    #   'Arch1' : [statement1, statement3]\r
     #  }\r
     #\r
     # Gen section contents\r
@@ -197,7 +197,7 @@ def GenModuleUNIEncodeFile(ModuleObject, UniFileHeader='', Encoding=DT.TAB_ENCOD
     BinaryAbstract = []\r
     BinaryDescription = []\r
     #\r
-    # If more than one language code is used for any element that would be present in the MODULE_UNI_FILE, \r
+    # If more than one language code is used for any element that would be present in the MODULE_UNI_FILE,\r
     # then the MODULE_UNI_FILE must be created.\r
     #\r
     for (Key, Value) in ModuleObject.GetAbstract() + ModuleObject.GetDescription():\r
@@ -300,11 +300,11 @@ def GenDefines(ModuleObject):
         BaseName = '_' + BaseName\r
     Statement = (u'%s ' % DT.TAB_INF_DEFINES_BASE_NAME).ljust(LeftOffset) + u'= %s' % BaseName\r
     SpecialStatementList.append(Statement)\r
-    \r
+\r
     # TAB_INF_DEFINES_FILE_GUID\r
     Statement = (u'%s ' % DT.TAB_INF_DEFINES_FILE_GUID).ljust(LeftOffset) + u'= %s' % ModuleObject.GetGuid()\r
     SpecialStatementList.append(Statement)\r
-    \r
+\r
     # TAB_INF_DEFINES_VERSION_STRING\r
     Statement = (u'%s ' % DT.TAB_INF_DEFINES_VERSION_STRING).ljust(LeftOffset) + u'= %s' % ModuleObject.GetVersion()\r
     SpecialStatementList.append(Statement)\r
@@ -480,7 +480,7 @@ def GenPackages(ModuleObject):
         Path = ''\r
         #\r
         # find package path/name\r
-        # \r
+        #\r
         for PkgInfo in GlobalData.gWSPKG_LIST:\r
             if Guid == PkgInfo[1]:\r
                 if (not Version) or (Version == PkgInfo[2]):\r
@@ -553,7 +553,7 @@ def GenDepex(ModuleObject):
             else:\r
                 NewSectionDict[Key] = [Statement]\r
     Content += GenSection('Depex', NewSectionDict, False)\r
-    \r
+\r
     return Content\r
 ## GenUserExtensions\r
 #\r
@@ -673,7 +673,7 @@ def GenBinaryStatement(Key, Value, SubTypeGuidValue=None):
             Statement += '|' + Target\r
     return Statement\r
 ## GenGuidSections\r
-# \r
+#\r
 #  @param GuidObjList: List of GuidObject\r
 #  @retVal Content: The generated section contents\r
 #\r
@@ -736,7 +736,7 @@ def GenGuidSections(GuidObjList):
     return Content\r
 \r
 ## GenProtocolPPiSections\r
-# \r
+#\r
 #  @param ObjList: List of ProtocolObject or Ppi Object\r
 #  @retVal Content: The generated section contents\r
 #\r
@@ -804,7 +804,7 @@ def GenPcdSections(ModuleObject):
     Content = ''\r
     if not GlobalData.gIS_BINARY_INF:\r
         #\r
-        # for each Pcd Itemtype, maintain a dict so the same type will be grouped \r
+        # for each Pcd Itemtype, maintain a dict so the same type will be grouped\r
         # together\r
         #\r
         ItemTypeDict = {}\r
@@ -866,7 +866,7 @@ def GenPcdSections(ModuleObject):
             if NewSectionDict:\r
                 Content += GenSection(ItemType, NewSectionDict)\r
     #\r
-    # For AsBuild INF files   \r
+    # For AsBuild INF files\r
     #\r
     else:\r
         Content += GenAsBuiltPacthPcdSections(ModuleObject)\r
@@ -905,7 +905,7 @@ def GenAsBuiltPacthPcdSections(ModuleObject):
             Statement = HelpString + TokenSpaceName + '.' + PcdCName + ' | ' + PcdValue + ' | ' + \\r
                          PcdOffset + DT.TAB_SPACE_SPLIT\r
             #\r
-            # Use binary file's Arch to be Pcd's Arch \r
+            # Use binary file's Arch to be Pcd's Arch\r
             #\r
             ArchList = []\r
             FileNameObjList = BinaryFile.GetFileNameList()\r
@@ -954,7 +954,7 @@ def GenAsBuiltPcdExSections(ModuleObject):
             Statement = HelpString + TokenSpaceName + DT.TAB_SPLIT + PcdCName + DT.TAB_SPACE_SPLIT\r
 \r
             #\r
-            # Use binary file's Arch to be Pcd's Arch \r
+            # Use binary file's Arch to be Pcd's Arch\r
             #\r
             ArchList = []\r
             FileNameObjList = BinaryFile.GetFileNameList()\r
@@ -1033,7 +1033,7 @@ def GenSpecialSections(ObjectList, SectionName, UserExtensionsContent=''):
         Content = Content.lstrip()\r
     #\r
     # add a return to differentiate it between other possible sections\r
-    # \r
+    #\r
     if Content:\r
         Content += '\n'\r
     return Content\r
@@ -1110,7 +1110,7 @@ def GenBinaries(ModuleObject):
                     else:\r
                         NewSectionDict[SortedArch] = [Statement]\r
                 #\r
-                # as we already generated statement for this DictKey here set the Valuelist to be empty \r
+                # as we already generated statement for this DictKey here set the Valuelist to be empty\r
                 # to avoid generate duplicate entries as the DictKey may have multiple entries\r
                 #\r
                 BinariesDict[Key] = []\r
index ae8dc85e3e64576127d06b040f8b28068e6b9779..da3972ccc33badc5ef2efe4127f12a6f569acccb 100644 (file)
@@ -2,11 +2,11 @@
 #\r
 # This file contained the miscellaneous routines for GenMetaFile usage.\r
 #\r
-# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -26,7 +26,7 @@ from Parser.DecParser import Dec
 #  @param SectionDict: string of source file path/name\r
 #  @param Arch:     string of source file family field\r
 #  @param ExternList:  string of source file FeatureFlag field\r
-#   \r
+#\r
 def AddExternToDefineSec(SectionDict, Arch, ExternList):\r
     LeftOffset = 31\r
     for ArchList, EntryPoint, UnloadImage, Constructor, Destructor, FFE, HelpStringList in ExternList:\r
@@ -93,7 +93,7 @@ def ObtainPcdName(Packages, TokenSpaceGuidValue, Token):
         Path = None\r
         #\r
         # find package path/name\r
-        # \r
+        #\r
         for PkgInfo in GlobalData.gWSPKG_LIST:\r
             if Guid == PkgInfo[1]:\r
                 if (not Version) or (Version == PkgInfo[2]):\r
@@ -156,9 +156,9 @@ def ObtainPcdName(Packages, TokenSpaceGuidValue, Token):
     return TokenSpaceGuidName, PcdCName\r
 \r
 ## _TransferDict\r
-#  transfer dict that using (Statement, SortedArch) as key, \r
+#  transfer dict that using (Statement, SortedArch) as key,\r
 #  (GenericComment, UsageComment) as value into a dict that using SortedArch as\r
-#  key and NewStatement as value \r
+#  key and NewStatement as value\r
 #\r
 def TransferDict(OrigDict, Type=None):\r
     NewDict = {}\r
@@ -171,7 +171,7 @@ def TransferDict(OrigDict, Type=None):
         for Statement, SortedArch in OrigDict:\r
             if len(Statement) > LeftOffset:\r
                 LeftOffset = len(Statement)\r
-        \r
+\r
     for Statement, SortedArch in OrigDict:\r
         Comment = OrigDict[Statement, SortedArch]\r
         #\r
index b1f427723cef20f2928af178aa82bebb56f8e534..3376091367e6c29e7b215e5bd87a3417ffdcea8c 100644 (file)
@@ -2,11 +2,11 @@
 #\r
 # This file contained the logical of generate XML files.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -15,4 +15,4 @@
 \r
 '''\r
 GenXmlFile\r
-'''
\ No newline at end of file
+'''\r
index 269ba0bc488b613396bc52c71acd11e912e0de54..bf0b3bc07c5716542aaa972be93394d7690b7afd 100644 (file)
@@ -4,11 +4,11 @@
 # This file is required to make Python interpreter treat the directory\r
 # as containing package.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,4 +17,4 @@
 \r
 '''\r
 GenMetaFile\r
-'''
\ No newline at end of file
+'''\r
index dc22ff7e348438821677e5e8ea5b34687cfb9b64..3573886d5ab394ecc8fa4dcbaea021de470bbd42 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # Install distribution package.\r
 #\r
-# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -102,7 +102,7 @@ def InstallNewModule(WorkspaceDir, Path, PathList = None):
         Logger.Info(ST.MSG_RELATIVE_PATH_ONLY%FullPath)\r
     else:\r
         return Path\r
-    \r
+\r
     Input = stdin.readline()\r
     Input = Input.replace('\r', '').replace('\n', '')\r
     if Input == '':\r
@@ -110,7 +110,7 @@ def InstallNewModule(WorkspaceDir, Path, PathList = None):
     Input = Input.replace('\r', '').replace('\n', '')\r
     return InstallNewModule(WorkspaceDir, Input, PathList)\r
 \r
-    \r
+\r
 ## InstallNewFile\r
 #\r
 # @param WorkspaceDir:   Workspace Direction\r
@@ -137,15 +137,15 @@ def UnZipDp(WorkspaceDir, DpPkgFileName, Index=1):
     ContentZipFile = None\r
     Logger.Quiet(ST.MSG_UZIP_PARSE_XML)\r
     DistFile = PackageFile(DpPkgFileName)\r
-    \r
+\r
     DpDescFileName, ContentFileName = GetDPFile(DistFile.GetZipFile())\r
-    \r
+\r
     TempDir = os.path.normpath(os.path.join(WorkspaceDir, "Conf/.tmp%s" % str(Index)))\r
     GlobalData.gUNPACK_DIR.append(TempDir)\r
     DistPkgFile = DistFile.UnpackFile(DpDescFileName, os.path.normpath(os.path.join(TempDir, DpDescFileName)))\r
     if not DistPkgFile:\r
         Logger.Error("InstallPkg", FILE_NOT_FOUND, ST.ERR_FILE_BROKEN %DpDescFileName)\r
-    \r
+\r
     #\r
     # Generate distpkg\r
     #\r
@@ -166,10 +166,10 @@ def UnZipDp(WorkspaceDir, DpPkgFileName, Index=1):
 \r
     #\r
     # Get file size\r
-    #                \r
+    #\r
     FileSize = os.path.getsize(ContentFile)\r
-               \r
-    if FileSize != 0:        \r
+\r
+    if FileSize != 0:\r
         ContentZipFile = PackageFile(ContentFile)\r
 \r
     #\r
@@ -201,12 +201,12 @@ def GetPackageList(DistPkg, Dep, WorkspaceDir, Options, ContentZipFile, ModuleLi
             NewPackagePath = InstallNewPackage(WorkspaceDir, GuidedPkgPath, Options.CustomPath)\r
         else:\r
             NewPackagePath = InstallNewPackage(WorkspaceDir, PackagePath, Options.CustomPath)\r
-        InstallPackageContent(PackagePath, NewPackagePath, Package, ContentZipFile, Dep, WorkspaceDir, ModuleList, \r
+        InstallPackageContent(PackagePath, NewPackagePath, Package, ContentZipFile, Dep, WorkspaceDir, ModuleList,\r
                               DistPkg.Header.ReadOnly)\r
         PackageList.append(Package)\r
-        \r
+\r
         NewDict[Guid, Version, Package.GetPackagePath()] = Package\r
-    \r
+\r
     #\r
     # Now generate meta-data files, first generate all dec for package\r
     # dec should be generated before inf, and inf should be generated after\r
@@ -219,7 +219,7 @@ def GetPackageList(DistPkg, Dep, WorkspaceDir, Options, ContentZipFile, ModuleLi
         Md5Sum = Md5Sigature.hexdigest()\r
         if (FilePath, Md5Sum) not in Package.FileList:\r
             Package.FileList.append((FilePath, Md5Sum))\r
-    \r
+\r
     return NewDict\r
 \r
 ## GetModuleList\r
@@ -229,18 +229,18 @@ def GetPackageList(DistPkg, Dep, WorkspaceDir, Options, ContentZipFile, ModuleLi
 def GetModuleList(DistPkg, Dep, WorkspaceDir, ContentZipFile, ModuleList):\r
     #\r
     # ModulePathList will keep track of the standalone module path that\r
-    # we just installed. If a new module's path in that list \r
-    # (only multiple INF in one directory will be so), we will \r
-    # install them directly. If not, we will try to create a new directory \r
+    # we just installed. If a new module's path in that list\r
+    # (only multiple INF in one directory will be so), we will\r
+    # install them directly. If not, we will try to create a new directory\r
     # for it.\r
     #\r
     ModulePathList = []\r
-    \r
+\r
     #\r
     # Check module exist and install\r
     #\r
     Module = None\r
-    NewDict = Sdict()        \r
+    NewDict = Sdict()\r
     for Guid, Version, Name, Path in DistPkg.ModuleSurfaceArea:\r
         ModulePath = Path\r
         Module = DistPkg.ModuleSurfaceArea[Guid, Version, Name, Path]\r
@@ -259,14 +259,14 @@ def GetModuleList(DistPkg, Dep, WorkspaceDir, ContentZipFile, ModuleList):
             ModulePathList.append(NewModuleFullPath)\r
         else:\r
             NewModulePath = ModulePath\r
-        \r
-        InstallModuleContent(ModulePath, NewModulePath, '', Module, ContentZipFile, WorkspaceDir, ModuleList, None, \r
+\r
+        InstallModuleContent(ModulePath, NewModulePath, '', Module, ContentZipFile, WorkspaceDir, ModuleList, None,\r
                              DistPkg.Header.ReadOnly)\r
         #\r
         # Update module\r
         #\r
         Module.SetModulePath(Module.GetModulePath().replace(Path, NewModulePath, 1))\r
-        \r
+\r
         NewDict[Guid, Version, Name, Module.GetModulePath()] = Module\r
 \r
     #\r
@@ -289,7 +289,7 @@ def GetModuleList(DistPkg, Dep, WorkspaceDir, ContentZipFile, ModuleList):
         for (FilePath, Md5Sum) in Module.FileList:\r
             if str(FilePath).endswith('.uni') and Package and (FilePath, Md5Sum) not in Package.FileList:\r
                 Package.FileList.append((FilePath, Md5Sum))\r
-    \r
+\r
     return NewDict\r
 \r
 ##\r
@@ -303,7 +303,7 @@ def GetDepProtocolPpiGuidPcdNames(DePackageObjList):
     DependentPpiCNames = []\r
     DependentGuidCNames = []\r
     DependentPcdNames = []\r
-    \r
+\r
     for PackageObj in DePackageObjList:\r
         #\r
         # Get protocol CName list from all dependent DEC file\r
@@ -312,29 +312,29 @@ def GetDepProtocolPpiGuidPcdNames(DePackageObjList):
         for Protocol in PackageObj.GetProtocolList():\r
             if Protocol.GetCName() not in ProtocolCNames:\r
                 ProtocolCNames.append(Protocol.GetCName())\r
-  \r
+\r
         DependentProtocolCNames.append(ProtocolCNames)\r
-            \r
+\r
         #\r
         # Get Ppi CName list from all dependent DEC file\r
-        #            \r
+        #\r
         PpiCNames = []\r
         for Ppi in PackageObj.GetPpiList():\r
             if Ppi.GetCName() not in PpiCNames:\r
                 PpiCNames.append(Ppi.GetCName())\r
 \r
         DependentPpiCNames.append(PpiCNames)\r
-            \r
+\r
         #\r
         # Get Guid CName list from all dependent DEC file\r
-        #      \r
+        #\r
         GuidCNames = []\r
         for Guid in PackageObj.GetGuidList():\r
             if Guid.GetCName() not in GuidCNames:\r
                 GuidCNames.append(Guid.GetCName())\r
-        \r
+\r
         DependentGuidCNames.append(GuidCNames)\r
-        \r
+\r
         #\r
         # Get PcdName list from all dependent DEC file\r
         #\r
@@ -343,10 +343,10 @@ def GetDepProtocolPpiGuidPcdNames(DePackageObjList):
             PcdName = '.'.join([Pcd.GetTokenSpaceGuidCName(), Pcd.GetCName()])\r
             if PcdName not in PcdNames:\r
                 PcdNames.append(PcdName)\r
-        \r
+\r
         DependentPcdNames.append(PcdNames)\r
-                \r
-            \r
+\r
+\r
     return DependentProtocolCNames, DependentPpiCNames, DependentGuidCNames, DependentPcdNames\r
 \r
 ##\r
@@ -358,8 +358,8 @@ def CheckProtoclCNameRedefined(Module, DependentProtocolCNames):
         for PackageProtocolCNames in DependentProtocolCNames:\r
             if ProtocolInModule.GetCName() in PackageProtocolCNames:\r
                 if IsCNameDefined:\r
-                    Logger.Error("\nUPT", FORMAT_INVALID, \r
-                                 File = Module.GetFullPath(), \r
+                    Logger.Error("\nUPT", FORMAT_INVALID,\r
+                                 File = Module.GetFullPath(),\r
                                  ExtraData = \\r
                                  ST.ERR_INF_PARSER_ITEM_DUPLICATE_IN_DEC % ProtocolInModule.GetCName())\r
                 else:\r
@@ -374,11 +374,11 @@ def CheckPpiCNameRedefined(Module, DependentPpiCNames):
         for PackagePpiCNames in DependentPpiCNames:\r
             if PpiInModule.GetCName() in PackagePpiCNames:\r
                 if IsCNameDefined:\r
-                    Logger.Error("\nUPT", FORMAT_INVALID, \r
-                                 File = Module.GetFullPath(), \r
+                    Logger.Error("\nUPT", FORMAT_INVALID,\r
+                                 File = Module.GetFullPath(),\r
                                  ExtraData = ST.ERR_INF_PARSER_ITEM_DUPLICATE_IN_DEC % PpiInModule.GetCName())\r
                 else:\r
-                    IsCNameDefined = True    \r
+                    IsCNameDefined = True\r
 \r
 ##\r
 # Check if Guid CName is redefined\r
@@ -389,8 +389,8 @@ def CheckGuidCNameRedefined(Module, DependentGuidCNames):
         for PackageGuidCNames in DependentGuidCNames:\r
             if GuidInModule.GetCName() in PackageGuidCNames:\r
                 if IsCNameDefined:\r
-                    Logger.Error("\nUPT", FORMAT_INVALID, \r
-                                 File = Module.GetFullPath(), \r
+                    Logger.Error("\nUPT", FORMAT_INVALID,\r
+                                 File = Module.GetFullPath(),\r
                                  ExtraData = \\r
                                  ST.ERR_INF_PARSER_ITEM_DUPLICATE_IN_DEC % GuidInModule.GetCName())\r
                 else:\r
@@ -414,8 +414,8 @@ def CheckPcdNameRedefined(Module, DependentPcdNames):
         for PcdNames in DependentPcdNames:\r
             if PcdName in PcdNames:\r
                 if IsPcdNameDefined:\r
-                    Logger.Error("\nUPT", FORMAT_INVALID, \r
-                                 File = Module.GetFullPath(), \r
+                    Logger.Error("\nUPT", FORMAT_INVALID,\r
+                                 File = Module.GetFullPath(),\r
                                  ExtraData = ST.ERR_INF_PARSER_ITEM_DUPLICATE_IN_DEC % PcdName)\r
                 else:\r
                     IsPcdNameDefined = True\r
@@ -427,7 +427,7 @@ def CheckCNameInModuleRedefined(Module, DistPkg):
     DePackageObjList = []\r
     #\r
     # Get all dependent package objects\r
-    # \r
+    #\r
     for Obj in Module.GetPackageDependencyList():\r
         Guid = Obj.GetGuid()\r
         Version = Obj.GetVersion()\r
@@ -435,7 +435,7 @@ def CheckCNameInModuleRedefined(Module, DistPkg):
             if Key[0] == Guid and Key[1] == Version:\r
                 if DistPkg.PackageSurfaceArea[Key] not in DePackageObjList:\r
                     DePackageObjList.append(DistPkg.PackageSurfaceArea[Key])\r
-    \r
+\r
     DependentProtocolCNames, DependentPpiCNames, DependentGuidCNames, DependentPcdNames = \\r
     GetDepProtocolPpiGuidPcdNames(DePackageObjList)\r
 \r
@@ -457,7 +457,7 @@ def GenToolMisc(DistPkg, WorkspaceDir, ContentZipFile):
     ToolFileNum = 0\r
     FileNum = 0\r
     RootDir = WorkspaceDir\r
-    \r
+\r
     #\r
     # FileList stores both tools files and misc files\r
     # Misc file list must be appended to FileList *AFTER* Tools file list\r
@@ -506,7 +506,7 @@ def Main(Options = None):
         WorkspaceDir = GlobalData.gWORKSPACE\r
         if not Options.PackageFile:\r
             Logger.Error("InstallPkg", OPTION_MISSING, ExtraData=ST.ERR_SPECIFY_PACKAGE)\r
-        \r
+\r
         # Get all Dist Info\r
         DistInfoList = []\r
         DistPkgList = []\r
@@ -536,17 +536,17 @@ def Main(Options = None):
             InstallDp(ToBeInstalledDist[0], ToBeInstalledDist[2], ToBeInstalledDist[1],\r
                       Options, Dep, WorkspaceDir, DataBase)\r
         ReturnCode = 0\r
-        \r
+\r
     except FatalError as XExcept:\r
         ReturnCode = XExcept.args[0]\r
         if Logger.GetLevel() <= Logger.DEBUG_9:\r
             Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(), platform) + format_exc())\r
-            \r
+\r
     except KeyboardInterrupt:\r
         ReturnCode = ABORT_ERROR\r
         if Logger.GetLevel() <= Logger.DEBUG_9:\r
             Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(), platform) + format_exc())\r
-            \r
+\r
     except:\r
         ReturnCode = CODE_ERROR\r
         Logger.Error(\r
@@ -574,8 +574,8 @@ def Main(Options = None):
     return ReturnCode\r
 \r
 # BackupDist method\r
-#  \r
-# This method will backup the Distribution file into the $(WORKSPACE)/conf/upt, and rename it \r
+#\r
+# This method will backup the Distribution file into the $(WORKSPACE)/conf/upt, and rename it\r
 # if there is already a same-named distribution existed.\r
 #\r
 # @param DpPkgFileName: The distribution path\r
@@ -645,19 +645,19 @@ def CheckInstallDpx(Dep, DistPkg, DistPkgFileName):
 #\r
 def InstallModuleContent(FromPath, NewPath, ModulePath, Module, ContentZipFile,\r
     WorkspaceDir, ModuleList, Package = None, ReadOnly = False):\r
-    \r
+\r
     if NewPath.startswith("\\") or NewPath.startswith("/"):\r
         NewPath = NewPath[1:]\r
-    \r
+\r
     if not IsValidInstallPath(NewPath):\r
-        Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%NewPath) \r
-           \r
+        Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%NewPath)\r
+\r
     NewModuleFullPath = os.path.normpath(os.path.join(WorkspaceDir, NewPath,\r
         ConvertPath(ModulePath)))\r
     Module.SetFullPath(os.path.normpath(os.path.join(NewModuleFullPath,\r
         ConvertPath(Module.GetName()) + '.inf')))\r
     Module.FileList = []\r
-    \r
+\r
     for MiscFile in Module.GetMiscFileList():\r
         if not MiscFile:\r
             continue\r
@@ -665,12 +665,12 @@ def InstallModuleContent(FromPath, NewPath, ModulePath, Module, ContentZipFile,
             File = Item.GetURI()\r
             if File.startswith("\\") or File.startswith("/"):\r
                 File = File[1:]\r
-            \r
+\r
             if not IsValidInstallPath(File):\r
                 Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%File)\r
 \r
             FromFile = os.path.join(FromPath, ModulePath, File)\r
-            Executable = Item.GetExecutable()            \r
+            Executable = Item.GetExecutable()\r
             ToFile = os.path.normpath(os.path.join(NewModuleFullPath, ConvertPath(File)))\r
             Md5Sum = InstallFile(ContentZipFile, FromFile, ToFile, ReadOnly, Executable)\r
             if Package and ((ToFile, Md5Sum) not in Package.FileList):\r
@@ -683,10 +683,10 @@ def InstallModuleContent(FromPath, NewPath, ModulePath, Module, ContentZipFile,
         File = Item.GetSourceFile()\r
         if File.startswith("\\") or File.startswith("/"):\r
             File = File[1:]\r
-            \r
+\r
         if not IsValidInstallPath(File):\r
-            Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%File) \r
-                               \r
+            Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%File)\r
+\r
         FromFile = os.path.join(FromPath, ModulePath, File)\r
         ToFile = os.path.normpath(os.path.join(NewModuleFullPath, ConvertPath(File)))\r
         Md5Sum = InstallFile(ContentZipFile, FromFile, ToFile, ReadOnly)\r
@@ -698,24 +698,24 @@ def InstallModuleContent(FromPath, NewPath, ModulePath, Module, ContentZipFile,
             Module.FileList.append((ToFile, Md5Sum))\r
     for Item in Module.GetBinaryFileList():\r
         FileNameList = Item.GetFileNameList()\r
-        for FileName in FileNameList:              \r
-            File = FileName.GetFilename()          \r
+        for FileName in FileNameList:\r
+            File = FileName.GetFilename()\r
             if File.startswith("\\") or File.startswith("/"):\r
                 File = File[1:]\r
-                \r
+\r
             if not IsValidInstallPath(File):\r
                 Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%File)\r
 \r
             FromFile = os.path.join(FromPath, ModulePath, File)\r
             ToFile = os.path.normpath(os.path.join(NewModuleFullPath, ConvertPath(File)))\r
-            Md5Sum = InstallFile(ContentZipFile, FromFile, ToFile, ReadOnly)       \r
+            Md5Sum = InstallFile(ContentZipFile, FromFile, ToFile, ReadOnly)\r
             if Package and ((ToFile, Md5Sum) not in Package.FileList):\r
                 Package.FileList.append((ToFile, Md5Sum))\r
             elif Package:\r
                 continue\r
             elif (ToFile, Md5Sum) not in Module.FileList:\r
                 Module.FileList.append((ToFile, Md5Sum))\r
-    \r
+\r
     InstallModuleContentZipFile(ContentZipFile, FromPath, ModulePath, WorkspaceDir, NewPath, Module, Package, ReadOnly,\r
                                 ModuleList)\r
 \r
@@ -726,7 +726,7 @@ def InstallModuleContent(FromPath, NewPath, ModulePath, Module, ContentZipFile,
 def InstallModuleContentZipFile(ContentZipFile, FromPath, ModulePath, WorkspaceDir, NewPath, Module, Package, ReadOnly,\r
                                 ModuleList):\r
     #\r
-    # Extract other files under current module path in content Zip file but not listed in the description \r
+    # Extract other files under current module path in content Zip file but not listed in the description\r
     #\r
     if ContentZipFile:\r
         for FileName in ContentZipFile.GetZipFile().namelist():\r
@@ -735,12 +735,12 @@ def InstallModuleContentZipFile(ContentZipFile, FromPath, ModulePath, WorkspaceD
             if FileUnderPath(FileName, CheckPath):\r
                 if FileName.startswith("\\") or FileName.startswith("/"):\r
                     FileName = FileName[1:]\r
-                    \r
+\r
                 if not IsValidInstallPath(FileName):\r
                     Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%FileName)\r
-                                                   \r
+\r
                 FromFile = FileName\r
-                ToFile = os.path.normpath(os.path.join(WorkspaceDir, \r
+                ToFile = os.path.normpath(os.path.join(WorkspaceDir,\r
                         ConvertPath(FileName.replace(FromPath, NewPath, 1))))\r
                 CheckList = copy.copy(Module.FileList)\r
                 if Package:\r
@@ -755,16 +755,16 @@ def InstallModuleContentZipFile(ContentZipFile, FromPath, ModulePath, WorkspaceD
                     elif Package:\r
                         continue\r
                     elif (ToFile, Md5Sum) not in Module.FileList:\r
-                        Module.FileList.append((ToFile, Md5Sum))            \r
-    \r
+                        Module.FileList.append((ToFile, Md5Sum))\r
+\r
     ModuleList.append((Module, Package))\r
 \r
 ## FileUnderPath\r
-#  Check whether FileName started with directory specified by CheckPath \r
+#  Check whether FileName started with directory specified by CheckPath\r
 #\r
 # @param FileName: the FileName need to be checked\r
 # @param CheckPath: the path need to be checked against\r
-# @return:  True or False  \r
+# @return:  True or False\r
 #\r
 def FileUnderPath(FileName, CheckPath):\r
     FileName = FileName.replace('\\', '/')\r
@@ -777,13 +777,13 @@ def FileUnderPath(FileName, CheckPath):
             RemainingPath = RemainingPath[1:]\r
         if FileName == os.path.normpath(os.path.join(CheckPath, RemainingPath)):\r
             return True\r
-    \r
+\r
     return False\r
 \r
 ## InstallFile\r
 #  Extract File from Zipfile, set file attribute, and return the Md5Sum\r
 #\r
-# @return:  True or False  \r
+# @return:  True or False\r
 #\r
 def InstallFile(ContentZipFile, FromFile, ToFile, ReadOnly, Executable=False):\r
     if os.path.exists(os.path.normpath(ToFile)):\r
@@ -802,7 +802,7 @@ def InstallFile(ContentZipFile, FromFile, ToFile, ReadOnly, Executable=False):
                   stat.S_IWOTH | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)\r
         else:\r
             chmod(ToFile, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH)\r
-                \r
+\r
     Md5Sigature = md5.new(__FileHookOpen__(str(ToFile), 'rb').read())\r
     Md5Sum = Md5Sigature.hexdigest()\r
 \r
@@ -823,44 +823,44 @@ def InstallPackageContent(FromPath, ToPath, Package, ContentZipFile, Dep,
     if Dep:\r
         pass\r
     Package.FileList = []\r
-    \r
+\r
     if ToPath.startswith("\\") or ToPath.startswith("/"):\r
         ToPath = ToPath[1:]\r
-    \r
+\r
     if not IsValidInstallPath(ToPath):\r
-        Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%ToPath)     \r
+        Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%ToPath)\r
 \r
     if FromPath.startswith("\\") or FromPath.startswith("/"):\r
         FromPath = FromPath[1:]\r
-    \r
+\r
     if not IsValidInstallPath(FromPath):\r
-        Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%FromPath)   \r
-    \r
+        Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%FromPath)\r
+\r
     PackageFullPath = os.path.normpath(os.path.join(WorkspaceDir, ToPath))\r
     for MiscFile in Package.GetMiscFileList():\r
         for Item in MiscFile.GetFileList():\r
             FileName = Item.GetURI()\r
             if FileName.startswith("\\") or FileName.startswith("/"):\r
                 FileName = FileName[1:]\r
-                \r
+\r
             if not IsValidInstallPath(FileName):\r
                 Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%FileName)\r
-                            \r
+\r
             FromFile = os.path.join(FromPath, FileName)\r
             Executable = Item.GetExecutable()\r
             ToFile =  (os.path.join(PackageFullPath, ConvertPath(FileName)))\r
             Md5Sum = InstallFile(ContentZipFile, FromFile, ToFile, ReadOnly, Executable)\r
             if (ToFile, Md5Sum) not in Package.FileList:\r
                 Package.FileList.append((ToFile, Md5Sum))\r
-    PackageIncludeArchList = [] \r
+    PackageIncludeArchList = []\r
     for Item in Package.GetPackageIncludeFileList():\r
         FileName = Item.GetFilePath()\r
         if FileName.startswith("\\") or FileName.startswith("/"):\r
             FileName = FileName[1:]\r
-            \r
+\r
         if not IsValidInstallPath(FileName):\r
-            Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%FileName) \r
-                   \r
+            Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%FileName)\r
+\r
         FromFile = os.path.join(FromPath, FileName)\r
         ToFile = os.path.normpath(os.path.join(PackageFullPath, ConvertPath(FileName)))\r
         RetFile = ContentZipFile.UnpackFile(FromFile, ToFile)\r
@@ -875,21 +875,21 @@ def InstallPackageContent(FromPath, ToPath, Package, ContentZipFile, Dep,
         if ReadOnly:\r
             chmod(ToFile, stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH)\r
         else:\r
-            chmod(ToFile, stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH|stat.S_IWUSR|stat.S_IWGRP|stat.S_IWOTH)            \r
+            chmod(ToFile, stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH|stat.S_IWUSR|stat.S_IWGRP|stat.S_IWOTH)\r
         Md5Sigature = md5.new(__FileHookOpen__(str(ToFile), 'rb').read())\r
         Md5Sum = Md5Sigature.hexdigest()\r
         if (ToFile, Md5Sum) not in Package.FileList:\r
             Package.FileList.append((ToFile, Md5Sum))\r
     Package.SetIncludeArchList(PackageIncludeArchList)\r
-    \r
+\r
     for Item in Package.GetStandardIncludeFileList():\r
         FileName = Item.GetFilePath()\r
         if FileName.startswith("\\") or FileName.startswith("/"):\r
             FileName = FileName[1:]\r
-            \r
+\r
         if not IsValidInstallPath(FileName):\r
-            Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%FileName) \r
-                    \r
+            Logger.Error("UPT", FORMAT_INVALID, ST.ERR_FILE_NAME_INVALIDE%FileName)\r
+\r
         FromFile = os.path.join(FromPath, FileName)\r
         ToFile = os.path.normpath(os.path.join(PackageFullPath, ConvertPath(FileName)))\r
         Md5Sum = InstallFile(ContentZipFile, FromFile, ToFile, ReadOnly)\r
@@ -932,7 +932,7 @@ def GetDPFile(ZipFile):
                 continue\r
         else:\r
             continue\r
-        \r
+\r
         Logger.Error("PackagingTool", FILE_TYPE_MISMATCH,\r
             ExtraData=ST.ERR_DIST_FILE_TOOMANY)\r
     if not DescFile or not ContentFile:\r
@@ -951,13 +951,13 @@ def InstallDp(DistPkg, DpPkgFileName, ContentZipFile, Options, Dep, WorkspaceDir
     #\r
     PackageList = []\r
     ModuleList = []\r
-    DistPkg.PackageSurfaceArea = GetPackageList(DistPkg, Dep, WorkspaceDir, Options, \r
+    DistPkg.PackageSurfaceArea = GetPackageList(DistPkg, Dep, WorkspaceDir, Options,\r
                                                 ContentZipFile, ModuleList, PackageList)\r
 \r
     DistPkg.ModuleSurfaceArea = GetModuleList(DistPkg, Dep, WorkspaceDir, ContentZipFile, ModuleList)\r
-    \r
+\r
     GenToolMisc(DistPkg, WorkspaceDir, ContentZipFile)\r
-    \r
+\r
     #\r
     # copy "Distribution File" to directory $(WORKSPACE)/conf/upt\r
     #\r
@@ -968,6 +968,6 @@ def InstallDp(DistPkg, DpPkgFileName, ContentZipFile, Options, Dep, WorkspaceDir
     # update database\r
     #\r
     Logger.Quiet(ST.MSG_UPDATE_PACKAGE_DATABASE)\r
-    DataBase.AddDPObject(DistPkg, NewDpPkgFileName, DistFileName, \r
+    DataBase.AddDPObject(DistPkg, NewDpPkgFileName, DistFileName,\r
                    DistPkg.Header.RePackage)\r
 \r
index cd92753a8d4b4849eb816d8a0812449ee384ffc3..c74e2086316b7c28f296a67a902aab56b634cf07 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # Inventory workspace's distribution package information.\r
 #\r
-# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -37,7 +37,7 @@ from Library import GlobalData
 #\r
 def InventoryDistInstalled(DataBase):\r
     DistInstalled = DataBase.InventoryDistInstalled()\r
-    \r
+\r
     #\r
     # find the max length for each item\r
     #\r
@@ -47,9 +47,9 @@ def InventoryDistInstalled(DataBase):
     DpOriginalNameStr = "DpOriginalName"\r
     MaxGuidlen = len(DpGuidStr)\r
     MaxVerlen = len(DpVerStr)\r
-    MaxDpAliasFileNameLen = len(DpNameStr) \r
+    MaxDpAliasFileNameLen = len(DpNameStr)\r
     MaxDpOrigFileNamelen = len(DpOriginalNameStr)\r
-    \r
+\r
     for (DpGuid, DpVersion, DpOriginalName, DpAliasFileName) in DistInstalled:\r
         MaxGuidlen = max(MaxGuidlen, len(DpGuid))\r
         MaxVerlen = max(MaxVerlen, len(DpVersion))\r
@@ -57,22 +57,22 @@ def InventoryDistInstalled(DataBase):
         MaxDpOrigFileNamelen = max(MaxDpOrigFileNamelen, len(DpOriginalName))\r
 \r
     OutMsgFmt = "%-*s\t%-*s\t%-*s\t%-s"\r
-    OutMsg = OutMsgFmt % (MaxDpAliasFileNameLen, \r
-                          DpNameStr, \r
-                          MaxGuidlen, \r
-                          DpGuidStr, \r
-                          MaxVerlen, \r
-                          DpVerStr, \r
+    OutMsg = OutMsgFmt % (MaxDpAliasFileNameLen,\r
+                          DpNameStr,\r
+                          MaxGuidlen,\r
+                          DpGuidStr,\r
+                          MaxVerlen,\r
+                          DpVerStr,\r
                           DpOriginalNameStr)\r
     Logger.Info(OutMsg)\r
-    \r
+\r
     for (DpGuid, DpVersion, DpFileName, DpAliasFileName) in DistInstalled:\r
-        OutMsg = OutMsgFmt % (MaxDpAliasFileNameLen, \r
-                            DpAliasFileName, \r
-                            MaxGuidlen, \r
-                            DpGuid, \r
-                            MaxVerlen, \r
-                            DpVersion, \r
+        OutMsg = OutMsgFmt % (MaxDpAliasFileNameLen,\r
+                            DpAliasFileName,\r
+                            MaxGuidlen,\r
+                            DpGuid,\r
+                            MaxVerlen,\r
+                            DpVersion,\r
                             DpFileName)\r
         Logger.Info(OutMsg)\r
 \r
@@ -90,13 +90,13 @@ def Main(Options = None):
 \r
     try:\r
         DataBase = GlobalData.gDB\r
-        InventoryDistInstalled(DataBase)     \r
-        ReturnCode = 0       \r
+        InventoryDistInstalled(DataBase)\r
+        ReturnCode = 0\r
     except FatalError as XExcept:\r
         ReturnCode = XExcept.args[0]\r
         if Logger.GetLevel() <= Logger.DEBUG_9:\r
             Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(), platform) + format_exc())\r
-    except KeyboardInterrupt: \r
+    except KeyboardInterrupt:\r
         ReturnCode = ABORT_ERROR\r
         if Logger.GetLevel() <= Logger.DEBUG_9:\r
             Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(), platform) + format_exc())\r
@@ -113,5 +113,5 @@ def Main(Options = None):
 \r
     if ReturnCode == 0:\r
         Logger.Quiet(ST.MSG_FINISH)\r
-    \r
-    return ReturnCode
\ No newline at end of file
+\r
+    return ReturnCode\r
index ab1725ff0ef249a2a888d28d20e22aac2c71a92f..4726629695803cfa2ef115486a3b43dc49bfe452 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -39,21 +39,21 @@ from Library.Misc import GetLocalValue
 ## GenTailCommentLines\r
 #\r
 # @param TailCommentLines:  the tail comment lines that need to be generated\r
-# @param LeadingSpaceNum:   the number of leading space needed for non-first \r
+# @param LeadingSpaceNum:   the number of leading space needed for non-first\r
 #                            line tail comment\r
-# \r
+#\r
 def GenTailCommentLines (TailCommentLines, LeadingSpaceNum = 0):\r
     TailCommentLines = TailCommentLines.rstrip(END_OF_LINE)\r
     CommentStr = TAB_SPACE_SPLIT*2 + TAB_SPECIAL_COMMENT + TAB_SPACE_SPLIT + \\r
     (END_OF_LINE + LeadingSpaceNum * TAB_SPACE_SPLIT + TAB_SPACE_SPLIT*2 + TAB_SPECIAL_COMMENT + \\r
      TAB_SPACE_SPLIT).join(GetSplitValueList(TailCommentLines, END_OF_LINE))\r
-     \r
+\r
     return CommentStr\r
 \r
 ## GenGenericComment\r
 #\r
 # @param CommentLines:   Generic comment Text, maybe Multiple Lines\r
-# \r
+#\r
 def GenGenericComment (CommentLines):\r
     if not CommentLines:\r
         return ''\r
@@ -68,8 +68,8 @@ def GenGenericComment (CommentLines):
 #  and for line with only <EOL>, '#\n' will be generated instead of '# \n'\r
 #\r
 # @param CommentLines:   Generic comment Text, maybe Multiple Lines\r
-# @return CommentStr:    Generated comment line \r
-# \r
+# @return CommentStr:    Generated comment line\r
+#\r
 def GenGenericCommentF (CommentLines, NumOfPound=1, IsPrompt=False, IsInfLibraryClass=False):\r
     if not CommentLines:\r
         return ''\r
@@ -104,7 +104,7 @@ def GenGenericCommentF (CommentLines, NumOfPound=1, IsPrompt=False, IsInfLibrary
                     CommentStr += TAB_COMMENT_SPLIT * NumOfPound + TAB_SPACE_SPLIT * 16 + Line + END_OF_LINE\r
                 else:\r
                     CommentStr += TAB_COMMENT_SPLIT * NumOfPound + TAB_SPACE_SPLIT + Line + END_OF_LINE\r
-     \r
+\r
     return CommentStr\r
 \r
 \r
@@ -112,7 +112,7 @@ def GenGenericCommentF (CommentLines, NumOfPound=1, IsPrompt=False, IsInfLibrary
 #\r
 # Generate Header comment sections\r
 #\r
-# @param Abstract      One line of abstract \r
+# @param Abstract      One line of abstract\r
 # @param Description   multiple lines of Description\r
 # @param Copyright     possible multiple copyright lines\r
 # @param License       possible multiple license lines\r
@@ -148,9 +148,9 @@ def GenHeaderCommentSection(Abstract, Description, Copyright, License, IsBinaryH
         Content += CommChar + TAB_SPACE_SPLIT + ('\r\n' + CommChar + TAB_SPACE_SPLIT).join(GetSplitValueList\\r
                                                   (Description, '\n'))\r
         Content += '\r\n' + CommChar + '\r\n'\r
-  \r
+\r
     #\r
-    # There is no '#\n' line to separate multiple copyright lines in code base \r
+    # There is no '#\n' line to separate multiple copyright lines in code base\r
     #\r
     if Copyright:\r
         Copyright = Copyright.rstrip('\r\n')\r
@@ -163,12 +163,12 @@ def GenHeaderCommentSection(Abstract, Description, Copyright, License, IsBinaryH
         Content += CommChar + TAB_SPACE_SPLIT + ('\r\n' + CommChar + TAB_SPACE_SPLIT).join(GetSplitValueList\\r
                                                   (License, '\n'))\r
         Content += '\r\n' + CommChar + '\r\n'\r
-    \r
+\r
     if CommChar == TAB_COMMENT_EDK1_SPLIT:\r
         Content += CommChar + TAB_SPACE_SPLIT + TAB_STAR + TAB_COMMENT_EDK1_END + '\r\n'\r
     else:\r
         Content += CommChar * 2 + '\r\n'\r
-    \r
+\r
     return Content\r
 \r
 \r
@@ -177,11 +177,11 @@ def GenHeaderCommentSection(Abstract, Description, Copyright, License, IsBinaryH
 #\r
 # @param Usage:            Usage type\r
 # @param TailCommentText:  Comment text for tail comment\r
-# \r
+#\r
 def GenInfPcdTailComment (Usage, TailCommentText):\r
     if (Usage == ITEM_UNDEFINED) and (not TailCommentText):\r
         return ''\r
-    \r
+\r
     CommentLine = TAB_SPACE_SPLIT.join([Usage, TailCommentText])\r
     return GenTailCommentLines(CommentLine)\r
 \r
@@ -190,16 +190,16 @@ def GenInfPcdTailComment (Usage, TailCommentText):
 #\r
 # @param Usage:            Usage type\r
 # @param TailCommentText:  Comment text for tail comment\r
-# \r
+#\r
 def GenInfProtocolPPITailComment (Usage, Notify, TailCommentText):\r
     if (not Notify) and (Usage == ITEM_UNDEFINED) and (not TailCommentText):\r
         return ''\r
-    \r
+\r
     if Notify:\r
         CommentLine = USAGE_ITEM_NOTIFY + " ## "\r
     else:\r
         CommentLine = ''\r
-    \r
+\r
     CommentLine += TAB_SPACE_SPLIT.join([Usage, TailCommentText])\r
     return GenTailCommentLines(CommentLine)\r
 \r
@@ -208,39 +208,39 @@ def GenInfProtocolPPITailComment (Usage, Notify, TailCommentText):
 #\r
 # @param Usage:            Usage type\r
 # @param TailCommentText:  Comment text for tail comment\r
-# \r
+#\r
 def GenInfGuidTailComment (Usage, GuidTypeList, VariableName, TailCommentText):\r
     GuidType = GuidTypeList[0]\r
     if (Usage == ITEM_UNDEFINED) and (GuidType == ITEM_UNDEFINED) and \\r
         (not TailCommentText):\r
         return ''\r
-    \r
-    FirstLine = Usage + " ## " + GuidType    \r
+\r
+    FirstLine = Usage + " ## " + GuidType\r
     if GuidType == TAB_INF_GUIDTYPE_VAR:\r
         FirstLine += ":" + VariableName\r
-      \r
+\r
     CommentLine = TAB_SPACE_SPLIT.join([FirstLine, TailCommentText])\r
     return GenTailCommentLines(CommentLine)\r
 \r
 ## GenDecGuidTailComment\r
 #\r
 # @param SupModuleList:  Supported module type list\r
-# \r
-def GenDecTailComment (SupModuleList):   \r
+#\r
+def GenDecTailComment (SupModuleList):\r
     CommentLine = TAB_SPACE_SPLIT.join(SupModuleList)\r
     return GenTailCommentLines(CommentLine)\r
 \r
 \r
 ## _GetHelpStr\r
-#  get HelpString from a list of HelpTextObject, the priority refer to \r
+#  get HelpString from a list of HelpTextObject, the priority refer to\r
 #  related HLD\r
 #\r
 #  @param HelpTextObjList: List of HelpTextObject\r
-# \r
+#\r
 #  @return HelpStr: the help text string found, '' means no help text found\r
 #\r
 def _GetHelpStr(HelpTextObjList):\r
-    ValueList = []        \r
+    ValueList = []\r
     for HelpObj in HelpTextObjList:\r
         ValueList.append((HelpObj.GetLang(), HelpObj.GetString()))\r
     return GetLocalValue(ValueList, True)\r
index 8ee788bd7724e097efb0fbfea980a4ef997bb4c2..285812c9c2f8465674e077449339333e8ff69480 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -69,7 +69,7 @@ def ParseHeaderCommentSection(CommentList, FileName = None, IsBinaryHeader = Fal
     else:\r
         STR_HEADER_COMMENT_START = "@file"\r
     HeaderCommentStage = HEADER_COMMENT_NOT_STARTED\r
-    \r
+\r
     #\r
     # first find the last copyright line\r
     #\r
@@ -79,24 +79,24 @@ def ParseHeaderCommentSection(CommentList, FileName = None, IsBinaryHeader = Fal
         if _IsCopyrightLine(Line):\r
             Last = Index\r
             break\r
-    \r
+\r
     for Item in CommentList:\r
         Line = Item[0]\r
         LineNo = Item[1]\r
-        \r
+\r
         if not Line.startswith(TAB_COMMENT_SPLIT) and Line:\r
             Logger.Error("\nUPT", FORMAT_INVALID, ST.ERR_INVALID_COMMENT_FORMAT, FileName, Item[1])\r
         Comment = CleanString2(Line)[1]\r
         Comment = Comment.strip()\r
         #\r
-        # if there are blank lines between License or Description, keep them as they would be \r
+        # if there are blank lines between License or Description, keep them as they would be\r
         # indication of different block; or in the position that Abstract should be, also keep it\r
         # as it indicates that no abstract\r
         #\r
         if not Comment and HeaderCommentStage not in [HEADER_COMMENT_LICENSE, \\r
                                                       HEADER_COMMENT_DESCRIPTION, HEADER_COMMENT_ABSTRACT]:\r
             continue\r
-        \r
+\r
         if HeaderCommentStage == HEADER_COMMENT_NOT_STARTED:\r
             if Comment.startswith(STR_HEADER_COMMENT_START):\r
                 HeaderCommentStage = HEADER_COMMENT_ABSTRACT\r
@@ -114,20 +114,20 @@ def ParseHeaderCommentSection(CommentList, FileName = None, IsBinaryHeader = Fal
                     ValidateCopyright(Result, ST.WRN_INVALID_COPYRIGHT, FileName, LineNo, ErrMsg)\r
                     Copyright += Comment + EndOfLine\r
                     HeaderCommentStage = HEADER_COMMENT_COPYRIGHT\r
-                else:                    \r
+                else:\r
                     Abstract += Comment + EndOfLine\r
                     HeaderCommentStage = HEADER_COMMENT_DESCRIPTION\r
             elif HeaderCommentStage == HEADER_COMMENT_DESCRIPTION:\r
                 #\r
                 # in case there is no description\r
-                #                \r
+                #\r
                 if _IsCopyrightLine(Comment):\r
                     Result, ErrMsg = _ValidateCopyright(Comment)\r
                     ValidateCopyright(Result, ST.WRN_INVALID_COPYRIGHT, FileName, LineNo, ErrMsg)\r
                     Copyright += Comment + EndOfLine\r
                     HeaderCommentStage = HEADER_COMMENT_COPYRIGHT\r
                 else:\r
-                    Description += Comment + EndOfLine                \r
+                    Description += Comment + EndOfLine\r
             elif HeaderCommentStage == HEADER_COMMENT_COPYRIGHT:\r
                 if _IsCopyrightLine(Comment):\r
                     Result, ErrMsg = _ValidateCopyright(Comment)\r
@@ -136,23 +136,23 @@ def ParseHeaderCommentSection(CommentList, FileName = None, IsBinaryHeader = Fal
                 else:\r
                     #\r
                     # Contents after copyright line are license, those non-copyright lines in between\r
-                    # copyright line will be discarded \r
+                    # copyright line will be discarded\r
                     #\r
                     if LineNo > Last:\r
                         if License:\r
                             License += EndOfLine\r
                         License += Comment + EndOfLine\r
-                        HeaderCommentStage = HEADER_COMMENT_LICENSE                \r
+                        HeaderCommentStage = HEADER_COMMENT_LICENSE\r
             else:\r
                 if not Comment and not License:\r
                     continue\r
                 License += Comment + EndOfLine\r
-                  \r
+\r
     return Abstract.strip(), Description.strip(), Copyright.strip(), License.strip()\r
 \r
 ## _IsCopyrightLine\r
-# check whether current line is copyright line, the criteria is whether there is case insensitive keyword "Copyright" \r
-# followed by zero or more white space characters followed by a "(" character \r
+# check whether current line is copyright line, the criteria is whether there is case insensitive keyword "Copyright"\r
+# followed by zero or more white space characters followed by a "(" character\r
 #\r
 # @param LineContent:  the line need to be checked\r
 # @return: True if current line is copyright line, False else\r
@@ -160,7 +160,7 @@ def ParseHeaderCommentSection(CommentList, FileName = None, IsBinaryHeader = Fal
 def _IsCopyrightLine (LineContent):\r
     LineContent = LineContent.upper()\r
     Result = False\r
-    \r
+\r
     ReIsCopyrightRe = re.compile(r"""(^|\s)COPYRIGHT *\(""", re.DOTALL)\r
     if ReIsCopyrightRe.search(LineContent):\r
         Result = True\r
@@ -169,23 +169,23 @@ def _IsCopyrightLine (LineContent):
 \r
 ## ParseGenericComment\r
 #\r
-# @param GenericComment: Generic comment list, element of \r
+# @param GenericComment: Generic comment list, element of\r
 #                        (CommentLine, LineNum)\r
 # @param ContainerFile:  Input value for filename of Dec file\r
-# \r
+#\r
 def ParseGenericComment (GenericComment, ContainerFile=None, SkipTag=None):\r
     if ContainerFile:\r
         pass\r
-    HelpTxt = None         \r
-    HelpStr = '' \r
-        \r
+    HelpTxt = None\r
+    HelpStr = ''\r
+\r
     for Item in GenericComment:\r
         CommentLine = Item[0]\r
         Comment = CleanString2(CommentLine)[1]\r
         if SkipTag is not None and Comment.startswith(SkipTag):\r
             Comment = Comment.replace(SkipTag, '', 1)\r
         HelpStr += Comment + '\n'\r
-        \r
+\r
     if HelpStr:\r
         HelpTxt = TextObject()\r
         if HelpStr.endswith('\n') and not HelpStr.endswith('\n\n') and HelpStr != '\n':\r
@@ -196,22 +196,22 @@ def ParseGenericComment (GenericComment, ContainerFile=None, SkipTag=None):
 \r
 ## ParsePcdErrorCode\r
 #\r
-# @param Value: original ErrorCode value \r
+# @param Value: original ErrorCode value\r
 # @param ContainerFile: Input value for filename of Dec file\r
-# @param LineNum: Line Num \r
-# \r
-def ParsePcdErrorCode (Value = None, ContainerFile = None, LineNum = None):      \r
-    try: \r
+# @param LineNum: Line Num\r
+#\r
+def ParsePcdErrorCode (Value = None, ContainerFile = None, LineNum = None):\r
+    try:\r
         if Value.strip().startswith((TAB_HEX_START, TAB_CAPHEX_START)):\r
             Base = 16\r
         else:\r
             Base = 10\r
         ErrorCode = long(Value, Base)\r
         if ErrorCode > PCD_ERR_CODE_MAX_SIZE or ErrorCode < 0:\r
-            Logger.Error('Parser', \r
+            Logger.Error('Parser',\r
                         FORMAT_NOT_SUPPORTED,\r
                         "The format %s of ErrorCode is not valid, should be UNIT32 type or long type" % Value,\r
-                        File = ContainerFile, \r
+                        File = ContainerFile,\r
                         Line = LineNum)\r
         #\r
         # To delete the tailing 'L'\r
@@ -220,27 +220,27 @@ def ParsePcdErrorCode (Value = None, ContainerFile = None, LineNum = None):
     except ValueError as XStr:\r
         if XStr:\r
             pass\r
-        Logger.Error('Parser', \r
+        Logger.Error('Parser',\r
                     FORMAT_NOT_SUPPORTED,\r
                     "The format %s of ErrorCode is not valid, should be UNIT32 type or long type" % Value,\r
-                    File = ContainerFile, \r
+                    File = ContainerFile,\r
                     Line = LineNum)\r
-    \r
+\r
 ## ParseDecPcdGenericComment\r
 #\r
-# @param GenericComment: Generic comment list, element of (CommentLine, \r
+# @param GenericComment: Generic comment list, element of (CommentLine,\r
 #                         LineNum)\r
 # @param ContainerFile:  Input value for filename of Dec file\r
-# \r
-def ParseDecPcdGenericComment (GenericComment, ContainerFile, TokenSpaceGuidCName, CName, MacroReplaceDict):       \r
-    HelpStr = '' \r
+#\r
+def ParseDecPcdGenericComment (GenericComment, ContainerFile, TokenSpaceGuidCName, CName, MacroReplaceDict):\r
+    HelpStr = ''\r
     PromptStr = ''\r
     PcdErr = None\r
     PcdErrList = []\r
     ValidValueNum = 0\r
     ValidRangeNum = 0\r
     ExpressionNum = 0\r
-        \r
+\r
     for (CommentLine, LineNum) in GenericComment:\r
         Comment = CleanString2(CommentLine)[1]\r
         #\r
@@ -252,13 +252,13 @@ def ParseDecPcdGenericComment (GenericComment, ContainerFile, TokenSpaceGuidCNam
             if MatchedStr:\r
                 Macro = MatchedStr.strip().lstrip('$(').rstrip(')').strip()\r
                 if Macro in MacroReplaceDict:\r
-                    Comment = Comment.replace(MatchedStr, MacroReplaceDict[Macro])    \r
+                    Comment = Comment.replace(MatchedStr, MacroReplaceDict[Macro])\r
         if Comment.startswith(TAB_PCD_VALIDRANGE):\r
             if ValidValueNum > 0 or ExpressionNum > 0:\r
-                Logger.Error('Parser', \r
+                Logger.Error('Parser',\r
                              FORMAT_NOT_SUPPORTED,\r
                              ST.WRN_MULTI_PCD_RANGES,\r
-                             File = ContainerFile, \r
+                             File = ContainerFile,\r
                              Line = LineNum)\r
             else:\r
                 PcdErr = PcdErrorObject()\r
@@ -280,21 +280,21 @@ def ParseDecPcdGenericComment (GenericComment, ContainerFile, TokenSpaceGuidCNam
             else:\r
                 Logger.Error("Parser",\r
                          FORMAT_NOT_SUPPORTED,\r
-                         Cause, \r
-                         ContainerFile, \r
+                         Cause,\r
+                         ContainerFile,\r
                          LineNum)\r
         elif Comment.startswith(TAB_PCD_VALIDLIST):\r
             if ValidRangeNum > 0 or ExpressionNum > 0:\r
-                Logger.Error('Parser', \r
+                Logger.Error('Parser',\r
                              FORMAT_NOT_SUPPORTED,\r
                              ST.WRN_MULTI_PCD_RANGES,\r
-                             File = ContainerFile, \r
+                             File = ContainerFile,\r
                              Line = LineNum)\r
             elif ValidValueNum > 0:\r
-                Logger.Error('Parser', \r
+                Logger.Error('Parser',\r
                              FORMAT_NOT_SUPPORTED,\r
                              ST.WRN_MULTI_PCD_VALIDVALUE,\r
-                             File = ContainerFile, \r
+                             File = ContainerFile,\r
                              Line = LineNum)\r
             else:\r
                 PcdErr = PcdErrorObject()\r
@@ -317,15 +317,15 @@ def ParseDecPcdGenericComment (GenericComment, ContainerFile, TokenSpaceGuidCNam
             else:\r
                 Logger.Error("Parser",\r
                          FORMAT_NOT_SUPPORTED,\r
-                         Cause, \r
-                         ContainerFile, \r
+                         Cause,\r
+                         ContainerFile,\r
                          LineNum)\r
         elif Comment.startswith(TAB_PCD_EXPRESSION):\r
             if ValidRangeNum > 0 or ValidValueNum > 0:\r
-                Logger.Error('Parser', \r
+                Logger.Error('Parser',\r
                              FORMAT_NOT_SUPPORTED,\r
                              ST.WRN_MULTI_PCD_RANGES,\r
-                             File = ContainerFile, \r
+                             File = ContainerFile,\r
                              Line = LineNum)\r
             else:\r
                 PcdErr = PcdErrorObject()\r
@@ -344,24 +344,24 @@ def ParseDecPcdGenericComment (GenericComment, ContainerFile, TokenSpaceGuidCNam
                 else:\r
                     PcdErr.SetExpression(Expression)\r
                 PcdErrList.append(PcdErr)\r
-            else:        \r
+            else:\r
                 Logger.Error("Parser",\r
                          FORMAT_NOT_SUPPORTED,\r
-                         Cause, \r
-                         ContainerFile, \r
-                         LineNum)                \r
+                         Cause,\r
+                         ContainerFile,\r
+                         LineNum)\r
         elif Comment.startswith(TAB_PCD_PROMPT):\r
             if PromptStr:\r
-                Logger.Error('Parser', \r
+                Logger.Error('Parser',\r
                              FORMAT_NOT_SUPPORTED,\r
                              ST.WRN_MULTI_PCD_PROMPT,\r
-                             File = ContainerFile, \r
+                             File = ContainerFile,\r
                              Line = LineNum)\r
             PromptStr = Comment.replace(TAB_PCD_PROMPT, "", 1).strip()\r
         else:\r
             if Comment:\r
                 HelpStr += Comment + '\n'\r
-    \r
+\r
     #\r
     # remove the last EOL if the comment is of format 'FOO\n'\r
     #\r
@@ -384,9 +384,9 @@ def ParseDecPcdTailComment (TailCommentList, ContainerFile):
     LineNum = TailCommentList[0][1]\r
 \r
     Comment = TailComment.lstrip(" #")\r
-    \r
+\r
     ReFindFirstWordRe = re.compile(r"""^([^ #]*)""", re.DOTALL)\r
-    \r
+\r
     #\r
     # get first word and compare with SUP_MODULE_LIST\r
     #\r
@@ -398,7 +398,7 @@ def ParseDecPcdTailComment (TailCommentList, ContainerFile):
     # parse line, it must have supported module type specified\r
     #\r
     if Comment.find(TAB_COMMENT_SPLIT) == -1:\r
-        Comment += TAB_COMMENT_SPLIT    \r
+        Comment += TAB_COMMENT_SPLIT\r
     SupMode, HelpStr = GetSplitValueList(Comment, TAB_COMMENT_SPLIT, 1)\r
     SupModuleList = []\r
     for Mod in GetSplitValueList(SupMode, TAB_SPACE_SPLIT):\r
@@ -407,8 +407,8 @@ def ParseDecPcdTailComment (TailCommentList, ContainerFile):
         elif Mod not in SUP_MODULE_LIST:\r
             Logger.Error("UPT",\r
                          FORMAT_INVALID,\r
-                         ST.WRN_INVALID_MODULE_TYPE%Mod, \r
-                         ContainerFile, \r
+                         ST.WRN_INVALID_MODULE_TYPE%Mod,\r
+                         ContainerFile,\r
                          LineNum)\r
         else:\r
             SupModuleList.append(Mod)\r
@@ -417,15 +417,15 @@ def ParseDecPcdTailComment (TailCommentList, ContainerFile):
 \r
 ## _CheckListExpression\r
 #\r
-# @param Expression: Pcd value list expression \r
+# @param Expression: Pcd value list expression\r
 #\r
 def _CheckListExpression(Expression):\r
     ListExpr = ''\r
     if TAB_VALUE_SPLIT in Expression:\r
-        ListExpr = Expression[Expression.find(TAB_VALUE_SPLIT)+1:] \r
+        ListExpr = Expression[Expression.find(TAB_VALUE_SPLIT)+1:]\r
     else:\r
         ListExpr = Expression\r
-        \r
+\r
     return IsValidListExpr(ListExpr)\r
 \r
 ## _CheckExpreesion\r
@@ -443,14 +443,14 @@ def _CheckExpression(Expression):
 ## _CheckRangeExpression\r
 #\r
 # @param Expression:    Pcd range expression\r
-#          \r
+#\r
 def _CheckRangeExpression(Expression):\r
     RangeExpr = ''\r
     if TAB_VALUE_SPLIT in Expression:\r
         RangeExpr = Expression[Expression.find(TAB_VALUE_SPLIT)+1:]\r
     else:\r
         RangeExpr = Expression\r
-        \r
+\r
     return IsValidRangeExpr(RangeExpr)\r
 \r
 ## ValidateCopyright\r
@@ -459,28 +459,28 @@ def _CheckRangeExpression(Expression):
 #\r
 def ValidateCopyright(Result, ErrType, FileName, LineNo, ErrMsg):\r
     if not Result:\r
-        Logger.Warn("\nUPT", ErrType, FileName, LineNo, ErrMsg) \r
+        Logger.Warn("\nUPT", ErrType, FileName, LineNo, ErrMsg)\r
 \r
 ## _ValidateCopyright\r
 #\r
 # @param Line:    Line that contains copyright information, # stripped\r
-# \r
+#\r
 # @retval Result: True if line is conformed to Spec format, False else\r
 # @retval ErrMsg: the detailed error description\r
-#  \r
+#\r
 def _ValidateCopyright(Line):\r
     if Line:\r
         pass\r
     Result = True\r
     ErrMsg = ''\r
-    \r
+\r
     return Result, ErrMsg\r
 \r
 def GenerateTokenList (Comment):\r
     #\r
     # Tokenize Comment using '#' and ' ' as token seperators\r
     #\r
-    RelplacedComment = None    \r
+    RelplacedComment = None\r
     while Comment != RelplacedComment:\r
         RelplacedComment = Comment\r
         Comment = Comment.replace('##', '#').replace('  ', ' ').replace(' ', '#').strip('# ')\r
@@ -500,25 +500,25 @@ def ParseComment (Comment, UsageTokens, TypeTokens, RemoveTokens, ParseVariable)
     Usage = None\r
     Type = None\r
     String = None\r
-    \r
+\r
     Comment = Comment[0]\r
-    \r
-    NumTokens = 2  \r
+\r
+    NumTokens = 2\r
     if ParseVariable:\r
-        # \r
-        # Remove white space around first instance of ':' from Comment if 'Variable' \r
+        #\r
+        # Remove white space around first instance of ':' from Comment if 'Variable'\r
         # is in front of ':' and Variable is the 1st or 2nd token in Comment.\r
         #\r
-        List = Comment.split(':', 1)    \r
+        List = Comment.split(':', 1)\r
         if len(List) > 1:\r
             SubList = GenerateTokenList (List[0].strip())\r
             if len(SubList) in [1, 2] and SubList[-1] == 'Variable':\r
-                if List[1].strip().find('L"') == 0:      \r
+                if List[1].strip().find('L"') == 0:\r
                     Comment = List[0].strip() + ':' + List[1].strip()\r
-        \r
-        # \r
+\r
+        #\r
         # Remove first instance of L"<VariableName> from Comment and put into String\r
-        # if and only if L"<VariableName>" is the 1st token, the 2nd token.  Or \r
+        # if and only if L"<VariableName>" is the 1st token, the 2nd token.  Or\r
         # L"<VariableName>" is the third token immediately following 'Variable:'.\r
         #\r
         End = -1\r
@@ -533,25 +533,25 @@ def ParseComment (Comment, UsageTokens, TypeTokens, RemoveTokens, ParseVariable)
                 End = String[2:].find('"')\r
         if End >= 0:\r
             SubList = GenerateTokenList (Comment[:Start])\r
-            if len(SubList) < 2: \r
+            if len(SubList) < 2:\r
                 Comment = Comment[:Start] + String[End + 3:]\r
                 String = String[:End + 3]\r
                 Type = 'Variable'\r
-                NumTokens = 1  \r
-    \r
+                NumTokens = 1\r
+\r
     #\r
-    # Initialze HelpText to Comment.  \r
+    # Initialze HelpText to Comment.\r
     # Content will be remove from HelpText as matching tokens are found\r
-    #  \r
+    #\r
     HelpText = Comment\r
-    \r
+\r
     #\r
     # Tokenize Comment using '#' and ' ' as token seperators\r
     #\r
     List = GenerateTokenList (Comment)\r
-    \r
+\r
     #\r
-    # Search first two tokens for Usage and Type and remove any matching tokens \r
+    # Search first two tokens for Usage and Type and remove any matching tokens\r
     # from HelpText\r
     #\r
     for Token in List[0:NumTokens]:\r
@@ -563,39 +563,39 @@ def ParseComment (Comment, UsageTokens, TypeTokens, RemoveTokens, ParseVariable)
             if Type is None and Token in TypeTokens:\r
                 Type = TypeTokens[Token]\r
                 HelpText = HelpText.replace(Token, '')\r
-            if Usage is not None:    \r
+            if Usage is not None:\r
                 for Token in List[0:NumTokens]:\r
                     if Token in RemoveTokens:\r
                         HelpText = HelpText.replace(Token, '')\r
-    \r
+\r
     #\r
     # If no Usage token is present and set Usage to UNDEFINED\r
-    #  \r
+    #\r
     if Usage is None:\r
         Usage = 'UNDEFINED'\r
-    \r
+\r
     #\r
     # If no Type token is present and set Type to UNDEFINED\r
-    #  \r
+    #\r
     if Type is None:\r
         Type = 'UNDEFINED'\r
-    \r
+\r
     #\r
     # If Type is not 'Variable:', then set String to None\r
-    #  \r
+    #\r
     if Type != 'Variable':\r
-        String = None  \r
-    \r
+        String = None\r
+\r
     #\r
     # Strip ' ' and '#' from the beginning of HelpText\r
-    # If HelpText is an empty string after all parsing is \r
+    # If HelpText is an empty string after all parsing is\r
     # complete then set HelpText to None\r
-    #  \r
+    #\r
     HelpText = HelpText.lstrip('# ')\r
     if HelpText == '':\r
         HelpText = None\r
-      \r
+\r
     #\r
     # Return parsing results\r
-    #  \r
-    return Usage, Type, String, HelpText  \r
+    #\r
+    return Usage, Type, String, HelpText\r
index c151be3bc4d9ae12e7a22eeb66db614ae111bd2f..97ca835882f34239aa877a324a2c8dd0bf23c37f 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file is used to define class for data type structure\r
 #\r
-# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -64,13 +64,13 @@ USAGE_ITEM_UNDEFINED          = 'UNDEFINED'
 USAGE_CONSUMES_LIST = [USAGE_ITEM_CONSUMES,\r
                        'CONSUMED',\r
                        'ALWAYS_CONSUMED',\r
-                       'ALWAYS_CONSUMES'                     \r
+                       'ALWAYS_CONSUMES'\r
                        ]\r
 \r
 USAGE_PRODUCES_LIST = [USAGE_ITEM_PRODUCES,\r
                        'PRODUCED',\r
                        'ALWAYS_PRODUCED',\r
-                       'ALWAYS_PRODUCES'                     \r
+                       'ALWAYS_PRODUCES'\r
                        ]\r
 \r
 USAGE_SOMETIMES_PRODUCES_LIST = [USAGE_ITEM_SOMETIMES_PRODUCES,\r
@@ -94,7 +94,7 @@ TAB_STR_TOKENERR = 'ERR'
 \r
 #\r
 # Dictionary of usage tokens and their synonmys\r
-#  \r
+#\r
 ALL_USAGE_TOKENS = {\r
   "PRODUCES"           : "PRODUCES",\r
   "PRODUCED"           : "PRODUCES",\r
@@ -109,20 +109,20 @@ ALL_USAGE_TOKENS = {
   "SOMETIMES_CONSUMES" : "SOMETIMES_CONSUMES",\r
   "SOMETIMES_CONSUMED" : "SOMETIMES_CONSUMES",\r
   "SOMETIME_CONSUMES"  : "SOMETIMES_CONSUMES",\r
-  "UNDEFINED"          : "UNDEFINED" \r
+  "UNDEFINED"          : "UNDEFINED"\r
   }\r
 \r
 PROTOCOL_USAGE_TOKENS = {\r
   "TO_START"           : "TO_START",\r
   "BY_START"           : "BY_START"\r
   }\r
\r
+\r
 PROTOCOL_USAGE_TOKENS.update (ALL_USAGE_TOKENS)\r
-  \r
+\r
 #\r
 # Dictionary of GUID type tokens\r
-#  \r
-GUID_TYPE_TOKENS = {  \r
+#\r
+GUID_TYPE_TOKENS = {\r
   "Event"          : "Event",\r
   "File"           : "File",\r
   "FV"             : "FV",\r
@@ -134,31 +134,31 @@ GUID_TYPE_TOKENS = {
   "Hob:"           : "HOB",\r
   "SystemTable"    : "SystemTable",\r
   "TokenSpaceGuid" : "TokenSpaceGuid",\r
-  "UNDEFINED"      : "UNDEFINED" \r
+  "UNDEFINED"      : "UNDEFINED"\r
   }\r
-  \r
+\r
 #\r
 # Dictionary of Protocol Notify tokens and their synonyms\r
-#  \r
-PROTOCOL_NOTIFY_TOKENS = {  \r
+#\r
+PROTOCOL_NOTIFY_TOKENS = {\r
   "NOTIFY"          : "NOTIFY",\r
   "PROTOCOL_NOTIFY" : "NOTIFY",\r
-  "UNDEFINED"       : "UNDEFINED" \r
+  "UNDEFINED"       : "UNDEFINED"\r
   }\r
 \r
 #\r
 # Dictionary of PPI Notify tokens and their synonyms\r
-#  \r
-PPI_NOTIFY_TOKENS = {  \r
+#\r
+PPI_NOTIFY_TOKENS = {\r
   "NOTIFY"     : "NOTIFY",\r
   "PPI_NOTIFY" : "NOTIFY",\r
-  "UNDEFINED"  : "UNDEFINED" \r
+  "UNDEFINED"  : "UNDEFINED"\r
   }\r
 \r
 EVENT_TOKENS = {\r
   "EVENT_TYPE_PERIODIC_TIMER" : "EVENT_TYPE_PERIODIC_TIMER",\r
   "EVENT_TYPE_RELATIVE_TIMER" : "EVENT_TYPE_RELATIVE_TIMER",\r
-  "UNDEFINED"                 : "UNDEFINED" \r
+  "UNDEFINED"                 : "UNDEFINED"\r
   }\r
 \r
 BOOTMODE_TOKENS = {\r
@@ -182,16 +182,16 @@ BOOTMODE_TOKENS = {
   "RECOVERY_S4_RESUME"    : "RECOVERY_S4_RESUME",\r
   "RECOVERY_S5_RESUME"    : "RECOVERY_S5_RESUME",\r
   "RECOVERY_FLASH_UPDATE" : "RECOVERY_FLASH_UPDATE",\r
-  "UNDEFINED"             : "UNDEFINED" \r
+  "UNDEFINED"             : "UNDEFINED"\r
   }\r
 \r
-HOB_TOKENS = {  \r
+HOB_TOKENS = {\r
   "PHIT"                : "PHIT",\r
   "MEMORY_ALLOCATION"   : "MEMORY_ALLOCATION",\r
   "LOAD_PEIM"           : "LOAD_PEIM",\r
   "RESOURCE_DESCRIPTOR" : "RESOURCE_DESCRIPTOR",\r
   "FIRMWARE_VOLUME"     : "FIRMWARE_VOLUME",\r
-  "UNDEFINED"           : "UNDEFINED" \r
+  "UNDEFINED"           : "UNDEFINED"\r
   }\r
 \r
 ##\r
@@ -223,22 +223,22 @@ PCD_DIRVER_TYPE_LIST = ["PEI_PCD_DRIVER", "DXE_PCD_DRIVER"]
 #\r
 BOOT_MODE_LIST = ["FULL",\r
                   "MINIMAL",\r
-                  "NO_CHANGE", \r
-                  "DIAGNOSTICS", \r
-                  "DEFAULT", \r
+                  "NO_CHANGE",\r
+                  "DIAGNOSTICS",\r
+                  "DEFAULT",\r
                   "S2_RESUME",\r
-                  "S3_RESUME", \r
-                  "S4_RESUME", \r
-                  "S5_RESUME", \r
+                  "S3_RESUME",\r
+                  "S4_RESUME",\r
+                  "S5_RESUME",\r
                   "FLASH_UPDATE",\r
-                  "RECOVERY_FULL", \r
-                  "RECOVERY_MINIMAL", \r
+                  "RECOVERY_FULL",\r
+                  "RECOVERY_MINIMAL",\r
                   "RECOVERY_NO_CHANGE",\r
-                  "RECOVERY_DIAGNOSTICS", \r
+                  "RECOVERY_DIAGNOSTICS",\r
                   "RECOVERY_DEFAULT",\r
-                  "RECOVERY_S2_RESUME", \r
+                  "RECOVERY_S2_RESUME",\r
                   "RECOVERY_S3_RESUME",\r
-                  "RECOVERY_S4_RESUME", \r
+                  "RECOVERY_S4_RESUME",\r
                   "RECOVERY_S5_RESUME",\r
                   "RECOVERY_FLASH_UPDATE"]\r
 \r
@@ -251,9 +251,9 @@ EVENT_TYPE_LIST = ["EVENT_TYPE_PERIODIC_TIMER",
 ##\r
 # Hob Type List Items\r
 #\r
-HOB_TYPE_LIST = ["PHIT", \r
+HOB_TYPE_LIST = ["PHIT",\r
                  "MEMORY_ALLOCATION",\r
-                 "RESOURCE_DESCRIPTOR", \r
+                 "RESOURCE_DESCRIPTOR",\r
                  "FIRMWARE_VOLUME",\r
                  "LOAD_PEIM"]\r
 \r
@@ -290,19 +290,19 @@ BINARY_FILE_TYPE_LIST = ["PE32", "PIC", "TE", "DXE_DEPEX", "VER", "UI", "COMPAT1
 BINARY_FILE_TYPE_LIST_IN_UDP = \\r
                         ["GUID", "FREEFORM",\r
                          "UEFI_IMAGE", "PE32", "PIC",\r
-                         "PEI_DEPEX", \r
+                         "PEI_DEPEX",\r
                          "DXE_DEPEX",\r
                          "SMM_DEPEX",\r
                          "FV", "TE",\r
-                         "BIN", "VER", "UI"                      \r
+                         "BIN", "VER", "UI"\r
                          ]\r
 \r
 SUBTYPE_GUID_BINARY_FILE_TYPE = "FREEFORM"\r
 ##\r
-# Possible values for COMPONENT_TYPE, and their descriptions, are listed in \r
-# the table, \r
-# "Component (module) Types." For each component, the BASE_NAME and \r
-# COMPONENT_TYPE \r
+# Possible values for COMPONENT_TYPE, and their descriptions, are listed in\r
+# the table,\r
+# "Component (module) Types." For each component, the BASE_NAME and\r
+# COMPONENT_TYPE\r
 # are required. The COMPONENT_TYPE definition is case sensitive.\r
 #\r
 COMPONENT_TYPE_LIST = [\r
@@ -436,7 +436,7 @@ BINARY_FILE_TYPE_FV = 'FV'
 BINARY_FILE_TYPE_UI_LIST = [BINARY_FILE_TYPE_UNI_UI,\r
                             BINARY_FILE_TYPE_SEC_UI,\r
                             BINARY_FILE_TYPE_UI\r
-                            ] \r
+                            ]\r
 BINARY_FILE_TYPE_VER_LIST = [BINARY_FILE_TYPE_UNI_VER,\r
                             BINARY_FILE_TYPE_SEC_VER,\r
                             BINARY_FILE_TYPE_VER\r
@@ -712,7 +712,7 @@ TAB_INF_DEFINES_FV_EXT = 'FV_EXT'
 TAB_INF_DEFINES_SOURCE_FV = 'SOURCE_FV'\r
 TAB_INF_DEFINES_PACKAGE   = 'PACKAGE'\r
 TAB_INF_DEFINES_VERSION_NUMBER = 'VERSION_NUMBER'\r
-TAB_INF_DEFINES_VERSION = 'VERSION'         \r
+TAB_INF_DEFINES_VERSION = 'VERSION'\r
 TAB_INF_DEFINES_VERSION_STRING = 'VERSION_STRING'\r
 TAB_INF_DEFINES_PCD_IS_DRIVER = 'PCD_IS_DRIVER'\r
 TAB_INF_DEFINES_TIANO_EDK1_FLASHMAP_H = 'TIANO_EDK1_FLASHMAP_H'\r
@@ -720,9 +720,9 @@ TAB_INF_DEFINES_ENTRY_POINT = 'ENTRY_POINT'
 TAB_INF_DEFINES_UNLOAD_IMAGE = 'UNLOAD_IMAGE'\r
 TAB_INF_DEFINES_CONSTRUCTOR = 'CONSTRUCTOR'\r
 TAB_INF_DEFINES_DESTRUCTOR = 'DESTRUCTOR'\r
-TAB_INF_DEFINES_PCI_VENDOR_ID  = 'PCI_VENDOR_ID'    \r
-TAB_INF_DEFINES_PCI_DEVICE_ID  = 'PCI_DEVICE_ID'    \r
-TAB_INF_DEFINES_PCI_CLASS_CODE = 'PCI_CLASS_CODE'   \r
+TAB_INF_DEFINES_PCI_VENDOR_ID  = 'PCI_VENDOR_ID'\r
+TAB_INF_DEFINES_PCI_DEVICE_ID  = 'PCI_DEVICE_ID'\r
+TAB_INF_DEFINES_PCI_CLASS_CODE = 'PCI_CLASS_CODE'\r
 TAB_INF_DEFINES_PCI_REVISION   = 'PCI_REVISION'\r
 TAB_INF_DEFINES_PCI_COMPRESS   = 'PCI_COMPRESS'\r
 TAB_INF_DEFINES_DEFINE = 'DEFINE'\r
@@ -819,12 +819,12 @@ TAB_IF_EXIST = '!if exist'
 TAB_UNKNOWN = 'UNKNOWN'\r
 \r
 #\r
-# Header section (virtual section for abstract, description, copyright, \r
+# Header section (virtual section for abstract, description, copyright,\r
 # license)\r
 #\r
 TAB_HEADER = 'Header'\r
 TAB_HEADER_ABSTRACT = 'Abstract'\r
-TAB_HEADER_DESCRIPTION = 'Description' \r
+TAB_HEADER_DESCRIPTION = 'Description'\r
 TAB_HEADER_COPYRIGHT = 'Copyright'\r
 TAB_HEADER_LICENSE = 'License'\r
 TAB_BINARY_HEADER_IDENTIFIER = 'BinaryHeader'\r
@@ -833,7 +833,7 @@ TAB_BINARY_HEADER_USERID = 'TianoCore'
 #\r
 # Build database path\r
 #\r
-DATABASE_PATH = ":memory:" \r
+DATABASE_PATH = ":memory:"\r
 #\r
 # used by ECC\r
 #\r
@@ -855,7 +855,7 @@ TAB_DEPENDENCY_EXPRESSION_FILE = "DEPENDENCY-EXPRESSION-FILE"
 TAB_UNKNOWN_FILE = "UNKNOWN-TYPE-FILE"\r
 TAB_DEFAULT_BINARY_FILE = "_BINARY_FILE_"\r
 #\r
-# used to indicate the state of processing header comment section of dec, \r
+# used to indicate the state of processing header comment section of dec,\r
 # inf files\r
 #\r
 HEADER_COMMENT_NOT_STARTED = -1\r
@@ -953,6 +953,6 @@ TOOL_FAMILY_LIST = ["MSFT",
 \r
 TYPE_HOB_SECTION = 'HOB'\r
 TYPE_EVENT_SECTION = 'EVENT'\r
-TYPE_BOOTMODE_SECTION = 'BOOTMODE' \r
+TYPE_BOOTMODE_SECTION = 'BOOTMODE'\r
 \r
 PCD_ERR_CODE_MAX_SIZE = 4294967295\r
index afa5b2407ec55eae2ca77ae3bd6343eb04f296db..2e0253ab51016a962275c68b05f776f5375b9bb3 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file is used to check PCD logical expression\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -47,7 +47,7 @@ def IsValidBareCString(String):
                 and (IntChar < 0x23 or IntChar > 0x7e):\r
                 return False\r
         PreChar = Char\r
-    \r
+\r
     # Last char cannot be \ if PreChar is not \\r
     if LastChar == '\\' and PreChar == LastChar:\r
         return False\r
@@ -83,7 +83,7 @@ class _ExprBase:
         self.Token = Token\r
         self.Index = 0\r
         self.Len = len(Token)\r
-    \r
+\r
     ## SkipWhitespace\r
     #\r
     def SkipWhitespace(self):\r
@@ -91,14 +91,14 @@ class _ExprBase:
             if Char not in ' \t':\r
                 break\r
             self.Index += 1\r
-    \r
+\r
     ## IsCurrentOp\r
     #\r
-    # @param      OpList:   option list \r
-    #    \r
+    # @param      OpList:   option list\r
+    #\r
     def IsCurrentOp(self, OpList):\r
         self.SkipWhitespace()\r
-        LetterOp = ["EQ", "NE", "GE", "LE", "GT", "LT", "NOT", "and", "AND", \r
+        LetterOp = ["EQ", "NE", "GE", "LE", "GT", "LT", "NOT", "and", "AND",\r
                     "or", "OR", "XOR"]\r
         OpMap = {\r
             '|' : '|',\r
@@ -107,11 +107,11 @@ class _ExprBase:
             '>' : '=',\r
             '<' : '='\r
         }\r
-        \r
+\r
         for Operator in OpList:\r
             if not self.Token[self.Index:].startswith(Operator):\r
                 continue\r
-            \r
+\r
             self.Index += len(Operator)\r
             Char = self.Token[self.Index : self.Index + 1]\r
 \r
@@ -119,36 +119,36 @@ class _ExprBase:
                 or (Operator in OpMap and OpMap[Operator] == Char):\r
                 self.Index -= len(Operator)\r
                 break\r
-            \r
+\r
             return True\r
-        \r
+\r
         return False\r
 \r
 ## _LogicalExpressionParser\r
 #\r
 # @param      _ExprBase:   _ExprBase object\r
-#    \r
+#\r
 class _LogicalExpressionParser(_ExprBase):\r
     #\r
     # STRINGITEM can only be logical field according to spec\r
     #\r
     STRINGITEM = -1\r
-    \r
+\r
     #\r
     # Evaluate to True or False\r
     #\r
     LOGICAL = 0\r
     REALLOGICAL = 2\r
-    \r
+\r
     #\r
     # Just arithmetic expression\r
     #\r
     ARITH = 1\r
-    \r
+\r
     def __init__(self, Token):\r
         _ExprBase.__init__(self, Token)\r
         self.Parens = 0\r
-    \r
+\r
     def _CheckToken(self, MatchList):\r
         for Match in MatchList:\r
             if Match and Match.start() == 0:\r
@@ -156,7 +156,7 @@ class _LogicalExpressionParser(_ExprBase):
                             self.Token[self.Index:self.Index+Match.end()]\r
                         ):\r
                     return False\r
-                \r
+\r
                 self.Index += Match.end()\r
                 if self.Token[self.Index - 1] == '"':\r
                     return True\r
@@ -164,61 +164,61 @@ class _LogicalExpressionParser(_ExprBase):
                     self.Token[self.Index:self.Index+1].isalnum():\r
                     self.Index -= Match.end()\r
                     return False\r
-                \r
+\r
                 Token = self.Token[self.Index - Match.end():self.Index]\r
                 if Token.strip() in ["EQ", "NE", "GE", "LE", "GT", "LT",\r
                     "NOT", "and", "AND", "or", "OR", "XOR"]:\r
                     self.Index -= Match.end()\r
                     return False\r
-                \r
+\r
                 return True\r
-        \r
+\r
         return False\r
-    \r
+\r
     def IsAtomicNumVal(self):\r
         #\r
         # Hex number\r
         #\r
         Match1 = re.compile(self.HEX_PATTERN).match(self.Token[self.Index:])\r
-        \r
+\r
         #\r
         # Number\r
         #\r
         Match2 = re.compile(self.INT_PATTERN).match(self.Token[self.Index:])\r
-        \r
+\r
         #\r
         # Macro\r
         #\r
         Match3 = re.compile(self.MACRO_PATTERN).match(self.Token[self.Index:])\r
-        \r
+\r
         #\r
         # PcdName\r
         #\r
         Match4 = re.compile(self.PCD_PATTERN).match(self.Token[self.Index:])\r
-        \r
+\r
         return self._CheckToken([Match1, Match2, Match3, Match4])\r
-    \r
+\r
 \r
     def IsAtomicItem(self):\r
         #\r
         # Macro\r
         #\r
         Match1 = re.compile(self.MACRO_PATTERN).match(self.Token[self.Index:])\r
-        \r
+\r
         #\r
         # PcdName\r
         #\r
         Match2 = re.compile(self.PCD_PATTERN).match(self.Token[self.Index:])\r
-        \r
+\r
         #\r
         # Quoted string\r
         #\r
         Match3 = re.compile(self.QUOTED_PATTERN).\\r
             match(self.Token[self.Index:].replace('\\\\', '//').\\r
                   replace('\\\"', '\\\''))\r
-        \r
+\r
         return self._CheckToken([Match1, Match2, Match3])\r
-    \r
+\r
     ## A || B\r
     #\r
     def LogicalExpression(self):\r
@@ -233,12 +233,12 @@ class _LogicalExpressionParser(_ExprBase):
                 raise _ExprError(ST.ERR_EXPR_LOGICAL % self.Token)\r
             Ret = self.REALLOGICAL\r
         return Ret\r
-    \r
+\r
     def SpecNot(self):\r
         if self.IsCurrentOp(["NOT", "!", "not"]):\r
             return self.SpecNot()\r
         return self.Rel()\r
-    \r
+\r
     ## A < B, A > B, A <= B, A >= B\r
     #\r
     def Rel(self):\r
@@ -252,7 +252,7 @@ class _LogicalExpressionParser(_ExprBase):
                 raise _ExprError(ST.ERR_EXPR_LOGICAL % self.Token)\r
             Ret = self.REALLOGICAL\r
         return Ret\r
-    \r
+\r
     ## A + B, A - B\r
     #\r
     def Expr(self):\r
@@ -269,7 +269,7 @@ class _LogicalExpressionParser(_ExprBase):
         return Ret\r
 \r
     ## Factor\r
-    #    \r
+    #\r
     def Factor(self):\r
         if self.IsCurrentOp(["("]):\r
             self.Parens += 1\r
@@ -279,7 +279,7 @@ class _LogicalExpressionParser(_ExprBase):
                                  (self.Token, self.Token[self.Index:]))\r
             self.Parens -= 1\r
             return Ret\r
-        \r
+\r
         if self.IsAtomicItem():\r
             if self.Token[self.Index - 1] == '"':\r
                 return self.STRINGITEM\r
@@ -289,7 +289,7 @@ class _LogicalExpressionParser(_ExprBase):
         else:\r
             raise _ExprError(ST.ERR_EXPR_FACTOR % \\r
                              (self.Token[self.Index:], self.Token))\r
-            \r
+\r
     ## IsValidLogicalExpression\r
     #\r
     def IsValidLogicalExpression(self):\r
@@ -319,7 +319,7 @@ class _ValidRangeExpressionParser(_ExprBase):
         self.INT = 2\r
         self.IsParenHappen = False\r
         self.IsLogicalOpHappen = False\r
-    \r
+\r
     ## IsValidRangeExpression\r
     #\r
     def IsValidRangeExpression(self):\r
@@ -330,12 +330,12 @@ class _ValidRangeExpressionParser(_ExprBase):
                 return False, ST.ERR_EXPR_RANGE % self.Token\r
         except _ExprError as XExcept:\r
             return False, XExcept.Error\r
-        \r
+\r
         self.SkipWhitespace()\r
         if self.Index != self.Len:\r
             return False, (ST.ERR_EXPR_RANGE % self.Token)\r
         return True, ''\r
-    \r
+\r
     ## RangeExpression\r
     #\r
     def RangeExpression(self):\r
@@ -346,22 +346,22 @@ class _ValidRangeExpressionParser(_ExprBase):
                 raise _ExprError(ST.ERR_PAREN_NOT_USED % self.Token)\r
             self.IsParenHappen = False\r
             Ret = self.Unary()\r
-        \r
+\r
         if self.IsCurrentOp(['XOR']):\r
             Ret = self.Unary()\r
-        \r
+\r
         return Ret\r
-    \r
+\r
     ## Unary\r
     #\r
     def Unary(self):\r
         if self.IsCurrentOp(["NOT"]):\r
             return self.Unary()\r
-        \r
+\r
         return self.ValidRange()\r
-    \r
+\r
     ## ValidRange\r
-    #    \r
+    #\r
     def ValidRange(self):\r
         Ret = -1\r
         if self.IsCurrentOp(["("]):\r
@@ -375,10 +375,10 @@ class _ValidRangeExpressionParser(_ExprBase):
                 raise _ExprError(ST.ERR_EXPR_RIGHT_PAREN % self.Token)\r
             self.Parens -= 1\r
             return Ret\r
-        \r
+\r
         if self.IsLogicalOpHappen:\r
             raise _ExprError(ST.ERR_PAREN_NOT_USED % self.Token)\r
-        \r
+\r
         if self.IsCurrentOp(["LT", "GT", "LE", "GE", "EQ", "XOR"]):\r
             IntMatch = \\r
                 re.compile(self.INT_PATTERN).match(self.Token[self.Index:])\r
@@ -417,7 +417,7 @@ class _ValidListExpressionParser(_ExprBase):
     def __init__(self, Token):\r
         _ExprBase.__init__(self, Token)\r
         self.NUM = 1\r
-        \r
+\r
     def IsValidListExpression(self):\r
         if self.Len == 0:\r
             return False, ST.ERR_EXPR_LIST_EMPTY\r
@@ -432,7 +432,7 @@ class _ValidListExpressionParser(_ExprBase):
             return False, (ST.ERR_EXPR_LIST % self.Token)\r
 \r
         return True, ''\r
-        \r
+\r
     def ListExpression(self):\r
         Ret = -1\r
         self.SkipWhitespace()\r
@@ -444,7 +444,7 @@ class _ValidListExpressionParser(_ExprBase):
             raise _ExprError(ST.ERR_EXPR_LIST % self.Token)\r
 \r
         return Ret\r
-    \r
+\r
 ## _StringTestParser\r
 #\r
 class _StringTestParser(_ExprBase):\r
@@ -452,7 +452,7 @@ class _StringTestParser(_ExprBase):
         _ExprBase.__init__(self, Token)\r
 \r
     ## IsValidStringTest\r
-    #        \r
+    #\r
     def IsValidStringTest(self):\r
         if self.Len == 0:\r
             return False, ST.ERR_EXPR_EMPTY\r
@@ -463,7 +463,7 @@ class _StringTestParser(_ExprBase):
         return True, ''\r
 \r
     ## StringItem\r
-    #        \r
+    #\r
     def StringItem(self):\r
         Match1 = re.compile(self.QUOTED_PATTERN)\\r
             .match(self.Token[self.Index:].replace('\\\\', '//')\\r
@@ -489,7 +489,7 @@ class _StringTestParser(_ExprBase):
                              (self.Token, self.Token[self.Index:]))\r
 \r
     ## StringTest\r
-    #        \r
+    #\r
     def StringTest(self):\r
         self.StringItem()\r
         if not self.IsCurrentOp(["==", "EQ", "!=", "NE"]):\r
@@ -538,7 +538,7 @@ def IsValidRangeExpr(Token):
 ##\r
 # Check syntax of value list expression token\r
 #\r
-# @param Token: value list expression token \r
+# @param Token: value list expression token\r
 #\r
 def IsValidListExpr(Token):\r
     return _ValidListExpressionParser(Token).IsValidListExpression()\r
@@ -562,7 +562,7 @@ def IsValidFeatureFlagExp(Token, Flag=False):
         if not Valid:\r
             Valid, Cause = IsValidLogicalExpr(Token, Flag)\r
         if not Valid:\r
-            return False, Cause   \r
+            return False, Cause\r
         return True, ""\r
 \r
 if __name__ == '__main__':\r
@@ -570,4 +570,4 @@ if __name__ == '__main__':
     print(_LogicalExpressionParser('gCrownBayTokenSpaceGuid.PcdPciDevice1BridgeAddressLE0').IsValidLogicalExpression())\r
 \r
 \r
-    \r
+\r
index 1ae2417c2fbe3dabc3c1d4a90ff77e1ea9490d95..40b17cf083f15675145999909d2e58c7a4a61fc5 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file is used to define common static strings and global data used by UPT\r
 #\r
-# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -16,7 +16,7 @@ GlobalData
 '''\r
 \r
 #\r
-# The workspace directory \r
+# The workspace directory\r
 #\r
 gWORKSPACE = '.'\r
 gPACKAGE_PATH = None\r
index 28471d81238aeb283e4cea9a8a569e73d43e2966..8c2a6787f0c16ef25cc13235e36e172c1b7b5cb7 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -52,7 +52,7 @@ from Object.POM.CommonObject import TextObject
 from Core.FileHook import __FileHookOpen__\r
 from Common.MultipleWorkspace import MultipleWorkspace as mws\r
 \r
-## Convert GUID string in xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx style to C \r
+## Convert GUID string in xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx style to C\r
 # structure style\r
 #\r
 # @param      Guid:    The GUID string\r
@@ -87,7 +87,7 @@ def CheckGuidRegFormat(GuidValue):
         return False\r
 \r
 \r
-## Convert GUID string in C structure style to \r
+## Convert GUID string in C structure style to\r
 # xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\r
 #\r
 # @param      GuidValue:   The GUID value in C structure format\r
@@ -151,12 +151,12 @@ def RemoveDirectory(Directory, Recursively=False):
 ## Store content in file\r
 #\r
 # This method is used to save file only when its content is changed. This is\r
-# quite useful for "make" system to decide what will be re-built and what \r
+# quite useful for "make" system to decide what will be re-built and what\r
 # won't.\r
 #\r
 # @param      File:            The path of file\r
 # @param      Content:         The new content of the file\r
-# @param      IsBinaryFile:    The flag indicating if the file is binary file \r
+# @param      IsBinaryFile:    The flag indicating if the file is binary file\r
 #                              or not\r
 #\r
 def SaveFileOnChange(File, Content, IsBinaryFile=True):\r
@@ -216,7 +216,7 @@ def GetFiles(Root, SkipList=None, FullPath=True):
 # @param FullPath:  True if the returned file should be full path\r
 # @param PrefixPath: the path that need to be added to the files found\r
 # @return: the list of files found\r
-#  \r
+#\r
 def GetNonMetaDataFiles(Root, SkipList, FullPath, PrefixPath):\r
     FileList = GetFiles(Root, SkipList, FullPath)\r
     NewFileList = []\r
@@ -602,25 +602,25 @@ def GetWorkspace():
 ## Get relative path\r
 #\r
 #  use full path and workspace to get relative path\r
-#  the destination of this function is mainly to resolve the root path issue(like c: or c:\)  \r
+#  the destination of this function is mainly to resolve the root path issue(like c: or c:\)\r
 #\r
 #  @param Fullpath: a string of fullpath\r
 #  @param Workspace: a string of workspace\r
 #\r
 def GetRelativePath(Fullpath, Workspace):\r
-    \r
+\r
     RelativePath = ''\r
     if Workspace.endswith(os.sep):\r
         RelativePath = Fullpath[Fullpath.upper().find(Workspace.upper())+len(Workspace):]\r
     else:\r
         RelativePath = Fullpath[Fullpath.upper().find(Workspace.upper())+len(Workspace)+1:]\r
-        \r
+\r
     return RelativePath\r
-    \r
+\r
 ## Check whether all module types are in list\r
 #\r
 # check whether all module types (SUP_MODULE_LIST) are in list\r
-#  \r
+#\r
 # @param ModuleList:  a list of ModuleType\r
 #\r
 def IsAllModuleList(ModuleList):\r
@@ -632,9 +632,9 @@ def IsAllModuleList(ModuleList):
         return True\r
 \r
 ## Dictionary that use comment(GenericComment, TailComment) as value,\r
-# if a new comment which key already in the dic is inserted, then the \r
+# if a new comment which key already in the dic is inserted, then the\r
 # comment will be merged.\r
-# Key is (Statement, SupArch), when TailComment is added, it will ident \r
+# Key is (Statement, SupArch), when TailComment is added, it will ident\r
 # according to Statement\r
 #\r
 class MergeCommentDict(dict):\r
@@ -671,7 +671,7 @@ def GenDummyHelpTextObj():
 # <Major>               ::=  (a-fA-F0-9){4}\r
 # <Minor>               ::=  (a-fA-F0-9){4}\r
 # <DecVersion>          ::=  (0-65535) ["." (0-99)]\r
-# \r
+#\r
 # @param StringIn:  The string contains version defined in INF file.\r
 #                   It can be Decimal or Hex\r
 #\r
@@ -764,7 +764,7 @@ def ConvertPath(Path):
 \r
 ## ConvertSpec\r
 #\r
-# during install, convert the Spec string extract from UPD into INF allowable definition, \r
+# during install, convert the Spec string extract from UPD into INF allowable definition,\r
 # the difference is period is allowed in the former (not the first letter) but not in the latter.\r
 # return converted Spec string\r
 #\r
@@ -787,7 +787,7 @@ def ConvertSpec(SpecStr):
 # The rule is elements in List A are in List B and elements in List B are in List A.\r
 #\r
 # @param ListA, ListB  Lists need to be judged.\r
-# \r
+#\r
 # @return True  ListA and ListB are identical\r
 # @return False ListA and ListB are different with each other\r
 #\r
@@ -808,10 +808,10 @@ def IsEqualList(ListA, ListB):
 ## ConvertArchList\r
 #\r
 # Convert item in ArchList if the start character is lower case.\r
-# In UDP spec, Arch is only allowed as: [A-Z]([a-zA-Z0-9])* \r
+# In UDP spec, Arch is only allowed as: [A-Z]([a-zA-Z0-9])*\r
 #\r
 # @param ArchList The ArchList need to be converted.\r
-# \r
+#\r
 # @return NewList  The ArchList been converted.\r
 #\r
 def ConvertArchList(ArchList):\r
@@ -835,7 +835,7 @@ def ConvertArchList(ArchList):
 # If one line ends with a line extender, then it will be combined together with next line.\r
 #\r
 # @param LineList The LineList need to be processed.\r
-# \r
+#\r
 # @return NewList  The ArchList been processed.\r
 #\r
 def ProcessLineExtender(LineList):\r
@@ -854,11 +854,11 @@ def ProcessLineExtender(LineList):
 \r
 ## ProcessEdkComment\r
 #\r
-# Process EDK style comment in LineList: c style /* */ comment or cpp style // comment \r
+# Process EDK style comment in LineList: c style /* */ comment or cpp style // comment\r
 #\r
 #\r
 # @param LineList The LineList need to be processed.\r
-# \r
+#\r
 # @return LineList  The LineList been processed.\r
 # @return FirstPos  Where Edk comment is first found, -1 if not found\r
 #\r
@@ -868,7 +868,7 @@ def ProcessEdkComment(LineList):
     StartPos = -1\r
     EndPos = -1\r
     FirstPos = -1\r
-    \r
+\r
     while(Count < len(LineList)):\r
         Line = LineList[Count].strip()\r
         if Line.startswith("/*"):\r
@@ -886,7 +886,7 @@ def ProcessEdkComment(LineList):
                     FindEdkBlockComment = True\r
                     break\r
                 Count = Count + 1\r
-            \r
+\r
             if FindEdkBlockComment:\r
                 if FirstPos == -1:\r
                     FirstPos = StartPos\r
@@ -900,9 +900,9 @@ def ProcessEdkComment(LineList):
             LineList[Count] = Line.replace("//", '#')\r
             if FirstPos == -1:\r
                 FirstPos = Count\r
-        \r
+\r
         Count = Count + 1\r
-    \r
+\r
     return LineList, FirstPos\r
 \r
 ## GetLibInstanceInfo\r
@@ -994,13 +994,13 @@ def GetLibInstanceInfo(String, WorkSpace, LineNo):
 ## GetLocalValue\r
 #\r
 # Generate the local value for INF and DEC file. If Lang attribute not present, then use this value.\r
-# If present, and there is no element without the Lang attribute, and one of the elements has the rfc1766 code is \r
-# "en-x-tianocore", or "en-US" if "en-x-tianocore" was not found, or "en" if "en-US" was not found, or startswith 'en' \r
+# If present, and there is no element without the Lang attribute, and one of the elements has the rfc1766 code is\r
+# "en-x-tianocore", or "en-US" if "en-x-tianocore" was not found, or "en" if "en-US" was not found, or startswith 'en'\r
 # if 'en' was not found, then use this value.\r
 # If multiple entries of a tag exist which have the same language code, use the last entry.\r
 #\r
 # @param ValueList  A list need to be processed.\r
-# @param UseFirstValue: True to use the first value, False to use the last value \r
+# @param UseFirstValue: True to use the first value, False to use the last value\r
 #\r
 # @return LocalValue\r
 def GetLocalValue(ValueList, UseFirstValue=False):\r
@@ -1040,7 +1040,7 @@ def GetLocalValue(ValueList, UseFirstValue=False):
                     Value5 = Value\r
             else:\r
                 Value5 = Value\r
-            \r
+\r
     if Value1:\r
         return Value1\r
     if Value2:\r
@@ -1051,7 +1051,7 @@ def GetLocalValue(ValueList, UseFirstValue=False):
         return Value4\r
     if Value5:\r
         return Value5\r
-    \r
+\r
     return ''\r
 \r
 \r
@@ -1088,29 +1088,29 @@ def GetCharIndexOutStr(CommentCharacter, Line):
 #\r
 # Check the UNI file path\r
 #\r
-# @param FilePath: The UNI file path \r
+# @param FilePath: The UNI file path\r
 #\r
 def ValidateUNIFilePath(Path):\r
     Suffix = Path[Path.rfind(TAB_SPLIT):]\r
-    \r
+\r
     #\r
-    # Check if the suffix is one of the '.uni', '.UNI', '.Uni' \r
+    # Check if the suffix is one of the '.uni', '.UNI', '.Uni'\r
     #\r
     if Suffix not in TAB_UNI_FILE_SUFFIXS:\r
-        Logger.Error("Unicode File Parser", \r
-                        ToolError.FORMAT_INVALID, \r
-                        Message=ST.ERR_UNI_FILE_SUFFIX_WRONG, \r
-                        ExtraData=Path)    \r
-    \r
+        Logger.Error("Unicode File Parser",\r
+                        ToolError.FORMAT_INVALID,\r
+                        Message=ST.ERR_UNI_FILE_SUFFIX_WRONG,\r
+                        ExtraData=Path)\r
+\r
     #\r
     # Check if '..' in the file name(without suffixe)\r
     #\r
     if (TAB_SPLIT + TAB_SPLIT) in Path:\r
-        Logger.Error("Unicode File Parser", \r
-                        ToolError.FORMAT_INVALID, \r
-                        Message=ST.ERR_UNI_FILE_NAME_INVALID, \r
-                        ExtraData=Path)    \r
-    \r
+        Logger.Error("Unicode File Parser",\r
+                        ToolError.FORMAT_INVALID,\r
+                        Message=ST.ERR_UNI_FILE_NAME_INVALID,\r
+                        ExtraData=Path)\r
+\r
     #\r
     # Check if the file name is valid according to the DEC and INF specification\r
     #\r
@@ -1118,8 +1118,8 @@ def ValidateUNIFilePath(Path):
     FileName = Path.replace(Suffix, '')\r
     InvalidCh = re.sub(Pattern, '', FileName)\r
     if InvalidCh:\r
-        Logger.Error("Unicode File Parser", \r
-                        ToolError.FORMAT_INVALID, \r
-                        Message=ST.ERR_INF_PARSER_FILE_NOT_EXIST_OR_NAME_INVALID, \r
-                        ExtraData=Path)    \r
+        Logger.Error("Unicode File Parser",\r
+                        ToolError.FORMAT_INVALID,\r
+                        Message=ST.ERR_INF_PARSER_FILE_NOT_EXIST_OR_NAME_INVALID,\r
+                        ExtraData=Path)\r
 \r
index dc93cedd917e604b607b3868b960fe88a4b09931..31b9b68cd57e70dde6fa3cfd3929364057f416b0 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -42,7 +42,7 @@ def __HexDigit(TempChar):
         return True\r
     else:\r
         return False\r
\r
+\r
 ## IsValidHex() method\r
 #\r
 # Whether char input is a Hex data.\r
@@ -59,7 +59,7 @@ def IsValidHex(HexStr):
         return False\r
 \r
 ## Judge the input string is valid bool type or not.\r
-# \r
+#\r
 # <TRUE>                  ::=  {"TRUE"} {"true"} {"True"} {"0x1"} {"0x01"}\r
 # <FALSE>                 ::=  {"FALSE"} {"false"} {"False"} {"0x0"} {"0x00"}\r
 # <BoolType>              ::=  {<TRUE>} {<FALSE>}\r
@@ -90,18 +90,18 @@ def IsValidBoolType(BoolString):
     #\r
     else:\r
         return False\r
-    \r
-## Is Valid Module Type List or not \r
-#    \r
-# @param      ModuleTypeList:  A list contain ModuleType strings need to be \r
+\r
+## Is Valid Module Type List or not\r
+#\r
+# @param      ModuleTypeList:  A list contain ModuleType strings need to be\r
 # judged.\r
 #\r
 def IsValidInfMoudleTypeList(ModuleTypeList):\r
     for ModuleType in ModuleTypeList:\r
         return IsValidInfMoudleType(ModuleType)\r
 \r
-## Is Valid Module Type or not \r
-#    \r
+## Is Valid Module Type or not\r
+#\r
 # @param      ModuleType:  A string contain ModuleType need to be judged.\r
 #\r
 def IsValidInfMoudleType(ModuleType):\r
@@ -110,8 +110,8 @@ def IsValidInfMoudleType(ModuleType):
     else:\r
         return False\r
 \r
-## Is Valid Component Type or not \r
-#    \r
+## Is Valid Component Type or not\r
+#\r
 # @param      ComponentType:  A string contain ComponentType need to be judged.\r
 #\r
 def IsValidInfComponentType(ComponentType):\r
@@ -124,7 +124,7 @@ def IsValidInfComponentType(ComponentType):
 ## Is valid Tool Family or not\r
 #\r
 # @param   ToolFamily:   A string contain Tool Family need to be judged.\r
-# Famlily := [A-Z]([a-zA-Z0-9])* \r
+# Famlily := [A-Z]([a-zA-Z0-9])*\r
 #\r
 def IsValidToolFamily(ToolFamily):\r
     ReIsValieFamily = re.compile(r"^[A-Z]+[A-Za-z0-9]{0,}$", re.DOTALL)\r
@@ -148,13 +148,13 @@ def IsValidToolTagName(TagName):
     return True\r
 \r
 ## Is valid arch or not\r
-# \r
+#\r
 # @param Arch   The arch string need to be validated\r
 # <OA>                  ::=  (a-zA-Z)(A-Za-z0-9){0,}\r
 # <arch>                 ::=  {"IA32"} {"X64"} {"IPF"} {"EBC"} {<OA>}\r
 #                            {"common"}\r
 # @param   Arch:   Input arch\r
-# \r
+#\r
 def IsValidArch(Arch):\r
     if Arch == 'common':\r
         return True\r
@@ -164,55 +164,55 @@ def IsValidArch(Arch):
     return True\r
 \r
 ## Is valid family or not\r
-# \r
+#\r
 # <Family>        ::=  {"MSFT"} {"GCC"} {"INTEL"} {<Usr>} {"*"}\r
 # <Usr>           ::=  [A-Z][A-Za-z0-9]{0,}\r
 #\r
 # @param family:   The family string need to be validated\r
-# \r
+#\r
 def IsValidFamily(Family):\r
     Family = Family.strip()\r
     if Family == '*':\r
         return True\r
-    \r
+\r
     if Family == '':\r
         return True\r
-       \r
+\r
     ReIsValidFamily = re.compile(r"^[A-Z]+[A-Za-z0-9]{0,}$", re.DOTALL)\r
     if ReIsValidFamily.match(Family) is None:\r
         return False\r
     return True\r
 \r
 ## Is valid build option name or not\r
-# \r
+#\r
 # @param BuildOptionName:   The BuildOptionName string need to be validated\r
 #\r
 def IsValidBuildOptionName(BuildOptionName):\r
     if not BuildOptionName:\r
         return False\r
-    \r
+\r
     ToolOptionList = GetSplitValueList(BuildOptionName, '_', 4)\r
-    \r
+\r
     if len(ToolOptionList) != 5:\r
         return False\r
-    \r
+\r
     ReIsValidBuildOption1 = re.compile(r"^\s*(\*)|([A-Z][a-zA-Z0-9]*)$")\r
     ReIsValidBuildOption2 = re.compile(r"^\s*(\*)|([a-zA-Z][a-zA-Z0-9]*)$")\r
-    \r
+\r
     if ReIsValidBuildOption1.match(ToolOptionList[0]) is None:\r
         return False\r
-    \r
+\r
     if ReIsValidBuildOption1.match(ToolOptionList[1]) is None:\r
         return False\r
-    \r
+\r
     if ReIsValidBuildOption2.match(ToolOptionList[2]) is None:\r
         return False\r
-    \r
+\r
     if ToolOptionList[3] == "*" and ToolOptionList[4] not in ['FAMILY', 'DLL', 'DPATH']:\r
         return False\r
-           \r
+\r
     return True\r
-    \r
+\r
 ## IsValidToken\r
 #\r
 # Check if pattern string matches total token\r
@@ -234,14 +234,14 @@ def IsValidToken(ReString, Token):
 def IsValidPath(Path, Root):\r
     Path = Path.strip()\r
     OrigPath = Path.replace('\\', '/')\r
-    \r
+\r
     Path = os.path.normpath(Path).replace('\\', '/')\r
     Root = os.path.normpath(Root).replace('\\', '/')\r
     FullPath = mws.join(Root, Path)\r
-    \r
+\r
     if not os.path.exists(FullPath):\r
         return False\r
-    \r
+\r
     #\r
     # If Path is absolute path.\r
     # It should be in Root.\r
@@ -263,16 +263,16 @@ def IsValidPath(Path, Root):
     for Rel in ['/.', '/..', '/']:\r
         if OrigPath.endswith(Rel):\r
             return False\r
-    \r
+\r
     Path = Path.rstrip('/')\r
-    \r
+\r
     #\r
     # Check relative path\r
     #\r
     for Word in Path.split('/'):\r
         if not IsValidWord(Word):\r
             return False\r
-    \r
+\r
     return True\r
 \r
 ## IsValidInstallPath\r
@@ -294,12 +294,12 @@ def IsValidInstallPath(Path):
             return False\r
     if Path.startswith('.'):\r
         return False\r
-    \r
+\r
     if Path.find('..') != -1:\r
         return False\r
-    \r
+\r
     return True\r
-    \r
+\r
 \r
 ## IsValidCFormatGuid\r
 #\r
@@ -309,14 +309,14 @@ def IsValidInstallPath(Path):
 #\r
 def IsValidCFormatGuid(Guid):\r
     #\r
-    # Valid: { 0xf0b11735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, \r
+    # Valid: { 0xf0b11735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38,\r
     #        0xaf, 0x48, 0xce }}\r
-    # Invalid: { 0xf0b11735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, \r
+    # Invalid: { 0xf0b11735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38,\r
     #          0xaf, 0x48, 0xce }} 0x123\r
-    # Invalid: { 0xf0b1 1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, \r
+    # Invalid: { 0xf0b1 1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38,\r
     #          0xaf, 0x48, 0xce }}\r
     #\r
-    List = ['{', 10, ',', 6, ',', 6, ',{', 4, ',', 4, ',', 4, \r
+    List = ['{', 10, ',', 6, ',', 6, ',{', 4, ',', 4, ',', 4,\r
             ',', 4, ',', 4, ',', 4, ',', 4, ',', 4, '}}']\r
     Index = 0\r
     Value = ''\r
@@ -337,14 +337,14 @@ def IsValidCFormatGuid(Guid):
 \r
                 if not Value.startswith('0x') and not Value.startswith('0X'):\r
                     return False\r
-                \r
+\r
                 #\r
                 # Index may out of bound\r
                 #\r
                 if not isinstance(List[Index], type(1)) or \\r
                    len(Value) > List[Index] or len(Value) < 3:\r
                     return False\r
-                \r
+\r
                 #\r
                 # Check if string can be converted to integer\r
                 # Throw exception if not\r
@@ -367,23 +367,23 @@ def IsValidCFormatGuid(Guid):
 # Check whether the PCD type is valid\r
 #\r
 # @param PcdTypeString: The PcdType string need to be checked.\r
-#    \r
+#\r
 def IsValidPcdType(PcdTypeString):\r
     if PcdTypeString.upper() in PCD_USAGE_TYPE_LIST_OF_MODULE:\r
         return True\r
     else:\r
         return False\r
-    \r
+\r
 ## IsValidWord\r
 #\r
 # Check whether the word is valid.\r
-# <Word>   ::=  (a-zA-Z0-9_)(a-zA-Z0-9_-){0,} Alphanumeric characters with \r
-#               optional \r
-#               dash "-" and/or underscore "_" characters. No whitespace \r
+# <Word>   ::=  (a-zA-Z0-9_)(a-zA-Z0-9_-){0,} Alphanumeric characters with\r
+#               optional\r
+#               dash "-" and/or underscore "_" characters. No whitespace\r
 #               characters are permitted.\r
-#              \r
+#\r
 # @param Word:  The word string need to be checked.\r
-#    \r
+#\r
 def IsValidWord(Word):\r
     if not Word:\r
         return False\r
@@ -394,9 +394,9 @@ def IsValidWord(Word):
        not Word[0] == '_' and \\r
        not Word[0].isdigit():\r
         return False\r
-    \r
+\r
     LastChar = ''\r
-    for Char in Word[1:]:      \r
+    for Char in Word[1:]:\r
         if (not Char.isalpha()) and \\r
            (not Char.isdigit()) and \\r
            Char != '-' and \\r
@@ -406,82 +406,82 @@ def IsValidWord(Word):
         if Char == '.' and LastChar == '.':\r
             return False\r
         LastChar = Char\r
-    \r
+\r
     return True\r
 \r
 \r
 ## IsValidSimpleWord\r
 #\r
 # Check whether the SimpleWord is valid.\r
-# <SimpleWord>          ::=  (a-zA-Z0-9)(a-zA-Z0-9_-){0,} \r
+# <SimpleWord>          ::=  (a-zA-Z0-9)(a-zA-Z0-9_-){0,}\r
 #                       A word that cannot contain a period character.\r
-#              \r
+#\r
 # @param Word:  The word string need to be checked.\r
-#    \r
+#\r
 def IsValidSimpleWord(Word):\r
     ReIsValidSimpleWord = \\r
         re.compile(r"^[0-9A-Za-z][0-9A-Za-z\-_]*$", re.DOTALL)\r
     Word = Word.strip()\r
     if not Word:\r
         return False\r
-    \r
+\r
     if not ReIsValidSimpleWord.match(Word):\r
         return False\r
-      \r
+\r
     return True\r
 \r
 ## IsValidDecVersion\r
 #\r
 # Check whether the decimal version is valid.\r
 # <DecVersion>          ::=  (0-9){1,} ["." (0-9){1,}]\r
-#              \r
+#\r
 # @param Word:  The word string need to be checked.\r
-#  \r
+#\r
 def IsValidDecVersion(Word):\r
     if Word.find('.') > -1:\r
         ReIsValidDecVersion = re.compile(r"[0-9]+\.?[0-9]+$")\r
     else:\r
         ReIsValidDecVersion = re.compile(r"[0-9]+$")\r
     if ReIsValidDecVersion.match(Word) is None:\r
-        return False \r
+        return False\r
     return True\r
-   \r
+\r
 ## IsValidHexVersion\r
 #\r
 # Check whether the hex version is valid.\r
 # <HexVersion>          ::=  "0x" <Major> <Minor>\r
 # <Major>               ::=  <HexDigit>{4}\r
 # <Minor>               ::=  <HexDigit>{4}\r
-#              \r
+#\r
 # @param Word:  The word string need to be checked.\r
-#  \r
+#\r
 def IsValidHexVersion(Word):\r
     ReIsValidHexVersion = re.compile(r"[0][xX][0-9A-Fa-f]{8}$", re.DOTALL)\r
     if ReIsValidHexVersion.match(Word) is None:\r
         return False\r
-    \r
+\r
     return True\r
 \r
 ## IsValidBuildNumber\r
 #\r
 # Check whether the BUILD_NUMBER is valid.\r
 # ["BUILD_NUMBER" "=" <Integer>{1,4} <EOL>]\r
-#              \r
+#\r
 # @param Word:  The BUILD_NUMBER string need to be checked.\r
-#  \r
+#\r
 def IsValidBuildNumber(Word):\r
     ReIsValieBuildNumber = re.compile(r"[0-9]{1,4}$", re.DOTALL)\r
     if ReIsValieBuildNumber.match(Word) is None:\r
         return False\r
-    \r
+\r
     return True\r
 \r
 ## IsValidDepex\r
 #\r
 # Check whether the Depex is valid.\r
-#              \r
+#\r
 # @param Word:  The Depex string need to be checked.\r
-# \r
+#\r
 def IsValidDepex(Word):\r
     Index = Word.upper().find("PUSH")\r
     if Index > -1:\r
@@ -490,12 +490,12 @@ def IsValidDepex(Word):
     ReIsValidCName = re.compile(r"^[A-Za-z_][0-9A-Za-z_\s\.]*$", re.DOTALL)\r
     if ReIsValidCName.match(Word) is None:\r
         return False\r
-    \r
+\r
     return True\r
 \r
 ## IsValidNormalizedString\r
 #\r
-# Check \r
+# Check\r
 # <NormalizedString>    ::=  <DblQuote> [{<Word>} {<Space>}]{1,} <DblQuote>\r
 # <Space>               ::=  0x20\r
 #\r
@@ -504,31 +504,31 @@ def IsValidDepex(Word):
 def IsValidNormalizedString(String):\r
     if String == '':\r
         return True\r
-    \r
+\r
     for Char in String:\r
         if Char == '\t':\r
             return False\r
-    \r
+\r
     StringList = GetSplitValueList(String, TAB_SPACE_SPLIT)\r
-    \r
+\r
     for Item in StringList:\r
         if not Item:\r
             continue\r
         if not IsValidWord(Item):\r
             return False\r
-    \r
+\r
     return True\r
 \r
 ## IsValidIdString\r
 #\r
 # Check whether the IdString is valid.\r
-#              \r
+#\r
 # @param IdString:  The IdString need to be checked.\r
-#     \r
+#\r
 def IsValidIdString(String):\r
     if IsValidSimpleWord(String.strip()):\r
         return True\r
-    \r
+\r
     if String.strip().startswith('"') and \\r
        String.strip().endswith('"'):\r
         String = String[1:-1]\r
@@ -536,7 +536,7 @@ def IsValidIdString(String):
             return True\r
         if IsValidNormalizedString(String):\r
             return True\r
-    \r
+\r
     return False\r
 \r
 ## IsValidVersionString\r
@@ -546,52 +546,52 @@ def IsValidIdString(String):
 # <WhiteSpace>            ::=  {<Tab>} {<Space>}\r
 # <Tab>                   ::=  0x09\r
 # <Space>                 ::=  0x20\r
-# <AsciiChars>            ::=  (0x21 - 0x7E) \r
-#   \r
+# <AsciiChars>            ::=  (0x21 - 0x7E)\r
+#\r
 # @param VersionString:  The VersionString need to be checked.\r
-#     \r
+#\r
 def IsValidVersionString(VersionString):\r
     VersionString = VersionString.strip()\r
     for Char in VersionString:\r
         if not (Char >= 0x21 and Char <= 0x7E):\r
             return False\r
-    \r
+\r
     return True\r
 \r
 ## IsValidPcdValue\r
 #\r
 # Check whether the PcdValue is valid.\r
-#   \r
+#\r
 # @param VersionString:  The PcdValue need to be checked.\r
-#     \r
+#\r
 def IsValidPcdValue(PcdValue):\r
     for Char in PcdValue:\r
         if Char == '\n' or Char == '\t' or Char == '\f':\r
             return False\r
-    \r
+\r
     #\r
     # <Boolean>\r
     #\r
     if IsValidFeatureFlagExp(PcdValue, True)[0]:\r
         return True\r
-    \r
+\r
     #\r
     # <Number>                ::=  {<Integer>} {<HexNumber>}\r
     # <Integer>               ::=  {(0-9)} {(1-9)(0-9){1,}}\r
     # <HexNumber>             ::=  "0x" <HexDigit>{1,}\r
     # <HexDigit>              ::=  (a-fA-F0-9)\r
-    #          \r
+    #\r
     if IsValidHex(PcdValue):\r
         return True\r
-    \r
+\r
     ReIsValidIntegerSingle = re.compile(r"^\s*[0-9]\s*$", re.DOTALL)\r
     if ReIsValidIntegerSingle.match(PcdValue) is not None:\r
         return True\r
-    \r
-    ReIsValidIntegerMulti = re.compile(r"^\s*[1-9][0-9]+\s*$", re.DOTALL)   \r
+\r
+    ReIsValidIntegerMulti = re.compile(r"^\s*[1-9][0-9]+\s*$", re.DOTALL)\r
     if ReIsValidIntegerMulti.match(PcdValue) is not None:\r
         return True\r
-    \r
+\r
     #\r
     # <StringVal>              ::=  {<StringType>} {<Array>} {"$(" <MACRO> ")"}\r
     # <StringType>             ::=  {<UnicodeString>} {<CString>}\r
@@ -609,7 +609,7 @@ def IsValidPcdValue(PcdValue):
                 IsTrue = True\r
         if IsTrue:\r
             return IsTrue\r
-    \r
+\r
     #\r
     # <Array>                 ::=   {<CArray>} {<NList>} {<CFormatGUID>}\r
     # <CArray>                ::=   "{" [<NList>] <CArray>{0,} "}"\r
@@ -619,44 +619,44 @@ def IsValidPcdValue(PcdValue):
     #\r
     if IsValidCFormatGuid(PcdValue):\r
         return True\r
-    \r
+\r
     ReIsValidByteHex = re.compile(r"^\s*0x[0-9a-fA-F]{1,2}\s*$", re.DOTALL)\r
     if PcdValue.strip().startswith('{') and PcdValue.strip().endswith('}') :\r
         StringValue = PcdValue.strip().lstrip('{').rstrip('}')\r
         ValueList = StringValue.split(',')\r
         AllValidFlag = True\r
-        for ValueItem in ValueList:         \r
+        for ValueItem in ValueList:\r
             if not ReIsValidByteHex.match(ValueItem.strip()):\r
                 AllValidFlag = False\r
-        \r
+\r
         if AllValidFlag:\r
             return True\r
-    \r
-    #    \r
+\r
+    #\r
     # NList\r
     #\r
     AllValidFlag = True\r
     ValueList = PcdValue.split(',')\r
-    for ValueItem in ValueList:         \r
+    for ValueItem in ValueList:\r
         if not ReIsValidByteHex.match(ValueItem.strip()):\r
             AllValidFlag = False\r
-    \r
+\r
     if AllValidFlag:\r
         return True\r
-    \r
+\r
     return False\r
 \r
 ## IsValidCVariableName\r
 #\r
 # Check whether the PcdValue is valid.\r
-#   \r
+#\r
 # @param VersionString:  The PcdValue need to be checked.\r
-#     \r
+#\r
 def IsValidCVariableName(CName):\r
     ReIsValidCName = re.compile(r"^[A-Za-z_][0-9A-Za-z_]*$", re.DOTALL)\r
     if ReIsValidCName.match(CName) is None:\r
         return False\r
-    \r
+\r
     return True\r
 \r
 ## IsValidIdentifier\r
@@ -671,7 +671,7 @@ def IsValidIdentifier(Ident):
     ReIdent = re.compile(r"^[A-Za-z_][0-9A-Za-z_]*$", re.DOTALL)\r
     if ReIdent.match(Ident) is None:\r
         return False\r
-    \r
+\r
     return True\r
 \r
 ## IsValidDecVersionVal\r
@@ -682,10 +682,10 @@ def IsValidIdentifier(Ident):
 #\r
 def IsValidDecVersionVal(Ver):\r
     ReVersion = re.compile(r"[0-9]+(\.[0-9]{1,2})$")\r
-    \r
+\r
     if ReVersion.match(Ver) is None:\r
         return False\r
-      \r
+\r
     return True\r
 \r
 \r
@@ -699,7 +699,7 @@ def IsValidLibName(LibName):
     ReLibName = re.compile("^[A-Z]+[a-zA-Z0-9]*$")\r
     if not ReLibName.match(LibName):\r
         return False\r
-    \r
+\r
     return True\r
 \r
 # IsValidUserId\r
index 22030e7587c1ae51612640d8cb9f75a46d43cee6..5c4666399e29305019975ab4e88ece946304a14c 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define common parsing related functions used in parsing \r
+# This file is used to define common parsing related functions used in parsing\r
 # INF/DEC/DSC process\r
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -74,7 +74,7 @@ def GetBuildOption(String, File, LineNo= -1):
 # Get Library of Dsc as <LibraryClassKeyWord>|<LibraryInstance>\r
 #\r
 # @param Item:           String as <LibraryClassKeyWord>|<LibraryInstance>\r
-# @param ContainerFile:  The file which describes the library class, used for \r
+# @param ContainerFile:  The file which describes the library class, used for\r
 #                        error report\r
 #\r
 def GetLibraryClass(Item, ContainerFile, WorkspaceDir, LineNo= -1):\r
@@ -99,7 +99,7 @@ def GetLibraryClass(Item, ContainerFile, WorkspaceDir, LineNo= -1):
 # [|<TokenSpaceGuidCName>.<PcdCName>]\r
 #\r
 # @param Item:           String as <LibraryClassKeyWord>|<LibraryInstance>\r
-# @param ContainerFile:  The file which describes the library class, used for \r
+# @param ContainerFile:  The file which describes the library class, used for\r
 #                        error report\r
 #\r
 def GetLibraryClassOfInf(Item, ContainerFile, WorkspaceDir, LineNo= -1):\r
@@ -148,7 +148,7 @@ def CheckPcdTokenInfo(TokenInfoString, Section, File, LineNo= -1):
 #\r
 # @param Item:           String as <PcdTokenSpaceGuidCName>.<TokenCName>|\r
 #                        <Value>[|<Type>|<MaximumDatumSize>]\r
-# @param ContainerFile:  The file which describes the pcd, used for error \r
+# @param ContainerFile:  The file which describes the pcd, used for error\r
 #                        report\r
 \r
 #\r
@@ -176,7 +176,7 @@ def GetPcd(Item, Type, ContainerFile, LineNo= -1):
 #\r
 # @param Item:           String as <PcdTokenSpaceGuidCName>\r
 #                        .<TokenCName>|TRUE/FALSE\r
-# @param ContainerFile:  The file which describes the pcd, used for error \r
+# @param ContainerFile:  The file which describes the pcd, used for error\r
 #                        report\r
 #\r
 def GetFeatureFlagPcd(Item, Type, ContainerFile, LineNo= -1):\r
@@ -200,7 +200,7 @@ def GetFeatureFlagPcd(Item, Type, ContainerFile, LineNo= -1):
 #\r
 # @param Item:           String as <PcdTokenSpaceGuidCName>.<TokenCName>|\r
 #                        TRUE/FALSE\r
-# @param ContainerFile:  The file which describes the pcd, used for error \r
+# @param ContainerFile:  The file which describes the pcd, used for error\r
 #                        report\r
 #\r
 def GetDynamicDefaultPcd(Item, Type, ContainerFile, LineNo= -1):\r
@@ -226,7 +226,7 @@ def GetDynamicDefaultPcd(Item, Type, ContainerFile, LineNo= -1):
 #\r
 # @param Item:           String as <PcdTokenSpaceGuidCName>.<TokenCName>|\r
 #                        TRUE/FALSE\r
-# @param ContainerFile:  The file which describes the pcd, used for error \r
+# @param ContainerFile:  The file which describes the pcd, used for error\r
 #                        report\r
 #\r
 def GetDynamicHiiPcd(Item, Type, ContainerFile, LineNo= -1):\r
@@ -253,7 +253,7 @@ def GetDynamicHiiPcd(Item, Type, ContainerFile, LineNo= -1):
 #\r
 # @param Item:           String as <PcdTokenSpaceGuidCName>.<TokenCName>\r
 #                        |TRUE/FALSE\r
-# @param ContainerFile:  The file which describes the pcd, used for error \r
+# @param ContainerFile:  The file which describes the pcd, used for error\r
 #                        report\r
 #\r
 def GetDynamicVpdPcd(Item, Type, ContainerFile, LineNo= -1):\r
@@ -273,7 +273,7 @@ def GetDynamicVpdPcd(Item, Type, ContainerFile, LineNo= -1):
 ## GetComponent\r
 #\r
 # Parse block of the components defined in dsc file\r
-# Set KeyValues as [ ['component name', [lib1, lib2, lib3], \r
+# Set KeyValues as [ ['component name', [lib1, lib2, lib3],\r
 # [bo1, bo2, bo3], [pcd1, pcd2, pcd3]], ...]\r
 #\r
 # @param Lines:             The content to be parsed\r
@@ -408,7 +408,7 @@ def GetExec(String):
 ## GetComponents\r
 #\r
 # Parse block of the components defined in dsc file\r
-# Set KeyValues as [ ['component name', [lib1, lib2, lib3], [bo1, bo2, bo3], \r
+# Set KeyValues as [ ['component name', [lib1, lib2, lib3], [bo1, bo2, bo3],\r
 # [pcd1, pcd2, pcd3]], ...]\r
 #\r
 # @param Lines:             The content to be parsed\r
@@ -531,7 +531,7 @@ def GetComponents(Lines, KeyValues, CommentCharacter):
 #\r
 # @param Item:           String as <Filename>[|<Family>[|<TagName>[|<ToolCode>\r
 #                        [|<PcdFeatureFlag>]]]]\r
-# @param ContainerFile:  The file which describes the library class, used \r
+# @param ContainerFile:  The file which describes the library class, used\r
 #                        for error report\r
 #\r
 def GetSource(Item, ContainerFile, FileRelativePath, LineNo= -1):\r
@@ -556,7 +556,7 @@ def GetSource(Item, ContainerFile, FileRelativePath, LineNo= -1):
 #\r
 # @param Item:           String as <Filename>[|<Family>[|<TagName>\r
 #                        [|<ToolCode>[|<PcdFeatureFlag>]]]]\r
-# @param ContainerFile:  The file which describes the library class, \r
+# @param ContainerFile:  The file which describes the library class,\r
 #                        used for error report\r
 #\r
 def GetBinary(Item, ContainerFile, LineNo= -1):\r
@@ -580,7 +580,7 @@ def GetBinary(Item, ContainerFile, LineNo= -1):
 #\r
 # @param Item:           String as <GuidCName>[|<PcdFeatureFlag>]\r
 # @param Type:           Type of parsing string\r
-# @param ContainerFile:  The file which describes the library class, \r
+# @param ContainerFile:  The file which describes the library class,\r
 #                        used for error report\r
 #\r
 def GetGuidsProtocolsPpisOfInf(Item):\r
@@ -594,7 +594,7 @@ def GetGuidsProtocolsPpisOfInf(Item):
 #\r
 # @param Item:           String as <GuidCName>=<GuidValue>\r
 # @param Type:           Type of parsing string\r
-# @param ContainerFile:  The file which describes the library class, \r
+# @param ContainerFile:  The file which describes the library class,\r
 # used for error report\r
 #\r
 def GetGuidsProtocolsPpisOfDec(Item, Type, ContainerFile, LineNo= -1):\r
@@ -625,7 +625,7 @@ def GetGuidsProtocolsPpisOfDec(Item, Type, ContainerFile, LineNo= -1):
 #\r
 # @param Item:           String as <PackagePath>[|<PcdFeatureFlag>]\r
 # @param Type:           Type of parsing string\r
-# @param ContainerFile:  The file which describes the library class, \r
+# @param ContainerFile:  The file which describes the library class,\r
 #                        used for error report\r
 #\r
 def GetPackage(Item, ContainerFile, FileRelativePath, LineNo= -1):\r
@@ -936,7 +936,7 @@ def MacroParser(Line, FileName, SectionType, FileLocalMacros):
     # <Value>           ::=  {<NumVal>} {<Boolean>} {<AsciiString>} {<GUID>}\r
     #                        {<CString>} {<UnicodeString>} {<CArray>}\r
     #\r
-    # The definition of <NumVal>, <PATH>, <Boolean>, <GUID>, <CString>, \r
+    # The definition of <NumVal>, <PATH>, <Boolean>, <GUID>, <CString>,\r
     # <UnicodeString>, <CArray> are subset of <AsciiString>.\r
     #\r
     ReIsValidMacroValue = re.compile(r"^[\x20-\x7e]*$", re.DOTALL)\r
@@ -950,15 +950,15 @@ def MacroParser(Line, FileName, SectionType, FileLocalMacros):
 \r
     return Name, Value\r
 \r
-## GenSection \r
+## GenSection\r
 #\r
 # generate section contents\r
 #\r
-# @param  SectionName:  indicate the name of the section, details refer to \r
+# @param  SectionName:  indicate the name of the section, details refer to\r
 #                       INF, DEC specs\r
-# @param  SectionDict:  section statement dict, key is SectionAttrs(arch, \r
-#                       moduletype or platform may exist as needed) list \r
-#                       seperated by space, \r
+# @param  SectionDict:  section statement dict, key is SectionAttrs(arch,\r
+#                       moduletype or platform may exist as needed) list\r
+#                       seperated by space,\r
 #                       value is statement\r
 #\r
 def GenSection(SectionName, SectionDict, SplitArch=True, NeedBlankLine=False):\r
@@ -1004,10 +1004,10 @@ def GenSection(SectionName, SectionDict, SplitArch=True, NeedBlankLine=False):
     return Content\r
 \r
 ## ConvertArchForInstall\r
-# if Arch.upper() is in "IA32", "X64", "IPF", and "EBC", it must be upper case.  "common" must be lower case.  \r
+# if Arch.upper() is in "IA32", "X64", "IPF", and "EBC", it must be upper case.  "common" must be lower case.\r
 # Anything else, the case must be preserved\r
 #\r
-# @param Arch: the arch string that need to be converted, it should be stripped before pass in \r
+# @param Arch: the arch string that need to be converted, it should be stripped before pass in\r
 # @return: the arch string that get converted\r
 #\r
 def ConvertArchForInstall(Arch):\r
index a464cbf702f7eb29f6fee2679b9dceb5271af520..670cf3b4eeac19a9f945f06c575b593eed6463d0 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -148,9 +148,9 @@ def GetLanguageCode1766(LangName, File=None):
         if LangName.isalpha() and gLANG_CONV_TABLE.get(LangName.lower()):\r
             return LangName\r
         else:\r
-            EdkLogger.Error("Unicode File Parser", \r
+            EdkLogger.Error("Unicode File Parser",\r
                              ToolError.FORMAT_INVALID,\r
-                             "Invalid RFC 1766 language code : %s" % LangName, \r
+                             "Invalid RFC 1766 language code : %s" % LangName,\r
                              File)\r
     elif length == 5:\r
         if LangName[0:2].isalpha() and LangName[2] == '-':\r
@@ -167,11 +167,11 @@ def GetLanguageCode1766(LangName, File=None):
                 if Key == LangName[0:3].lower():\r
                     return Key\r
 \r
-    EdkLogger.Error("Unicode File Parser", \r
+    EdkLogger.Error("Unicode File Parser",\r
                              ToolError.FORMAT_INVALID,\r
-                             "Invalid RFC 4646 language code : %s" % LangName, \r
+                             "Invalid RFC 4646 language code : %s" % LangName,\r
                              File)\r
-    \r
+\r
 ## GetLanguageCode\r
 #\r
 # Check the language code read from .UNI file and convert RFC 1766 codes to RFC 4646 codes if appropriate\r
@@ -191,9 +191,9 @@ def GetLanguageCode(LangName, IsCompatibleMode, File):
                 return TempLangName\r
             return LangName\r
         else:\r
-            EdkLogger.Error("Unicode File Parser", \r
+            EdkLogger.Error("Unicode File Parser",\r
                              ToolError.FORMAT_INVALID,\r
-                             "Invalid RFC 1766 language code : %s" % LangName, \r
+                             "Invalid RFC 1766 language code : %s" % LangName,\r
                              File)\r
     if (LangName[0] == 'X' or LangName[0] == 'x') and LangName[1] == '-':\r
         return LangName\r
@@ -212,9 +212,9 @@ def GetLanguageCode(LangName, IsCompatibleMode, File):
         if LangName[0:3].isalpha() and gLANG_CONV_TABLE.get(LangName.lower()) is None and LangName[3] == '-':\r
             return LangName\r
 \r
-    EdkLogger.Error("Unicode File Parser", \r
+    EdkLogger.Error("Unicode File Parser",\r
                              ToolError.FORMAT_INVALID,\r
-                             "Invalid RFC 4646 language code : %s" % LangName, \r
+                             "Invalid RFC 4646 language code : %s" % LangName,\r
                              File)\r
 \r
 ## FormatUniEntry\r
@@ -231,7 +231,7 @@ def FormatUniEntry(StrTokenName, TokenValueList, ContainerFile):
     PreFormatLength = 40\r
     if len(StrTokenName) > PreFormatLength:\r
         PreFormatLength = len(StrTokenName) + 1\r
-    for (Lang, Value) in TokenValueList: \r
+    for (Lang, Value) in TokenValueList:\r
         if not Value or Lang == DT.TAB_LANGUAGE_EN_X:\r
             continue\r
         if Lang == '':\r
@@ -333,15 +333,15 @@ class UniFileClassObject(object):
             except UnicodeError as Xstr:\r
                 FileIn = codecs.open(File.Path, mode='rb', encoding='utf_16_le').readlines()\r
             except:\r
-                EdkLogger.Error("Unicode File Parser", \r
-                                ToolError.FILE_OPEN_FAILURE, \r
+                EdkLogger.Error("Unicode File Parser",\r
+                                ToolError.FILE_OPEN_FAILURE,\r
                                 "File read failure: %s" % str(Xstr),\r
                                 ExtraData=File)\r
             LineNo = GetLineNo(FileIn, Line, False)\r
-            EdkLogger.Error("Unicode File Parser", \r
+            EdkLogger.Error("Unicode File Parser",\r
                              ToolError.PARSER_ERROR,\r
-                             "Wrong language definition", \r
-                             ExtraData="""%s\n\t*Correct format is like '#langdef en-US "English"'""" % Line, \r
+                             "Wrong language definition",\r
+                             ExtraData="""%s\n\t*Correct format is like '#langdef en-US "English"'""" % Line,\r
                              File = File, Line = LineNo)\r
         else:\r
             LangName = GetLanguageCode(Lang[1], self.IsCompatibleMode, self.File)\r
@@ -365,7 +365,7 @@ class UniFileClassObject(object):
         if not IsLangInDef:\r
             #\r
             # The found STRING tokens will be added into new language string list\r
-            # so that the unique STRING identifier is reserved for all languages in the package list. \r
+            # so that the unique STRING identifier is reserved for all languages in the package list.\r
             #\r
             FirstLangName = self.LanguageDef[0][0]\r
             if LangName != FirstLangName:\r
@@ -375,10 +375,10 @@ class UniFileClassObject(object):
                         OtherLang = Item.UseOtherLangDef\r
                     else:\r
                         OtherLang = FirstLangName\r
-                    self.OrderedStringList[LangName].append (StringDefClassObject(Item.StringName, \r
-                                                                                  '', \r
-                                                                                  Item.Referenced, \r
-                                                                                  Item.Token, \r
+                    self.OrderedStringList[LangName].append (StringDefClassObject(Item.StringName,\r
+                                                                                  '',\r
+                                                                                  Item.Referenced,\r
+                                                                                  Item.Token,\r
                                                                                   OtherLang))\r
                     self.OrderedStringDict[LangName][Item.StringName] = len(self.OrderedStringList[LangName]) - 1\r
         return True\r
@@ -395,7 +395,7 @@ class UniFileClassObject(object):
         if Name != '':\r
             MatchString = re.match('[A-Z0-9_]+', Name, re.UNICODE)\r
             if MatchString is None or MatchString.end(0) != len(Name):\r
-                EdkLogger.Error("Unicode File Parser", \r
+                EdkLogger.Error("Unicode File Parser",\r
                              ToolError.FORMAT_INVALID,\r
                              'The string token name %s in UNI file %s must be upper case character.' %(Name, self.File))\r
         LanguageList = Item.split(u'#language ')\r
@@ -406,7 +406,7 @@ class UniFileClassObject(object):
                 Language = LanguageList[IndexI].split()[0]\r
                 #.replace(u'\r\n', u'')\r
                 Value = \\r
-                LanguageList[IndexI][LanguageList[IndexI].find(u'\"') + len(u'\"') : LanguageList[IndexI].rfind(u'\"')] \r
+                LanguageList[IndexI][LanguageList[IndexI].find(u'\"') + len(u'\"') : LanguageList[IndexI].rfind(u'\"')]\r
                 Language = GetLanguageCode(Language, self.IsCompatibleMode, self.File)\r
                 self.AddStringToList(Name, Language, Value)\r
 \r
@@ -424,7 +424,7 @@ class UniFileClassObject(object):
     #\r
     def PreProcess(self, File, IsIncludeFile=False):\r
         if not os.path.exists(File.Path) or not os.path.isfile(File.Path):\r
-            EdkLogger.Error("Unicode File Parser", \r
+            EdkLogger.Error("Unicode File Parser",\r
                              ToolError.FILE_NOT_FOUND,\r
                              ExtraData=File.Path)\r
 \r
@@ -443,8 +443,8 @@ class UniFileClassObject(object):
             FileIn = codecs.open(File.Path, mode='rb', encoding='utf_16_le').readlines()\r
         except:\r
             EdkLogger.Error("Unicode File Parser", ToolError.FILE_OPEN_FAILURE, ExtraData=File.Path)\r
-        \r
-        \r
+\r
+\r
         #\r
         # get the file header\r
         #\r
@@ -467,7 +467,7 @@ class UniFileClassObject(object):
             if Line.startswith(DT.TAB_COMMENT_EDK1_SPLIT) and HeaderStart and not HeaderEnd and FirstGenHeader:\r
                 self.UniFileHeader += Line + '\r\n'\r
                 continue\r
-        \r
+\r
         #\r
         # Use unique identifier\r
         #\r
@@ -486,7 +486,7 @@ class UniFileClassObject(object):
             Line = Line.strip()\r
             #\r
             # Ignore comment line and empty line\r
-            #            \r
+            #\r
             if Line == u'' or Line.startswith(u'//'):\r
                 #\r
                 # Change the single line String entry flag status\r
@@ -528,7 +528,7 @@ class UniFileClassObject(object):
                         EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, ExtraData=File.Path)\r
                 else:\r
                     EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, ExtraData=File.Path)\r
-                    \r
+\r
             Line = Line.replace(UNICODE_WIDE_CHAR, WIDE_CHAR)\r
             Line = Line.replace(UNICODE_NARROW_CHAR, NARROW_CHAR)\r
             Line = Line.replace(UNICODE_NON_BREAKING_CHAR, NON_BREAKING_CHAR)\r
@@ -556,16 +556,16 @@ class UniFileClassObject(object):
             #\r
             if Line.startswith(u'#string') and Line.find(u'#language') == -1:\r
                 MultiLineFeedExits = True\r
-                \r
+\r
             if Line.startswith(u'#string') and Line.find(u'#language') > 0 and Line.find(u'"') < 0:\r
                 MultiLineFeedExits = True\r
-            \r
+\r
             #\r
             # Between Language entry and String entry can not contain line feed\r
             #\r
             if Line.startswith(u'#language') and len(Line.split()) == 2:\r
                 MultiLineFeedExits = True\r
-            \r
+\r
             #\r
             # Between two String entry, can not contain line feed\r
             #\r
@@ -588,7 +588,7 @@ class UniFileClassObject(object):
                 StringEntryExistsFlag = 0\r
 \r
             Lines.append(Line)\r
-        \r
+\r
         #\r
         # Convert string def format as below\r
         #\r
@@ -601,11 +601,11 @@ class UniFileClassObject(object):
         #     "Mi segunda secuencia 1"\r
         #     "Mi segunda secuencia 2"\r
         #\r
-        \r
+\r
         if not IsIncludeFile and not Lines:\r
             EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, \\r
                 Message=ST.ERR_UNIPARSE_NO_SECTION_EXIST, \\r
-                ExtraData=File.Path) \r
+                ExtraData=File.Path)\r
 \r
         NewLines = []\r
         StrName = u''\r
@@ -615,7 +615,7 @@ class UniFileClassObject(object):
                 EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, \\r
                                 Message=ST.ERR_UNIPARSE_STRNAME_FORMAT_ERROR % StrName.split()[1], \\r
                                 ExtraData=File.Path)\r
-                \r
+\r
             if StrName and len(StrName.split()[1].split(DT.TAB_UNDERLINE_SPLIT)) == 4:\r
                 StringTokenList = StrName.split()[1].split(DT.TAB_UNDERLINE_SPLIT)\r
                 if (StringTokenList[3].upper() in [DT.TAB_STR_TOKENPROMPT, DT.TAB_STR_TOKENHELP] and \\r
@@ -624,19 +624,19 @@ class UniFileClassObject(object):
                     EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, \\r
                                 Message=ST.ERR_UNIPARSE_STRTOKEN_FORMAT_ERROR % StrName.split()[1], \\r
                                 ExtraData=File.Path)\r
-                    \r
+\r
             if Line.count(u'#language') > 1:\r
                 EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, \\r
                                 Message=ST.ERR_UNIPARSE_SEP_LANGENTRY_LINE % Line, \\r
-                                ExtraData=File.Path) \r
-            \r
+                                ExtraData=File.Path)\r
+\r
             if Line.startswith(u'//'):\r
                 continue\r
             elif Line.startswith(u'#langdef'):\r
                 if len(Line.split()) == 2:\r
                     NewLines.append(Line)\r
                     continue\r
-                elif len(Line.split()) > 2 and Line.find(u'"') > 0:                    \r
+                elif len(Line.split()) > 2 and Line.find(u'"') > 0:\r
                     NewLines.append(Line[:Line.find(u'"')].strip())\r
                     NewLines.append(Line[Line.find(u'"'):])\r
                 else:\r
@@ -659,10 +659,10 @@ class UniFileClassObject(object):
                     if Line[Line.find(u'#language')-1] != ' ' or \\r
                        Line[Line.find(u'#language')+len(u'#language')] != u' ':\r
                         EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, ExtraData=File.Path)\r
-                        \r
+\r
                     if Line.find(u'"') > 0:\r
                         EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, ExtraData=File.Path)\r
-                        \r
+\r
                     StrName = Line.split()[0] + u' ' + Line.split()[1]\r
                     if StrName:\r
                         if StrName.split()[1] not in ExistStrNameList:\r
@@ -684,11 +684,11 @@ class UniFileClassObject(object):
                     if Line[Line.find(u'#language')-1] != u' ' or \\r
                        Line[Line.find(u'#language')+len(u'#language')] != u' ':\r
                         EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, ExtraData=File.Path)\r
-                    \r
+\r
                     if Line[Line.find(u'"')-1] != u' ':\r
-                        EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, ExtraData=File.Path)  \r
-                    \r
-                    StrName = Line.split()[0] + u' ' + Line.split()[1]     \r
+                        EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, ExtraData=File.Path)\r
+\r
+                    StrName = Line.split()[0] + u' ' + Line.split()[1]\r
                     if StrName:\r
                         if StrName.split()[1] not in ExistStrNameList:\r
                             ExistStrNameList.append(StrName.split()[1].strip())\r
@@ -698,11 +698,11 @@ class UniFileClassObject(object):
                                                     DT.TAB_DEC_BINARY_ABSTRACT, DT.TAB_DEC_BINARY_DESCRIPTION]:\r
                             EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, \\r
                                             Message=ST.ERR_UNIPARSE_MULTI_ENTRY_EXIST % StrName.split()[1], \\r
-                                            ExtraData=File.Path)      \r
+                                            ExtraData=File.Path)\r
                     if IsIncludeFile:\r
                         if StrName not in NewLines:\r
                             NewLines.append((Line[:Line.find(u'#language')]).strip())\r
-                    else:                \r
+                    else:\r
                         NewLines.append((Line[:Line.find(u'#language')]).strip())\r
                     NewLines.append((Line[Line.find(u'#language'):Line.find(u'"')]).strip())\r
                     NewLines.append((Line[Line.find(u'"'):]).strip())\r
@@ -733,17 +733,17 @@ class UniFileClassObject(object):
             else:\r
                 print(Line)\r
                 EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, ExtraData=File.Path)\r
-                    \r
+\r
         if StrName and not StrName.split()[1].startswith(u'STR_'):\r
             EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, \\r
                                 Message=ST.ERR_UNIPARSE_STRNAME_FORMAT_ERROR % StrName.split()[1], \\r
-                                ExtraData=File.Path)    \r
-        \r
+                                ExtraData=File.Path)\r
+\r
         if StrName and not NewLines:\r
             EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, \\r
                             Message=ST.ERR_UNI_MISS_LANGENTRY % StrName, \\r
                             ExtraData=File.Path)\r
-        \r
+\r
         #\r
         # Check Abstract, Description, BinaryAbstract and BinaryDescription order,\r
         # should be Abstract, Description, BinaryAbstract, BinaryDesctiption\r
@@ -762,7 +762,7 @@ class UniFileClassObject(object):
                     BinaryDescriptionPosition = ExistStrNameList.index(StrName)\r
                 else:\r
                     DescriptionPosition = ExistStrNameList.index(StrName)\r
-                    \r
+\r
         OrderList = sorted([AbstractPosition, DescriptionPosition])\r
         BinaryOrderList = sorted([BinaryAbstractPosition, BinaryDescriptionPosition])\r
         Min = OrderList[0]\r
@@ -774,25 +774,25 @@ class UniFileClassObject(object):
                    BinaryMax > Max):\r
                 EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, \\r
                                 Message=ST.ERR_UNIPARSE_ENTRY_ORDER_WRONG, \\r
-                                ExtraData=File.Path) \r
+                                ExtraData=File.Path)\r
         elif BinaryAbstractPosition > -1:\r
             if not(BinaryAbstractPosition > Max):\r
                 EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, \\r
                                 Message=ST.ERR_UNIPARSE_ENTRY_ORDER_WRONG, \\r
-                                ExtraData=File.Path)  \r
-            \r
+                                ExtraData=File.Path)\r
+\r
         if  DescriptionPosition > -1:\r
             if not(DescriptionPosition == Max and AbstractPosition == Min and \\r
                    DescriptionPosition > AbstractPosition):\r
                 EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, \\r
                                 Message=ST.ERR_UNIPARSE_ENTRY_ORDER_WRONG, \\r
-                                ExtraData=File.Path)  \r
-        \r
+                                ExtraData=File.Path)\r
+\r
         if not self.UniFileHeader:\r
-            EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, \r
+            EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID,\r
                             Message = ST.ERR_NO_SOURCE_HEADER,\r
                             ExtraData=File.Path)\r
-        \r
+\r
         return NewLines\r
 \r
     #\r
@@ -800,13 +800,13 @@ class UniFileClassObject(object):
     #\r
     def LoadUniFile(self, File = None):\r
         if File is None:\r
-            EdkLogger.Error("Unicode File Parser", \r
-                            ToolError.PARSER_ERROR, \r
-                            Message='No unicode file is given', \r
+            EdkLogger.Error("Unicode File Parser",\r
+                            ToolError.PARSER_ERROR,\r
+                            Message='No unicode file is given',\r
                             ExtraData=File.Path)\r
-   \r
+\r
         self.File = File\r
-        \r
+\r
         #\r
         # Process special char in file\r
         #\r
@@ -849,10 +849,10 @@ class UniFileClassObject(object):
                 SecondLine.find(u'#string ') < 0 and SecondLine.find(u'#language ') >= 0 and \\r
                 ThirdLine.find(u'#string ') < 0 and ThirdLine.find(u'#language ') < 0:\r
                 if Line.find('"') > 0 or SecondLine.find('"') > 0:\r
-                    EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, \r
+                    EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID,\r
                                 Message=ST.ERR_UNIPARSE_DBLQUOTE_UNMATCHED,\r
                                 ExtraData=File.Path)\r
-                    \r
+\r
                 Name = Line[Line.find(u'#string ') + len(u'#string ') : ].strip(' ')\r
                 Language = SecondLine[SecondLine.find(u'#language ') + len(u'#language ') : ].strip(' ')\r
                 for IndexJ in range(IndexI + 2, len(Lines)):\r
@@ -894,11 +894,11 @@ class UniFileClassObject(object):
         for LangNameItem in self.LanguageDef:\r
             if Language == LangNameItem[0]:\r
                 break\r
-            \r
+\r
         if Language not in self.OrderedStringList:\r
             self.OrderedStringList[Language] = []\r
             self.OrderedStringDict[Language] = {}\r
-            \r
+\r
         IsAdded = True\r
         if Name in self.OrderedStringDict[Language]:\r
             IsAdded = False\r
@@ -906,38 +906,38 @@ class UniFileClassObject(object):
                 ItemIndexInList = self.OrderedStringDict[Language][Name]\r
                 Item = self.OrderedStringList[Language][ItemIndexInList]\r
                 Item.UpdateValue(Value)\r
-                Item.UseOtherLangDef = ''   \r
+                Item.UseOtherLangDef = ''\r
 \r
         if IsAdded:\r
             Token = len(self.OrderedStringList[Language])\r
             if Index == -1:\r
-                self.OrderedStringList[Language].append(StringDefClassObject(Name, \r
-                                                                             Value, \r
-                                                                             Referenced, \r
-                                                                             Token, \r
+                self.OrderedStringList[Language].append(StringDefClassObject(Name,\r
+                                                                             Value,\r
+                                                                             Referenced,\r
+                                                                             Token,\r
                                                                              UseOtherLangDef))\r
                 self.OrderedStringDict[Language][Name] = Token\r
                 for LangName in self.LanguageDef:\r
                     #\r
                     # New STRING token will be added into all language string lists.\r
-                    # so that the unique STRING identifier is reserved for all languages in the package list. \r
+                    # so that the unique STRING identifier is reserved for all languages in the package list.\r
                     #\r
                     if LangName[0] != Language:\r
                         if UseOtherLangDef != '':\r
                             OtherLangDef = UseOtherLangDef\r
                         else:\r
                             OtherLangDef = Language\r
-                        self.OrderedStringList[LangName[0]].append(StringDefClassObject(Name, \r
-                                                                                        '', \r
-                                                                                        Referenced, \r
-                                                                                        Token, \r
+                        self.OrderedStringList[LangName[0]].append(StringDefClassObject(Name,\r
+                                                                                        '',\r
+                                                                                        Referenced,\r
+                                                                                        Token,\r
                                                                                         OtherLangDef))\r
                         self.OrderedStringDict[LangName[0]][Name] = len(self.OrderedStringList[LangName[0]]) - 1\r
             else:\r
-                self.OrderedStringList[Language].insert(Index, StringDefClassObject(Name, \r
-                                                                                    Value, \r
-                                                                                    Referenced, \r
-                                                                                    Token, \r
+                self.OrderedStringList[Language].insert(Index, StringDefClassObject(Name,\r
+                                                                                    Value,\r
+                                                                                    Referenced,\r
+                                                                                    Token,\r
                                                                                     UseOtherLangDef))\r
                 self.OrderedStringDict[Language][Name] = Index\r
 \r
@@ -1029,16 +1029,16 @@ class UniFileClassObject(object):
             print(Item)\r
             for Member in self.OrderedStringList[Item]:\r
                 print(str(Member))\r
-    \r
+\r
     #\r
-    # Read content from '!include' UNI file \r
+    # Read content from '!include' UNI file\r
     #\r
     def ReadIncludeUNIfile(self, FilaPath):\r
         if self.File:\r
             pass\r
-        \r
+\r
         if not os.path.exists(FilaPath) or not os.path.isfile(FilaPath):\r
-            EdkLogger.Error("Unicode File Parser", \r
+            EdkLogger.Error("Unicode File Parser",\r
                              ToolError.FILE_NOT_FOUND,\r
                              ExtraData=FilaPath)\r
         try:\r
index dbaee678af45a3906634e0870f0eee993049ef37..ee158f33d9dd94cefbc21237a3255892e59778a8 100644 (file)
@@ -2,11 +2,11 @@
 # This is an XML API that uses a syntax similar to XPath, but it is written in\r
 # standard python so that no extra python packages are required to use it.\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -141,8 +141,8 @@ def XmlElement(Dom, String):
 ## Get a single XML element using XPath style syntax.\r
 #\r
 # Similar with XmlElement, but do not strip all the leading and tailing space\r
-# and newline, instead just remove the newline and spaces introduced by \r
-# toprettyxml() \r
+# and newline, instead just remove the newline and spaces introduced by\r
+# toprettyxml()\r
 #\r
 # @param  Dom                The root XML DOM object.\r
 # @param  Strin              A XPath style path.\r
index f09eece5fb0e3110cd09961f21b4a48d74e65b16..e8283c03cb3684fb5bb6fc9f90b6324a14d800be 100644 (file)
@@ -4,11 +4,11 @@
 # This file is required to make Python interpreter treat the directory\r
 # as containing package.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,4 +17,4 @@
 \r
 '''\r
 Xml\r
-'''
\ No newline at end of file
+'''\r
index 6a98cd80a3ac5a36dff70100a4f5b4ba348d6fb8..3d52523b97db3e113289c35112de0faade49ee53 100644 (file)
@@ -4,11 +4,11 @@
 # This file is required to make Python interpreter treat the directory\r
 # as containing package.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,4 +17,4 @@
 \r
 '''\r
 Library\r
-'''
\ No newline at end of file
+'''\r
index ae06a1ae2a503c5836d1eea3caeb17b1c5d1795d..e8c31f00720be14565cad95445b5ee75042b3ca5 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file implements the log mechanism for Python tools.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -197,8 +197,8 @@ def Warn(ToolName, Message, File=None, Line=None, ExtraData=None):
 \r
 ## Log ERROR message\r
 #\r
-# Once an error messages is logged, the tool's execution will be broken by \r
-# raising an execption. If you don't want to break the execution later, you \r
+# Once an error messages is logged, the tool's execution will be broken by\r
+# raising an execption. If you don't want to break the execution later, you\r
 # can give "RaiseError" with "False" value.\r
 #\r
 #   @param  ToolName    The name of the tool. If not given, the name of caller\r
@@ -248,13 +248,13 @@ def Error(ToolName, ErrorCode, Message=None, File=None, Line=None, \
     if RaiseError:\r
         raise FatalError(ErrorCode)\r
 \r
-    \r
+\r
 ## Initialize log system\r
 #\r
 def Initialize():\r
     #\r
-    # Since we use different format to log different levels of message into \r
-    # different place (stdout or stderr), we have to use different "Logger" \r
+    # Since we use different format to log different levels of message into\r
+    # different place (stdout or stderr), we have to use different "Logger"\r
     # objects to do this.\r
     #\r
     # For DEBUG level (All DEBUG_0~9 are applicable)\r
index 83ae0ae2f3e089366d6bbd394c2657333f6321b8..c1c7732b40ce4747d2aa41d936be844db2b98ca1 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file is used to define strings used in the UPT tool\r
 #\r
-# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -118,7 +118,7 @@ ERR_INF_PARSER_DEPEX_SECTION_MODULE_TYPE_ERROR = \
 ERR_INF_PARSER_DEPEX_SECTION_CONTENT_MISSING = \\r
     _("Missing content in: %s")\r
 ERR_INF_PARSER_DEPEX_SECTION_CONTENT_ERROR  = \\r
-    _("The [Depex] section contains invalid content: %s")                    \r
+    _("The [Depex] section contains invalid content: %s")\r
 ERR_INF_PARSER_DEPEX_SECTION_SEC_TYPE_ERROR = \\r
     _("The format is incorrect. The section type keyword of the content in the"\r
       " [Depex] section is only for 'PEI_DEPEX', 'DXE_DEPEX', 'SMM_DEPEX', "\r
@@ -140,11 +140,11 @@ ERR_INF_PARSER_SOURCES_SECTION_CONTENT_ERROR = \
 ERR_INF_PARSER_PCD_SECTION_TYPE_ERROR = \\r
     _("The PCD section type is incorrect. The value should be this list: %s")\r
 ERR_INF_PARSER_PCD_SECTION_CONTENT_ERROR = \\r
-    _("PcdName format invalid." \r
+    _("PcdName format invalid."\r
       "Should like following: PcdName | Value | FeatureFlag.")\r
 ERR_INF_PARSER_PCD_NAME_FORMAT_ERROR = \\r
-    _("Format invalid." \r
-      "Should like following: <TokenSpaceGuidCName>.<PcdCName> ")   \r
+    _("Format invalid."\r
+      "Should like following: <TokenSpaceGuidCName>.<PcdCName> ")\r
 ERR_INF_PARSER_GUID_PPI_PROTOCOL_SECTION_CONTENT_ERROR = \\r
     _("The format is incorrect. "\r
       "It should be formated as follows: CName | FeatureFlag.")\r
@@ -181,7 +181,7 @@ ERR_INF_PARSER_PCD_CVAR_GUID = \
 ERR_INF_PARSER_PCD_CVAR_PCDCNAME = \\r
     _("PcdCName must be valid C variable format.")\r
 ERR_INF_PARSER_PCD_VALUE_INVALID = \\r
-    _("The PCD value is incorrect. It must be corrected before continuing.")    \r
+    _("The PCD value is incorrect. It must be corrected before continuing.")\r
 ERR_INF_PARSER_FEATURE_FLAG_EXP_SYNTAX_INVLID = \\r
     _("Incorrect feature flag expression: %s")\r
 ERR_INF_PARSER_FEATURE_FLAG_EXP_MISSING = \\r
@@ -191,7 +191,7 @@ ERR_INF_PARSER_INVALID_CNAME = \
 ERR_INF_PARSER_CNAME_MISSING = \\r
     _("Missing CName. Specify a valid C variable name.")\r
 ERR_INF_PARSER_DEFINE_SECTION_KEYWORD_INVALID = \\r
-    _("The Define section contains an invalid keyword:  \"%s\"."  \r
+    _("The Define section contains an invalid keyword:  \"%s\"."\r
     "It must be corrected before continuing.")\r
 ERR_INF_PARSER_FILE_MISS_DEFINE = \\r
     _("The following file listed in the module "\r
@@ -206,7 +206,7 @@ ERR_INF_PARSER_NOT_SUPPORT_EDKI_INF = _("EDKI INF is not supported")
 ERR_INF_PARSER_EDKI_COMMENT_IN_EDKII = _("The EDKI style comment is not supported in EDKII modules")\r
 \r
 ERR_INF_PARSER_FEATUREPCD_USAGE_INVALID = _("The usage for FeaturePcd can only"\r
-    " be type of \"CONSUMES\".") \r
+    " be type of \"CONSUMES\".")\r
 \r
 ERR_INF_PARSER_DEFINE_ITEM_NO_NAME = _("No name specified")\r
 ERR_INF_PARSER_DEFINE_ITEM_NO_VALUE = _("No value specified")\r
@@ -221,9 +221,9 @@ ERR_INF_NO_PKG_DEPENDENCY_INFO = _("There are no packages defined that use the A
 #\r
 ERR_INF_PARSER_ITEM_DUPLICATE_IN_DEC = \\r
 _('"%s" is redefined in its dependent DEC files')\r
-ERR_INF_PARSER_ITEM_DUPLICATE = _("%s define duplicated! " \r
+ERR_INF_PARSER_ITEM_DUPLICATE = _("%s define duplicated! "\r
                                   "It must be corrected before continuing.")\r
-ERR_INF_PARSER_ITEM_DUPLICATE_COMMON = _("%s define duplicated! Item listed" \r
+ERR_INF_PARSER_ITEM_DUPLICATE_COMMON = _("%s define duplicated! Item listed"\r
 "in an architectural section must not be listed in the common architectural"\r
 "section.It must be corrected before continuing.")\r
 ERR_INF_PARSER_UE_SECTION_DUPLICATE_ERROR = \\r
@@ -237,11 +237,11 @@ _("The name 'NULL' for LibraryClass is a reserved word."
 \r
 ERR_GLOBAL_MARCO_INVALID = \\r
 _("Using global MACRO in INF/DEC is not permitted: %s . "\r
-"It must be corrected before continuing.")                                          \r
+"It must be corrected before continuing.")\r
 \r
 ERR_MARCO_DEFINITION_MISS_ERROR = \\r
 _("MACRO expand incorrectly, can not find the MACRO definition. "\r
-"It must be corrected before continuing.") \r
+"It must be corrected before continuing.")\r
 \r
 #\r
 # AsBuilt related\r
@@ -370,7 +370,7 @@ MSG_RECOVER_FAIL = _('Recovery failed.')
 #\r
 \r
 ERR_DEPENDENCY_NOT_MATCH         = _(\r
-    "Module %s's dependency on package %s (GUID %s Version %s) " \r
+    "Module %s's dependency on package %s (GUID %s Version %s) "\r
     "cannot be satisfied")\r
 ERR_MODULE_NOT_INSTALLED         = _(\r
     "This module is not installed in the workspace: %s\n")\r
@@ -475,7 +475,7 @@ ERR_FILELIST_EXIST               = _(
 ERR_COPYRIGHT_CONTENT            = _(\r
     "The copyright content must contain the word \"Copyright\" (case insensitive).")\r
 ERR_WRONG_FILELIST_FORMAT        = \\r
-_('File list format is incorrect.' \r
+_('File list format is incorrect.'\r
   'The correct format is: filename|key=value[|key=value]')\r
 ERR_FILELIST_ATTR                = _(\r
     "The value of attribute \"%s\" includes illegal character.")\r
@@ -593,7 +593,7 @@ _("There are same entries : %s in the UNI file, every kind of entry should be on
 ERR_UNIPARSE_ENTRY_ORDER_WRONG = \\r
 _("The string entry order in UNI file should be <AbstractStrings>, <DescriptionStrings>, \\r
 <BinaryAbstractStrings>, <BinaryDescriptionStrings>.")\r
-ERR_UNIPARSE_STRTOKEN_FORMAT_ERROR = _("The String Token Type %s must be one of the '_PROMPT', '_HELP' and '_ERR_'.") \r
+ERR_UNIPARSE_STRTOKEN_FORMAT_ERROR = _("The String Token Type %s must be one of the '_PROMPT', '_HELP' and '_ERR_'.")\r
 ERR_UNIPARSE_LINEFEED_UNDER_EXIST = _("Line feed should not exist under this line: %s.")\r
 ERR_UNIPARSE_LINEFEED_UP_EXIST = _("Line feed should not exist up this line: %s.")\r
 ERR_UNI_MISS_STRING_ENTRY = _("String entry missed in this Entry, %s.")\r
@@ -672,7 +672,7 @@ _("Library class format error, must be Libraryclass|Headerpath.")
 ERR_DECPARSE_LIBCLASS_EMPTY         = \\r
 _("Class name or file name must not be empty.")\r
 ERR_DECPARSE_LIBCLASS_LIB           = \\r
-_("Class name format error, must start with upper case letter followed with " \r
+_("Class name format error, must start with upper case letter followed with "\r
   "zero or more alphanumeric characters.")\r
 ERR_DECPARSE_LIBCLASS_PATH_EXT      = _("File name must be end with .h.")\r
 ERR_DECPARSE_LIBCLASS_PATH_DOT      = _("Path must not include '..'.")\r
@@ -695,7 +695,7 @@ _("Incorrect  value [%s] of type [%s].  Value  must be printable and in the "
   "form of{...} for array, or ""..."" for string, or L""..."""\r
   "for unicode string.")\r
 ERR_DECPARSE_PCD_VALUE_EMPTY        = \\r
-_("Pcd value can not be empty.") \r
+_("Pcd value can not be empty.")\r
 ERR_DECPARSE_PCD_BOOL               = \\r
 _("Invalid value [%s] of type [%s]; must be expression, TRUE, FALSE, 0 or 1.")\r
 ERR_DECPARSE_PCD_INT                = _("Incorrect value [%s] of type [%s]."\\r
@@ -719,14 +719,14 @@ _("No GUID name specified, must be <CName> = <GuidValueInCFormat>.")
 ERR_DECPARSE_CGUID_GUID             = \\r
 _("No GUID value specified, must be <CName> = <GuidValueInCFormat>.")\r
 ERR_DECPARSE_CGUID_GUIDFORMAT       = \\r
-_("Incorrect GUID value format, must be <GuidValueInCFormat:" \r
+_("Incorrect GUID value format, must be <GuidValueInCFormat:"\r
   "{8,4,4,{2,2,2,2,2,2,2,2}}>.")\r
 ERR_DECPARSE_CGUID_NOT_FOUND = _("Unable to find the GUID value of this GUID CName : '%s'.")\r
 ERR_DECPARSE_FILEOPEN               = _("Unable to open: [%s].")\r
 ERR_DECPARSE_SECTION_EMPTY          = _("Empty sections are not allowed.")\r
 ERR_DECPARSE_SECTION_UE             = _("Incorrect UserExtentions format. "\r
                             "Must be UserExtenxions.UserId.IdString[.Arch]+.")\r
-ERR_DECPARSE_SECTION_UE_USERID      = _("Invalid UserId, must be underscore" \r
+ERR_DECPARSE_SECTION_UE_USERID      = _("Invalid UserId, must be underscore"\r
                                         "or alphanumeric characters.")\r
 ERR_DECPARSE_SECTION_UE_IDSTRING    = \\r
     _("Incorrect IdString, must be \" ... \".")\r
@@ -805,7 +805,7 @@ WRN_INF_PARSER_MODULE_INVALID_EVENT_TYPE = \
 WRN_INF_PARSER_MODULE_INVALID_BOOTMODE_TYPE = \\r
     _("This is an incorrect BOOTMODE type: %s")\r
 WRN_INVALID_MODULE_TYPE = \\r
-    _("This is an incorrect Module type: %s")  \r
+    _("This is an incorrect Module type: %s")\r
 WRN_MODULE_PARSE_FAILED = \\r
     _("Parsing of this module did not complete correctly: %s.")\r
 WRN_EDK1_INF_FOUND = \\r
@@ -826,7 +826,7 @@ HLP_PRINT_DEBUG_INFO             = _(
     "Print DEBUG statements, where DEBUG_LEVEL is 0-9")\r
 HLP_PRINT_INFORMATIONAL_STATEMENT = _("Print informational statements")\r
 HLP_RETURN_NO_DISPLAY            = _(\r
-    "Returns only the exit code, informational and error messages are" \r
+    "Returns only the exit code, informational and error messages are"\r
     " not displayed")\r
 HLP_RETURN_AND_DISPLAY           = _(\r
     "Returns the exit code and displays  error messages only")\r
index 5065b370a30445189c52ee07d4bf72c199672c75..7f7df9c6d5bd2b5fba78542892b07ebd01b06333 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # Standardized Error Hanlding infrastructures.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
index 2881ac77115a6421ca3eed2245b37271a5e2d3dc..494c2d47e94f15a200903534163fda77c5cf166a 100644 (file)
@@ -4,11 +4,11 @@
 # This file is required to make Python interpreter treat the directory\r
 # as containing package.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,4 +17,4 @@
 \r
 '''\r
 Logger\r
-'''
\ No newline at end of file
+'''\r
index e7ec328a78d9be0830c51fcd4bebd087c2dd7bfb..37942b8ed9b3ff671a5b9898de3b794a1647048b 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # Install distribution package.\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -55,7 +55,7 @@ from Common.MultipleWorkspace import MultipleWorkspace as mws
 ## CheckForExistingDp\r
 #\r
 # Check if there is a same name DP file existing\r
-# @param Path: The path to be checked \r
+# @param Path: The path to be checked\r
 #\r
 def CheckForExistingDp(Path):\r
     if os.path.exists(Path):\r
@@ -76,7 +76,7 @@ def Main(Options = None):
     if Options is None:\r
         Logger.Error("\nMkPkg", OPTION_UNKNOWN_ERROR, ST.ERR_OPTION_NOT_FOUND)\r
     try:\r
-        DataBase = GlobalData.gDB        \r
+        DataBase = GlobalData.gDB\r
         ContentFileClosed = True\r
         WorkspaceDir = GlobalData.gWORKSPACE\r
 \r
@@ -85,7 +85,7 @@ def Main(Options = None):
         #\r
         if not Options.PackFileToCreate:\r
             Logger.Error("\nMkPkg", OPTION_UNKNOWN_ERROR, ST.ERR_OPTION_NOT_FOUND)\r
-        \r
+\r
         #\r
         # Handle if the distribution package file already exists\r
         #\r
@@ -95,7 +95,7 @@ def Main(Options = None):
         # Check package file existing and valid\r
         #\r
         CheckFileList('.DEC', Options.PackageFileList, ST.ERR_INVALID_PACKAGE_NAME, ST.ERR_INVALID_PACKAGE_PATH)\r
-        #            \r
+        #\r
         # Check module file existing and valid\r
         #\r
         CheckFileList('.INF', Options.ModuleFileList, ST.ERR_INVALID_MODULE_NAME, ST.ERR_INVALID_MODULE_PATH)\r
@@ -104,10 +104,10 @@ def Main(Options = None):
         # Get list of files that installed with RePackage attribute available\r
         #\r
         RePkgDict = DataBase.GetRePkgDict()\r
-              \r
-        ContentFile = PackageFile(GlobalData.gCONTENT_FILE, "w")       \r
+\r
+        ContentFile = PackageFile(GlobalData.gCONTENT_FILE, "w")\r
         ContentFileClosed = False\r
-        \r
+\r
         #\r
         # Add temp distribution header\r
         #\r
@@ -118,7 +118,7 @@ def Main(Options = None):
 \r
             #\r
             # add distribution level tool/misc files\r
-            # before pack, current dir should be workspace dir, else the full \r
+            # before pack, current dir should be workspace dir, else the full\r
             # path will be in the pack file\r
             #\r
             Cwd = getcwd()\r
@@ -132,8 +132,8 @@ def Main(Options = None):
                 FileList += MiscObject.GetFileList()\r
             for FileObject in FileList:\r
                 #\r
-                # If you have unicode file names, please convert them to byte \r
-                # strings in your desired encoding before passing them to \r
+                # If you have unicode file names, please convert them to byte\r
+                # strings in your desired encoding before passing them to\r
                 # write().\r
                 #\r
                 FromFile = os.path.normpath(FileObject.GetURI()).encode('utf_8')\r
@@ -151,8 +151,8 @@ def Main(Options = None):
                         DistPkg.Header.RePackage = True\r
                 ContentFile.PackFile(FromFile)\r
             chdir(Cwd)\r
-        \r
-        #    \r
+\r
+        #\r
         # Add init dp information\r
         #\r
         else:\r
@@ -160,14 +160,14 @@ def Main(Options = None):
             DistPkg.Header.Name = 'Distribution Package'\r
             DistPkg.Header.Guid = str(uuid4())\r
             DistPkg.Header.Version = '1.0'\r
-            \r
+\r
         DistPkg.GetDistributionPackage(WorkspaceDir, Options.PackageFileList, \\r
                                        Options.ModuleFileList)\r
         FileList, MetaDataFileList = DistPkg.GetDistributionFileList()\r
         for File in FileList + MetaDataFileList:\r
             FileFullPath = os.path.normpath(os.path.join(WorkspaceDir, File))\r
             #\r
-            # check whether file was included in a distribution that can not \r
+            # check whether file was included in a distribution that can not\r
             # be repackaged\r
             #\r
             if FileFullPath in RePkgDict:\r
@@ -182,17 +182,17 @@ def Main(Options = None):
                                  )\r
                 else:\r
                     DistPkg.Header.RePackage = True\r
-          \r
+\r
         Cwd = getcwd()\r
         chdir(WorkspaceDir)\r
         ContentFile.PackFiles(FileList)\r
         chdir(Cwd)\r
-        \r
-        Logger.Verbose(ST.MSG_COMPRESS_DISTRIBUTION_PKG) \r
-        \r
+\r
+        Logger.Verbose(ST.MSG_COMPRESS_DISTRIBUTION_PKG)\r
+\r
         ContentFile.Close()\r
         ContentFileClosed = True\r
-        \r
+\r
         #\r
         # Add Md5Sigature\r
         #\r
@@ -201,7 +201,7 @@ def Main(Options = None):
         # Add current Date\r
         #\r
         DistPkg.Header.Date = str(strftime("%Y-%m-%dT%H:%M:%S", localtime()))\r
-        \r
+\r
         #\r
         # Finish final dp file\r
         #\r
@@ -214,7 +214,7 @@ def Main(Options = None):
         ReturnCode = 0\r
 \r
     except FatalError as XExcept:\r
-        ReturnCode = XExcept.args[0]        \r
+        ReturnCode = XExcept.args[0]\r
         if Logger.GetLevel() <= Logger.DEBUG_9:\r
             Logger.Quiet(ST.MSG_PYTHON_ON % \\r
                          (python_version(), platform) + format_exc())\r
@@ -247,7 +247,7 @@ def Main(Options = None):
 \r
 \r
 ## CheckFileList\r
-# \r
+#\r
 # @param QualifiedExt:             QualifiedExt\r
 # @param FileList:                 FileList\r
 # @param ErrorStringExt:           ErrorStringExt\r
@@ -263,7 +263,7 @@ def CheckFileList(QualifiedExt, FileList, ErrorStringExt, ErrorStringFullPath):
         if Ext.upper() != QualifiedExt.upper():\r
             Logger.Error("\nMkPkg", OPTION_VALUE_INVALID, \\r
                          ErrorStringExt % Item)\r
-        \r
+\r
         Item = os.path.normpath(Item)\r
         Path = mws.join(WorkspaceDir, Item)\r
         if not os.path.exists(Path):\r
@@ -274,7 +274,7 @@ def CheckFileList(QualifiedExt, FileList, ErrorStringExt, ErrorStringFullPath):
         elif not IsValidPath(Item, WorkspaceDir):\r
             Logger.Error("\nMkPkg", OPTION_VALUE_INVALID, \\r
                          ErrorStringExt % Item)\r
-        \r
+\r
         if not os.path.split(Item)[0]:\r
             Logger.Error("\nMkPkg", OPTION_VALUE_INVALID, \\r
                          ST.ERR_INVALID_METAFILE_PATH % Item)\r
index ec8a8d44ce5c45aba19426a62336c3bc69b4dc3e..a4fc5876e6405f95e6224c7bb6dab665dc852fcf 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file is used to define common items of class object\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -23,10 +23,10 @@ from Library.DataType import TAB_LANGUAGE_EN_US
 class HelpTextObject(object):\r
     def __init__(self):\r
         self.HelpText = TextObject()\r
-    \r
+\r
     def SetHelpText(self, HelpText):\r
         self.HelpText = HelpText\r
-    \r
+\r
     def GetHelpText(self):\r
         return self.HelpText\r
 \r
@@ -37,10 +37,10 @@ class HelpTextObject(object):
 class HelpTextListObject(object):\r
     def __init__(self):\r
         self.HelpTextList = []\r
-    \r
+\r
     def SetHelpTextList(self, HelpTextList):\r
         self.HelpTextList = HelpTextList\r
-    \r
+\r
     def GetHelpTextList(self):\r
         return self.HelpTextList\r
 \r
@@ -51,13 +51,13 @@ class HelpTextListObject(object):
 class PromptListObject(object):\r
     def __init__(self):\r
         self.PromptList = []\r
-    \r
+\r
     def SetPromptList(self, PromptList):\r
         self.PromptList = PromptList\r
-    \r
+\r
     def GetPromptList(self):\r
         return self.PromptList\r
-    \r
+\r
 ## CommonPropertiesObject\r
 #\r
 # This class defined common attribution used in Module/Platform/Package files\r
@@ -77,7 +77,7 @@ class CommonPropertiesObject(HelpTextObject, HelpTextListObject):
         self.GuidValue = ''\r
         HelpTextObject.__init__(self)\r
         HelpTextListObject.__init__(self)\r
-        \r
+\r
     def SetUsage(self, Usage):\r
         self.Usage = Usage\r
 \r
@@ -95,10 +95,10 @@ class CommonPropertiesObject(HelpTextObject, HelpTextListObject):
 \r
     def GetSupArchList(self):\r
         return self.SupArchList\r
-    \r
+\r
     def SetGuidValue(self, GuidValue):\r
         self.GuidValue = GuidValue\r
-        \r
+\r
     def GetGuidValue(self):\r
         return self.GuidValue\r
 \r
@@ -199,11 +199,11 @@ class BinaryHeaderObject(object):
 \r
     def GetBinaryHeaderLicense(self):\r
         return self.BinaryHeaderLicenseList\r
-    \r
+\r
 ## ClonedRecordObject\r
 #\r
 # This class defined ClonedRecord items used in Module/Platform/Package files\r
-# \r
+#\r
 # @param object:        Inherited from object class\r
 #\r
 class ClonedRecordObject(object):\r
@@ -285,7 +285,7 @@ class FileNameObject(CommonPropertiesObject):
         self.FileType = ''\r
         self.Filename = ''\r
         CommonPropertiesObject.__init__(self)\r
-        \r
+\r
     def SetFileType(self, FileType):\r
         self.FileType = FileType\r
 \r
@@ -306,10 +306,10 @@ class FileNameObject(CommonPropertiesObject):
 #\r
 class FileObject(object):\r
     def __init__(self):\r
-        self.Executable = '' \r
+        self.Executable = ''\r
         self.Uri = ''\r
         self.OsType = ''\r
-        \r
+\r
     def SetExecutable(self, Executable):\r
         self.Executable = Executable\r
 \r
@@ -327,8 +327,8 @@ class FileObject(object):
 \r
     def GetOS(self):\r
         return self.OsType\r
-    \r
-## \r
+\r
+##\r
 # MiscFileObject is used for xml\r
 #\r
 # @param CommonHeaderObject:   Inherited from CommonHeaderObject class\r
@@ -336,18 +336,18 @@ class FileObject(object):
 class MiscFileObject(CommonHeaderObject):\r
     def __init__(self):\r
         self.Name = ''\r
-        self.FileList = [] \r
+        self.FileList = []\r
         CommonHeaderObject.__init__(self)\r
-        \r
+\r
     def SetName(self, Name):\r
         self.Name = Name\r
-    \r
+\r
     def GetName(self):\r
         return self.Name\r
-    \r
+\r
     def SetFileList(self, FileList):\r
         self.FileList = FileList\r
-        \r
+\r
     def GetFileList(self):\r
         return self.FileList\r
 \r
@@ -397,7 +397,7 @@ class IdentificationObject(GuidVersionObject):
         self.ModulePath = ''\r
         self.CombinePath = ''\r
         GuidVersionObject.__init__(self)\r
-        \r
+\r
     def SetName(self, Name):\r
         self.Name = Name\r
 \r
@@ -448,7 +448,7 @@ class IdentificationObject(GuidVersionObject):
 \r
 ## GuidProtocolPpiCommonObject\r
 #\r
-# This class defined Guid, Protocol and Ppi like items used in \r
+# This class defined Guid, Protocol and Ppi like items used in\r
 # Module/Platform/Package files\r
 #\r
 # @param CommonPropertiesObject:    Inherited from CommonPropertiesObject class\r
@@ -460,7 +460,7 @@ class GuidProtocolPpiCommonObject(CommonPropertiesObject):
         self.Guid = ''\r
         self.SupModuleList = []\r
         CommonPropertiesObject.__init__(self)\r
-        \r
+\r
     def SetName(self, Name):\r
         self.Name = Name\r
 \r
@@ -512,7 +512,7 @@ class GuidObject(GuidProtocolPpiCommonObject):
 #\r
 # This class defined Protocol item used in Module/Platform/Package files\r
 #\r
-# @param GuidProtocolPpiCommonObject:  Inherited from \r
+# @param GuidProtocolPpiCommonObject:  Inherited from\r
 #                                      GuidProtocolPpiCommonObject\r
 #\r
 class ProtocolObject(GuidProtocolPpiCommonObject):\r
@@ -529,7 +529,7 @@ class ProtocolObject(GuidProtocolPpiCommonObject):
 #\r
 # This class defined Ppi item used in Module/Platform/Package files\r
 #\r
-# @param GuidProtocolPpiCommonObject:  Inherited from \r
+# @param GuidProtocolPpiCommonObject:  Inherited from\r
 #                                      GuidProtocolPpiCommonObject\r
 #\r
 class PpiObject(GuidProtocolPpiCommonObject):\r
@@ -566,13 +566,13 @@ class UserExtensionObject(object):
         self.BinaryLicenseList = []\r
         self.UniLangDefsList = []\r
         #\r
-        # { Statement : Arch , ... }    \r
+        # { Statement : Arch , ... }\r
         #\r
-        self.DefinesDict = {} \r
+        self.DefinesDict = {}\r
         #\r
         # { Arch : Statement , ... }\r
         #\r
-        self.BuildOptionDict = {} \r
+        self.BuildOptionDict = {}\r
         self.IncludesDict = {}\r
         self.SourcesDict = {}\r
         self.BinariesDict = {}\r
@@ -581,40 +581,40 @@ class UserExtensionObject(object):
         #\r
         self.Statement = ''\r
         self.SupArchList = []\r
-        \r
+\r
     def SetStatement(self, Statement):\r
         self.Statement = Statement\r
-    \r
+\r
     def GetStatement(self):\r
         return self.Statement\r
 \r
     def SetSupArchList(self, ArchList):\r
         self.SupArchList = ArchList\r
-    \r
+\r
     def GetSupArchList(self):\r
         return self.SupArchList\r
-        \r
+\r
     def SetUserID(self, UserID):\r
         self.UserID = UserID\r
-    \r
+\r
     def GetUserID(self):\r
         return self.UserID\r
-    \r
+\r
     def SetIdentifier(self, Identifier):\r
         self.Identifier = Identifier\r
-        \r
+\r
     def GetIdentifier(self):\r
         return self.Identifier\r
-    \r
+\r
     def SetUniLangDefsList(self, UniLangDefsList):\r
         self.UniLangDefsList = UniLangDefsList\r
-        \r
+\r
     def GetUniLangDefsList(self):\r
         return self.UniLangDefsList\r
-    \r
+\r
     def SetBinaryAbstract(self, BinaryAbstractList):\r
         self.BinaryAbstractList = BinaryAbstractList\r
-    \r
+\r
     def GetBinaryAbstract(self, Lang=None):\r
         if Lang:\r
             for (Key, Value) in self.BinaryAbstractList:\r
@@ -623,10 +623,10 @@ class UserExtensionObject(object):
             return None\r
         else:\r
             return self.BinaryAbstractList\r
-    \r
+\r
     def SetBinaryDescription(self, BinaryDescriptionList):\r
         self.BinaryDescriptionList = BinaryDescriptionList\r
-    \r
+\r
     def GetBinaryDescription(self, Lang=None):\r
         if Lang:\r
             for (Key, Value) in self.BinaryDescriptionList:\r
@@ -635,10 +635,10 @@ class UserExtensionObject(object):
             return None\r
         else:\r
             return self.BinaryDescriptionList\r
-    \r
+\r
     def SetBinaryCopyright(self, BinaryCopyrightList):\r
         self.BinaryCopyrightList = BinaryCopyrightList\r
-    \r
+\r
     def GetBinaryCopyright(self, Lang=None):\r
         if Lang:\r
             for (Key, Value) in self.BinaryCopyrightList:\r
@@ -647,10 +647,10 @@ class UserExtensionObject(object):
             return None\r
         else:\r
             return self.BinaryCopyrightList\r
-    \r
+\r
     def SetBinaryLicense(self, BinaryLicenseList):\r
         self.BinaryLicenseList = BinaryLicenseList\r
-    \r
+\r
     def GetBinaryLicense(self, Lang=None):\r
         if Lang:\r
             for (Key, Value) in self.BinaryLicenseList:\r
@@ -659,34 +659,34 @@ class UserExtensionObject(object):
             return None\r
         else:\r
             return self.BinaryLicenseList\r
-    \r
+\r
     def SetDefinesDict(self, DefinesDict):\r
         self.DefinesDict = DefinesDict\r
-    \r
+\r
     def GetDefinesDict(self):\r
         return self.DefinesDict\r
-    \r
+\r
     def SetBuildOptionDict(self, BuildOptionDict):\r
         self.BuildOptionDict = BuildOptionDict\r
-        \r
+\r
     def GetBuildOptionDict(self):\r
         return self.BuildOptionDict\r
 \r
     def SetIncludesDict(self, IncludesDict):\r
         self.IncludesDict = IncludesDict\r
-        \r
+\r
     def GetIncludesDict(self):\r
         return self.IncludesDict\r
 \r
     def SetSourcesDict(self, SourcesDict):\r
         self.SourcesDict = SourcesDict\r
-        \r
+\r
     def GetSourcesDict(self):\r
         return self.SourcesDict\r
 \r
     def SetBinariesDict(self, BinariesDict):\r
         self.BinariesDict = BinariesDict\r
-        \r
+\r
     def GetBinariesDict(self):\r
         return self.BinariesDict\r
 \r
@@ -703,28 +703,28 @@ class LibraryClassObject(CommonPropertiesObject):
         self.SupModuleList = []\r
         self.RecommendedInstance = GuidVersionObject()\r
         CommonPropertiesObject.__init__(self)\r
-        \r
+\r
     def SetLibraryClass(self, LibraryClass):\r
         self.LibraryClass = LibraryClass\r
-    \r
+\r
     def GetLibraryClass(self):\r
         return self.LibraryClass\r
-    \r
+\r
     def SetSupModuleList(self, SupModuleList):\r
         self.SupModuleList = SupModuleList\r
-    \r
+\r
     def GetSupModuleList(self):\r
         return self.SupModuleList\r
-    \r
+\r
     def SetIncludeHeader(self, IncludeHeader):\r
         self.IncludeHeader = IncludeHeader\r
-        \r
+\r
     def GetIncludeHeader(self):\r
         return self.IncludeHeader\r
-    \r
+\r
     def SetRecommendedInstance(self, RecommendedInstance):\r
         self.RecommendedInstance = RecommendedInstance\r
-    \r
+\r
     def GetRecommendedInstance(self):\r
         return self.RecommendedInstance\r
 \r
@@ -748,69 +748,69 @@ class PcdErrorObject(object):
 \r
     def SetValidValue(self, ValidValue):\r
         self.ValidValue = ValidValue\r
-    \r
+\r
     def GetValidValue(self):\r
         return self.ValidValue\r
-    \r
+\r
     def SetValidValueLang(self, ValidValueLang):\r
         self.ValidValueLang = ValidValueLang\r
-        \r
+\r
     def GetValidValueLang(self):\r
         return self.ValidValueLang\r
-    \r
+\r
     def SetValidValueRange(self, ValidValueRange):\r
         self.ValidValueRange = ValidValueRange\r
-        \r
+\r
     def GetValidValueRange(self):\r
         return self.ValidValueRange\r
-    \r
+\r
     def SetExpression(self, Expression):\r
         self.Expression = Expression\r
-    \r
+\r
     def GetExpression(self):\r
         return self.Expression\r
-    \r
+\r
     def SetErrorNumber(self, ErrorNumber):\r
         self.ErrorNumber = ErrorNumber\r
-        \r
+\r
     def GetErrorNumber(self):\r
         return self.ErrorNumber\r
-    \r
+\r
     def SetErrorMessageList(self, ErrorMessageList):\r
         self.ErrorMessageList = ErrorMessageList\r
-        \r
+\r
     def GetErrorMessageList(self):\r
         return self.ErrorMessageList\r
-    \r
+\r
     def SetTokenSpaceGuidCName(self, TokenSpaceGuidCName):\r
         self.TokenSpaceGuidCName = TokenSpaceGuidCName\r
-        \r
+\r
     def GetTokenSpaceGuidCName(self):\r
         return self.TokenSpaceGuidCName\r
-    \r
+\r
     def SetCName(self, CName):\r
         self.CName = CName\r
-        \r
+\r
     def GetCName(self):\r
         return self.CName\r
-    \r
+\r
     def SetFileLine(self, FileLine):\r
         self.FileLine = FileLine\r
-        \r
+\r
     def GetFileLine(self):\r
         return self.FileLine\r
-    \r
+\r
     def SetLineNum(self, LineNum):\r
         self.LineNum = LineNum\r
-        \r
+\r
     def GetLineNum(self):\r
         return self.LineNum\r
-    \r
-    \r
+\r
+\r
 ## IncludeObject\r
 #\r
 # This class defined Include item used in Module/Platform/Package files\r
-# \r
+#\r
 # @param CommonPropertiesObject:  Inherited from CommonPropertiesObject class\r
 #\r
 class IncludeObject(CommonPropertiesObject):\r
@@ -820,31 +820,31 @@ class IncludeObject(CommonPropertiesObject):
         self.SupModuleList = []\r
         self.Comment = ''\r
         CommonPropertiesObject.__init__(self)\r
-    \r
+\r
     def SetFilePath(self, FilePath):\r
         self.FilePath = FilePath\r
-    \r
+\r
     def GetFilePath(self):\r
         return self.FilePath\r
-    \r
+\r
     def SetModuleType(self, ModuleType):\r
         self.ModuleType = ModuleType\r
-    \r
+\r
     def GetModuleType(self):\r
         return self.ModuleType\r
-    \r
+\r
     def SetSupModuleList(self, SupModuleList):\r
         self.SupModuleList = SupModuleList\r
\r
+\r
     def GetSupModuleList(self):\r
-        return self.SupModuleList              \r
-               \r
+        return self.SupModuleList\r
+\r
     def SetComment(self, Comment):\r
         self.Comment = Comment\r
\r
+\r
     def GetComment(self):\r
-        return self.Comment \r
-    \r
+        return self.Comment\r
+\r
 ## PcdObject\r
 #\r
 # This class defined Pcd item used in Module/Platform/Package files\r
@@ -874,86 +874,86 @@ class PcdObject(CommonPropertiesObject, HelpTextListObject, PromptListObject):
         self.Offset = ''\r
         self.ValidUsage = ''\r
         self.ItemType = ''\r
-        self.PcdErrorsList = [] \r
-        self.SupModuleList = []        \r
+        self.PcdErrorsList = []\r
+        self.SupModuleList = []\r
         CommonPropertiesObject.__init__(self)\r
         HelpTextListObject.__init__(self)\r
         PromptListObject.__init__(self)\r
-    \r
+\r
     def SetPcdCName(self, PcdCName):\r
         self.PcdCName = PcdCName\r
-        \r
+\r
     def GetPcdCName(self):\r
         return self.PcdCName\r
-    \r
+\r
     def SetCName(self, CName):\r
         self.CName = CName\r
-    \r
+\r
     def GetCName(self):\r
         return self.CName\r
-    \r
+\r
     def SetToken(self, Token):\r
         self.Token = Token\r
-    \r
+\r
     def GetOffset(self):\r
         return self.Offset\r
 \r
     def SetOffset(self, Offset):\r
         self.Offset = Offset\r
-    \r
+\r
     def GetToken(self):\r
         return self.Token\r
-    \r
+\r
     def SetTokenSpaceGuidCName(self, TokenSpaceGuidCName):\r
         self.TokenSpaceGuidCName = TokenSpaceGuidCName\r
-    \r
+\r
     def GetTokenSpaceGuidCName(self):\r
         return self.TokenSpaceGuidCName\r
-    \r
+\r
     def SetTokenSpaceGuidValue(self, TokenSpaceGuidValue):\r
         self.TokenSpaceGuidValue = TokenSpaceGuidValue\r
-    \r
+\r
     def GetTokenSpaceGuidValue(self):\r
         return self.TokenSpaceGuidValue\r
-    \r
+\r
     def SetDatumType(self, DatumType):\r
         self.DatumType = DatumType\r
-        \r
+\r
     def GetDatumType(self):\r
         return self.DatumType\r
-    \r
+\r
     def SetMaxDatumSize(self, MaxDatumSize):\r
         self.MaxDatumSize = MaxDatumSize\r
-    \r
+\r
     def GetMaxDatumSize(self):\r
         return self.MaxDatumSize\r
 \r
     def SetDefaultValue(self, DefaultValue):\r
         self.DefaultValue = DefaultValue\r
-        \r
+\r
     def GetDefaultValue(self):\r
         return self.DefaultValue\r
 \r
     def SetValidUsage(self, ValidUsage):\r
         self.ValidUsage = ValidUsage\r
-    \r
+\r
     def GetValidUsage(self):\r
         return self.ValidUsage\r
-    \r
+\r
     def SetPcdErrorsList(self, PcdErrorsList):\r
         self.PcdErrorsList = PcdErrorsList\r
-    \r
+\r
     def GetPcdErrorsList(self):\r
         return self.PcdErrorsList\r
 \r
     def SetItemType(self, ItemType):\r
         self.ItemType = ItemType\r
-        \r
+\r
     def GetItemType(self):\r
         return self.ItemType\r
 \r
     def SetSupModuleList(self, SupModuleList):\r
         self.SupModuleList = SupModuleList\r
-        \r
+\r
     def GetSupModuleList(self):\r
         return self.SupModuleList\r
index 4052d2883596d01971984428f491441a7fb6db7c..6bccd2ba4f66d0db76f9a3f38450baf8b2882bf0 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file is used to define a class object to describe a module\r
 #\r
-# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,16 +17,16 @@ ModuleObject
 \r
 ##\r
 # Import Modules\r
-#                     \r
+#\r
 from Object.POM.CommonObject import CommonPropertiesObject\r
 from Object.POM.CommonObject import IdentificationObject\r
 from Object.POM.CommonObject import CommonHeaderObject\r
 from Object.POM.CommonObject import BinaryHeaderObject\r
 from Object.POM.CommonObject import HelpTextListObject\r
 from Object.POM.CommonObject import GuidVersionObject\r
-                         \r
 \r
-## \r
+\r
+##\r
 # BootModeObject\r
 #\r
 class BootModeObject(CommonPropertiesObject, HelpTextListObject):\r
@@ -34,10 +34,10 @@ class BootModeObject(CommonPropertiesObject, HelpTextListObject):
         self.SupportedBootModes = ''\r
         CommonPropertiesObject.__init__(self)\r
         HelpTextListObject.__init__(self)\r
-    \r
+\r
     def SetSupportedBootModes(self, SupportedBootModes):\r
         self.SupportedBootModes = SupportedBootModes\r
-    \r
+\r
     def GetSupportedBootModes(self):\r
         return self.SupportedBootModes\r
 \r
@@ -49,10 +49,10 @@ class EventObject(CommonPropertiesObject, HelpTextListObject):
         self.EventType = ''\r
         CommonPropertiesObject.__init__(self)\r
         HelpTextListObject.__init__(self)\r
-    \r
+\r
     def SetEventType(self, EventType):\r
         self.EventType = EventType\r
-    \r
+\r
     def GetEventType(self):\r
         return self.EventType\r
 \r
@@ -64,10 +64,10 @@ class HobObject(CommonPropertiesObject, HelpTextListObject):
         self.HobType = ''\r
         CommonPropertiesObject.__init__(self)\r
         HelpTextListObject.__init__(self)\r
-        \r
+\r
     def SetHobType(self, HobType):\r
         self.HobType = HobType\r
-    \r
+\r
     def GetHobType(self):\r
         return self.HobType\r
 \r
@@ -78,23 +78,23 @@ class SpecObject(object):
     def __init__(self):\r
         self.Spec = ''\r
         self.Version = ''\r
-    \r
+\r
     def SetSpec(self, Spec):\r
         self.Spec = Spec\r
-    \r
+\r
     def GetSpec(self):\r
         return self.Spec\r
-    \r
+\r
     def SetVersion(self, Version):\r
         self.Version = Version\r
-    \r
+\r
     def GetVersion(self):\r
         return self.Version\r
 \r
 ## ModuleHeaderObject\r
 #\r
 # This class defined header items used in Module file\r
-# \r
+#\r
 class ModuleHeaderObject(IdentificationObject, CommonHeaderObject, BinaryHeaderObject):\r
     def __init__(self):\r
         self.IsLibrary = False\r
@@ -109,97 +109,97 @@ class ModuleHeaderObject(IdentificationObject, CommonHeaderObject, BinaryHeaderO
         #\r
         # SpecObject\r
         #\r
-        self.SpecList = []              \r
+        self.SpecList = []\r
         #\r
         # BootModeObject\r
         #\r
-        self.BootModeList = []          \r
+        self.BootModeList = []\r
         #\r
         # EventObject\r
         #\r
-        self.EventList = []             \r
+        self.EventList = []\r
         #\r
         # HobObject\r
         #\r
         self.HobList = []\r
-        #               \r
+        #\r
         # LibraryClassObject\r
         #\r
-        self.LibraryClassList = []      \r
+        self.LibraryClassList = []\r
         self.SupArchList = []\r
         IdentificationObject.__init__(self)\r
         CommonHeaderObject.__init__(self)\r
         BinaryHeaderObject.__init__(self)\r
-    \r
+\r
     def SetIsLibrary(self, IsLibrary):\r
         self.IsLibrary = IsLibrary\r
-    \r
+\r
     def GetIsLibrary(self):\r
         return self.IsLibrary\r
-    \r
+\r
     def SetIsLibraryModList(self, IsLibraryModList):\r
         self.IsLibraryModList = IsLibraryModList\r
-    \r
+\r
     def GetIsLibraryModList(self):\r
         return self.IsLibraryModList\r
-    \r
+\r
     def SetModuleType(self, ModuleType):\r
         self.ModuleType = ModuleType\r
-    \r
+\r
     def GetModuleType(self):\r
         return self.ModuleType\r
-    \r
+\r
     def SetBinaryModule(self, BinaryModule):\r
         self.BinaryModule = BinaryModule\r
-        \r
+\r
     def GetBinaryModule(self):\r
         return self.BinaryModule\r
-    \r
+\r
     def SetPcdIsDriver(self, PcdIsDriver):\r
         self.PcdIsDriver = PcdIsDriver\r
-        \r
+\r
     def GetPcdIsDriver(self):\r
         return self.PcdIsDriver\r
-    \r
+\r
     def SetPiSpecificationVersion(self, PiSpecificationVersion):\r
         self.PiSpecificationVersion = PiSpecificationVersion\r
-        \r
+\r
     def GetPiSpecificationVersion(self):\r
         return self.PiSpecificationVersion\r
-    \r
+\r
     def SetUefiSpecificationVersion(self, UefiSpecificationVersion):\r
         self.UefiSpecificationVersion = UefiSpecificationVersion\r
-    \r
+\r
     def GetUefiSpecificationVersion(self):\r
         return self.UefiSpecificationVersion\r
-    \r
+\r
     def SetSpecList(self, SpecList):\r
         self.SpecList = SpecList\r
-        \r
+\r
     def GetSpecList(self):\r
         return self.SpecList\r
-    \r
+\r
     def SetBootModeList(self, BootModeList):\r
         self.BootModeList = BootModeList\r
-        \r
+\r
     def GetBootModeList(self):\r
         return self.BootModeList\r
-    \r
+\r
     def SetEventList(self, EventList):\r
         self.EventList = EventList\r
-    \r
+\r
     def GetEventList(self):\r
         return self.EventList\r
-    \r
+\r
     def SetHobList(self, HobList):\r
         self.HobList = HobList\r
-    \r
+\r
     def GetHobList(self):\r
         return self.HobList\r
 \r
     def SetLibraryClassList(self, LibraryClassList):\r
         self.LibraryClassList = LibraryClassList\r
-    \r
+\r
     def GetLibraryClassList(self):\r
         return self.LibraryClassList\r
 \r
@@ -225,38 +225,38 @@ class SourceFileObject(CommonPropertiesObject):
         self.ToolCode = ''\r
         self.Family = ''\r
         self.FileType = ''\r
-    \r
+\r
     def SetSourceFile(self, SourceFile):\r
         self.SourceFile = SourceFile\r
-    \r
+\r
     def GetSourceFile(self):\r
         return  self.SourceFile\r
-    \r
+\r
     def SetTagName(self, TagName):\r
         self.TagName = TagName\r
-    \r
+\r
     def GetTagName(self):\r
         return self.TagName\r
-    \r
+\r
     def SetToolCode(self, ToolCode):\r
         self.ToolCode = ToolCode\r
-    \r
+\r
     def GetToolCode(self):\r
         return self.ToolCode\r
-    \r
+\r
     def SetFamily(self, Family):\r
         self.Family = Family\r
-    \r
+\r
     def GetFamily(self):\r
         return self.Family\r
-    \r
+\r
     def SetFileType(self, FileType):\r
         self.FileType = FileType\r
-        \r
+\r
     def GetFileType(self):\r
         return self.FileType\r
 \r
-       \r
+\r
 ##\r
 # BinaryFileObject\r
 #\r
@@ -265,7 +265,7 @@ class BinaryFileObject(CommonPropertiesObject):
         self.FileNamList = []\r
         self.AsBuiltList = []\r
         CommonPropertiesObject.__init__(self)\r
-        \r
+\r
     def SetFileNameList(self, FileNamList):\r
         self.FileNamList = FileNamList\r
 \r
@@ -277,7 +277,7 @@ class BinaryFileObject(CommonPropertiesObject):
 \r
     def GetAsBuiltList(self):\r
         return self.AsBuiltList\r
-               \r
+\r
 \r
 ##\r
 # AsBuildLibraryClassObject\r
@@ -287,12 +287,12 @@ class AsBuildLibraryClassObject(object):
         self.LibGuid = ''\r
         self.LibVersion = ''\r
         self.SupArchList = []\r
-    \r
+\r
     def SetLibGuid(self, LibGuid):\r
         self.LibGuid = LibGuid\r
     def GetLibGuid(self):\r
         return self.LibGuid\r
-    \r
+\r
     def SetLibVersion(self, LibVersion):\r
         self.LibVersion = LibVersion\r
     def GetLibVersion(self):\r
@@ -342,7 +342,7 @@ class AsBuiltObject(object):
 \r
     def GetLibraryInstancesList(self):\r
         return self.LibraryInstancesList\r
-    \r
+\r
     def SetBuildFlagsList(self, BinaryBuildFlagList):\r
         self.BinaryBuildFlagList = BinaryBuildFlagList\r
 \r
@@ -351,7 +351,7 @@ class AsBuiltObject(object):
 \r
 ##\r
 # BinaryBuildFlag, this object will include those fields that are not\r
-# covered by the UPT Spec BinaryFile field \r
+# covered by the UPT Spec BinaryFile field\r
 #\r
 class BinaryBuildFlagObject(object):\r
     def __init__(self):\r
@@ -359,31 +359,31 @@ class BinaryBuildFlagObject(object):
         self.TagName = ''\r
         self.Family = ''\r
         self.AsBuiltOptionFlags = ''\r
-        \r
+\r
     def SetTarget(self, Target):\r
         self.Target = Target\r
 \r
     def GetTarget(self):\r
-        return self.Target        \r
+        return self.Target\r
 \r
     def SetTagName(self, TagName):\r
         self.TagName = TagName\r
-        \r
+\r
     def GetTagName(self):\r
         return self.TagName\r
-    \r
+\r
     def SetFamily(self, Family):\r
         self.Family = Family\r
-        \r
+\r
     def GetFamily(self):\r
         return self.Family\r
-    \r
+\r
     def SetAsBuiltOptionFlags(self, AsBuiltOptionFlags):\r
         self.AsBuiltOptionFlags = AsBuiltOptionFlags\r
     def GetAsBuiltOptionFlags(self):\r
         return self.AsBuiltOptionFlags\r
-                \r
-## \r
+\r
+##\r
 # ExternObject\r
 #\r
 class ExternObject(CommonPropertiesObject):\r
@@ -394,31 +394,31 @@ class ExternObject(CommonPropertiesObject):
         self.Destructor = ''\r
         self.SupModList = []\r
         CommonPropertiesObject.__init__(self)\r
-        \r
+\r
     def SetEntryPoint(self, EntryPoint):\r
         self.EntryPoint = EntryPoint\r
-    \r
+\r
     def GetEntryPoint(self):\r
         return self.EntryPoint\r
-    \r
+\r
     def SetUnloadImage(self, UnloadImage):\r
         self.UnloadImage = UnloadImage\r
-    \r
+\r
     def GetUnloadImage(self):\r
         return self.UnloadImage\r
-    \r
+\r
     def SetConstructor(self, Constructor):\r
         self.Constructor = Constructor\r
-    \r
+\r
     def GetConstructor(self):\r
         return self.Constructor\r
-    \r
+\r
     def SetDestructor(self, Destructor):\r
         self.Destructor = Destructor\r
-    \r
+\r
     def GetDestructor(self):\r
         return self.Destructor\r
-    \r
+\r
     def SetSupModList(self, SupModList):\r
         self.SupModList = SupModList\r
     def GetSupModList(self):\r
@@ -432,16 +432,16 @@ class DepexObject(CommonPropertiesObject):
         self.Depex = ''\r
         self.ModuelType = ''\r
         CommonPropertiesObject.__init__(self)\r
-        \r
+\r
     def SetDepex(self, Depex):\r
         self.Depex = Depex\r
-    \r
+\r
     def GetDepex(self):\r
         return self.Depex\r
-    \r
+\r
     def SetModuleType(self, ModuleType):\r
         self.ModuelType = ModuleType\r
-    \r
+\r
     def GetModuleType(self):\r
         return self.ModuelType\r
 \r
@@ -454,16 +454,16 @@ class PackageDependencyObject(GuidVersionObject, CommonPropertiesObject):
         self.PackageFilePath = ''\r
         GuidVersionObject.__init__(self)\r
         CommonPropertiesObject.__init__(self)\r
-        \r
+\r
     def SetPackageFilePath(self, PackageFilePath):\r
         self.PackageFilePath = PackageFilePath\r
-        \r
+\r
     def GetPackageFilePath(self):\r
         return self.PackageFilePath\r
 \r
     def SetPackage(self, Package):\r
         self.Package = Package\r
-        \r
+\r
     def GetPackage(self):\r
         return self.Package\r
 \r
@@ -474,13 +474,13 @@ class BuildOptionObject(CommonPropertiesObject):
     def __init__(self):\r
         CommonPropertiesObject.__init__(self)\r
         self.BuildOption = ''\r
-    \r
+\r
     def SetBuildOption(self, BuildOption):\r
         self.BuildOption = BuildOption\r
-    \r
+\r
     def GetBuildOption(self):\r
         return self.BuildOption\r
-    \r
+\r
 ##\r
 # ModuleObject\r
 #\r
@@ -489,172 +489,172 @@ class ModuleObject(ModuleHeaderObject):
         #\r
         # {Arch : ModuleHeaderObject}\r
         #\r
-        self.HeaderDict = {} \r
+        self.HeaderDict = {}\r
         #\r
         # LibraryClassObject\r
         #\r
-        self.LibraryClassList = [] \r
+        self.LibraryClassList = []\r
         #\r
         # SourceFileObject\r
         #\r
-        self.SourceFileList = [] \r
+        self.SourceFileList = []\r
         #\r
         # BinaryFileObject\r
         #\r
-        self.BinaryFileList = [] \r
+        self.BinaryFileList = []\r
         #\r
         # PackageDependencyObject\r
         #\r
-        self.PackageDependencyList = [] \r
+        self.PackageDependencyList = []\r
         #\r
         # DepexObject\r
         #\r
-        self.PeiDepex = [] \r
+        self.PeiDepex = []\r
         #\r
         # DepexObject\r
         #\r
-        self.DxeDepex = [] \r
+        self.DxeDepex = []\r
         #\r
         # DepexObject\r
         #\r
-        self.SmmDepex = [] \r
+        self.SmmDepex = []\r
         #\r
         # ProtocolObject\r
         #\r
-        self.ProtocolList = [] \r
+        self.ProtocolList = []\r
         #\r
         # PpiObject\r
         #\r
-        self.PpiList = [] \r
+        self.PpiList = []\r
         #\r
         # GuidObject\r
         #\r
-        self.GuidList = [] \r
+        self.GuidList = []\r
         #\r
         # PcdObject\r
         #\r
-        self.PcdList = [] \r
+        self.PcdList = []\r
         #\r
         # ExternObject\r
         #\r
-        self.ExternList = [] \r
+        self.ExternList = []\r
         #\r
         # BuildOptionObject\r
         #\r
-        self.BuildOptionList = [] \r
+        self.BuildOptionList = []\r
         #\r
         # UserExtensionObject\r
         #\r
-        self.UserExtensionList = [] \r
+        self.UserExtensionList = []\r
         #\r
         # MiscFileObject\r
         #\r
-        self.MiscFileList = [] \r
+        self.MiscFileList = []\r
         #\r
         # ClonedFromObject\r
         #\r
-        self.ClonedFrom = None \r
-        \r
+        self.ClonedFrom = None\r
+\r
         ModuleHeaderObject.__init__(self)\r
-        \r
+\r
     def SetHeaderDict(self, HeaderDict):\r
         self.HeaderDict = HeaderDict\r
-    \r
+\r
     def GetHeaderDict(self):\r
         return self.HeaderDict\r
-            \r
+\r
     def SetLibraryClassList(self, LibraryClassList):\r
         self.LibraryClassList = LibraryClassList\r
-    \r
+\r
     def GetLibraryClassList(self):\r
         return self.LibraryClassList\r
-    \r
+\r
     def SetSourceFileList(self, SourceFileList):\r
         self.SourceFileList = SourceFileList\r
-        \r
+\r
     def GetSourceFileList(self):\r
         return self.SourceFileList\r
-    \r
+\r
     def SetBinaryFileList(self, BinaryFileList):\r
         self.BinaryFileList = BinaryFileList\r
 \r
     def GetBinaryFileList(self):\r
         return self.BinaryFileList\r
-    \r
+\r
     def SetPackageDependencyList(self, PackageDependencyList):\r
         self.PackageDependencyList = PackageDependencyList\r
-        \r
+\r
     def GetPackageDependencyList(self):\r
         return self.PackageDependencyList\r
-    \r
+\r
     def SetPeiDepex(self, PeiDepex):\r
         self.PeiDepex = PeiDepex\r
-        \r
+\r
     def GetPeiDepex(self):\r
         return self.PeiDepex\r
-    \r
+\r
     def SetDxeDepex(self, DxeDepex):\r
         self.DxeDepex = DxeDepex\r
-        \r
+\r
     def GetDxeDepex(self):\r
         return self.DxeDepex\r
-    \r
+\r
     def SetSmmDepex(self, SmmDepex):\r
         self.SmmDepex = SmmDepex\r
-        \r
+\r
     def GetSmmDepex(self):\r
         return self.SmmDepex\r
-    \r
+\r
     def SetPpiList(self, PpiList):\r
         self.PpiList = PpiList\r
-        \r
+\r
     def GetPpiList(self):\r
         return self.PpiList\r
 \r
     def SetProtocolList(self, ProtocolList):\r
         self.ProtocolList = ProtocolList\r
-        \r
+\r
     def GetProtocolList(self):\r
         return self.ProtocolList\r
 \r
     def SetPcdList(self, PcdList):\r
         self.PcdList = PcdList\r
-        \r
+\r
     def GetPcdList(self):\r
         return self.PcdList\r
-    \r
+\r
     def SetGuidList(self, GuidList):\r
         self.GuidList = GuidList\r
-        \r
+\r
     def GetGuidList(self):\r
         return self.GuidList\r
-    \r
+\r
     def SetExternList(self, ExternList):\r
         self.ExternList = ExternList\r
 \r
     def GetExternList(self):\r
         return self.ExternList\r
-    \r
+\r
     def SetBuildOptionList(self, BuildOptionList):\r
         self.BuildOptionList = BuildOptionList\r
-        \r
+\r
     def GetBuildOptionList(self):\r
         return self.BuildOptionList\r
-    \r
+\r
     def SetUserExtensionList(self, UserExtensionList):\r
         self.UserExtensionList = UserExtensionList\r
-        \r
+\r
     def GetUserExtensionList(self):\r
         return self.UserExtensionList\r
-    \r
+\r
     def SetMiscFileList(self, MiscFileList):\r
         self.MiscFileList = MiscFileList\r
-        \r
+\r
     def GetMiscFileList(self):\r
         return self.MiscFileList\r
\r
+\r
     def SetClonedFrom(self, ClonedFrom):\r
         self.ClonedFrom = ClonedFrom\r
-        \r
+\r
     def GetClonedFrom(self):\r
         return self.ClonedFrom\r
index 57bdcf96a3525b3d6a751ce80ae1c667638892cb..46de837a44a6e0b16a05a5f5b6ceb033dbe22e46 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file is used to define a class object to describe a package\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -30,10 +30,10 @@ class StandardIncludeFileObject(CommonPropertiesObject):
     def __init__(self):\r
         CommonPropertiesObject.__init__(self)\r
         self.IncludeFile = ''\r
-    \r
+\r
     def SetIncludeFile(self, IncludeFile):\r
         self.IncludeFile = IncludeFile\r
-    \r
+\r
     def GetIncludeFile(self):\r
         return self.IncludeFile\r
 \r
@@ -53,19 +53,19 @@ class PackageObject(IdentificationObject, CommonHeaderObject, BinaryHeaderObject
         #\r
         # LibraryClassObject\r
         #\r
-        self.LibraryClassList = [] \r
+        self.LibraryClassList = []\r
         #\r
         # FileObject\r
         #\r
-        self.IncludePathList = [] \r
+        self.IncludePathList = []\r
         #\r
         # StandardIncludeFileObject\r
         #\r
-        self.StandardIncludeFileList = [] \r
+        self.StandardIncludeFileList = []\r
         #\r
         # PackageIncludeFileObject\r
         #\r
-        self.PackageIncludeFileList = [] \r
+        self.PackageIncludeFileList = []\r
         #\r
         # Include and Arch List, item is (IncludePath, SupArchList-List of Arch), used during install package\r
         #\r
@@ -73,126 +73,126 @@ class PackageObject(IdentificationObject, CommonHeaderObject, BinaryHeaderObject
         #\r
         # ProtocolObject\r
         #\r
-        self.ProtocolList = [] \r
+        self.ProtocolList = []\r
         #\r
         # PpiObject\r
         #\r
-        self.PpiList = [] \r
+        self.PpiList = []\r
         #\r
         # GuidObject\r
         #\r
-        self.GuidList = [] \r
+        self.GuidList = []\r
         #\r
         # (PcdObject, PcdErrorObject)\r
         #\r
-        self.PcdList = [] \r
+        self.PcdList = []\r
         #\r
         # {(PcdTokenSpaceGuidCName, PcdErrroNumber): PcdErrorMessageList}\r
         #\r
         self.PcdErrorCommentDict = {}\r
         #\r
         # UserExtensionObject\r
-        #        \r
-        self.UserExtensionList = [] \r
+        #\r
+        self.UserExtensionList = []\r
         #\r
         # MiscFileObject\r
         #\r
-        self.MiscFileList = [] \r
+        self.MiscFileList = []\r
         self.ModuleDict = Sdict()\r
         #\r
         # ClonedRecordObject\r
         #\r
-        self.ClonedFromList = [] \r
+        self.ClonedFromList = []\r
         #\r
         # string object\r
         #\r
-        self.ModuleFileList = [] \r
-        \r
+        self.ModuleFileList = []\r
+\r
         self.PcdChecks = []\r
-        \r
+\r
         self.UNIFlag = False\r
-        \r
+\r
     def SetLibraryClassList(self, LibraryClassList):\r
         self.LibraryClassList = LibraryClassList\r
-    \r
+\r
     def GetLibraryClassList(self):\r
         return self.LibraryClassList\r
-    \r
+\r
     def SetIncludePathList(self, IncludePathList):\r
         self.IncludePathList = IncludePathList\r
-    \r
+\r
     def GetIncludePathList(self):\r
         return self.IncludePathList\r
 \r
     def SetIncludeArchList(self, IncludeArchList):\r
         self.IncludeArchList = IncludeArchList\r
-    \r
+\r
     def GetIncludeArchList(self):\r
-        return self.IncludeArchList    \r
-    \r
+        return self.IncludeArchList\r
+\r
     def SetStandardIncludeFileList(self, StandardIncludeFileList):\r
         self.StandardIncludeFileList = StandardIncludeFileList\r
-        \r
+\r
     def GetStandardIncludeFileList(self):\r
         return self.StandardIncludeFileList\r
-    \r
+\r
     def SetPackageIncludeFileList(self, PackageIncludeFileList):\r
         self.PackageIncludeFileList = PackageIncludeFileList\r
-        \r
+\r
     def GetPackageIncludeFileList(self):\r
         return self.PackageIncludeFileList\r
-    \r
+\r
     def SetProtocolList(self, ProtocolList):\r
         self.ProtocolList = ProtocolList\r
-        \r
+\r
     def GetProtocolList(self):\r
         return self.ProtocolList\r
-    \r
+\r
     def SetPpiList(self, PpiList):\r
         self.PpiList = PpiList\r
-        \r
+\r
     def GetPpiList(self):\r
         return self.PpiList\r
-    \r
+\r
     def SetGuidList(self, GuidList):\r
         self.GuidList = GuidList\r
-        \r
+\r
     def GetGuidList(self):\r
         return self.GuidList\r
-    \r
+\r
     def SetPcdList(self, PcdList):\r
         self.PcdList = PcdList\r
-        \r
+\r
     def GetPcdList(self):\r
         return self.PcdList\r
-    \r
+\r
     def SetUserExtensionList(self, UserExtensionList):\r
         self.UserExtensionList = UserExtensionList\r
-        \r
+\r
     def GetUserExtensionList(self):\r
         return self.UserExtensionList\r
-        \r
+\r
     def SetMiscFileList(self, MiscFileList):\r
         self.MiscFileList = MiscFileList\r
-        \r
+\r
     def GetMiscFileList(self):\r
         return self.MiscFileList\r
 \r
     def SetModuleDict(self, ModuleDict):\r
         self.ModuleDict = ModuleDict\r
-        \r
+\r
     def GetModuleDict(self):\r
         return self.ModuleDict\r
 \r
     def SetClonedFromList(self, ClonedFromList):\r
         self.ClonedFromList = ClonedFromList\r
-        \r
+\r
     def GetClonedFromList(self):\r
         return self.ClonedFromList\r
 \r
     def SetModuleFileList(self, ModuleFileList):\r
         self.ModuleFileList = ModuleFileList\r
-        \r
+\r
     def GetModuleFileList(self):\r
         return self.ModuleFileList\r
 \r
index e2235f1bf02a356b7db8d9c5c70c266536917f5d..fdf3d8bd25420d9738cce61130c19efdec78ab6a 100644 (file)
@@ -4,11 +4,11 @@
 # This file is required to make Python interpreter treat the directory\r
 # as containing package.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,4 +17,4 @@
 \r
 '''\r
 POM\r
-'''
\ No newline at end of file
+'''\r
index 6336a90fb9969c22d9c742350fe7211ece7cc462..302d3050aae5c06d7e75de9b24fc10693ebeafd3 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects for DEC file. It will consumed by \r
+# This file is used to define class objects for DEC file. It will consumed by\r
 #DecParser\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -49,7 +49,7 @@ class _DecComments:
         return self._HeadComment, self._TailComment\r
 \r
     ## GetHeadComment\r
-    #    \r
+    #\r
     def GetHeadComment(self):\r
         return self._HeadComment\r
 \r
@@ -61,7 +61,7 @@ class _DecComments:
         self._HeadComment = Comment\r
 \r
     ## GetTailComment\r
-    #    \r
+    #\r
     def GetTailComment(self):\r
         return self._TailComment\r
 \r
@@ -89,22 +89,22 @@ class _DecBaseObject(_DecComments):
         self._SecName = ''\r
 \r
     ## GetSectionName\r
-    #        \r
+    #\r
     def GetSectionName(self):\r
         return self._SecName\r
 \r
     ## GetPackagePath\r
-    #        \r
+    #\r
     def GetPackagePath(self):\r
         return self._PackagePath\r
 \r
     ## GetPackageFile\r
-    #        \r
+    #\r
     def GetPackageFile(self):\r
         return self._FileName\r
 \r
     ## GetPackageFullName\r
-    #        \r
+    #\r
     def GetPackageFullName(self):\r
         return self._PkgFullName\r
 \r
@@ -151,7 +151,7 @@ class _DecBaseObject(_DecComments):
 \r
 ## _DecItemBaseObject\r
 #\r
-# Module type and arch the item belongs to \r
+# Module type and arch the item belongs to\r
 #\r
 class _DecItemBaseObject(_DecComments):\r
     def __init__(self):\r
@@ -162,7 +162,7 @@ class _DecItemBaseObject(_DecComments):
         self.ArchAndModuleType = []\r
 \r
     ## GetArchList\r
-    #    \r
+    #\r
     def GetArchList(self):\r
         ArchSet = set()\r
         for Arch in self.ArchAndModuleType:\r
@@ -184,7 +184,7 @@ class DecDefineObject(_DecBaseObject):
         self._PkgUniFile = ''\r
 \r
     ## GetPackageSpecification\r
-    #        \r
+    #\r
     def GetPackageSpecification(self):\r
         return self._DecSpec\r
 \r
@@ -192,7 +192,7 @@ class DecDefineObject(_DecBaseObject):
         self._DecSpec = DecSpec\r
 \r
     ## GetPackageName\r
-    #        \r
+    #\r
     def GetPackageName(self):\r
         return self._PkgName\r
 \r
@@ -200,7 +200,7 @@ class DecDefineObject(_DecBaseObject):
         self._PkgName = PkgName\r
 \r
     ## GetPackageGuid\r
-    #        \r
+    #\r
     def GetPackageGuid(self):\r
         return self._PkgGuid\r
 \r
@@ -208,7 +208,7 @@ class DecDefineObject(_DecBaseObject):
         self._PkgGuid = PkgGuid\r
 \r
     ## GetPackageVersion\r
-    #        \r
+    #\r
     def GetPackageVersion(self):\r
         return self._PkgVersion\r
 \r
@@ -216,7 +216,7 @@ class DecDefineObject(_DecBaseObject):
         self._PkgVersion = PkgVersion\r
 \r
     ## GetPackageUniFile\r
-    #        \r
+    #\r
     def GetPackageUniFile(self):\r
         return self._PkgUniFile\r
 \r
@@ -224,12 +224,12 @@ class DecDefineObject(_DecBaseObject):
         self._PkgUniFile = PkgUniFile\r
 \r
     ## GetDefines\r
-    #        \r
+    #\r
     def GetDefines(self):\r
         return self._GetItemByArch(TAB_ARCH_COMMON)\r
 \r
     ## GetAllDefines\r
-    #        \r
+    #\r
     def GetAllDefines(self):\r
         return self._GetAllItems()\r
 \r
@@ -244,7 +244,7 @@ class DecDefineItemObject(_DecItemBaseObject):
         self.Value = ''\r
 \r
     ## __hash__\r
-    #            \r
+    #\r
     def __hash__(self):\r
         return hash(self.Key + self.Value)\r
 \r
@@ -254,7 +254,7 @@ class DecDefineItemObject(_DecItemBaseObject):
         return id(self) == id(Other)\r
 \r
     ## __str__\r
-    #            \r
+    #\r
     def __str__(self):\r
         return str(self.ArchAndModuleType) + '\n' + self.Key + \\r
             ' = ' + self.Value\r
@@ -269,12 +269,12 @@ class DecIncludeObject(_DecBaseObject):
         self._SecName = TAB_INCLUDES.upper()\r
 \r
     ## GetIncludes\r
-    #          \r
+    #\r
     def GetIncludes(self, Arch=TAB_ARCH_COMMON):\r
         return self._GetItemByArch(Arch)\r
 \r
     ## GetAllIncludes\r
-    #          \r
+    #\r
     def GetAllIncludes(self):\r
         return self._GetAllItems()\r
 \r
@@ -289,7 +289,7 @@ class DecIncludeItemObject(_DecItemBaseObject):
         _DecItemBaseObject.__init__(self)\r
 \r
     ## __hash__\r
-    #          \r
+    #\r
     def __hash__(self):\r
         return hash(self.File)\r
 \r
@@ -299,7 +299,7 @@ class DecIncludeItemObject(_DecItemBaseObject):
         return id(self) == id(Other)\r
 \r
     ## __str__\r
-    #          \r
+    #\r
     def __str__(self):\r
         return self.File\r
 \r
@@ -314,12 +314,12 @@ class DecLibraryclassObject(_DecBaseObject):
         self._SecName = TAB_LIBRARY_CLASSES.upper()\r
 \r
     ## GetLibraryclasses\r
-    #           \r
+    #\r
     def GetLibraryclasses(self, Arch=TAB_ARCH_COMMON):\r
         return self._GetItemByArch(Arch)\r
 \r
     ## GetAllLibraryclasses\r
-    #           \r
+    #\r
     def GetAllLibraryclasses(self):\r
         return self._GetAllItems()\r
 \r
@@ -334,7 +334,7 @@ class DecLibraryclassItemObject(_DecItemBaseObject):
         self.Libraryclass = Libraryclass\r
 \r
     ## __hash__\r
-    #        \r
+    #\r
     def __hash__(self):\r
         return hash(self.Libraryclass + self.File)\r
 \r
@@ -344,7 +344,7 @@ class DecLibraryclassItemObject(_DecItemBaseObject):
         return id(self) == id(Other)\r
 \r
     ## __str__\r
-    #        \r
+    #\r
     def __str__(self):\r
         return self.Libraryclass + '|' + self.File\r
 \r
@@ -381,7 +381,7 @@ class DecPcdObject(_DecBaseObject):
     #\r
     # @param PcdType: PcdType\r
     # @param Arch: Arch\r
-    #    \r
+    #\r
     def GetPcds(self, PcdType, Arch=TAB_ARCH_COMMON):\r
         PcdType = PcdType.upper()\r
         Arch = Arch.upper()\r
@@ -392,7 +392,7 @@ class DecPcdObject(_DecBaseObject):
     ## GetPcdsByType\r
     #\r
     # @param PcdType: PcdType\r
-    #        \r
+    #\r
     def GetPcdsByType(self, PcdType):\r
         PcdType = PcdType.upper()\r
         Retlst = []\r
@@ -422,7 +422,7 @@ class DecPcdItemObject(_DecItemBaseObject):
         self.MaxDatumSize = MaxDatumSize\r
 \r
     ## __hash__\r
-    #  \r
+    #\r
     def __hash__(self):\r
         return hash(self.TokenSpaceGuidCName + self.TokenCName)\r
 \r
@@ -434,7 +434,7 @@ class DecPcdItemObject(_DecItemBaseObject):
     ## GetArchListOfType\r
     #\r
     # @param PcdType: PcdType\r
-    #      \r
+    #\r
     def GetArchListOfType(self, PcdType):\r
         ItemSet = set()\r
         PcdType = PcdType.upper()\r
@@ -458,12 +458,12 @@ class DecGuidObjectBase(_DecBaseObject):
     ## GetGuidStyleItems\r
     #\r
     # @param Arch: Arch\r
-    #       \r
+    #\r
     def GetGuidStyleItems(self, Arch=TAB_ARCH_COMMON):\r
         return self._GetItemByArch(Arch)\r
 \r
     ## GetGuidStyleAllItems\r
-    #       \r
+    #\r
     def GetGuidStyleAllItems(self):\r
         return self._GetAllItems()\r
 \r
@@ -481,7 +481,7 @@ class DecGuidItemObject(_DecItemBaseObject):
         self.GuidString = GuidString\r
 \r
     ## __hash__\r
-    #      \r
+    #\r
     def __hash__(self):\r
         return hash(self.GuidCName)\r
 \r
@@ -491,7 +491,7 @@ class DecGuidItemObject(_DecItemBaseObject):
         return id(self) == id(Other)\r
 \r
     ## __str__\r
-    #      \r
+    #\r
     def __str__(self):\r
         return self.GuidCName + ' = ' + self.GuidCValue\r
 \r
@@ -507,14 +507,14 @@ class DecGuidObject(DecGuidObjectBase):
         self._SecName = TAB_GUIDS.upper()\r
 \r
     ## GetGuids\r
-    #          \r
+    #\r
     # @param Arch: Arch\r
     #\r
     def GetGuids(self, Arch=TAB_ARCH_COMMON):\r
         return self._GetItemByArch(Arch)\r
 \r
     ## GetAllGuids\r
-    #          \r
+    #\r
     def GetAllGuids(self):\r
         return self._GetAllItems()\r
 \r
@@ -530,14 +530,14 @@ class DecPpiObject(DecGuidObjectBase):
         self._SecName = TAB_PPIS.upper()\r
 \r
     ## GetPpis\r
-    #          \r
+    #\r
     # @param Arch: Arch\r
-    #    \r
+    #\r
     def GetPpis(self, Arch=TAB_ARCH_COMMON):\r
         return self._GetItemByArch(Arch)\r
 \r
     ## GetAllPpis\r
-    #           \r
+    #\r
     def GetAllPpis(self):\r
         return self._GetAllItems()\r
 \r
@@ -553,14 +553,14 @@ class DecProtocolObject(DecGuidObjectBase):
         self._SecName = TAB_PROTOCOLS.upper()\r
 \r
     ## GetProtocols\r
-    #          \r
+    #\r
     # @param Arch: Arch\r
-    #        \r
+    #\r
     def GetProtocols(self, Arch=TAB_ARCH_COMMON):\r
         return self._GetItemByArch(Arch)\r
 \r
     ## GetAllProtocols\r
-    #        \r
+    #\r
     def GetAllProtocols(self):\r
         return self._GetAllItems()\r
 \r
@@ -577,10 +577,10 @@ class DecUserExtensionObject(_DecBaseObject):
         self.ItemList = []\r
 \r
     ## GetProtocols\r
-    #          \r
+    #\r
     # @param Item: Item\r
     # @param Scope: Scope\r
-    #            \r
+    #\r
     def AddItem(self, Item, Scope):\r
         if not Scope:\r
             pass\r
@@ -589,7 +589,7 @@ class DecUserExtensionObject(_DecBaseObject):
         self.ItemList.append(Item)\r
 \r
     ## GetAllUserExtensions\r
-    #       \r
+    #\r
     def GetAllUserExtensions(self):\r
         return self.ItemList\r
 \r
index cc2fc49053261cc53d4bc482730a2e8faee98087..af5af46ab21dbf272d89210b8b99f76b7957580b 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file [Binaries] section. \r
-# It will consumed by InfParser. \r
+# This file is used to define class objects of INF file [Binaries] section.\r
+# It will consumed by InfParser.\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -117,7 +117,7 @@ class InfBianryCommonItem(InfBianryItem, CurrentLine):
         self.Family = Family\r
     def GetFamily(self):\r
         return self.Family\r
-    \r
+\r
     def SetGuidValue(self, GuidValue):\r
         self.GuidValue = GuidValue\r
     def GetGuidValue(self):\r
@@ -228,7 +228,7 @@ class InfBinariesObject(InfSectionCommonDef):
                                  Line=VerCurrentLine.GetLineNo(),\r
                                  ExtraData=VerCurrentLine.GetLineString())\r
                 #\r
-                # Validate Feature Flag Express   \r
+                # Validate Feature Flag Express\r
                 #\r
                 FeatureFlagRtv = IsValidFeatureFlagExp(VerContent[3].\\r
                                                        strip())\r
@@ -246,15 +246,15 @@ class InfBinariesObject(InfSectionCommonDef):
             #\r
             # Determine binary file name duplicate. Follow below rule:\r
             #\r
-            # A binary filename must not be duplicated within \r
-            # a [Binaries] section. A binary filename may appear in \r
-            # multiple architectural [Binaries] sections. A binary \r
-            # filename listed in an architectural [Binaries] section \r
-            # must not be listed in the common architectural \r
+            # A binary filename must not be duplicated within\r
+            # a [Binaries] section. A binary filename may appear in\r
+            # multiple architectural [Binaries] sections. A binary\r
+            # filename listed in an architectural [Binaries] section\r
+            # must not be listed in the common architectural\r
             # [Binaries] section.\r
-            # \r
+            #\r
             # NOTE: This check will not report error now.\r
-            # \r
+            #\r
             for Item in self.Binaries:\r
                 if Item.GetFileName() == InfBianryVerItemObj.GetFileName():\r
                     ItemSupArchList = Item.GetSupArchList()\r
@@ -315,7 +315,7 @@ class InfBinariesObject(InfSectionCommonDef):
                                  Line=CurrentLineOfItem.GetLineNo(),\r
                                  ExtraData=CurrentLineOfItem.GetLineString())\r
                     return False\r
-                \r
+\r
             if len(ItemContent) > 7:\r
                 Logger.Error("InfParser",\r
                              ToolError.FORMAT_INVALID,\r
@@ -335,7 +335,7 @@ class InfBinariesObject(InfSectionCommonDef):
                 BinaryFileType = ItemContent[0].strip()\r
                 if BinaryFileType == 'RAW' or BinaryFileType == 'ACPI' or BinaryFileType == 'ASL':\r
                     BinaryFileType = 'BIN'\r
-                    \r
+\r
                 if BinaryFileType not in DT.BINARY_FILE_TYPE_LIST:\r
                     Logger.Error("InfParser",\r
                                  ToolError.FORMAT_INVALID,\r
@@ -344,10 +344,10 @@ class InfBinariesObject(InfSectionCommonDef):
                                  File=CurrentLineOfItem.GetFileName(),\r
                                  Line=CurrentLineOfItem.GetLineNo(),\r
                                  ExtraData=CurrentLineOfItem.GetLineString())\r
-                    \r
+\r
                 if BinaryFileType == 'SUBTYPE_GUID':\r
                     BinaryFileType = 'FREEFORM'\r
-                    \r
+\r
                 if BinaryFileType == 'LIB' or BinaryFileType == 'UEFI_APP':\r
                     Logger.Error("InfParser",\r
                                  ToolError.FORMAT_INVALID,\r
@@ -407,7 +407,7 @@ class InfBinariesObject(InfSectionCommonDef):
                 #\r
                 if BinaryFileType != 'FREEFORM':\r
                     InfBianryCommonItemObj.SetTarget(ItemContent[2])\r
-                    \r
+\r
             if len(ItemContent) >= 4:\r
                 #\r
                 # Add Family information\r
@@ -416,13 +416,13 @@ class InfBinariesObject(InfSectionCommonDef):
                     InfBianryCommonItemObj.SetFamily(ItemContent[3])\r
                 else:\r
                     InfBianryCommonItemObj.SetTarget(ItemContent[3])\r
-                    \r
+\r
             if len(ItemContent) >= 5:\r
                 #\r
-                # TagName entries are build system specific. If there \r
-                # is content in the entry, the tool must exit \r
+                # TagName entries are build system specific. If there\r
+                # is content in the entry, the tool must exit\r
                 # gracefully with an error message that indicates build\r
-                # system specific content cannot be distributed using \r
+                # system specific content cannot be distributed using\r
                 # the UDP\r
                 #\r
                 if BinaryFileType != 'FREEFORM':\r
@@ -435,7 +435,7 @@ class InfBinariesObject(InfSectionCommonDef):
                                      ExtraData=CurrentLineOfItem.GetLineString())\r
                 else:\r
                     InfBianryCommonItemObj.SetFamily(ItemContent[4])\r
-                    \r
+\r
             if len(ItemContent) >= 6:\r
                 #\r
                 # Add FeatureFlagExp\r
@@ -449,7 +449,7 @@ class InfBinariesObject(InfSectionCommonDef):
                                      Line=CurrentLineOfItem.GetLineNo(),\r
                                      ExtraData=CurrentLineOfItem.GetLineString())\r
                     #\r
-                    # Validate Feature Flag Express   \r
+                    # Validate Feature Flag Express\r
                     #\r
                     FeatureFlagRtv = IsValidFeatureFlagExp(ItemContent[5].strip())\r
                     if not FeatureFlagRtv[0]:\r
@@ -468,7 +468,7 @@ class InfBinariesObject(InfSectionCommonDef):
                                      File=CurrentLineOfItem.GetFileName(),\r
                                      Line=CurrentLineOfItem.GetLineNo(),\r
                                      ExtraData=CurrentLineOfItem.GetLineString())\r
-                        \r
+\r
             if len(ItemContent) == 7:\r
                 if ItemContent[6].strip() == '':\r
                     Logger.Error("InfParser",\r
@@ -478,7 +478,7 @@ class InfBinariesObject(InfSectionCommonDef):
                                      Line=CurrentLineOfItem.GetLineNo(),\r
                                      ExtraData=CurrentLineOfItem.GetLineString())\r
                 #\r
-                # Validate Feature Flag Express   \r
+                # Validate Feature Flag Express\r
                 #\r
                 FeatureFlagRtv = IsValidFeatureFlagExp(ItemContent[6].strip())\r
                 if not FeatureFlagRtv[0]:\r
@@ -495,15 +495,15 @@ class InfBinariesObject(InfSectionCommonDef):
             #\r
             # Determine binary file name duplicate. Follow below rule:\r
             #\r
-            # A binary filename must not be duplicated within \r
-            # a [Binaries] section. A binary filename may appear in \r
-            # multiple architectural [Binaries] sections. A binary \r
-            # filename listed in an architectural [Binaries] section \r
-            # must not be listed in the common architectural \r
+            # A binary filename must not be duplicated within\r
+            # a [Binaries] section. A binary filename may appear in\r
+            # multiple architectural [Binaries] sections. A binary\r
+            # filename listed in an architectural [Binaries] section\r
+            # must not be listed in the common architectural\r
             # [Binaries] section.\r
-            # \r
+            #\r
             # NOTE: This check will not report error now.\r
-            # \r
+            #\r
 #            for Item in self.Binaries:\r
 #                if Item.GetFileName() == InfBianryCommonItemObj.GetFileName():\r
 #                    ItemSupArchList = Item.GetSupArchList()\r
@@ -537,7 +537,7 @@ class InfBinariesObject(InfSectionCommonDef):
         for ArchItem in ArchList:\r
             #\r
             # Validate Arch\r
-            #            \r
+            #\r
             if (ArchItem == '' or ArchItem is None):\r
                 ArchItem = 'COMMON'\r
             __SupArchList.append(ArchItem)\r
@@ -546,7 +546,7 @@ class InfBinariesObject(InfSectionCommonDef):
             if len(UiInf) > 0:\r
                 #\r
                 # Check UI\r
-                #                    \r
+                #\r
                 for UiItem in UiInf:\r
                     IsValidFileFlag = False\r
                     InfBianryUiItemObj = None\r
@@ -630,7 +630,7 @@ class InfBinariesObject(InfSectionCommonDef):
                                          Line=UiCurrentLine.GetLineNo(),\r
                                          ExtraData=UiCurrentLine.GetLineString())\r
                         #\r
-                        # Validate Feature Flag Express   \r
+                        # Validate Feature Flag Express\r
                         #\r
                         FeatureFlagRtv = IsValidFeatureFlagExp(UiContent[3].strip())\r
                         if not FeatureFlagRtv[0]:\r
@@ -647,15 +647,15 @@ class InfBinariesObject(InfSectionCommonDef):
                     #\r
                     # Determine binary file name duplicate. Follow below rule:\r
                     #\r
-                    # A binary filename must not be duplicated within \r
-                    # a [Binaries] section. A binary filename may appear in \r
-                    # multiple architectural [Binaries] sections. A binary \r
-                    # filename listed in an architectural [Binaries] section \r
-                    # must not be listed in the common architectural \r
+                    # A binary filename must not be duplicated within\r
+                    # a [Binaries] section. A binary filename may appear in\r
+                    # multiple architectural [Binaries] sections. A binary\r
+                    # filename listed in an architectural [Binaries] section\r
+                    # must not be listed in the common architectural\r
                     # [Binaries] section.\r
-                    # \r
+                    #\r
                     # NOTE: This check will not report error now.\r
-                    # \r
+                    #\r
 #                    for Item in self.Binaries:\r
 #                        if Item.GetFileName() == InfBianryUiItemObj.GetFileName():\r
 #                            ItemSupArchList = Item.GetSupArchList()\r
index 391669fe64cb86c5b95961ef07e1d56b5be317a0..6011fbf52339f36a43a21ff8b4c4363a74785ae2 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file [BuildOptions] section. \r
-# It will consumed by InfParser. \r
+# This file is used to define class objects of INF file [BuildOptions] section.\r
+# It will consumed by InfParser.\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -16,7 +16,7 @@
 InfBuildOptionObject\r
 '''\r
 \r
-from Library import GlobalData \r
+from Library import GlobalData\r
 \r
 from Object.Parser.InfCommonObject import InfSectionCommonDef\r
 \r
@@ -25,17 +25,17 @@ class InfBuildOptionItem():
         self.Content     = ''\r
         self.SupArchList = []\r
         self.AsBuildList = []\r
-        \r
+\r
     def SetContent(self, Content):\r
         self.Content = Content\r
     def GetContent(self):\r
         return self.Content\r
-    \r
+\r
     def SetSupArchList(self, SupArchList):\r
         self.SupArchList = SupArchList\r
     def GetSupArchList(self):\r
         return self.SupArchList\r
-    \r
+\r
     #\r
     # AsBuild Information\r
     #\r
@@ -43,12 +43,12 @@ class InfBuildOptionItem():
         self.AsBuildList = AsBuildList\r
     def GetAsBuildList(self):\r
         return self.AsBuildList\r
-        \r
\r
+\r
+\r
 ## INF BuildOption section\r
 #  Macro define is not permitted for this section.\r
 #\r
-# \r
+#\r
 class InfBuildOptionsObject(InfSectionCommonDef):\r
     def __init__(self):\r
         self.BuildOptions = []\r
@@ -56,38 +56,38 @@ class InfBuildOptionsObject(InfSectionCommonDef):
     ## SetBuildOptions function\r
     #\r
     # For BuildOptionName, need to validate it's format\r
-    # For BuildOptionValue, just ignore it. \r
+    # For BuildOptionValue, just ignore it.\r
     #\r
     # @param  Arch          Indicated which arch of build options belong to.\r
     # @param  BuildOptCont  A list contain BuildOption related information.\r
     #                       The element in the list contain 3 members.\r
     #                       BuildOptionName, BuildOptionValue and IsReplace\r
     #                       flag.\r
-    # \r
+    #\r
     # @return True          Build options set/validate successfully\r
     # @return False         Build options set/validate failed\r
     #\r
     def SetBuildOptions(self, BuildOptCont, ArchList = None, SectionContent = ''):\r
 \r
-        if not GlobalData.gIS_BINARY_INF:      \r
-    \r
+        if not GlobalData.gIS_BINARY_INF:\r
+\r
             if SectionContent.strip() != '':\r
                 InfBuildOptionItemObj = InfBuildOptionItem()\r
                 InfBuildOptionItemObj.SetContent(SectionContent)\r
                 InfBuildOptionItemObj.SetSupArchList(ArchList)\r
-                          \r
+\r
                 self.BuildOptions.append(InfBuildOptionItemObj)\r
         else:\r
             #\r
-            # For AsBuild INF file      \r
+            # For AsBuild INF file\r
             #\r
             if len(BuildOptCont) >= 1:\r
                 InfBuildOptionItemObj = InfBuildOptionItem()\r
                 InfBuildOptionItemObj.SetAsBuildList(BuildOptCont)\r
                 InfBuildOptionItemObj.SetSupArchList(ArchList)\r
                 self.BuildOptions.append(InfBuildOptionItemObj)\r
-               \r
+\r
         return True\r
\r
+\r
     def GetBuildOptions(self):\r
-        return self.BuildOptions
\ No newline at end of file
+        return self.BuildOptions\r
index 217b0941dac4df5810a7b8c46242da649b734783..49be7d9f65c40ea63c9dfc92f0f88d92abee2f16 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define common class objects for INF file. \r
+# This file is used to define common class objects for INF file.\r
 # It will consumed by InfParser\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,9 +17,9 @@ InfCommonObject
 '''\r
 \r
 ## InfLineCommentObject\r
-#  \r
-#  Comment Object for any line in the INF file \r
-#   \r
+#\r
+#  Comment Object for any line in the INF file\r
+#\r
 #  #\r
 #  # HeaderComment\r
 #  #\r
@@ -29,21 +29,21 @@ class InfLineCommentObject():
     def __init__(self):\r
         self.HeaderComments = ''\r
         self.TailComments = ''\r
-    \r
+\r
     def SetHeaderComments(self, HeaderComments):\r
         self.HeaderComments = HeaderComments\r
-    \r
+\r
     def GetHeaderComments(self):\r
         return self.HeaderComments\r
-    \r
+\r
     def SetTailComments(self, TailComments):\r
         self.TailComments = TailComments\r
 \r
     def GetTailComments(self):\r
-        return self.TailComments   \r
-       \r
+        return self.TailComments\r
+\r
 ## CurrentLine\r
-#    \r
+#\r
 class CurrentLine():\r
     def __init__(self):\r
         self.LineNo = ''\r
@@ -51,48 +51,48 @@ class CurrentLine():
         self.FileName = ''\r
 \r
     ## SetLineNo\r
-    #     \r
-    # @param LineNo: LineNo \r
-    #     \r
+    #\r
+    # @param LineNo: LineNo\r
+    #\r
     def SetLineNo(self, LineNo):\r
         self.LineNo = LineNo\r
-        \r
+\r
     ## GetLineNo\r
-    #         \r
+    #\r
     def GetLineNo(self):\r
         return self.LineNo\r
 \r
     ## SetLineString\r
-    #     \r
-    # @param LineString: Line String content \r
-    #     \r
+    #\r
+    # @param LineString: Line String content\r
+    #\r
     def SetLineString(self, LineString):\r
         self.LineString = LineString\r
-        \r
+\r
     ## GetLineString\r
-    #         \r
+    #\r
     def GetLineString(self):\r
         return self.LineString\r
 \r
     ## SetFileName\r
-    #     \r
+    #\r
     # @param FileName: File Name\r
-    #       \r
+    #\r
     def SetFileName(self, FileName):\r
         self.FileName = FileName\r
-        \r
+\r
     ## GetFileName\r
-    #  \r
+    #\r
     def GetFileName(self):\r
         return self.FileName\r
-    \r
-## \r
+\r
+##\r
 # Inf Section common data\r
 #\r
 class InfSectionCommonDef():\r
     def __init__(self):\r
         #\r
-        # # \r
+        # #\r
         # # HeaderComments at here\r
         # #\r
         # [xxSection] TailComments at here\r
@@ -104,7 +104,7 @@ class InfSectionCommonDef():
         # The support arch list of this section\r
         #\r
         self.SupArchList  = []\r
-        \r
+\r
         #\r
         # Store all section content\r
         # Key is supported Arch\r
@@ -112,51 +112,51 @@ class InfSectionCommonDef():
         self.AllContent   = {}\r
 \r
     ## SetHeaderComments\r
-    #     \r
+    #\r
     # @param HeaderComments: HeaderComments\r
-    #        \r
+    #\r
     def SetHeaderComments(self, HeaderComments):\r
         self.HeaderComments = HeaderComments\r
 \r
     ## GetHeaderComments\r
-    #        \r
+    #\r
     def GetHeaderComments(self):\r
         return self.HeaderComments\r
 \r
     ## SetTailComments\r
-    #     \r
+    #\r
     # @param TailComments: TailComments\r
-    #            \r
+    #\r
     def SetTailComments(self, TailComments):\r
         self.TailComments = TailComments\r
 \r
     ## GetTailComments\r
-    #   \r
+    #\r
     def GetTailComments(self):\r
         return self.TailComments\r
 \r
     ## SetSupArchList\r
-    #     \r
+    #\r
     # @param Arch: Arch\r
-    #         \r
+    #\r
     def SetSupArchList(self, Arch):\r
         if Arch not in self.SupArchList:\r
             self.SupArchList.append(Arch)\r
 \r
     ## GetSupArchList\r
-    #      \r
+    #\r
     def GetSupArchList(self):\r
         return self.SupArchList\r
 \r
     ## SetAllContent\r
-    #     \r
+    #\r
     # @param ArchList: ArchList\r
     # @param Content: Content\r
-    #     \r
+    #\r
     def SetAllContent(self, Content):\r
         self.AllContent = Content\r
-        \r
+\r
     ## GetAllContent\r
-    #     \r
+    #\r
     def GetAllContent(self):\r
         return self.AllContent\r
index d565e65a659d68bc4af56bae381a059c927a0e27..ded7965fe77c026e90e9a228eac449531b44c218 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define common class objects of [Defines] section for INF file. \r
+# This file is used to define common class objects of [Defines] section for INF file.\r
 # It will consumed by InfParser\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -19,13 +19,13 @@ InfDefineCommonObject
 from Object.Parser.InfCommonObject import InfLineCommentObject\r
 \r
 ## InfDefineImageExeParamItem\r
-#   \r
+#\r
 class InfDefineImageExeParamItem():\r
     def __init__(self):\r
         self.CName  = ''\r
         self.FeatureFlagExp = ''\r
         self.Comments = InfLineCommentObject()\r
-    \r
+\r
     def SetCName(self, CName):\r
         self.CName = CName\r
     def GetCName(self):\r
@@ -36,49 +36,49 @@ class InfDefineImageExeParamItem():
         return self.FeatureFlagExp\r
 \r
 ## InfDefineEntryPointItem\r
-#      \r
+#\r
 class InfDefineEntryPointItem(InfDefineImageExeParamItem):\r
     def __init__(self):\r
         InfDefineImageExeParamItem.__init__(self)\r
 \r
 ## InfDefineUnloadImageItem\r
-#      \r
+#\r
 class InfDefineUnloadImageItem(InfDefineImageExeParamItem):\r
     def __init__(self):\r
         InfDefineImageExeParamItem.__init__(self)\r
 \r
 ## InfDefineConstructorItem\r
-#      \r
+#\r
 class InfDefineConstructorItem(InfDefineImageExeParamItem):\r
     def __init__(self):\r
         InfDefineImageExeParamItem.__init__(self)\r
         self.SupModList = []\r
-        \r
+\r
     def SetSupModList(self, SupModList):\r
         self.SupModList = SupModList\r
     def GetSupModList(self):\r
         return self.SupModList\r
 \r
 ## InfDefineDestructorItem\r
-# \r
+#\r
 class InfDefineDestructorItem(InfDefineImageExeParamItem):\r
     def __init__(self):\r
         InfDefineImageExeParamItem.__init__(self)\r
         self.SupModList = []\r
-        \r
+\r
     def SetSupModList(self, SupModList):\r
         self.SupModList = SupModList\r
     def GetSupModList(self):\r
         return self.SupModList\r
-            \r
+\r
 ## InfDefineLibraryItem\r
-#         \r
+#\r
 class InfDefineLibraryItem():\r
     def __init__(self):\r
         self.LibraryName = ''\r
         self.Types = []\r
         self.Comments = InfLineCommentObject()\r
-            \r
+\r
     def SetLibraryName(self, Name):\r
         self.LibraryName = Name\r
     def GetLibraryName(self):\r
@@ -86,4 +86,4 @@ class InfDefineLibraryItem():
     def SetTypes(self, Type):\r
         self.Types = Type\r
     def GetTypes(self):\r
-        return self.Types
\ No newline at end of file
+        return self.Types\r
index 9d27a92cd6b0e3d3fe76b5b70e27907720d50fbe..8998d6988909ae1719be8038fdf517af92aa85a5 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of [Defines] section for INF file. \r
+# This file is used to define class objects of [Defines] section for INF file.\r
 # It will consumed by InfParser\r
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -21,21 +21,21 @@ import re
 \r
 from Logger import StringTable as ST\r
 from Logger import ToolError\r
-from Library import GlobalData \r
+from Library import GlobalData\r
 from Library import DataType as DT\r
 from Library.StringUtils import GetSplitValueList\r
 from Library.Misc import CheckGuidRegFormat\r
 from Library.Misc import Sdict\r
 from Library.Misc import ConvPathFromAbsToRel\r
 from Library.Misc import ValidateUNIFilePath\r
-from Library.ExpressionValidate import IsValidFeatureFlagExp \r
+from Library.ExpressionValidate import IsValidFeatureFlagExp\r
 from Library.ParserValidate import IsValidWord\r
-from Library.ParserValidate import IsValidInfMoudleType  \r
-from Library.ParserValidate import IsValidHex  \r
-from Library.ParserValidate import IsValidHexVersion  \r
-from Library.ParserValidate import IsValidDecVersion  \r
-from Library.ParserValidate import IsValidCVariableName \r
-from Library.ParserValidate import IsValidBoolType \r
+from Library.ParserValidate import IsValidInfMoudleType\r
+from Library.ParserValidate import IsValidHex\r
+from Library.ParserValidate import IsValidHexVersion\r
+from Library.ParserValidate import IsValidDecVersion\r
+from Library.ParserValidate import IsValidCVariableName\r
+from Library.ParserValidate import IsValidBoolType\r
 from Library.ParserValidate import IsValidPath\r
 from Library.ParserValidate import IsValidFamily\r
 from Library.ParserValidate import IsValidIdentifier\r
@@ -47,7 +47,7 @@ from Object.Parser.InfMisc import ErrorInInf
 from Object.Parser.InfDefineCommonObject import InfDefineLibraryItem\r
 from Object.Parser.InfDefineCommonObject import InfDefineEntryPointItem\r
 from Object.Parser.InfDefineCommonObject import InfDefineUnloadImageItem\r
-from Object.Parser.InfDefineCommonObject import InfDefineConstructorItem \r
+from Object.Parser.InfDefineCommonObject import InfDefineConstructorItem\r
 from Object.Parser.InfDefineCommonObject import InfDefineDestructorItem\r
 \r
 class InfDefSectionOptionRomInfo():\r
@@ -65,9 +65,9 @@ class InfDefSectionOptionRomInfo():
         if self.PciVendorId is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND%(DT.TAB_INF_DEFINES_PCI_VENDOR_ID),\r
                        LineInfo=self.CurrentLine)\r
-            return False           \r
+            return False\r
         #\r
-        # The PciVendorId should be hex string.  \r
+        # The PciVendorId should be hex string.\r
         #\r
         if (IsValidHex(PciVendorId)):\r
             self.PciVendorId = InfDefMember()\r
@@ -78,10 +78,10 @@ class InfDefSectionOptionRomInfo():
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(PciVendorId),\r
                        LineInfo=self.CurrentLine)\r
             return False\r
-        \r
+\r
     def GetPciVendorId(self):\r
         return self.PciVendorId\r
-    \r
+\r
     def SetPciDeviceId(self, PciDeviceId, Comments):\r
         #\r
         # Value has been set before.\r
@@ -89,23 +89,23 @@ class InfDefSectionOptionRomInfo():
         if self.PciDeviceId is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND%(DT.TAB_INF_DEFINES_PCI_DEVICE_ID),\r
                        LineInfo=self.CurrentLine)\r
-            return False         \r
+            return False\r
         #\r
-        # The PciDeviceId should be hex string.  \r
+        # The PciDeviceId should be hex string.\r
         #\r
         if (IsValidHex(PciDeviceId)):\r
             self.PciDeviceId = InfDefMember()\r
             self.PciDeviceId.SetValue(PciDeviceId)\r
-            self.PciDeviceId.Comments = Comments            \r
+            self.PciDeviceId.Comments = Comments\r
             return True\r
         else:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(PciDeviceId),\r
                        LineInfo=self.CurrentLine)\r
             return False\r
-        \r
+\r
     def GetPciDeviceId(self):\r
         return self.PciDeviceId\r
-   \r
+\r
     def SetPciClassCode(self, PciClassCode, Comments):\r
         #\r
         # Value has been set before.\r
@@ -113,9 +113,9 @@ class InfDefSectionOptionRomInfo():
         if self.PciClassCode is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND%(DT.TAB_INF_DEFINES_PCI_CLASS_CODE),\r
                        LineInfo=self.CurrentLine)\r
-            return False        \r
+            return False\r
         #\r
-        # The PciClassCode should be 4 bytes hex string.  \r
+        # The PciClassCode should be 4 bytes hex string.\r
         #\r
         if (IsValidHex(PciClassCode)):\r
             self.PciClassCode = InfDefMember()\r
@@ -127,10 +127,10 @@ class InfDefSectionOptionRomInfo():
                        (PciClassCode),\r
                        LineInfo=self.CurrentLine)\r
             return False\r
-        \r
+\r
     def GetPciClassCode(self):\r
         return self.PciClassCode\r
-    \r
+\r
     def SetPciRevision(self, PciRevision, Comments):\r
         #\r
         # Value has been set before.\r
@@ -138,9 +138,9 @@ class InfDefSectionOptionRomInfo():
         if self.PciRevision is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND%(DT.TAB_INF_DEFINES_PCI_REVISION),\r
                        LineInfo=self.CurrentLine)\r
-            return False          \r
+            return False\r
         #\r
-        # The PciRevision should be 4 bytes hex string.  \r
+        # The PciRevision should be 4 bytes hex string.\r
         #\r
         if (IsValidHex(PciRevision)):\r
             self.PciRevision = InfDefMember()\r
@@ -151,10 +151,10 @@ class InfDefSectionOptionRomInfo():
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(PciRevision),\r
                        LineInfo=self.CurrentLine)\r
             return False\r
-        \r
+\r
     def GetPciRevision(self):\r
         return self.PciRevision\r
-    \r
+\r
     def SetPciCompress(self, PciCompress, Comments):\r
         #\r
         # Value has been set before.\r
@@ -163,9 +163,9 @@ class InfDefSectionOptionRomInfo():
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND%(DT.TAB_INF_DEFINES_PCI_COMPRESS),\r
                        LineInfo=self.CurrentLine)\r
             return False\r
-        \r
+\r
         #\r
-        # The PciCompress should be 'TRUE' or 'FALSE'.  \r
+        # The PciCompress should be 'TRUE' or 'FALSE'.\r
         #\r
         if (PciCompress == 'TRUE' or PciCompress == 'FALSE'):\r
             self.PciCompress = InfDefMember()\r
@@ -175,9 +175,9 @@ class InfDefSectionOptionRomInfo():
         else:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(PciCompress),\r
                        LineInfo=self.CurrentLine)\r
-            return False        \r
+            return False\r
     def GetPciCompress(self):\r
-        return self.PciCompress        \r
+        return self.PciCompress\r
 ##\r
 # INF [Define] section Object\r
 #\r
@@ -210,15 +210,15 @@ class InfDefSection(InfDefSectionOptionRomInfo):
     ## SetHeadComment\r
     #\r
     # @param BaseName: BaseName\r
-    #    \r
+    #\r
     def SetBaseName(self, BaseName, Comments):\r
         #\r
         # Value has been set before.\r
         #\r
-        if self.BaseName is not None:    \r
+        if self.BaseName is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND%(DT.TAB_INF_DEFINES_BASE_NAME),\r
                        LineInfo=self.CurrentLine)\r
-            return False     \r
+            return False\r
         if not (BaseName == '' or BaseName is None):\r
             if IsValidWord(BaseName) and not BaseName.startswith("_"):\r
                 self.BaseName = InfDefMember()\r
@@ -231,26 +231,26 @@ class InfDefSection(InfDefSectionOptionRomInfo):
                 return False\r
 \r
     ## GetBaseName\r
-    #          \r
+    #\r
     def GetBaseName(self):\r
         return self.BaseName\r
 \r
     ## SetFileGuid\r
     #\r
     # @param FileGuid: FileGuid\r
-    #        \r
+    #\r
     def SetFileGuid(self, FileGuid, Comments):\r
         #\r
         # Value has been set before.\r
         #\r
-        if self.FileGuid is not None:    \r
+        if self.FileGuid is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND\\r
                        %(DT.TAB_INF_DEFINES_FILE_GUID),\r
                        LineInfo=self.CurrentLine)\r
-            return False                        \r
+            return False\r
         #\r
         # Do verification of GUID content/format\r
-        #          \r
+        #\r
         if (CheckGuidRegFormat(FileGuid)):\r
             self.FileGuid = InfDefMember()\r
             self.FileGuid.SetValue(FileGuid)\r
@@ -262,23 +262,23 @@ class InfDefSection(InfDefSectionOptionRomInfo):
             return False\r
 \r
     ## GetFileGuid\r
-    #            \r
+    #\r
     def GetFileGuid(self):\r
         return self.FileGuid\r
 \r
     ## SetModuleType\r
     #\r
     # @param ModuleType: ModuleType\r
-    #     \r
+    #\r
     def SetModuleType(self, ModuleType, Comments):\r
         #\r
         # Value has been set before.\r
         #\r
-        if self.ModuleType is not None:    \r
+        if self.ModuleType is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND\\r
                        %(DT.TAB_INF_DEFINES_MODULE_TYPE),\r
                        LineInfo=self.CurrentLine)\r
-            return False           \r
+            return False\r
         #\r
         # Valid Module Type or not\r
         #\r
@@ -289,7 +289,7 @@ class InfDefSection(InfDefSectionOptionRomInfo):
             self.ModuleType.CurrentLine.SetLineNo(self.CurrentLine[1])\r
             self.ModuleType.CurrentLine.SetLineString(self.CurrentLine[2])\r
             self.ModuleType.CurrentLine.SetFileName(self.CurrentLine[0])\r
-            self.ModuleType.Comments = Comments            \r
+            self.ModuleType.Comments = Comments\r
             return True\r
         else:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_MODULETYPE_INVALID%\\r
@@ -298,14 +298,14 @@ class InfDefSection(InfDefSectionOptionRomInfo):
             return False\r
 \r
     ## GetModuleType\r
-    #                       \r
+    #\r
     def GetModuleType(self):\r
         return self.ModuleType\r
-    \r
+\r
     ## SetModuleUniFileName\r
     #\r
     # @param ModuleUniFileName: ModuleUniFileName\r
-    #     \r
+    #\r
     def SetModuleUniFileName(self, ModuleUniFileName, Comments):\r
         if Comments:\r
             pass\r
@@ -315,25 +315,25 @@ class InfDefSection(InfDefSectionOptionRomInfo):
         self.ModuleUniFileName = ModuleUniFileName\r
 \r
     ## GetModuleType\r
-    #                       \r
+    #\r
     def GetModuleUniFileName(self):\r
         return self.ModuleUniFileName\r
-    \r
+\r
     ## SetInfVersion\r
     #\r
     # @param InfVersion: InfVersion\r
-    #            \r
+    #\r
     def SetInfVersion(self, InfVersion, Comments):\r
         #\r
         # Value has been set before.\r
         #\r
-        if self.InfVersion is not None:    \r
+        if self.InfVersion is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND\\r
                        %(DT.TAB_INF_DEFINES_INF_VERSION),\r
                        LineInfo=self.CurrentLine)\r
-            return False        \r
+            return False\r
         #\r
-        # The InfVersion should be 4 bytes hex string. \r
+        # The InfVersion should be 4 bytes hex string.\r
         #\r
         if (IsValidHex(InfVersion)):\r
             if (InfVersion < '0x00010005'):\r
@@ -356,25 +356,25 @@ class InfDefSection(InfDefSectionOptionRomInfo):
         return True\r
 \r
     ## GetInfVersion\r
-    #                     \r
+    #\r
     def GetInfVersion(self):\r
         return self.InfVersion\r
 \r
     ## SetEdkReleaseVersion\r
     #\r
     # @param EdkReleaseVersion: EdkReleaseVersion\r
-    #      \r
+    #\r
     def SetEdkReleaseVersion(self, EdkReleaseVersion, Comments):\r
         #\r
         # Value has been set before.\r
         #\r
-        if self.EdkReleaseVersion is not None:    \r
+        if self.EdkReleaseVersion is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND\\r
                        %(DT.TAB_INF_DEFINES_EDK_RELEASE_VERSION),\r
                        LineInfo=self.CurrentLine)\r
-            return False          \r
+            return False\r
         #\r
-        # The EdkReleaseVersion should be 4 bytes hex string.  \r
+        # The EdkReleaseVersion should be 4 bytes hex string.\r
         #\r
         if IsValidHexVersion(EdkReleaseVersion) or \\r
            IsValidDecVersionVal(EdkReleaseVersion):\r
@@ -389,25 +389,25 @@ class InfDefSection(InfDefSectionOptionRomInfo):
             return False\r
 \r
     ## GetEdkReleaseVersion\r
-    #        \r
+    #\r
     def GetEdkReleaseVersion(self):\r
-        return self.EdkReleaseVersion \r
+        return self.EdkReleaseVersion\r
 \r
     ## SetUefiSpecificationVersion\r
     #\r
     # @param UefiSpecificationVersion: UefiSpecificationVersion\r
-    #         \r
+    #\r
     def SetUefiSpecificationVersion(self, UefiSpecificationVersion, Comments):\r
         #\r
         # Value has been set before.\r
         #\r
-        if self.UefiSpecificationVersion is not None:    \r
+        if self.UefiSpecificationVersion is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND\\r
                        %(DT.TAB_INF_DEFINES_UEFI_SPECIFICATION_VERSION),\r
                        LineInfo=self.CurrentLine)\r
-            return False            \r
+            return False\r
         #\r
-        # The EdkReleaseVersion should be 4 bytes hex string.  \r
+        # The EdkReleaseVersion should be 4 bytes hex string.\r
         #\r
         if IsValidHexVersion(UefiSpecificationVersion) or \\r
            IsValidDecVersionVal(UefiSpecificationVersion):\r
@@ -422,25 +422,25 @@ class InfDefSection(InfDefSectionOptionRomInfo):
             return False\r
 \r
     ## GetUefiSpecificationVersion\r
-    #           \r
+    #\r
     def GetUefiSpecificationVersion(self):\r
-        return self.UefiSpecificationVersion            \r
+        return self.UefiSpecificationVersion\r
 \r
     ## SetPiSpecificationVersion\r
     #\r
     # @param PiSpecificationVersion: PiSpecificationVersion\r
-    #         \r
+    #\r
     def SetPiSpecificationVersion(self, PiSpecificationVersion, Comments):\r
         #\r
         # Value has been set before.\r
         #\r
-        if self.PiSpecificationVersion is not None:    \r
+        if self.PiSpecificationVersion is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND\\r
                        %(DT.TAB_INF_DEFINES_PI_SPECIFICATION_VERSION),\r
                        LineInfo=self.CurrentLine)\r
-            return False         \r
+            return False\r
         #\r
-        # The EdkReleaseVersion should be 4 bytes hex string.  \r
+        # The EdkReleaseVersion should be 4 bytes hex string.\r
         #\r
         if IsValidHexVersion(PiSpecificationVersion) or \\r
            IsValidDecVersionVal(PiSpecificationVersion):\r
@@ -451,24 +451,24 @@ class InfDefSection(InfDefSectionOptionRomInfo):
         else:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID\\r
                        %(PiSpecificationVersion),\r
-                       LineInfo=self.CurrentLine)            \r
+                       LineInfo=self.CurrentLine)\r
             return False\r
 \r
     ## GetPiSpecificationVersion\r
-    #      \r
+    #\r
     def GetPiSpecificationVersion(self):\r
         return self.PiSpecificationVersion\r
 \r
     ## SetLibraryClass\r
     #\r
     # @param LibraryClass: LibraryClass\r
-    #            \r
+    #\r
     def SetLibraryClass(self, LibraryClass, Comments):\r
         ValueList = GetSplitValueList(LibraryClass)\r
-        Name = ValueList[0]         \r
+        Name = ValueList[0]\r
         if IsValidWord(Name):\r
             InfDefineLibraryItemObj = InfDefineLibraryItem()\r
-            InfDefineLibraryItemObj.SetLibraryName(Name)            \r
+            InfDefineLibraryItemObj.SetLibraryName(Name)\r
             InfDefineLibraryItemObj.Comments = Comments\r
             if len(ValueList) == 2:\r
                 Type = ValueList[1]\r
@@ -479,23 +479,23 @@ class InfDefSection(InfDefSectionOptionRomInfo):
                         ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(Item),\r
                                    LineInfo=self.CurrentLine)\r
                         return False\r
-                InfDefineLibraryItemObj.SetTypes(TypeList)                    \r
-            self.LibraryClass.append(InfDefineLibraryItemObj)               \r
+                InfDefineLibraryItemObj.SetTypes(TypeList)\r
+            self.LibraryClass.append(InfDefineLibraryItemObj)\r
         else:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(Name),\r
                        LineInfo=self.CurrentLine)\r
             return False\r
-        \r
+\r
         return True\r
-    \r
+\r
     def GetLibraryClass(self):\r
         return self.LibraryClass\r
-  \r
+\r
     def SetVersionString(self, VersionString, Comments):\r
         #\r
         # Value has been set before.\r
         #\r
-        if self.VersionString is not None:    \r
+        if self.VersionString is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND\\r
                        %(DT.TAB_INF_DEFINES_VERSION_STRING),\r
                        LineInfo=self.CurrentLine)\r
@@ -503,25 +503,25 @@ class InfDefSection(InfDefSectionOptionRomInfo):
         if not IsValidDecVersion(VersionString):\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID\\r
                        %(VersionString),\r
-                       LineInfo=self.CurrentLine) \r
+                       LineInfo=self.CurrentLine)\r
         self.VersionString = InfDefMember()\r
         self.VersionString.SetValue(VersionString)\r
         self.VersionString.Comments = Comments\r
         return True\r
 \r
-        \r
+\r
     def GetVersionString(self):\r
         return self.VersionString\r
-    \r
+\r
     def SetPcdIsDriver(self, PcdIsDriver, Comments):\r
         #\r
         # Value has been set before.\r
         #\r
-        if self.PcdIsDriver is not None:    \r
+        if self.PcdIsDriver is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND\\r
                        %(DT.TAB_INF_DEFINES_PCD_IS_DRIVER),\r
                        LineInfo=self.CurrentLine)\r
-            return False         \r
+            return False\r
         if PcdIsDriver == 'PEI_PCD_DRIVER' or PcdIsDriver == 'DXE_PCD_DRIVER':\r
             self.PcdIsDriver = InfDefMember()\r
             self.PcdIsDriver.SetValue(PcdIsDriver)\r
@@ -531,20 +531,20 @@ class InfDefSection(InfDefSectionOptionRomInfo):
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(PcdIsDriver),\r
                        LineInfo=self.CurrentLine)\r
             return False\r
-    \r
+\r
     def GetPcdIsDriver(self):\r
         return self.PcdIsDriver\r
-    \r
+\r
     #\r
     # SetEntryPoint\r
-    #    \r
+    #\r
     def SetEntryPoint(self, EntryPoint, Comments):\r
         #\r
         # It can be a list\r
         #\r
         ValueList = []\r
         TokenList = GetSplitValueList(EntryPoint, DT.TAB_VALUE_SPLIT)\r
-        ValueList[0:len(TokenList)] = TokenList        \r
+        ValueList[0:len(TokenList)] = TokenList\r
         InfDefineEntryPointItemObj = InfDefineEntryPointItem()\r
         if not IsValidCVariableName(ValueList[0]):\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%\\r
@@ -557,33 +557,33 @@ class InfDefSection(InfDefSectionOptionRomInfo):
                            (ValueList[1]),\r
                            LineInfo=self.CurrentLine)\r
             #\r
-            # Validate FFE    \r
+            # Validate FFE\r
             #\r
             FeatureFlagRtv = IsValidFeatureFlagExp(ValueList[1].strip())\r
             if not FeatureFlagRtv[0]:\r
                 ErrorInInf(ST.ERR_INF_PARSER_FEATURE_FLAG_EXP_SYNTAX_INVLID%\\r
                            (FeatureFlagRtv[1]),\r
-                           LineInfo=self.CurrentLine)       \r
-            InfDefineEntryPointItemObj.SetFeatureFlagExp(ValueList[1])     \r
+                           LineInfo=self.CurrentLine)\r
+            InfDefineEntryPointItemObj.SetFeatureFlagExp(ValueList[1])\r
         if len(ValueList) > 2:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(EntryPoint),\r
                        LineInfo=self.CurrentLine)\r
-        InfDefineEntryPointItemObj.Comments = Comments             \r
-        self.EntryPoint.append(InfDefineEntryPointItemObj)       \r
-        \r
+        InfDefineEntryPointItemObj.Comments = Comments\r
+        self.EntryPoint.append(InfDefineEntryPointItemObj)\r
+\r
     def GetEntryPoint(self):\r
         return self.EntryPoint\r
 \r
     #\r
     # SetUnloadImages\r
-    #      \r
+    #\r
     def SetUnloadImages(self, UnloadImages, Comments):\r
         #\r
         # It can be a list\r
         #\r
         ValueList = []\r
         TokenList = GetSplitValueList(UnloadImages, DT.TAB_VALUE_SPLIT)\r
-        ValueList[0:len(TokenList)] = TokenList        \r
+        ValueList[0:len(TokenList)] = TokenList\r
         InfDefineUnloadImageItemObj = InfDefineUnloadImageItem()\r
         if not IsValidCVariableName(ValueList[0]):\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(ValueList[0]),\r
@@ -594,33 +594,33 @@ class InfDefSection(InfDefSectionOptionRomInfo):
                 ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(ValueList[1]),\r
                            LineInfo=self.CurrentLine)\r
             #\r
-            # Validate FFE    \r
+            # Validate FFE\r
             #\r
             FeatureFlagRtv = IsValidFeatureFlagExp(ValueList[1].strip())\r
             if not FeatureFlagRtv[0]:\r
                 ErrorInInf(ST.ERR_INF_PARSER_FEATURE_FLAG_EXP_SYNTAX_INVLID%(FeatureFlagRtv[1]),\r
                            LineInfo=self.CurrentLine)\r
             InfDefineUnloadImageItemObj.SetFeatureFlagExp(ValueList[1])\r
-                \r
+\r
         if len(ValueList) > 2:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(UnloadImages),\r
                        LineInfo=self.CurrentLine)\r
         InfDefineUnloadImageItemObj.Comments = Comments\r
         self.UnloadImages.append(InfDefineUnloadImageItemObj)\r
-        \r
+\r
     def GetUnloadImages(self):\r
         return self.UnloadImages\r
 \r
     #\r
     # SetConstructor\r
-    #          \r
+    #\r
     def SetConstructor(self, Constructor, Comments):\r
         #\r
         # It can be a list\r
         #\r
         ValueList = []\r
         TokenList = GetSplitValueList(Constructor, DT.TAB_VALUE_SPLIT)\r
-        ValueList[0:len(TokenList)] = TokenList        \r
+        ValueList[0:len(TokenList)] = TokenList\r
         InfDefineConstructorItemObj = InfDefineConstructorItem()\r
         if not IsValidCVariableName(ValueList[0]):\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(ValueList[0]),\r
@@ -635,39 +635,39 @@ class InfDefSection(InfDefSectionOptionRomInfo):
                 if ModItem not in DT.MODULE_LIST:\r
                     ErrorInInf(ST.ERR_INF_PARSER_DEFINE_MODULETYPE_INVALID%(ModItem),\r
                                LineInfo=self.CurrentLine)\r
-            InfDefineConstructorItemObj.SetSupModList(ModList)             \r
+            InfDefineConstructorItemObj.SetSupModList(ModList)\r
         if len(ValueList) == 3:\r
             if ValueList[2].strip() == '':\r
                 ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(ValueList[2]),\r
                            LineInfo=self.CurrentLine)\r
             #\r
-            # Validate FFE    \r
+            # Validate FFE\r
             #\r
             FeatureFlagRtv = IsValidFeatureFlagExp(ValueList[2].strip())\r
             if not FeatureFlagRtv[0]:\r
                 ErrorInInf(ST.ERR_INF_PARSER_FEATURE_FLAG_EXP_SYNTAX_INVLID%(FeatureFlagRtv[2]),\r
                            LineInfo=self.CurrentLine)\r
             InfDefineConstructorItemObj.SetFeatureFlagExp(ValueList[2])\r
-                    \r
+\r
         if len(ValueList) > 3:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(Constructor),\r
                        LineInfo=self.CurrentLine)\r
-        InfDefineConstructorItemObj.Comments = Comments    \r
-        self.Constructor.append(InfDefineConstructorItemObj)     \r
-           \r
+        InfDefineConstructorItemObj.Comments = Comments\r
+        self.Constructor.append(InfDefineConstructorItemObj)\r
+\r
     def GetConstructor(self):\r
         return self.Constructor\r
 \r
     #\r
     # SetDestructor\r
-    #      \r
+    #\r
     def SetDestructor(self, Destructor, Comments):\r
         #\r
         # It can be a list and only 1 set to TRUE\r
-        #        \r
+        #\r
         ValueList = []\r
         TokenList = GetSplitValueList(Destructor, DT.TAB_VALUE_SPLIT)\r
-        ValueList[0:len(TokenList)] = TokenList        \r
+        ValueList[0:len(TokenList)] = TokenList\r
         InfDefineDestructorItemObj = InfDefineDestructorItem()\r
         if not IsValidCVariableName(ValueList[0]):\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(ValueList[0]),\r
@@ -682,30 +682,30 @@ class InfDefSection(InfDefSectionOptionRomInfo):
                 if ModItem not in DT.MODULE_LIST:\r
                     ErrorInInf(ST.ERR_INF_PARSER_DEFINE_MODULETYPE_INVALID%(ModItem),\r
                                LineInfo=self.CurrentLine)\r
-            InfDefineDestructorItemObj.SetSupModList(ModList)          \r
+            InfDefineDestructorItemObj.SetSupModList(ModList)\r
         if len(ValueList) == 3:\r
             if ValueList[2].strip() == '':\r
                 ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(ValueList[2]),\r
                            LineInfo=self.CurrentLine)\r
             #\r
-            # Validate FFE    \r
+            # Validate FFE\r
             #\r
             FeatureFlagRtv = IsValidFeatureFlagExp(ValueList[2].strip())\r
             if not FeatureFlagRtv[0]:\r
                 ErrorInInf(ST.ERR_INF_PARSER_FEATURE_FLAG_EXP_SYNTAX_INVLID%(FeatureFlagRtv[1]),\r
                            LineInfo=self.CurrentLine)\r
             InfDefineDestructorItemObj.SetFeatureFlagExp(ValueList[2])\r
-        \r
+\r
         if len(ValueList) > 3:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(Destructor),\r
                        LineInfo=self.CurrentLine)\r
-            \r
-        InfDefineDestructorItemObj.Comments = Comments \r
-        self.Destructor.append(InfDefineDestructorItemObj) \r
-        \r
+\r
+        InfDefineDestructorItemObj.Comments = Comments\r
+        self.Destructor.append(InfDefineDestructorItemObj)\r
+\r
     def GetDestructor(self):\r
         return self.Destructor\r
-    \r
+\r
     def SetShadow(self, Shadow, Comments):\r
         #\r
         # Value has been set before.\r
@@ -713,7 +713,7 @@ class InfDefSection(InfDefSectionOptionRomInfo):
         if self.Shadow is not None:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND%(DT.TAB_INF_DEFINES_SHADOW),\r
                        LineInfo=self.CurrentLine)\r
-            return False          \r
+            return False\r
         if (IsValidBoolType(Shadow)):\r
             self.Shadow = InfDefMember()\r
             self.Shadow.SetValue(Shadow)\r
@@ -751,22 +751,22 @@ class InfDefSection(InfDefSectionOptionRomInfo):
             IsValidFileFlag = False\r
             ModulePath = os.path.split(self.CurrentLine[0])[0]\r
             if IsValidPath(FileName, ModulePath):\r
-                IsValidFileFlag = True           \r
+                IsValidFileFlag = True\r
             else:\r
                 ErrorInInf(ST.ERR_INF_PARSER_FILE_NOT_EXIST_OR_NAME_INVALID%(FileName),\r
                            LineInfo=self.CurrentLine)\r
                 return False\r
             if IsValidFileFlag:\r
-                FileName = ConvPathFromAbsToRel(FileName, GlobalData.gINF_MODULE_DIR)                     \r
+                FileName = ConvPathFromAbsToRel(FileName, GlobalData.gINF_MODULE_DIR)\r
                 self.CustomMakefile.append((Family, FileName, Comments))\r
                 IsValidFileFlag = False\r
             return True\r
         else:\r
             return False\r
-        \r
+\r
     def GetCustomMakefile(self):\r
         return self.CustomMakefile\r
-    \r
+\r
     #\r
     # ["SPEC" <Spec> <EOL>]*{0,}\r
     # <Spec>                 ::=  <Word> "=" <VersionVal>\r
@@ -785,7 +785,7 @@ class InfDefSection(InfDefSectionOptionRomInfo):
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_NO_NAME + ' Or ' + ST.ERR_INF_PARSER_DEFINE_ITEM_NO_VALUE,\r
                        LineInfo=self.CurrentLine)\r
         Name = __ValueList[0].strip()\r
-        Version = __ValueList[1].strip()   \r
+        Version = __ValueList[1].strip()\r
         if IsValidIdentifier(Name):\r
             if IsValidDecVersion(Version):\r
                 self.Specification.append((Name, Version, Comments))\r
@@ -794,15 +794,15 @@ class InfDefSection(InfDefSectionOptionRomInfo):
                 ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(Version),\r
                            LineInfo=self.CurrentLine)\r
                 return False\r
-        else:                  \r
+        else:\r
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(Name),\r
                        LineInfo=self.CurrentLine)\r
-            return False    \r
+            return False\r
         return True\r
 \r
     def GetSpecification(self):\r
         return self.Specification\r
-    \r
+\r
     #\r
     # [<UefiHiiResource> <EOL>]{0,1}\r
     # <UefiHiiResource>      ::=  "UEFI_HII_RESOURCE_SECTION" "=" <BoolType>\r
@@ -815,12 +815,12 @@ class InfDefSection(InfDefSectionOptionRomInfo):
             ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_MORE_THAN_ONE_FOUND\r
                        %(DT.TAB_INF_DEFINES_UEFI_HII_RESOURCE_SECTION),\r
                        LineInfo=self.CurrentLine)\r
-            return False           \r
+            return False\r
         if not (UefiHiiResourceSection == '' or UefiHiiResourceSection is None):\r
             if (IsValidBoolType(UefiHiiResourceSection)):\r
                 self.UefiHiiResourceSection = InfDefMember()\r
                 self.UefiHiiResourceSection.SetValue(UefiHiiResourceSection)\r
-                self.UefiHiiResourceSection.Comments = Comments                \r
+                self.UefiHiiResourceSection.Comments = Comments\r
                 return True\r
             else:\r
                 ErrorInInf(ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(UefiHiiResourceSection),\r
@@ -828,28 +828,28 @@ class InfDefSection(InfDefSectionOptionRomInfo):
                 return False\r
         else:\r
             return False\r
-            \r
+\r
     def GetUefiHiiResourceSection(self):\r
         return self.UefiHiiResourceSection\r
-    \r
-    def SetDpxSource(self, DpxSource, Comments):    \r
+\r
+    def SetDpxSource(self, DpxSource, Comments):\r
         #\r
         # The MakefileName specified file should exist\r
         #\r
         IsValidFileFlag = False\r
         ModulePath = os.path.split(self.CurrentLine[0])[0]\r
         if IsValidPath(DpxSource, ModulePath):\r
-            IsValidFileFlag = True           \r
+            IsValidFileFlag = True\r
         else:\r
             ErrorInInf(ST.ERR_INF_PARSER_FILE_NOT_EXIST_OR_NAME_INVALID%(DpxSource),\r
                        LineInfo=self.CurrentLine)\r
             return False\r
         if IsValidFileFlag:\r
-            DpxSource = ConvPathFromAbsToRel(DpxSource, \r
-                            GlobalData.gINF_MODULE_DIR)     \r
+            DpxSource = ConvPathFromAbsToRel(DpxSource,\r
+                            GlobalData.gINF_MODULE_DIR)\r
             self.DpxSource.append((DpxSource, Comments))\r
             IsValidFileFlag = False\r
-        return True               \r
+        return True\r
 \r
     def GetDpxSource(self):\r
         return self.DpxSource\r
@@ -867,7 +867,7 @@ gFUNCTION_MAPPING_FOR_DEFINE_SECTION = {
     DT.TAB_INF_DEFINES_INF_VERSION                 : InfDefSection.SetInfVersion,\r
     #\r
     # Optional Fields\r
-    #        \r
+    #\r
     DT.TAB_INF_DEFINES_MODULE_UNI_FILE             : InfDefSection.SetModuleUniFileName,\r
     DT.TAB_INF_DEFINES_EDK_RELEASE_VERSION         : InfDefSection.SetEdkReleaseVersion,\r
     DT.TAB_INF_DEFINES_UEFI_SPECIFICATION_VERSION  : InfDefSection.SetUefiSpecificationVersion,\r
@@ -882,10 +882,10 @@ gFUNCTION_MAPPING_FOR_DEFINE_SECTION = {
     DT.TAB_INF_DEFINES_SHADOW                      : InfDefSection.SetShadow,\r
     DT.TAB_INF_DEFINES_PCI_VENDOR_ID               : InfDefSection.SetPciVendorId,\r
     DT.TAB_INF_DEFINES_PCI_DEVICE_ID               : InfDefSection.SetPciDeviceId,\r
-    DT.TAB_INF_DEFINES_PCI_CLASS_CODE              : InfDefSection.SetPciClassCode,   \r
+    DT.TAB_INF_DEFINES_PCI_CLASS_CODE              : InfDefSection.SetPciClassCode,\r
     DT.TAB_INF_DEFINES_PCI_REVISION                : InfDefSection.SetPciRevision,\r
     DT.TAB_INF_DEFINES_PCI_COMPRESS                : InfDefSection.SetPciCompress,\r
-    DT.TAB_INF_DEFINES_CUSTOM_MAKEFILE             : InfDefSection.SetCustomMakefile,  \r
+    DT.TAB_INF_DEFINES_CUSTOM_MAKEFILE             : InfDefSection.SetCustomMakefile,\r
     DT.TAB_INF_DEFINES_SPEC                        : InfDefSection.SetSpecification,\r
     DT.TAB_INF_DEFINES_UEFI_HII_RESOURCE_SECTION   : InfDefSection.SetUefiHiiResourceSection,\r
     DT.TAB_INF_DEFINES_DPX_SOURCE                  : InfDefSection.SetDpxSource\r
@@ -908,7 +908,7 @@ class InfDefMember():
         return self.Value\r
     def SetValue(self, Value):\r
         self.Value = Value\r
-    \r
+\r
 ## InfDefObject\r
 #\r
 #\r
@@ -922,7 +922,7 @@ class InfDefObject(InfSectionCommonDef):
         #\r
         HasFoundInfVersionFalg = False\r
         LineInfo = ['', -1, '']\r
-        ArchListString = ' '.join(Arch)  \r
+        ArchListString = ' '.join(Arch)\r
         #\r
         # Parse Define items.\r
         #\r
@@ -947,7 +947,7 @@ class InfDefObject(InfSectionCommonDef):
                            ErrorCode=ToolError.EDK1_INF_ERROR,\r
                            RaiseError=True)\r
             if Name == DT.TAB_INF_DEFINES_INF_VERSION:\r
-                HasFoundInfVersionFalg = True  \r
+                HasFoundInfVersionFalg = True\r
             if not (Name == '' or Name is None):\r
                 #\r
                 # Process "SPEC" Keyword definition.\r
@@ -958,7 +958,7 @@ class InfDefObject(InfSectionCommonDef):
                     Name = "SPEC"\r
                     Value = SpecValue + " = " + Value\r
                 if ArchListString in self.Defines:\r
-                    DefineList = self.Defines[ArchListString]                 \r
+                    DefineList = self.Defines[ArchListString]\r
                     LineInfo[0] = InfDefMemberObj.CurrentLine.GetFileName()\r
                     LineInfo[1] = InfDefMemberObj.CurrentLine.GetLineNo()\r
                     LineInfo[2] = InfDefMemberObj.CurrentLine.GetLineString()\r
@@ -968,7 +968,7 @@ class InfDefObject(InfSectionCommonDef):
                     #\r
                     if Name not in gFUNCTION_MAPPING_FOR_DEFINE_SECTION.keys():\r
                         ErrorInInf(ST.ERR_INF_PARSER_DEFINE_SECTION_KEYWORD_INVALID%(Name),\r
-                                   LineInfo=LineInfo)                           \r
+                                   LineInfo=LineInfo)\r
                     else:\r
                         ProcessFunc = gFUNCTION_MAPPING_FOR_DEFINE_SECTION[Name]\r
                     if (ProcessFunc is not None):\r
@@ -988,7 +988,7 @@ class InfDefObject(InfSectionCommonDef):
                                    LineInfo=LineInfo)\r
                     #\r
                     # Found the process function from mapping table.\r
-                    #                    \r
+                    #\r
                     else:\r
                         ProcessFunc = gFUNCTION_MAPPING_FOR_DEFINE_SECTION[Name]\r
                     if (ProcessFunc is not None):\r
@@ -1000,9 +1000,9 @@ class InfDefObject(InfSectionCommonDef):
         if not HasFoundInfVersionFalg:\r
             ErrorInInf(ST.ERR_INF_PARSER_NOT_SUPPORT_EDKI_INF,\r
                        ErrorCode=ToolError.EDK1_INF_ERROR,\r
-                       RaiseError=True) \r
+                       RaiseError=True)\r
         return True\r
-    \r
+\r
     def GetDefines(self):\r
-        return self.Defines                      \r
-        \r
+        return self.Defines\r
+\r
index 55d6bbc69e61ec86855ac7461f47b37d62b9d9cd..b8362dfbb5b10428beec2dd0ed6109e5f8bae012 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file [Depex] section. \r
-# It will consumed by InfParser. \r
+# This file is used to define class objects of INF file [Depex] section.\r
+# It will consumed by InfParser.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -99,7 +99,7 @@ class InfDepexObject(InfSectionCommonDef):
 \r
             #\r
             # Validate Arch\r
-            #                 \r
+            #\r
             if IsValidArch(Arch.strip().upper()):\r
                 InfDepexItemIns.SetSupArch(Arch)\r
             else:\r
index 4dfe75a2f16ac55bf8ae9e09ca10406bdd893752..52c03eed2a469c6af10706adc0e67820193a3fb9 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file [Guids] section. \r
-# It will consumed by InfParser. \r
+# This file is used to define class objects of INF file [Guids] section.\r
+# It will consumed by InfParser.\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -18,10 +18,10 @@ InfGuidObject
 \r
 from Library.ParserValidate import IsValidCVariableName\r
 from Library.CommentParsing import ParseComment\r
-from Library.ExpressionValidate import IsValidFeatureFlagExp \r
-                               \r
+from Library.ExpressionValidate import IsValidFeatureFlagExp\r
+\r
 from Library.Misc import Sdict\r
-from Library import DataType as DT                 \r
+from Library import DataType as DT\r
 import Logger.Log as Logger\r
 from Logger import ToolError\r
 from Logger import StringTable as ST\r
@@ -29,7 +29,7 @@ from Logger import StringTable as ST
 class InfGuidItemCommentContent():\r
     def __init__(self):\r
         #\r
-        # ## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation"  \r
+        # ## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation"\r
         # TailString.\r
         #\r
         #\r
@@ -48,27 +48,27 @@ class InfGuidItemCommentContent():
         # TailString\r
         #\r
         self.HelpStringItem = ''\r
-        \r
+\r
     def SetUsageItem(self, UsageItem):\r
         self.UsageItem = UsageItem\r
     def GetUsageItem(self):\r
         return self.UsageItem\r
-    \r
+\r
     def SetGuidTypeItem(self, GuidTypeItem):\r
         self.GuidTypeItem = GuidTypeItem\r
     def GetGuidTypeItem(self):\r
         return self.GuidTypeItem\r
-    \r
+\r
     def SetVariableNameItem(self, VariableNameItem):\r
         self.VariableNameItem = VariableNameItem\r
     def GetVariableNameItem(self):\r
         return self.VariableNameItem\r
-    \r
+\r
     def SetHelpStringItem(self, HelpStringItem):\r
         self.HelpStringItem = HelpStringItem\r
     def GetHelpStringItem(self):\r
         return self.HelpStringItem\r
-    \r
+\r
 class InfGuidItem():\r
     def __init__(self):\r
         self.Name = ''\r
@@ -78,22 +78,22 @@ class InfGuidItem():
         #\r
         self.CommentList = []\r
         self.SupArchList = []\r
-    \r
+\r
     def SetName(self, Name):\r
         self.Name = Name\r
     def GetName(self):\r
         return self.Name\r
-    \r
+\r
     def SetFeatureFlagExp(self, FeatureFlagExp):\r
         self.FeatureFlagExp = FeatureFlagExp\r
     def GetFeatureFlagExp(self):\r
         return self.FeatureFlagExp\r
-   \r
+\r
     def SetCommentList(self, CommentList):\r
         self.CommentList = CommentList\r
     def GetCommentList(self):\r
         return self.CommentList\r
-    \r
+\r
     def SetSupArchList(self, SupArchList):\r
         self.SupArchList = SupArchList\r
     def GetSupArchList(self):\r
@@ -120,17 +120,17 @@ def ParseGuidComment(CommentsList, InfGuidItemObj):
             CommentItemGuidType, \\r
             CommentItemVarString, \\r
             CommentItemHelpText = \\r
-                    ParseComment(CommentItem, \r
-                                 DT.ALL_USAGE_TOKENS, \r
-                                 DT.GUID_TYPE_TOKENS, \r
-                                 [], \r
+                    ParseComment(CommentItem,\r
+                                 DT.ALL_USAGE_TOKENS,\r
+                                 DT.GUID_TYPE_TOKENS,\r
+                                 [],\r
                                  True)\r
-            \r
+\r
             if CommentItemHelpText is None:\r
                 CommentItemHelpText = ''\r
                 if Count == len(CommentsList) and CommentItemUsage == CommentItemGuidType == DT.ITEM_UNDEFINED:\r
                     CommentItemHelpText = DT.END_OF_LINE\r
-                \r
+\r
             if Count == len(CommentsList):\r
                 if BlockFlag == 1 or BlockFlag == 2:\r
                     if CommentItemUsage == CommentItemGuidType == DT.ITEM_UNDEFINED:\r
@@ -138,7 +138,7 @@ def ParseGuidComment(CommentsList, InfGuidItemObj):
                     else:\r
                         BlockFlag = 3\r
                 if BlockFlag == -1:\r
-                    BlockFlag = 4  \r
+                    BlockFlag = 4\r
             if BlockFlag == -1 or BlockFlag == 1 or BlockFlag == 2:\r
                 if CommentItemUsage == CommentItemGuidType == DT.ITEM_UNDEFINED:\r
                     if BlockFlag == -1:\r
@@ -150,15 +150,15 @@ def ParseGuidComment(CommentsList, InfGuidItemObj):
                         BlockFlag = 3\r
                     elif BlockFlag == -1:\r
                         BlockFlag = 4\r
-                                                                              \r
+\r
             #\r
             # Combine two comment line if they are generic comment\r
-            #   \r
+            #\r
             if CommentItemUsage == CommentItemGuidType == PreUsage == PreGuidType == DT.ITEM_UNDEFINED:\r
                 CommentItemHelpText = PreHelpText + DT.END_OF_LINE + CommentItemHelpText\r
                 PreHelpText = CommentItemHelpText\r
-                \r
-            if BlockFlag == 4:     \r
+\r
+            if BlockFlag == 4:\r
                 CommentItemIns = InfGuidItemCommentContent()\r
                 CommentItemIns.SetUsageItem(CommentItemUsage)\r
                 CommentItemIns.SetGuidTypeItem(CommentItemGuidType)\r
@@ -167,16 +167,16 @@ def ParseGuidComment(CommentsList, InfGuidItemObj):
                     CommentItemHelpText = CommentItemHelpText.strip(DT.END_OF_LINE)\r
                 CommentItemIns.SetHelpStringItem(CommentItemHelpText)\r
                 CommentInsList.append(CommentItemIns)\r
-                \r
+\r
                 BlockFlag = -1\r
                 PreUsage = None\r
                 PreGuidType = None\r
                 PreHelpText = ''\r
-                \r
+\r
             elif BlockFlag == 3:\r
                 #\r
                 # Add previous help string\r
-                # \r
+                #\r
                 CommentItemIns = InfGuidItemCommentContent()\r
                 CommentItemIns.SetUsageItem(DT.ITEM_UNDEFINED)\r
                 CommentItemIns.SetGuidTypeItem(DT.ITEM_UNDEFINED)\r
@@ -195,17 +195,17 @@ def ParseGuidComment(CommentsList, InfGuidItemObj):
                     CommentItemHelpText = CommentItemHelpText.strip(DT.END_OF_LINE)\r
                 CommentItemIns.SetHelpStringItem(CommentItemHelpText)\r
                 CommentInsList.append(CommentItemIns)\r
-                \r
+\r
                 BlockFlag = -1\r
                 PreUsage = None\r
                 PreGuidType = None\r
-                PreHelpText = ''    \r
-                                                                                \r
+                PreHelpText = ''\r
+\r
             else:\r
                 PreUsage = CommentItemUsage\r
                 PreGuidType = CommentItemGuidType\r
                 PreHelpText = CommentItemHelpText\r
-                          \r
+\r
         InfGuidItemObj.SetCommentList(CommentInsList)\r
     else:\r
         #\r
@@ -215,7 +215,7 @@ def ParseGuidComment(CommentsList, InfGuidItemObj):
         CommentItemIns.SetUsageItem(DT.ITEM_UNDEFINED)\r
         CommentItemIns.SetGuidTypeItem(DT.ITEM_UNDEFINED)\r
         InfGuidItemObj.SetCommentList([CommentItemIns])\r
-    \r
+\r
     return InfGuidItemObj\r
 \r
 ## InfGuidObject\r
@@ -229,18 +229,18 @@ class InfGuidObject():
         # Macro defined in this section should be only used in this section.\r
         #\r
         self.Macros = {}\r
-    \r
+\r
     def SetGuid(self, GuidList, Arch = None):\r
         __SupportArchList = []\r
         for ArchItem in Arch:\r
             #\r
             # Validate Arch\r
-            #            \r
+            #\r
             if (ArchItem == '' or ArchItem is None):\r
-                ArchItem = 'COMMON'  \r
-            \r
+                ArchItem = 'COMMON'\r
+\r
             __SupportArchList.append(ArchItem)\r
-            \r
+\r
         for Item in GuidList:\r
             #\r
             # Get Comment content of this protocol\r
@@ -250,77 +250,77 @@ class InfGuidObject():
                 CommentsList = Item[1]\r
             CurrentLineOfItem = Item[2]\r
             Item = Item[0]\r
-            InfGuidItemObj = InfGuidItem()                \r
+            InfGuidItemObj = InfGuidItem()\r
             if len(Item) >= 1 and len(Item) <= 2:\r
                 #\r
                 # Only GuildName contained\r
                 #\r
                 if not IsValidCVariableName(Item[0]):\r
-                    Logger.Error("InfParser", \r
-                                 ToolError.FORMAT_INVALID, \r
+                    Logger.Error("InfParser",\r
+                                 ToolError.FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_INVALID_CNAME%(Item[0]),\r
-                                 File=CurrentLineOfItem[2], \r
-                                 Line=CurrentLineOfItem[1], \r
+                                 File=CurrentLineOfItem[2],\r
+                                 Line=CurrentLineOfItem[1],\r
                                  ExtraData=CurrentLineOfItem[0])\r
                 if (Item[0] != ''):\r
                     InfGuidItemObj.SetName(Item[0])\r
                 else:\r
-                    Logger.Error("InfParser", \r
-                                 ToolError.FORMAT_INVALID, \r
+                    Logger.Error("InfParser",\r
+                                 ToolError.FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_CNAME_MISSING,\r
-                                 File=CurrentLineOfItem[2], \r
-                                 Line=CurrentLineOfItem[1], \r
+                                 File=CurrentLineOfItem[2],\r
+                                 Line=CurrentLineOfItem[1],\r
                                  ExtraData=CurrentLineOfItem[0])\r
             if len(Item) == 2:\r
                 #\r
                 # Contained CName and Feature Flag Express\r
                 # <statements>           ::=  <CName> ["|" <FeatureFlagExpress>]\r
-                # For GUID entry. \r
+                # For GUID entry.\r
                 #\r
                 if Item[1].strip() == '':\r
-                    Logger.Error("InfParser", \r
-                                 ToolError.FORMAT_INVALID, \r
+                    Logger.Error("InfParser",\r
+                                 ToolError.FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_FEATURE_FLAG_EXP_MISSING,\r
-                                 File=CurrentLineOfItem[2], \r
-                                 Line=CurrentLineOfItem[1], \r
+                                 File=CurrentLineOfItem[2],\r
+                                 Line=CurrentLineOfItem[1],\r
                                  ExtraData=CurrentLineOfItem[0])\r
                 #\r
-                # Validate Feature Flag Express   \r
+                # Validate Feature Flag Express\r
                 #\r
                 FeatureFlagRtv = IsValidFeatureFlagExp(Item[1].strip())\r
                 if not FeatureFlagRtv[0]:\r
-                    Logger.Error("InfParser", \r
+                    Logger.Error("InfParser",\r
                                  ToolError.FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_FEATURE_FLAG_EXP_SYNTAX_INVLID%(FeatureFlagRtv[1]),\r
-                                 File=CurrentLineOfItem[2], \r
-                                 Line=CurrentLineOfItem[1], \r
+                                 File=CurrentLineOfItem[2],\r
+                                 Line=CurrentLineOfItem[1],\r
                                  ExtraData=CurrentLineOfItem[0])\r
                 InfGuidItemObj.SetFeatureFlagExp(Item[1])\r
             if len(Item) != 1 and len(Item) != 2:\r
                 #\r
-                # Invalid format of GUID statement \r
+                # Invalid format of GUID statement\r
                 #\r
-                Logger.Error("InfParser", \r
+                Logger.Error("InfParser",\r
                              ToolError.FORMAT_INVALID,\r
                              ST.ERR_INF_PARSER_GUID_PPI_PROTOCOL_SECTION_CONTENT_ERROR,\r
-                             File=CurrentLineOfItem[2], \r
-                             Line=CurrentLineOfItem[1], \r
+                             File=CurrentLineOfItem[2],\r
+                             Line=CurrentLineOfItem[1],\r
                              ExtraData=CurrentLineOfItem[0])\r
-             \r
+\r
             InfGuidItemObj = ParseGuidComment(CommentsList, InfGuidItemObj)\r
             InfGuidItemObj.SetSupArchList(__SupportArchList)\r
-            \r
+\r
             #\r
             # Determine GUID name duplicate. Follow below rule:\r
             #\r
-            # A GUID must not be duplicated within a [Guids] section. \r
-            # A GUID may appear in multiple architectural [Guids] \r
-            # sections. A GUID listed in an architectural [Guids] \r
-            # section must not be listed in the common architectural \r
+            # A GUID must not be duplicated within a [Guids] section.\r
+            # A GUID may appear in multiple architectural [Guids]\r
+            # sections. A GUID listed in an architectural [Guids]\r
+            # section must not be listed in the common architectural\r
             # [Guids] section.\r
-            # \r
+            #\r
             # NOTE: This check will not report error now.\r
-            # \r
+            #\r
             for Item in self.Guids:\r
                 if Item.GetName() == InfGuidItemObj.GetName():\r
                     ItemSupArchList = Item.GetSupArchList()\r
@@ -337,17 +337,17 @@ class InfGuidObject():
                                 # ST.ERR_INF_PARSER_ITEM_DUPLICATE_COMMON\r
                                 #\r
                                 pass\r
-                                                \r
+\r
             if (InfGuidItemObj) in self.Guids:\r
-                GuidList = self.Guids[InfGuidItemObj]                 \r
+                GuidList = self.Guids[InfGuidItemObj]\r
                 GuidList.append(InfGuidItemObj)\r
                 self.Guids[InfGuidItemObj] = GuidList\r
             else:\r
                 GuidList = []\r
                 GuidList.append(InfGuidItemObj)\r
                 self.Guids[InfGuidItemObj] = GuidList\r
-                \r
+\r
         return True\r
-    \r
+\r
     def GetGuid(self):\r
         return self.Guids\r
index dce75063dfb5d3866236bfe0fa588df0e8db7a1e..d2a8a4adbf8c20f03d4e7809a8e0ad2223958b21 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file header. \r
-# It will consumed by InfParser. \r
+# This file is used to define class objects of INF file header.\r
+# It will consumed by InfParser.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,16 +17,16 @@ InfHeaderObject
 '''\r
 \r
 ## INF file header object\r
-# \r
+#\r
 # A sample file header\r
 #\r
 # ## @file xxx.inf FileName\r
 # # Abstract\r
-# # \r
+# #\r
 # # Description\r
 # #\r
 # # Copyright\r
-# # \r
+# #\r
 # # License\r
 # #\r
 #\r
@@ -41,7 +41,7 @@ class InfHeaderObject():
     ## SetFileName\r
     #\r
     # @param FileName: File Name\r
-    #    \r
+    #\r
     def SetFileName(self, FileName):\r
         if not (FileName == '' or FileName is None):\r
             self.FileName = FileName\r
@@ -50,14 +50,14 @@ class InfHeaderObject():
             return False\r
 \r
     ## GetFileName\r
-    #        \r
+    #\r
     def GetFileName(self):\r
         return self.FileName\r
 \r
     ## SetAbstract\r
-    #     \r
+    #\r
     # @param Abstract: Abstract\r
-    #    \r
+    #\r
     def SetAbstract(self, Abstract):\r
         if not (Abstract == '' or Abstract is None):\r
             self.Abstract = Abstract\r
@@ -66,14 +66,14 @@ class InfHeaderObject():
             return False\r
 \r
     ## GetAbstract\r
-    #           \r
+    #\r
     def GetAbstract(self):\r
-        return self.Abstract \r
+        return self.Abstract\r
 \r
     ## SetDescription\r
-    #     \r
-    # @param Description: Description content \r
-    #  \r
+    #\r
+    # @param Description: Description content\r
+    #\r
     def SetDescription(self, Description):\r
         if not (Description == '' or Description is None):\r
             self.Description = Description\r
@@ -82,14 +82,14 @@ class InfHeaderObject():
             return False\r
 \r
     ## GetAbstract\r
-    #           \r
+    #\r
     def GetDescription(self):\r
-        return self.Description \r
+        return self.Description\r
 \r
     ## SetCopyright\r
-    #     \r
-    # @param Copyright: Copyright content \r
-    #      \r
+    #\r
+    # @param Copyright: Copyright content\r
+    #\r
     def SetCopyright(self, Copyright):\r
         if not (Copyright == '' or Copyright is None):\r
             self.Copyright = Copyright\r
@@ -98,14 +98,14 @@ class InfHeaderObject():
             return False\r
 \r
     ## GetCopyright\r
-    #           \r
+    #\r
     def GetCopyright(self):\r
-        return self.Copyright     \r
+        return self.Copyright\r
 \r
     ## SetCopyright\r
-    #     \r
-    # @param License: License content \r
-    #   \r
+    #\r
+    # @param License: License content\r
+    #\r
     def SetLicense(self, License):\r
         if not (License == '' or License is None):\r
             self.License = License\r
@@ -114,6 +114,6 @@ class InfHeaderObject():
             return False\r
 \r
     ## GetLicense\r
-    #          \r
+    #\r
     def GetLicense(self):\r
-        return self.License
\ No newline at end of file
+        return self.License\r
index 5de1832b71fae9283f0be8b2977ef4bf145cc314..82eca12395be74d18f53cc8669e952ded093c754 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file [LibraryClasses] section. \r
-# It will consumed by InfParser. \r
+# This file is used to define class objects of INF file [LibraryClasses] section.\r
+# It will consumed by InfParser.\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -37,7 +37,7 @@ def GetArchModuleType(KeyList):
     for (ArchItem, ModuleItem) in KeyList:\r
         #\r
         # Validate Arch\r
-        #            \r
+        #\r
         if (ArchItem == '' or ArchItem is None):\r
             ArchItem = 'COMMON'\r
 \r
@@ -118,7 +118,7 @@ class InfLibraryClassObject():
 \r
     ##SetLibraryClasses\r
     #\r
-    # \r
+    #\r
     # @param HelpString:     It can be a common comment or contain a recommend\r
     #                        instance.\r
     #\r
@@ -173,7 +173,7 @@ class InfLibraryClassObject():
                                      Line=LibItemObj.CurrentLine.GetLineNo(),\r
                                      ExtraData=LibItemObj.CurrentLine.GetLineString())\r
                     #\r
-                    # Validate FFE    \r
+                    # Validate FFE\r
                     #\r
                     FeatureFlagRtv = IsValidFeatureFlagExp(LibItem[1].strip())\r
                     if not FeatureFlagRtv[0]:\r
@@ -202,15 +202,15 @@ class InfLibraryClassObject():
                 #\r
                 # Determine Library class duplicate. Follow below rule:\r
                 #\r
-                # A library class keyword must not be duplicated within a \r
-                # [LibraryClasses] section. Library class keywords may appear in \r
-                # multiple architectural and module type [LibraryClasses] sections. \r
-                # A library class keyword listed in an architectural or module type \r
-                # [LibraryClasses] section must not be listed in the common \r
+                # A library class keyword must not be duplicated within a\r
+                # [LibraryClasses] section. Library class keywords may appear in\r
+                # multiple architectural and module type [LibraryClasses] sections.\r
+                # A library class keyword listed in an architectural or module type\r
+                # [LibraryClasses] section must not be listed in the common\r
                 # architectural or module type [LibraryClasses] section.\r
-                # \r
+                #\r
                 # NOTE: This check will not report error now. But keep code for future enhancement.\r
-                # \r
+                #\r
 #                for Item in self.LibraryClasses:\r
 #                    if Item.GetLibName() == LibItemObj.GetLibName():\r
 #                        ItemSupArchList = Item.GetSupArchList()\r
index 4ed739d66fb2762649b19a77387e86ca2ba471bf..c75e7d7a3ed0db084e076e20798772dd28cfd8d4 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file miscellaneous. \r
-# Include BootMode/HOB/Event and others. It will consumed by InfParser. \r
+# This file is used to define class objects of INF file miscellaneous.\r
+# Include BootMode/HOB/Event and others. It will consumed by InfParser.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -23,7 +23,7 @@ from Library import DataType as DT
 from Object.Parser.InfCommonObject import InfSectionCommonDef\r
 from Library.Misc import Sdict\r
 \r
-## \r
+##\r
 # BootModeObject\r
 #\r
 class InfBootModeObject():\r
@@ -31,16 +31,16 @@ class InfBootModeObject():
         self.SupportedBootModes = ''\r
         self.HelpString = ''\r
         self.Usage = ''\r
-            \r
+\r
     def SetSupportedBootModes(self, SupportedBootModes):\r
-        self.SupportedBootModes = SupportedBootModes   \r
+        self.SupportedBootModes = SupportedBootModes\r
     def GetSupportedBootModes(self):\r
         return self.SupportedBootModes\r
 \r
     def SetHelpString(self, HelpString):\r
         self.HelpString = HelpString\r
     def GetHelpString(self):\r
-        return self.HelpString    \r
+        return self.HelpString\r
 \r
     def SetUsage(self, Usage):\r
         self.Usage = Usage\r
@@ -54,18 +54,18 @@ class InfEventObject():
         self.EventType = ''\r
         self.HelpString = ''\r
         self.Usage = ''\r
-            \r
+\r
     def SetEventType(self, EventType):\r
         self.EventType = EventType\r
-    \r
+\r
     def GetEventType(self):\r
         return self.EventType\r
-    \r
+\r
     def SetHelpString(self, HelpString):\r
         self.HelpString = HelpString\r
     def GetHelpString(self):\r
-        return self.HelpString    \r
-    \r
+        return self.HelpString\r
+\r
     def SetUsage(self, Usage):\r
         self.Usage = Usage\r
     def GetUsage(self):\r
@@ -79,36 +79,36 @@ class InfHobObject():
         self.Usage = ''\r
         self.SupArchList = []\r
         self.HelpString = ''\r
-        \r
+\r
     def SetHobType(self, HobType):\r
         self.HobType = HobType\r
-    \r
+\r
     def GetHobType(self):\r
         return self.HobType\r
-    \r
+\r
     def SetUsage(self, Usage):\r
         self.Usage = Usage\r
     def GetUsage(self):\r
         return self.Usage\r
-    \r
+\r
     def SetSupArchList(self, ArchList):\r
         self.SupArchList = ArchList\r
     def GetSupArchList(self):\r
         return self.SupArchList\r
-    \r
+\r
     def SetHelpString(self, HelpString):\r
         self.HelpString = HelpString\r
     def GetHelpString(self):\r
         return self.HelpString\r
-    \r
+\r
 ##\r
 # InfSpecialCommentObject\r
-#    \r
+#\r
 class InfSpecialCommentObject(InfSectionCommonDef):\r
     def __init__(self):\r
         self.SpecialComments = Sdict()\r
         InfSectionCommonDef.__init__(self)\r
-        \r
+\r
     def SetSpecialComments(self, SepcialSectionList = None, Type = ''):\r
         if Type == DT.TYPE_HOB_SECTION or \\r
            Type == DT.TYPE_EVENT_SECTION or \\r
@@ -122,27 +122,27 @@ class InfSpecialCommentObject(InfSectionCommonDef):
                     ObjList = []\r
                     ObjList.append(Item)\r
                     self.SpecialComments[Type] = ObjList\r
-           \r
+\r
         return True\r
-    \r
+\r
     def GetSpecialComments(self):\r
         return self.SpecialComments\r
 \r
 \r
 \r
 ## ErrorInInf\r
-# \r
+#\r
 # An encapsulate of Error for INF parser.\r
-# \r
+#\r
 def ErrorInInf(Message=None, ErrorCode=None, LineInfo=None, RaiseError=True):\r
     if ErrorCode is None:\r
         ErrorCode = ToolError.FORMAT_INVALID\r
     if LineInfo is None:\r
         LineInfo = ['', -1, '']\r
-    Logger.Error("InfParser", \r
-                 ErrorCode, \r
-                 Message=Message, \r
-                 File=LineInfo[0], \r
+    Logger.Error("InfParser",\r
+                 ErrorCode,\r
+                 Message=Message,\r
+                 File=LineInfo[0],\r
                  Line=LineInfo[1],\r
-                 ExtraData=LineInfo[2], \r
+                 ExtraData=LineInfo[2],\r
                  RaiseError=RaiseError)\r
index bfac2b6b571cdf4fc2951250aa11962a46237033..b2ca573549fb2c6060637e63d383aa7bd972a197 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file [Packages] section. \r
-# It will consumed by InfParser. \r
+# This file is used to define class objects of INF file [Packages] section.\r
+# It will consumed by InfParser.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -19,14 +19,14 @@ InfPackageObject
 from Logger import StringTable as ST\r
 from Logger import ToolError\r
 import Logger.Log as Logger\r
-from Library import GlobalData \r
+from Library import GlobalData\r
 \r
 from Library.Misc import Sdict\r
 from Library.ParserValidate import IsValidPath\r
-from Library.ExpressionValidate import IsValidFeatureFlagExp \r
+from Library.ExpressionValidate import IsValidFeatureFlagExp\r
 \r
 class InfPackageItem():\r
-    def __init__(self, \r
+    def __init__(self,\r
                  PackageName = '',\r
                  FeatureFlagExp = '',\r
                  HelpString = ''):\r
@@ -34,28 +34,28 @@ class InfPackageItem():
         self.FeatureFlagExp = FeatureFlagExp\r
         self.HelpString     = HelpString\r
         self.SupArchList    = []\r
-        \r
+\r
     def SetPackageName(self, PackageName):\r
         self.PackageName = PackageName\r
     def GetPackageName(self):\r
         return self.PackageName\r
-    \r
+\r
     def SetFeatureFlagExp(self, FeatureFlagExp):\r
         self.FeatureFlagExp = FeatureFlagExp\r
     def GetFeatureFlagExp(self):\r
         return self.FeatureFlagExp\r
-    \r
+\r
     def SetHelpString(self, HelpString):\r
         self.HelpString = HelpString\r
     def GetHelpString(self):\r
         return self.HelpString\r
-    \r
+\r
     def SetSupArchList(self, SupArchList):\r
         self.SupArchList = SupArchList\r
     def GetSupArchList(self):\r
         return self.SupArchList\r
 \r
-            \r
+\r
 ## INF package section\r
 #\r
 #\r
@@ -67,18 +67,18 @@ class InfPackageObject():
         # Macro defined in this section should be only used in this section.\r
         #\r
         self.Macros         = {}\r
-    \r
+\r
     def SetPackages(self, PackageData, Arch = None):\r
         IsValidFileFlag = False\r
         SupArchList     = []\r
         for ArchItem in Arch:\r
             #\r
             # Validate Arch\r
-            #            \r
+            #\r
             if (ArchItem == '' or ArchItem is None):\r
                 ArchItem = 'COMMON'\r
-            SupArchList.append(ArchItem)       \r
-        \r
+            SupArchList.append(ArchItem)\r
+\r
         for PackageItem in PackageData:\r
             PackageItemObj = InfPackageItem()\r
             HelpStringObj = PackageItem[1]\r
@@ -86,7 +86,7 @@ class InfPackageObject():
             PackageItem = PackageItem[0]\r
             if HelpStringObj is not None:\r
                 HelpString = HelpStringObj.HeaderComments + HelpStringObj.TailComments\r
-                PackageItemObj.SetHelpString(HelpString)                  \r
+                PackageItemObj.SetHelpString(HelpString)\r
             if len(PackageItem) >= 1:\r
                 #\r
                 # Validate file exist/format.\r
@@ -94,67 +94,67 @@ class InfPackageObject():
                 if IsValidPath(PackageItem[0], ''):\r
                     IsValidFileFlag = True\r
                 elif IsValidPath(PackageItem[0], GlobalData.gINF_MODULE_DIR):\r
-                    IsValidFileFlag = True           \r
+                    IsValidFileFlag = True\r
                 elif IsValidPath(PackageItem[0], GlobalData.gWORKSPACE):\r
                     IsValidFileFlag = True\r
                 else:\r
-                    Logger.Error("InfParser", \r
+                    Logger.Error("InfParser",\r
                                  ToolError.FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_FILE_NOT_EXIST_OR_NAME_INVALID%(PackageItem[0]),\r
-                                 File=CurrentLineOfPackItem[2], \r
-                                 Line=CurrentLineOfPackItem[1], \r
+                                 File=CurrentLineOfPackItem[2],\r
+                                 Line=CurrentLineOfPackItem[1],\r
                                  ExtraData=CurrentLineOfPackItem[0])\r
                     return False\r
-                if IsValidFileFlag:                   \r
+                if IsValidFileFlag:\r
                     PackageItemObj.SetPackageName(PackageItem[0])\r
             if len(PackageItem) == 2:\r
                 #\r
                 # Validate Feature Flag Express\r
                 #\r
                 if PackageItem[1].strip() == '':\r
-                    Logger.Error("InfParser", \r
-                                 ToolError.FORMAT_INVALID, \r
+                    Logger.Error("InfParser",\r
+                                 ToolError.FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_FEATURE_FLAG_EXP_MISSING,\r
-                                 File=CurrentLineOfPackItem[2], \r
-                                 Line=CurrentLineOfPackItem[1], \r
+                                 File=CurrentLineOfPackItem[2],\r
+                                 Line=CurrentLineOfPackItem[1],\r
                                  ExtraData=CurrentLineOfPackItem[0])\r
                 #\r
-                # Validate FFE    \r
+                # Validate FFE\r
                 #\r
                 FeatureFlagRtv = IsValidFeatureFlagExp(PackageItem[1].strip())\r
                 if not FeatureFlagRtv[0]:\r
-                    Logger.Error("InfParser", \r
+                    Logger.Error("InfParser",\r
                                  ToolError.FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_FEATURE_FLAG_EXP_SYNTAX_INVLID%(FeatureFlagRtv[1]),\r
-                                 File=CurrentLineOfPackItem[2], \r
-                                 Line=CurrentLineOfPackItem[1], \r
+                                 File=CurrentLineOfPackItem[2],\r
+                                 Line=CurrentLineOfPackItem[1],\r
                                  ExtraData=CurrentLineOfPackItem[0])\r
-                      \r
+\r
                 PackageItemObj.SetFeatureFlagExp(PackageItem[1].strip())\r
-            \r
+\r
             if len(PackageItem) > 2:\r
                 #\r
-                # Invalid format of Package statement \r
+                # Invalid format of Package statement\r
                 #\r
-                Logger.Error("InfParser", \r
-                             ToolError.FORMAT_INVALID, \r
+                Logger.Error("InfParser",\r
+                             ToolError.FORMAT_INVALID,\r
                              ST.ERR_INF_PARSER_PACKAGE_SECTION_CONTENT_ERROR,\r
-                             File=CurrentLineOfPackItem[2], \r
-                             Line=CurrentLineOfPackItem[1], \r
+                             File=CurrentLineOfPackItem[2],\r
+                             Line=CurrentLineOfPackItem[1],\r
                              ExtraData=CurrentLineOfPackItem[0])\r
             PackageItemObj.SetSupArchList(SupArchList)\r
-            \r
+\r
             #\r
             # Determine package file name duplicate. Follow below rule:\r
             #\r
-            # A package filename must not be duplicated within a [Packages] \r
-            # section. Package filenames may appear in multiple architectural \r
-            # [Packages] sections. A package filename listed in an \r
+            # A package filename must not be duplicated within a [Packages]\r
+            # section. Package filenames may appear in multiple architectural\r
+            # [Packages] sections. A package filename listed in an\r
             # architectural [Packages] section must not be listed in the common\r
             # architectural [Packages] section.\r
-            # \r
+            #\r
             # NOTE: This check will not report error now.\r
-            #             \r
+            #\r
             for Item in self.Packages:\r
                 if Item.GetPackageName() == PackageItemObj.GetPackageName():\r
                     ItemSupArchList = Item.GetSupArchList()\r
@@ -170,7 +170,7 @@ class InfPackageObject():
                                 # ST.ERR_INF_PARSER_ITEM_DUPLICATE_COMMON\r
                                 #\r
                                 pass\r
-                                            \r
+\r
             if (PackageItemObj) in self.Packages:\r
                 PackageList = self.Packages[PackageItemObj]\r
                 PackageList.append(PackageItemObj)\r
@@ -179,9 +179,9 @@ class InfPackageObject():
                 PackageList = []\r
                 PackageList.append(PackageItemObj)\r
                 self.Packages[PackageItemObj] = PackageList\r
-        \r
+\r
         return True\r
-    \r
+\r
     def GetPackages(self, Arch = None):\r
         if Arch is None:\r
             return self.Packages\r
index 3b9dfaed0c9897001ee65759b8ebd482232deeda..b812d3253c3eb8c0c399d76b7e507b08eacaa57e 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file [Pcds] section. \r
-# It will consumed by InfParser. \r
+# This file is used to define class objects of INF file [Pcds] section.\r
+# It will consumed by InfParser.\r
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -42,7 +42,7 @@ from Object.Parser.InfPackagesObject import InfPackageItem
 def ValidateArch(ArchItem, PcdTypeItem1, LineNo, SupArchDict, SupArchList):\r
     #\r
     # Validate Arch\r
-    #            \r
+    #\r
     if (ArchItem == '' or ArchItem is None):\r
         ArchItem = 'COMMON'\r
 \r
@@ -122,7 +122,7 @@ def ParsePcdComment(CommentList, PcdTypeItem, PcdItemObj):
                     BlockFlag = 4\r
         #\r
         # Combine two comment line if they are generic comment\r
-        #   \r
+        #\r
         if CommentItemUsage == PreUsage == DT.ITEM_UNDEFINED:\r
             CommentItemHelpText = PreHelpText + DT.END_OF_LINE + CommentItemHelpText\r
 \r
@@ -141,7 +141,7 @@ def ParsePcdComment(CommentList, PcdTypeItem, PcdItemObj):
         elif BlockFlag == 3:\r
             #\r
             # Add previous help string\r
-            # \r
+            #\r
             CommentItemIns = InfPcdItemCommentContent()\r
             CommentItemIns.SetUsageItem(DT.ITEM_UNDEFINED)\r
             if PreHelpText == '' or PreHelpText.endswith(DT.END_OF_LINE):\r
@@ -171,7 +171,7 @@ def ParsePcdComment(CommentList, PcdTypeItem, PcdItemObj):
 class InfPcdItemCommentContent():\r
     def __init__(self):\r
         #\r
-        # ## SOMETIMES_CONSUMES ## HelpString \r
+        # ## SOMETIMES_CONSUMES ## HelpString\r
         #\r
         self.UsageItem = ''\r
         #\r
@@ -195,7 +195,7 @@ class InfPcdItemCommentContent():
 #\r
 # @param CName:                Input value for CName, default is ''\r
 # @param Token:                Input value for Token, default is ''\r
-# @param TokenSpaceGuidCName:  Input value for TokenSpaceGuidCName, default \r
+# @param TokenSpaceGuidCName:  Input value for TokenSpaceGuidCName, default\r
 #                              is ''\r
 # @param DatumType:            Input value for DatumType, default is ''\r
 # @param MaxDatumSize:         Input value for MaxDatumSize, default is ''\r
@@ -385,7 +385,7 @@ class InfPcdObject():
                                      Line=CurrentLineOfPcdItem[1],\r
                                      ExtraData=CurrentLineOfPcdItem[0])\r
                     #\r
-                    # Validate FFE    \r
+                    # Validate FFE\r
                     #\r
                     FeatureFlagRtv = IsValidFeatureFlagExp(PcdItem[2].strip())\r
                     if not FeatureFlagRtv[0]:\r
@@ -478,7 +478,7 @@ def ParserPcdInfoInDec(String):
 \r
 def SetValueDatumTypeMaxSizeToken(PcdItem, CurrentLineOfPcdItem, PcdItemObj, Arch, PackageInfo=None):\r
     #\r
-    # Package information not been generated currently, we need to parser INF file to get information. \r
+    # Package information not been generated currently, we need to parser INF file to get information.\r
     #\r
     if not PackageInfo:\r
         PackageInfo = []\r
@@ -507,7 +507,7 @@ def SetValueDatumTypeMaxSizeToken(PcdItem, CurrentLineOfPcdItem, PcdItemObj, Arc
             DecParser = GlobalData.gPackageDict[FullFileName]\r
 \r
         #\r
-        # Find PCD information.               \r
+        # Find PCD information.\r
         #\r
         DecPcdsDict = DecParser.GetPcdSectionObject().ValueDict\r
         for Key in DecPcdsDict.keys():\r
@@ -640,7 +640,7 @@ def ValidatePcdValueOnDatumType(Value, Type):
 \r
 def SetPcdName(PcdItem, CurrentLineOfPcdItem, PcdItemObj):\r
     #\r
-    # Only PCD Name specified \r
+    # Only PCD Name specified\r
     # <PcdName> ::= <TokenSpaceGuidCName> "." <TokenCName>\r
     #\r
     PcdId = GetSplitValueList(PcdItem[0], DT.TAB_SPLIT)\r
index 0f865c569665287151b70109f4c5e65168d71d4b..b871a5088a7266f91b4936aff6b8fb10e254aaf5 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file [Ppis] section. \r
-# It will consumed by InfParser. \r
+# This file is used to define class objects of INF file [Ppis] section.\r
+# It will consumed by InfParser.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -18,17 +18,17 @@ InfPpiObject
 \r
 from Library.ParserValidate import IsValidCVariableName\r
 from Library.CommentParsing import ParseComment\r
-from Library.ExpressionValidate import IsValidFeatureFlagExp \r
-                               \r
+from Library.ExpressionValidate import IsValidFeatureFlagExp\r
+\r
 from Library.Misc import Sdict\r
-from Library import DataType as DT                \r
+from Library import DataType as DT\r
 import Logger.Log as Logger\r
 from Logger import ToolError\r
 from Logger import StringTable as ST\r
 \r
 def ParsePpiComment(CommentsList, InfPpiItemObj):\r
     PreNotify = None\r
-    PreUsage = None              \r
+    PreUsage = None\r
     PreHelpText = ''\r
     BlockFlag = -1\r
     CommentInsList = []\r
@@ -39,22 +39,22 @@ def ParsePpiComment(CommentsList, InfPpiItemObj):
         CommentItemNotify, \\r
         CommentItemString, \\r
         CommentItemHelpText = \\r
-                ParseComment(CommentItem, \r
-                             DT.ALL_USAGE_TOKENS, \r
-                             DT.PPI_NOTIFY_TOKENS, \r
-                             ['PPI'], \r
+                ParseComment(CommentItem,\r
+                             DT.ALL_USAGE_TOKENS,\r
+                             DT.PPI_NOTIFY_TOKENS,\r
+                             ['PPI'],\r
                              False)\r
-        \r
+\r
         #\r
-        # To avoid PyLint error   \r
+        # To avoid PyLint error\r
         #\r
         if CommentItemString:\r
             pass\r
-        \r
+\r
         if CommentItemHelpText is None:\r
             CommentItemHelpText = ''\r
             if Count == len(CommentsList) and CommentItemUsage == CommentItemNotify == DT.ITEM_UNDEFINED:\r
-                CommentItemHelpText = DT.END_OF_LINE                    \r
+                CommentItemHelpText = DT.END_OF_LINE\r
         #\r
         # For the Last comment Item, set BlockFlag.\r
         #\r
@@ -65,12 +65,12 @@ def ParsePpiComment(CommentsList, InfPpiItemObj):
                 else:\r
                     BlockFlag = 3\r
             elif BlockFlag == -1:\r
-                BlockFlag = 4  \r
-        \r
+                BlockFlag = 4\r
+\r
         #\r
         # Comment USAGE and NOTIFY information are "UNDEFINED"\r
         #\r
-        if BlockFlag == -1 or BlockFlag == 1 or BlockFlag == 2:                                             \r
+        if BlockFlag == -1 or BlockFlag == 1 or BlockFlag == 2:\r
             if CommentItemUsage == CommentItemNotify == DT.ITEM_UNDEFINED:\r
                 if BlockFlag == -1:\r
                     BlockFlag = 1\r
@@ -81,41 +81,41 @@ def ParsePpiComment(CommentsList, InfPpiItemObj):
                     BlockFlag = 3\r
                 #\r
                 # An item have Usage or Notify information and the first time get this information\r
-                # \r
+                #\r
                 elif BlockFlag == -1:\r
                     BlockFlag = 4\r
-                                                                          \r
+\r
         #\r
         # Combine two comment line if they are generic comment\r
-        #   \r
+        #\r
         if CommentItemUsage == CommentItemNotify == PreUsage == PreNotify == DT.ITEM_UNDEFINED:\r
             CommentItemHelpText = PreHelpText + DT.END_OF_LINE + CommentItemHelpText\r
             #\r
             # Store this information for next line may still need  combine operation.\r
             #\r
             PreHelpText = CommentItemHelpText\r
-            \r
-        if BlockFlag == 4:     \r
+\r
+        if BlockFlag == 4:\r
             CommentItemIns = InfPpiItemCommentContent()\r
             CommentItemIns.SetUsage(CommentItemUsage)\r
             CommentItemIns.SetNotify(CommentItemNotify)\r
             CommentItemIns.SetHelpStringItem(CommentItemHelpText)\r
             CommentInsList.append(CommentItemIns)\r
-            \r
+\r
             BlockFlag = -1\r
             PreUsage = None\r
             PreNotify = None\r
             PreHelpText = ''\r
-            \r
+\r
         elif BlockFlag == 3:\r
             #\r
             # Add previous help string\r
-            # \r
+            #\r
             CommentItemIns = InfPpiItemCommentContent()\r
             CommentItemIns.SetUsage(DT.ITEM_UNDEFINED)\r
             CommentItemIns.SetNotify(DT.ITEM_UNDEFINED)\r
             if PreHelpText == '' or PreHelpText.endswith(DT.END_OF_LINE):\r
-                PreHelpText += DT.END_OF_LINE            \r
+                PreHelpText += DT.END_OF_LINE\r
             CommentItemIns.SetHelpStringItem(PreHelpText)\r
             CommentInsList.append(CommentItemIns)\r
             #\r
@@ -126,7 +126,7 @@ def ParsePpiComment(CommentsList, InfPpiItemObj):
             CommentItemIns.SetNotify(CommentItemNotify)\r
             CommentItemIns.SetHelpStringItem(CommentItemHelpText)\r
             CommentInsList.append(CommentItemIns)\r
-            \r
+\r
             BlockFlag = -1\r
             PreUsage = None\r
             PreNotify = None\r
@@ -135,15 +135,15 @@ def ParsePpiComment(CommentsList, InfPpiItemObj):
             PreUsage = CommentItemUsage\r
             PreNotify = CommentItemNotify\r
             PreHelpText = CommentItemHelpText\r
-            \r
+\r
     InfPpiItemObj.SetCommentList(CommentInsList)\r
-    \r
+\r
     return InfPpiItemObj\r
 \r
 class InfPpiItemCommentContent():\r
     def __init__(self):\r
         #\r
-        # ## SOMETIMES_CONSUMES ## HelpString \r
+        # ## SOMETIMES_CONSUMES ## HelpString\r
         #\r
         self.UsageItem = ''\r
         #\r
@@ -152,30 +152,30 @@ class InfPpiItemCommentContent():
         self.HelpStringItem = ''\r
         self.Notify = ''\r
         self.CommentList = []\r
-                \r
+\r
     def SetUsage(self, UsageItem):\r
         self.UsageItem = UsageItem\r
     def GetUsage(self):\r
         return self.UsageItem\r
-    \r
+\r
     def SetNotify(self, Notify):\r
         if Notify != DT.ITEM_UNDEFINED:\r
             self.Notify = 'true'\r
     def GetNotify(self):\r
         return self.Notify\r
-          \r
+\r
     def SetHelpStringItem(self, HelpStringItem):\r
         self.HelpStringItem = HelpStringItem\r
     def GetHelpStringItem(self):\r
         return self.HelpStringItem\r
-    \r
+\r
 class InfPpiItem():\r
     def __init__(self):\r
         self.Name             = ''\r
-        self.FeatureFlagExp   = ''    \r
+        self.FeatureFlagExp   = ''\r
         self.SupArchList      = []\r
         self.CommentList      = []\r
-        \r
+\r
     def SetName(self, Name):\r
         self.Name = Name\r
     def GetName(self):\r
@@ -184,7 +184,7 @@ class InfPpiItem():
     def SetSupArchList(self, SupArchList):\r
         self.SupArchList = SupArchList\r
     def GetSupArchList(self):\r
-        return self.SupArchList        \r
+        return self.SupArchList\r
 \r
     def SetCommentList(self, CommentList):\r
         self.CommentList = CommentList\r
@@ -206,17 +206,17 @@ class InfPpiObject():
         # Macro defined in this section should be only used in this section.\r
         #\r
         self.Macros = {}\r
-    \r
+\r
     def SetPpi(self, PpiList, Arch = None):\r
         __SupArchList = []\r
         for ArchItem in Arch:\r
             #\r
             # Validate Arch\r
-            #            \r
+            #\r
             if (ArchItem == '' or ArchItem is None):\r
-                ArchItem = 'COMMON'   \r
+                ArchItem = 'COMMON'\r
             __SupArchList.append(ArchItem)\r
-            \r
+\r
         for Item in PpiList:\r
             #\r
             # Get Comment content of this protocol\r
@@ -226,26 +226,26 @@ class InfPpiObject():
                 CommentsList = Item[1]\r
             CurrentLineOfItem = Item[2]\r
             Item = Item[0]\r
-            InfPpiItemObj = InfPpiItem()                  \r
+            InfPpiItemObj = InfPpiItem()\r
             if len(Item) >= 1 and len(Item) <= 2:\r
                 #\r
                 # Only CName contained\r
                 #\r
                 if not IsValidCVariableName(Item[0]):\r
-                    Logger.Error("InfParser", \r
-                                 ToolError.FORMAT_INVALID, \r
+                    Logger.Error("InfParser",\r
+                                 ToolError.FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_INVALID_CNAME%(Item[0]),\r
-                                 File=CurrentLineOfItem[2], \r
-                                 Line=CurrentLineOfItem[1], \r
+                                 File=CurrentLineOfItem[2],\r
+                                 Line=CurrentLineOfItem[1],\r
                                  ExtraData=CurrentLineOfItem[0])\r
                 if (Item[0] != ''):\r
                     InfPpiItemObj.SetName(Item[0])\r
                 else:\r
-                    Logger.Error("InfParser", \r
-                                 ToolError.FORMAT_INVALID, \r
+                    Logger.Error("InfParser",\r
+                                 ToolError.FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_CNAME_MISSING,\r
-                                 File=CurrentLineOfItem[2], \r
-                                 Line=CurrentLineOfItem[1], \r
+                                 File=CurrentLineOfItem[2],\r
+                                 Line=CurrentLineOfItem[1],\r
                                  ExtraData=CurrentLineOfItem[0])\r
             #\r
             # Have FeatureFlag information\r
@@ -254,14 +254,14 @@ class InfPpiObject():
                 #\r
                 # Contained CName and Feature Flag Express\r
                 # <statements>           ::=  <CName> ["|" <FeatureFlagExpress>]\r
-                # Item[1] should not be empty  \r
+                # Item[1] should not be empty\r
                 #\r
                 if Item[1].strip() == '':\r
-                    Logger.Error("InfParser", \r
-                                 ToolError.FORMAT_INVALID, \r
+                    Logger.Error("InfParser",\r
+                                 ToolError.FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_FEATURE_FLAG_EXP_MISSING,\r
-                                 File=CurrentLineOfItem[2], \r
-                                 Line=CurrentLineOfItem[1], \r
+                                 File=CurrentLineOfItem[2],\r
+                                 Line=CurrentLineOfItem[1],\r
                                  ExtraData=CurrentLineOfItem[0])\r
                 #\r
                 # Validate Feature Flag Express for PPI entry\r
@@ -269,24 +269,24 @@ class InfPpiObject():
                 #\r
                 FeatureFlagRtv = IsValidFeatureFlagExp(Item[1].strip())\r
                 if not FeatureFlagRtv[0]:\r
-                    Logger.Error("InfParser", \r
+                    Logger.Error("InfParser",\r
                                  ToolError.FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_FEATURE_FLAG_EXP_SYNTAX_INVLID%(FeatureFlagRtv[1]),\r
-                                 File=CurrentLineOfItem[2], \r
-                                 Line=CurrentLineOfItem[1], \r
+                                 File=CurrentLineOfItem[2],\r
+                                 Line=CurrentLineOfItem[1],\r
                                  ExtraData=CurrentLineOfItem[0])\r
                 InfPpiItemObj.SetFeatureFlagExp(Item[1])\r
             if len(Item) != 1 and len(Item) != 2:\r
                 #\r
-                # Invalid format of Ppi statement \r
+                # Invalid format of Ppi statement\r
                 #\r
-                Logger.Error("InfParser", \r
+                Logger.Error("InfParser",\r
                              ToolError.FORMAT_INVALID,\r
                              ST.ERR_INF_PARSER_GUID_PPI_PROTOCOL_SECTION_CONTENT_ERROR,\r
-                             File=CurrentLineOfItem[2], \r
-                             Line=CurrentLineOfItem[1], \r
+                             File=CurrentLineOfItem[2],\r
+                             Line=CurrentLineOfItem[1],\r
                              ExtraData=CurrentLineOfItem[0])\r
-            \r
+\r
             #\r
             # Get/Set Usage and HelpString for PPI entry\r
             #\r
@@ -297,20 +297,20 @@ class InfPpiObject():
                 CommentItemIns.SetUsage(DT.ITEM_UNDEFINED)\r
                 CommentItemIns.SetNotify(DT.ITEM_UNDEFINED)\r
                 InfPpiItemObj.SetCommentList([CommentItemIns])\r
-            \r
+\r
             InfPpiItemObj.SetSupArchList(__SupArchList)\r
 \r
             #\r
             # Determine PPI name duplicate. Follow below rule:\r
             #\r
-            # A PPI must not be duplicated within a [Ppis] section. \r
-            # A PPI may appear in multiple architectural [Ppis] \r
-            # sections. A PPI listed in an architectural [Ppis] \r
-            # section must not be listed in the common architectural \r
+            # A PPI must not be duplicated within a [Ppis] section.\r
+            # A PPI may appear in multiple architectural [Ppis]\r
+            # sections. A PPI listed in an architectural [Ppis]\r
+            # section must not be listed in the common architectural\r
             # [Ppis] section.\r
-            # \r
+            #\r
             # NOTE: This check will not report error now.\r
-            # \r
+            #\r
             for Item in self.Ppis:\r
                 if Item.GetName() == InfPpiItemObj.GetName():\r
                     ItemSupArchList = Item.GetSupArchList()\r
@@ -324,9 +324,9 @@ class InfPpiObject():
                             if ItemArch.upper() == 'COMMON' or PpiItemObjArch.upper() == 'COMMON':\r
                                 #\r
                                 # ST.ERR_INF_PARSER_ITEM_DUPLICATE_COMMON\r
-                                # \r
+                                #\r
                                 pass\r
-            \r
+\r
             if (InfPpiItemObj) in self.Ppis:\r
                 PpiList = self.Ppis[InfPpiItemObj]\r
                 PpiList.append(InfPpiItemObj)\r
@@ -335,9 +335,9 @@ class InfPpiObject():
                 PpiList = []\r
                 PpiList.append(InfPpiItemObj)\r
                 self.Ppis[InfPpiItemObj] = PpiList\r
-                \r
-        return True        \r
-        \r
-    \r
+\r
+        return True\r
+\r
+\r
     def GetPpi(self):\r
         return self.Ppis\r
index 6cadeb5a211c4d889615652056b03fe36bb02c12..819d2ff3a790e525642ea89a233cb5897ff83bc3 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file [Protocols] section. \r
-# It will consumed by InfParser. \r
+# This file is used to define class objects of INF file [Protocols] section.\r
+# It will consumed by InfParser.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -18,8 +18,8 @@ InfProtocolObject
 \r
 from Library.ParserValidate import IsValidCVariableName\r
 from Library.CommentParsing import ParseComment\r
-from Library.ExpressionValidate import IsValidFeatureFlagExp \r
-                               \r
+from Library.ExpressionValidate import IsValidFeatureFlagExp\r
+\r
 from Library.Misc import Sdict\r
 \r
 from Object.Parser.InfMisc import ErrorInInf\r
@@ -40,20 +40,20 @@ def ParseProtocolComment(CommentsList, InfProtocolItemObj):
         CommentItemNotify, \\r
         CommentItemString, \\r
         CommentItemHelpText = \\r
-                ParseComment(CommentItem, \r
-                             DT.PROTOCOL_USAGE_TOKENS, \r
-                             DT.PROTOCOL_NOTIFY_TOKENS, \r
-                             ['PROTOCOL'], \r
+                ParseComment(CommentItem,\r
+                             DT.PROTOCOL_USAGE_TOKENS,\r
+                             DT.PROTOCOL_NOTIFY_TOKENS,\r
+                             ['PROTOCOL'],\r
                              False)\r
-        \r
+\r
         if CommentItemString:\r
             pass\r
-        \r
+\r
         if CommentItemHelpText is None:\r
             CommentItemHelpText = ''\r
             if Count == len(CommentsList) and CommentItemUsage == CommentItemNotify == DT.ITEM_UNDEFINED:\r
                 CommentItemHelpText = DT.END_OF_LINE\r
-                                        \r
+\r
         if Count == len(CommentsList):\r
             if BlockFlag == 1 or BlockFlag == 2:\r
                 if CommentItemUsage == CommentItemNotify == DT.ITEM_UNDEFINED:\r
@@ -61,9 +61,9 @@ def ParseProtocolComment(CommentsList, InfProtocolItemObj):
                 else:\r
                     BlockFlag = 3\r
             elif BlockFlag == -1:\r
-                BlockFlag = 4  \r
-        \r
-        if BlockFlag == -1 or BlockFlag == 1 or BlockFlag == 2:                                   \r
+                BlockFlag = 4\r
+\r
+        if BlockFlag == -1 or BlockFlag == 1 or BlockFlag == 2:\r
             if CommentItemUsage == CommentItemNotify == DT.ITEM_UNDEFINED:\r
                 if BlockFlag == -1:\r
                     BlockFlag = 1\r
@@ -74,36 +74,36 @@ def ParseProtocolComment(CommentsList, InfProtocolItemObj):
                     BlockFlag = 3\r
                 elif BlockFlag == -1:\r
                     BlockFlag = 4\r
-                                                                          \r
+\r
         #\r
         # Combine two comment line if they are generic comment\r
-        #   \r
+        #\r
         if CommentItemUsage == CommentItemNotify == PreUsage == PreNotify == DT.ITEM_UNDEFINED:\r
             CommentItemHelpText = PreHelpText + DT.END_OF_LINE + CommentItemHelpText\r
-            \r
+\r
             PreHelpText = CommentItemHelpText\r
-            \r
-        if BlockFlag == 4:     \r
+\r
+        if BlockFlag == 4:\r
             CommentItemIns = InfProtocolItemCommentContent()\r
             CommentItemIns.SetUsageItem(CommentItemUsage)\r
             CommentItemIns.SetNotify(CommentItemNotify)\r
             CommentItemIns.SetHelpStringItem(CommentItemHelpText)\r
             CommentInsList.append(CommentItemIns)\r
-            \r
+\r
             BlockFlag = -1\r
             PreUsage = None\r
             PreNotify = None\r
             PreHelpText = ''\r
-            \r
+\r
         elif BlockFlag == 3:\r
             #\r
             # Add previous help string\r
-            # \r
+            #\r
             CommentItemIns = InfProtocolItemCommentContent()\r
             CommentItemIns.SetUsageItem(DT.ITEM_UNDEFINED)\r
             CommentItemIns.SetNotify(DT.ITEM_UNDEFINED)\r
             if PreHelpText == '' or PreHelpText.endswith(DT.END_OF_LINE):\r
-                PreHelpText += DT.END_OF_LINE            \r
+                PreHelpText += DT.END_OF_LINE\r
             CommentItemIns.SetHelpStringItem(PreHelpText)\r
             CommentInsList.append(CommentItemIns)\r
             #\r
@@ -114,25 +114,25 @@ def ParseProtocolComment(CommentsList, InfProtocolItemObj):
             CommentItemIns.SetNotify(CommentItemNotify)\r
             CommentItemIns.SetHelpStringItem(CommentItemHelpText)\r
             CommentInsList.append(CommentItemIns)\r
-            \r
+\r
             BlockFlag = -1\r
             PreUsage = None\r
             PreNotify = None\r
-            PreHelpText = ''    \r
-                                                                            \r
+            PreHelpText = ''\r
+\r
         else:\r
             PreUsage = CommentItemUsage\r
             PreNotify = CommentItemNotify\r
             PreHelpText = CommentItemHelpText\r
-            \r
+\r
     InfProtocolItemObj.SetCommentList(CommentInsList)\r
-    \r
+\r
     return InfProtocolItemObj\r
 \r
 class InfProtocolItemCommentContent():\r
     def __init__(self):\r
         #\r
-        # ## SOMETIMES_CONSUMES ## HelpString \r
+        # ## SOMETIMES_CONSUMES ## HelpString\r
         #\r
         self.UsageItem = ''\r
         #\r
@@ -141,44 +141,44 @@ class InfProtocolItemCommentContent():
         self.HelpStringItem = ''\r
         self.Notify = ''\r
         self.CommentList = []\r
-                \r
+\r
     def SetUsageItem(self, UsageItem):\r
         self.UsageItem = UsageItem\r
     def GetUsageItem(self):\r
         return self.UsageItem\r
-    \r
+\r
     def SetNotify(self, Notify):\r
         if Notify != DT.ITEM_UNDEFINED:\r
             self.Notify = 'true'\r
     def GetNotify(self):\r
         return self.Notify\r
-          \r
+\r
     def SetHelpStringItem(self, HelpStringItem):\r
         self.HelpStringItem = HelpStringItem\r
     def GetHelpStringItem(self):\r
         return self.HelpStringItem\r
-    \r
+\r
 class InfProtocolItem():\r
     def __init__(self):\r
         self.Name = ''\r
         self.FeatureFlagExp = ''\r
         self.SupArchList = []\r
         self.CommentList = []\r
-        \r
+\r
     def SetName(self, Name):\r
         self.Name = Name\r
     def GetName(self):\r
         return self.Name\r
-    \r
+\r
     def SetFeatureFlagExp(self, FeatureFlagExp):\r
         self.FeatureFlagExp = FeatureFlagExp\r
     def GetFeatureFlagExp(self):\r
         return self.FeatureFlagExp\r
-  \r
+\r
     def SetSupArchList(self, SupArchList):\r
         self.SupArchList = SupArchList\r
     def GetSupArchList(self):\r
-        return self.SupArchList      \r
+        return self.SupArchList\r
 \r
     def SetCommentList(self, CommentList):\r
         self.CommentList = CommentList\r
@@ -196,13 +196,13 @@ class InfProtocolObject():
         # Macro defined in this section should be only used in this section.\r
         #\r
         self.Macros = {}\r
-        \r
+\r
     def SetProtocol(self, ProtocolContent, Arch = None,):\r
         __SupArchList = []\r
         for ArchItem in Arch:\r
             #\r
             # Validate Arch\r
-            #            \r
+            #\r
             if (ArchItem == '' or ArchItem is None):\r
                 ArchItem = 'COMMON'\r
             __SupArchList.append(ArchItem)\r
@@ -233,7 +233,7 @@ class InfProtocolObject():
             if len(Item) == 2:\r
                 #\r
                 # Contained CName and Feature Flag Express\r
-                # <statements>           ::=  <CName> ["|" \r
+                # <statements>           ::=  <CName> ["|"\r
                 # <FeatureFlagExpress>]\r
                 # For Protocol Object\r
                 #\r
@@ -248,14 +248,14 @@ class InfProtocolObject():
                     ErrorInInf(ST.ERR_INF_PARSER_FEATURE_FLAG_EXP_SYNTAX_INVLID%(FeatureFlagRtv[1]),\r
                                LineInfo=LineInfo)\r
                 InfProtocolItemObj.SetFeatureFlagExp(Item[1])\r
-            \r
+\r
             if len(Item) < 1 or len(Item) > 2:\r
                 #\r
-                # Invalid format of Protocols statement \r
+                # Invalid format of Protocols statement\r
                 #\r
                 ErrorInInf(ST.ERR_INF_PARSER_GUID_PPI_PROTOCOL_SECTION_CONTENT_ERROR,\r
                            LineInfo=LineInfo)\r
-            \r
+\r
             #\r
             # Get/Set Usage and HelpString for Protocol entry\r
             #\r
@@ -266,20 +266,20 @@ class InfProtocolObject():
                 CommentItemIns.SetUsageItem(DT.ITEM_UNDEFINED)\r
                 CommentItemIns.SetNotify(DT.ITEM_UNDEFINED)\r
                 InfProtocolItemObj.SetCommentList([CommentItemIns])\r
-            \r
+\r
             InfProtocolItemObj.SetSupArchList(__SupArchList)\r
-            \r
+\r
             #\r
             # Determine protocol name duplicate. Follow below rule:\r
             #\r
-            # A protocol must not be duplicated within a [Protocols] section. \r
-            # A protocol may appear in multiple architectural [Protocols] \r
-            # sections. A protocol listed in an architectural [Protocols] \r
-            # section must not be listed in the common architectural \r
+            # A protocol must not be duplicated within a [Protocols] section.\r
+            # A protocol may appear in multiple architectural [Protocols]\r
+            # sections. A protocol listed in an architectural [Protocols]\r
+            # section must not be listed in the common architectural\r
             # [Protocols] section.\r
-            # \r
+            #\r
             # NOTE: This check will not report error now.\r
-            # \r
+            #\r
             for Item in self.Protocols:\r
                 if Item.GetName() == InfProtocolItemObj.GetName():\r
                     ItemSupArchList = Item.GetSupArchList()\r
@@ -294,8 +294,8 @@ class InfProtocolObject():
                                 #\r
                                 # ST.ERR_INF_PARSER_ITEM_DUPLICATE_COMMON\r
                                 #\r
-                                pass      \r
-                                      \r
+                                pass\r
+\r
             if (InfProtocolItemObj) in self.Protocols:\r
                 ProcotolList = self.Protocols[InfProtocolItemObj]\r
                 ProcotolList.append(InfProtocolItemObj)\r
@@ -304,8 +304,8 @@ class InfProtocolObject():
                 ProcotolList = []\r
                 ProcotolList.append(InfProtocolItemObj)\r
                 self.Protocols[InfProtocolItemObj] = ProcotolList\r
-                \r
+\r
         return True\r
-    \r
+\r
     def GetProtocol(self):\r
         return self.Protocols\r
index 285e89aacbfc2558f0979330a84e62386d3ebde2..3eefde70a574f93c5f1fbee6eea5d47404546f39 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file [Sources] section. \r
-# It will consumed by InfParser. \r
+# This file is used to define class objects of INF file [Sources] section.\r
+# It will consumed by InfParser.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -21,22 +21,22 @@ import os
 from Logger import StringTable as ST\r
 from Logger import ToolError\r
 import Logger.Log as Logger\r
-from Library import GlobalData \r
+from Library import GlobalData\r
 \r
 from Library.Misc import Sdict\r
-from Library.ExpressionValidate import IsValidFeatureFlagExp \r
+from Library.ExpressionValidate import IsValidFeatureFlagExp\r
 from Object.Parser.InfCommonObject import InfSectionCommonDef\r
-from Library.Misc import ValidFile  \r
+from Library.Misc import ValidFile\r
 from Library.ParserValidate import IsValidFamily\r
 from Library.ParserValidate import IsValidPath\r
 \r
-## __GenSourceInstance    \r
+## __GenSourceInstance\r
+#\r
 #\r
-#  \r
 def GenSourceInstance(Item, CurrentLineOfItem, ItemObj):\r
-    \r
+\r
     IsValidFileFlag = False\r
-    \r
+\r
     if len(Item) < 6 and len(Item) >= 1:\r
         #\r
         # File | Family | TagName | ToolCode | FeatureFlagExpr\r
@@ -46,43 +46,43 @@ def GenSourceInstance(Item, CurrentLineOfItem, ItemObj):
             # Validate Feature Flag Express\r
             #\r
             if Item[4].strip() == '':\r
-                Logger.Error("InfParser", \r
+                Logger.Error("InfParser",\r
                              ToolError.FORMAT_INVALID,\r
                              ST.ERR_INF_PARSER_FEATURE_FLAG_EXP_MISSING,\r
-                             File=CurrentLineOfItem[2], \r
-                             Line=CurrentLineOfItem[1], \r
+                             File=CurrentLineOfItem[2],\r
+                             Line=CurrentLineOfItem[1],\r
                              ExtraData=CurrentLineOfItem[0])\r
             #\r
-            # Validate FFE    \r
+            # Validate FFE\r
             #\r
             FeatureFlagRtv = IsValidFeatureFlagExp(Item[4].strip())\r
             if not FeatureFlagRtv[0]:\r
-                Logger.Error("InfParser", \r
+                Logger.Error("InfParser",\r
                              ToolError.FORMAT_INVALID,\r
                              ST.ERR_INF_PARSER_FEATURE_FLAG_EXP_SYNTAX_INVLID%(FeatureFlagRtv[1]),\r
-                             File=CurrentLineOfItem[2], \r
-                             Line=CurrentLineOfItem[1], \r
+                             File=CurrentLineOfItem[2],\r
+                             Line=CurrentLineOfItem[1],\r
                              ExtraData=CurrentLineOfItem[0])\r
             ItemObj.SetFeatureFlagExp(Item[4])\r
         if len(Item) >= 4:\r
             if Item[3].strip() == '':\r
                 ItemObj.SetToolCode(Item[3])\r
             else:\r
-                Logger.Error("InfParser", \r
+                Logger.Error("InfParser",\r
                              ToolError.FORMAT_INVALID,\r
                              ST.ERR_INF_PARSER_TOOLCODE_NOT_PERMITTED%(Item[2]),\r
-                             File=CurrentLineOfItem[2], \r
-                             Line=CurrentLineOfItem[1], \r
-                             ExtraData=CurrentLineOfItem[0])                        \r
+                             File=CurrentLineOfItem[2],\r
+                             Line=CurrentLineOfItem[1],\r
+                             ExtraData=CurrentLineOfItem[0])\r
         if len(Item) >= 3:\r
             if Item[2].strip() == '':\r
                 ItemObj.SetTagName(Item[2])\r
             else:\r
-                Logger.Error("InfParser", \r
+                Logger.Error("InfParser",\r
                              ToolError.FORMAT_INVALID,\r
                              ST.ERR_INF_PARSER_TAGNAME_NOT_PERMITTED%(Item[2]),\r
-                             File=CurrentLineOfItem[2], \r
-                             Line=CurrentLineOfItem[1], \r
+                             File=CurrentLineOfItem[2],\r
+                             Line=CurrentLineOfItem[1],\r
                              ExtraData=CurrentLineOfItem[0])\r
         if len(Item) >= 2:\r
             if IsValidFamily(Item[1].strip()):\r
@@ -93,11 +93,11 @@ def GenSourceInstance(Item, CurrentLineOfItem, ItemObj):
                     Item[1] = ""\r
                 ItemObj.SetFamily(Item[1])\r
             else:\r
-                Logger.Error("InfParser", \r
+                Logger.Error("InfParser",\r
                              ToolError.FORMAT_INVALID,\r
                              ST.ERR_INF_PARSER_SOURCE_SECTION_FAMILY_INVALID%(Item[1]),\r
-                             File=CurrentLineOfItem[2], \r
-                             Line=CurrentLineOfItem[1], \r
+                             File=CurrentLineOfItem[2],\r
+                             Line=CurrentLineOfItem[1],\r
                              ExtraData=CurrentLineOfItem[0])\r
         if len(Item) >= 1:\r
             #\r
@@ -105,41 +105,41 @@ def GenSourceInstance(Item, CurrentLineOfItem, ItemObj):
             #\r
             FullFileName = os.path.normpath(os.path.realpath(os.path.join(GlobalData.gINF_MODULE_DIR, Item[0])))\r
             if not (ValidFile(FullFileName) or ValidFile(Item[0])):\r
-                Logger.Error("InfParser", \r
+                Logger.Error("InfParser",\r
                              ToolError.FORMAT_INVALID,\r
                              ST.ERR_FILELIST_EXIST%(Item[0]),\r
-                             File=CurrentLineOfItem[2], \r
-                             Line=CurrentLineOfItem[1], \r
+                             File=CurrentLineOfItem[2],\r
+                             Line=CurrentLineOfItem[1],\r
                              ExtraData=CurrentLineOfItem[0])\r
-            \r
+\r
             #\r
             # Validate file exist/format.\r
             #\r
-    \r
+\r
             if IsValidPath(Item[0], GlobalData.gINF_MODULE_DIR):\r
                 IsValidFileFlag = True\r
             else:\r
-                Logger.Error("InfParser", \r
+                Logger.Error("InfParser",\r
                              ToolError.FORMAT_INVALID,\r
                              ST.ERR_INF_PARSER_FILE_NOT_EXIST_OR_NAME_INVALID%(Item[0]),\r
-                             File=CurrentLineOfItem[2], \r
-                             Line=CurrentLineOfItem[1], \r
+                             File=CurrentLineOfItem[2],\r
+                             Line=CurrentLineOfItem[1],\r
                              ExtraData=CurrentLineOfItem[0])\r
                 return False\r
             if IsValidFileFlag:\r
-                ItemObj.SetSourceFileName(Item[0])      \r
+                ItemObj.SetSourceFileName(Item[0])\r
     else:\r
-        Logger.Error("InfParser", \r
-                     ToolError.FORMAT_INVALID, \r
+        Logger.Error("InfParser",\r
+                     ToolError.FORMAT_INVALID,\r
                      ST.ERR_INF_PARSER_SOURCES_SECTION_CONTENT_ERROR,\r
-                     File=CurrentLineOfItem[2], \r
+                     File=CurrentLineOfItem[2],\r
                      Line=CurrentLineOfItem[1],\r
                      ExtraData=CurrentLineOfItem[0])\r
-        \r
-    return ItemObj  \r
+\r
+    return ItemObj\r
 \r
 ## InfSourcesItemObject()\r
-# \r
+#\r
 #\r
 class InfSourcesItemObject():\r
     def __init__(self, \\r
@@ -156,32 +156,32 @@ class InfSourcesItemObject():
         self.HeaderString   = ''\r
         self.TailString     = ''\r
         self.SupArchList    = []\r
-        \r
+\r
     def SetSourceFileName(self, SourceFilename):\r
         self.SourceFileName = SourceFilename\r
     def GetSourceFileName(self):\r
         return self.SourceFileName\r
-    \r
+\r
     def SetFamily(self, Family):\r
         self.Family = Family\r
     def GetFamily(self):\r
         return self.Family\r
-    \r
+\r
     def SetTagName(self, TagName):\r
         self.TagName = TagName\r
     def GetTagName(self):\r
         return self.TagName\r
-    \r
+\r
     def SetToolCode(self, ToolCode):\r
         self.ToolCode = ToolCode\r
     def GetToolCode(self):\r
         return self.ToolCode\r
-    \r
+\r
     def SetFeatureFlagExp(self, FeatureFlagExp):\r
         self.FeatureFlagExp = FeatureFlagExp\r
     def GetFeatureFlagExp(self):\r
         return self.FeatureFlagExp\r
-    \r
+\r
     def SetHeaderString(self, HeaderString):\r
         self.HeaderString = HeaderString\r
     def GetHeaderString(self):\r
@@ -191,11 +191,11 @@ class InfSourcesItemObject():
         self.TailString = TailString\r
     def GetTailString(self):\r
         return self.TailString\r
-    \r
+\r
     def SetSupArchList(self, SupArchList):\r
         self.SupArchList = SupArchList\r
     def GetSupArchList(self):\r
-        return self.SupArchList  \r
+        return self.SupArchList\r
 ##\r
 #\r
 #\r
@@ -204,26 +204,26 @@ class InfSourcesObject(InfSectionCommonDef):
     def __init__(self):\r
         self.Sources = Sdict()\r
         InfSectionCommonDef.__init__(self)\r
-        \r
+\r
     def SetSources(self, SourceList, Arch = None):\r
         __SupArchList = []\r
         for ArchItem in Arch:\r
             #\r
             # Validate Arch\r
-            #            \r
+            #\r
             if (ArchItem == '' or ArchItem is None):\r
-                ArchItem = 'COMMON'  \r
-            __SupArchList.append(ArchItem)   \r
+                ArchItem = 'COMMON'\r
+            __SupArchList.append(ArchItem)\r
 \r
         for Item in SourceList:\r
             ItemObj = InfSourcesItemObject()\r
             CurrentLineOfItem = Item[2]\r
-            Item = Item[0] \r
-            \r
+            Item = Item[0]\r
+\r
             ItemObj = GenSourceInstance(Item, CurrentLineOfItem, ItemObj)\r
-                \r
-            ItemObj.SetSupArchList(__SupArchList) \r
-                                                                                                      \r
+\r
+            ItemObj.SetSupArchList(__SupArchList)\r
+\r
             if (ItemObj) in self.Sources:\r
                 SourceContent = self.Sources[ItemObj]\r
                 SourceContent.append(ItemObj)\r
@@ -232,8 +232,8 @@ class InfSourcesObject(InfSectionCommonDef):
                 SourceContent = []\r
                 SourceContent.append(ItemObj)\r
                 self.Sources[ItemObj] = SourceContent\r
-        \r
+\r
         return True\r
-     \r
+\r
     def GetSources(self):\r
         return self.Sources\r
index f9db2944a4950fd96c6c7adb504ecd9b7d117857..d83fd5321a670e4c06191e17617daa13efded854 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
-# This file is used to define class objects of INF file [UserExtension] section. \r
-# It will consumed by InfParser. \r
+# This file is used to define class objects of INF file [UserExtension] section.\r
+# It will consumed by InfParser.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -19,7 +19,7 @@ InfUserExtensionsObject
 from Logger import StringTable as ST\r
 from Logger import ToolError\r
 import Logger.Log as Logger\r
-from Library import GlobalData \r
+from Library import GlobalData\r
 \r
 from Library.Misc import Sdict\r
 \r
@@ -32,27 +32,27 @@ class InfUserExtensionItem():
         self.UserId   = UserId\r
         self.IdString = IdString\r
         self.SupArchList = []\r
-    \r
+\r
     def SetContent(self, Content):\r
         self.Content = Content\r
     def GetContent(self):\r
         return self.Content\r
-    \r
+\r
     def SetUserId(self, UserId):\r
         self.UserId = UserId\r
     def GetUserId(self):\r
         return self.UserId\r
-    \r
+\r
     def SetIdString(self, IdString):\r
         self.IdString = IdString\r
     def GetIdString(self):\r
         return self.IdString\r
-    \r
+\r
     def SetSupArchList(self, SupArchList):\r
         self.SupArchList = SupArchList\r
     def GetSupArchList(self):\r
         return self.SupArchList\r
-    \r
+\r
 ##\r
 #\r
 #\r
@@ -60,74 +60,74 @@ class InfUserExtensionItem():
 class InfUserExtensionObject():\r
     def __init__(self):\r
         self.UserExtension = Sdict()\r
-    \r
+\r
     def SetUserExtension(self, UserExtensionCont, IdContent=None, LineNo=None):\r
         if not UserExtensionCont or UserExtensionCont == '':\r
             return True\r
         #\r
-        # IdContent is a list contain UserId and IdString \r
+        # IdContent is a list contain UserId and IdString\r
         # For this call the general section header  parser, if no definition of\r
         # IdString/UserId, it will return 'COMMON'\r
         #\r
-        for IdContentItem in IdContent:                              \r
+        for IdContentItem in IdContent:\r
             InfUserExtensionItemObj = InfUserExtensionItem()\r
             if IdContentItem[0] == 'COMMON':\r
                 UserId = ''\r
             else:\r
                 UserId = IdContentItem[0]\r
-                \r
+\r
             if IdContentItem[1] == 'COMMON':\r
                 IdString = ''\r
             else:\r
-                IdString = IdContentItem[1]   \r
-            \r
+                IdString = IdContentItem[1]\r
+\r
             #\r
             # Fill UserExtensionObj members.\r
-            #     \r
+            #\r
             InfUserExtensionItemObj.SetUserId(UserId)\r
             InfUserExtensionItemObj.SetIdString(IdString)\r
             InfUserExtensionItemObj.SetContent(UserExtensionCont)\r
-            InfUserExtensionItemObj.SetSupArchList(IdContentItem[2]) \r
-            \r
+            InfUserExtensionItemObj.SetSupArchList(IdContentItem[2])\r
+\r
 #            for CheckItem in self.UserExtension:\r
 #                if IdContentItem[0] == CheckItem[0] and IdContentItem[1] == CheckItem[1]:\r
 #                    if IdContentItem[2].upper() == 'COMMON' or CheckItem[2].upper() == 'COMMON':\r
 #                        #\r
 #                        # For COMMON ARCH type, do special check.\r
 #                        #\r
-#                        Logger.Error('InfParser', \r
+#                        Logger.Error('InfParser',\r
 #                            ToolError.FORMAT_INVALID,\r
 #                            ST.ERR_INF_PARSER_UE_SECTION_DUPLICATE_ERROR%\\r
 #                            (IdContentItem[0] + '.' + IdContentItem[1] + '.' + IdContentItem[2]),\r
-#                            File=GlobalData.gINF_MODULE_NAME, \r
+#                            File=GlobalData.gINF_MODULE_NAME,\r
 #                            Line=LineNo,\r
 #                            ExtraData=None)\r
-            \r
+\r
             if IdContentItem in self.UserExtension:\r
                 #\r
-                # Each UserExtensions section header must have a unique set \r
+                # Each UserExtensions section header must have a unique set\r
                 # of UserId, IdString and Arch values.\r
-                # This means that the same UserId can be used in more than one \r
-                # section header, provided the IdString or Arch values are \r
-                # different. The same IdString values can be used in more than \r
-                # one section header if the UserId or Arch values are \r
-                # different. The same UserId and the same IdString can be used \r
-                # in a section header if the Arch values are different in each \r
+                # This means that the same UserId can be used in more than one\r
+                # section header, provided the IdString or Arch values are\r
+                # different. The same IdString values can be used in more than\r
+                # one section header if the UserId or Arch values are\r
+                # different. The same UserId and the same IdString can be used\r
+                # in a section header if the Arch values are different in each\r
                 # of the section headers.\r
                 #\r
-                Logger.Error('InfParser', \r
+                Logger.Error('InfParser',\r
                              ToolError.FORMAT_INVALID,\r
                              ST.ERR_INF_PARSER_UE_SECTION_DUPLICATE_ERROR%\\r
                              (IdContentItem[0] + '.' + IdContentItem[1] + '.' + IdContentItem[2]),\r
-                             File=GlobalData.gINF_MODULE_NAME, \r
+                             File=GlobalData.gINF_MODULE_NAME,\r
                              Line=LineNo,\r
                              ExtraData=None)\r
             else:\r
                 UserExtensionList = []\r
                 UserExtensionList.append(InfUserExtensionItemObj)\r
                 self.UserExtension[IdContentItem] = UserExtensionList\r
-        \r
+\r
         return True\r
-        \r
+\r
     def GetUserExtension(self):\r
         return self.UserExtension\r
index b457c3c97bade6c42ec12a8f82d15af9119b4d26..f348a9b7fd28b19387bf659f5f30f582abb1caac 100644 (file)
@@ -4,11 +4,11 @@
 # This file is required to make Python interpreter treat the directory\r
 # as containing package.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,4 +17,4 @@
 \r
 '''\r
 PARSER\r
-'''
\ No newline at end of file
+'''\r
index 7925ab65bac8cc4048e63e40a681c472b71fd07e..c13c5bfde69cd6fcda7b50dd95bb68a674d2fdfb 100644 (file)
@@ -4,11 +4,11 @@
 # This file is required to make Python interpreter treat the directory\r
 # as containing package.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,4 +17,4 @@
 \r
 '''\r
 Object\r
-'''
\ No newline at end of file
+'''\r
index 7ac0dfa1ed944ef50b9a69b55d61bd2e9fbc3d2c..a88b51d05529253f15c5254504afd3d484850596 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -75,31 +75,31 @@ class _DecBase:
         # Data parsed by 'self' are saved to this object\r
         #\r
         self.ItemObject = None\r
-    \r
+\r
     def GetDataObject(self):\r
         return self.ItemObject\r
-    \r
+\r
     def GetLocalMacro(self):\r
         return self._LocalMacro\r
-    \r
+\r
     ## BlockStart\r
     #\r
     # Called if a new section starts\r
     #\r
     def BlockStart(self):\r
         self._LocalMacro = {}\r
-    \r
+\r
     ## _CheckReDefine\r
     #\r
     # @param Key: to be checked if multi-defined\r
-    # @param Scope: Format: [[SectionName, Arch], ...]. \r
+    # @param Scope: Format: [[SectionName, Arch], ...].\r
     #               If scope is none, use global scope\r
     #\r
     def _CheckReDefine(self, Key, Scope = None):\r
         if not Scope:\r
             Scope = self._RawData.CurrentScope\r
             return\r
-        \r
+\r
         SecArch = []\r
         #\r
         # Copy scope to SecArch, avoid Scope be changed outside\r
@@ -108,7 +108,7 @@ class _DecBase:
         if Key not in self._ItemDict:\r
             self._ItemDict[Key] = [[SecArch, self._RawData.LineIndex]]\r
             return\r
-        \r
+\r
         for Value in self._ItemDict[Key]:\r
             for SubValue in Scope:\r
                 #\r
@@ -132,18 +132,18 @@ class _DecBase:
                     self._LoggerError(ST.ERR_DECPARSE_REDEFINE % (Key, Value[1]))\r
                     return\r
         self._ItemDict[Key].append([SecArch, self._RawData.LineIndex])\r
-    \r
+\r
     ## CheckRequiredFields\r
     # Some sections need to check if some fields exist, define section for example\r
     # Derived class can re-implement, top parser will call this function after all parsing done\r
-    #  \r
+    #\r
     def CheckRequiredFields(self):\r
         if self._RawData:\r
             pass\r
         return True\r
-    \r
+\r
     ## IsItemRequired\r
-    # In DEC spec, sections must have at least one statement except user \r
+    # In DEC spec, sections must have at least one statement except user\r
     # extension.\r
     # For example: "[guids" [<attribs>] "]" <EOL> <statements>+\r
     # sub class can override this method to indicate if statement is a must.\r
@@ -152,12 +152,12 @@ class _DecBase:
         if self._RawData:\r
             pass\r
         return False\r
-    \r
+\r
     def _LoggerError(self, ErrorString):\r
-        Logger.Error(TOOL_NAME, FILE_PARSE_FAILURE, File=self._RawData.Filename, \r
+        Logger.Error(TOOL_NAME, FILE_PARSE_FAILURE, File=self._RawData.Filename,\r
                      Line = self._RawData.LineIndex,\r
                      ExtraData=ErrorString + ST.ERR_DECPARSE_LINE % self._RawData.CurrentLine)\r
-    \r
+\r
     def _ReplaceMacro(self, String):\r
         if gMACRO_PATTERN.findall(String):\r
             String = ReplaceMacro(String, self._LocalMacro, False,\r
@@ -169,11 +169,11 @@ class _DecBase:
             MacroUsed = gMACRO_PATTERN.findall(String)\r
             if MacroUsed:\r
                 Logger.Error(TOOL_NAME, FILE_PARSE_FAILURE,\r
-                             File=self._RawData.Filename, \r
+                             File=self._RawData.Filename,\r
                              Line = self._RawData.LineIndex,\r
                              ExtraData = ST.ERR_DECPARSE_MACRO_RESOLVE % (str(MacroUsed), String))\r
         return String\r
-    \r
+\r
     def _MacroParser(self, String):\r
         TokenList = GetSplitValueList(String, ' ', 1)\r
         if len(TokenList) < 2 or TokenList[1] == '':\r
@@ -184,7 +184,7 @@ class _DecBase:
             self._LoggerError(ST.ERR_DECPARSE_MACRO_NAME)\r
         elif not IsValidToken(MACRO_PATTERN, TokenList[0]):\r
             self._LoggerError(ST.ERR_DECPARSE_MACRO_NAME_UPPER % TokenList[0])\r
-        \r
+\r
         if len(TokenList) == 1:\r
             self._LocalMacro[TokenList[0]] = ''\r
         else:\r
@@ -202,7 +202,7 @@ class _DecBase:
         #\r
         return None\r
 \r
-    \r
+\r
     ## _TailCommentStrategy\r
     #\r
     # This function can be derived to parse tail comment\r
@@ -216,7 +216,7 @@ class _DecBase:
         if self._RawData:\r
             pass\r
         return False\r
-    \r
+\r
     ## _StopCurrentParsing\r
     #\r
     # Called in Parse if current parsing should be stopped when encounter some\r
@@ -229,7 +229,7 @@ class _DecBase:
         if self._RawData:\r
             pass\r
         return Line[0] == DT.TAB_SECTION_START and Line[-1] == DT.TAB_SECTION_END\r
-    \r
+\r
     ## _TryBackSlash\r
     #\r
     # Split comment and DEC content, concatenate lines if end of char is '\'\r
@@ -246,7 +246,7 @@ class _DecBase:
             if Line == '':\r
                 self._LoggerError(ST.ERR_DECPARSE_BACKSLASH_EMPTY)\r
                 break\r
-            \r
+\r
             if Comment:\r
                 CommentList.append((Comment, self._RawData.LineIndex))\r
             if Line[-1] != DT.TAB_SLASH:\r
@@ -269,7 +269,7 @@ class _DecBase:
                 if not Line or Line[-1] == DT.TAB_SLASH:\r
                     self._LoggerError(ST.ERR_DECPARSE_BACKSLASH_EMPTY)\r
                 CatLine += Line\r
-         \r
+\r
         #\r
         # All MACRO values defined by the DEFINE statements in any section\r
         # (except [Userextensions] sections for Intel) of the INF or DEC file\r
@@ -286,17 +286,17 @@ class _DecBase:
             self._RawData.CurrentLine = CatLine\r
 \r
         return CatLine, CommentList\r
-    \r
+\r
     ## Parse\r
-    # This is a template method in which other member functions which might \r
-    # override by sub class are called. It is responsible for reading file \r
+    # This is a template method in which other member functions which might\r
+    # override by sub class are called. It is responsible for reading file\r
     # line by line, and call other member functions to parse. This function\r
     # should not be re-implement by sub class.\r
     #\r
     def Parse(self):\r
         HeadComments = []\r
         TailComments = []\r
-        \r
+\r
         #======================================================================\r
         # CurComments may pointer to HeadComments or TailComments\r
         #======================================================================\r
@@ -304,7 +304,7 @@ class _DecBase:
         CurObj = None\r
         ItemNum = 0\r
         FromBuf = False\r
-        \r
+\r
         #======================================================================\r
         # Used to report error information if empty section found\r
         #======================================================================\r
@@ -333,20 +333,20 @@ class _DecBase:
                     # Set tail comments to previous statement if not empty.\r
                     #==========================================================\r
                     CurObj.SetTailComment(CurObj.GetTailComment()+TailComments)\r
-                \r
+\r
                 if not FromBuf:\r
                     del TailComments[:]\r
                 CurComments = TailComments\r
                 Comments = []\r
                 if Comment:\r
                     Comments = [(Comment, self._RawData.LineIndex)]\r
-                \r
+\r
                 #==============================================================\r
                 # Try if last char of line has backslash\r
                 #==============================================================\r
                 Line, Comments = self._TryBackSlash(Line, Comments)\r
                 CurComments.extend(Comments)\r
-                \r
+\r
                 #==============================================================\r
                 # Macro found\r
                 #==============================================================\r
@@ -356,7 +356,7 @@ class _DecBase:
                     del TailComments[:]\r
                     CurComments = HeadComments\r
                     continue\r
-                \r
+\r
                 if self._StopCurrentParsing(Line):\r
                     #==========================================================\r
                     # This line does not belong to this parse,\r
@@ -364,7 +364,7 @@ class _DecBase:
                     #==========================================================\r
                     self._RawData.SetNext(Line, HeadComments, TailComments)\r
                     break\r
-                \r
+\r
                 Obj = self._ParseItem()\r
                 ItemNum += 1\r
                 if Obj:\r
@@ -387,7 +387,7 @@ class _DecBase:
                     CurComments.append(((Comment, self._RawData.LineIndex)))\r
                 else:\r
                     del CurComments[:]\r
-        \r
+\r
         if self._IsStatementRequired() and ItemNum == 0:\r
             Logger.Error(\r
                     TOOL_NAME, FILE_PARSE_FAILURE,\r
@@ -405,7 +405,7 @@ class _DecDefine(_DecBase):
         self.ItemObject = DecDefineObject(RawData.Filename)\r
         self._LocalMacro = self._RawData.Macros\r
         self._DefSecNum = 0\r
-        \r
+\r
         #\r
         # Each field has a function to validate\r
         #\r
@@ -416,12 +416,12 @@ class _DecDefine(_DecBase):
             DT.TAB_DEC_DEFINES_PACKAGE_VERSION     :   self._SetPackageVersion,\r
             DT.TAB_DEC_DEFINES_PKG_UNI_FILE        :   self._SetPackageUni,\r
         }\r
-    \r
+\r
     def BlockStart(self):\r
         self._DefSecNum += 1\r
         if self._DefSecNum > 1:\r
             self._LoggerError(ST.ERR_DECPARSE_DEFINE_MULTISEC)\r
-    \r
+\r
     ## CheckRequiredFields\r
     #\r
     # Check required fields: DEC_SPECIFICATION, PACKAGE_NAME\r
@@ -430,21 +430,21 @@ class _DecDefine(_DecBase):
     def CheckRequiredFields(self):\r
         Ret = False\r
         if self.ItemObject.GetPackageSpecification() == '':\r
-            Logger.Error(TOOL_NAME, FILE_PARSE_FAILURE, File=self._RawData.Filename, \r
+            Logger.Error(TOOL_NAME, FILE_PARSE_FAILURE, File=self._RawData.Filename,\r
                          ExtraData=ST.ERR_DECPARSE_DEFINE_REQUIRED % DT.TAB_DEC_DEFINES_DEC_SPECIFICATION)\r
         elif self.ItemObject.GetPackageName() == '':\r
-            Logger.Error(TOOL_NAME, FILE_PARSE_FAILURE, File=self._RawData.Filename, \r
+            Logger.Error(TOOL_NAME, FILE_PARSE_FAILURE, File=self._RawData.Filename,\r
                          ExtraData=ST.ERR_DECPARSE_DEFINE_REQUIRED % DT.TAB_DEC_DEFINES_PACKAGE_NAME)\r
         elif self.ItemObject.GetPackageGuid() == '':\r
-            Logger.Error(TOOL_NAME, FILE_PARSE_FAILURE, File=self._RawData.Filename, \r
+            Logger.Error(TOOL_NAME, FILE_PARSE_FAILURE, File=self._RawData.Filename,\r
                          ExtraData=ST.ERR_DECPARSE_DEFINE_REQUIRED % DT.TAB_DEC_DEFINES_PACKAGE_GUID)\r
         elif self.ItemObject.GetPackageVersion() == '':\r
-            Logger.Error(TOOL_NAME, FILE_PARSE_FAILURE, File=self._RawData.Filename, \r
+            Logger.Error(TOOL_NAME, FILE_PARSE_FAILURE, File=self._RawData.Filename,\r
                          ExtraData=ST.ERR_DECPARSE_DEFINE_REQUIRED % DT.TAB_DEC_DEFINES_PACKAGE_VERSION)\r
         else:\r
             Ret = True\r
         return Ret\r
-    \r
+\r
     def _ParseItem(self):\r
         Line = self._RawData.CurrentLine\r
         TokenList = GetSplitValueList(Line, DT.TAB_EQUAL_SPLIT, 1)\r
@@ -456,13 +456,13 @@ class _DecDefine(_DecBase):
             self._LoggerError(ST.ERR_DECPARSE_DEFINE_UNKNOWKEY % TokenList[0])\r
         else:\r
             self.DefineValidation[TokenList[0]](TokenList[1])\r
-        \r
+\r
         DefineItem = DecDefineItemObject()\r
         DefineItem.Key   = TokenList[0]\r
         DefineItem.Value = TokenList[1]\r
         self.ItemObject.AddItem(DefineItem, self._RawData.CurrentScope)\r
         return DefineItem\r
-    \r
+\r
     def _SetDecSpecification(self, Token):\r
         if self.ItemObject.GetPackageSpecification():\r
             self._LoggerError(ST.ERR_DECPARSE_DEFINE_DEFINED % DT.TAB_DEC_DEFINES_DEC_SPECIFICATION)\r
@@ -470,21 +470,21 @@ class _DecDefine(_DecBase):
             if not IsValidDecVersionVal(Token):\r
                 self._LoggerError(ST.ERR_DECPARSE_DEFINE_SPEC)\r
         self.ItemObject.SetPackageSpecification(Token)\r
-    \r
+\r
     def _SetPackageName(self, Token):\r
         if self.ItemObject.GetPackageName():\r
             self._LoggerError(ST.ERR_DECPARSE_DEFINE_DEFINED % DT.TAB_DEC_DEFINES_PACKAGE_NAME)\r
         if not IsValidWord(Token):\r
             self._LoggerError(ST.ERR_DECPARSE_DEFINE_PKGNAME)\r
         self.ItemObject.SetPackageName(Token)\r
-    \r
+\r
     def _SetPackageGuid(self, Token):\r
         if self.ItemObject.GetPackageGuid():\r
             self._LoggerError(ST.ERR_DECPARSE_DEFINE_DEFINED % DT.TAB_DEC_DEFINES_PACKAGE_GUID)\r
         if not CheckGuidRegFormat(Token):\r
             self._LoggerError(ST.ERR_DECPARSE_DEFINE_PKGGUID)\r
         self.ItemObject.SetPackageGuid(Token)\r
-    \r
+\r
     def _SetPackageVersion(self, Token):\r
         if self.ItemObject.GetPackageVersion():\r
             self._LoggerError(ST.ERR_DECPARSE_DEFINE_DEFINED % DT.TAB_DEC_DEFINES_PACKAGE_VERSION)\r
@@ -494,7 +494,7 @@ class _DecDefine(_DecBase):
             if not DT.TAB_SPLIT in Token:\r
                 Token = Token + '.0'\r
             self.ItemObject.SetPackageVersion(Token)\r
-            \r
+\r
     def _SetPackageUni(self, Token):\r
         if self.ItemObject.GetPackageUniFile():\r
             self._LoggerError(ST.ERR_DECPARSE_DEFINE_DEFINED % DT.TAB_DEC_DEFINES_PKG_UNI_FILE)\r
@@ -508,13 +508,13 @@ class _DecInclude(_DecBase):
     def __init__(self, RawData):\r
         _DecBase.__init__(self, RawData)\r
         self.ItemObject = DecIncludeObject(RawData.Filename)\r
-    \r
+\r
     def _ParseItem(self):\r
         Line = self._RawData.CurrentLine\r
-        \r
+\r
         if not IsValidPath(Line, self._RawData.PackagePath):\r
-            self._LoggerError(ST.ERR_DECPARSE_INCLUDE % Line) \r
-        \r
+            self._LoggerError(ST.ERR_DECPARSE_INCLUDE % Line)\r
+\r
         Item = DecIncludeItemObject(StripRoot(self._RawData.PackagePath, Line), self._RawData.PackagePath)\r
         self.ItemObject.AddItem(Item, self._RawData.CurrentScope)\r
         return Item\r
@@ -527,32 +527,32 @@ class _DecLibraryclass(_DecBase):
     def __init__(self, RawData):\r
         _DecBase.__init__(self, RawData)\r
         self.ItemObject = DecLibraryclassObject(RawData.Filename)\r
-    \r
+\r
     def _ParseItem(self):\r
         Line = self._RawData.CurrentLine\r
         TokenList = GetSplitValueList(Line, DT.TAB_VALUE_SPLIT)\r
         if len(TokenList) != 2:\r
-            self._LoggerError(ST.ERR_DECPARSE_LIBCLASS_SPLIT) \r
+            self._LoggerError(ST.ERR_DECPARSE_LIBCLASS_SPLIT)\r
         if TokenList[0] == '' or TokenList[1] == '':\r
             self._LoggerError(ST.ERR_DECPARSE_LIBCLASS_EMPTY)\r
         if not IsValidToken('[A-Z][0-9A-Za-z]*', TokenList[0]):\r
             self._LoggerError(ST.ERR_DECPARSE_LIBCLASS_LIB)\r
-        \r
+\r
         self._CheckReDefine(TokenList[0])\r
-        \r
+\r
         Value = TokenList[1]\r
         #\r
         # Must end with .h\r
         #\r
         if not Value.endswith('.h'):\r
             self._LoggerError(ST.ERR_DECPARSE_LIBCLASS_PATH_EXT)\r
-        \r
+\r
         #\r
         # Path must be existed\r
         #\r
         if not IsValidPath(Value, self._RawData.PackagePath):\r
             self._LoggerError(ST.ERR_DECPARSE_INCLUDE % Value)\r
-        \r
+\r
         Item = DecLibraryclassItemObject(TokenList[0], StripRoot(self._RawData.PackagePath, Value),\r
                                          self._RawData.PackagePath)\r
         self.ItemObject.AddItem(Item, self._RawData.CurrentScope)\r
@@ -571,38 +571,38 @@ class _DecPcd(_DecBase):
         # Key is token space and token number (integer), value is C name\r
         #\r
         self.TokenMap = {}\r
-    \r
+\r
     def _ParseItem(self):\r
         Line = self._RawData.CurrentLine\r
         TokenList = Line.split(DT.TAB_VALUE_SPLIT)\r
         if len(TokenList) < 4:\r
             self._LoggerError(ST.ERR_DECPARSE_PCD_SPLIT)\r
-        \r
+\r
         #\r
         # Token space guid C name\r
         #\r
         PcdName = GetSplitValueList(TokenList[0], DT.TAB_SPLIT)\r
         if len(PcdName) != 2 or PcdName[0] == '' or PcdName[1] == '':\r
             self._LoggerError(ST.ERR_DECPARSE_PCD_NAME)\r
-        \r
+\r
         Guid = PcdName[0]\r
         if not IsValidToken(CVAR_PATTERN, Guid):\r
             self._LoggerError(ST.ERR_DECPARSE_PCD_CVAR_GUID)\r
-        \r
+\r
         #\r
         # PCD C name\r
         #\r
         CName = PcdName[1]\r
         if not IsValidToken(CVAR_PATTERN, CName):\r
             self._LoggerError(ST.ERR_DECPARSE_PCD_CVAR_PCDCNAME)\r
-        \r
+\r
         self._CheckReDefine(Guid + DT.TAB_SPLIT + CName)\r
-        \r
+\r
         #\r
         # Default value, may be C array, string or number\r
         #\r
         Data = DT.TAB_VALUE_SPLIT.join(TokenList[1:-2]).strip()\r
-        \r
+\r
         #\r
         # PCD data type\r
         #\r
@@ -623,18 +623,18 @@ class _DecPcd(_DecBase):
             if long(Token) > 4294967295:\r
                 self._LoggerError(ST.ERR_DECPARSE_PCD_TOKEN_INT % Token)\r
             Token = hex(long(Token))[:-1]\r
-        \r
+\r
         IntToken = long(Token, 0)\r
         if (Guid, IntToken) in self.TokenMap:\r
             if self.TokenMap[Guid, IntToken] != CName:\r
                 self._LoggerError(ST.ERR_DECPARSE_PCD_TOKEN_UNIQUE%(Token))\r
         else:\r
             self.TokenMap[Guid, IntToken] = CName\r
-        \r
+\r
         Item = DecPcdItemObject(Guid, CName, Data, DataType, Token)\r
         self.ItemObject.AddItem(Item, self._RawData.CurrentScope)\r
         return Item\r
-        \r
+\r
 ## _DecGuid\r
 #\r
 # Parse GUID, PPI, Protocol section\r
@@ -651,21 +651,21 @@ class _DecGuid(_DecBase):
             DT.TAB_PPIS.upper()      :   self.PpiObj,\r
             DT.TAB_PROTOCOLS.upper() :   self.ProtocolObj\r
         }\r
-    \r
+\r
     def GetDataObject(self):\r
         if self._RawData.CurrentScope:\r
             return self.ObjectDict[self._RawData.CurrentScope[0][0]]\r
         return None\r
-    \r
+\r
     def GetGuidObject(self):\r
         return self.GuidObj\r
-    \r
+\r
     def GetPpiObject(self):\r
         return self.PpiObj\r
-    \r
+\r
     def GetProtocolObject(self):\r
         return self.ProtocolObj\r
-    \r
+\r
     def _ParseItem(self):\r
         Line = self._RawData.CurrentLine\r
         TokenList = GetSplitValueList(Line, DT.TAB_EQUAL_SPLIT, 1)\r
@@ -677,9 +677,9 @@ class _DecGuid(_DecBase):
             self._LoggerError(ST.ERR_DECPARSE_CGUID_GUID)\r
         if not IsValidToken(CVAR_PATTERN, TokenList[0]):\r
             self._LoggerError(ST.ERR_DECPARSE_PCD_CVAR_GUID)\r
-        \r
+\r
         self._CheckReDefine(TokenList[0])\r
-        \r
+\r
         if TokenList[1][0] != '{':\r
             if not CheckGuidRegFormat(TokenList[1]):\r
                 self._LoggerError(ST.ERR_DECPARSE_DEFINE_PKGGUID)\r
@@ -691,7 +691,7 @@ class _DecGuid(_DecBase):
             GuidString = GuidStructureStringToGuidString(TokenList[1])\r
             if TokenList[1][0] != '{' or TokenList[1][-1] != '}' or GuidString == '':\r
                 self._LoggerError(ST.ERR_DECPARSE_CGUID_GUIDFORMAT)\r
-    \r
+\r
             #\r
             # Check C format GUID\r
             #\r
@@ -713,7 +713,7 @@ class _DecUserExtension(_DecBase):
         self.ItemObject = DecUserExtensionObject(RawData.Filename)\r
         self._Headers = []\r
         self._CurItems = []\r
-    \r
+\r
     def BlockStart(self):\r
         self._CurItems = []\r
         for Header in self._RawData.CurrentScope:\r
@@ -721,7 +721,7 @@ class _DecUserExtension(_DecBase):
                 self._LoggerError(ST.ERR_DECPARSE_UE_DUPLICATE)\r
             else:\r
                 self._Headers.append(Header)\r
-            \r
+\r
             for Item in self._CurItems:\r
                 if Item.UserId == Header[1] and Item.IdString == Header[2]:\r
                     Item.ArchAndModuleType.append(Header[3])\r
@@ -734,7 +734,7 @@ class _DecUserExtension(_DecBase):
                 self._CurItems.append(Item)\r
                 self.ItemObject.AddItem(Item, None)\r
         self._LocalMacro = {}\r
-    \r
+\r
     def _ParseItem(self):\r
         Line = self._RawData.CurrentLine\r
         Item = None\r
@@ -749,8 +749,8 @@ class _DecUserExtension(_DecBase):
 #\r
 # Top dec parser\r
 #\r
-class Dec(_DecBase, _DecComments):    \r
-    def __init__(self, DecFile, Parse = True):        \r
+class Dec(_DecBase, _DecComments):\r
+    def __init__(self, DecFile, Parse = True):\r
         try:\r
             Content = ConvertSpecialChar(open(DecFile, 'rb').readlines())\r
         except BaseException:\r
@@ -776,20 +776,20 @@ class Dec(_DecBase, _DecComments):
                 NewContent.append(Line + '\r')\r
 \r
         RawData = FileContent(DecFile, NewContent)\r
-        \r
+\r
         _DecComments.__init__(self)\r
         _DecBase.__init__(self, RawData)\r
-        \r
+\r
         self.BinaryHeadComment = []\r
         self.PcdErrorCommentDict = {}\r
-        \r
+\r
         self._Define    = _DecDefine(RawData)\r
         self._Include   = _DecInclude(RawData)\r
         self._Guid      = _DecGuid(RawData)\r
         self._LibClass  = _DecLibraryclass(RawData)\r
         self._Pcd       = _DecPcd(RawData)\r
         self._UserEx    = _DecUserExtension(RawData)\r
-        \r
+\r
         #\r
         # DEC file supported data types (one type per section)\r
         #\r
@@ -815,7 +815,7 @@ class Dec(_DecBase, _DecComments):
             # Parsing done, check required fields\r
             #\r
             self.CheckRequiredFields()\r
-    \r
+\r
     def CheckRequiredFields(self):\r
         for SectionParser in self._SectionParser.values():\r
             if not SectionParser.CheckRequiredFields():\r
@@ -831,7 +831,7 @@ class Dec(_DecBase, _DecComments):
         FileHeaderLineIndex = -1\r
         BinaryHeaderLineIndex = -1\r
         TokenSpaceGuidCName = ''\r
-        \r
+\r
         #\r
         # Parse PCD error comment section\r
         #\r
@@ -853,13 +853,13 @@ class Dec(_DecBase, _DecComments):
                 self._RawData.CurrentLine = self._RawData.CurrentLine.replace(DT.TAB_COMMENT_SPLIT, '').strip()\r
                 if self._RawData.CurrentLine != '':\r
                     if DT.TAB_VALUE_SPLIT not in self._RawData.CurrentLine:\r
-                        self._LoggerError(ST.ERR_DECPARSE_PCDERRORMSG_MISS_VALUE_SPLIT)   \r
-                          \r
+                        self._LoggerError(ST.ERR_DECPARSE_PCDERRORMSG_MISS_VALUE_SPLIT)\r
+\r
                     PcdErrorNumber, PcdErrorMsg = GetSplitValueList(self._RawData.CurrentLine, DT.TAB_VALUE_SPLIT, 1)\r
                     PcdErrorNumber = ParsePcdErrorCode(PcdErrorNumber, self._RawData.Filename, self._RawData.LineIndex)\r
                     if not PcdErrorMsg.strip():\r
                         self._LoggerError(ST.ERR_DECPARSE_PCD_MISS_ERRORMSG)\r
-                        \r
+\r
                     self.PcdErrorCommentDict[(TokenSpaceGuidCName, PcdErrorNumber)] = PcdErrorMsg.strip()\r
             else:\r
                 TokenSpaceGuidCName = ''\r
@@ -870,27 +870,27 @@ class Dec(_DecBase, _DecComments):
 \r
         while not self._RawData.IsEndOfFile():\r
             Line, Comment = CleanString(self._RawData.GetNextLine())\r
-            \r
+\r
             #\r
             # Header must be pure comment\r
             #\r
             if Line != '':\r
                 self._RawData.UndoNextLine()\r
                 break\r
-            \r
+\r
             if Comment and Comment.startswith(DT.TAB_SPECIAL_COMMENT) and Comment.find(DT.TAB_HEADER_COMMENT) > 0 \\r
                 and not Comment[2:Comment.find(DT.TAB_HEADER_COMMENT)].strip():\r
                 IsFileHeader = True\r
                 IsBinaryHeader = False\r
                 FileHeaderLineIndex = self._RawData.LineIndex\r
-                \r
+\r
+            #\r
+            # Get license information before '@file'\r
             #\r
-            # Get license information before '@file' \r
-            #   \r
             if not IsFileHeader and not IsBinaryHeader and Comment and Comment.startswith(DT.TAB_COMMENT_SPLIT) and \\r
             DT.TAB_BINARY_HEADER_COMMENT not in Comment:\r
                 self._HeadComment.append((Comment, self._RawData.LineIndex))\r
-            \r
+\r
             if Comment and IsFileHeader and \\r
             not(Comment.startswith(DT.TAB_SPECIAL_COMMENT) \\r
             and Comment.find(DT.TAB_BINARY_HEADER_COMMENT) > 0):\r
@@ -899,15 +899,15 @@ class Dec(_DecBase, _DecComments):
             # Double '#' indicates end of header comments\r
             #\r
             if (not Comment or Comment == DT.TAB_SPECIAL_COMMENT) and IsFileHeader:\r
-                IsFileHeader = False  \r
+                IsFileHeader = False\r
                 continue\r
-            \r
+\r
             if Comment and Comment.startswith(DT.TAB_SPECIAL_COMMENT) \\r
             and Comment.find(DT.TAB_BINARY_HEADER_COMMENT) > 0:\r
                 IsBinaryHeader = True\r
                 IsFileHeader = False\r
                 BinaryHeaderLineIndex = self._RawData.LineIndex\r
-                \r
+\r
             if Comment and IsBinaryHeader:\r
                 self.BinaryHeadComment.append((Comment, self._RawData.LineIndex))\r
             #\r
@@ -916,23 +916,23 @@ class Dec(_DecBase, _DecComments):
             if (not Comment or Comment == DT.TAB_SPECIAL_COMMENT) and IsBinaryHeader:\r
                 IsBinaryHeader = False\r
                 break\r
-            \r
+\r
             if FileHeaderLineIndex > -1 and not IsFileHeader and not IsBinaryHeader:\r
                 break\r
 \r
         if FileHeaderLineIndex > BinaryHeaderLineIndex and FileHeaderLineIndex > -1 and BinaryHeaderLineIndex > -1:\r
             self._LoggerError(ST.ERR_BINARY_HEADER_ORDER)\r
-            \r
+\r
         if FileHeaderLineIndex == -1:\r
 #            self._LoggerError(ST.ERR_NO_SOURCE_HEADER)\r
-            Logger.Error(TOOL_NAME, FORMAT_INVALID, \r
+            Logger.Error(TOOL_NAME, FORMAT_INVALID,\r
                          ST.ERR_NO_SOURCE_HEADER,\r
                          File=self._RawData.Filename)\r
         return\r
-    \r
+\r
     def _StopCurrentParsing(self, Line):\r
         return False\r
-    \r
+\r
     def _ParseItem(self):\r
         self._SectionHeaderParser()\r
         if len(self._RawData.CurrentScope) == 0:\r
@@ -955,8 +955,8 @@ class Dec(_DecBase, _DecComments):
             if Token.upper() != DT.TAB_USER_EXTENSIONS.upper():\r
                 self._LoggerError(ST.ERR_DECPARSE_SECTION_UE)\r
             UserExtension = Token.upper()\r
-            Par.AssertChar(DT.TAB_SPLIT, ST.ERR_DECPARSE_SECTION_UE, self._RawData.LineIndex)     \r
-            \r
+            Par.AssertChar(DT.TAB_SPLIT, ST.ERR_DECPARSE_SECTION_UE, self._RawData.LineIndex)\r
+\r
             #\r
             # UserID\r
             #\r
@@ -991,7 +991,7 @@ class Dec(_DecBase, _DecComments):
         Par.AssertEnd(ST.ERR_DECPARSE_SECTION_UE, self._RawData.LineIndex)\r
         if 'COMMON' in ArchList and len(ArchList) > 1:\r
             self._LoggerError(ST.ERR_DECPARSE_SECTION_COMMON)\r
\r
+\r
     ## Section header parser\r
     #\r
     # The section header is always in following format:\r
@@ -1001,7 +1001,7 @@ class Dec(_DecBase, _DecComments):
     def _SectionHeaderParser(self):\r
         if self._RawData.CurrentLine[0] != DT.TAB_SECTION_START or self._RawData.CurrentLine[-1] != DT.TAB_SECTION_END:\r
             self._LoggerError(ST.ERR_DECPARSE_SECTION_IDENTIFY)\r
-        \r
+\r
         RawSection = self._RawData.CurrentLine[1:-1].strip().upper()\r
         #\r
         # Check defines section which is only allowed to occur once and\r
@@ -1039,7 +1039,7 @@ class Dec(_DecBase, _DecComments):
                 self._LoggerError(ST.ERR_DECPARSE_SECTION_SUBTOOMANY % Item)\r
 \r
             if DT.TAB_PCDS_FEATURE_FLAG_NULL.upper() in SectionNames and len(SectionNames) > 1:\r
-                self._LoggerError(ST.ERR_DECPARSE_SECTION_FEATUREFLAG % DT.TAB_PCDS_FEATURE_FLAG_NULL) \r
+                self._LoggerError(ST.ERR_DECPARSE_SECTION_FEATUREFLAG % DT.TAB_PCDS_FEATURE_FLAG_NULL)\r
             #\r
             # S1 is always Arch\r
             #\r
@@ -1064,7 +1064,7 @@ class Dec(_DecBase, _DecComments):
             for Sec in SectionNames:\r
                 if not Sec.startswith(DT.TAB_PCDS.upper()):\r
                     self._LoggerError(ST.ERR_DECPARSE_SECTION_NAME % str(SectionNames))\r
-    \r
+\r
     def GetDefineSectionMacro(self):\r
         return self._Define.GetLocalMacro()\r
     def GetDefineSectionObject(self):\r
@@ -1084,11 +1084,11 @@ class Dec(_DecBase, _DecComments):
     def GetUserExtensionSectionObject(self):\r
         return self._UserEx.GetDataObject()\r
     def GetPackageSpecification(self):\r
-        return self._Define.GetDataObject().GetPackageSpecification()   \r
+        return self._Define.GetDataObject().GetPackageSpecification()\r
     def GetPackageName(self):\r
-        return self._Define.GetDataObject().GetPackageName()   \r
+        return self._Define.GetDataObject().GetPackageName()\r
     def GetPackageGuid(self):\r
-        return self._Define.GetDataObject().GetPackageGuid()    \r
+        return self._Define.GetDataObject().GetPackageGuid()\r
     def GetPackageVersion(self):\r
         return self._Define.GetDataObject().GetPackageVersion()\r
     def GetPackageUniFile(self):\r
index 22a50680fb8f09e9ce65d7a2d8b4cfe2b3147304..c5c35ede785b9fa8e7d421d216e657aa2dd17067 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file is used to define helper class and function for DEC parser\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -104,7 +104,7 @@ def StripRoot(Root, Path):
 # Remove spaces\r
 #\r
 # @param Line:              The string to be cleaned\r
-# @param CommentCharacter:  Comment char, used to ignore comment content, \r
+# @param CommentCharacter:  Comment char, used to ignore comment content,\r
 #                           default is DataType.TAB_COMMENT_SPLIT\r
 #\r
 def CleanString(Line, CommentCharacter=TAB_COMMENT_SPLIT, \\r
@@ -291,7 +291,7 @@ def IsValidPcdDatum(Type, Value):
             Valid, Cause = IsValidLogicalExpr(Value, True)\r
         if not Valid:\r
             return False, Cause\r
-        \r
+\r
     return True, ""\r
 \r
 ## ParserHelper\r
@@ -366,7 +366,7 @@ class ParserHelper:
 \r
     ## AssertChar\r
     #\r
-    # Assert char at current index of string is AssertChar, or will report \r
+    # Assert char at current index of string is AssertChar, or will report\r
     # error message\r
     #\r
     # @param AssertChar: AssertChar\r
index 760f28a41f6fe1ba68dc5656a46ed1938af5f3c2..029a436cec5d6c54c34b92d68ba869137b5b25ab 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -133,7 +133,7 @@ def GetPackageListInfo(FileNameString, WorkSpace, LineNo):
             continue\r
 \r
         #\r
-        # Found [Packages] section \r
+        # Found [Packages] section\r
         #\r
         if RePackageHeader.match(Line):\r
             PackageHederFlag = True\r
@@ -174,7 +174,7 @@ def GetPackageListInfo(FileNameString, WorkSpace, LineNo):
 \r
             #\r
             # Replace with Local section Macro and [Defines] section Macro.\r
-            #            \r
+            #\r
             Line = InfExpandMacro(Line, (FileNameString, Line, LineNo), DefineSectionMacros, PackageSectionMacros, True)\r
 \r
             Line = GetSplitValueList(Line, "#", 1)[0]\r
index f220402cb57723311faa6a8900143219d7ec391c..43cdeee3a72961536fc78ba9818dff8dd843a530 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-# This file contained the parser for [Binaries] sections in INF file \r
+# This file contained the parser for [Binaries] sections in INF file\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -35,7 +35,7 @@ class InfBinarySectionParser(InfParserSectionRoot):
     #\r
     def InfBinaryParser(self, SectionString, InfSectionObject, FileName):\r
         #\r
-        # Macro defined in this section \r
+        # Macro defined in this section\r
         #\r
         SectionMacros = {}\r
         ValueList     = []\r
@@ -56,8 +56,8 @@ class InfBinarySectionParser(InfParserSectionRoot):
 \r
         StillCommentFalg  = False\r
         HeaderComments    = []\r
-        LineComment       = None           \r
-        \r
+        LineComment       = None\r
+\r
         AllSectionContent = ''\r
         #\r
         # Parse section content\r
@@ -65,16 +65,16 @@ class InfBinarySectionParser(InfParserSectionRoot):
         for Line in SectionString:\r
             BinLineContent = Line[0]\r
             BinLineNo      = Line[1]\r
-            \r
+\r
             if BinLineContent.strip() == '':\r
                 continue\r
-            \r
+\r
             CurrentLineObj = CurrentLine()\r
             CurrentLineObj.FileName = FileName\r
             CurrentLineObj.LineString = BinLineContent\r
             CurrentLineObj.LineNo = BinLineNo\r
             #\r
-            # Found Header Comments \r
+            # Found Header Comments\r
             #\r
             if BinLineContent.strip().startswith(DT.TAB_COMMENT_SPLIT):\r
                 #\r
@@ -85,7 +85,7 @@ class InfBinarySectionParser(InfParserSectionRoot):
                     AllSectionContent += BinLineContent + DT.END_OF_LINE\r
                     continue\r
                 #\r
-                # First time encounter comment \r
+                # First time encounter comment\r
                 #\r
                 else:\r
                     #\r
@@ -98,14 +98,14 @@ class InfBinarySectionParser(InfParserSectionRoot):
                     continue\r
             else:\r
                 StillCommentFalg = False\r
-                          \r
+\r
             if len(HeaderComments) >= 1:\r
                 LineComment = InfLineCommentObject()\r
                 LineCommentContent = ''\r
                 for Item in HeaderComments:\r
                     LineCommentContent += Item[0] + DT.END_OF_LINE\r
                 LineComment.SetHeaderComments(LineCommentContent)\r
-            \r
+\r
             #\r
             # Find Tail comment.\r
             #\r
@@ -114,8 +114,8 @@ class InfBinarySectionParser(InfParserSectionRoot):
                 BinLineContent = BinLineContent[:BinLineContent.find(DT.TAB_COMMENT_SPLIT)]\r
                 if LineComment is None:\r
                     LineComment = InfLineCommentObject()\r
-                LineComment.SetTailComments(TailComments)            \r
-            \r
+                LineComment.SetTailComments(TailComments)\r
+\r
             #\r
             # Find Macro\r
             #\r
@@ -126,22 +126,22 @@ class InfBinarySectionParser(InfParserSectionRoot):
             if MacroDef[0] is not None:\r
                 SectionMacros[MacroDef[0]] = MacroDef[1]\r
                 LineComment = None\r
-                HeaderComments = []                   \r
+                HeaderComments = []\r
                 continue\r
-            \r
+\r
             #\r
             # Replace with Local section Macro and [Defines] section Macro.\r
-            #            \r
-            LineContent = InfExpandMacro(BinLineContent, \r
-                                         (FileName, BinLineContent, BinLineNo), \r
-                                         self.FileLocalMacros, \r
+            #\r
+            LineContent = InfExpandMacro(BinLineContent,\r
+                                         (FileName, BinLineContent, BinLineNo),\r
+                                         self.FileLocalMacros,\r
                                          SectionMacros, True)\r
-            \r
-            AllSectionContent += LineContent + DT.END_OF_LINE           \r
+\r
+            AllSectionContent += LineContent + DT.END_OF_LINE\r
             TokenList = GetSplitValueList(LineContent, DT.TAB_VALUE_SPLIT, 1)\r
             ValueList[0:len(TokenList)] = TokenList\r
-        \r
-            #              \r
+\r
+            #\r
             # Should equal to UI/SEC_UI/UNI_UI\r
             #\r
             ValueList[0] = ValueList[0].strip()\r
@@ -149,84 +149,84 @@ class InfBinarySectionParser(InfParserSectionRoot):
                ValueList[0] == DT.BINARY_FILE_TYPE_SEC_UI or \\r
                ValueList[0] == DT.BINARY_FILE_TYPE_UI:\r
                 if len(ValueList) == 2:\r
-                    TokenList = GetSplitValueList(ValueList[1], \r
-                                                  DT.TAB_VALUE_SPLIT, \r
+                    TokenList = GetSplitValueList(ValueList[1],\r
+                                                  DT.TAB_VALUE_SPLIT,\r
                                                   2)\r
                     NewValueList = []\r
                     NewValueList.append(ValueList[0])\r
                     for Item in TokenList:\r
                         NewValueList.append(Item)\r
-                    UiBinaryList.append((NewValueList, \r
-                                         LineComment, \r
-                                         CurrentLineObj)) \r
-            #              \r
+                    UiBinaryList.append((NewValueList,\r
+                                         LineComment,\r
+                                         CurrentLineObj))\r
+            #\r
             # Should equal to VER/SEC_VER/UNI_VER\r
             #\r
             elif ValueList[0] == DT.BINARY_FILE_TYPE_UNI_VER or \\r
                ValueList[0] == DT.BINARY_FILE_TYPE_SEC_VER or \\r
                ValueList[0] == DT.BINARY_FILE_TYPE_VER:\r
                 if len(ValueList) == 2:\r
-                    TokenList = GetSplitValueList(ValueList[1], \r
-                                                  DT.TAB_VALUE_SPLIT, \r
+                    TokenList = GetSplitValueList(ValueList[1],\r
+                                                  DT.TAB_VALUE_SPLIT,\r
                                                   2)\r
                     NewValueList = []\r
                     NewValueList.append(ValueList[0])\r
                     for Item in TokenList:\r
-                        NewValueList.append(Item)                             \r
-                    VerBinaryList.append((NewValueList, \r
-                                          LineComment, \r
+                        NewValueList.append(Item)\r
+                    VerBinaryList.append((NewValueList,\r
+                                          LineComment,\r
                                           CurrentLineObj))\r
             else:\r
                 if len(ValueList) == 2:\r
                     if ValueList[0].strip() == 'SUBTYPE_GUID':\r
-                        TokenList = GetSplitValueList(ValueList[1], \r
-                                                      DT.TAB_VALUE_SPLIT, \r
+                        TokenList = GetSplitValueList(ValueList[1],\r
+                                                      DT.TAB_VALUE_SPLIT,\r
                                                       5)\r
                     else:\r
-                        TokenList = GetSplitValueList(ValueList[1], \r
-                              DT.TAB_VALUE_SPLIT, \r
+                        TokenList = GetSplitValueList(ValueList[1],\r
+                              DT.TAB_VALUE_SPLIT,\r
                               4)\r
-                        \r
+\r
                     NewValueList = []\r
                     NewValueList.append(ValueList[0])\r
                     for Item in TokenList:\r
-                        NewValueList.append(Item)                             \r
-                    ComBinaryList.append((NewValueList, \r
-                                          LineComment, \r
+                        NewValueList.append(Item)\r
+                    ComBinaryList.append((NewValueList,\r
+                                          LineComment,\r
                                           CurrentLineObj))\r
                 elif len(ValueList) == 1:\r
                     NewValueList = []\r
                     NewValueList.append(ValueList[0])\r
-                    ComBinaryList.append((NewValueList, \r
-                                          LineComment, \r
+                    ComBinaryList.append((NewValueList,\r
+                                          LineComment,\r
                                           CurrentLineObj))\r
-                    \r
-                    \r
-                \r
-            \r
+\r
+\r
+\r
+\r
             ValueList = []\r
             LineComment = None\r
             TailComments = ''\r
-            HeaderComments = []           \r
+            HeaderComments = []\r
             continue\r
 \r
         #\r
         # Current section archs\r
-        #    \r
+        #\r
         ArchList = []\r
         for Item in self.LastSectionHeaderContent:\r
             if Item[1] not in ArchList:\r
-                ArchList.append(Item[1])      \r
+                ArchList.append(Item[1])\r
                 InfSectionObject.SetSupArchList(Item[1])\r
-                \r
-        InfSectionObject.SetAllContent(AllSectionContent)        \r
-        if not InfSectionObject.SetBinary(UiBinaryList, \r
-                                          VerBinaryList, \r
-                                          ComBinaryList, \r
+\r
+        InfSectionObject.SetAllContent(AllSectionContent)\r
+        if not InfSectionObject.SetBinary(UiBinaryList,\r
+                                          VerBinaryList,\r
+                                          ComBinaryList,\r
                                           ArchList):\r
-            Logger.Error('InfParser', \r
+            Logger.Error('InfParser',\r
                          FORMAT_INVALID,\r
                          ST.ERR_INF_PARSER_MODULE_SECTION_TYPE_ERROR%("[Binaries]"),\r
                          File=FileName,\r
-                         Line=Item[3])     \r
-    
\ No newline at end of file
+                         Line=Item[3])\r
+\r
index 941641a8451310e42f8064c90862f9ab41d50ec5..43b6ee2e7f06e921443022fde970acc835bf38c2 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-# This file contained the parser for BuildOption sections in INF file \r
+# This file contained the parser for BuildOption sections in INF file\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -36,10 +36,10 @@ class InfBuildOptionSectionParser(InfParserSectionRoot):
     #\r
     #\r
     def InfBuildOptionParser(self, SectionString, InfSectionObject, FileName):\r
-        \r
+\r
         BuildOptionList = []\r
         SectionContent  = ''\r
-        \r
+\r
         if not GlobalData.gIS_BINARY_INF:\r
             ValueList       = []\r
             LineNo          = 0\r
@@ -49,24 +49,24 @@ class InfBuildOptionSectionParser(InfParserSectionRoot):
                 LineNo      = Line[1]\r
                 TailComments = ''\r
                 ReplaceFlag = False\r
-                \r
+\r
                 if LineContent.strip() == '':\r
-                    SectionContent += LineContent + DT.END_OF_LINE \r
-                    continue       \r
+                    SectionContent += LineContent + DT.END_OF_LINE\r
+                    continue\r
                 #\r
                 # Found Comment\r
                 #\r
                 if LineContent.strip().startswith(DT.TAB_COMMENT_SPLIT):\r
-                    SectionContent += LineContent + DT.END_OF_LINE \r
+                    SectionContent += LineContent + DT.END_OF_LINE\r
                     continue\r
-                \r
+\r
                 #\r
                 # Find Tail comment.\r
                 #\r
                 if LineContent.find(DT.TAB_COMMENT_SPLIT) > -1:\r
                     TailComments = LineContent[LineContent.find(DT.TAB_COMMENT_SPLIT):]\r
-                    LineContent = LineContent[:LineContent.find(DT.TAB_COMMENT_SPLIT)]               \r
-                \r
+                    LineContent = LineContent[:LineContent.find(DT.TAB_COMMENT_SPLIT)]\r
+\r
                 TokenList = GetSplitValueList(LineContent, DT.TAB_DEQUAL_SPLIT, 1)\r
                 if len(TokenList) == 2:\r
                     #\r
@@ -82,21 +82,21 @@ class InfBuildOptionSectionParser(InfParserSectionRoot):
                     if len(TokenList) == 2:\r
                         TokenList.append('False')\r
                     else:\r
-                        Logger.Error('InfParser', \r
+                        Logger.Error('InfParser',\r
                                      FORMAT_INVALID,\r
                                      ST.ERR_INF_PARSER_BUILD_OPTION_FORMAT_INVALID,\r
-                                     ExtraData=LineContent, \r
+                                     ExtraData=LineContent,\r
                                      File=FileName,\r
-                                     Line=LineNo)               \r
-                        \r
+                                     Line=LineNo)\r
+\r
                 ValueList[0:len(TokenList)] = TokenList\r
-                \r
+\r
                 #\r
                 # Replace with [Defines] section Macro\r
                 #\r
-                ValueList[0] = InfExpandMacro(ValueList[0], (FileName, LineContent, LineNo), \r
+                ValueList[0] = InfExpandMacro(ValueList[0], (FileName, LineContent, LineNo),\r
                                               self.FileLocalMacros, None)\r
-                ValueList[1] = InfExpandMacro(ValueList[1], (FileName, LineContent, LineNo), \r
+                ValueList[1] = InfExpandMacro(ValueList[1], (FileName, LineContent, LineNo),\r
                                               self.FileLocalMacros, None, True)\r
                 EqualString = ''\r
                 if not ReplaceFlag:\r
@@ -108,30 +108,30 @@ class InfBuildOptionSectionParser(InfParserSectionRoot):
 \r
                 Family = GetSplitValueList(ValueList[0], DT.TAB_COLON_SPLIT, 1)\r
                 if len(Family) == 2:\r
-                    if not IsValidFamily(Family[0]):            \r
-                        Logger.Error('InfParser', \r
+                    if not IsValidFamily(Family[0]):\r
+                        Logger.Error('InfParser',\r
                                      FORMAT_INVALID,\r
                                      ST.ERR_INF_PARSER_BUILD_OPTION_FORMAT_INVALID,\r
-                                     ExtraData=LineContent, \r
+                                     ExtraData=LineContent,\r
                                      File=FileName,\r
                                      Line=LineNo)\r
                     if not IsValidBuildOptionName(Family[1]):\r
-                        Logger.Error('InfParser', \r
+                        Logger.Error('InfParser',\r
                                      FORMAT_INVALID,\r
                                      ST.ERR_INF_PARSER_BUILD_OPTION_FORMAT_INVALID,\r
-                                     ExtraData=LineContent, \r
+                                     ExtraData=LineContent,\r
                                      File=FileName,\r
                                      Line=LineNo)\r
                 if len(Family) == 1:\r
                     if not IsValidBuildOptionName(Family[0]):\r
-                        Logger.Error('InfParser', \r
+                        Logger.Error('InfParser',\r
                                      FORMAT_INVALID,\r
                                      ST.ERR_INF_PARSER_BUILD_OPTION_FORMAT_INVALID,\r
-                                     ExtraData=LineContent, \r
+                                     ExtraData=LineContent,\r
                                      File=FileName,\r
                                      Line=LineNo)\r
-                                                \r
-                BuildOptionList.append(ValueList)                  \r
+\r
+                BuildOptionList.append(ValueList)\r
                 ValueList = []\r
                 continue\r
         else:\r
@@ -147,20 +147,20 @@ class InfBuildOptionSectionParser(InfParserSectionRoot):
             if not (Item[1] == '' or Item[1] == '') and Item[1] not in ArchList:\r
                 ArchList.append(Item[1])\r
                 InfSectionObject.SetSupArchList(Item[1])\r
-      \r
+\r
         InfSectionObject.SetAllContent(SectionContent)\r
         if not InfSectionObject.SetBuildOptions(BuildOptionList, ArchList, SectionContent):\r
-            Logger.Error('InfParser', \r
+            Logger.Error('InfParser',\r
                          FORMAT_INVALID,\r
                          ST.ERR_INF_PARSER_MODULE_SECTION_TYPE_ERROR%("[BuilOptions]"),\r
                          File=FileName,\r
-                         Line=LastItem[3]) \r
+                         Line=LastItem[3])\r
 \r
 ## InfBuildOptionParser\r
 #\r
 #\r
 def InfAsBuiltBuildOptionParser(SectionString, FileName):\r
-    BuildOptionList = []       \r
+    BuildOptionList = []\r
     #\r
     # AsBuild Binary INF file.\r
     #\r
@@ -171,7 +171,7 @@ def InfAsBuiltBuildOptionParser(SectionString, FileName):
         Count += 1\r
         LineContent = Line[0]\r
         LineNo      = Line[1]\r
-        \r
+\r
         #\r
         # The last line\r
         #\r
@@ -186,33 +186,33 @@ def InfAsBuiltBuildOptionParser(SectionString, FileName):
             else:\r
                 if len(BuildOptionItem) > 0:\r
                     BuildOptionList.append(BuildOptionItem)\r
-            \r
-            break                    \r
-        \r
+\r
+            break\r
+\r
         if LineContent.strip() == '':\r
             AsBuildOptionFlag = False\r
             continue\r
-        \r
+\r
         if LineContent.strip().startswith("##") and AsBuildOptionFlag:\r
             if len(BuildOptionItem) > 0:\r
-                BuildOptionList.append(BuildOptionItem) \r
-                \r
+                BuildOptionList.append(BuildOptionItem)\r
+\r
             BuildOptionItem = []\r
-        \r
+\r
         if not LineContent.strip().startswith("#"):\r
-            Logger.Error('InfParser', \r
+            Logger.Error('InfParser',\r
                         FORMAT_INVALID,\r
-                        ST.ERR_BO_CONTATIN_ASBUILD_AND_COMMON, \r
-                        File=FileName, \r
-                        Line=LineNo, \r
+                        ST.ERR_BO_CONTATIN_ASBUILD_AND_COMMON,\r
+                        File=FileName,\r
+                        Line=LineNo,\r
                         ExtraData=LineContent)\r
-        \r
+\r
         if IsAsBuildOptionInfo(LineContent):\r
             AsBuildOptionFlag = True\r
             continue\r
-        \r
+\r
         if AsBuildOptionFlag:\r
             BuildOptionInfo = GetHelpStringByRemoveHashKey(LineContent)\r
             BuildOptionItem.append(BuildOptionInfo)\r
-        \r
-    return BuildOptionList
\ No newline at end of file
+\r
+    return BuildOptionList\r
index f7749d55a0625ab532a1ff0796772b3fffacdd25..397a9b18f97d339bfd83779df6d0aac76dcf1f60 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-# This file contained the parser for define sections in INF file \r
+# This file contained the parser for define sections in INF file\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -33,32 +33,32 @@ from Logger import StringTable as ST
 from Parser.InfParserMisc import InfParserSectionRoot\r
 \r
 ## __GetValidateArchList\r
-#        \r
+#\r
 #\r
 def GetValidateArchList(LineContent):\r
-    \r
+\r
     TempArch = ''\r
     ArchList = []\r
     ValidateAcrhPatten = re.compile(r"^\s*#\s*VALID_ARCHITECTURES\s*=\s*.*$", re.DOTALL)\r
-    \r
+\r
     if ValidateAcrhPatten.match(LineContent):\r
         TempArch = GetSplitValueList(LineContent, DT.TAB_EQUAL_SPLIT, 1)[1]\r
-                                \r
+\r
         TempArch = GetSplitValueList(TempArch, '(', 1)[0]\r
-                                \r
+\r
         ArchList = re.split('\s+', TempArch)\r
         NewArchList = []\r
         for Arch in ArchList:\r
             if IsValidArch(Arch):\r
                 NewArchList.append(Arch)\r
-        \r
+\r
         ArchList = NewArchList\r
-        \r
-    return ArchList   \r
+\r
+    return ArchList\r
 \r
 class InfDefinSectionParser(InfParserSectionRoot):\r
     def InfDefineParser(self, SectionString, InfSectionObject, FileName, SectionComment):\r
-        \r
+\r
         if SectionComment:\r
             pass\r
         #\r
@@ -74,18 +74,18 @@ class InfDefinSectionParser(InfParserSectionRoot):
         # Add WORKSPACE to global Marco dict.\r
         #\r
         self.FileLocalMacros['WORKSPACE'] = GlobalData.gWORKSPACE\r
-        \r
+\r
         for Line in SectionString:\r
             LineContent = Line[0]\r
             LineNo      = Line[1]\r
             TailComments   = ''\r
             LineComment    = None\r
-            \r
+\r
             LineInfo       = ['', -1, '']\r
             LineInfo[0]    = FileName\r
             LineInfo[1]    = LineNo\r
             LineInfo[2]    = LineContent\r
-            \r
+\r
             if LineContent.strip() == '':\r
                 continue\r
             #\r
@@ -106,7 +106,7 @@ class InfDefinSectionParser(InfParserSectionRoot):
                     SectionContent += LineContent + DT.END_OF_LINE\r
                     continue\r
                 #\r
-                # First time encounter comment \r
+                # First time encounter comment\r
                 #\r
                 else:\r
                     #\r
@@ -119,14 +119,14 @@ class InfDefinSectionParser(InfParserSectionRoot):
                     continue\r
             else:\r
                 StillCommentFalg = False\r
-                          \r
+\r
             if len(HeaderComments) >= 1:\r
                 LineComment = InfLineCommentObject()\r
                 LineCommentContent = ''\r
                 for Item in HeaderComments:\r
                     LineCommentContent += Item[0] + DT.END_OF_LINE\r
                 LineComment.SetHeaderComments(LineCommentContent)\r
-            \r
+\r
             #\r
             # Find Tail comment.\r
             #\r
@@ -136,62 +136,62 @@ class InfDefinSectionParser(InfParserSectionRoot):
                 if LineComment is None:\r
                     LineComment = InfLineCommentObject()\r
                 LineComment.SetTailComments(TailComments)\r
-                              \r
+\r
             #\r
             # Find Macro\r
             #\r
-            Name, Value = MacroParser((LineContent, LineNo), \r
-                                      FileName, \r
-                                      DT.MODEL_META_DATA_HEADER, \r
+            Name, Value = MacroParser((LineContent, LineNo),\r
+                                      FileName,\r
+                                      DT.MODEL_META_DATA_HEADER,\r
                                       self.FileLocalMacros)\r
             if Name is not None:\r
                 self.FileLocalMacros[Name] = Value\r
-                continue            \r
+                continue\r
 \r
             #\r
             # Replace with [Defines] section Macro\r
             #\r
-            LineContent = InfExpandMacro(LineContent, \r
-                                         (FileName, LineContent, LineNo), \r
-                                         self.FileLocalMacros, \r
+            LineContent = InfExpandMacro(LineContent,\r
+                                         (FileName, LineContent, LineNo),\r
+                                         self.FileLocalMacros,\r
                                          None, True)\r
-                       \r
+\r
             SectionContent += LineContent + DT.END_OF_LINE\r
-            \r
+\r
             TokenList = GetSplitValueList(LineContent, DT.TAB_EQUAL_SPLIT, 1)\r
             if len(TokenList) < 2:\r
                 ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_NO_VALUE,\r
-                           LineInfo=LineInfo)                \r
+                           LineInfo=LineInfo)\r
             _ValueList[0:len(TokenList)] = TokenList\r
             if not _ValueList[0]:\r
                 ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_NO_NAME,\r
                            LineInfo=LineInfo)\r
             if not _ValueList[1]:\r
                 ErrorInInf(ST.ERR_INF_PARSER_DEFINE_ITEM_NO_VALUE,\r
-                           LineInfo=LineInfo)   \r
-   \r
-            Name, Value = _ValueList[0], _ValueList[1]            \r
-            \r
+                           LineInfo=LineInfo)\r
+\r
+            Name, Value = _ValueList[0], _ValueList[1]\r
+\r
             InfDefMemberObj = InfDefMember(Name, Value)\r
             if (LineComment is not None):\r
                 InfDefMemberObj.Comments.SetHeaderComments(LineComment.GetHeaderComments())\r
                 InfDefMemberObj.Comments.SetTailComments(LineComment.GetTailComments())\r
-                \r
+\r
             InfDefMemberObj.CurrentLine.SetFileName(self.FullPath)\r
             InfDefMemberObj.CurrentLine.SetLineString(LineContent)\r
             InfDefMemberObj.CurrentLine.SetLineNo(LineNo)\r
-                       \r
+\r
             _ContentList.append(InfDefMemberObj)\r
             HeaderComments = []\r
             TailComments = ''\r
-        \r
+\r
         #\r
         # Current Define section archs\r
         #\r
         if not ArchList:\r
             ArchList = ['COMMON']\r
-        \r
-        InfSectionObject.SetAllContent(SectionContent)                \r
-        \r
+\r
+        InfSectionObject.SetAllContent(SectionContent)\r
+\r
         InfSectionObject.SetDefines(_ContentList, Arch=ArchList)\r
-        
\ No newline at end of file
+\r
index 332e2f01431013f0d7783bad89fd1a363b02fc82..7e2114313e0a2a137ee502df5ef00e9ee19e6339 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-# This file contained the parser for [Depex] sections in INF file \r
+# This file contained the parser for [Depex] sections in INF file\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -29,7 +29,7 @@ from Parser.InfParserMisc import InfParserSectionRoot
 class InfDepexSectionParser(InfParserSectionRoot):\r
     ## InfDepexParser\r
     #\r
-    # For now, only separate Depex String and comments. \r
+    # For now, only separate Depex String and comments.\r
     # Have two types of section header.\r
     # 1. [Depex.Arch.ModuleType, ...]\r
     # 2. [Depex.Arch|FFE, ...]\r
@@ -44,7 +44,7 @@ class InfDepexSectionParser(InfParserSectionRoot):
         for Line in SectionString:\r
             LineContent = Line[0]\r
             LineNo      = Line[1]\r
-                                            \r
+\r
             #\r
             # Found comment\r
             #\r
@@ -54,34 +54,34 @@ class InfDepexSectionParser(InfParserSectionRoot):
             #\r
             # Replace with [Defines] section Macro\r
             #\r
-            LineContent = InfExpandMacro(LineContent, \r
-                                         (FileName, LineContent, Line[1]), \r
-                                         self.FileLocalMacros, \r
+            LineContent = InfExpandMacro(LineContent,\r
+                                         (FileName, LineContent, Line[1]),\r
+                                         self.FileLocalMacros,\r
                                          None, True)\r
-            \r
+\r
             CommentCount = LineContent.find(DT.TAB_COMMENT_SPLIT)\r
-            \r
+\r
             if CommentCount > -1:\r
-                DepexComment.append((LineContent[CommentCount:], LineNo))          \r
+                DepexComment.append((LineContent[CommentCount:], LineNo))\r
                 LineContent = LineContent[:CommentCount-1]\r
-                \r
-        \r
+\r
+\r
             CommentCount = -1\r
             DepexContent.append((LineContent, LineNo))\r
-               \r
+\r
             TokenList = GetSplitValueList(LineContent, DT.TAB_COMMENT_SPLIT)\r
             ValueList[0:len(TokenList)] = TokenList\r
-             \r
+\r
         #\r
         # Current section archs\r
-        #    \r
+        #\r
         KeyList = []\r
         LastItem = ''\r
         for Item in self.LastSectionHeaderContent:\r
             LastItem = Item\r
             if (Item[1], Item[2], Item[3]) not in KeyList:\r
-                KeyList.append((Item[1], Item[2], Item[3]))        \r
-        \r
+                KeyList.append((Item[1], Item[2], Item[3]))\r
+\r
         NewCommentList = []\r
         FormatCommentLn = -1\r
         ReFormatComment = re.compile(r"""#(?:\s*)\[(.*?)\](?:.*)""", re.DOTALL)\r
@@ -90,15 +90,15 @@ class InfDepexSectionParser(InfParserSectionRoot):
             if ReFormatComment.match(CommentContent) is not None:\r
                 FormatCommentLn = CommentItem[1] + 1\r
                 continue\r
-            \r
+\r
             if CommentItem[1] != FormatCommentLn:\r
                 NewCommentList.append(CommentContent)\r
             else:\r
                 FormatCommentLn = CommentItem[1] + 1\r
-                       \r
+\r
         if not InfSectionObject.SetDepex(DepexContent, KeyList = KeyList, CommentList = NewCommentList):\r
-            Logger.Error('InfParser', \r
+            Logger.Error('InfParser',\r
                          FORMAT_INVALID,\r
                          ST.ERR_INF_PARSER_MODULE_SECTION_TYPE_ERROR%("[Depex]"),\r
-                         File=FileName, \r
-                         Line=LastItem[3])      
\ No newline at end of file
+                         File=FileName,\r
+                         Line=LastItem[3])\r
index 956c116c6e79536e8902c2bc257363ec02ae16fc..75396dd7eb3c94c454b3e4a0eccdee585abe4a46 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-# This file contained the parser for [Guids], [Ppis], [Protocols] sections in INF file \r
+# This file contained the parser for [Guids], [Ppis], [Protocols] sections in INF file\r
 #\r
-# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -37,7 +37,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
     #\r
     def InfGuidParser(self, SectionString, InfSectionObject, FileName):\r
         #\r
-        # Macro defined in this section \r
+        # Macro defined in this section\r
         #\r
         SectionMacros = {}\r
         ValueList = []\r
@@ -88,7 +88,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
 \r
                 #\r
                 # Replace with Local section Macro and [Defines] section Macro.\r
-                #            \r
+                #\r
                 ValueList = [InfExpandMacro(Value, (FileName, LineContent, LineNo),\r
                                             self.FileLocalMacros, SectionMacros, True)\r
                             for Value in ValueList]\r
@@ -104,7 +104,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
 \r
         #\r
         # Current section archs\r
-        #    \r
+        #\r
         ArchList = []\r
         LineIndex = -1\r
         for Item in self.LastSectionHeaderContent:\r
@@ -124,7 +124,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
     #\r
     def InfPpiParser(self, SectionString, InfSectionObject, FileName):\r
         #\r
-        # Macro defined in this section \r
+        # Macro defined in this section\r
         #\r
         SectionMacros = {}\r
         ValueList = []\r
@@ -175,7 +175,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
 \r
                 #\r
                 # Replace with Local section Macro and [Defines] section Macro.\r
-                #            \r
+                #\r
                 ValueList = [InfExpandMacro(Value, (FileName, LineContent, LineNo), self.FileLocalMacros, SectionMacros)\r
                             for Value in ValueList]\r
 \r
@@ -189,7 +189,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
 \r
         #\r
         # Current section archs\r
-        #    \r
+        #\r
         ArchList = []\r
         LineIndex = -1\r
         for Item in self.LastSectionHeaderContent:\r
@@ -206,7 +206,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
 \r
     ## InfUserExtensionParser\r
     #\r
-    #    \r
+    #\r
     def InfUserExtensionParser(self, SectionString, InfSectionObject, FileName):\r
 \r
         UserExtensionContent = ''\r
@@ -226,7 +226,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
 \r
         #\r
         # Current section UserId, IdString\r
-        #    \r
+        #\r
         IdContentList = []\r
         LastItem = ''\r
         SectionLineNo = None\r
@@ -265,14 +265,14 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
                 IdContentList.append((UserId, IdString, Arch))\r
             else:\r
                 #\r
-                # Each UserExtensions section header must have a unique set \r
+                # Each UserExtensions section header must have a unique set\r
                 # of UserId, IdString and Arch values.\r
-                # This means that the same UserId can be used in more than one \r
-                # section header, provided the IdString or Arch values are \r
-                # different. The same IdString values can be used in more than \r
-                # one section header if the UserId or Arch values are \r
-                # different. The same UserId and the same IdString can be used \r
-                # in a section header if the Arch values are different in each \r
+                # This means that the same UserId can be used in more than one\r
+                # section header, provided the IdString or Arch values are\r
+                # different. The same IdString values can be used in more than\r
+                # one section header if the UserId or Arch values are\r
+                # different. The same UserId and the same IdString can be used\r
+                # in a section header if the Arch values are different in each\r
                 # of the section headers.\r
                 #\r
                 Logger.Error('InfParser',\r
@@ -294,7 +294,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
 \r
     def InfProtocolParser(self, SectionString, InfSectionObject, FileName):\r
         #\r
-        # Macro defined in this section \r
+        # Macro defined in this section\r
         #\r
         SectionMacros = {}\r
         ValueList = []\r
@@ -345,7 +345,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
 \r
                 #\r
                 # Replace with Local section Macro and [Defines] section Macro.\r
-                #            \r
+                #\r
                 ValueList = [InfExpandMacro(Value, (FileName, LineContent, LineNo), self.FileLocalMacros, SectionMacros)\r
                             for Value in ValueList]\r
 \r
@@ -359,7 +359,7 @@ class InfGuidPpiProtocolSectionParser(InfParserSectionRoot):
 \r
         #\r
         # Current section archs\r
-        #    \r
+        #\r
         ArchList = []\r
         LineIndex = -1\r
         for Item in self.LastSectionHeaderContent:\r
index 549e67f08d64fbef15c6c81d4a67b771d55bacd7..1a7014436f81e024bc774671f57b5c218f7b3c43 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-# This file contained the parser for [Libraries] sections in INF file \r
+# This file contained the parser for [Libraries] sections in INF file\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -34,14 +34,14 @@ from Parser.InfParserMisc import InfParserSectionRoot
 class InfLibrarySectionParser(InfParserSectionRoot):\r
     ## InfLibraryParser\r
     #\r
-    #                 \r
+    #\r
     def InfLibraryParser(self, SectionString, InfSectionObject, FileName):\r
         #\r
         # For Common INF file\r
         #\r
         if not GlobalData.gIS_BINARY_INF:\r
             #\r
-            # Macro defined in this section \r
+            # Macro defined in this section\r
             #\r
             SectionMacros = {}\r
             ValueList = []\r
@@ -60,7 +60,7 @@ class InfLibrarySectionParser(InfParserSectionRoot):
                     continue\r
 \r
                 #\r
-                # Found Header Comments \r
+                # Found Header Comments\r
                 #\r
                 if LibLineContent.strip().startswith(DT.TAB_COMMENT_SPLIT):\r
                     #\r
@@ -70,7 +70,7 @@ class InfLibrarySectionParser(InfParserSectionRoot):
                         LibHeaderComments.append(Line)\r
                         continue\r
                     #\r
-                    # First time encounter comment \r
+                    # First time encounter comment\r
                     #\r
                     else:\r
                         #\r
@@ -118,7 +118,7 @@ class InfLibrarySectionParser(InfParserSectionRoot):
 \r
                 #\r
                 # Replace with Local section Macro and [Defines] section Macro.\r
-                #            \r
+                #\r
                 ValueList = [InfExpandMacro(Value, (FileName, LibLineContent, LibLineNo),\r
                                             self.FileLocalMacros, SectionMacros, True)\r
                                             for Value in ValueList]\r
@@ -134,7 +134,7 @@ class InfLibrarySectionParser(InfParserSectionRoot):
 \r
             #\r
             # Current section archs\r
-            #    \r
+            #\r
             KeyList = []\r
             for Item in self.LastSectionHeaderContent:\r
                 if (Item[1], Item[2]) not in KeyList:\r
@@ -188,7 +188,7 @@ class InfLibrarySectionParser(InfParserSectionRoot):
 \r
         #\r
         # Current section archs\r
-        #    \r
+        #\r
         KeyList = []\r
         Item = ['', '', '']\r
         for Item in self.LastSectionHeaderContent:\r
index 8fb2898826e6fff6d71a0339c8fd3e2d9876ec72..0ddd4ef0fc0b21499f204f6da34ed03f71c2a6e3 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-# This file contained the parser for [Packages] sections in INF file \r
+# This file contained the parser for [Packages] sections in INF file\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -31,29 +31,29 @@ from Parser.InfParserMisc import InfParserSectionRoot
 class InfPackageSectionParser(InfParserSectionRoot):\r
     ## InfPackageParser\r
     #\r
-    #                       \r
+    #\r
     def InfPackageParser(self, SectionString, InfSectionObject, FileName):\r
         #\r
-        # Macro defined in this section \r
+        # Macro defined in this section\r
         #\r
         SectionMacros = {}\r
         ValueList     = []\r
         PackageList   = []\r
         StillCommentFalg  = False\r
         HeaderComments    = []\r
-        LineComment       = None                  \r
+        LineComment       = None\r
         #\r
         # Parse section content\r
         #\r
         for Line in SectionString:\r
             PkgLineContent = Line[0]\r
-            PkgLineNo      = Line[1]  \r
-            \r
+            PkgLineNo      = Line[1]\r
+\r
             if PkgLineContent.strip() == '':\r
                 continue\r
-            \r
+\r
             #\r
-            # Find Header Comments \r
+            # Find Header Comments\r
             #\r
             if PkgLineContent.strip().startswith(DT.TAB_COMMENT_SPLIT):\r
                 #\r
@@ -63,7 +63,7 @@ class InfPackageSectionParser(InfParserSectionRoot):
                     HeaderComments.append(Line)\r
                     continue\r
                 #\r
-                # First time encounter comment \r
+                # First time encounter comment\r
                 #\r
                 else:\r
                     #\r
@@ -75,14 +75,14 @@ class InfPackageSectionParser(InfParserSectionRoot):
                     continue\r
             else:\r
                 StillCommentFalg = False\r
-                          \r
+\r
             if len(HeaderComments) >= 1:\r
                 LineComment = InfLineCommentObject()\r
                 LineCommentContent = ''\r
                 for Item in HeaderComments:\r
                     LineCommentContent += Item[0] + DT.END_OF_LINE\r
                 LineComment.SetHeaderComments(LineCommentContent)\r
-            \r
+\r
             #\r
             # Find Tail comment.\r
             #\r
@@ -91,7 +91,7 @@ class InfPackageSectionParser(InfParserSectionRoot):
                 PkgLineContent = PkgLineContent[:PkgLineContent.find(DT.TAB_COMMENT_SPLIT)]\r
                 if LineComment is None:\r
                     LineComment = InfLineCommentObject()\r
-                LineComment.SetTailComments(TailComments)                   \r
+                LineComment.SetTailComments(TailComments)\r
             #\r
             # Find Macro\r
             #\r
@@ -102,39 +102,39 @@ class InfPackageSectionParser(InfParserSectionRoot):
             if Name is not None:\r
                 SectionMacros[Name] = Value\r
                 LineComment = None\r
-                HeaderComments = []                \r
+                HeaderComments = []\r
                 continue\r
 \r
             TokenList = GetSplitValueList(PkgLineContent, DT.TAB_VALUE_SPLIT, 1)\r
             ValueList[0:len(TokenList)] = TokenList\r
-            \r
+\r
             #\r
             # Replace with Local section Macro and [Defines] section Macro.\r
-            #            \r
-            ValueList = [InfExpandMacro(Value, (FileName, PkgLineContent, PkgLineNo), \r
+            #\r
+            ValueList = [InfExpandMacro(Value, (FileName, PkgLineContent, PkgLineNo),\r
                                         self.FileLocalMacros, SectionMacros, True)\r
                                         for Value in ValueList]\r
-            \r
-            PackageList.append((ValueList, LineComment, \r
+\r
+            PackageList.append((ValueList, LineComment,\r
                                 (PkgLineContent, PkgLineNo, FileName)))\r
             ValueList = []\r
             LineComment = None\r
             TailComments = ''\r
-            HeaderComments = []            \r
+            HeaderComments = []\r
             continue\r
 \r
         #\r
         # Current section archs\r
-        #    \r
+        #\r
         ArchList = []\r
         for Item in self.LastSectionHeaderContent:\r
             if Item[1] not in ArchList:\r
-                ArchList.append(Item[1])  \r
-        \r
+                ArchList.append(Item[1])\r
+\r
         if not InfSectionObject.SetPackages(PackageList, Arch = ArchList):\r
-            Logger.Error('InfParser', \r
-                         FORMAT_INVALID, \r
+            Logger.Error('InfParser',\r
+                         FORMAT_INVALID,\r
                          ST.ERR_INF_PARSER_MODULE_SECTION_TYPE_ERROR\\r
                          %("[Packages]"),\r
                          File=FileName,\r
-                         Line=Item[3])         
\ No newline at end of file
+                         Line=Item[3])\r
index e6048a1d1ca9768f220f363f03f69b51a7cd1d0c..cd99262e036249ffa1c68044ffd4bd15f8472e1b 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -49,24 +49,24 @@ from Parser.InfParserMisc import IsBinaryInf
 #\r
 def OpenInfFile(Filename):\r
     FileLinesList = []\r
-    \r
+\r
     try:\r
         FInputfile = open(Filename, "rb", 0)\r
         try:\r
             FileLinesList = FInputfile.readlines()\r
         except BaseException:\r
-            Logger.Error("InfParser", \r
-                         FILE_READ_FAILURE, \r
+            Logger.Error("InfParser",\r
+                         FILE_READ_FAILURE,\r
                          ST.ERR_FILE_OPEN_FAILURE,\r
                          File=Filename)\r
         finally:\r
             FInputfile.close()\r
     except BaseException:\r
-        Logger.Error("InfParser", \r
-                     FILE_READ_FAILURE, \r
+        Logger.Error("InfParser",\r
+                     FILE_READ_FAILURE,\r
                      ST.ERR_FILE_OPEN_FAILURE,\r
                      File=Filename)\r
-        \r
+\r
     return FileLinesList\r
 \r
 ## InfParser\r
@@ -74,20 +74,20 @@ def OpenInfFile(Filename):
 # This class defined the structure used in InfParser object\r
 #\r
 # @param InfObject:         Inherited from InfSectionParser class\r
-# @param Filename:          Input value for Filename of INF file, default is \r
+# @param Filename:          Input value for Filename of INF file, default is\r
 #                           None\r
-# @param WorkspaceDir:      Input value for current workspace directory, \r
+# @param WorkspaceDir:      Input value for current workspace directory,\r
 #                           default is None\r
 #\r
 class InfParser(InfSectionParser):\r
 \r
     def __init__(self, Filename = None, WorkspaceDir = None):\r
-        \r
+\r
         #\r
         # Call parent class construct function\r
         #\r
         super(InfParser, self).__init__()\r
-        \r
+\r
         self.WorkspaceDir    = WorkspaceDir\r
         self.SupArchList     = DT.ARCH_LIST\r
         self.EventList    = []\r
@@ -107,7 +107,7 @@ class InfParser(InfSectionParser):
     # @param Filename:  Input value for filename of INF file\r
     #\r
     def ParseInfFile(self, Filename):\r
-        \r
+\r
         Filename = NormPath(Filename)\r
         (Path, Name) = os.path.split(Filename)\r
         self.FullPath = Filename\r
@@ -120,30 +120,30 @@ class InfParser(InfSectionParser):
         # Initialize common data\r
         #\r
         LineNo             = 0\r
-        CurrentSection     = DT.MODEL_UNKNOWN \r
+        CurrentSection     = DT.MODEL_UNKNOWN\r
         SectionLines       = []\r
-        \r
+\r
         #\r
         # Flags\r
         #\r
-        HeaderCommentStart = False \r
+        HeaderCommentStart = False\r
         HeaderCommentEnd   = False\r
         HeaderStarLineNo = -1\r
-        BinaryHeaderCommentStart = False \r
+        BinaryHeaderCommentStart = False\r
         BinaryHeaderCommentEnd   = False\r
         BinaryHeaderStarLineNo = -1\r
-        \r
+\r
         #\r
         # While Section ends. parse whole section contents.\r
         #\r
         NewSectionStartFlag = False\r
         FirstSectionStartFlag = False\r
-        \r
+\r
         #\r
         # Parse file content\r
         #\r
         CommentBlock       = []\r
\r
+\r
         #\r
         # Variables for Event/Hob/BootMode\r
         #\r
@@ -151,44 +151,44 @@ class InfParser(InfSectionParser):
         self.HobList      = []\r
         self.BootModeList = []\r
         SectionType = ''\r
-        \r
+\r
         FileLinesList = OpenInfFile (Filename)\r
-        \r
+\r
         #\r
         # One INF file can only has one [Defines] section.\r
         #\r
         DefineSectionParsedFlag = False\r
-        \r
+\r
         #\r
         # Convert special characters in lines to space character.\r
         #\r
         FileLinesList = ConvertSpecialChar(FileLinesList)\r
-        \r
+\r
         #\r
         # Process Line Extender\r
         #\r
         FileLinesList = ProcessLineExtender(FileLinesList)\r
-        \r
+\r
         #\r
         # Process EdkI INF style comment if found\r
         #\r
         OrigLines = [Line for Line in FileLinesList]\r
         FileLinesList, EdkCommentStartPos = ProcessEdkComment(FileLinesList)\r
-        \r
+\r
         #\r
         # Judge whether the INF file is Binary INF or not\r
         #\r
         if IsBinaryInf(FileLinesList):\r
             GlobalData.gIS_BINARY_INF = True\r
-            \r
+\r
         InfSectionCommonDefObj = None\r
-        \r
+\r
         for Line in FileLinesList:\r
             LineNo   = LineNo + 1\r
             Line     = Line.strip()\r
             if (LineNo < len(FileLinesList) - 1):\r
                 NextLine = FileLinesList[LineNo].strip()\r
-            \r
+\r
             #\r
             # blank line\r
             #\r
@@ -209,7 +209,7 @@ class InfParser(InfSectionParser):
                 HeaderStarLineNo = LineNo\r
                 SectionLines.append((Line, LineNo))\r
                 HeaderCommentStart = True\r
-                continue        \r
+                continue\r
 \r
             #\r
             # Collect Header content.\r
@@ -225,11 +225,11 @@ class InfParser(InfSectionParser):
             if (Line.startswith(DT.TAB_SPECIAL_COMMENT) or not Line.strip().startswith("#")) and HeaderCommentStart \\r
                 and not HeaderCommentEnd:\r
                 HeaderCommentEnd = True\r
-                BinaryHeaderCommentStart = False \r
+                BinaryHeaderCommentStart = False\r
                 BinaryHeaderCommentEnd   = False\r
-                HeaderCommentStart = False      \r
+                HeaderCommentStart = False\r
                 if Line.find(DT.TAB_BINARY_HEADER_COMMENT) > -1:\r
-                    self.InfHeaderParser(SectionLines, self.InfHeader, self.FileName) \r
+                    self.InfHeaderParser(SectionLines, self.InfHeader, self.FileName)\r
                     SectionLines = []\r
                 else:\r
                     SectionLines.append((Line, LineNo))\r
@@ -255,8 +255,8 @@ class InfParser(InfSectionParser):
                 SectionLines.append((Line, LineNo))\r
                 BinaryHeaderCommentStart = True\r
                 HeaderCommentEnd = True\r
-                continue   \r
-            \r
+                continue\r
+\r
             #\r
             # check whether there are more than one binary header exist\r
             #\r
@@ -266,7 +266,7 @@ class InfParser(InfSectionParser):
                              FORMAT_INVALID,\r
                              ST.ERR_MULTIPLE_BINARYHEADER_EXIST,\r
                              File=Filename)\r
-            \r
+\r
             #\r
             # Collect Binary Header content.\r
             #\r
@@ -287,17 +287,17 @@ class InfParser(InfSectionParser):
                 #\r
                 self.InfHeaderParser(SectionLines, self.InfBinaryHeader, self.FileName, True)\r
                 SectionLines = []\r
-                BinaryHeaderCommentEnd   = True               \r
-                continue                   \r
+                BinaryHeaderCommentEnd   = True\r
+                continue\r
             #\r
             # Find a new section tab\r
-            # Or at the last line of INF file, \r
+            # Or at the last line of INF file,\r
             # need to process the last section.\r
             #\r
             LastSectionFalg = False\r
             if LineNo == len(FileLinesList):\r
                 LastSectionFalg = True\r
-                             \r
+\r
             if Line.startswith(DT.TAB_COMMENT_SPLIT) and not Line.startswith(DT.TAB_SPECIAL_COMMENT):\r
                 SectionLines.append((Line, LineNo))\r
                 if not LastSectionFalg:\r
@@ -307,23 +307,23 @@ class InfParser(InfSectionParser):
             # Encountered a section. start with '[' and end with ']'\r
             #\r
             if (Line.startswith(DT.TAB_SECTION_START) and \\r
-               Line.find(DT.TAB_SECTION_END) > -1) or LastSectionFalg:   \r
-                \r
-                HeaderCommentEnd = True        \r
-                BinaryHeaderCommentEnd = True       \r
-                \r
+               Line.find(DT.TAB_SECTION_END) > -1) or LastSectionFalg:\r
+\r
+                HeaderCommentEnd = True\r
+                BinaryHeaderCommentEnd = True\r
+\r
                 if not LastSectionFalg:\r
                     #\r
                     # check to prevent '#' inside section header\r
                     #\r
                     HeaderContent = Line[1:Line.find(DT.TAB_SECTION_END)]\r
                     if HeaderContent.find(DT.TAB_COMMENT_SPLIT) != -1:\r
-                        Logger.Error("InfParser", \r
+                        Logger.Error("InfParser",\r
                                      FORMAT_INVALID,\r
                                      ST.ERR_INF_PARSER_DEFINE_SECTION_HEADER_INVALID,\r
                                      File=self.FullPath,\r
-                                     Line=LineNo, \r
-                                     ExtraData=Line)                        \r
+                                     Line=LineNo,\r
+                                     ExtraData=Line)\r
 \r
                     #\r
                     # Keep last time section header content for section parser\r
@@ -339,7 +339,7 @@ class InfParser(InfSectionParser):
                     if  CommentIndex > -1:\r
                         TailComments = Line[CommentIndex:]\r
                         Line = Line[:CommentIndex]\r
-                    \r
+\r
                     InfSectionCommonDefObj = InfSectionCommonDef()\r
                     if TailComments != '':\r
                         InfSectionCommonDefObj.SetTailComments(TailComments)\r
@@ -350,8 +350,8 @@ class InfParser(InfSectionParser):
                     # Call section parser before section header parer to avoid encounter EDKI INF file\r
                     #\r
                     if CurrentSection == DT.MODEL_META_DATA_DEFINE:\r
-                        DefineSectionParsedFlag = self._CallSectionParsers(CurrentSection, \r
-                                                                   DefineSectionParsedFlag, SectionLines, \r
+                        DefineSectionParsedFlag = self._CallSectionParsers(CurrentSection,\r
+                                                                   DefineSectionParsedFlag, SectionLines,\r
                                                                    InfSectionCommonDefObj, LineNo)\r
                     #\r
                     # Compare the new section name with current\r
@@ -377,52 +377,52 @@ class InfParser(InfSectionParser):
             #\r
             # End of section content collect.\r
             # Parser the section content collected previously.\r
-            #  \r
+            #\r
             if NewSectionStartFlag or LastSectionFalg:\r
                 if CurrentSection != DT.MODEL_META_DATA_DEFINE or \\r
-                    (LastSectionFalg and CurrentSection == DT.MODEL_META_DATA_DEFINE):     \r
-                    DefineSectionParsedFlag = self._CallSectionParsers(CurrentSection, \r
-                                                                       DefineSectionParsedFlag, SectionLines, \r
+                    (LastSectionFalg and CurrentSection == DT.MODEL_META_DATA_DEFINE):\r
+                    DefineSectionParsedFlag = self._CallSectionParsers(CurrentSection,\r
+                                                                       DefineSectionParsedFlag, SectionLines,\r
                                                                        InfSectionCommonDefObj, LineNo)\r
-                \r
+\r
                 CurrentSection = SectionType\r
                 #\r
                 # Clear section lines\r
                 #\r
-                SectionLines = []                                             \r
-        \r
+                SectionLines = []\r
+\r
         if HeaderStarLineNo == -1:\r
-            Logger.Error("InfParser", \r
+            Logger.Error("InfParser",\r
                         FORMAT_INVALID,\r
                         ST.ERR_NO_SOURCE_HEADER,\r
-                        File=self.FullPath) \r
+                        File=self.FullPath)\r
         if BinaryHeaderStarLineNo > -1 and HeaderStarLineNo > -1  and HeaderStarLineNo > BinaryHeaderStarLineNo:\r
-            Logger.Error("InfParser", \r
+            Logger.Error("InfParser",\r
                         FORMAT_INVALID,\r
                         ST.ERR_BINARY_HEADER_ORDER,\r
-                        File=self.FullPath)         \r
+                        File=self.FullPath)\r
         #\r
         # EDKII INF should not have EDKI style comment\r
         #\r
         if EdkCommentStartPos != -1:\r
-            Logger.Error("InfParser", \r
-                         FORMAT_INVALID, \r
-                         ST.ERR_INF_PARSER_EDKI_COMMENT_IN_EDKII, \r
+            Logger.Error("InfParser",\r
+                         FORMAT_INVALID,\r
+                         ST.ERR_INF_PARSER_EDKI_COMMENT_IN_EDKII,\r
                          File=self.FullPath,\r
                          Line=EdkCommentStartPos + 1,\r
                          ExtraData=OrigLines[EdkCommentStartPos])\r
-        \r
+\r
+        #\r
+        # extract [Event] [Hob] [BootMode] sections\r
         #\r
-        # extract [Event] [Hob] [BootMode] sections \r
-        #            \r
         self._ExtractEventHobBootMod(FileLinesList)\r
-    \r
+\r
     ## _CheckSectionHeaders\r
     #\r
     #\r
     def _CheckSectionHeaders(self, Line, LineNo):\r
         if len(self.SectionHeaderContent) == 0:\r
-            Logger.Error("InfParser", \r
+            Logger.Error("InfParser",\r
                          FORMAT_INVALID,\r
                          ST.ERR_INF_PARSER_DEFINE_SECTION_HEADER_INVALID,\r
                          File=self.FullPath,\r
@@ -431,7 +431,7 @@ class InfParser(InfSectionParser):
             for SectionItem in self.SectionHeaderContent:\r
                 ArchList = []\r
                 #\r
-                # Not cover Depex/UserExtension section header \r
+                # Not cover Depex/UserExtension section header\r
                 # check.\r
                 #\r
                 if SectionItem[0].strip().upper() == DT.TAB_INF_FIXED_PCD.upper() or \\r
@@ -442,15 +442,15 @@ class InfParser(InfSectionParser):
                     ArchList = GetSplitValueList(SectionItem[1].strip(), ' ')\r
                 else:\r
                     ArchList = [SectionItem[1].strip()]\r
-                    \r
+\r
                 for Arch in ArchList:\r
                     if (not IsValidArch(Arch)) and \\r
                         (SectionItem[0].strip().upper() != DT.TAB_DEPEX.upper()) and \\r
                         (SectionItem[0].strip().upper() != DT.TAB_USER_EXTENSIONS.upper()) and \\r
                         (SectionItem[0].strip().upper() != DT.TAB_COMMON_DEFINES.upper()):\r
-                        Logger.Error("InfParser", \r
+                        Logger.Error("InfParser",\r
                                      FORMAT_INVALID,\r
-                                     ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(SectionItem[1]), \r
+                                     ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(SectionItem[1]),\r
                                      File=self.FullPath,\r
                                      Line=LineNo, ExtraData=Line)\r
                 #\r
@@ -467,11 +467,11 @@ class InfParser(InfSectionParser):
                                          ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID%(SectionItem[2]),\r
                                          File=self.FullPath, Line=LineNo,\r
                                          ExtraData=Line)\r
-                              \r
+\r
     ## _CallSectionParsers\r
     #\r
     #\r
-    def _CallSectionParsers(self, CurrentSection, DefineSectionParsedFlag, \r
+    def _CallSectionParsers(self, CurrentSection, DefineSectionParsedFlag,\r
                             SectionLines, InfSectionCommonDefObj, LineNo):\r
         if CurrentSection == DT.MODEL_META_DATA_DEFINE:\r
             if not DefineSectionParsedFlag:\r
@@ -481,22 +481,22 @@ class InfParser(InfSectionParser):
                                      InfSectionCommonDefObj)\r
                 DefineSectionParsedFlag = True\r
             else:\r
-                Logger.Error("Parser", \r
-                             PARSER_ERROR, \r
-                             ST.ERR_INF_PARSER_MULTI_DEFINE_SECTION, \r
-                             File=self.FullPath, \r
+                Logger.Error("Parser",\r
+                             PARSER_ERROR,\r
+                             ST.ERR_INF_PARSER_MULTI_DEFINE_SECTION,\r
+                             File=self.FullPath,\r
                              RaiseError = Logger.IS_RAISE_ERROR)\r
-            \r
+\r
         elif CurrentSection == DT.MODEL_META_DATA_BUILD_OPTION:\r
             self.InfBuildOptionParser(SectionLines,\r
                                       self.InfBuildOptionSection,\r
                                       self.FullPath)\r
-            \r
+\r
         elif CurrentSection == DT.MODEL_EFI_LIBRARY_CLASS:\r
             self.InfLibraryParser(SectionLines,\r
                                   self.InfLibraryClassSection,\r
                                   self.FullPath)\r
-            \r
+\r
         elif CurrentSection == DT.MODEL_META_DATA_PACKAGE:\r
             self.InfPackageParser(SectionLines,\r
                                   self.InfPackageSection,\r
@@ -512,37 +512,37 @@ class InfParser(InfSectionParser):
             self.InfPcdParser(SectionLines,\r
                               self.InfPcdSection,\r
                               self.FullPath)\r
-            \r
+\r
         elif CurrentSection == DT.MODEL_EFI_SOURCE_FILE:\r
             self.InfSourceParser(SectionLines,\r
                                  self.InfSourcesSection,\r
                                  self.FullPath)\r
-            \r
+\r
         elif CurrentSection == DT.MODEL_META_DATA_USER_EXTENSION:\r
             self.InfUserExtensionParser(SectionLines,\r
                                         self.InfUserExtensionSection,\r
                                         self.FullPath)\r
-            \r
+\r
         elif CurrentSection == DT.MODEL_EFI_PROTOCOL:\r
             self.InfProtocolParser(SectionLines,\r
                                    self.InfProtocolSection,\r
                                    self.FullPath)\r
-            \r
+\r
         elif CurrentSection == DT.MODEL_EFI_PPI:\r
             self.InfPpiParser(SectionLines,\r
                               self.InfPpiSection,\r
                               self.FullPath)\r
-            \r
+\r
         elif CurrentSection == DT.MODEL_EFI_GUID:\r
             self.InfGuidParser(SectionLines,\r
                                self.InfGuidSection,\r
                                self.FullPath)\r
-            \r
+\r
         elif CurrentSection == DT.MODEL_EFI_DEPEX:\r
             self.InfDepexParser(SectionLines,\r
                                 self.InfDepexSection,\r
                                 self.FullPath)\r
-            \r
+\r
         elif CurrentSection == DT.MODEL_EFI_BINARY_FILE:\r
             self.InfBinaryParser(SectionLines,\r
                                  self.InfBinariesSection,\r
@@ -552,20 +552,20 @@ class InfParser(InfSectionParser):
         #\r
         else:\r
             if len(self.SectionHeaderContent) >= 1:\r
-                Logger.Error("Parser", \r
-                             PARSER_ERROR, \r
-                             ST.ERR_INF_PARSER_UNKNOWN_SECTION, \r
-                             File=self.FullPath, Line=LineNo, \r
+                Logger.Error("Parser",\r
+                             PARSER_ERROR,\r
+                             ST.ERR_INF_PARSER_UNKNOWN_SECTION,\r
+                             File=self.FullPath, Line=LineNo,\r
                              RaiseError = Logger.IS_RAISE_ERROR)\r
             else:\r
-                Logger.Error("Parser", \r
-                             PARSER_ERROR, \r
-                             ST.ERR_INF_PARSER_NO_SECTION_ERROR, \r
-                             File=self.FullPath, Line=LineNo, \r
+                Logger.Error("Parser",\r
+                             PARSER_ERROR,\r
+                             ST.ERR_INF_PARSER_NO_SECTION_ERROR,\r
+                             File=self.FullPath, Line=LineNo,\r
                              RaiseError = Logger.IS_RAISE_ERROR)\r
-                \r
-        return DefineSectionParsedFlag   \r
-        \r
+\r
+        return DefineSectionParsedFlag\r
+\r
     def _ExtractEventHobBootMod(self, FileLinesList):\r
         SpecialSectionStart = False\r
         CheckLocation = False\r
@@ -607,43 +607,43 @@ class InfParser(InfSectionParser):
                     elif not Line:\r
                         SpecialSectionStart = False\r
                         CheckLocation = True\r
-                        Element = []                        \r
+                        Element = []\r
                     else:\r
                         if not Line.startswith(DT.TAB_COMMENT_SPLIT):\r
-                            Logger.Warn("Parser", \r
-                                         ST.WARN_SPECIAL_SECTION_LOCATION_WRONG, \r
+                            Logger.Warn("Parser",\r
+                                         ST.WARN_SPECIAL_SECTION_LOCATION_WRONG,\r
                                          File=self.FullPath, Line=LineNum)\r
                             SpecialSectionStart = False\r
                             CheckLocation = False\r
                             Element = []\r
                         else:\r
-                            Element.append([Line, LineNum]) \r
+                            Element.append([Line, LineNum])\r
                 else:\r
                     if CheckLocation:\r
                         if MatchObject:\r
                             CheckLocation = False\r
                         elif Line:\r
-                            Logger.Warn("Parser", \r
-                                         ST.WARN_SPECIAL_SECTION_LOCATION_WRONG, \r
-                                         File=self.FullPath, Line=LineNum)    \r
+                            Logger.Warn("Parser",\r
+                                         ST.WARN_SPECIAL_SECTION_LOCATION_WRONG,\r
+                                         File=self.FullPath, Line=LineNum)\r
                             CheckLocation = False\r
-                    \r
+\r
         if len(self.BootModeList) >= 1:\r
-            self.InfSpecialCommentParser(self.BootModeList, \r
-                                         self.InfSpecialCommentSection, \r
-                                         self.FileName, \r
+            self.InfSpecialCommentParser(self.BootModeList,\r
+                                         self.InfSpecialCommentSection,\r
+                                         self.FileName,\r
                                          DT.TYPE_BOOTMODE_SECTION)\r
-        \r
+\r
         if len(self.EventList) >= 1:\r
-            self.InfSpecialCommentParser(self.EventList, \r
+            self.InfSpecialCommentParser(self.EventList,\r
                                          self.InfSpecialCommentSection,\r
-                                         self.FileName, \r
+                                         self.FileName,\r
                                          DT.TYPE_EVENT_SECTION)\r
-            \r
+\r
         if len(self.HobList) >= 1:\r
-            self.InfSpecialCommentParser(self.HobList, \r
-                                         self.InfSpecialCommentSection, \r
-                                         self.FileName, \r
+            self.InfSpecialCommentParser(self.HobList,\r
+                                         self.InfSpecialCommentSection,\r
+                                         self.FileName,\r
                                          DT.TYPE_HOB_SECTION)\r
     ## _ProcessLastSection\r
     #\r
@@ -652,35 +652,35 @@ class InfParser(InfSectionParser):
         #\r
         # The last line is a section header. will discard it.\r
         #\r
-        if not (Line.startswith(DT.TAB_SECTION_START) and Line.find(DT.TAB_SECTION_END) > -1):                      \r
+        if not (Line.startswith(DT.TAB_SECTION_START) and Line.find(DT.TAB_SECTION_END) > -1):\r
             SectionLines.append((Line, LineNo))\r
-            \r
+\r
         if len(self.SectionHeaderContent) >= 1:\r
             TemSectionName = self.SectionHeaderContent[0][0].upper()\r
             if TemSectionName.upper() not in gINF_SECTION_DEF.keys():\r
-                Logger.Error("InfParser", \r
-                             FORMAT_INVALID, \r
-                             ST.ERR_INF_PARSER_UNKNOWN_SECTION, \r
-                             File=self.FullPath, \r
-                             Line=LineNo, \r
+                Logger.Error("InfParser",\r
+                             FORMAT_INVALID,\r
+                             ST.ERR_INF_PARSER_UNKNOWN_SECTION,\r
+                             File=self.FullPath,\r
+                             Line=LineNo,\r
                              ExtraData=Line,\r
                              RaiseError = Logger.IS_RAISE_ERROR\r
-                             ) \r
+                             )\r
             else:\r
                 CurrentSection = gINF_SECTION_DEF[TemSectionName]\r
                 self.LastSectionHeaderContent = self.SectionHeaderContent\r
-            \r
+\r
         return SectionLines, CurrentSection\r
 \r
 ## _ConvertSecNameToType\r
 #\r
 #\r
-def _ConvertSecNameToType(SectionName): \r
+def _ConvertSecNameToType(SectionName):\r
     SectionType = ''\r
     if SectionName.upper() not in gINF_SECTION_DEF.keys():\r
-        SectionType = DT.MODEL_UNKNOWN                    \r
+        SectionType = DT.MODEL_UNKNOWN\r
     else:\r
-        SectionType = gINF_SECTION_DEF[SectionName.upper()]  \r
-    \r
-    return SectionType      \r
-        \r
+        SectionType = gINF_SECTION_DEF[SectionName.upper()]\r
+\r
+    return SectionType\r
+\r
index df32225aff039a7cb6bd3dcee7270404499e6ec7..78908fd98429f1bcd25aac15770e3b74b363e7f8 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-# This file contained the miscellaneous functions for INF parser \r
+# This file contained the miscellaneous functions for INF parser\r
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -59,39 +59,39 @@ gINF_SECTION_DEF = {
        #\r
        # EDK1 section\r
        # TAB_NMAKE.upper()            : MODEL_META_DATA_NMAKE\r
-       # \r
+       #\r
        }\r
 \r
 ## InfExpandMacro\r
 #\r
-# Expand MACRO definition with MACROs defined in [Defines] section and specific section. \r
+# Expand MACRO definition with MACROs defined in [Defines] section and specific section.\r
 # The MACROs defined in specific section has high priority and will be expanded firstly.\r
 #\r
 # @param LineInfo      Contain information of FileName, LineContent, LineNo\r
 # @param GlobalMacros  MACROs defined in INF [Defines] section\r
 # @param SectionMacros MACROs defined in INF specific section\r
-# @param Flag          If the flag set to True, need to skip macros in a quoted string \r
+# @param Flag          If the flag set to True, need to skip macros in a quoted string\r
 #\r
 def InfExpandMacro(Content, LineInfo, GlobalMacros=None, SectionMacros=None, Flag=False):\r
     if GlobalMacros is None:\r
         GlobalMacros = {}\r
     if SectionMacros is None:\r
         SectionMacros = {}\r
-    \r
+\r
     FileName = LineInfo[0]\r
     LineContent = LineInfo[1]\r
     LineNo = LineInfo[2]\r
-    \r
+\r
     # Don't expand macros in comments\r
     if LineContent.strip().startswith("#"):\r
         return Content\r
 \r
     NewLineInfo = (FileName, LineNo, LineContent)\r
-    \r
+\r
     #\r
     # First, replace MARCOs with value defined in specific section\r
     #\r
-    Content = ReplaceMacro (Content, \r
+    Content = ReplaceMacro (Content,\r
                             SectionMacros,\r
                             False,\r
                             (LineContent, LineNo),\r
@@ -100,13 +100,13 @@ def InfExpandMacro(Content, LineInfo, GlobalMacros=None, SectionMacros=None, Fla
     #\r
     # Then replace MARCOs with value defined in [Defines] section\r
     #\r
-    Content = ReplaceMacro (Content, \r
+    Content = ReplaceMacro (Content,\r
                             GlobalMacros,\r
                             False,\r
                             (LineContent, LineNo),\r
                             FileName,\r
                             Flag)\r
-    \r
+\r
     MacroUsed = gMACRO_PATTERN.findall(Content)\r
     #\r
     # no macro found in String, stop replacing\r
@@ -122,9 +122,9 @@ def InfExpandMacro(Content, LineInfo, GlobalMacros=None, SectionMacros=None, Fla
                 #\r
                 ErrorInInf (ERR_MARCO_DEFINITION_MISS_ERROR,\r
                             LineInfo=NewLineInfo)\r
-        \r
+\r
     return Content\r
-    \r
+\r
 \r
 ## IsBinaryInf\r
 #\r
@@ -135,25 +135,25 @@ def InfExpandMacro(Content, LineInfo, GlobalMacros=None, SectionMacros=None, Fla
 def IsBinaryInf(FileLineList):\r
     if not FileLineList:\r
         return False\r
-    \r
+\r
     ReIsSourcesSection = re.compile("^\s*\[Sources.*\]\s.*$", re.IGNORECASE)\r
     ReIsBinarySection = re.compile("^\s*\[Binaries.*\]\s.*$", re.IGNORECASE)\r
     BinarySectionFoundFlag = False\r
-    \r
+\r
     for Line in FileLineList:\r
         if ReIsSourcesSection.match(Line):\r
             return False\r
         if ReIsBinarySection.match(Line):\r
             BinarySectionFoundFlag = True\r
-            \r
+\r
     if BinarySectionFoundFlag:\r
         return True\r
-    \r
+\r
     return False\r
-    \r
-    \r
+\r
+\r
 ## IsLibInstanceInfo\r
-# \r
+#\r
 # Judge whether the string contain the information of ## @LIB_INSTANCES.\r
 #\r
 # @param  String\r
@@ -166,10 +166,10 @@ def IsLibInstanceInfo(String):
         return True\r
     else:\r
         return False\r
-       \r
-            \r
+\r
+\r
 ## IsAsBuildOptionInfo\r
-# \r
+#\r
 # Judge whether the string contain the information of ## @ASBUILD.\r
 #\r
 # @param  String\r
@@ -181,8 +181,8 @@ def IsAsBuildOptionInfo(String):
     if ReIsAsBuildInstance.match(String):\r
         return True\r
     else:\r
-        return False            \r
-        \r
+        return False\r
+\r
 \r
 class InfParserSectionRoot(object):\r
     def __init__(self):\r
@@ -190,19 +190,19 @@ class InfParserSectionRoot(object):
         # Macros defined in [Define] section are file scope global\r
         #\r
         self.FileLocalMacros = {}\r
-        \r
+\r
         #\r
-        # Current Section Header content. \r
+        # Current Section Header content.\r
         #\r
         self.SectionHeaderContent = []\r
 \r
         #\r
-        # Last time Section Header content. \r
+        # Last time Section Header content.\r
         #\r
-        self.LastSectionHeaderContent = []        \r
-         \r
+        self.LastSectionHeaderContent = []\r
+\r
         self.FullPath = ''\r
-        \r
+\r
         self.InfDefSection              = None\r
         self.InfBuildOptionSection      = None\r
         self.InfLibraryClassSection     = None\r
@@ -219,4 +219,4 @@ class InfParserSectionRoot(object):
         self.InfSmmDepexSection         = None\r
         self.InfBinariesSection         = None\r
         self.InfHeader                  = None\r
-        self.InfSpecialCommentSection   = None              \r
+        self.InfSpecialCommentSection   = None\r
index 13535a3738eabf9f115fbb724f69b2d954385c64..b741616c3da66945743f1f1a54733ce2c623a575 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-# This file contained the parser for [Pcds] sections in INF file \r
+# This file contained the parser for [Pcds] sections in INF file\r
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -31,49 +31,49 @@ from Parser.InfParserMisc import InfParserSectionRoot
 \r
 class InfPcdSectionParser(InfParserSectionRoot):\r
     ## Section PCD related parser\r
-    # \r
+    #\r
     # For 5 types of PCD list below, all use this function.\r
     # 'FixedPcd', 'FeaturePcd', 'PatchPcd', 'Pcd', 'PcdEx'\r
     #\r
-    # This is a INF independent parser, the validation in this parser only \r
+    # This is a INF independent parser, the validation in this parser only\r
     # cover\r
     # INF spec scope, will not cross DEC/DSC to check pcd value\r
     #\r
     def InfPcdParser(self, SectionString, InfSectionObject, FileName):\r
         KeysList = []\r
         PcdList   = []\r
-        CommentsList = []          \r
-        ValueList = [] \r
+        CommentsList = []\r
+        ValueList = []\r
         #\r
         # Current section archs\r
-        #          \r
+        #\r
         LineIndex = -1\r
         for Item in self.LastSectionHeaderContent:\r
             if (Item[0], Item[1], Item[3]) not in KeysList:\r
                 KeysList.append((Item[0], Item[1], Item[3]))\r
                 LineIndex = Item[3]\r
-            \r
+\r
             if (Item[0].upper() == DT.TAB_INF_FIXED_PCD.upper() or \\r
                 Item[0].upper() == DT.TAB_INF_FEATURE_PCD.upper() or \\r
                 Item[0].upper() == DT.TAB_INF_PCD.upper()) and GlobalData.gIS_BINARY_INF:\r
                 Logger.Error('InfParser', FORMAT_INVALID, ST.ERR_ASBUILD_PCD_SECTION_TYPE%("\"" + Item[0] + "\""),\r
-                             File=FileName, Line=LineIndex)                    \r
-                            \r
+                             File=FileName, Line=LineIndex)\r
+\r
         #\r
         # For Common INF file\r
         #\r
-        if not GlobalData.gIS_BINARY_INF:   \r
+        if not GlobalData.gIS_BINARY_INF:\r
             #\r
-            # Macro defined in this section \r
+            # Macro defined in this section\r
             #\r
-            SectionMacros = {}        \r
+            SectionMacros = {}\r
             for Line in SectionString:\r
                 PcdLineContent = Line[0]\r
                 PcdLineNo      = Line[1]\r
                 if PcdLineContent.strip() == '':\r
                     CommentsList = []\r
-                    continue                   \r
-                    \r
+                    continue\r
+\r
                 if PcdLineContent.strip().startswith(DT.TAB_COMMENT_SPLIT):\r
                     CommentsList.append(Line)\r
                     continue\r
@@ -83,10 +83,10 @@ class InfPcdSectionParser(InfParserSectionRoot):
                     #\r
                     if PcdLineContent.find(DT.TAB_COMMENT_SPLIT) > -1:\r
                         CommentsList.append((\r
-                                PcdLineContent[PcdLineContent.find(DT.TAB_COMMENT_SPLIT):], \r
+                                PcdLineContent[PcdLineContent.find(DT.TAB_COMMENT_SPLIT):],\r
                                 PcdLineNo))\r
-                        PcdLineContent = PcdLineContent[:PcdLineContent.find(DT.TAB_COMMENT_SPLIT)] \r
-                \r
+                        PcdLineContent = PcdLineContent[:PcdLineContent.find(DT.TAB_COMMENT_SPLIT)]\r
+\r
                 if PcdLineContent != '':\r
                     #\r
                     # Find Macro\r
@@ -100,23 +100,23 @@ class InfPcdSectionParser(InfParserSectionRoot):
                         ValueList = []\r
                         CommentsList = []\r
                         continue\r
-                    \r
+\r
                     PcdEntryReturn = SplitPcdEntry(PcdLineContent)\r
-                    \r
+\r
                     if not PcdEntryReturn[1]:\r
-                        TokenList = ['']               \r
+                        TokenList = ['']\r
                     else:\r
                         TokenList = PcdEntryReturn[0]\r
-                          \r
+\r
                     ValueList[0:len(TokenList)] = TokenList\r
-                    \r
+\r
                     #\r
                     # Replace with Local section Macro and [Defines] section Macro.\r
-                    #            \r
-                    ValueList = [InfExpandMacro(Value, (FileName, PcdLineContent, PcdLineNo), \r
+                    #\r
+                    ValueList = [InfExpandMacro(Value, (FileName, PcdLineContent, PcdLineNo),\r
                                                 self.FileLocalMacros, SectionMacros, True)\r
                                 for Value in ValueList]\r
-                                   \r
+\r
                 if len(ValueList) >= 1:\r
                     PcdList.append((ValueList, CommentsList, (PcdLineContent, PcdLineNo, FileName)))\r
                     ValueList = []\r
@@ -129,11 +129,11 @@ class InfPcdSectionParser(InfParserSectionRoot):
             for Line in SectionString:\r
                 LineContent = Line[0].strip()\r
                 LineNo      = Line[1]\r
-                \r
+\r
                 if LineContent == '':\r
                     CommentsList = []\r
                     continue\r
-                \r
+\r
                 if LineContent.startswith(DT.TAB_COMMENT_SPLIT):\r
                     CommentsList.append(LineContent)\r
                     continue\r
@@ -144,7 +144,7 @@ class InfPcdSectionParser(InfParserSectionRoot):
                 if  CommentIndex > -1:\r
                     CommentsList.append(LineContent[CommentIndex+1:])\r
                     LineContent = LineContent[:CommentIndex]\r
-                \r
+\r
                 TokenList = GetSplitValueList(LineContent, DT.TAB_VALUE_SPLIT)\r
                 #\r
                 # PatchablePcd\r
@@ -152,33 +152,33 @@ class InfPcdSectionParser(InfParserSectionRoot):
                 #\r
                 if KeysList[0][0].upper() == DT.TAB_INF_PATCH_PCD.upper():\r
                     if len(TokenList) != 3:\r
-                        Logger.Error('InfParser', \r
-                                     FORMAT_INVALID, \r
+                        Logger.Error('InfParser',\r
+                                     FORMAT_INVALID,\r
                                      ST.ERR_ASBUILD_PATCHPCD_FORMAT_INVALID,\r
                                      File=FileName,\r
                                      Line=LineNo,\r
                                      ExtraData=LineContent)\r
-                #                    \r
+                #\r
                 elif KeysList[0][0].upper() == DT.TAB_INF_PCD_EX.upper():\r
                     if len(TokenList) != 1:\r
-                        Logger.Error('InfParser', \r
-                                     FORMAT_INVALID, \r
+                        Logger.Error('InfParser',\r
+                                     FORMAT_INVALID,\r
                                      ST.ERR_ASBUILD_PCDEX_FORMAT_INVALID,\r
                                      File=FileName,\r
                                      Line=LineNo,\r
                                      ExtraData=LineContent)\r
                 ValueList[0:len(TokenList)] = TokenList\r
-                if len(ValueList) >= 1:                \r
-                    PcdList.append((ValueList, CommentsList, (LineContent, LineNo, FileName)))                  \r
+                if len(ValueList) >= 1:\r
+                    PcdList.append((ValueList, CommentsList, (LineContent, LineNo, FileName)))\r
                     ValueList = []\r
                     CommentsList = []\r
-                continue          \r
-                    \r
-        if not InfSectionObject.SetPcds(PcdList, KeysList = KeysList, \r
+                continue\r
+\r
+        if not InfSectionObject.SetPcds(PcdList, KeysList = KeysList,\r
                                         PackageInfo = self.InfPackageSection.GetPackages()):\r
-            Logger.Error('InfParser', \r
-                         FORMAT_INVALID, \r
+            Logger.Error('InfParser',\r
+                         FORMAT_INVALID,\r
                          ST.ERR_INF_PARSER_MODULE_SECTION_TYPE_ERROR%("[PCD]"),\r
                          File=FileName,\r
-                         Line=LineIndex)            \r
-    
\ No newline at end of file
+                         Line=LineIndex)\r
+\r
index 8ba4c3fc0819265a5d11b4abc395322a5ef3051d..1f254058d1332685891585017ae8289dc030bd3f 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-# This file contained the parser for sections in INF file \r
+# This file contained the parser for sections in INF file\r
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -95,7 +95,7 @@ def GetSpecialStr2(ItemList, FileName, LineNo, SectionString):
             if ItemList[3] != '':\r
                 Logger.Error('Parser', FORMAT_INVALID, ST.ERR_INF_PARSER_SOURCE_SECTION_SECTIONNAME_INVALID \\r
                              % (SectionString), File=FileName, Line=LineNo, ExtraData=SectionString)\r
-        \r
+\r
         if not ItemList[0].upper() == DT.TAB_USER_EXTENSIONS.upper():\r
             Str2 = ItemList[2] + ' | ' + ItemList[3]\r
         else:\r
@@ -108,7 +108,7 @@ def GetSpecialStr2(ItemList, FileName, LineNo, SectionString):
     return Str2\r
 \r
 ## ProcessUseExtHeader\r
-# \r
+#\r
 #\r
 def ProcessUseExtHeader(ItemList):\r
     NewItemList = []\r
@@ -138,12 +138,12 @@ def ProcessUseExtHeader(ItemList):
                 NewItemList.append(Item)\r
             else:\r
                 AppendContent = AppendContent + "." + Item\r
-    \r
+\r
     if len(NewItemList) > 4:\r
         return False, []\r
-    \r
+\r
     return True, NewItemList\r
-  \r
+\r
 ## GetArch\r
 #\r
 # GetArch\r
@@ -244,7 +244,7 @@ class InfSectionParser(InfDefinSectionParser,
 \r
         #\r
         # A List for store define section content.\r
-        #    \r
+        #\r
         self._PcdNameList = []\r
         self._SectionName = ''\r
         self._SectionType = 0\r
@@ -253,7 +253,7 @@ class InfSectionParser(InfDefinSectionParser,
 \r
     #\r
     # File Header content parser\r
-    #    \r
+    #\r
     def InfHeaderParser(self, Content, InfHeaderObject2, FileName, IsBinaryHeader = False):\r
         if IsBinaryHeader:\r
             (Abstract, Description, Copyright, License) = ParseHeaderCommentSection(Content, FileName, True)\r
@@ -272,7 +272,7 @@ class InfSectionParser(InfDefinSectionParser,
 \r
         #\r
         # Insert Abstract, Description, CopyRight, License into header object\r
-        #                                \r
+        #\r
         InfHeaderObject2.SetAbstract(Abstract)\r
         InfHeaderObject2.SetDescription(Description)\r
         InfHeaderObject2.SetCopyright(Copyright)\r
@@ -287,7 +287,7 @@ class InfSectionParser(InfDefinSectionParser,
     #\r
     #       [section_name.arch<.platform|module_type>]\r
     #\r
-    # @param String    A string contained the content need to be parsed. \r
+    # @param String    A string contained the content need to be parsed.\r
     #\r
     def SectionHeaderParser(self, SectionString, FileName, LineNo):\r
         _Scope = []\r
@@ -313,7 +313,7 @@ class InfSectionParser(InfDefinSectionParser,
             #\r
             # different section should not mix in one section\r
             # Allow different PCD type sections mixed together\r
-            # \r
+            #\r
             if _SectionName.upper() not in _PcdNameList:\r
                 if _SectionName != '' and _SectionName.upper() != ItemList[0].upper():\r
                     Logger.Error('Parser',\r
@@ -350,7 +350,7 @@ class InfSectionParser(InfDefinSectionParser,
 \r
             #\r
             # For [Defines] section, do special check.\r
-            # \r
+            #\r
             if ItemList[0].upper() == DT.TAB_COMMON_DEFINES.upper():\r
                 if len(ItemList) != 1:\r
                     Logger.Error('Parser',\r
@@ -360,26 +360,26 @@ class InfSectionParser(InfDefinSectionParser,
 \r
             #\r
             # For [UserExtension] section, do special check.\r
-            # \r
+            #\r
             if ItemList[0].upper() == DT.TAB_USER_EXTENSIONS.upper():\r
-            \r
+\r
                 RetValue = ProcessUseExtHeader(ItemList)\r
-                \r
+\r
                 if not RetValue[0]:\r
                     Logger.Error('Parser',\r
                                  FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_DEFINE_FROMAT_INVALID % (SectionString),\r
                                  File=FileName, Line=LineNo, ExtraData=SectionString)\r
                 else:\r
-                    ItemList = RetValue[1]              \r
-                \r
+                    ItemList = RetValue[1]\r
+\r
                 if len(ItemList) == 3:\r
                     ItemList.append('COMMON')\r
-                \r
+\r
                 Str1 = ItemList[1]\r
 \r
             #\r
-            # For Library classes, need to check module type.       \r
+            # For Library classes, need to check module type.\r
             #\r
             if ItemList[0].upper() == DT.TAB_LIBRARY_CLASSES.upper() and len(ItemList) == 3:\r
                 if ItemList[2] != '':\r
@@ -424,10 +424,10 @@ class InfSectionParser(InfDefinSectionParser,
 \r
     ## GenSpecialSectionList\r
     #\r
-    #  @param SpecialSectionList: a list of list, of which item's format \r
+    #  @param SpecialSectionList: a list of list, of which item's format\r
     #                             (Comment, LineNum)\r
     #  @param ContainerFile:      Input value for filename of Inf file\r
-    # \r
+    #\r
     def InfSpecialCommentParser (self, SpecialSectionList, InfSectionObject, ContainerFile, SectionType):\r
         ReFindSpecialCommentRe = re.compile(r"""#(?:\s*)\[(.*?)\](?:.*)""", re.DOTALL)\r
         ReFindHobArchRe = re.compile(r"""[Hh][Oo][Bb]\.([^,]*)""", re.DOTALL)\r
index 645c2c341460a9a54193db20e54de0ceef654a26..6b94394508443886302309f1da20360fad5a065c 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-# This file contained the parser for [Sources] sections in INF file \r
+# This file contained the parser for [Sources] sections in INF file\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -31,7 +31,7 @@ from Parser.InfParserMisc import InfParserSectionRoot
 class InfSourceSectionParser(InfParserSectionRoot):\r
     ## InfSourceParser\r
     #\r
-    #          \r
+    #\r
     def InfSourceParser(self, SectionString, InfSectionObject, FileName):\r
         SectionMacros = {}\r
         ValueList     = []\r
@@ -43,12 +43,12 @@ class InfSourceSectionParser(InfParserSectionRoot):
         for Line in SectionString:\r
             SrcLineContent = Line[0]\r
             SrcLineNo      = Line[1]\r
-            \r
+\r
             if SrcLineContent.strip() == '':\r
                 continue\r
-            \r
+\r
             #\r
-            # Found Header Comments \r
+            # Found Header Comments\r
             #\r
             if SrcLineContent.strip().startswith(DT.TAB_COMMENT_SPLIT):\r
                 #\r
@@ -59,7 +59,7 @@ class InfSourceSectionParser(InfParserSectionRoot):
                     SectionContent += SrcLineContent + DT.END_OF_LINE\r
                     continue\r
                 #\r
-                # First time encounter comment \r
+                # First time encounter comment\r
                 #\r
                 else:\r
                     #\r
@@ -68,18 +68,18 @@ class InfSourceSectionParser(InfParserSectionRoot):
                     HeaderComments = []\r
                     HeaderComments.append(Line)\r
                     StillCommentFalg = True\r
-                    SectionContent += SrcLineContent + DT.END_OF_LINE \r
+                    SectionContent += SrcLineContent + DT.END_OF_LINE\r
                     continue\r
             else:\r
                 StillCommentFalg = False\r
-                          \r
+\r
             if len(HeaderComments) >= 1:\r
                 LineComment = InfLineCommentObject()\r
                 LineCommentContent = ''\r
                 for Item in HeaderComments:\r
                     LineCommentContent += Item[0] + DT.END_OF_LINE\r
                 LineComment.SetHeaderComments(LineCommentContent)\r
-            \r
+\r
             #\r
             # Find Tail comment.\r
             #\r
@@ -89,11 +89,11 @@ class InfSourceSectionParser(InfParserSectionRoot):
                 if LineComment is None:\r
                     LineComment = InfLineCommentObject()\r
                 LineComment.SetTailComments(TailComments)\r
-                               \r
+\r
             #\r
             # Find Macro\r
             #\r
-            Name, Value = MacroParser((SrcLineContent, SrcLineNo), \r
+            Name, Value = MacroParser((SrcLineContent, SrcLineNo),\r
                                       FileName,\r
                                       DT.MODEL_EFI_SOURCE_FILE,\r
                                       self.FileLocalMacros)\r
@@ -102,44 +102,44 @@ class InfSourceSectionParser(InfParserSectionRoot):
                 LineComment = None\r
                 HeaderComments = []\r
                 continue\r
-            \r
+\r
             #\r
             # Replace with Local section Macro and [Defines] section Macro.\r
-            #            \r
-            SrcLineContent = InfExpandMacro(SrcLineContent, \r
-                                         (FileName, SrcLineContent, SrcLineNo), \r
-                                         self.FileLocalMacros, \r
+            #\r
+            SrcLineContent = InfExpandMacro(SrcLineContent,\r
+                                         (FileName, SrcLineContent, SrcLineNo),\r
+                                         self.FileLocalMacros,\r
                                          SectionMacros)\r
 \r
             TokenList = GetSplitValueList(SrcLineContent, DT.TAB_VALUE_SPLIT, 4)\r
             ValueList[0:len(TokenList)] = TokenList\r
-          \r
+\r
             #\r
             # Store section content string after MACRO replaced.\r
             #\r
-            SectionContent += SrcLineContent + DT.END_OF_LINE \r
-            \r
-            SourceList.append((ValueList, LineComment, \r
+            SectionContent += SrcLineContent + DT.END_OF_LINE\r
+\r
+            SourceList.append((ValueList, LineComment,\r
                                (SrcLineContent, SrcLineNo, FileName)))\r
             ValueList = []\r
             LineComment = None\r
             TailComments = ''\r
             HeaderComments = []\r
             continue\r
-        \r
+\r
         #\r
         # Current section archs\r
         #\r
         ArchList = []\r
         for Item in self.LastSectionHeaderContent:\r
             if Item[1] not in ArchList:\r
-                ArchList.append(Item[1])  \r
+                ArchList.append(Item[1])\r
                 InfSectionObject.SetSupArchList(Item[1])\r
-                \r
-        InfSectionObject.SetAllContent(SectionContent)             \r
+\r
+        InfSectionObject.SetAllContent(SectionContent)\r
         if not InfSectionObject.SetSources(SourceList, Arch = ArchList):\r
-            Logger.Error('InfParser', \r
+            Logger.Error('InfParser',\r
                          FORMAT_INVALID,\r
                          ST.ERR_INF_PARSER_MODULE_SECTION_TYPE_ERROR % ("[Sources]"),\r
-                         File=FileName, \r
-                         Line=Item[3])            
\ No newline at end of file
+                         File=FileName,\r
+                         Line=Item[3])\r
index 151f9ed433a091c98cbd06577531ea889b088c29..e98b8a69138cc325cbfbbe674bfe4d15120afcb9 100644 (file)
@@ -4,11 +4,11 @@
 # This file is required to make Python interpreter treat the directory\r
 # as containing package.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,4 +17,4 @@
 \r
 '''\r
 Parser\r
-'''
\ No newline at end of file
+'''\r
index 941dd4a39891c347d549a6c95ac566343d44696c..5dc00affade8e8040d5c35e5f271ba2361f0d70b 100644 (file)
@@ -1,11 +1,11 @@
 ## @file DecPomAlignment.py\r
 # This file contained the adapter for convert INF parser object to POM Object\r
 #\r
-# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -106,17 +106,17 @@ class DecPomAlignment(PackageObject):
         self.DecParser = None\r
         self.UniFileClassObject = None\r
         self.PcdDefaultValueDict = {}\r
-        \r
+\r
         #\r
         # Load Dec file\r
         #\r
         self.LoadDecFile(Filename)\r
-        \r
+\r
         #\r
         # Transfer to Package Object if IsToPackage is True\r
         #\r
         self.DecToPackage()\r
-    \r
+\r
     ## Load Dec file\r
     #\r
     # Load the file if it exists\r
@@ -132,13 +132,13 @@ class DecPomAlignment(PackageObject):
         self.SetFullPath(Filename)\r
         self.SetRelaPath(Path)\r
         self.SetFileName(Name)\r
-        self.SetPackagePath(GetRelativePath(Path, self.WorkspaceDir))   \r
+        self.SetPackagePath(GetRelativePath(Path, self.WorkspaceDir))\r
         self.SetCombinePath(GetRelativePath(Filename, self.WorkspaceDir))\r
-        \r
+\r
         self.DecParser = Dec(Filename)\r
-    \r
+\r
     ## Transfer to Package Object\r
-    # \r
+    #\r
     # Transfer all contents of a Dec file to a standard Package Object\r
     #\r
     def DecToPackage(self):\r
@@ -146,12 +146,12 @@ class DecPomAlignment(PackageObject):
         # Init global information for the file\r
         #\r
         ContainerFile = self.GetFullPath()\r
-        \r
+\r
         #\r
         # Generate Package Header\r
         #\r
         self.GenPackageHeader(ContainerFile)\r
-        \r
+\r
         #\r
         # Generate Includes\r
         #\r
@@ -171,28 +171,28 @@ class DecPomAlignment(PackageObject):
         # Generate Ppis\r
         #\r
         self.GenGuidProtocolPpis(TAB_PPIS, ContainerFile)\r
-        \r
+\r
         #\r
         # Generate LibraryClasses\r
         #\r
         self.GenLibraryClasses(ContainerFile)\r
-        \r
+\r
         #\r
         # Generate Pcds\r
         #\r
         self.GenPcds(ContainerFile)\r
-        \r
+\r
         #\r
-        # Generate Module File list, will be used later on to generate \r
+        # Generate Module File list, will be used later on to generate\r
         # distribution\r
         #\r
         self.GenModuleFileList(ContainerFile)\r
-        \r
+\r
         #\r
         # Generate user extensions\r
         #\r
         self.GenUserExtensions()\r
-        \r
+\r
     ## Generate user extension\r
     #\r
     #\r
@@ -231,7 +231,7 @@ class DecPomAlignment(PackageObject):
             PrivateUserExtension.SetIdentifier(DT.TAB_PRIVATE)\r
             PrivateUserExtension.SetUserID(DT.TAB_INTEL)\r
             self.SetUserExtensionList(self.GetUserExtensionList() + [PrivateUserExtension])\r
-            \r
+\r
     ## Generate miscellaneous files on DEC file\r
     #\r
     #\r
@@ -249,23 +249,23 @@ class DecPomAlignment(PackageObject):
                     FileObj.SetURI(FileName)\r
                     MiscFileObj.SetFileList(MiscFileObj.GetFileList()+[FileObj])\r
                 else:\r
-                    Logger.Error("InfParser", \r
+                    Logger.Error("InfParser",\r
                                  FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_FILE_NOT_EXIST_OR_NAME_INVALID%(Line),\r
                                  File=self.GetFileName(),\r
-                                 ExtraData=Line)   \r
-        self.SetMiscFileList(self.GetMiscFileList()+[MiscFileObj]) \r
-        \r
+                                 ExtraData=Line)\r
+        self.SetMiscFileList(self.GetMiscFileList()+[MiscFileObj])\r
+\r
     ## Generate Package Header\r
     #\r
     # Gen Package Header of Dec as <Key> = <Value>\r
     #\r
-    # @param ContainerFile: The Dec file full path \r
+    # @param ContainerFile: The Dec file full path\r
     #\r
     def GenPackageHeader(self, ContainerFile):\r
         Logger.Debug(2, "Generate PackageHeader ...")\r
         DefinesDict = {}\r
-        \r
+\r
         #\r
         # Update all defines item in database\r
         #\r
@@ -293,12 +293,12 @@ class DecPomAlignment(PackageObject):
             UniFileClassObject([PathClass(os.path.join(DefObj.GetPackagePath(), DefObj.GetPackageUniFile()))])\r
         else:\r
             self.UniFileClassObject = None\r
-     \r
+\r
         if DefinesDict:\r
             UserExtension = UserExtensionObject()\r
             UserExtension.SetDefinesDict(DefinesDict)\r
             UserExtension.SetIdentifier('DefineModifiers')\r
-            UserExtension.SetUserID('EDK2')  \r
+            UserExtension.SetUserID('EDK2')\r
             self.SetUserExtensionList(\r
                 self.GetUserExtensionList() + [UserExtension]\r
             )\r
@@ -321,7 +321,7 @@ class DecPomAlignment(PackageObject):
             self.SetCopyright(('', Copyright))\r
         if License:\r
             self.SetLicense(('', License))\r
-    \r
+\r
         #\r
         # Get Binary header information\r
         #\r
@@ -329,7 +329,7 @@ class DecPomAlignment(PackageObject):
             Abstract, Description, Copyright, License = \\r
                 ParseHeaderCommentSection(self.DecParser.BinaryHeadComment,\r
                                       ContainerFile, True)\r
-                \r
+\r
             if not Abstract  or not Description or not Copyright or not License:\r
                 Logger.Error('MkPkg',\r
                              FORMAT_INVALID,\r
@@ -343,7 +343,7 @@ class DecPomAlignment(PackageObject):
 \r
         BinaryAbstractList = []\r
         BinaryDescriptionList = []\r
-        \r
+\r
         #Get Binary header from UNI file\r
         # Initialize the UniStrDict dictionary, top keys are language codes\r
         UniStrDict = {}\r
@@ -359,7 +359,7 @@ class DecPomAlignment(PackageObject):
                     if StringDefClassObject.StringName == TAB_DEC_BINARY_DESCRIPTION:\r
                         if (Lang, ConvertSpecialUnicodes(StringDefClassObject.StringValue)) \\r
                         not in self.GetBinaryHeaderDescription():\r
-                            BinaryDescriptionList.append((Lang, \r
+                            BinaryDescriptionList.append((Lang,\r
                                                           ConvertSpecialUnicodes(StringDefClassObject.StringValue)))\r
         #Combine Binary header from DEC file and UNI file\r
         BinaryAbstractList = self.GetBinaryHeaderAbstract() + BinaryAbstractList\r
@@ -376,13 +376,13 @@ class DecPomAlignment(PackageObject):
             BinaryUserExtension.SetIdentifier(TAB_BINARY_HEADER_IDENTIFIER)\r
             BinaryUserExtension.SetUserID(TAB_BINARY_HEADER_USERID)\r
             self.SetUserExtensionList(self.GetUserExtensionList() + [BinaryUserExtension])\r
-            \r
-            \r
+\r
+\r
     ## GenIncludes\r
     #\r
     # Gen Includes of Dec\r
-    # \r
-    # @param ContainerFile: The Dec file full path \r
+    #\r
+    # @param ContainerFile: The Dec file full path\r
     #\r
     def GenIncludes(self, ContainerFile):\r
         if ContainerFile:\r
@@ -402,17 +402,17 @@ class DecPomAlignment(PackageObject):
                     IncludesDict[IncludePath] = IncludesDict[IncludePath] + Item.GetArchList()\r
             else:\r
                 IncludesDict[IncludePath] = Item.GetArchList()\r
-                        \r
-        # \r
+\r
+        #\r
         # get the  standardIncludeFileList(industry), packageIncludeFileList\r
-        # (others) for PackageObject  \r
-        # \r
+        # (others) for PackageObject\r
+        #\r
         PackagePath = os.path.split(self.GetFullPath())[0]\r
         IncludePathList = \\r
             sorted([os.path.normpath(Path) + sep for Path in IncludesDict.keys()])\r
-        \r
+\r
         #\r
-        # get a non-overlap set of include path, IncludePathList should be \r
+        # get a non-overlap set of include path, IncludePathList should be\r
         # sorted, and path should be end with path seperator '\'\r
         #\r
         NonOverLapList = []\r
@@ -429,7 +429,7 @@ class DecPomAlignment(PackageObject):
         #\r
         for IndexN in range (0, len(IncludePathList)):\r
             IncludePathList[IndexN] = os.path.normpath(IncludePathList[IndexN])\r
-        IncludePathList.sort()            \r
+        IncludePathList.sort()\r
         IncludePathList.reverse()\r
         #\r
         # save the include path list for later usage\r
@@ -437,7 +437,7 @@ class DecPomAlignment(PackageObject):
         self.SetIncludePathList(IncludePathList)\r
         StandardIncludeFileList = []\r
         PackageIncludeFileList = []\r
-        \r
+\r
         IncludeFileList = []\r
         for Path in NonOverLapList:\r
             FileList = GetFiles(os.path.join(PackagePath, Path), ['CVS', '.svn'], False)\r
@@ -445,9 +445,9 @@ class DecPomAlignment(PackageObject):
         for Includefile in IncludeFileList:\r
             ExtName = os.path.splitext(Includefile)[1]\r
             if ExtName.upper() == '.DEC' and self.CheckMulDec:\r
-                Logger.Error('MkPkg', \r
+                Logger.Error('MkPkg',\r
                              UPT_MUL_DEC_ERROR,\r
-                             ST.ERR_MUL_DEC_ERROR%(os.path.dirname(ContainerFile), \r
+                             ST.ERR_MUL_DEC_ERROR%(os.path.dirname(ContainerFile),\r
                                                    os.path.basename(ContainerFile),\r
                                                    Includefile))\r
 \r
@@ -462,15 +462,15 @@ class DecPomAlignment(PackageObject):
             if Includefile.find('IndustryStandard') != -1:\r
                 StandardIncludeFileList.append(Include)\r
             else:\r
-                PackageIncludeFileList.append(Include)            \r
-    \r
+                PackageIncludeFileList.append(Include)\r
+\r
         self.SetStandardIncludeFileList(StandardIncludeFileList)\r
 \r
         #\r
         # put include path into the PackageIncludeFileList\r
         #\r
         PackagePathList = []\r
-        IncObj = self.DecParser.GetIncludeSectionObject()        \r
+        IncObj = self.DecParser.GetIncludeSectionObject()\r
         for Item in IncObj.GetAllIncludes():\r
             IncludePath = Item.File\r
             Include = IncludeObject()\r
@@ -478,13 +478,13 @@ class DecPomAlignment(PackageObject):
             Include.SetSupArchList(Item.GetArchList())\r
             PackagePathList.append(Include)\r
         self.SetPackageIncludeFileList(PackagePathList + PackageIncludeFileList)\r
-    \r
+\r
     ## GenPpis\r
     #\r
     # Gen Ppis of Dec\r
     # <CName>=<GuidValue>\r
     #\r
-    # @param ContainerFile: The Dec file full path \r
+    # @param ContainerFile: The Dec file full path\r
     #\r
     def GenGuidProtocolPpis(self, Type, ContainerFile):\r
         if ContainerFile:\r
@@ -504,7 +504,7 @@ class DecPomAlignment(PackageObject):
             Factory = CreateGuidObject\r
         elif Type == TAB_PROTOCOLS:\r
             Obj = self.DecParser.GetProtocolSectionObject()\r
-            \r
+\r
             def CreateProtocolObject():\r
                 return ProtocolObject()\r
             Factory = CreateProtocolObject\r
@@ -519,9 +519,9 @@ class DecPomAlignment(PackageObject):
             # Should not be here\r
             #\r
             return\r
-        \r
+\r
         DeclarationsList = []\r
-        \r
+\r
         #\r
         # Go through each arch\r
         #\r
@@ -530,7 +530,7 @@ class DecPomAlignment(PackageObject):
             Value = Item.GuidString\r
             HelpTxt = ParseGenericComment(Item.GetHeadComment() + \\r
                                           Item.GetTailComment())\r
-            \r
+\r
             ListObject = Factory()\r
             ListObject.SetCName(Name)\r
             ListObject.SetGuid(Value)\r
@@ -539,10 +539,10 @@ class DecPomAlignment(PackageObject):
                 if self.UniFileClassObject:\r
                     HelpTxt.SetLang(TAB_LANGUAGE_EN_X)\r
                 ListObject.SetHelpTextList([HelpTxt])\r
-            \r
+\r
             DeclarationsList.append(ListObject)\r
 \r
-        #    \r
+        #\r
         #GuidTypeList is abstracted from help\r
         #\r
         if Type == TAB_GUIDS:\r
@@ -551,20 +551,20 @@ class DecPomAlignment(PackageObject):
             self.SetProtocolList(self.GetProtocolList() + DeclarationsList)\r
         elif Type == TAB_PPIS:\r
             self.SetPpiList(self.GetPpiList() + DeclarationsList)\r
-    \r
+\r
     ## GenLibraryClasses\r
     #\r
     # Gen LibraryClasses of Dec\r
     # <CName>=<GuidValue>\r
     #\r
-    # @param ContainerFile: The Dec file full path \r
+    # @param ContainerFile: The Dec file full path\r
     #\r
     def GenLibraryClasses(self, ContainerFile):\r
         if ContainerFile:\r
             pass\r
         Logger.Debug(2, "Generate %s ..." % TAB_LIBRARY_CLASSES)\r
         LibraryClassDeclarations = []\r
-        \r
+\r
         LibObj = self.DecParser.GetLibraryClassSectionObject()\r
         for Item in LibObj.GetAllLibraryclasses():\r
             LibraryClass = LibraryClassObject()\r
@@ -578,44 +578,44 @@ class DecPomAlignment(PackageObject):
                     HelpTxt.SetLang(TAB_LANGUAGE_EN_X)\r
                 LibraryClass.SetHelpTextList([HelpTxt])\r
             LibraryClassDeclarations.append(LibraryClass)\r
-        \r
+\r
         self.SetLibraryClassList(self.GetLibraryClassList() + \\r
                                  LibraryClassDeclarations)\r
-    \r
+\r
     ## GenPcds\r
     #\r
     # Gen Pcds of Dec\r
     # <TokenSpcCName>.<TokenCName>|<Value>|<DatumType>|<Token>\r
     #\r
-    # @param ContainerFile: The Dec file full path \r
+    # @param ContainerFile: The Dec file full path\r
     #\r
     def GenPcds(self, ContainerFile):\r
         Logger.Debug(2, "Generate %s ..." % TAB_PCDS)\r
         PcdObj = self.DecParser.GetPcdSectionObject()\r
         #\r
         # Get all Pcds\r
-        #        \r
+        #\r
         PcdDeclarations = []\r
         IterList = [\r
             (TAB_PCDS_FIXED_AT_BUILD_NULL,      'FixedPcd'),\r
-            (TAB_PCDS_PATCHABLE_IN_MODULE_NULL, 'PatchPcd'), \r
+            (TAB_PCDS_PATCHABLE_IN_MODULE_NULL, 'PatchPcd'),\r
             (TAB_PCDS_FEATURE_FLAG_NULL,        'FeaturePcd'),\r
-            (TAB_PCDS_DYNAMIC_EX_NULL,          'PcdEx'), \r
+            (TAB_PCDS_DYNAMIC_EX_NULL,          'PcdEx'),\r
             (TAB_PCDS_DYNAMIC_NULL,             'Pcd')]\r
-        \r
+\r
         PromptStrList = []\r
         HelpStrList = []\r
         PcdErrStrList = []\r
         # Initialize UniStrDict dictionary, top keys are language codes\r
         UniStrDict = {}\r
         StrList = []\r
-        \r
+\r
         Language = ''\r
         if self.UniFileClassObject:\r
             Language = TAB_LANGUAGE_EN_X\r
         else:\r
             Language = TAB_LANGUAGE_EN_US\r
-            \r
+\r
         if self.UniFileClassObject:\r
             UniStrDict = self.UniFileClassObject.OrderedStringList\r
             for Lang in UniStrDict:\r
@@ -652,7 +652,7 @@ class DecPomAlignment(PackageObject):
                         self.DecParser.GetDefineSectionMacro()\r
                         )\r
                 PcdDeclaration.SetSupArchList(Item.GetArchListOfType(PcdType))\r
-                \r
+\r
                 #\r
                 # Get PCD error message from PCD error comment section in DEC file\r
                 #\r
@@ -662,7 +662,7 @@ class DecPomAlignment(PackageObject):
                         Key = (PcdDeclaration.GetTokenSpaceGuidCName(), PcdErr.GetErrorNumber())\r
                         PcdErr.SetErrorMessageList(PcdErr.GetErrorMessageList() + \\r
                                                       [(Language, self.DecParser.PcdErrorCommentDict[Key])])\r
-                \r
+\r
                 for Index in range(0, len(PromptStrList)):\r
                     StrNameList = PromptStrList[Index][1].split('_')\r
                     if StrNameList[1].lower() == Item.TokenSpaceGuidCName.lower() and \\r
@@ -676,7 +676,7 @@ class DecPomAlignment(PackageObject):
                                 break\r
                         else:\r
                             PcdDeclaration.SetPromptList(PcdDeclaration.GetPromptList() + [TxtObj])\r
-                        \r
+\r
                 for Index in range(0, len(HelpStrList)):\r
                     StrNameList = HelpStrList[Index][1].split('_')\r
                     if StrNameList[1].lower() == Item.TokenSpaceGuidCName.lower() and \\r
@@ -703,7 +703,7 @@ class DecPomAlignment(PackageObject):
                                 (PcdErrStrList[Index][0], PcdErrStrList[Index][2]) not in PcdErr.GetErrorMessageList():\r
                                 PcdErr.SetErrorMessageList(PcdErr.GetErrorMessageList() + \\r
                                                             [(PcdErrStrList[Index][0], PcdErrStrList[Index][2])])\r
-                              \r
+\r
                 #\r
                 # Check to prevent missing error message if a Pcd has the error code.\r
                 #\r
@@ -715,12 +715,12 @@ class DecPomAlignment(PackageObject):
                                          ST.ERR_DECPARSE_PCD_UNMATCHED_ERRORCODE % PcdErr.GetErrorNumber(),\r
                                          ContainerFile,\r
                                          PcdErr.GetLineNum(),\r
-                                         PcdErr.GetFileLine())                        \r
-                    \r
+                                         PcdErr.GetFileLine())\r
+\r
                 PcdDeclarations.append(PcdDeclaration)\r
         self.SetPcdList(self.GetPcdList() + PcdDeclarations)\r
         self.CheckPcdValue()\r
-        \r
+\r
     ##\r
     # Get error message via language\r
     # @param ErrorMessageList: Error message tuple list the language and its message\r
@@ -741,17 +741,17 @@ class DecPomAlignment(PackageObject):
                 return ErrorMessageList[0][1]\r
             except IndexError:\r
                 return ''\r
-        return ''    \r
-        \r
+        return ''\r
+\r
     ##\r
     # Replace the strings for Python eval function.\r
-    # @param ReplaceValue: The string that needs to be replaced. \r
-    # @return: The string was replaced, then eval function is always making out it.     \r
+    # @param ReplaceValue: The string that needs to be replaced.\r
+    # @return: The string was replaced, then eval function is always making out it.\r
     def ReplaceForEval(self, ReplaceValue, IsRange=False, IsExpr=False):\r
         if self.FullPath:\r
             pass\r
         #\r
-        # deal with "NOT EQ", "NOT LT", "NOT GT", "NOT LE", "NOT GE", "NOT NOT" \r
+        # deal with "NOT EQ", "NOT LT", "NOT GT", "NOT LE", "NOT GE", "NOT NOT"\r
         #\r
         NOTNOT_Pattern = '[\t\s]*NOT[\t\s]+NOT[\t\s]*'\r
         NOTGE_Pattern = '[\t\s]*NOT[\t\s]+GE[\t\s]*'\r
@@ -765,7 +765,7 @@ class DecPomAlignment(PackageObject):
         ReplaceValue = re.compile(NOTLE_Pattern).sub('x > ', ReplaceValue)\r
         ReplaceValue = re.compile(NOTGE_Pattern).sub('x < ', ReplaceValue)\r
         ReplaceValue = re.compile(NOTEQ_Pattern).sub('x != ', ReplaceValue)\r
-        \r
+\r
         if IsRange:\r
             ReplaceValue = ReplaceValue.replace('EQ', 'x ==')\r
             ReplaceValue = ReplaceValue.replace('LT', 'x <')\r
@@ -779,9 +779,9 @@ class DecPomAlignment(PackageObject):
             ReplaceValue = ReplaceValue.replace('LT', '<')\r
             ReplaceValue = ReplaceValue.replace('LE', '<=')\r
             ReplaceValue = ReplaceValue.replace('GT', '>')\r
-            ReplaceValue = ReplaceValue.replace('GE', '>=')  \r
-            ReplaceValue = ReplaceValue.replace('XOR', '^')  \r
-            \r
+            ReplaceValue = ReplaceValue.replace('GE', '>=')\r
+            ReplaceValue = ReplaceValue.replace('XOR', '^')\r
+\r
         ReplaceValue = ReplaceValue.replace('AND', 'and')\r
         ReplaceValue = ReplaceValue.replace('&&', ' and ')\r
         ReplaceValue = ReplaceValue.replace('xor', '^')\r
@@ -789,7 +789,7 @@ class DecPomAlignment(PackageObject):
         ReplaceValue = ReplaceValue.replace('||', ' or ')\r
         ReplaceValue = ReplaceValue.replace('NOT', 'not')\r
         if ReplaceValue.find('!') >= 0 and ReplaceValue[ReplaceValue.index('!') + 1] != '=':\r
-            ReplaceValue = ReplaceValue.replace('!', ' not ')        \r
+            ReplaceValue = ReplaceValue.replace('!', ' not ')\r
         if '.' in ReplaceValue:\r
             Pattern = '[a-zA-Z0-9]{1,}\.[a-zA-Z0-9]{1,}'\r
             MatchedList = re.findall(Pattern, ReplaceValue)\r
@@ -797,7 +797,7 @@ class DecPomAlignment(PackageObject):
                 if MatchedItem not in self.PcdDefaultValueDict:\r
                     Logger.Error("Dec File Parser", FORMAT_INVALID, Message=ST.ERR_DECPARSE_PCD_NODEFINED % MatchedItem,\r
                                      File=self.FullPath)\r
-                    \r
+\r
                 ReplaceValue = ReplaceValue.replace(MatchedItem, self.PcdDefaultValueDict[MatchedItem])\r
 \r
         return ReplaceValue\r
@@ -809,7 +809,7 @@ class DecPomAlignment(PackageObject):
         for Pcd in self.GetPcdList():\r
             self.PcdDefaultValueDict[TAB_SPLIT.join((Pcd.GetTokenSpaceGuidCName(), Pcd.GetCName())).strip()] = \\r
             Pcd.GetDefaultValue()\r
-        \r
+\r
         for Pcd in self.GetPcdList():\r
             ValidationExpressions = []\r
             PcdGuidName = TAB_SPLIT.join((Pcd.GetTokenSpaceGuidCName(), Pcd.GetCName()))\r
@@ -825,20 +825,20 @@ class DecPomAlignment(PackageObject):
                     if QuotedMatchedObj:\r
                         MatchedStr = QuotedMatchedObj.group().strip()\r
                         if MatchedStr.startswith('L'):\r
-                            Expression = Expression.replace(MatchedStr, MatchedStr[1:].strip())  \r
+                            Expression = Expression.replace(MatchedStr, MatchedStr[1:].strip())\r
 \r
                     Expression = self.ReplaceForEval(Expression, IsExpr=True)\r
                     Expression = Expression.replace(PcdGuidName, 'x')\r
                     Message = self.GetEnErrorMessage(Valid.GetErrorMessageList())\r
-                    ValidationExpressions.append((Expression, Message))                   \r
-                \r
+                    ValidationExpressions.append((Expression, Message))\r
+\r
                 ValidList = Valid.GetValidValue()\r
                 if ValidList:\r
                     ValidValue = 'x in %s' % [eval(v) for v in ValidList.split(' ') if v]\r
                     Message = self.GetEnErrorMessage(Valid.GetErrorMessageList())\r
                     ValidationExpressions.append((ValidValue, Message))\r
-                    \r
-                ValidValueRange = Valid.GetValidValueRange()                \r
+\r
+                ValidValueRange = Valid.GetValidValueRange()\r
                 if ValidValueRange:\r
                     ValidValueRange = self.ReplaceForEval(ValidValueRange, IsRange=True)\r
                     if ValidValueRange.find('-') >= 0:\r
@@ -848,7 +848,7 @@ class DecPomAlignment(PackageObject):
                         ValidValueRange = 'x %s' % ValidValueRange\r
                     Message = self.GetEnErrorMessage(Valid.GetErrorMessageList())\r
                     ValidationExpressions.append((ValidValueRange, Message))\r
-                    \r
+\r
             DefaultValue = self.PcdDefaultValueDict[PcdGuidName.strip()]\r
             #\r
             # Delete the 'L' prefix of a quoted string, this operation is for eval()\r
@@ -859,7 +859,7 @@ class DecPomAlignment(PackageObject):
                 MatchedStr = QuotedMatchedObj.group().strip()\r
                 if MatchedStr.startswith('L'):\r
                     DefaultValue = DefaultValue.replace(MatchedStr, MatchedStr[1:].strip())\r
-                    \r
+\r
             try:\r
                 DefaultValue = eval(DefaultValue.replace('TRUE', 'True').replace('true', 'True')\r
                                         .replace('FALSE', 'False').replace('false', 'False'))\r
@@ -877,11 +877,11 @@ class DecPomAlignment(PackageObject):
 \r
     ## GenModuleFileList\r
     #\r
-    def GenModuleFileList(self, ContainerFile):        \r
+    def GenModuleFileList(self, ContainerFile):\r
         ModuleFileList = []\r
         ContainerFileName = os.path.basename(ContainerFile)\r
         ContainerFilePath = os.path.dirname(ContainerFile)\r
-        for Item in GetFiles(ContainerFilePath, \r
+        for Item in GetFiles(ContainerFilePath,\r
                         ['CVS', '.svn'] + self.GetIncludePathList(), False):\r
             ExtName = os.path.splitext(Item)[1]\r
             if ExtName.lower() == '.inf':\r
@@ -889,14 +889,14 @@ class DecPomAlignment(PackageObject):
             elif ExtName.upper() == '.DEC' and self.CheckMulDec:\r
                 if Item == ContainerFileName:\r
                     continue\r
-                Logger.Error('MkPkg', \r
+                Logger.Error('MkPkg',\r
                              UPT_MUL_DEC_ERROR,\r
-                             ST.ERR_MUL_DEC_ERROR%(ContainerFilePath, \r
-                                                   ContainerFileName, \r
+                             ST.ERR_MUL_DEC_ERROR%(ContainerFilePath,\r
+                                                   ContainerFileName,\r
                                                    Item))\r
-                \r
+\r
         self.SetModuleFileList(ModuleFileList)\r
-    \r
+\r
     ## Show detailed information of Package\r
     #\r
     # Print all members and their values of Package class\r
@@ -906,7 +906,7 @@ class DecPomAlignment(PackageObject):
         print('\nBaseName =', self.GetBaseName())\r
         print('\nVersion =', self.GetVersion())\r
         print('\nGuid =', self.GetGuid())\r
-        \r
+\r
         print('\nStandardIncludes = %d ' \\r
             % len(self.GetStandardIncludeFileList()), end=' ')\r
         for Item in self.GetStandardIncludeFileList():\r
@@ -915,7 +915,7 @@ class DecPomAlignment(PackageObject):
             % len(self.GetPackageIncludeFileList()), end=' ')\r
         for Item in self.GetPackageIncludeFileList():\r
             print(Item.GetFilePath(), '  ', Item.GetSupArchList())\r
-             \r
+\r
         print('\nGuids =', self.GetGuidList())\r
         for Item in self.GetGuidList():\r
             print(Item.GetCName(), Item.GetGuid(), Item.GetSupArchList())\r
@@ -937,7 +937,7 @@ class DecPomAlignment(PackageObject):
                 'ValidUsage=', Item.GetValidUsage(), \\r
                 'SupArchList', Item.GetSupArchList(), \\r
                 'Token=', Item.GetToken(), 'DatumType=', Item.GetDatumType())\r
\r
+\r
         for Item in self.GetMiscFileList():\r
             print(Item.GetName())\r
             for FileObjectItem in Item.GetFileList():\r
@@ -947,11 +947,11 @@ class DecPomAlignment(PackageObject):
 ## GenPcdDeclaration\r
 #\r
 # @param ContainerFile:   File name of the DEC file\r
-# @param PcdInfo:         Pcd information, of format (TokenGuidCName, \r
-#                         TokenName, Value, DatumType, Token, Type, \r
+# @param PcdInfo:         Pcd information, of format (TokenGuidCName,\r
+#                         TokenName, Value, DatumType, Token, Type,\r
 #                         GenericComment, TailComment, Arch)\r
-# @param Language: The language of HelpText, Prompt \r
-# \r
+# @param Language: The language of HelpText, Prompt\r
+#\r
 def GenPcdDeclaration(ContainerFile, PcdInfo, Language, MacroReplaceDict):\r
     HelpStr = ''\r
     PromptStr = ''\r
@@ -973,28 +973,28 @@ def GenPcdDeclaration(ContainerFile, PcdInfo, Language, MacroReplaceDict):
 \r
     SupArchList = [Arch]\r
     Pcd.SetSupArchList(SupArchList)\r
-    \r
+\r
     if GenericComment:\r
-        HelpStr, PcdErrList, PromptStr = ParseDecPcdGenericComment(GenericComment, \r
-                                                                   ContainerFile, \r
-                                                                   TokenGuidCName, \r
+        HelpStr, PcdErrList, PromptStr = ParseDecPcdGenericComment(GenericComment,\r
+                                                                   ContainerFile,\r
+                                                                   TokenGuidCName,\r
                                                                    TokenName,\r
                                                                    MacroReplaceDict)\r
         if PcdErrList:\r
             Pcd.SetPcdErrorsList(PcdErrList)\r
 \r
     if TailComment:\r
-        SupModuleList, TailHelpStr = ParseDecPcdTailComment(TailComment, \r
+        SupModuleList, TailHelpStr = ParseDecPcdTailComment(TailComment,\r
                                                         ContainerFile)\r
         if SupModuleList:\r
             Pcd.SetSupModuleList(SupModuleList)\r
-    \r
+\r
     if HelpStr and (not HelpStr.endswith('\n')) and TailHelpStr:\r
         HelpStr += '\n'\r
     HelpStr += TailHelpStr\r
     if HelpStr:\r
         HelpTxtObj = TextObject()\r
-        HelpTxtObj.SetLang(Language)   \r
+        HelpTxtObj.SetLang(Language)\r
         HelpTxtObj.SetString(HelpStr)\r
         Pcd.SetHelpTextList([HelpTxtObj])\r
     if PromptStr:\r
index 84f0d43f015ed4513e2771ef4d52564973afc0f8..c055089f2cad0600a53cd313efde6d3dfafa890f 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -59,8 +59,8 @@ from Common.MultipleWorkspace import MultipleWorkspace as mws
 #\r
 class InfPomAlignment(ModuleObject):\r
     ## Construct of InfPomAlignment\r
-    # Skip means that UPT don't care the syntax of INF, this may be the not \r
-    # distributed INF files during creation or the INF files checked for \r
+    # Skip means that UPT don't care the syntax of INF, this may be the not\r
+    # distributed INF files during creation or the INF files checked for\r
     # dependency rule during remove.\r
     #\r
     def __init__(self, FileName, WorkSpace=None, PackagePath='', Skip=False):\r
@@ -90,12 +90,12 @@ class InfPomAlignment(ModuleObject):
             self._GenInfPomObjects(Skip)\r
 \r
     ##\r
-    # Generate all POM objects, the original input comes \r
+    # Generate all POM objects, the original input comes\r
     # from INF parser's output\r
     #\r
     def _GenInfPomObjects(self, Skip):\r
         #\r
-        # Call INF Parser to get information from INF file  \r
+        # Call INF Parser to get information from INF file\r
         #\r
         self.Parser = InfParser.InfParser(self.FileName, self.WorkSpace)\r
         self.FullPath = self.Parser.FullPath\r
@@ -144,8 +144,8 @@ class InfPomAlignment(ModuleObject):
         self.SetFileName(self.FileName)\r
         self.SetFullPath(self.FullPath)\r
         #\r
-        # The INF's filename (without the directory path or the extension) \r
-        # must be used for the value of the \r
+        # The INF's filename (without the directory path or the extension)\r
+        # must be used for the value of the\r
         # ModuleSurfaceArea.Header.Name element\r
         #\r
         self.SetName(os.path.splitext(os.path.basename(self.FileName))[0])\r
@@ -184,7 +184,7 @@ class InfPomAlignment(ModuleObject):
 \r
         #\r
         # must exist items in INF define section\r
-        # MODULE_TYPE/BASE_NAME/INF_VERSION/FILE_GUID/VERSION_STRING \r
+        # MODULE_TYPE/BASE_NAME/INF_VERSION/FILE_GUID/VERSION_STRING\r
         #\r
         if DefineObj.GetModuleType() is None:\r
             Logger.Error("InfParser", FORMAT_INVALID,\r
@@ -194,7 +194,7 @@ class InfPomAlignment(ModuleObject):
             ModuleType = DefineObj.GetModuleType().GetValue()\r
             if ModuleType:\r
                 #\r
-                # Drivers and applications are not allowed to have a MODULE_TYPE of "BASE". Only \r
+                # Drivers and applications are not allowed to have a MODULE_TYPE of "BASE". Only\r
                 # libraries are permitted to a have a MODULE_TYPE of "BASE".\r
                 #\r
                 if len(DefineObj.LibraryClass) == 0 and ModuleType == 'BASE':\r
@@ -248,7 +248,7 @@ class InfPomAlignment(ModuleObject):
                 Logger.Error("Parser", PARSER_ERROR, ST.ERR_INF_PARSER_NOT_SUPPORT_EDKI_INF, ExtraData=self.FullPath,\r
                              RaiseError=Logger.IS_RAISE_ERROR)\r
         #\r
-        # if there is Shadow, Should judge the MODULE_TYPE in \r
+        # if there is Shadow, Should judge the MODULE_TYPE in\r
         # SEC, PEI_CORE and PEIM\r
         #\r
         if DefineObj.GetShadow():\r
@@ -283,7 +283,7 @@ class InfPomAlignment(ModuleObject):
         self._GenSpecialComments()\r
         #\r
         # put all define statement into user-extension sections\r
-        #     \r
+        #\r
         DefinesDictNew = GenModuleHeaderUserExt(DefineObj, ArchString)\r
         if DefinesDictNew:\r
             UserExtension = CommonObject.UserExtensionObject()\r
@@ -293,7 +293,7 @@ class InfPomAlignment(ModuleObject):
             self.SetUserExtensionList(self.GetUserExtensionList() + [UserExtension])\r
         #\r
         # Get all meta-file header information\r
-        # the record is list of items formated: \r
+        # the record is list of items formated:\r
         # [LineValue, Arch, StartLine, ID, Third]\r
         #\r
         InfHeaderObj = self.Parser.InfHeader\r
@@ -356,13 +356,13 @@ class InfPomAlignment(ModuleObject):
             self.SetExternList(self.GetExternList() + [Image])\r
         #\r
         # UNLOAD_IMAGE\r
-        # \r
+        #\r
         UnloadImageList = DefineObj.GetUnloadImages()\r
         for UnloadImage in UnloadImageList:\r
             Image = ExternObject()\r
             #\r
             # Future enhancement\r
-            #                \r
+            #\r
             Image.SetUnloadImage(UnloadImage.GetCName())\r
             self.SetExternList(self.GetExternList() + [Image])\r
         #\r
@@ -373,7 +373,7 @@ class InfPomAlignment(ModuleObject):
             Image = ExternObject()\r
             #\r
             # Future enhancement\r
-            #                  \r
+            #\r
             Image.SetConstructor(ConstructorItem.GetCName())\r
             self.SetExternList(self.GetExternList() + [Image])\r
         #\r
@@ -384,7 +384,7 @@ class InfPomAlignment(ModuleObject):
             Image = ExternObject()\r
             #\r
             # Future enhancement\r
-            #                \r
+            #\r
             Image.SetDestructor(DestructorItem.GetCName())\r
             self.SetExternList(self.GetExternList() + [Image])\r
 \r
@@ -639,7 +639,7 @@ class InfPomAlignment(ModuleObject):
                 UserExtension = CommonObject.UserExtensionObject()\r
                 UserId = UserExtensionDataObj.GetUserId()\r
                 if UserId.startswith('"') and UserId.endswith('"'):\r
-                    UserId = UserId[1:-1]                \r
+                    UserId = UserId[1:-1]\r
                 UserExtension.SetUserID(UserId)\r
                 Identifier = UserExtensionDataObj.GetIdString()\r
                 if Identifier.startswith('"') and Identifier.endswith('"'):\r
@@ -653,11 +653,11 @@ class InfPomAlignment(ModuleObject):
                 UserExtension.SetStatement(UserExtensionDataObj.GetContent())\r
                 UserExtension.SetSupArchList(ConvertArchList(UserExtensionDataObj.GetSupArchList()))\r
                 self.SetUserExtensionList(self.GetUserExtensionList() + [UserExtension])\r
-                \r
+\r
         #\r
         #  Gen UserExtensions of TianoCore."BinaryHeader"\r
         #\r
-        \r
+\r
         #Get Binary header from INF file\r
         BinaryAbstractList = self.BinaryHeaderAbstractList\r
         BinaryDescriptionList = self.BinaryHeaderDescriptionList\r
@@ -684,7 +684,7 @@ class InfPomAlignment(ModuleObject):
             BinaryUserExtension.SetIdentifier(DT.TAB_BINARY_HEADER_IDENTIFIER)\r
             BinaryUserExtension.SetUserID(DT.TAB_BINARY_HEADER_USERID)\r
             self.SetUserExtensionList(self.GetUserExtensionList() + [BinaryUserExtension])\r
-            \r
+\r
     def _GenDepexesList(self, SmmDepexList, DxeDepexList, PeiDepexList):\r
         if SmmDepexList:\r
             self.SetSmmDepex(SmmDepexList)\r
@@ -802,7 +802,7 @@ class InfPomAlignment(ModuleObject):
         BinaryData = BinaryObj.keys()\r
 \r
         #\r
-        # If the INF file does not contain a [Sources] section, and the INF file does contain a [Binaries] section, \r
+        # If the INF file does not contain a [Sources] section, and the INF file does contain a [Binaries] section,\r
         # then the ModuleSurfaceArea.BinaryModule attribute must be set to true. Otherwise, do not use the attribute\r
         #\r
         if BinaryObj and not self.Parser.InfSourcesSection.GetSources():\r
@@ -827,7 +827,7 @@ class InfPomAlignment(ModuleObject):
 \r
         #\r
         # BuildOption AsBuild Info\r
-        #            \r
+        #\r
         for BuildOptionItem in self.Parser.InfBuildOptionSection.GetBuildOptions():\r
             AsBuildBuildOptionList.append(BuildOptionItem)\r
         AsBuildIns.SetBuildFlagsList(AsBuildBuildOptionList)\r
@@ -849,14 +849,14 @@ class InfPomAlignment(ModuleObject):
                 TempPath = ModulePath\r
                 ModulePath = os.path.dirname(ModulePath)\r
             PackageName = TempPath\r
-            DecFilePath = os.path.normpath(os.path.join(WorkSpace, PackageName))  \r
+            DecFilePath = os.path.normpath(os.path.join(WorkSpace, PackageName))\r
             if DecFilePath:\r
                 for File in os.listdir(DecFilePath):\r
                     if File.upper().endswith('.DEC'):\r
                         DecFileFullPath = os.path.normpath(os.path.join(DecFilePath, File))\r
                         DecObjList.append(DecPomAlignment(DecFileFullPath, self.WorkSpace))\r
-                        \r
-        \r
+\r
+\r
         BinariesDict, AsBuildIns, BinaryFileObjectList = GenBinaryData(BinaryData, BinaryObj,\r
                                                                        BinariesDict,\r
                                                                        AsBuildIns,\r
@@ -864,7 +864,7 @@ class InfPomAlignment(ModuleObject):
                                                                        self.GetSupArchList(),\r
                                                                        self.BinaryModule,\r
                                                                        DecObjList)\r
-                \r
+\r
         BinariesDict2 = {}\r
         for Key in BinariesDict:\r
             ValueList = BinariesDict[Key]\r
@@ -872,7 +872,7 @@ class InfPomAlignment(ModuleObject):
                 BinariesDict2[Key] = ValueList\r
             else:\r
                 #\r
-                # if there is no TagName, ToolCode, HelpStr, \r
+                # if there is no TagName, ToolCode, HelpStr,\r
                 # then do not need to put them into userextension\r
                 #\r
                 (Target, Family, TagName, HelpStr) = ValueList[0]\r
@@ -1000,7 +1000,7 @@ class InfPomAlignment(ModuleObject):
                                 HelpTxtTailObj.SetLang(DT.TAB_LANGUAGE_EN_X)\r
                             HelpTxtTailObj.SetString(HelpString)\r
                             ListObject.SetHelpTextList([HelpTxtTailObj])\r
-                            \r
+\r
                         GuidProtocolPpiList.append(ListObject)\r
         elif Type == DT.TAB_PROTOCOLS:\r
             ProtocolData = ProtocolObj.keys()\r
@@ -1068,10 +1068,10 @@ class InfPomAlignment(ModuleObject):
                     FileObj.SetURI(FileName)\r
                     MiscFileObj.SetFileList(MiscFileObj.GetFileList()+[FileObj])\r
                 else:\r
-                    Logger.Error("InfParser", \r
+                    Logger.Error("InfParser",\r
                                  FORMAT_INVALID,\r
                                  ST.ERR_INF_PARSER_FILE_NOT_EXIST_OR_NAME_INVALID%(Line),\r
                                  File=GlobalData.gINF_MODULE_NAME,\r
-                                 ExtraData=Line)   \r
-        self.SetMiscFileList(self.GetMiscFileList()+[MiscFileObj]) \r
-        \r
+                                 ExtraData=Line)\r
+        self.SetMiscFileList(self.GetMiscFileList()+[MiscFileObj])\r
+\r
index 3bb506bea660a92ca4e301a530597ad5eeb5bb15..239078d019a7edcf9eb714a8b47da405153d83ac 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -184,16 +184,16 @@ def GenBinaryData(BinaryData, BinaryObj, BinariesDict, AsBuildIns, BinaryFileObj
         else:\r
             TagName = ''\r
             Family = ''\r
-        \r
+\r
         FFE = ItemObj.GetFeatureFlagExp()\r
 \r
         #\r
         # If have architecturie specified, then use the specified architecturie;\r
         # If the section tag does not have an architecture modifier or the modifier is "common" (case in-sensitive),\r
-        # and the VALID_ARCHITECTURES comment exists, the list from the VALID_ARCHITECTURES comment \r
+        # and the VALID_ARCHITECTURES comment exists, the list from the VALID_ARCHITECTURES comment\r
         # can be used for the attribute.\r
         # If both not have VALID_ARCHITECTURE comment and no architecturie specified, then keep it empty.\r
-        #        \r
+        #\r
         SupArchList = sorted(ConvertArchList(ItemObj.GetSupArchList()))\r
         if len(SupArchList) == 1 and SupArchList[0] == 'COMMON':\r
             if not (len(OriSupArchList) == 1 or OriSupArchList[0] == 'COMMON'):\r
@@ -208,7 +208,7 @@ def GenBinaryData(BinaryData, BinaryObj, BinariesDict, AsBuildIns, BinaryFileObj
         #\r
         # Get GUID value of the GUID CName in the DEC file\r
         #\r
-        if ItemObj.GetType() == DT.SUBTYPE_GUID_BINARY_FILE_TYPE:                \r
+        if ItemObj.GetType() == DT.SUBTYPE_GUID_BINARY_FILE_TYPE:\r
             if not CheckGuidRegFormat(ItemObj.GetGuidValue()):\r
                 if not DecObjList:\r
                     if DT.TAB_HORIZON_LINE_SPLIT in ItemObj.GetGuidValue() or \\r
@@ -231,12 +231,12 @@ def GenBinaryData(BinaryData, BinaryObj, BinariesDict, AsBuildIns, BinaryFileObj
                                 FileNameObj.SetGuidValue(GuidObj.GetGuid())\r
                                 break\r
 \r
-                    if not FileNameObj.GetGuidValue():                        \r
+                    if not FileNameObj.GetGuidValue():\r
                         Logger.Error("\nMkPkg",\r
                                          FORMAT_INVALID,\r
                                          ST.ERR_DECPARSE_CGUID_NOT_FOUND % \\r
                                          (ItemObj.GetGuidValue()),\r
-                                         RaiseError=True)  \r
+                                         RaiseError=True)\r
             else:\r
                 FileNameObj.SetGuidValue(ItemObj.GetGuidValue().strip())\r
 \r
index e477b97baad8df5fb9171de0adbe5c89f9c0c29c..f54832683d8cc9db838e2c1f8cf66029b6484409 100644 (file)
@@ -4,11 +4,11 @@
 # This file is required to make Python interpreter treat the directory\r
 # as containing package.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,4 +17,4 @@
 \r
 '''\r
 PomAdapter\r
-'''
\ No newline at end of file
+'''\r
index 6f52b4f8f8e865605f9e04b0ca1415f449a004df..9531eb53e91737ed26839bdccb6bae830df3c4a6 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # Replace distribution package.\r
 #\r
-# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -51,26 +51,26 @@ def Main(Options = None):
         WorkspaceDir = GlobalData.gWORKSPACE\r
         Dep = DependencyRules(DataBase)\r
         DistPkg, ContentZipFile, DpPkgFileName, DistFile = UnZipDp(WorkspaceDir, Options.PackFileToReplace)\r
-        \r
+\r
         StoredDistFile, OrigDpGuid, OrigDpVersion = GetInstalledDpInfo(Options.PackFileToBeReplaced, \\r
                                                                        Dep, DataBase, WorkspaceDir)\r
-        \r
+\r
         #\r
         # check dependency\r
         #\r
         CheckReplaceDpx(Dep, DistPkg, OrigDpGuid, OrigDpVersion)\r
-        \r
+\r
         #\r
         # Remove the old distribution\r
         #\r
         RemoveDist(OrigDpGuid, OrigDpVersion, StoredDistFile, DataBase, WorkspaceDir, Options.Yes)\r
-        \r
+\r
         #\r
         # Install the new distribution\r
         #\r
         InstallDp(DistPkg, DpPkgFileName, ContentZipFile, Options, Dep, WorkspaceDir, DataBase)\r
         ReturnCode = 0\r
-        \r
+\r
     except FatalError as XExcept:\r
         ReturnCode = XExcept.args[0]\r
         if Logger.GetLevel() <= Logger.DEBUG_9:\r
@@ -102,11 +102,11 @@ def Main(Options = None):
         for TempDir in GlobalData.gUNPACK_DIR:\r
             rmtree(TempDir)\r
         GlobalData.gUNPACK_DIR = []\r
-        Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_DONE)        \r
+        Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_DONE)\r
 \r
     if ReturnCode == 0:\r
         Logger.Quiet(ST.MSG_FINISH)\r
-    \r
+\r
     return ReturnCode\r
 \r
 def CheckReplaceDpx(Dep, DistPkg, OrigDpGuid, OrigDpVersion):\r
@@ -125,18 +125,18 @@ def CheckReplaceDpx(Dep, DistPkg, OrigDpGuid, OrigDpVersion):
         if Dep.CheckDpExists(DistPkg.Header.GetGuid(), DistPkg.Header.GetVersion()):\r
             Logger.Error("\nReplacePkg", UPT_ALREADY_INSTALLED_ERROR,\r
                 ST.WRN_DIST_PKG_INSTALLED,\r
-                ExtraData=ST.MSG_REPLACE_ALREADY_INSTALLED_DP)    \r
+                ExtraData=ST.MSG_REPLACE_ALREADY_INSTALLED_DP)\r
 \r
     #\r
     # check whether the original distribution could be replaced by new distribution\r
-    #    \r
+    #\r
     Logger.Verbose(ST.MSG_CHECK_DP_FOR_REPLACE%(NewDpInfo, OrigDpInfo))\r
     DepInfoResult = Dep.CheckDpDepexForReplace(OrigDpGuid, OrigDpVersion, NewDpPkgList)\r
     Replaceable = DepInfoResult[0]\r
     if not Replaceable:\r
         Logger.Error("\nReplacePkg", UNKNOWN_ERROR,\r
             ST.ERR_PACKAGE_NOT_MATCH_DEPENDENCY)\r
-    \r
+\r
     #\r
     # check whether new distribution could be installed by dependency rule\r
     #\r
index 6427a8f16c887cac3ec61ac3cd2ee0cc01f39d4c..78469dc758d845da148d949dced4af28913e8f01 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # Install distribution package.\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -58,7 +58,7 @@ def CheckDpDepex(Dep, Guid, Version, WorkspaceDir):
             return 1\r
         else:\r
             #\r
-            # report list of modules that are not valid due to force \r
+            # report list of modules that are not valid due to force\r
             # remove,\r
             # also generate a log file for reference\r
             #\r
@@ -72,12 +72,12 @@ def CheckDpDepex(Dep, Guid, Version, WorkspaceDir):
                         LogFile.write("%s\n"%ModulePath)\r
                         Logger.Info(ModulePath)\r
                 except IOError:\r
-                    Logger.Warn("\nRmPkg", ST.ERR_FILE_WRITE_FAILURE, \r
+                    Logger.Warn("\nRmPkg", ST.ERR_FILE_WRITE_FAILURE,\r
                                 File=LogFilePath)\r
             except IOError:\r
-                Logger.Warn("\nRmPkg", ST.ERR_FILE_OPEN_FAILURE, \r
+                Logger.Warn("\nRmPkg", ST.ERR_FILE_OPEN_FAILURE,\r
                             File=LogFilePath)\r
-            finally:                    \r
+            finally:\r
                 LogFile.close()\r
 \r
 ## Remove Path\r
@@ -85,7 +85,7 @@ def CheckDpDepex(Dep, Guid, Version, WorkspaceDir):
 # removing readonly file on windows will get "Access is denied"\r
 # error, so before removing, change the mode to be writeable\r
 #\r
-# @param Path: The Path to be removed \r
+# @param Path: The Path to be removed\r
 #\r
 def RemovePath(Path):\r
     Logger.Info(ST.MSG_REMOVE_FILE % Path)\r
@@ -122,43 +122,43 @@ def GetCurrentFileList(DataBase, Guid, Version, WorkspaceDir):
 # If no error found, return zero value so the caller of this tool can know\r
 # if it's executed successfully or not.\r
 #\r
-# @param  Options: command option \r
+# @param  Options: command option\r
 #\r
 def Main(Options = None):\r
 \r
     try:\r
-        DataBase = GlobalData.gDB        \r
+        DataBase = GlobalData.gDB\r
         if not Options.DistributionFile:\r
-            Logger.Error("RmPkg", \r
-                         OPTION_MISSING, \r
+            Logger.Error("RmPkg",\r
+                         OPTION_MISSING,\r
                          ExtraData=ST.ERR_SPECIFY_PACKAGE)\r
         WorkspaceDir = GlobalData.gWORKSPACE\r
         #\r
         # Prepare check dependency\r
         #\r
         Dep = DependencyRules(DataBase)\r
-        \r
+\r
         #\r
         # Get the Dp information\r
         #\r
         StoredDistFile, Guid, Version = GetInstalledDpInfo(Options.DistributionFile, Dep, DataBase, WorkspaceDir)\r
 \r
-        # \r
+        #\r
         # Check Dp depex\r
         #\r
         CheckDpDepex(Dep, Guid, Version, WorkspaceDir)\r
 \r
-        # \r
+        #\r
         # remove distribution\r
         #\r
         RemoveDist(Guid, Version, StoredDistFile, DataBase, WorkspaceDir, Options.Yes)\r
 \r
         Logger.Quiet(ST.MSG_FINISH)\r
-        \r
+\r
         ReturnCode = 0\r
-        \r
+\r
     except FatalError as XExcept:\r
-        ReturnCode = XExcept.args[0]        \r
+        ReturnCode = XExcept.args[0]\r
         if Logger.GetLevel() <= Logger.DEBUG_9:\r
             Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(), platform) + \\r
                          format_exc())\r
@@ -203,7 +203,7 @@ def GetInstalledDpInfo(DistributionFile, Dep, DataBase, WorkspaceDir):
     if not Dep.CheckDpExists(Guid, Version):\r
         Logger.Error("RmPkg", UNKNOWN_ERROR, ST.ERR_DISTRIBUTION_NOT_INSTALLED)\r
     #\r
-    # Check for Distribution files existence in /conf/upt, if not exist, \r
+    # Check for Distribution files existence in /conf/upt, if not exist,\r
     # Warn user and go on.\r
     #\r
     StoredDistFile = os.path.normpath(os.path.join(WorkspaceDir, GlobalData.gUPT_DIR, NewDpFileName))\r
@@ -252,7 +252,7 @@ def RemoveDist(Guid, Version, StoredDistFile, DataBase, WorkspaceDir, ForceRemov
             RemovePath(Path)\r
         else:\r
             MissingFileList.append(Path)\r
-    \r
+\r
     for Path in NewFileList:\r
         if os.path.isfile(Path):\r
             if (not ForceRemove) and (not os.path.split(Path)[1].startswith('.')):\r
index 772974199f1f17f9ce0043932998c37498f6daf2..004fc5ff2f3b5d2198efc9023b5dcc66cf42f0e7 100644 (file)
@@ -1,12 +1,12 @@
 ## @file\r
 #\r
-# This file is the main entry for UPT \r
+# This file is the main entry for UPT\r
 #\r
-# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
index 9c50d2dc60be7067a900c41566d70a92a06ac989..3371ec3c2f7cd8835af2c7a7e706d975d6735d70 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -15,19 +15,19 @@ import os
 import unittest\r
 \r
 import Logger.Log as Logger\r
-from GenMetaFile.GenInfFile import GenGuidSections \r
+from GenMetaFile.GenInfFile import GenGuidSections\r
 from GenMetaFile.GenInfFile import GenProtocolPPiSections\r
 from GenMetaFile.GenInfFile import GenPcdSections\r
 from GenMetaFile.GenInfFile import GenSpecialSections\r
 from Library.CommentGenerating import GenGenericCommentF\r
-from Library.CommentGenerating import _GetHelpStr \r
+from Library.CommentGenerating import _GetHelpStr\r
 from Object.POM.CommonObject import TextObject\r
 from Object.POM.CommonObject import GuidObject\r
 from Object.POM.CommonObject import ProtocolObject\r
 from Object.POM.CommonObject import PpiObject\r
 from Object.POM.CommonObject import PcdObject\r
 from Object.POM.ModuleObject import HobObject\r
-                               \r
+\r
 from Library.StringUtils import GetSplitValueList\r
 from Library.DataType import TAB_SPACE_SPLIT\r
 from Library.DataType import TAB_LANGUAGE_EN_US\r
@@ -46,7 +46,7 @@ class _GetHelpStrTest(unittest.TestCase):
 \r
     def tearDown(self):\r
         pass\r
\r
+\r
     #\r
     # Normal case1: have one help text object with Lang = 'en-US'\r
     #\r
@@ -55,11 +55,11 @@ class _GetHelpStrTest(unittest.TestCase):
         HelpTextObj = TextObject()\r
         HelpTextObj.SetLang(TAB_LANGUAGE_EN_US)\r
         HelpTextObj.SetString(HelpStr)\r
-        \r
+\r
         HelpTextList = [HelpTextObj]\r
         Result = _GetHelpStr(HelpTextList)\r
         self.assertEqual(Result, HelpStr)\r
-        \r
+\r
     #\r
     # Normal case2: have two help text object with Lang = 'en-US' and other\r
     #\r
@@ -68,16 +68,16 @@ class _GetHelpStrTest(unittest.TestCase):
         HelpTextObj = TextObject()\r
         HelpTextObj.SetLang(TAB_LANGUAGE_ENG)\r
         HelpTextObj.SetString(HelpStr)\r
-        \r
+\r
         HelpTextList = [HelpTextObj]\r
 \r
         ExpectedStr = 'Hello world1'\r
         HelpTextObj = TextObject()\r
         HelpTextObj.SetLang(TAB_LANGUAGE_EN_US)\r
-        HelpTextObj.SetString(ExpectedStr)        \r
-        \r
+        HelpTextObj.SetString(ExpectedStr)\r
+\r
         HelpTextList.append(HelpTextObj)\r
-        \r
+\r
         Result = _GetHelpStr(HelpTextList)\r
         self.assertEqual(Result, ExpectedStr)\r
 \r
@@ -89,16 +89,16 @@ class _GetHelpStrTest(unittest.TestCase):
         HelpTextObj = TextObject()\r
         HelpTextObj.SetLang('')\r
         HelpTextObj.SetString(HelpStr)\r
-        \r
+\r
         HelpTextList = [HelpTextObj]\r
 \r
         ExpectedStr = 'Hello world1'\r
         HelpTextObj = TextObject()\r
         HelpTextObj.SetLang(TAB_LANGUAGE_ENG)\r
-        HelpTextObj.SetString(ExpectedStr)        \r
-        \r
+        HelpTextObj.SetString(ExpectedStr)\r
+\r
         HelpTextList.append(HelpTextObj)\r
-        \r
+\r
         Result = _GetHelpStr(HelpTextList)\r
         self.assertEqual(Result, ExpectedStr)\r
 \r
@@ -110,15 +110,15 @@ class _GetHelpStrTest(unittest.TestCase):
         ExpectedStr = 'Hello world1'\r
         HelpTextObj = TextObject()\r
         HelpTextObj.SetLang(TAB_LANGUAGE_ENG)\r
-        HelpTextObj.SetString(ExpectedStr)        \r
+        HelpTextObj.SetString(ExpectedStr)\r
         HelpTextList = [HelpTextObj]\r
-      \r
+\r
         HelpStr = 'Hello world'\r
         HelpTextObj = TextObject()\r
         HelpTextObj.SetLang('')\r
-        HelpTextObj.SetString(HelpStr)        \r
+        HelpTextObj.SetString(HelpStr)\r
         HelpTextList.append(HelpTextObj)\r
-        \r
+\r
         Result = _GetHelpStr(HelpTextList)\r
         self.assertEqual(Result, ExpectedStr)\r
 \r
@@ -130,27 +130,27 @@ class _GetHelpStrTest(unittest.TestCase):
         ExpectedStr = 'Hello world1'\r
         HelpTextObj = TextObject()\r
         HelpTextObj.SetLang(TAB_LANGUAGE_EN_US)\r
-        HelpTextObj.SetString(ExpectedStr)        \r
+        HelpTextObj.SetString(ExpectedStr)\r
         HelpTextList = [HelpTextObj]\r
-      \r
+\r
         HelpStr = 'Hello unknown world'\r
         HelpTextObj = TextObject()\r
         HelpTextObj.SetLang('')\r
-        HelpTextObj.SetString(HelpStr)        \r
+        HelpTextObj.SetString(HelpStr)\r
         HelpTextList.append(HelpTextObj)\r
 \r
         HelpStr = 'Hello mysterious world'\r
         HelpTextObj = TextObject()\r
         HelpTextObj.SetLang('')\r
-        HelpTextObj.SetString(HelpStr)        \r
+        HelpTextObj.SetString(HelpStr)\r
         HelpTextList.append(HelpTextObj)\r
-                \r
+\r
         Result = _GetHelpStr(HelpTextList)\r
         self.assertEqual(Result, ExpectedStr)\r
-        \r
+\r
         HelpTextList.sort()\r
         self.assertEqual(Result, ExpectedStr)\r
-        \r
+\r
         HelpTextList.sort(reverse=True)\r
         self.assertEqual(Result, ExpectedStr)\r
 \r
@@ -160,15 +160,15 @@ class _GetHelpStrTest(unittest.TestCase):
 #\r
 class GenGuidSectionsTest(unittest.TestCase):\r
     def setUp(self):\r
-        pass      \r
+        pass\r
 \r
     def tearDown(self):\r
         pass\r
-    \r
+\r
     #\r
     # This is the API to generate Guid Object to help UnitTest\r
     #\r
-    def GuidFactory(self, CName, FFE, Usage, GuidType, VariableName, HelpStr):           \r
+    def GuidFactory(self, CName, FFE, Usage, GuidType, VariableName, HelpStr):\r
         Guid = GuidObject()\r
         Guid.SetCName(CName)\r
         Guid.SetFeatureFlag(FFE)\r
@@ -180,22 +180,22 @@ class GenGuidSectionsTest(unittest.TestCase):
         HelpTextObj.SetLang('')\r
         HelpTextObj.SetString(HelpStr)\r
         Guid.SetHelpTextList([HelpTextObj])\r
-        \r
-        return Guid      \r
-        \r
+\r
+        return Guid\r
+\r
     #\r
     # Normal case: have two GuidObject\r
     #\r
     def testNormalCase1(self):\r
         GuidList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
         Usage = 'PRODUCES'\r
         GuidType = 'Event'\r
         VariableName = ''\r
         HelpStr = 'Usage comment line 1'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
 \r
@@ -205,10 +205,10 @@ class GenGuidSectionsTest(unittest.TestCase):
         GuidType = 'Variable'\r
         VariableName = ''\r
         HelpStr = 'Usage comment line 2'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
-        GuidList.append(Guid1)        \r
-        \r
+        GuidList.append(Guid1)\r
+\r
         Result = GenGuidSections(GuidList)\r
         Expected = '''[Guids]\r
 ## PRODUCES ## Event # Usage comment line 1\r
@@ -221,14 +221,14 @@ Guid1|FFE1'''
     #\r
     def testNormalCase2(self):\r
         GuidList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
         Usage = 'PRODUCES'\r
         GuidType = 'Event'\r
         VariableName = ''\r
         HelpStr = 'Usage comment line 1'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
 \r
@@ -238,10 +238,10 @@ Guid1|FFE1'''
         GuidType = 'UNDEFINED'\r
         VariableName = ''\r
         HelpStr = 'Generic comment line 1\n Generic comment line 2'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
-        GuidList.append(Guid1)        \r
-        \r
+        GuidList.append(Guid1)\r
+\r
         Result = GenGuidSections(GuidList)\r
         Expected = '''[Guids]\r
 ## PRODUCES ## Event # Usage comment line 1\r
@@ -252,7 +252,7 @@ Guid1|FFE1'''
         self.assertEqual(Result.strip(), Expected)\r
 \r
     #\r
-    # Normal case: have two GuidObject, one help goes to generic help, \r
+    # Normal case: have two GuidObject, one help goes to generic help,\r
     # the other go into usage comment\r
     #\r
     def testNormalCase3(self):\r
@@ -264,20 +264,20 @@ Guid1|FFE1'''
         GuidType = 'UNDEFINED'\r
         VariableName = ''\r
         HelpStr = 'Generic comment'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
-        GuidList.append(Guid1)  \r
-                \r
+        GuidList.append(Guid1)\r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
         Usage = 'PRODUCES'\r
         GuidType = 'Event'\r
         VariableName = ''\r
         HelpStr = 'Usage comment line 1'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
-              \r
+\r
         Result = GenGuidSections(GuidList)\r
         Expected = '''[Guids]\r
 # Generic comment\r
@@ -298,10 +298,10 @@ Guid1|FFE1'''
         GuidType = 'UNDEFINED'\r
         VariableName = ''\r
         HelpStr = 'Generic comment line1 \n generic comment line 2'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
-        GuidList.append(Guid1)  \r
-              \r
+        GuidList.append(Guid1)\r
+\r
         Result = GenGuidSections(GuidList)\r
         Expected = '''[Guids]\r
 # Generic comment line1\r
@@ -315,17 +315,17 @@ Guid1|FFE1'''
     #\r
     def testNormalCase6(self):\r
         GuidList = []\r
-                \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
         Usage = 'PRODUCES'\r
         GuidType = 'Event'\r
         VariableName = ''\r
         HelpStr = 'Usage comment line 1\n Usage comment line 2'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
-              \r
+\r
         Result = GenGuidSections(GuidList)\r
         Expected = '''[Guids]\r
 Guid1|FFE1 ## PRODUCES ## Event # Usage comment line 1  Usage comment line 2\r
@@ -337,36 +337,36 @@ Guid1|FFE1 ## PRODUCES ## Event # Usage comment line 1  Usage comment line 2
     #\r
     def testNormalCase7(self):\r
         GuidList = []\r
-                \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
         Usage = 'UNDEFINED'\r
         GuidType = 'UNDEFINED'\r
         VariableName = ''\r
         HelpStr = 'Usage comment line 1'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
-              \r
+\r
         Result = GenGuidSections(GuidList)\r
         Expected = '''[Guids]\r
 Guid1|FFE1 # Usage comment line 1\r
 '''\r
         self.assertEqual(Result.strip(), Expected.strip())\r
-    \r
+\r
     #\r
     # Normal case: have two GuidObject\r
     #\r
     def testNormalCase8(self):\r
         GuidList = []\r
-                \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
         Usage = 'PRODUCES'\r
         GuidType = 'Event'\r
         VariableName = ''\r
         HelpStr = 'Usage comment line 1\n Usage comment line 2'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
 \r
@@ -376,10 +376,10 @@ Guid1|FFE1 # Usage comment line 1
         GuidType = 'Event'\r
         VariableName = ''\r
         HelpStr = 'Usage comment line 3'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
-              \r
+\r
         Result = GenGuidSections(GuidList)\r
         Expected = '''[Guids]\r
 ## PRODUCES ## Event # Usage comment line 1  Usage comment line 2\r
@@ -403,14 +403,14 @@ Guid1|FFE1
     #\r
     def testNormalCase10(self):\r
         GuidList = []\r
-                \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
         Usage = 'UNDEFINED'\r
         GuidType = 'UNDEFINED'\r
         VariableName = ''\r
         HelpStr = ''\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
 \r
@@ -425,14 +425,14 @@ Guid1|FFE1
     #\r
     def testNormalCase11(self):\r
         GuidList = []\r
-                \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
         Usage = 'UNDEFINED'\r
         GuidType = 'UNDEFINED'\r
         VariableName = ''\r
         HelpStr = 'general comment line 1'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
 \r
@@ -442,7 +442,7 @@ Guid1|FFE1
         GuidType = 'Event'\r
         VariableName = ''\r
         HelpStr = 'Usage comment line 3'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
 \r
@@ -452,10 +452,10 @@ Guid1|FFE1
         GuidType = 'UNDEFINED'\r
         VariableName = ''\r
         HelpStr = 'general comment line 2'\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
-                      \r
+\r
         Result = GenGuidSections(GuidList)\r
         Expected = '''[Guids]\r
 # general comment line 1\r
@@ -470,14 +470,14 @@ Guid1|FFE1
     #\r
     def testNormalCase12(self):\r
         GuidList = []\r
-                \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
         Usage = 'PRODUCES'\r
         GuidType = 'GUID'\r
         VariableName = ''\r
         HelpStr = ''\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
 \r
@@ -487,7 +487,7 @@ Guid1|FFE1
         GuidType = 'Event'\r
         VariableName = ''\r
         HelpStr = ''\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
 \r
@@ -497,10 +497,10 @@ Guid1|FFE1
         GuidType = 'Event'\r
         VariableName = ''\r
         HelpStr = ''\r
-        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType, \r
+        Guid1 = self.GuidFactory(CName, FFE, Usage, GuidType,\r
                                  VariableName, HelpStr)\r
         GuidList.append(Guid1)\r
-                      \r
+\r
         Result = GenGuidSections(GuidList)\r
         Expected = '''[Guids]\r
 ## PRODUCES ## GUID\r
@@ -509,17 +509,17 @@ Guid1|FFE1
 Guid1|FFE1\r
 '''\r
         self.assertEqual(Result.strip(), Expected.strip())\r
-        \r
+\r
 #\r
 # Test GenProtocolPPiSections\r
 #\r
 class GenProtocolPPiSectionsTest(unittest.TestCase):\r
     def setUp(self):\r
-        pass      \r
+        pass\r
 \r
     def tearDown(self):\r
         pass\r
-    \r
+\r
     #\r
     # This is the API to generate Protocol/Ppi Object to help UnitTest\r
     #\r
@@ -528,7 +528,7 @@ class GenProtocolPPiSectionsTest(unittest.TestCase):
             Object = ProtocolObject()\r
         else:\r
             Object = PpiObject()\r
-        \r
+\r
         Object.SetCName(CName)\r
         Object.SetFeatureFlag(FFE)\r
         Object.SetUsage(Usage)\r
@@ -538,8 +538,8 @@ class GenProtocolPPiSectionsTest(unittest.TestCase):
         HelpTextObj.SetLang('')\r
         HelpTextObj.SetString(HelpStr)\r
         Object.SetHelpTextList([HelpTextObj])\r
-        \r
-        return Object      \r
+\r
+        return Object\r
 \r
     #    Usage        Notify    Help    INF Comment\r
     #1   UNDEFINED    true    Present    ## UNDEFINED ## NOTIFY # Help\r
@@ -557,19 +557,19 @@ class GenProtocolPPiSectionsTest(unittest.TestCase):
 \r
     def testNormalCase1(self):\r
         ObjectList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
-        \r
+\r
         Usage = 'UNDEFINED'\r
         Notify = True\r
         HelpStr = 'Help'\r
         IsProtocol = True\r
-        Object = self.ObjectFactory(CName, FFE, Usage, Notify, \r
+        Object = self.ObjectFactory(CName, FFE, Usage, Notify,\r
                                  HelpStr, IsProtocol)\r
         ObjectList.append(Object)\r
-      \r
-        \r
+\r
+\r
         Result = GenProtocolPPiSections(ObjectList, IsProtocol)\r
         Expected = '''[Protocols]\r
 Guid1|FFE1 ## UNDEFINED ## NOTIFY # Help'''\r
@@ -577,11 +577,11 @@ Guid1|FFE1 ## UNDEFINED ## NOTIFY # Help'''
 \r
         IsProtocol = False\r
         ObjectList = []\r
-        Object = self.ObjectFactory(CName, FFE, Usage, Notify, \r
+        Object = self.ObjectFactory(CName, FFE, Usage, Notify,\r
                                  HelpStr, IsProtocol)\r
         ObjectList.append(Object)\r
-      \r
-        \r
+\r
+\r
         Result = GenProtocolPPiSections(ObjectList, IsProtocol)\r
         Expected = '''[Ppis]\r
 Guid1|FFE1 ## UNDEFINED ## NOTIFY # Help'''\r
@@ -589,19 +589,19 @@ Guid1|FFE1 ## UNDEFINED ## NOTIFY # Help'''
 \r
     def testNormalCase2(self):\r
         ObjectList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
-        \r
+\r
         Usage = 'UNDEFINED'\r
         Notify = True\r
         HelpStr = ''\r
         IsProtocol = True\r
-        Object = self.ObjectFactory(CName, FFE, Usage, Notify, \r
+        Object = self.ObjectFactory(CName, FFE, Usage, Notify,\r
                                  HelpStr, IsProtocol)\r
         ObjectList.append(Object)\r
-      \r
-        \r
+\r
+\r
         Result = GenProtocolPPiSections(ObjectList, IsProtocol)\r
         Expected = '''[Protocols]\r
 Guid1|FFE1 ## UNDEFINED ## NOTIFY'''\r
@@ -609,19 +609,19 @@ Guid1|FFE1 ## UNDEFINED ## NOTIFY'''
 \r
     def testNormalCase3(self):\r
         ObjectList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
-        \r
+\r
         Usage = 'UNDEFINED'\r
         Notify = False\r
         HelpStr = 'Help'\r
         IsProtocol = True\r
-        Object = self.ObjectFactory(CName, FFE, Usage, Notify, \r
+        Object = self.ObjectFactory(CName, FFE, Usage, Notify,\r
                                  HelpStr, IsProtocol)\r
         ObjectList.append(Object)\r
-      \r
-        \r
+\r
+\r
         Result = GenProtocolPPiSections(ObjectList, IsProtocol)\r
         Expected = '''[Protocols]\r
 Guid1|FFE1 ## UNDEFINED # Help'''\r
@@ -629,19 +629,19 @@ Guid1|FFE1 ## UNDEFINED # Help'''
 \r
     def testNormalCase4(self):\r
         ObjectList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
-        \r
+\r
         Usage = 'UNDEFINED'\r
         Notify = False\r
         HelpStr = ''\r
         IsProtocol = True\r
-        Object = self.ObjectFactory(CName, FFE, Usage, Notify, \r
+        Object = self.ObjectFactory(CName, FFE, Usage, Notify,\r
                                  HelpStr, IsProtocol)\r
         ObjectList.append(Object)\r
-      \r
-        \r
+\r
+\r
         Result = GenProtocolPPiSections(ObjectList, IsProtocol)\r
         Expected = '''[Protocols]\r
 Guid1|FFE1 ## UNDEFINED'''\r
@@ -649,19 +649,19 @@ Guid1|FFE1 ## UNDEFINED'''
 \r
     def testNormalCase5(self):\r
         ObjectList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
-        \r
+\r
         Usage = 'UNDEFINED'\r
         Notify = ''\r
         HelpStr = 'Help'\r
         IsProtocol = True\r
-        Object = self.ObjectFactory(CName, FFE, Usage, Notify, \r
+        Object = self.ObjectFactory(CName, FFE, Usage, Notify,\r
                                  HelpStr, IsProtocol)\r
         ObjectList.append(Object)\r
-      \r
-        \r
+\r
+\r
         Result = GenProtocolPPiSections(ObjectList, IsProtocol)\r
         Expected = '''[Protocols]\r
 Guid1|FFE1 # Help'''\r
@@ -669,19 +669,19 @@ Guid1|FFE1 # Help'''
 \r
     def testNormalCase6(self):\r
         ObjectList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
-        \r
+\r
         Usage = 'UNDEFINED'\r
         Notify = ''\r
         HelpStr = ''\r
         IsProtocol = True\r
-        Object = self.ObjectFactory(CName, FFE, Usage, Notify, \r
+        Object = self.ObjectFactory(CName, FFE, Usage, Notify,\r
                                  HelpStr, IsProtocol)\r
         ObjectList.append(Object)\r
-      \r
-        \r
+\r
+\r
         Result = GenProtocolPPiSections(ObjectList, IsProtocol)\r
         Expected = '''[Protocols]\r
 Guid1|FFE1'''\r
@@ -689,19 +689,19 @@ Guid1|FFE1'''
 \r
     def testNormalCase7(self):\r
         ObjectList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
-        \r
+\r
         Usage = 'PRODUCES'\r
         Notify = True\r
         HelpStr = 'Help'\r
         IsProtocol = True\r
-        Object = self.ObjectFactory(CName, FFE, Usage, Notify, \r
+        Object = self.ObjectFactory(CName, FFE, Usage, Notify,\r
                                  HelpStr, IsProtocol)\r
         ObjectList.append(Object)\r
-      \r
-        \r
+\r
+\r
         Result = GenProtocolPPiSections(ObjectList, IsProtocol)\r
         Expected = '''[Protocols]\r
 Guid1|FFE1 ## PRODUCES ## NOTIFY # Help'''\r
@@ -709,19 +709,19 @@ Guid1|FFE1 ## PRODUCES ## NOTIFY # Help'''
 \r
     def testNormalCase8(self):\r
         ObjectList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
-        \r
+\r
         Usage = 'PRODUCES'\r
         Notify = True\r
         HelpStr = ''\r
         IsProtocol = True\r
-        Object = self.ObjectFactory(CName, FFE, Usage, Notify, \r
+        Object = self.ObjectFactory(CName, FFE, Usage, Notify,\r
                                  HelpStr, IsProtocol)\r
         ObjectList.append(Object)\r
-      \r
-        \r
+\r
+\r
         Result = GenProtocolPPiSections(ObjectList, IsProtocol)\r
         Expected = '''[Protocols]\r
 Guid1|FFE1 ## PRODUCES ## NOTIFY'''\r
@@ -729,19 +729,19 @@ Guid1|FFE1 ## PRODUCES ## NOTIFY'''
 \r
     def testNormalCase9(self):\r
         ObjectList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
-        \r
+\r
         Usage = 'PRODUCES'\r
         Notify = False\r
         HelpStr = 'Help'\r
         IsProtocol = True\r
-        Object = self.ObjectFactory(CName, FFE, Usage, Notify, \r
+        Object = self.ObjectFactory(CName, FFE, Usage, Notify,\r
                                  HelpStr, IsProtocol)\r
         ObjectList.append(Object)\r
-      \r
-        \r
+\r
+\r
         Result = GenProtocolPPiSections(ObjectList, IsProtocol)\r
         Expected = '''[Protocols]\r
 Guid1|FFE1 ## PRODUCES # Help'''\r
@@ -749,19 +749,19 @@ Guid1|FFE1 ## PRODUCES # Help'''
 \r
     def testNormalCaseA(self):\r
         ObjectList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
-        \r
+\r
         Usage = 'PRODUCES'\r
         Notify = False\r
         HelpStr = ''\r
         IsProtocol = True\r
-        Object = self.ObjectFactory(CName, FFE, Usage, Notify, \r
+        Object = self.ObjectFactory(CName, FFE, Usage, Notify,\r
                                  HelpStr, IsProtocol)\r
         ObjectList.append(Object)\r
-      \r
-        \r
+\r
+\r
         Result = GenProtocolPPiSections(ObjectList, IsProtocol)\r
         Expected = '''[Protocols]\r
 Guid1|FFE1 ## PRODUCES'''\r
@@ -769,19 +769,19 @@ Guid1|FFE1 ## PRODUCES'''
 \r
     def testNormalCaseB(self):\r
         ObjectList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
-        \r
+\r
         Usage = 'PRODUCES'\r
         Notify = ''\r
         HelpStr = 'Help'\r
         IsProtocol = True\r
-        Object = self.ObjectFactory(CName, FFE, Usage, Notify, \r
+        Object = self.ObjectFactory(CName, FFE, Usage, Notify,\r
                                  HelpStr, IsProtocol)\r
         ObjectList.append(Object)\r
-      \r
-        \r
+\r
+\r
         Result = GenProtocolPPiSections(ObjectList, IsProtocol)\r
         Expected = '''[Protocols]\r
 Guid1|FFE1 ## PRODUCES # Help'''\r
@@ -789,19 +789,19 @@ Guid1|FFE1 ## PRODUCES # Help'''
 \r
     def testNormalCaseC(self):\r
         ObjectList = []\r
-        \r
+\r
         CName = 'Guid1'\r
         FFE = 'FFE1'\r
-        \r
+\r
         Usage = 'PRODUCES'\r
         Notify = ''\r
         HelpStr = ''\r
         IsProtocol = True\r
-        Object = self.ObjectFactory(CName, FFE, Usage, Notify, \r
+        Object = self.ObjectFactory(CName, FFE, Usage, Notify,\r
                                  HelpStr, IsProtocol)\r
         ObjectList.append(Object)\r
-      \r
-        \r
+\r
+\r
         Result = GenProtocolPPiSections(ObjectList, IsProtocol)\r
         Expected = '''[Protocols]\r
 Guid1|FFE1 ## PRODUCES'''\r
@@ -812,18 +812,18 @@ Guid1|FFE1 ## PRODUCES'''
 #\r
 class GenPcdSectionsTest(unittest.TestCase):\r
     def setUp(self):\r
-        pass      \r
+        pass\r
 \r
     def tearDown(self):\r
         pass\r
-    \r
+\r
     #\r
     # This is the API to generate Pcd Object to help UnitTest\r
     #\r
     def ObjectFactory(self, ItemType, TSCName, CName, DValue, FFE, Usage, Str):\r
         Object = PcdObject()\r
         HelpStr = Str\r
-        \r
+\r
         Object.SetItemType(ItemType)\r
         Object.SetTokenSpaceGuidCName(TSCName)\r
         Object.SetCName(CName)\r
@@ -835,8 +835,8 @@ class GenPcdSectionsTest(unittest.TestCase):
         HelpTextObj.SetLang('')\r
         HelpTextObj.SetString(HelpStr)\r
         Object.SetHelpTextList([HelpTextObj])\r
-        \r
-        return Object      \r
+\r
+        return Object\r
 \r
 \r
     #    Usage        Help    INF Comment\r
@@ -852,14 +852,14 @@ class GenPcdSectionsTest(unittest.TestCase):
         CName = 'CName'\r
         DValue = 'DValue'\r
         FFE = 'FFE'\r
-        \r
+\r
         Usage = 'UNDEFINED'\r
         Str = 'Help'\r
\r
-        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, \r
+\r
+        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,\r
                                     Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenPcdSections(ObjectList)\r
         Expected = \\r
             '[Pcd]\n' + \\r
@@ -873,14 +873,14 @@ class GenPcdSectionsTest(unittest.TestCase):
         CName = 'CName'\r
         DValue = 'DValue'\r
         FFE = 'FFE'\r
-        \r
+\r
         Usage = 'UNDEFINED'\r
         Str = ''\r
\r
-        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, \r
+\r
+        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,\r
                                     Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenPcdSections(ObjectList)\r
         Expected = '[Pcd]\nTSCName.CName|DValue|FFE'\r
         self.assertEqual(Result.strip(), Expected)\r
@@ -892,14 +892,14 @@ class GenPcdSectionsTest(unittest.TestCase):
         CName = 'CName'\r
         DValue = 'DValue'\r
         FFE = 'FFE'\r
-        \r
+\r
         Usage = 'CONSUMES'\r
         Str = 'Help'\r
\r
-        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, \r
+\r
+        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,\r
                                     Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenPcdSections(ObjectList)\r
         Expected = '[Pcd]\nTSCName.CName|DValue|FFE ## CONSUMES # Help'\r
         self.assertEqual(Result.strip(), Expected)\r
@@ -911,14 +911,14 @@ class GenPcdSectionsTest(unittest.TestCase):
         CName = 'CName'\r
         DValue = 'DValue'\r
         FFE = 'FFE'\r
-        \r
+\r
         Usage = 'CONSUMES'\r
         Str = ''\r
\r
-        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, \r
+\r
+        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,\r
                                     Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenPcdSections(ObjectList)\r
         Expected = '[Pcd]\nTSCName.CName|DValue|FFE ## CONSUMES'\r
         self.assertEqual(Result.strip(), Expected)\r
@@ -933,13 +933,13 @@ class GenPcdSectionsTest(unittest.TestCase):
         CName = 'CName'\r
         DValue = 'DValue'\r
         FFE = 'FFE'\r
-        \r
+\r
         Usage = 'CONSUMES'\r
         Str = 'commment line 1\ncomment line 2'\r
-        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, \r
+        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,\r
                                     Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenPcdSections(ObjectList)\r
         Expected = '''[Pcd]\r
 TSCName.CName|DValue|FFE ## CONSUMES # commment line 1 comment line 2'''\r
@@ -955,19 +955,19 @@ TSCName.CName|DValue|FFE ## CONSUMES # commment line 1 comment line 2'''
         CName = 'CName'\r
         DValue = 'DValue'\r
         FFE = 'FFE'\r
-        \r
+\r
         Usage = 'UNDEFINED'\r
         Str = 'commment line 1\ncomment line 2'\r
-        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, \r
+        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,\r
                                     Usage, Str)\r
         ObjectList.append(Object)\r
 \r
         Usage = 'UNDEFINED'\r
         Str = 'commment line 3'\r
-        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, \r
+        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,\r
                                     Usage, Str)\r
         ObjectList.append(Object)\r
-                \r
+\r
         Result = GenPcdSections(ObjectList)\r
         Expected = '''[Pcd]\r
 # commment line 1\r
@@ -986,25 +986,25 @@ TSCName.CName|DValue|FFE'''
         CName = 'CName'\r
         DValue = 'DValue'\r
         FFE = 'FFE'\r
-        \r
+\r
         Usage = 'UNDEFINED'\r
         Str = 'commment line 1\ncomment line 2'\r
-        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, \r
+        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,\r
                                     Usage, Str)\r
         ObjectList.append(Object)\r
 \r
         Usage = 'CONSUMES'\r
         Str = 'Foo'\r
-        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, \r
+        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,\r
                                     Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Usage = 'UNDEFINED'\r
         Str = 'commment line 3'\r
-        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, \r
+        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,\r
                                     Usage, Str)\r
         ObjectList.append(Object)\r
-                \r
+\r
         Result = GenPcdSections(ObjectList)\r
         Expected = '''[Pcd]\r
 # commment line 1\r
@@ -1028,13 +1028,13 @@ TSCName.CName|DValue|FFE'''
         CName = 'CName'\r
         DValue = 'DValue'\r
         FFE = 'FFE'\r
-        \r
+\r
         Usage = 'CONSUMES'\r
         Str = 'commment line 1\ncomment line 2'\r
-        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, \r
+        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,\r
                                     Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenPcdSections(ObjectList)\r
         Expected = '''[FeaturePcd]\r
 # commment line 1\r
@@ -1052,13 +1052,13 @@ TSCName.CName|DValue|FFE'''
         CName = 'CName'\r
         DValue = 'DValue'\r
         FFE = 'FFE'\r
-        \r
+\r
         Usage = 'CONSUMES'\r
         Str = ''\r
-        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, \r
+        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,\r
                                     Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenPcdSections(ObjectList)\r
         Expected = '''[FeaturePcd]\r
 TSCName.CName|DValue|FFE'''\r
@@ -1074,13 +1074,13 @@ TSCName.CName|DValue|FFE'''
         CName = 'CName'\r
         DValue = 'DValue'\r
         FFE = 'FFE'\r
-        \r
+\r
         Usage = 'PRODUCES'\r
         Str = 'commment line 1\ncomment line 2'\r
-        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE, \r
+        Object = self.ObjectFactory(ItemType, TSCName, CName, DValue, FFE,\r
                                     Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenPcdSections(ObjectList)\r
         Expected = '''\r
 \r
@@ -1097,28 +1097,28 @@ TSCName.CName|DValue|FFE
 #\r
 class GenHobSectionsTest(unittest.TestCase):\r
     def setUp(self):\r
-        pass      \r
+        pass\r
 \r
     def tearDown(self):\r
         pass\r
-    \r
+\r
     #\r
     # This is the API to generate Event Object to help UnitTest\r
     #\r
     def ObjectFactory(self, SupArchList, Type, Usage, Str):\r
         Object = HobObject()\r
         HelpStr = Str\r
-        \r
+\r
         Object.SetHobType(Type)\r
         Object.SetUsage(Usage)\r
         Object.SetSupArchList(SupArchList)\r
-        \r
+\r
         HelpTextObj = TextObject()\r
         HelpTextObj.SetLang('')\r
         HelpTextObj.SetString(HelpStr)\r
         Object.SetHelpTextList([HelpTextObj])\r
-        \r
-        return Object      \r
+\r
+        return Object\r
 \r
     def testNormalCase1(self):\r
         ObjectList = []\r
@@ -1126,10 +1126,10 @@ class GenHobSectionsTest(unittest.TestCase):
         Type = 'Foo'\r
         Usage = 'UNDEFINED'\r
         Str = 'Help'\r
\r
+\r
         Object = self.ObjectFactory(SupArchList, Type, Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenSpecialSections(ObjectList, 'Hob')\r
         Expected = '''# [Hob.X64]\r
 # ##\r
@@ -1147,10 +1147,10 @@ class GenHobSectionsTest(unittest.TestCase):
         Type = 'Foo'\r
         Usage = 'UNDEFINED'\r
         Str = 'Help'\r
\r
+\r
         Object = self.ObjectFactory(SupArchList, Type, Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenSpecialSections(ObjectList, 'Hob')\r
         Expected = '''# [Hob]\r
 # ##\r
@@ -1161,17 +1161,17 @@ class GenHobSectionsTest(unittest.TestCase):
 #\r
 '''\r
         self.assertEqual(Result, Expected)\r
-        \r
+\r
     def testNormalCase3(self):\r
         ObjectList = []\r
         SupArchList = ['X64']\r
         Type = 'Foo'\r
         Usage = 'UNDEFINED'\r
         Str = '\nComment Line 1\n\n'\r
\r
+\r
         Object = self.ObjectFactory(SupArchList, Type, Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenSpecialSections(ObjectList, 'Hob')\r
         Expected = '''# [Hob.X64]\r
 # ##\r
@@ -1189,10 +1189,10 @@ class GenHobSectionsTest(unittest.TestCase):
         Type = 'Foo'\r
         Usage = 'UNDEFINED'\r
         Str = '\nComment Line 1\n'\r
\r
+\r
         Object = self.ObjectFactory(SupArchList, Type, Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenSpecialSections(ObjectList, 'Hob')\r
         Expected = '''# [Hob.X64]\r
 # ##\r
@@ -1210,10 +1210,10 @@ class GenHobSectionsTest(unittest.TestCase):
         Type = 'Foo'\r
         Usage = 'UNDEFINED'\r
         Str = 'Comment Line 1\n\n'\r
\r
+\r
         Object = self.ObjectFactory(SupArchList, Type, Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenSpecialSections(ObjectList, 'Hob')\r
         Expected = '''# [Hob.X64]\r
 # ##\r
@@ -1231,17 +1231,17 @@ class GenHobSectionsTest(unittest.TestCase):
         Type = 'Foo'\r
         Usage = 'UNDEFINED'\r
         Str = ''\r
-        \r
+\r
         Object = self.ObjectFactory(SupArchList, Type, Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenSpecialSections(ObjectList, 'Hob')\r
         Expected = '''# [Hob.X64]\r
 # Foo ## UNDEFINED\r
 #\r
 #\r
 '''\r
-        self.assertEqual(Result, Expected)    \r
+        self.assertEqual(Result, Expected)\r
 \r
     def testNormalCase7(self):\r
         ObjectList = []\r
@@ -1250,10 +1250,10 @@ class GenHobSectionsTest(unittest.TestCase):
         Usage = 'UNDEFINED'\r
         Str = '\nNew Stack HoB'\r
 \r
-        \r
+\r
         Object = self.ObjectFactory(SupArchList, Type, Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenSpecialSections(ObjectList, 'Hob')\r
         Expected = '''# [Hob.X64]\r
 # ##\r
@@ -1272,10 +1272,10 @@ class GenHobSectionsTest(unittest.TestCase):
         Usage = 'UNDEFINED'\r
         Str = '\nNew Stack HoB\n\nTail Comment'\r
 \r
-        \r
+\r
         Object = self.ObjectFactory(SupArchList, Type, Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenSpecialSections(ObjectList, 'Hob')\r
         Expected = '''# [Hob.X64]\r
 # ##\r
@@ -1287,7 +1287,7 @@ class GenHobSectionsTest(unittest.TestCase):
 #\r
 #\r
 '''\r
-        self.assertEqual(Result, Expected) \r
+        self.assertEqual(Result, Expected)\r
 \r
     def testNormalCase9(self):\r
         ObjectList = []\r
@@ -1296,10 +1296,10 @@ class GenHobSectionsTest(unittest.TestCase):
         Usage = 'UNDEFINED'\r
         Str = '\n\n'\r
 \r
-        \r
+\r
         Object = self.ObjectFactory(SupArchList, Type, Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenSpecialSections(ObjectList, 'Hob')\r
         Expected = '''# [Hob.X64]\r
 # ##\r
@@ -1309,7 +1309,7 @@ class GenHobSectionsTest(unittest.TestCase):
 #\r
 #\r
 '''\r
-        self.assertEqual(Result, Expected) \r
+        self.assertEqual(Result, Expected)\r
 \r
     def testNormalCase10(self):\r
         ObjectList = []\r
@@ -1320,7 +1320,7 @@ class GenHobSectionsTest(unittest.TestCase):
 \r
         Object = self.ObjectFactory(SupArchList, Type, Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenSpecialSections(ObjectList, 'Hob')\r
         Expected = '''# [Hob.X64]\r
 # ##\r
@@ -1330,7 +1330,7 @@ class GenHobSectionsTest(unittest.TestCase):
 #\r
 #\r
 '''\r
-        self.assertEqual(Result, Expected) \r
+        self.assertEqual(Result, Expected)\r
 \r
     def testNormalCase11(self):\r
         ObjectList = []\r
@@ -1341,7 +1341,7 @@ class GenHobSectionsTest(unittest.TestCase):
 \r
         Object = self.ObjectFactory(SupArchList, Type, Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenSpecialSections(ObjectList, 'Hob')\r
         Expected = '''# [Hob.X64]\r
 # ##\r
@@ -1351,7 +1351,7 @@ class GenHobSectionsTest(unittest.TestCase):
 #\r
 #\r
 '''\r
-        self.assertEqual(Result, Expected) \r
+        self.assertEqual(Result, Expected)\r
 \r
     def testNormalCase12(self):\r
         ObjectList = []\r
@@ -1362,7 +1362,7 @@ class GenHobSectionsTest(unittest.TestCase):
 \r
         Object = self.ObjectFactory(SupArchList, Type, Usage, Str)\r
         ObjectList.append(Object)\r
-        \r
+\r
         Result = GenSpecialSections(ObjectList, 'Hob')\r
         Expected = '''# [Hob.X64]\r
 # ##\r
@@ -1373,18 +1373,18 @@ class GenHobSectionsTest(unittest.TestCase):
 #\r
 #\r
 '''\r
-        self.assertEqual(Result, Expected) \r
-    \r
+        self.assertEqual(Result, Expected)\r
+\r
 #\r
 # Test GenGenericCommentF\r
 #\r
 class GenGenericCommentFTest(unittest.TestCase):\r
     def setUp(self):\r
-        pass      \r
+        pass\r
 \r
     def tearDown(self):\r
         pass\r
-    \r
+\r
     def testNormalCase1(self):\r
         CommentLines = 'Comment Line 1'\r
         Result = GenGenericCommentF(CommentLines)\r
@@ -1395,26 +1395,26 @@ class GenGenericCommentFTest(unittest.TestCase):
         CommentLines = '\n'\r
         Result = GenGenericCommentF(CommentLines)\r
         Expected = '#\n'\r
-        self.assertEqual(Result, Expected)        \r
+        self.assertEqual(Result, Expected)\r
 \r
     def testNormalCase3(self):\r
         CommentLines = '\n\n\n'\r
         Result = GenGenericCommentF(CommentLines)\r
         Expected = '#\n#\n#\n'\r
-        self.assertEqual(Result, Expected)  \r
+        self.assertEqual(Result, Expected)\r
 \r
     def testNormalCase4(self):\r
         CommentLines = 'coment line 1\n'\r
         Result = GenGenericCommentF(CommentLines)\r
         Expected = '# coment line 1\n'\r
-        self.assertEqual(Result, Expected)  \r
-        \r
+        self.assertEqual(Result, Expected)\r
+\r
     def testNormalCase5(self):\r
         CommentLines = 'coment line 1\n coment line 2\n'\r
         Result = GenGenericCommentF(CommentLines)\r
         Expected = '# coment line 1\n# coment line 2\n'\r
-        self.assertEqual(Result, Expected)          \r
-                \r
+        self.assertEqual(Result, Expected)\r
+\r
 if __name__ == '__main__':\r
     Logger.Initialize()\r
-    unittest.main()
\ No newline at end of file
+    unittest.main()\r
index 4593506e58d5261f3ebc7636fd744c7dfcfe2202..e719567f99191836a09da316b7bed652ddfb6eb0 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -32,7 +32,7 @@ class ParseHeaderCommentSectionTest(unittest.TestCase):
 \r
     def tearDown(self):\r
         pass\r
\r
+\r
     #\r
     # Normal case1: have license/copyright/license above @file\r
     #\r
@@ -42,36 +42,36 @@ class ParseHeaderCommentSectionTest(unittest.TestCase):
         # License2\r
         #\r
         ## @file\r
-        # example abstract \r
-        # \r
+        # example abstract\r
+        #\r
         # example description\r
-        # \r
-        # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
-        # \r
-        # License3 \r
+        #\r
+        # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+        #\r
+        # License3\r
         #'''\r
-        \r
+\r
         CommentList = GetSplitValueList(TestCommentLines1, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-            \r
+\r
         Abstract, Description, Copyright, License = \\r
             ParseHeaderCommentSection(TestCommentLinesList, "PhonyFile")\r
-        \r
+\r
         ExpectedAbstract = 'example abstract'\r
         self.assertEqual(Abstract, ExpectedAbstract)\r
-        \r
+\r
         ExpectedDescription = 'example description'\r
         self.assertEqual(Description, ExpectedDescription)\r
-        \r
+\r
         ExpectedCopyright = \\r
             'Copyright (c) 2007 - 2010,'\\r
             ' Intel Corporation. All rights reserved.<BR>'\r
         self.assertEqual(Copyright, ExpectedCopyright)\r
-        \r
+\r
         ExpectedLicense = 'License1\nLicense2\n\nLicense3'\r
         self.assertEqual(License, ExpectedLicense)\r
 \r
@@ -84,41 +84,41 @@ class ParseHeaderCommentSectionTest(unittest.TestCase):
         # License2\r
         #\r
         ## @file\r
-        # example abstract \r
-        # \r
+        # example abstract\r
+        #\r
         # example description\r
         #\r
-        #Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+        #Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
         #\r
         ##'''\r
-        \r
+\r
         CommentList = GetSplitValueList(TestCommentLines2, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-            \r
+\r
         Abstract, Description, Copyright, License = \\r
             ParseHeaderCommentSection(TestCommentLinesList, "PhonyFile")\r
-        \r
+\r
         ExpectedAbstract = 'example abstract'\r
         self.assertEqual(Abstract, ExpectedAbstract)\r
-        \r
+\r
         ExpectedDescription = 'example description'\r
         self.assertEqual(Description, ExpectedDescription)\r
-        \r
+\r
         ExpectedCopyright = \\r
-            'Copyright (c) 2007 - 2010, Intel Corporation.'\\r
+            'Copyright (c) 2007 - 2018, Intel Corporation.'\\r
             ' All rights reserved.<BR>'\r
         self.assertEqual(Copyright, ExpectedCopyright)\r
-        \r
+\r
         ExpectedLicense = 'License1\nLicense2'\r
         self.assertEqual(License, ExpectedLicense)\r
-        \r
+\r
 \r
     #\r
-    # Normal case2: have license/copyright/license above @file, \r
+    # Normal case2: have license/copyright/license above @file,\r
     # but no abstract/description\r
     #\r
     def testNormalCase3(self):\r
@@ -126,41 +126,41 @@ class ParseHeaderCommentSectionTest(unittest.TestCase):
         ''' # License1\r
         # License2\r
         #\r
-        ## @file \r
-        # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+        ## @file\r
+        # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
         #\r
         # License3 Line1\r
         # License3 Line2\r
         ##'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines3, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-            \r
+\r
         Abstract, Description, Copyright, License = \\r
             ParseHeaderCommentSection(TestCommentLinesList, "PhonyFile")\r
-        \r
+\r
         ExpectedAbstract = ''\r
         self.assertEqual(Abstract, ExpectedAbstract)\r
-        \r
+\r
         ExpectedDescription = ''\r
         self.assertEqual(Description, ExpectedDescription)\r
-        \r
+\r
         ExpectedCopyright = \\r
             'Copyright (c) 2007 - 2010,'\\r
             ' Intel Corporation. All rights reserved.<BR>'\r
         self.assertEqual(Copyright, ExpectedCopyright)\r
-        \r
+\r
         ExpectedLicense = \\r
             'License1\n' \\r
             'License2\n\n' \\r
             'License3 Line1\n' \\r
             'License3 Line2'\r
-        self.assertEqual(License, ExpectedLicense)        \r
-           \r
+        self.assertEqual(License, ExpectedLicense)\r
+\r
     #\r
     # Normal case4: format example in spec\r
     #\r
@@ -172,33 +172,33 @@ class ParseHeaderCommentSectionTest(unittest.TestCase):
         #\r
         # Description\r
         #\r
-        # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+        # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
         #\r
         # License\r
         #\r
         ##'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-            \r
+\r
         Abstract, Description, Copyright, License = \\r
             ParseHeaderCommentSection(TestCommentLinesList, "PhonyFile")\r
-        \r
+\r
         ExpectedAbstract = 'Abstract'\r
         self.assertEqual(Abstract, ExpectedAbstract)\r
-        \r
+\r
         ExpectedDescription = 'Description'\r
         self.assertEqual(Description, ExpectedDescription)\r
-        \r
+\r
         ExpectedCopyright = \\r
-            'Copyright (c) 2007 - 2010, Intel Corporation.'\\r
+            'Copyright (c) 2007 - 2018, Intel Corporation.'\\r
             ' All rights reserved.<BR>'\r
         self.assertEqual(Copyright, ExpectedCopyright)\r
-        \r
+\r
         ExpectedLicense = \\r
             'License'\r
         self.assertEqual(License, ExpectedLicense)\r
@@ -214,37 +214,37 @@ class ParseHeaderCommentSectionTest(unittest.TestCase):
         #\r
         # Description\r
         #\r
-        # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
-        # other line        \r
-        # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+        # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+        # other line\r
+        # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
         #\r
         # License\r
         #\r
         ##'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-            \r
+\r
         Abstract, Description, Copyright, License = \\r
             ParseHeaderCommentSection(TestCommentLinesList, "PhonyFile")\r
-        \r
+\r
         ExpectedAbstract = 'Abstract'\r
         self.assertEqual(Abstract, ExpectedAbstract)\r
-        \r
+\r
         ExpectedDescription = 'Description'\r
         self.assertEqual(Description, ExpectedDescription)\r
-        \r
+\r
         ExpectedCopyright = \\r
-            'Copyright (c) 2007 - 2010, Intel Corporation.'\\r
+            'Copyright (c) 2007 - 2018, Intel Corporation.'\\r
             ' All rights reserved.<BR>\n'\\r
-            'Copyright (c) 2007 - 2010, Intel Corporation.'\\r
+            'Copyright (c) 2007 - 2018, Intel Corporation.'\\r
             ' All rights reserved.<BR>'\r
         self.assertEqual(Copyright, ExpectedCopyright)\r
-        \r
+\r
         ExpectedLicense = \\r
             'License'\r
         self.assertEqual(License, ExpectedLicense)\r
@@ -260,39 +260,39 @@ class ParseHeaderCommentSectionTest(unittest.TestCase):
         #\r
         # Description\r
         #\r
-        # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
-        # Copyright (c) 2007 - 2010, FOO1 Corporation. All rights reserved.<BR>      \r
+        # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+        # Copyright (c) 2007 - 2010, FOO1 Corporation. All rights reserved.<BR>\r
         # Copyright (c) 2007 - 2010, FOO2 Corporation. All rights reserved.<BR>\r
         #\r
         # License\r
         #\r
         ##'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-            \r
+\r
         Abstract, Description, Copyright, License = \\r
             ParseHeaderCommentSection(TestCommentLinesList, "PhonyFile")\r
-        \r
+\r
         ExpectedAbstract = 'Abstract'\r
         self.assertEqual(Abstract, ExpectedAbstract)\r
-        \r
+\r
         ExpectedDescription = 'Description'\r
         self.assertEqual(Description, ExpectedDescription)\r
-        \r
+\r
         ExpectedCopyright = \\r
-            'Copyright (c) 2007 - 2010, Intel Corporation.'\\r
+            'Copyright (c) 2007 - 2018, Intel Corporation.'\\r
             ' All rights reserved.<BR>\n'\\r
             'Copyright (c) 2007 - 2010, FOO1 Corporation.'\\r
             ' All rights reserved.<BR>\n'\\r
             'Copyright (c) 2007 - 2010, FOO2 Corporation.'\\r
             ' All rights reserved.<BR>'\r
         self.assertEqual(Copyright, ExpectedCopyright)\r
-        \r
+\r
         ExpectedLicense = \\r
             'License'\r
         self.assertEqual(License, ExpectedLicense)\r
@@ -307,39 +307,39 @@ class ParseHeaderCommentSectionTest(unittest.TestCase):
         #\r
         # Description\r
         #\r
-        # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
-        # Copyright (c) 2007 - 2010, FOO1 Corporation. All rights reserved.<BR>      \r
+        # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+        # Copyright (c) 2007 - 2010, FOO1 Corporation. All rights reserved.<BR>\r
         # Copyright (c) 2007 - 2010, FOO2 Corporation. All rights reserved.<BR>\r
         #\r
         # License\r
         #\r
         ##'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-            \r
+\r
         Abstract, Description, Copyright, License = \\r
             ParseHeaderCommentSection(TestCommentLinesList, "PhonyFile")\r
-        \r
+\r
         ExpectedAbstract = ''\r
         self.assertEqual(Abstract, ExpectedAbstract)\r
-        \r
+\r
         ExpectedDescription = 'Description'\r
         self.assertEqual(Description, ExpectedDescription)\r
-        \r
+\r
         ExpectedCopyright = \\r
-            'Copyright (c) 2007 - 2010, Intel Corporation.'\\r
+            'Copyright (c) 2007 - 2018, Intel Corporation.'\\r
             ' All rights reserved.<BR>\n'\\r
             'Copyright (c) 2007 - 2010, FOO1 Corporation.'\\r
             ' All rights reserved.<BR>\n'\\r
             'Copyright (c) 2007 - 2010, FOO2 Corporation.'\\r
             ' All rights reserved.<BR>'\r
         self.assertEqual(Copyright, ExpectedCopyright)\r
-        \r
+\r
         ExpectedLicense = \\r
             'License'\r
         self.assertEqual(License, ExpectedLicense)\r
@@ -353,37 +353,37 @@ class ParseHeaderCommentSectionTest(unittest.TestCase):
         ## @file\r
         # Abstact\r
         #\r
-        # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+        # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
         #\r
         # License\r
         #\r
         ##'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-            \r
+\r
         Abstract, Description, Copyright, License = \\r
             ParseHeaderCommentSection(TestCommentLinesList, "PhonyFile")\r
-        \r
+\r
         ExpectedAbstract = 'Abstact'\r
         self.assertEqual(Abstract, ExpectedAbstract)\r
-        \r
+\r
         ExpectedDescription = ''\r
         self.assertEqual(Description, ExpectedDescription)\r
-        \r
+\r
         ExpectedCopyright = \\r
-            'Copyright (c) 2007 - 2010, Intel Corporation.'\\r
+            'Copyright (c) 2007 - 2018, Intel Corporation.'\\r
             ' All rights reserved.<BR>'\r
         self.assertEqual(Copyright, ExpectedCopyright)\r
-        \r
+\r
         ExpectedLicense = \\r
             'License'\r
         self.assertEqual(License, ExpectedLicense)\r
-                \r
+\r
     #\r
     # Error case1: No copyright found\r
     #\r
@@ -398,18 +398,18 @@ class ParseHeaderCommentSectionTest(unittest.TestCase):
         # License\r
         #\r
         ##'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
-        self.assertRaises(Logger.FatalError, \r
-                          ParseHeaderCommentSection, \r
+\r
+        self.assertRaises(Logger.FatalError,\r
+                          ParseHeaderCommentSection,\r
                           TestCommentLinesList,\r
-                          "PhonyFile")    \r
+                          "PhonyFile")\r
 \r
     #\r
     # Error case2: non-empty non-comment lines passed in\r
@@ -423,22 +423,22 @@ class ParseHeaderCommentSectionTest(unittest.TestCase):
         this is invalid line\r
         # Description\r
         #\r
-        # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>        \r
+        # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
         # License\r
         #\r
         ##'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
-        self.assertRaises(Logger.FatalError, \r
-                          ParseHeaderCommentSection, \r
+\r
+        self.assertRaises(Logger.FatalError,\r
+                          ParseHeaderCommentSection,\r
                           TestCommentLinesList,\r
-                          "PhonyFile")   \r
+                          "PhonyFile")\r
 \r
 #\r
 # Test ParseGenericComment\r
@@ -449,14 +449,14 @@ class ParseGenericCommentTest(unittest.TestCase):
 \r
     def tearDown(self):\r
         pass\r
\r
+\r
     #\r
     # Normal case1: one line of comment\r
     #\r
     def testNormalCase1(self):\r
         TestCommentLines = \\r
         '''# hello world'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
@@ -476,17 +476,17 @@ class ParseGenericCommentTest(unittest.TestCase):
         TestCommentLines = \\r
         '''## hello world\r
         # second line'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         HelptxtObj = ParseGenericComment(TestCommentLinesList, 'testNormalCase2')\r
         self.failIf(not HelptxtObj)\r
-        self.assertEqual(HelptxtObj.GetString(), \r
+        self.assertEqual(HelptxtObj.GetString(),\r
                          'hello world\n' + 'second line')\r
         self.assertEqual(HelptxtObj.GetLang(), TAB_LANGUAGE_EN_US)\r
 \r
@@ -497,17 +497,17 @@ class ParseGenericCommentTest(unittest.TestCase):
         TestCommentLines = \\r
         '''## hello world\r
         This is not comment line'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         HelptxtObj = ParseGenericComment(TestCommentLinesList, 'testNormalCase3')\r
         self.failIf(not HelptxtObj)\r
-        self.assertEqual(HelptxtObj.GetString(), \r
+        self.assertEqual(HelptxtObj.GetString(),\r
                          'hello world\n\n')\r
         self.assertEqual(HelptxtObj.GetLang(), TAB_LANGUAGE_EN_US)\r
 \r
@@ -520,7 +520,7 @@ class ParseDecPcdGenericCommentTest(unittest.TestCase):
 \r
     def tearDown(self):\r
         pass\r
\r
+\r
     #\r
     # Normal case1: comments with no special comment\r
     #\r
@@ -528,22 +528,22 @@ class ParseDecPcdGenericCommentTest(unittest.TestCase):
         TestCommentLines = \\r
         '''## hello world\r
         # second line'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         (HelpTxt, PcdErr) = \\r
             ParseDecPcdGenericComment(TestCommentLinesList, 'testNormalCase1')\r
         self.failIf(not HelpTxt)\r
         self.failIf(PcdErr)\r
-        self.assertEqual(HelpTxt, \r
+        self.assertEqual(HelpTxt,\r
                          'hello world\n' + 'second line')\r
-       \r
-       \r
+\r
+\r
     #\r
     # Normal case2: comments with valid list\r
     #\r
@@ -553,19 +553,19 @@ class ParseDecPcdGenericCommentTest(unittest.TestCase):
         # second line\r
         # @ValidList 1, 2, 3\r
         # other line'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         (HelpTxt, PcdErr) = \\r
             ParseDecPcdGenericComment(TestCommentLinesList, 'UnitTest')\r
         self.failIf(not HelpTxt)\r
         self.failIf(not PcdErr)\r
-        self.assertEqual(HelpTxt, \r
+        self.assertEqual(HelpTxt,\r
                          'hello world\n' + 'second line\n' + 'other line')\r
         ExpectedList = GetSplitValueList('1 2 3', TAB_SPACE_SPLIT)\r
         ActualList = [item for item in \\r
@@ -583,19 +583,19 @@ class ParseDecPcdGenericCommentTest(unittest.TestCase):
         # second line\r
         # @ValidRange LT 1 AND GT 2\r
         # other line'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         (HelpTxt, PcdErr) = \\r
             ParseDecPcdGenericComment(TestCommentLinesList, 'UnitTest')\r
         self.failIf(not HelpTxt)\r
         self.failIf(not PcdErr)\r
-        self.assertEqual(HelpTxt, \r
+        self.assertEqual(HelpTxt,\r
                          'hello world\n' + 'second line\n' + 'other line')\r
         self.assertEqual(PcdErr.GetValidValueRange().strip(), 'LT 1 AND GT 2')\r
         self.failIf(PcdErr.GetExpression())\r
@@ -610,19 +610,19 @@ class ParseDecPcdGenericCommentTest(unittest.TestCase):
         # second line\r
         # @Expression LT 1 AND GT 2\r
         # other line'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         (HelpTxt, PcdErr) = \\r
             ParseDecPcdGenericComment(TestCommentLinesList, 'UnitTest')\r
         self.failIf(not HelpTxt)\r
         self.failIf(not PcdErr)\r
-        self.assertEqual(HelpTxt, \r
+        self.assertEqual(HelpTxt,\r
                          'hello world\n' + 'second line\n' + 'other line')\r
         self.assertEqual(PcdErr.GetExpression().strip(), 'LT 1 AND GT 2')\r
         self.failIf(PcdErr.GetValidValueRange())\r
@@ -634,14 +634,14 @@ class ParseDecPcdGenericCommentTest(unittest.TestCase):
     def testNormalCase5(self):\r
         TestCommentLines = \\r
         '''# @Expression LT 1 AND GT 2'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         (HelpTxt, PcdErr) = \\r
             ParseDecPcdGenericComment(TestCommentLinesList, 'UnitTest')\r
         self.failIf(HelpTxt)\r
@@ -649,28 +649,28 @@ class ParseDecPcdGenericCommentTest(unittest.TestCase):
         self.assertEqual(PcdErr.GetExpression().strip(), 'LT 1 AND GT 2')\r
         self.failIf(PcdErr.GetValidValueRange())\r
         self.failIf(PcdErr.GetValidValue())\r
\r
+\r
     #\r
     # Normal case6: comments with only generic help text\r
     #\r
     def testNormalCase6(self):\r
         TestCommentLines = \\r
         '''#'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         (HelpTxt, PcdErr) = \\r
             ParseDecPcdGenericComment(TestCommentLinesList, 'UnitTest')\r
         self.assertEqual(HelpTxt, '\n')\r
         self.failIf(PcdErr)\r
 \r
-        \r
-        \r
+\r
+\r
     #\r
     # Error case1: comments with both expression and valid list, use later\r
     # ignore the former and with a warning message\r
@@ -679,17 +679,17 @@ class ParseDecPcdGenericCommentTest(unittest.TestCase):
         TestCommentLines = \\r
         '''## hello world\r
         # second line\r
-        # @ValidList 1, 2, 3        \r
+        # @ValidList 1, 2, 3\r
         # @Expression LT 1 AND GT 2\r
         # other line'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         try:\r
             ParseDecPcdGenericComment(TestCommentLinesList, 'UnitTest')\r
         except Logger.FatalError:\r
@@ -704,26 +704,26 @@ class ParseDecPcdTailCommentTest(unittest.TestCase):
 \r
     def tearDown(self):\r
         pass\r
\r
+\r
     #\r
     # Normal case1: comments with no SupModeList\r
     #\r
     def testNormalCase1(self):\r
         TestCommentLines = \\r
         '''## #hello world'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         (SupModeList, HelpStr) = \\r
             ParseDecPcdTailComment(TestCommentLinesList, 'UnitTest')\r
         self.failIf(not HelpStr)\r
         self.failIf(SupModeList)\r
-        self.assertEqual(HelpStr, \r
+        self.assertEqual(HelpStr,\r
                          'hello world')\r
 \r
     #\r
@@ -732,44 +732,44 @@ class ParseDecPcdTailCommentTest(unittest.TestCase):
     def testNormalCase2(self):\r
         TestCommentLines = \\r
         '''## BASE #hello world'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         (SupModeList, HelpStr) = \\r
             ParseDecPcdTailComment(TestCommentLinesList, 'UnitTest')\r
         self.failIf(not HelpStr)\r
         self.failIf(not SupModeList)\r
-        self.assertEqual(HelpStr, \r
+        self.assertEqual(HelpStr,\r
                          'hello world')\r
-        self.assertEqual(SupModeList, \r
+        self.assertEqual(SupModeList,\r
                          ['BASE'])\r
-        \r
+\r
     #\r
     # Normal case3: comments with more than one SupMode\r
     #\r
     def testNormalCase3(self):\r
         TestCommentLines = \\r
         '''## BASE  UEFI_APPLICATION #hello world'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         (SupModeList, HelpStr) = \\r
             ParseDecPcdTailComment(TestCommentLinesList, 'UnitTest')\r
         self.failIf(not HelpStr)\r
         self.failIf(not SupModeList)\r
-        self.assertEqual(HelpStr, \r
+        self.assertEqual(HelpStr,\r
                          'hello world')\r
-        self.assertEqual(SupModeList, \r
+        self.assertEqual(SupModeList,\r
                          ['BASE', 'UEFI_APPLICATION'])\r
 \r
     #\r
@@ -778,58 +778,58 @@ class ParseDecPcdTailCommentTest(unittest.TestCase):
     def testNormalCase4(self):\r
         TestCommentLines = \\r
         '''## BASE  UEFI_APPLICATION'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         (SupModeList, HelpStr) = \\r
             ParseDecPcdTailComment(TestCommentLinesList, 'UnitTest')\r
         self.failIf(HelpStr)\r
         self.failIf(not SupModeList)\r
-        self.assertEqual(SupModeList, \r
+        self.assertEqual(SupModeList,\r
                          ['BASE', 'UEFI_APPLICATION'])\r
 \r
     #\r
-    # Normal case5: general comments with no supModList, extract from real case \r
+    # Normal case5: general comments with no supModList, extract from real case\r
     #\r
     def testNormalCase5(self):\r
         TestCommentLines = \\r
         ''' # 1 = 128MB, 2 = 256MB, 3 = MAX'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         (SupModeList, HelpStr) = \\r
             ParseDecPcdTailComment(TestCommentLinesList, 'UnitTest')\r
         self.failIf(not HelpStr)\r
-        self.assertEqual(HelpStr, \r
+        self.assertEqual(HelpStr,\r
                          '1 = 128MB, 2 = 256MB, 3 = MAX')\r
         self.failIf(SupModeList)\r
-        \r
+\r
 \r
     #\r
-    # Error case2: comments with supModList contains valid and invalid \r
+    # Error case2: comments with supModList contains valid and invalid\r
     # module type\r
     #\r
     def testErrorCase2(self):\r
         TestCommentLines = \\r
         '''## BASE INVALID_MODULE_TYPE #hello world'''\r
-     \r
+\r
         CommentList = GetSplitValueList(TestCommentLines, "\n")\r
         LineNum = 0\r
         TestCommentLinesList = []\r
         for Comment in CommentList:\r
             LineNum += 1\r
             TestCommentLinesList.append((Comment, LineNum))\r
-        \r
+\r
         try:\r
             ParseDecPcdTailComment(TestCommentLinesList, 'UnitTest')\r
         except Logger.FatalError:\r
@@ -869,7 +869,7 @@ class _IsCopyrightLineTest(unittest.TestCase):
         Line = 'this is not aCopyright ( line'\r
         Result = _IsCopyrightLine(Line)\r
         self.failIf(Result)\r
\r
+\r
     #\r
     # Normal case\r
     #\r
@@ -917,7 +917,7 @@ class _IsCopyrightLineTest(unittest.TestCase):
         Line = 'not a Copyright '\r
         Result = _IsCopyrightLine(Line)\r
         self.failIf(Result)\r
-        \r
+\r
 if __name__ == '__main__':\r
     Logger.Initialize()\r
-    unittest.main()
\ No newline at end of file
+    unittest.main()\r
index 5f0abcafef27927b77c6baa3d5b452340bfede8d..0ea5ea1e0fa8f0583cc1d8659ea3fdb341512468 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file contain unit test for DecParser\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -28,19 +28,19 @@ from Library.ParserValidate import IsValidCFormatGuid
 #\r
 def TestToolFuncs():\r
     assert IsValidCArray('{0x1, 0x23}')\r
-    \r
+\r
     # Empty after comma\r
     assert not IsValidCArray('{0x1, 0x23, }')\r
-    \r
+\r
     # 0x2345 too long\r
     assert not IsValidCArray('{0x1, 0x2345}')\r
-    \r
+\r
     # Must end with '}'\r
     assert not IsValidCArray('{0x1, 0x23, ')\r
-    \r
+\r
     # Whitespace between numbers\r
     assert not IsValidCArray('{0x1, 0x2 3, }')\r
-    \r
+\r
     assert IsValidPcdDatum('VOID*', '"test"')[0]\r
     assert IsValidPcdDatum('VOID*', 'L"test"')[0]\r
     assert IsValidPcdDatum('BOOLEAN', 'TRUE')[0]\r
@@ -48,10 +48,10 @@ def TestToolFuncs():
     assert IsValidPcdDatum('BOOLEAN', '0')[0]\r
     assert IsValidPcdDatum('BOOLEAN', '1')[0]\r
     assert IsValidPcdDatum('UINT8', '0xab')[0]\r
-    \r
+\r
     assert not IsValidPcdDatum('UNKNOWNTYPE', '0xabc')[0]\r
-    assert not IsValidPcdDatum('UINT8', 'not number')[0]   \r
-    \r
+    assert not IsValidPcdDatum('UINT8', 'not number')[0]\r
+\r
     assert( IsValidCFormatGuid('{ 0xfa0b1735 , 0x87a0, 0x4193, {0xb2, 0x66 , 0x53, 0x8c , 0x38, 0xaf, 0x48, 0xce }}'))\r
     assert( not IsValidCFormatGuid('{ 0xfa0b1735 , 0x87a0, 0x4193, {0xb2, 0x66 , 0x53, 0x8c , 0x38, 0xaf, 0x48, 0xce }} 0xaa'))\r
 \r
@@ -60,10 +60,10 @@ def TestTemplate(TestString, TestFunc):
     Path = os.path.normpath(Path)\r
     try:\r
         f = open(Path, 'w')\r
-        \r
+\r
         # Write test string to file\r
         f.write(TestString)\r
-        \r
+\r
         # Close file\r
         f.close()\r
     except:\r
@@ -72,7 +72,7 @@ def TestTemplate(TestString, TestFunc):
 \r
     # Call test function to test\r
     Ret = TestFunc(Path, TestString)\r
-    \r
+\r
     # Test done, remove temporary file\r
     os.remove(Path)\r
     return Ret\r
@@ -112,13 +112,13 @@ def TestDecDefine():
     assert DefObj.GetPackageName() == 'MdePkg'\r
     assert DefObj.GetPackageGuid() == '1E73767F-8F52-4603-AEB4-F29B510B6766'\r
     assert DefObj.GetPackageVersion() == '1.02'\r
-    \r
+\r
     TestString = '''\r
     [Defines]\r
       UNKNOW_KEY              = 0x00010005 # A unknown key\r
     '''\r
     assert TestTemplate(TestString, TestError)\r
-    \r
+\r
     TestString = '''\r
     [Defines]\r
       PACKAGE_GUID                   = F-8F52-4603-AEB4-F29B510B6766 # Error GUID\r
@@ -138,24 +138,24 @@ def TestDecInclude():
     [Includes.IA32]\r
       Include/Ia32\r
     '''\r
-    \r
+\r
     # Create directory in current directory\r
     try:\r
         os.makedirs('Include/Ia32')\r
     except:\r
         pass\r
     Parser = TestTemplate(TestString, TestOK)\r
-    \r
+\r
     IncObj = Parser.GetIncludeSectionObject()\r
     Items = IncObj.GetIncludes()\r
     assert len(Items) == 1\r
     assert Items[0].File == 'Include'\r
-    \r
+\r
     Items = IncObj.GetIncludes('IA32')\r
     assert len(Items) == 1\r
     # normpath is called in DEC parser so '/' is converted to '\'\r
     assert Items[0].File == 'Include\\Ia32'\r
-    \r
+\r
     TestString = '''\r
     [Defines]\r
       DEC_SPECIFICATION              = 0x00010005\r
@@ -166,7 +166,7 @@ def TestDecInclude():
       Include_not_exist  # directory does not exist\r
     '''\r
     assert TestTemplate(TestString, TestError)\r
-    \r
+\r
     os.removedirs('Include/Ia32')\r
 \r
 def TestDecGuidPpiProtocol():\r
@@ -196,14 +196,14 @@ def TestDecGuidPpiProtocol():
     assert len(Items) == 1\r
     assert Items[0].GuidCName == 'gEfiGlobalVariableGuid'\r
     assert Items[0].GuidCValue == '{ 0x8BE4DF61, 0x93CA, 0x11D2, { 0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C }}'\r
-    \r
+\r
     Obj = Parser.GetProtocolSectionObject()\r
     Items = Obj.GetProtocols()\r
     assert Obj.GetSectionName() == 'Protocols'.upper()\r
     assert len(Items) == 1\r
     assert Items[0].GuidCName == 'gEfiBdsArchProtocolGuid'\r
     assert Items[0].GuidCValue == '{ 0x665E3FF6, 0x46CC, 0x11D4, { 0x9A, 0x38, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }}'\r
-    \r
+\r
     Obj = Parser.GetPpiSectionObject()\r
     Items = Obj.GetPpis()\r
     assert Obj.GetSectionName() == 'Ppis'.upper()\r
@@ -221,19 +221,19 @@ def TestDecPcd():
     [PcdsFeatureFlag]\r
       ## If TRUE, the component name protocol will not be installed.\r
       gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|FALSE|BOOLEAN|0x0000000d\r
-      \r
+\r
     [PcdsFixedAtBuild]\r
       ## Indicates the maximum length of unicode string\r
       gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1000000|UINT32|0x00000001\r
-      \r
+\r
     [PcdsFixedAtBuild.IPF]\r
       ## The base address of IO port space for IA64 arch\r
       gEfiMdePkgTokenSpaceGuid.PcdIoBlockBaseAddressForIpf|0x0ffffc000000|UINT64|0x0000000f\r
-      \r
+\r
     [PcdsFixedAtBuild,PcdsPatchableInModule]\r
       ## This flag is used to control the printout of DebugLib\r
       gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000|UINT32|0x00000006\r
-      \r
+\r
     [PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic]\r
       ## This value is used to set the base address of pci express hierarchy\r
       gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE0000000|UINT64|0x0000000a\r
@@ -247,7 +247,7 @@ def TestDecPcd():
     assert Items[0].DefaultValue == 'FALSE'\r
     assert Items[0].DatumType == 'BOOLEAN'\r
     assert Items[0].TokenValue == '0x0000000d'\r
-    \r
+\r
     Items = Obj.GetPcdsByType('PcdsFixedAtBuild')\r
     assert len(Items) == 4\r
     assert len(Obj.GetPcdsByType('PcdsPatchableInModule')) == 2\r
index 2f4917525b6acda752c2b48a95bd0e53e4c9afa4..afea4a438b62242116afa270c61d2efad3c2d389 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file contain unit test for DecParser\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -24,7 +24,7 @@ from Parser.DecParser import \
     FileContent, \\r
     _DecBase, \\r
     CleanString\r
-    \r
+\r
 from Object.Parser.DecObject import _DecComments\r
 \r
 #\r
@@ -35,19 +35,19 @@ class CleanStringTestCase(unittest.TestCase):
         Line, Comment = CleanString('')\r
         self.assertEqual(Line, '')\r
         self.assertEqual(Comment, '')\r
-        \r
+\r
         Line, Comment = CleanString('line without comment')\r
         self.assertEqual(Line, 'line without comment')\r
         self.assertEqual(Comment, '')\r
-        \r
+\r
         Line, Comment = CleanString('# pure comment')\r
         self.assertEqual(Line, '')\r
         self.assertEqual(Comment, '# pure comment')\r
-        \r
+\r
         Line, Comment = CleanString('line # and comment')\r
         self.assertEqual(Line, 'line')\r
         self.assertEqual(Comment, '# and comment')\r
-    \r
+\r
     def testCleanStringCpp(self):\r
         Line, Comment = CleanString('line // and comment', AllowCppStyleComment = True)\r
         self.assertEqual(Line, 'line')\r
@@ -59,16 +59,16 @@ class CleanStringTestCase(unittest.TestCase):
 class MacroParserTestCase(unittest.TestCase):\r
     def setUp(self):\r
         self.dec = _DecBase(FileContent('dummy', []))\r
-    \r
+\r
     def testCorrectMacro(self):\r
         self.dec._MacroParser('DEFINE MARCRO1 = test1')\r
         self.failIf('MARCRO1' not in self.dec._LocalMacro)\r
         self.assertEqual(self.dec._LocalMacro['MARCRO1'], 'test1')\r
-    \r
+\r
     def testErrorMacro1(self):\r
         # Raise fatal error, macro name must be upper case letter\r
         self.assertRaises(FatalError, self.dec._MacroParser, 'DEFINE not_upper_case = test2')\r
-    \r
+\r
     def testErrorMacro2(self):\r
         # No macro name given\r
         self.assertRaises(FatalError, self.dec._MacroParser, 'DEFINE ')\r
@@ -81,19 +81,19 @@ class TryBackSlashTestCase(unittest.TestCase):
         Content = [\r
             # Right case\r
             'test no backslash',\r
-            \r
+\r
             'test with backslash \\',\r
             'continue second line',\r
-            \r
+\r
             # Do not precede with whitespace\r
             '\\',\r
-            \r
+\r
             # Empty line after backlash is not allowed\r
             'line with backslash \\',\r
             ''\r
         ]\r
         self.dec = _DecBase(FileContent('dummy', Content))\r
-    \r
+\r
     def testBackSlash(self):\r
         #\r
         # Right case, assert return values\r
@@ -101,11 +101,11 @@ class TryBackSlashTestCase(unittest.TestCase):
         ConcatLine, CommentList = self.dec._TryBackSlash(self.dec._RawData.GetNextLine(), [])\r
         self.assertEqual(ConcatLine, 'test no backslash')\r
         self.assertEqual(CommentList, [])\r
-        \r
+\r
         ConcatLine, CommentList = self.dec._TryBackSlash(self.dec._RawData.GetNextLine(), [])\r
         self.assertEqual(CommentList, [])\r
         self.assertEqual(ConcatLine, 'test with backslash continue second line')\r
-        \r
+\r
         #\r
         # Error cases, assert raise exception\r
         #\r
@@ -130,16 +130,16 @@ class TestInner(_DecBase):
     def __init__(self, RawData):\r
         _DecBase.__init__(self, RawData)\r
         self.ItemObject = Data()\r
-    \r
+\r
     def _StopCurrentParsing(self, Line):\r
         return Line == '[TOP]'\r
-    \r
+\r
     def _ParseItem(self):\r
         Item = DataItem()\r
         Item.String = self._RawData.CurrentLine\r
         self.ItemObject.ItemList.append(Item)\r
         return Item\r
-    \r
+\r
     def _TailCommentStrategy(self, Comment):\r
         return Comment.find('@comment') != -1\r
 \r
@@ -148,7 +148,7 @@ class TestTop(_DecBase):
         _DecBase.__init__(self, RawData)\r
         # List of Data\r
         self.ItemObject = []\r
-    \r
+\r
     # Top parser\r
     def _StopCurrentParsing(self, Line):\r
         return False\r
@@ -159,10 +159,10 @@ class TestTop(_DecBase):
         self.ItemObject.append(TestParser.ItemObject)\r
         return TestParser.ItemObject\r
 \r
-class ParseTestCase(unittest.TestCase):        \r
+class ParseTestCase(unittest.TestCase):\r
     def setUp(self):\r
         pass\r
-    \r
+\r
     def testParse(self):\r
         Content = \\r
         '''# Top comment\r
@@ -172,26 +172,26 @@ class ParseTestCase(unittest.TestCase):
           # sub2 head comment\r
           (test item has head and special tail comment)\r
           # @comment test TailCommentStrategy branch\r
-          \r
+\r
           (test item has no comment)\r
-        \r
+\r
         # test NextLine branch\r
         [TOP]\r
           sub-item\r
         '''\r
         dec = TestTop(FileContent('dummy', Content.splitlines()))\r
         dec.Parse()\r
-        \r
+\r
         # Two sections\r
         self.assertEqual(len(dec.ItemObject), 2)\r
-        \r
+\r
         data = dec.ItemObject[0]\r
         self.assertEqual(data._HeadComment[0][0], '# Top comment')\r
         self.assertEqual(data._HeadComment[0][1], 1)\r
-        \r
+\r
         # 3 subitems\r
         self.assertEqual(len(data.ItemList), 3)\r
-        \r
+\r
         dataitem = data.ItemList[0]\r
         self.assertEqual(dataitem.String, '(test item has both head and tail comment)')\r
         # Comment content\r
@@ -200,7 +200,7 @@ class ParseTestCase(unittest.TestCase):
         # Comment line number\r
         self.assertEqual(dataitem._HeadComment[0][1], 3)\r
         self.assertEqual(dataitem._TailComment[0][1], 4)\r
-        \r
+\r
         dataitem = data.ItemList[1]\r
         self.assertEqual(dataitem.String, '(test item has head and special tail comment)')\r
         # Comment content\r
@@ -209,20 +209,20 @@ class ParseTestCase(unittest.TestCase):
         # Comment line number\r
         self.assertEqual(dataitem._HeadComment[0][1], 5)\r
         self.assertEqual(dataitem._TailComment[0][1], 7)\r
-        \r
+\r
         dataitem = data.ItemList[2]\r
         self.assertEqual(dataitem.String, '(test item has no comment)')\r
         # Comment content\r
         self.assertEqual(dataitem._HeadComment, [])\r
         self.assertEqual(dataitem._TailComment, [])\r
-        \r
+\r
         data = dec.ItemObject[1]\r
         self.assertEqual(data._HeadComment[0][0], '# test NextLine branch')\r
         self.assertEqual(data._HeadComment[0][1], 11)\r
-        \r
+\r
         # 1 subitems\r
         self.assertEqual(len(data.ItemList), 1)\r
-        \r
+\r
         dataitem = data.ItemList[0]\r
         self.assertEqual(dataitem.String, 'sub-item')\r
         self.assertEqual(dataitem._HeadComment, [])\r
@@ -241,15 +241,15 @@ class DecDefineTestCase(unittest.TestCase):
         item = self.GetObj('PACKAGE_NAME = MdePkg')._ParseItem()\r
         self.assertEqual(item.Key, 'PACKAGE_NAME')\r
         self.assertEqual(item.Value, 'MdePkg')\r
-    \r
+\r
     def testDecDefine1(self):\r
         obj = self.GetObj('PACKAGE_NAME')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
-    \r
+\r
     def testDecDefine2(self):\r
         obj = self.GetObj('unknown_key = ')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
-    \r
+\r
     def testDecDefine3(self):\r
         obj = self.GetObj('PACKAGE_NAME = ')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
@@ -262,23 +262,23 @@ class DecLibraryTestCase(unittest.TestCase):
         Obj = _DecLibraryclass(FileContent('dummy', Content.splitlines()))\r
         Obj._RawData.CurrentLine = Obj._RawData.GetNextLine()\r
         return Obj\r
-    \r
+\r
     def testNoInc(self):\r
         obj = self.GetObj('UefiRuntimeLib')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
-    \r
+\r
     def testEmpty(self):\r
         obj = self.GetObj(' | ')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
-        \r
+\r
     def testLibclassNaming(self):\r
         obj = self.GetObj('lowercase_efiRuntimeLib|Include/Library/UefiRuntimeLib.h')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
-        \r
+\r
     def testLibclassExt(self):\r
         obj = self.GetObj('RuntimeLib|Include/Library/UefiRuntimeLib.no_h')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
-    \r
+\r
     def testLibclassRelative(self):\r
         obj = self.GetObj('RuntimeLib|Include/../UefiRuntimeLib.h')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
@@ -292,7 +292,7 @@ class DecPcdTestCase(unittest.TestCase):
         Obj._RawData.CurrentLine = Obj._RawData.GetNextLine()\r
         Obj._RawData.CurrentScope = [('PcdsFeatureFlag'.upper(), 'COMMON')]\r
         return Obj\r
-    \r
+\r
     def testOK(self):\r
         item = self.GetObj('gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|FALSE|BOOLEAN|0x0000000d')._ParseItem()\r
         self.assertEqual(item.TokenSpaceGuidCName, 'gEfiMdePkgTokenSpaceGuid')\r
@@ -300,26 +300,26 @@ class DecPcdTestCase(unittest.TestCase):
         self.assertEqual(item.DefaultValue, 'FALSE')\r
         self.assertEqual(item.DatumType, 'BOOLEAN')\r
         self.assertEqual(item.TokenValue, '0x0000000d')\r
-    \r
+\r
     def testNoCvar(self):\r
         obj = self.GetObj('123ai.PcdComponentNameDisable|FALSE|BOOLEAN|0x0000000d')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
-    \r
+\r
     def testSplit(self):\r
         obj = self.GetObj('gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable FALSE|BOOLEAN|0x0000000d')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
-        \r
+\r
         obj = self.GetObj('gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|FALSE|BOOLEAN|0x0000000d | abc')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
-    \r
+\r
     def testUnknownType(self):\r
         obj = self.GetObj('gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|FALSE|unknown|0x0000000d')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
-    \r
+\r
     def testVoid(self):\r
         obj = self.GetObj('gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|abc|VOID*|0x0000000d')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
-    \r
+\r
     def testUINT(self):\r
         obj = self.GetObj('gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|0xabc|UINT8|0x0000000d')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
@@ -342,26 +342,26 @@ class DecGuidTestCase(unittest.TestCase):
         Obj._RawData.CurrentLine = Obj._RawData.GetNextLine()\r
         Obj._RawData.CurrentScope = [('guids'.upper(), 'COMMON')]\r
         return Obj\r
-    \r
+\r
     def testCValue(self):\r
         item = self.GetObj('gEfiIpSecProtocolGuid={ 0xdfb386f7, 0xe100, 0x43ad,'\r
                            ' {0x9c, 0x9a, 0xed, 0x90, 0xd0, 0x8a, 0x5e, 0x12 }}')._ParseItem()\r
         self.assertEqual(item.GuidCName, 'gEfiIpSecProtocolGuid')\r
         self.assertEqual(item.GuidCValue, '{ 0xdfb386f7, 0xe100, 0x43ad, {0x9c, 0x9a, 0xed, 0x90, 0xd0, 0x8a, 0x5e, 0x12 }}')\r
-    \r
+\r
     def testGuidString(self):\r
         item = self.GetObj('gEfiIpSecProtocolGuid=1E73767F-8F52-4603-AEB4-F29B510B6766')._ParseItem()\r
         self.assertEqual(item.GuidCName, 'gEfiIpSecProtocolGuid')\r
         self.assertEqual(item.GuidCValue, '1E73767F-8F52-4603-AEB4-F29B510B6766')\r
-    \r
+\r
     def testNoValue1(self):\r
         obj = self.GetObj('gEfiIpSecProtocolGuid')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
-    \r
+\r
     def testNoValue2(self):\r
         obj = self.GetObj('gEfiIpSecProtocolGuid=')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
-        \r
+\r
     def testNoName(self):\r
         obj = self.GetObj('=')\r
         self.assertRaises(FatalError, obj._ParseItem)\r
@@ -376,7 +376,7 @@ class DecDecInitTestCase(unittest.TestCase):
 class TmpFile:\r
     def __init__(self, File):\r
         self.File = File\r
-    \r
+\r
     def Write(self, Content):\r
         try:\r
             FileObj = open(self.File, 'w')\r
@@ -384,7 +384,7 @@ class TmpFile:
             FileObj.close()\r
         except:\r
             pass\r
-    \r
+\r
     def Remove(self):\r
         try:\r
             os.remove(self.File)\r
@@ -404,13 +404,13 @@ class DecUESectionTestCase(unittest.TestCase):
 [userextensions.intel."myid]\r
 '''\r
         )\r
-    \r
+\r
     def tearDown(self):\r
         self.File.Remove()\r
-    \r
+\r
     def testUserExtentionHeader(self):\r
         dec = Dec('test.dec', False)\r
-        \r
+\r
         # OK: [userextensions.intel."myid"]\r
         dec._RawData.CurrentLine = CleanString(dec._RawData.GetNextLine())[0]\r
         dec._UserExtentionSectionParser()\r
@@ -419,7 +419,7 @@ class DecUESectionTestCase(unittest.TestCase):
         self.assertEqual(dec._RawData.CurrentScope[0][1], 'intel')\r
         self.assertEqual(dec._RawData.CurrentScope[0][2], '"myid"')\r
         self.assertEqual(dec._RawData.CurrentScope[0][3], 'COMMON')\r
-        \r
+\r
         # OK: [userextensions.intel."myid".IA32]\r
         dec._RawData.CurrentLine = CleanString(dec._RawData.GetNextLine())[0]\r
         dec._UserExtentionSectionParser()\r
@@ -428,11 +428,11 @@ class DecUESectionTestCase(unittest.TestCase):
         self.assertEqual(dec._RawData.CurrentScope[0][1], 'intel')\r
         self.assertEqual(dec._RawData.CurrentScope[0][2], '"myid"')\r
         self.assertEqual(dec._RawData.CurrentScope[0][3], 'IA32')\r
-        \r
+\r
         # Fail: [userextensions.intel."myid".IA32,]\r
         dec._RawData.CurrentLine = CleanString(dec._RawData.GetNextLine())[0]\r
         self.assertRaises(FatalError, dec._UserExtentionSectionParser)\r
-        \r
+\r
         # Fail: [userextensions.intel."myid]\r
         dec._RawData.CurrentLine = CleanString(dec._RawData.GetNextLine())[0]\r
         self.assertRaises(FatalError, dec._UserExtentionSectionParser)\r
@@ -453,43 +453,43 @@ class DecSectionTestCase(unittest.TestCase):
 [Includes, Includes.IA32] # common cannot be with other arch\r
 [Includes.IA32, PcdsFeatureFlag] # different section name\r
 '''     )\r
-    \r
+\r
     def tearDown(self):\r
         self.File.Remove()\r
-    \r
+\r
     def testSectionHeader(self):\r
         dec = Dec('test.dec', False)\r
         # [no section start or end\r
         dec._RawData.CurrentLine = CleanString(dec._RawData.GetNextLine())[0]\r
         self.assertRaises(FatalError, dec._SectionHeaderParser)\r
-        \r
+\r
         #[,] # empty sub-section\r
         dec._RawData.CurrentLine = CleanString(dec._RawData.GetNextLine())[0]\r
         self.assertRaises(FatalError, dec._SectionHeaderParser)\r
-        \r
+\r
         # [unknow_section_name]\r
         dec._RawData.CurrentLine = CleanString(dec._RawData.GetNextLine())[0]\r
         self.assertRaises(FatalError, dec._SectionHeaderParser)\r
-        \r
+\r
         # [Includes.IA32.other] # no third one\r
         dec._RawData.CurrentLine = CleanString(dec._RawData.GetNextLine())[0]\r
         self.assertRaises(FatalError, dec._SectionHeaderParser)\r
-        \r
+\r
         # [PcdsFeatureFlag, PcdsFixedAtBuild]\r
         dec._RawData.CurrentLine = CleanString(dec._RawData.GetNextLine())[0]\r
         self.assertRaises(FatalError, dec._SectionHeaderParser)\r
-        \r
+\r
         # [Includes.IA32, Includes.IA32]\r
         dec._RawData.CurrentLine = CleanString(dec._RawData.GetNextLine())[0]\r
         dec._SectionHeaderParser()\r
         self.assertEqual(len(dec._RawData.CurrentScope), 1)\r
         self.assertEqual(dec._RawData.CurrentScope[0][0], 'Includes'.upper())\r
         self.assertEqual(dec._RawData.CurrentScope[0][1], 'IA32')\r
-        \r
+\r
         # [Includes, Includes.IA32] # common cannot be with other arch\r
         dec._RawData.CurrentLine = CleanString(dec._RawData.GetNextLine())[0]\r
         self.assertRaises(FatalError, dec._SectionHeaderParser)\r
-        \r
+\r
         # [Includes.IA32, PcdsFeatureFlag] # different section name not allowed\r
         dec._RawData.CurrentLine = CleanString(dec._RawData.GetNextLine())[0]\r
         self.assertRaises(FatalError, dec._SectionHeaderParser)\r
@@ -511,7 +511,7 @@ class DecDecCommentTestCase(unittest.TestCase):
         self.assertEqual(dec._HeadComment[1][0], '##')\r
         self.assertEqual(dec._HeadComment[1][1], 2)\r
         File.Remove()\r
-    \r
+\r
     def testNoDoubleComment(self):\r
         File = TmpFile('test.dec')\r
         File.Write(\r
index 626f17426de77f1a024347f8669a27b2d3f27baf..9a10ec15c47953f8202d25b4adf93f1604f0143a 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
-# This file contain unit test for Test [Binary] section part of InfParser \r
+# This file contain unit test for Test [Binary] section part of InfParser\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -49,7 +49,7 @@ GUID | Test/Test.guid | DEBUG
 """\r
 \r
 #\r
-# Have 3 elements, Type | FileName | Target \r
+# Have 3 elements, Type | FileName | Target\r
 # Target with MACRO defined in [Define] section\r
 #\r
 SectionStringsCommonItem4 = \\r
@@ -58,7 +58,7 @@ GUID | Test/Test.guid | $(TARGET)
 """\r
 \r
 #\r
-# Have 3 elements, Type | FileName | Target \r
+# Have 3 elements, Type | FileName | Target\r
 # FileName with MACRO defined in [Binary] section\r
 #\r
 SectionStringsCommonItem5 = \\r
@@ -115,7 +115,7 @@ GUID | Test/Test.guid | DEBUG | MSFT | TEST | TRUE | OVERFLOW
 #-------------start of VER type binary item test input------------------------#\r
 \r
 #\r
-# Has 1 element, error format \r
+# Has 1 element, error format\r
 #\r
 SectionStringsVerItem1 = \\r
 """\r
@@ -199,7 +199,7 @@ UI | Test/Test2.ui | * | FALSE
 """\r
 \r
 #\r
-# Has 1 element, error format \r
+# Has 1 element, error format\r
 #\r
 SectionStringsUiItem4 = \\r
 """\r
@@ -253,7 +253,7 @@ def StringToSectionString(String):
             continue\r
         SectionString.append((Line, LineNo, ''))\r
         LineNo = LineNo + 1\r
-        \r
+\r
     return SectionString\r
 \r
 def PrepareTest(String):\r
@@ -269,7 +269,7 @@ def PrepareTest(String):
             #\r
             FileName = os.path.normpath(os.path.realpath(ValueList[1].strip()))\r
             try:\r
-                TempFile  = open (FileName, "w")    \r
+                TempFile  = open (FileName, "w")\r
                 TempFile.close()\r
             except:\r
                 print("File Create Error")\r
@@ -278,24 +278,24 @@ def PrepareTest(String):
         CurrentLine.SetLineString(Item[0])\r
         CurrentLine.SetLineNo(Item[1])\r
         InfLineCommentObject = InfLineCommentObject()\r
-        \r
+\r
         ItemList.append((ValueList, InfLineCommentObject, CurrentLine))\r
-                \r
+\r
     return ItemList\r
 \r
 if __name__ == '__main__':\r
     Logger.Initialize()\r
-    \r
+\r
     InfBinariesInstance = InfBinariesObject()\r
     ArchList = ['COMMON']\r
     Global.gINF_MODULE_DIR = os.getcwd()\r
-    \r
+\r
     AllPassedFlag = True\r
-    \r
+\r
     #\r
     # For All Ui test\r
     #\r
-    UiStringList = [ \r
+    UiStringList = [\r
                     SectionStringsUiItem1,\r
                     SectionStringsUiItem2,\r
                     SectionStringsUiItem3,\r
@@ -303,10 +303,10 @@ if __name__ == '__main__':
                     SectionStringsUiItem5,\r
                     SectionStringsUiItem6,\r
                     SectionStringsUiItem7,\r
-                    SectionStringsUiItem8 \r
+                    SectionStringsUiItem8\r
                     ]\r
-    \r
-    for Item in UiStringList:        \r
+\r
+    for Item in UiStringList:\r
         Ui = PrepareTest(Item)\r
         if Item == SectionStringsUiItem4 or Item == SectionStringsUiItem5:\r
             try:\r
@@ -314,11 +314,11 @@ if __name__ == '__main__':
             except Logger.FatalError:\r
                 pass\r
         else:\r
-            try:               \r
+            try:\r
                 InfBinariesInstance.SetBinary(Ui = Ui, ArchList = ArchList)\r
             except:\r
-                AllPassedFlag = False                                  \r
\r
+                AllPassedFlag = False\r
+\r
     #\r
     # For All Ver Test\r
     #\r
@@ -331,25 +331,25 @@ if __name__ == '__main__':
                      SectionStringsVerItem6,\r
                      SectionStringsVerItem7\r
                      ]\r
-    for Item in VerStringList:        \r
+    for Item in VerStringList:\r
         Ver = PrepareTest(Item)\r
         if Item == SectionStringsVerItem1 or \\r
            Item == SectionStringsVerItem2:\r
-            \r
+\r
             try:\r
                 InfBinariesInstance.SetBinary(Ver = Ver, ArchList = ArchList)\r
             except:\r
                 pass\r
-                    \r
+\r
         else:\r
             try:\r
                 InfBinariesInstance.SetBinary(Ver = Ver, ArchList = ArchList)\r
             except:\r
-                AllPassedFlag = False   \r
-    \r
+                AllPassedFlag = False\r
+\r
     #\r
     # For All Common Test\r
-    #    \r
+    #\r
     CommonStringList = [\r
                      SectionStringsCommonItem1,\r
                      SectionStringsCommonItem2,\r
@@ -363,23 +363,23 @@ if __name__ == '__main__':
                      SectionStringsCommonItem10\r
                      ]\r
 \r
-    for Item in CommonStringList:        \r
+    for Item in CommonStringList:\r
         CommonBin = PrepareTest(Item)\r
         if Item == SectionStringsCommonItem10 or \\r
            Item == SectionStringsCommonItem1:\r
-            \r
+\r
             try:\r
                 InfBinariesInstance.SetBinary(CommonBinary = CommonBin, ArchList = ArchList)\r
             except:\r
                 pass\r
-                    \r
+\r
         else:\r
             try:\r
                 InfBinariesInstance.SetBinary(Ver = Ver, ArchList = ArchList)\r
             except:\r
                 print("Test Failed!")\r
                 AllPassedFlag = False\r
-    \r
+\r
     if AllPassedFlag :\r
         print('All tests passed...')\r
     else:\r
index 8a8cce169626559ab28518e853b3e2c8adfccae1..94fb087d1ce636594a29f97d105b5b246822318b 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -123,7 +123,7 @@ class PromptXml(object):
         return CreateXmlElement('%s' % Key, Prompt.GetString(), [], [['Lang', Prompt.GetLang()]])\r
     def __str__(self):\r
         return "Prompt = %s Lang = %s" % (self.Prompt, self.Lang)\r
-        \r
+\r
 ##\r
 # HelpTextXml\r
 #\r
@@ -184,7 +184,7 @@ class HeaderXml(object):
             self.CopyrightList.append((HeaderCopyrightLang, XmlElement(SubItem, '%s/Copyright' % Key)))\r
         for SubItem in XmlList(Item, '%s/License' % Key):\r
             HeaderLicenseLang = XmlAttribute(SubItem, 'Lang')\r
-            self.LicenseList.append((HeaderLicenseLang, XmlElement(SubItem, '%s/License' % Key)))    \r
+            self.LicenseList.append((HeaderLicenseLang, XmlElement(SubItem, '%s/License' % Key)))\r
         ModuleHeader = ModuleObject()\r
         ModuleHeader.SetName(self.Name)\r
         ModuleHeader.SetBaseName(self.BaseName)\r
@@ -379,7 +379,7 @@ class PackageHeaderXml(object):
         NodeList = [Element1,\r
                     Element2\r
                     ]\r
-        \r
+\r
         UNIPackageAbrstractList = []\r
         UNIPackageDescriptionList = []\r
         # Get Abstract and Description from Uni File\r
@@ -391,11 +391,11 @@ class PackageHeaderXml(object):
                     if not StringDefClassObject.StringValue:\r
                         continue\r
                     if StringDefClassObject.StringName == DataType.TAB_DEC_PACKAGE_ABSTRACT:\r
-                        UNIPackageAbrstractList.append((GetLanguageCode1766(Lang), \r
+                        UNIPackageAbrstractList.append((GetLanguageCode1766(Lang),\r
                                                         ConvertSpecialUnicodes(StringDefClassObject.StringValue)))\r
 \r
                     if StringDefClassObject.StringName == DataType.TAB_DEC_PACKAGE_DESCRIPTION:\r
-                        UNIPackageDescriptionList.append((GetLanguageCode1766(Lang), \r
+                        UNIPackageDescriptionList.append((GetLanguageCode1766(Lang),\r
                                                           ConvertSpecialUnicodes(StringDefClassObject.StringValue)))\r
 \r
         # Get Abstract and Description from DEC File Header\r
@@ -411,7 +411,7 @@ class PackageHeaderXml(object):
         for (Lang, Value) in PackageObject2.GetDescription() + UNIPackageDescriptionList:\r
             if Value:\r
                 NodeList.append(CreateXmlElement(DataType.TAB_HEADER_DESCRIPTION, Value, [], [['Lang', Lang]]))\r
-        \r
+\r
 \r
         NodeList.append(['PackagePath', PackageObject2.GetPackagePath()])\r
         AttributeList = []\r
@@ -617,16 +617,16 @@ class UserExtensionsXml(object):
                 self.BinaryAbstractList.append((BinaryAbstractLang, XmlElement(SubItem, '%s/BinaryAbstract' % Key)))\r
             for SubItem in XmlList(Item, '%s/BinaryDescription' % Key):\r
                 BinaryDescriptionLang = XmlAttribute(SubItem, 'Lang')\r
-                self.BinaryDescriptionList.append((BinaryDescriptionLang, \r
+                self.BinaryDescriptionList.append((BinaryDescriptionLang,\r
                                                        XmlElement(SubItem, '%s/BinaryDescription' % Key)))\r
             for SubItem in XmlList(Item, '%s/BinaryCopyright' % Key):\r
                 BinaryCopyrightLang = XmlAttribute(SubItem, 'Lang')\r
-                self.BinaryCopyrightList.append((BinaryCopyrightLang, \r
+                self.BinaryCopyrightList.append((BinaryCopyrightLang,\r
                                                      XmlElement(SubItem, '%s/BinaryCopyright' % Key)))\r
             for SubItem in XmlList(Item, '%s/BinaryLicense' % Key):\r
                 BinaryLicenseLang = XmlAttribute(SubItem, 'Lang')\r
-                self.BinaryLicenseList.append((BinaryLicenseLang, \r
-                                                   XmlElement(SubItem, '%s/BinaryLicense' % Key)))   \r
+                self.BinaryLicenseList.append((BinaryLicenseLang,\r
+                                                   XmlElement(SubItem, '%s/BinaryLicense' % Key)))\r
 \r
         DefineItem = XmlNode(Item, '%s/Define' % Key)\r
         for SubItem in XmlList(DefineItem, 'Define/Statement'):\r
@@ -697,7 +697,7 @@ class UserExtensionsXml(object):
                 if Value:\r
                     ChildElement = CreateXmlElement('BinaryLicense', Value, [], [])\r
                     Root.appendChild(ChildElement)\r
-                    \r
+\r
         NodeList = []\r
         DefineDict = UserExtension.GetDefinesDict()\r
         if DefineDict:\r
@@ -976,7 +976,7 @@ class FilenameXml(object):
         #\r
         if self.FileType == 'UEFI_IMAGE':\r
             self.FileType = 'PE32'\r
-        \r
+\r
         Filename.SetGuidValue(Guid)\r
         Filename.SetFileType(self.FileType)\r
         Filename.SetFilename(self.Filename)\r
index a747b02542856d67eeb5b363c5abc8e36aa7971f..d4db9209eb513fb92bad60dc602965a7a1d5cb65 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -46,17 +46,17 @@ class GuidProtocolPpiXml(object):
         self.CommonDefines = CommonDefinesXml()\r
         self.HelpText = []\r
         #\r
-        # Guid/Ppi/Library, internal used for indicate return object for \r
+        # Guid/Ppi/Library, internal used for indicate return object for\r
         # FromXml\r
         #\r
-        self.Type = '' \r
+        self.Type = ''\r
         #\r
         # there are slightly different field between package and module\r
         #\r
         self.Mode = Mode\r
         self.GuidType = ''\r
         self.VariableName = ''\r
-        \r
+\r
     def FromXml(self, Item, Key):\r
         self.UiName = XmlAttribute(XmlNode(Item, '%s' % Key), 'UiName')\r
         self.GuidType = XmlAttribute(XmlNode(Item, '%s' % Key), 'GuidType')\r
@@ -69,8 +69,8 @@ class GuidProtocolPpiXml(object):
             HelpTextObj = HelpTextXml()\r
             HelpTextObj.FromXml(HelpTextItem, '%s/HelpText' % Key)\r
             self.HelpText.append(HelpTextObj)\r
-        \r
-        if self.Type == 'Guid':    \r
+\r
+        if self.Type == 'Guid':\r
             GuidProtocolPpi = GuidObject()\r
         elif self.Type == 'Protocol':\r
             GuidProtocolPpi = ProtocolObject()\r
@@ -92,7 +92,7 @@ class GuidProtocolPpiXml(object):
          ['SupModList', GetStringOfList(GuidProtocolPpi.GetSupModuleList())], \\r
          ['FeatureFlag', ConvertNEToNOTEQ(GuidProtocolPpi.GetFeatureFlag())]\r
         ]\r
-        NodeList = [['CName', GuidProtocolPpi.GetCName()], \r
+        NodeList = [['CName', GuidProtocolPpi.GetCName()],\r
                     ['GuidValue', GuidProtocolPpi.GetGuid()],\r
                     ['VariableName', GuidProtocolPpi.VariableName]\r
                    ]\r
@@ -100,7 +100,7 @@ class GuidProtocolPpiXml(object):
             Tmp = HelpTextXml()\r
             NodeList.append(Tmp.ToXml(Item))\r
         Root = CreateXmlElement('%s' % Key, '', NodeList, AttributeList)\r
-        \r
+\r
         return Root\r
 \r
     def __str__(self):\r
@@ -118,12 +118,12 @@ class GuidXml(GuidProtocolPpiXml):
     def __init__(self, Mode):\r
         GuidProtocolPpiXml.__init__(self, Mode)\r
         self.Type = 'Guid'\r
-        \r
-    def FromXml(self, Item, Key):         \r
+\r
+    def FromXml(self, Item, Key):\r
         GuidProtocolPpi = GuidProtocolPpiXml.FromXml(self, Item, Key)\r
 \r
         if self.Mode == 'Package':\r
-            \r
+\r
             GuidProtocolPpi.SetSupArchList(self.CommonDefines.SupArchList)\r
             GuidProtocolPpi.SetSupModuleList(self.CommonDefines.SupModList)\r
             GuidProtocolPpi.SetCName(self.CName)\r
@@ -139,16 +139,16 @@ class GuidXml(GuidProtocolPpiXml):
         return GuidProtocolPpi\r
 \r
     def ToXml(self, GuidProtocolPpi, Key):\r
-        if self.Mode == 'Package': \r
+        if self.Mode == 'Package':\r
             AttributeList = \\r
             [['GuidType', \\r
               GetStringOfList(GuidProtocolPpi.GetGuidTypeList())], \\r
               ['SupArchList', \\r
                GetStringOfList(GuidProtocolPpi.GetSupArchList())], \\r
                ['SupModList', \\r
-                GetStringOfList(GuidProtocolPpi.GetSupModuleList())], \r
+                GetStringOfList(GuidProtocolPpi.GetSupModuleList())],\r
             ]\r
-            NodeList = [['CName', GuidProtocolPpi.GetCName()], \r
+            NodeList = [['CName', GuidProtocolPpi.GetCName()],\r
                         ['GuidValue', GuidProtocolPpi.GetGuid()],\r
                        ]\r
         else:\r
@@ -159,7 +159,7 @@ class GuidXml(GuidProtocolPpiXml):
                GetStringOfList(GuidProtocolPpi.GetSupArchList())], \\r
                ['FeatureFlag', ConvertNEToNOTEQ(GuidProtocolPpi.GetFeatureFlag())]\r
             ]\r
-            NodeList = [['CName', GuidProtocolPpi.GetCName()], \r
+            NodeList = [['CName', GuidProtocolPpi.GetCName()],\r
                         ['VariableName', GuidProtocolPpi.GetVariableName()]\r
                        ]\r
 \r
@@ -167,7 +167,7 @@ class GuidXml(GuidProtocolPpiXml):
             Tmp = HelpTextXml()\r
             NodeList.append(Tmp.ToXml(Item))\r
         Root = CreateXmlElement('%s' % Key, '', NodeList, AttributeList)\r
-        \r
+\r
         return Root\r
 ##\r
 #Protocol Xml\r
@@ -176,11 +176,11 @@ class ProtocolXml(GuidProtocolPpiXml):
     def __init__(self, Mode):\r
         GuidProtocolPpiXml.__init__(self, Mode)\r
         self.Type = 'Protocol'\r
-        \r
+\r
     def FromXml(self, Item, Key):\r
         GuidProtocolPpi = GuidProtocolPpiXml.FromXml(self, Item, Key)\r
         if self.Mode == 'Package':\r
-            GuidProtocolPpi.SetFeatureFlag(self.CommonDefines.FeatureFlag) \r
+            GuidProtocolPpi.SetFeatureFlag(self.CommonDefines.FeatureFlag)\r
             GuidProtocolPpi.SetSupArchList(self.CommonDefines.SupArchList)\r
             GuidProtocolPpi.SetSupModuleList(self.CommonDefines.SupModList)\r
             GuidProtocolPpi.SetCName(self.CName)\r
@@ -196,11 +196,11 @@ class ProtocolXml(GuidProtocolPpiXml):
             GuidProtocolPpi.SetSupArchList(self.CommonDefines.SupArchList)\r
             GuidProtocolPpi.SetFeatureFlag(ConvertNOTEQToNE(self.CommonDefines.FeatureFlag))\r
             GuidProtocolPpi.SetCName(self.CName)\r
\r
+\r
         return GuidProtocolPpi\r
 \r
     def ToXml(self, GuidProtocolPpi, Key):\r
-        if self.Mode == 'Package':        \r
+        if self.Mode == 'Package':\r
             AttributeList = \\r
             [['SupArchList', \\r
               GetStringOfList(GuidProtocolPpi.GetSupArchList())], \\r
@@ -208,7 +208,7 @@ class ProtocolXml(GuidProtocolPpiXml):
                GetStringOfList(GuidProtocolPpi.GetSupModuleList())], \\r
                ['FeatureFlag', GuidProtocolPpi.GetFeatureFlag()]\r
             ]\r
-            NodeList = [['CName', GuidProtocolPpi.GetCName()], \r
+            NodeList = [['CName', GuidProtocolPpi.GetCName()],\r
                         ['GuidValue', GuidProtocolPpi.GetGuid()],\r
                        ]\r
         else:\r
@@ -219,14 +219,14 @@ class ProtocolXml(GuidProtocolPpiXml):
               GetStringOfList(GuidProtocolPpi.GetSupArchList())], \\r
               ['FeatureFlag', ConvertNEToNOTEQ(GuidProtocolPpi.GetFeatureFlag())]\r
             ]\r
-            NodeList = [['CName', GuidProtocolPpi.GetCName()], \r
+            NodeList = [['CName', GuidProtocolPpi.GetCName()],\r
                        ]\r
-            \r
+\r
         for Item in GuidProtocolPpi.GetHelpTextList():\r
             Tmp = HelpTextXml()\r
             NodeList.append(Tmp.ToXml(Item))\r
         Root = CreateXmlElement('%s' % Key, '', NodeList, AttributeList)\r
-        \r
+\r
         return Root\r
 ##\r
 #Ppi Xml\r
@@ -235,7 +235,7 @@ class PpiXml(GuidProtocolPpiXml):
     def __init__(self, Mode):\r
         GuidProtocolPpiXml.__init__(self, Mode)\r
         self.Type = 'Ppi'\r
-        \r
+\r
     def FromXml(self, Item, Key):\r
         GuidProtocolPpi = GuidProtocolPpiXml.FromXml(self, Item, Key)\r
         if self.Mode == 'Package':\r
@@ -254,16 +254,16 @@ class PpiXml(GuidProtocolPpiXml):
             GuidProtocolPpi.SetSupArchList(self.CommonDefines.SupArchList)\r
             GuidProtocolPpi.SetFeatureFlag(ConvertNOTEQToNE(self.CommonDefines.FeatureFlag))\r
             GuidProtocolPpi.SetCName(self.CName)\r
\r
+\r
         return GuidProtocolPpi\r
 \r
     def ToXml(self, GuidProtocolPpi, Key):\r
         if self.Mode == 'Package':\r
             AttributeList = \\r
             [['SupArchList', \\r
-              GetStringOfList(GuidProtocolPpi.GetSupArchList())], \r
+              GetStringOfList(GuidProtocolPpi.GetSupArchList())],\r
             ]\r
-            NodeList = [['CName', GuidProtocolPpi.GetCName()], \r
+            NodeList = [['CName', GuidProtocolPpi.GetCName()],\r
                         ['GuidValue', GuidProtocolPpi.GetGuid()],\r
                        ]\r
         else:\r
@@ -274,9 +274,9 @@ class PpiXml(GuidProtocolPpiXml):
               GetStringOfList(GuidProtocolPpi.GetSupArchList())], \\r
               ['FeatureFlag', ConvertNEToNOTEQ(GuidProtocolPpi.GetFeatureFlag())]\r
             ]\r
-            NodeList = [['CName', GuidProtocolPpi.GetCName()], \r
+            NodeList = [['CName', GuidProtocolPpi.GetCName()],\r
                        ]\r
-        \r
+\r
         for Item in GuidProtocolPpi.GetHelpTextList():\r
             Tmp = HelpTextXml()\r
             NodeList.append(Tmp.ToXml(Item))\r
index aa6f23011b17e805dccbcdc827a39f71b5bdf14c..70d8fb19f2697d9b1c36aced87d26d1580a549f4 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -96,20 +96,20 @@ def ParseFileList(Line, Map, CurrentKey, PathFunc):
             Attr = Token.split(TAB_EQUAL_SPLIT)\r
             if len(Attr) != 2 or not Attr[0].strip() or not Attr[1].strip():\r
                 return False, ST.ERR_WRONG_FILELIST_FORMAT\r
-            \r
+\r
             Key = Attr[0].strip()\r
             Val = Attr[1].strip()\r
             if Key not in ['OS', 'Executable']:\r
                 return False, ST.ERR_UNKNOWN_FILELIST_ATTR % Key\r
-            \r
-            if Key == 'OS' and Val not in ["Win32", "Win64", "Linux32", \r
-                                           "Linux64", "OS/X32", "OS/X64", \r
+\r
+            if Key == 'OS' and Val not in ["Win32", "Win64", "Linux32",\r
+                                           "Linux64", "OS/X32", "OS/X64",\r
                                            "GenericWin", "GenericNix"]:\r
                 return False, ST.ERR_FILELIST_ATTR % 'OS'\r
             elif Key == 'Executable' and Val not in ['true', 'false']:\r
                 return False, ST.ERR_FILELIST_ATTR % 'Executable'\r
             FileList[1][Key] = Val\r
-        \r
+\r
         Map[CurrentKey].append(FileList)\r
     return True, ''\r
 \r
@@ -143,7 +143,7 @@ def CreateHeaderXml(DistMap, Root):
 #\r
 # @param Map: Map\r
 # @param Root: Root\r
-# @param Tag: Tag \r
+# @param Tag: Tag\r
 #\r
 def CreateToolsXml(Map, Root, Tag):\r
     #\r
@@ -225,7 +225,7 @@ def ValidateRegValues(Key, Value):
 def __ValidateDistHeaderName(Name):\r
     if len(Name) < 1:\r
         return False\r
-    \r
+\r
     for Char in Name:\r
         if ord(Char) < 0x20 or ord(Char) >= 0x7f:\r
             return False\r
@@ -314,12 +314,12 @@ def IniToXml(IniFile):
                    'ToolsHeader' : ToolsMap,\r
                    'MiscellaneousFilesHeader' : MiscMap\r
                    }\r
-    \r
+\r
     PathValidator = {\r
                 'ToolsHeader' : ValidateToolsFile,\r
                 'MiscellaneousFilesHeader' : ValidateMiscFile\r
                 }\r
-    \r
+\r
     ParsedSection = []\r
 \r
     SectionName = ''\r
@@ -339,13 +339,13 @@ def IniToXml(IniFile):
             if SectionName not in SectionMap:\r
                 IniParseError(ST.ERR_SECTION_NAME_INVALID % SectionName,\r
                       IniFile, Index+1)\r
-            \r
+\r
             if SectionName in ParsedSection:\r
                 IniParseError(ST.ERR_SECTION_REDEFINE % SectionName,\r
                       IniFile, Index+1)\r
             else:\r
                 ParsedSection.append(SectionName)\r
-            \r
+\r
             Map = SectionMap[SectionName]\r
             continue\r
         if not Map:\r
@@ -363,7 +363,7 @@ def IniToXml(IniFile):
                 #\r
                 # Special for FileList\r
                 #\r
-                Valid, Cause = ParseFileList(Line, Map, CurrentKey, \r
+                Valid, Cause = ParseFileList(Line, Map, CurrentKey,\r
                                              PathValidator[SectionName])\r
                 if not Valid:\r
                     IniParseError(Cause, IniFile, Index+1)\r
@@ -374,7 +374,7 @@ def IniToXml(IniFile):
                 # Or if string on the left side of '=' is not a keyword\r
                 #\r
                 Map[CurrentKey] = ''.join([Map[CurrentKey], '\n', Line])\r
-                Valid, Cause = ValidateValues(CurrentKey, \r
+                Valid, Cause = ValidateValues(CurrentKey,\r
                                               Map[CurrentKey], SectionName)\r
                 if not Valid:\r
                     IniParseError(Cause, IniFile, Index+1)\r
@@ -390,7 +390,7 @@ def IniToXml(IniFile):
         if Map[CurrentKey]:\r
             IniParseError(ST.ERR_KEYWORD_REDEFINE % CurrentKey,\r
                           IniFile, Index+1)\r
-        \r
+\r
         if id(Map) != id(PreMap) and Map['Copyright']:\r
             PreMap = Map\r
             Copyright = Map['Copyright'].lower()\r
@@ -399,9 +399,9 @@ def IniToXml(IniFile):
                 IniParseError(ST.ERR_COPYRIGHT_CONTENT, IniFile, Index)\r
             if not Copyright[Pos + len('copyright'):].lstrip(' ').startswith('('):\r
                 IniParseError(ST.ERR_COPYRIGHT_CONTENT, IniFile, Index)\r
-        \r
+\r
         if CurrentKey == 'FileList':\r
-            Valid, Cause = ParseFileList(TokenList[1], Map, CurrentKey, \r
+            Valid, Cause = ParseFileList(TokenList[1], Map, CurrentKey,\r
                                          PathValidator[SectionName])\r
             if not Valid:\r
                 IniParseError(Cause, IniFile, Index+1)\r
@@ -411,17 +411,17 @@ def IniToXml(IniFile):
                                           Map[CurrentKey], SectionName)\r
             if not Valid:\r
                 IniParseError(Cause, IniFile, Index+1)\r
-    \r
+\r
     if id(Map) != id(PreMap) and Map['Copyright'] and 'copyright' not in Map['Copyright'].lower():\r
         IniParseError(ST.ERR_COPYRIGHT_CONTENT, IniFile, LastIndex)\r
 \r
     #\r
     # Check mandatory keys\r
-    #    \r
-    CheckMdtKeys(DistMap, IniFile, LastIndex, \r
+    #\r
+    CheckMdtKeys(DistMap, IniFile, LastIndex,\r
                  (('ToolsHeader', ToolsMap), ('MiscellaneousFilesHeader', MiscMap))\r
                  )\r
-    \r
+\r
     return CreateXml(DistMap, ToolsMap, MiscMap, IniFile)\r
 \r
 \r
@@ -433,15 +433,15 @@ def IniToXml(IniFile):
 # @param LastIndex: Last index of Ini file\r
 # @param Maps: Tools and Misc section name and map. (('section_name', map),*)\r
 #\r
-def CheckMdtKeys(DistMap, IniFile, LastIndex, Maps):    \r
+def CheckMdtKeys(DistMap, IniFile, LastIndex, Maps):\r
     MdtDistKeys = ['Name', 'GUID', 'Version', 'Vendor', 'Copyright', 'License', 'Abstract', 'XmlSpecification']\r
     for Key in MdtDistKeys:\r
         if Key not in DistMap or DistMap[Key] == '':\r
             IniParseError(ST.ERR_KEYWORD_MANDATORY % Key, IniFile, LastIndex+1)\r
-    \r
+\r
     if '.' not in DistMap['Version']:\r
         DistMap['Version'] = DistMap['Version'] + '.0'\r
-    \r
+\r
     DistMap['Date'] = str(strftime("%Y-%m-%dT%H:%M:%S", localtime()))\r
 \r
     #\r
@@ -464,10 +464,10 @@ def CheckMdtKeys(DistMap, IniFile, LastIndex, Maps):
         for Key in Map:\r
             if Map[Key]:\r
                 NonEmptyKey += 1\r
-        \r
+\r
         if NonEmptyKey > 0 and not Map['FileList']:\r
             IniParseError(ST.ERR_KEYWORD_MANDATORY % (Item[0] + '.FileList'), IniFile, LastIndex+1)\r
-        \r
+\r
         if NonEmptyKey > 0 and not Map['Name']:\r
             IniParseError(ST.ERR_KEYWORD_MANDATORY % (Item[0] + '.Name'), IniFile, LastIndex+1)\r
 \r
@@ -478,7 +478,7 @@ def CheckMdtKeys(DistMap, IniFile, LastIndex, Maps):
 # @param MiscMap:  Misc Content\r
 # @param IniFile:  Ini File\r
 #\r
-def CreateXml(DistMap, ToolsMap, MiscMap, IniFile):    \r
+def CreateXml(DistMap, ToolsMap, MiscMap, IniFile):\r
     Attrs = [['xmlns', 'http://www.uefi.org/2011/1.1'],\r
              ['xmlns:xsi', 'http:/www.w3.org/2001/XMLSchema-instance'],\r
             ]\r
@@ -493,7 +493,7 @@ def CreateXml(DistMap, ToolsMap, MiscMap, IniFile):
     else:\r
         FileName = IniFile + '.xml'\r
     File = open(FileName, 'w')\r
-    \r
+\r
     try:\r
         File.write(Root.toprettyxml(indent = '  '))\r
     finally:\r
index 30091c6231ed01ecb7e96b785593a254ff9d9558..00666bfb57b63942ef1ba5bd4317306f110928a0 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -173,7 +173,7 @@ class PackageSurfaceAreaXml(object):
         if XmlNode(Item, '/PackageSurfaceArea/ClonedFrom'):\r
             ClonedFrom = Tmp.FromXml(XmlNode(Item, '/PackageSurfaceArea/ClonedFrom'), 'ClonedFrom')\r
             Package.SetClonedFromList([ClonedFrom])\r
-        #    \r
+        #\r
         # LibraryClass\r
         #\r
 \r
@@ -254,7 +254,7 @@ class PackageSurfaceAreaXml(object):
             Tmp = PcdEntryXml()\r
             PcdEntry = Tmp.FromXml2(SubItem, 'PcdEntry')\r
             Package.SetPcdList(Package.GetPcdList() + [PcdEntry])\r
-            \r
+\r
             #\r
             # Get PcdErrorCommentDict from PcdError in PcdEntry Node\r
             #\r
@@ -263,7 +263,7 @@ class PackageSurfaceAreaXml(object):
                 if PcdErrorMessageList:\r
                     Package.PcdErrorCommentDict[(PcdEntry.GetTokenSpaceGuidCName(), PcdErrorObj.GetErrorNumber())] = \\r
                     PcdErrorMessageList\r
-                    \r
+\r
 \r
         if XmlList(Item, '/PackageSurfaceArea/PcdDeclarations') and not \\r
            XmlList(Item, '/PackageSurfaceArea/PcdDeclarations/PcdEntry'):\r
@@ -285,7 +285,7 @@ class PackageSurfaceAreaXml(object):
             Module = Tmp.FromXml(SubItem, 'ModuleSurfaceArea')\r
             ModuleDictKey = (Module.GetGuid(), Module.GetVersion(), Module.GetName(), Module.GetModulePath())\r
             Package.ModuleDict[ModuleDictKey] = Module\r
-        #    \r
+        #\r
         # MiscellaneousFile\r
         #\r
         Tmp = MiscellaneousFileXml()\r
@@ -295,7 +295,7 @@ class PackageSurfaceAreaXml(object):
         else:\r
             Package.SetMiscFileList([])\r
 \r
-        #  \r
+        #\r
         # UserExtensions\r
         #\r
         for Item in XmlList(Item, '/PackageSurfaceArea/UserExtensions'):\r
@@ -372,7 +372,7 @@ class PackageSurfaceAreaXml(object):
             GuidProtocolPpiNode.appendChild\\r
             (Tmp.ToXml(GuidProtocolPpi, 'Entry'))\r
         DomPackage.appendChild(GuidProtocolPpiNode)\r
-        # \r
+        #\r
         # Ppi\r
         #\r
         GuidProtocolPpiNode = CreateXmlElement('PpiDeclarations', '', [], [])\r
index c0dc654a3743c03c9cdbccf4c6fc7c6206499717..7a0eb7f3fe10f075b5bdda2ff083ac88eeeb71e2 100644 (file)
@@ -3,9 +3,9 @@
 #\r
 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -49,7 +49,7 @@ class PcdErrorXml(object):
         self.Expression = ''\r
         self.ErrorNumber = ''\r
         self.ErrorMessage = []\r
-        \r
+\r
     def FromXml(self, Item, Key):\r
         self.ValidValueList = XmlElement(Item, '%s/ValidValueList' % Key)\r
         self.ValidValueListLang = \\r
@@ -62,7 +62,7 @@ class PcdErrorXml(object):
             ErrorMessageLang = \\r
             XmlAttribute(XmlNode(ErrMsg, 'ErrorMessage'), 'Lang')\r
             self.ErrorMessage.append((ErrorMessageLang, ErrorMessageString))\r
-        \r
+\r
         Error = PcdErrorObject()\r
         Error.SetValidValue(self.ValidValueList)\r
         Error.SetValidValueLang(self.ValidValueListLang)\r
@@ -70,7 +70,7 @@ class PcdErrorXml(object):
         Error.SetExpression(self.Expression)\r
         Error.SetErrorNumber(self.ErrorNumber)\r
         Error.SetErrorMessageList(self.ErrorMessage)\r
-        \r
+\r
         return Error\r
 \r
     def ToXml(self, PcdError, Key):\r
@@ -100,9 +100,9 @@ class PcdErrorXml(object):
             CreateXmlElement('ErrorMessage', Item[1], [], [['Lang', Item[0]]])\r
             NodeList.append(Element)\r
         Root = CreateXmlElement('%s' % Key, '', NodeList, AttributeList)\r
-        \r
+\r
         return Root\r
-    \r
+\r
     def TransferValidRange2Expr(self, TokenSpaceGuidCName, CName, ValidRange):\r
         if self.Expression:\r
             pass\r
@@ -125,7 +125,7 @@ class PcdErrorXml(object):
             for MatchObj in HexMatch2.finditer(ValidRange):\r
                 MatchStr = MatchObj.group()\r
                 TransferedRangeStr = ' '.join(['', PcdName, MatchStr.strip()])\r
-                ValidRange = ValidRange.replace(MatchStr, TransferedRangeStr) \r
+                ValidRange = ValidRange.replace(MatchStr, TransferedRangeStr)\r
         #\r
         # Convert INT2 format range\r
         #\r
@@ -133,36 +133,36 @@ class PcdErrorXml(object):
             for MatchObj in IntMatch2.finditer(ValidRange):\r
                 MatchStr = MatchObj.group()\r
                 TransferedRangeStr = ' '.join(['', PcdName, MatchStr.strip()])\r
-                ValidRange = ValidRange.replace(MatchStr, TransferedRangeStr)     \r
+                ValidRange = ValidRange.replace(MatchStr, TransferedRangeStr)\r
         #\r
         # Convert HEX1 format range\r
         #\r
         if HexMatch1:\r
             HexMatchedList += HexMatch1.findall(ValidRange)\r
-            \r
+\r
         for MatchStr in HexMatchedList:\r
             RangeItemList = MatchStr.strip().split('-')\r
             TransferedRangeStr = '(%s GE %s) AND (%s LE %s)' % \\r
                 (PcdName, RangeItemList[0].strip(), PcdName, RangeItemList[1].strip())\r
-            ValidRange = ValidRange.replace(MatchStr, TransferedRangeStr) \r
+            ValidRange = ValidRange.replace(MatchStr, TransferedRangeStr)\r
         #\r
         # Convert INT1 format range\r
         #\r
         if IntMatch1:\r
             IntMatchedList += IntMatch1.findall(ValidRange)\r
-            \r
+\r
         for MatchStr in IntMatchedList:\r
             RangeItemList = MatchStr.strip().split('-')\r
             TransferedRangeStr = '(%s GE %s) AND (%s LE %s)' % \\r
                 (PcdName, RangeItemList[0].strip(), PcdName, RangeItemList[1].strip())\r
-            ValidRange = ValidRange.replace(MatchStr, TransferedRangeStr) \r
-            \r
+            ValidRange = ValidRange.replace(MatchStr, TransferedRangeStr)\r
+\r
         return ValidRange\r
-    \r
+\r
     def TransferValidEpxr2ValidRange(self, ValidRangeExpr):\r
         if self.Expression:\r
             pass\r
-        \r
+\r
         PCD_PATTERN = \\r
         '[\t\s]*[_a-zA-Z][a-zA-Z0-9_]*[\t\s]*\.[\t\s]*[_a-zA-Z][a-zA-Z0-9_]*[\t\s]*'\r
         IntPattern1 = \\r
@@ -170,16 +170,16 @@ class PcdErrorXml(object):
         PCD_PATTERN+'[\t\s]+LE[\t\s]+\d+[\t\s]*\)'\r
         IntPattern1 = IntPattern1.replace(' ', '')\r
         IntPattern2 = '[\t\s]*'+PCD_PATTERN+'[\t\s]+(LT|GT|LE|GE|XOR|EQ)[\t\s]+\d+[\t\s]*'\r
-        \r
+\r
         HexPattern1 = \\r
         '[\t\s]*\([\t\s]*'+PCD_PATTERN+'[\t\s]+GE[\t\s]+0[xX][0-9a-fA-F]+[\t\s]*\)[\t\s]+AND[\t\s]+\([\t\s]*'+\\r
         PCD_PATTERN+'[\t\s]+LE[\t\s]+0[xX][0-9a-fA-F]+[\t\s]*\)'\r
         HexPattern1 = HexPattern1.replace(' ', '')\r
         HexPattern2 = '[\t\s]*'+PCD_PATTERN+'[\t\s]+(LT|GT|LE|GE|XOR|EQ)[\t\s]+0[xX][0-9a-zA-Z]+[\t\s]*'\r
-        \r
+\r
         #\r
         # Do the Hex1 conversion\r
-        # \r
+        #\r
         HexMatchedList = re.compile(HexPattern1).findall(ValidRangeExpr)\r
         HexRangeDict = {}\r
         for HexMatchedItem in HexMatchedList:\r
@@ -188,8 +188,8 @@ class PcdErrorXml(object):
             #\r
             RangeItemList = re.compile('[\t\s]*0[xX][0-9a-fA-F]+[\t\s]*').findall(HexMatchedItem)\r
             if RangeItemList and len(RangeItemList) == 2:\r
-                HexRangeDict[HexMatchedItem] = RangeItemList            \r
-        \r
+                HexRangeDict[HexMatchedItem] = RangeItemList\r
+\r
         for Key in HexRangeDict.keys():\r
             MaxItem = MixItem = ''\r
             if int(HexRangeDict[Key][0], 16) > int(HexRangeDict[Key][1], 16):\r
@@ -198,7 +198,7 @@ class PcdErrorXml(object):
             else:\r
                 MaxItem = HexRangeDict[Key][1]\r
                 MixItem = HexRangeDict[Key][0]\r
-            \r
+\r
             Range = ' %s - %s' % (MixItem.strip(), MaxItem.strip())\r
             ValidRangeExpr = ValidRangeExpr.replace(Key, Range)\r
         #\r
@@ -211,9 +211,9 @@ class PcdErrorXml(object):
             # To match items on both sides of '-'\r
             #\r
             RangeItemList = re.compile('[\t\s]*\d+[\t\s]*').findall(MatchedItem)\r
-            if RangeItemList and len(RangeItemList) == 2:  \r
+            if RangeItemList and len(RangeItemList) == 2:\r
                 IntRangeDict[MatchedItem] = RangeItemList\r
-                    \r
+\r
         for Key in IntRangeDict.keys():\r
             MaxItem = MixItem = ''\r
             if int(IntRangeDict[Key][0]) > int(IntRangeDict[Key][1]):\r
@@ -222,11 +222,11 @@ class PcdErrorXml(object):
             else:\r
                 MaxItem = IntRangeDict[Key][1]\r
                 MixItem = IntRangeDict[Key][0]\r
-            \r
+\r
             Range = ' %s - %s' % (MixItem.strip(), MaxItem.strip())\r
             ValidRangeExpr = ValidRangeExpr.replace(Key, Range)\r
         #\r
-        # Do the HEX2 conversion        \r
+        # Do the HEX2 conversion\r
         #\r
         for MatchObj in re.compile(HexPattern2).finditer(ValidRangeExpr):\r
             MatchStr = MatchObj.group()\r
@@ -241,8 +241,8 @@ class PcdErrorXml(object):
             ValidRangeExpr = ValidRangeExpr.replace(MatchStr, Range)\r
 \r
         return ValidRangeExpr\r
-            \r
-        \r
+\r
+\r
 \r
     def __str__(self):\r
         return "ValidValueList = %s ValidValueListLang = %s ValidValueRange \\r
@@ -275,7 +275,7 @@ class PcdEntryXml(object):
 \r
     ##\r
     # AsBuilt will use FromXml\r
-    #         \r
+    #\r
     def FromXml(self, Item, Key):\r
         self.PcdItemType = \\r
         XmlAttribute(XmlNode(Item, '%s' % Key), 'PcdItemType')\r
@@ -297,7 +297,7 @@ class PcdEntryXml(object):
         self.Value = XmlElement(Item, '%s/Value' % Key)\r
         self.Offset = XmlElement(Item, '%s/Offset' % Key)\r
         self.CommonDefines.FromXml(XmlNode(Item, '%s' % Key), Key)\r
-        \r
+\r
         for HelpTextItem in XmlList(Item, '%s/HelpText' % Key):\r
             HelpTextObj = HelpTextXml()\r
             HelpTextObj.FromXml(HelpTextItem, '%s/HelpText' % Key)\r
@@ -306,9 +306,9 @@ class PcdEntryXml(object):
             PcdErrorObjXml = PcdErrorXml()\r
             PcdErrorObj = PcdErrorObjXml.FromXml(PcdErrorItem, 'PcdError')\r
             self.PcdError.append(PcdErrorObj)\r
-        \r
+\r
         self.DefaultValue = ConvertNOTEQToNE(self.DefaultValue)\r
-        \r
+\r
         PcdEntry = PcdObject()\r
         PcdEntry.SetSupArchList(self.CommonDefines.SupArchList)\r
         PcdEntry.SetTokenSpaceGuidCName(self.TokenSpaceGuidCName)\r
@@ -326,11 +326,11 @@ class PcdEntryXml(object):
 \r
         PcdEntry.SetHelpTextList(GetHelpTextList(self.HelpText))\r
         PcdEntry.SetPcdErrorsList(self.PcdError)\r
-        \r
+\r
         return PcdEntry\r
     ##\r
     # Package will use FromXml2\r
-    # \r
+    #\r
     def FromXml2(self, Item, Key):\r
         self.TokenSpaceGuidCName = \\r
         XmlElement(Item, '%s/TokenSpaceGuidCname' % Key)\r
@@ -353,9 +353,9 @@ class PcdEntryXml(object):
             PcdErrorObjXml = PcdErrorXml()\r
             PcdErrorObj = PcdErrorObjXml.FromXml(PcdErrorItem, 'PcdError')\r
             self.PcdError.append(PcdErrorObj)\r
-        \r
+\r
         self.DefaultValue = ConvertNOTEQToNE(self.DefaultValue)\r
-        \r
+\r
         PcdEntry = PcdObject()\r
         PcdEntry.SetSupArchList(self.CommonDefines.SupArchList)\r
         PcdEntry.SetSupModuleList(self.CommonDefines.SupModList)\r
@@ -367,11 +367,11 @@ class PcdEntryXml(object):
         PcdEntry.SetDefaultValue(self.DefaultValue)\r
         PcdEntry.SetMaxDatumSize(self.MaxDatumSize)\r
         PcdEntry.SetFeatureFlag(ConvertNOTEQToNE(self.CommonDefines.FeatureFlag))\r
-        \r
+\r
         PcdEntry.SetPromptList(GetPromptList(self.Prompt))\r
         PcdEntry.SetHelpTextList(GetHelpTextList(self.HelpText))\r
         PcdEntry.SetPcdErrorsList(self.PcdError)\r
-        \r
+\r
         return PcdEntry\r
 \r
     ##\r
@@ -394,9 +394,9 @@ class PcdEntryXml(object):
             PcdErrorObj = PcdErrorXml()\r
             PcdErrorObj.FromXml(PcdErrorItem, 'PcdError')\r
             self.PcdError.append(PcdErrorObj)\r
-        \r
+\r
         self.DefaultValue = ConvertNOTEQToNE(self.DefaultValue)\r
-        \r
+\r
         PcdEntry = PcdObject()\r
         PcdEntry.SetSupArchList(self.CommonDefines.SupArchList)\r
         PcdEntry.SetTokenSpaceGuidCName(self.TokenSpaceGuidCName)\r
@@ -408,15 +408,15 @@ class PcdEntryXml(object):
 \r
         PcdEntry.SetHelpTextList(GetHelpTextList(self.HelpText))\r
         PcdEntry.SetPcdErrorsList(self.PcdError)\r
-        \r
+\r
         return PcdEntry\r
-         \r
+\r
     def ToXml(self, PcdEntry, Key):\r
         if self.PcdCName:\r
             pass\r
-        \r
+\r
         DefaultValue = ConvertNEToNOTEQ(PcdEntry.GetDefaultValue())\r
-        \r
+\r
         AttributeList = \\r
         [['SupArchList', GetStringOfList(PcdEntry.GetSupArchList())], \\r
          ['PcdUsage', PcdEntry.GetValidUsage()], \\r
@@ -425,7 +425,7 @@ class PcdEntryXml(object):
         ]\r
         NodeList = [['TokenSpaceGuidCname', PcdEntry.GetTokenSpaceGuidCName()],\r
                     ['TokenSpaceGuidValue', PcdEntry.GetTokenSpaceGuidValue()],\r
-                    ['Token', PcdEntry.GetToken()], \r
+                    ['Token', PcdEntry.GetToken()],\r
                     ['CName', PcdEntry.GetCName()],\r
                     ['DatumType', PcdEntry.GetDatumType()],\r
                     ['ValidUsage', GetStringOfList(PcdEntry.GetValidUsage())],\r
@@ -433,26 +433,26 @@ class PcdEntryXml(object):
                     ['MaxDatumSize', PcdEntry.GetMaxDatumSize()],\r
                     ['Offset', PcdEntry.GetOffset()],\r
                    ]\r
-        \r
+\r
         for Item in PcdEntry.GetHelpTextList():\r
             Tmp = HelpTextXml()\r
             NodeList.append(Tmp.ToXml(Item))\r
         for Item in PcdEntry.GetPcdErrorsList():\r
             Tmp = PcdErrorXml()\r
             NodeList.append(Tmp.ToXml(Item, 'PcdError'))\r
-        \r
+\r
         Root = CreateXmlElement('%s' % Key, '', NodeList, AttributeList)\r
-        \r
+\r
         return Root\r
     ##\r
     # Package will use ToXml2\r
-    #    \r
+    #\r
     def ToXml2(self, PcdEntry, Key):\r
         if self.PcdCName:\r
             pass\r
-        \r
+\r
         DefaultValue = ConvertNEToNOTEQ(PcdEntry.GetDefaultValue())\r
-        \r
+\r
         AttributeList = \\r
         [['SupArchList', GetStringOfList(PcdEntry.GetSupArchList())], \\r
          ['SupModList', GetStringOfList(PcdEntry.GetSupModuleList())]\r
@@ -468,7 +468,7 @@ class PcdEntryXml(object):
         for Item in PcdEntry.GetPromptList():\r
             Tmp = PromptXml()\r
             NodeList.append(Tmp.ToXml(Item))\r
-                    \r
+\r
         for Item in PcdEntry.GetHelpTextList():\r
             Tmp = HelpTextXml()\r
             NodeList.append(Tmp.ToXml(Item))\r
@@ -476,9 +476,9 @@ class PcdEntryXml(object):
         for Item in PcdEntry.GetPcdErrorsList():\r
             Tmp = PcdErrorXml()\r
             NodeList.append(Tmp.ToXml(Item, 'PcdError'))\r
-        \r
+\r
         Root = CreateXmlElement('%s' % Key, '', NodeList, AttributeList)\r
-        \r
+\r
         return Root\r
     ##\r
     # Module will use ToXml3\r
@@ -486,9 +486,9 @@ class PcdEntryXml(object):
     def ToXml3(self, PcdEntry, Key):\r
         if self.PcdCName:\r
             pass\r
-        \r
+\r
         DefaultValue = ConvertNEToNOTEQ(PcdEntry.GetDefaultValue())\r
-        \r
+\r
         AttributeList = \\r
         [['SupArchList', GetStringOfList(PcdEntry.GetSupArchList())], \\r
          ['PcdUsage', PcdEntry.GetValidUsage()], \\r
@@ -499,29 +499,29 @@ class PcdEntryXml(object):
                     ['TokenSpaceGuidCName', PcdEntry.GetTokenSpaceGuidCName()],\r
                     ['DefaultValue', DefaultValue],\r
                    ]\r
-        \r
+\r
         for Item in PcdEntry.GetHelpTextList():\r
             Tmp = HelpTextXml()\r
             NodeList.append(Tmp.ToXml(Item))\r
         for Item in PcdEntry.GetPcdErrorsList():\r
             Tmp = PcdErrorXml()\r
             NodeList.append(Tmp.ToXml(Item, 'PcdError'))\r
-        \r
+\r
         Root = CreateXmlElement('%s' % Key, '', NodeList, AttributeList)\r
-        \r
+\r
         return Root\r
-    \r
+\r
     ##\r
     # AsBuild Module will use ToXml4\r
     #\r
     def ToXml4(self, PcdEntry, Key):\r
         if self.PcdCName:\r
             pass\r
-        \r
+\r
         DefaultValue = ConvertNEToNOTEQ(PcdEntry.GetDefaultValue())\r
-        \r
+\r
         AttributeList = []\r
-        \r
+\r
         NodeList = [\r
                     ['TokenSpaceGuidValue', PcdEntry.GetTokenSpaceGuidValue()],\r
                     ['PcdCName', PcdEntry.GetCName()],\r
@@ -531,18 +531,18 @@ class PcdEntryXml(object):
                     ['Value', DefaultValue],\r
                     ['Offset', PcdEntry.GetOffset()]\r
                    ]\r
-        \r
+\r
         for Item in PcdEntry.GetHelpTextList():\r
             Tmp = HelpTextXml()\r
             NodeList.append(Tmp.ToXml(Item))\r
         for Item in PcdEntry.GetPcdErrorsList():\r
             Tmp = PcdErrorXml()\r
             NodeList.append(Tmp.ToXml(Item, 'PcdError'))\r
-        \r
+\r
         Root = CreateXmlElement('%s' % Key, '', NodeList, AttributeList)\r
-        \r
+\r
         return Root\r
-        \r
+\r
 \r
     def __str__(self):\r
         Str = \\r
index dfc81567aed6d824aa822624aadc9793d91c47f5..82f307b3e5d872f30f1dbd47c4c88b07bdedee82 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file is used to parse a xml file of .PKG file\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -89,7 +89,7 @@ class DistributionPackageXml(object):
                     DPLicense = DpHeader.GetLicense()[0][1]\r
                 else:\r
                     DPLicense = ''\r
-                \r
+\r
                 CheckDict['Name'] = DpHeader.GetName()\r
                 CheckDict['GUID'] = DpHeader.GetGuid()\r
                 CheckDict['Version'] = DpHeader.GetVersion()\r
@@ -119,7 +119,7 @@ class DistributionPackageXml(object):
                 ValidateMS(self.DistP.ModuleSurfaceArea[Key], ['DistributionPackage', 'ModuleSurfaceArea'])\r
 \r
             #\r
-            # Check Each Tool   \r
+            # Check Each Tool\r
             #\r
             if self.DistP.Tools:\r
                 XmlTreeLevel = ['DistributionPackage', 'Tools', 'Header']\r
@@ -195,7 +195,7 @@ class DistributionPackageXml(object):
                 ModuleKey = (Module.GetGuid(), Module.GetVersion(), Module.GetName(), Module.GetModulePath())\r
                 self.DistP.ModuleSurfaceArea[ModuleKey] = Module\r
 \r
-            #    \r
+            #\r
             # Parse Tools\r
             #\r
             Tmp = MiscellaneousFileXml()\r
@@ -252,7 +252,7 @@ class DistributionPackageXml(object):
                 Msa = ModuleSurfaceAreaXml()\r
                 DomModule = Msa.ToXml(Module)\r
                 Root.appendChild(DomModule)\r
-            #    \r
+            #\r
             # Parse Tools\r
             #\r
             Tmp = MiscellaneousFileXml()\r
@@ -307,7 +307,7 @@ class DistributionPackageXml(object):
 \r
             #\r
             # Remove SupModList="COMMON" or "common"\r
-            #            \r
+            #\r
             XmlContent = \\r
             re.sub(r'[\s\r\n]*SupModList[\s\r\n]*=[\s\r\n]*"[\s\r\n]*COMMON'\r
             '[\s\r\n]*"', '', XmlContent)\r
@@ -324,7 +324,7 @@ class DistributionPackageXml(object):
 # Check if any required item is missing in ModuleSurfaceArea\r
 #\r
 # @param Module: The ModuleSurfaceArea to be checked\r
-# @param XmlTreeLevel: The top level of Module \r
+# @param XmlTreeLevel: The top level of Module\r
 #\r
 def ValidateMS(Module, TopXmlTreeLevel):\r
     ValidateMS1(Module, TopXmlTreeLevel)\r
@@ -336,7 +336,7 @@ def ValidateMS(Module, TopXmlTreeLevel):
 # Check if any required item is missing in ModuleSurfaceArea\r
 #\r
 # @param Module: The ModuleSurfaceArea to be checked\r
-# @param XmlTreeLevel: The top level of Module \r
+# @param XmlTreeLevel: The top level of Module\r
 #\r
 def ValidateMS1(Module, TopXmlTreeLevel):\r
     #\r
@@ -421,10 +421,10 @@ def ValidateMS1(Module, TopXmlTreeLevel):
             IsRequiredItemListNull(CheckDict, XmlTreeLevel)\r
 \r
     #\r
-    # If SupArchList is used to identify different EntryPoint, UnloadImage, Constructor/Destructor elements and \r
+    # If SupArchList is used to identify different EntryPoint, UnloadImage, Constructor/Destructor elements and\r
     # that SupArchList does not match ModuleSurfaceArea.ModuleProperties:SupArchList, the tool must exit gracefully,\r
-    # informing the user that the EDK II Build system does not support different EntryPoint, UnloadImage, \r
-    # Constructor or Destructor elements based on Architecture type.  Two SupArchList attributes are considered \r
+    # informing the user that the EDK II Build system does not support different EntryPoint, UnloadImage,\r
+    # Constructor or Destructor elements based on Architecture type.  Two SupArchList attributes are considered\r
     # identical if it lists the same CPU architectures in any order.\r
     #\r
     for Item in Module.GetExternList():\r
@@ -459,7 +459,7 @@ def ValidateMS1(Module, TopXmlTreeLevel):
 # Check if any required item is missing in ModuleSurfaceArea\r
 #\r
 # @param Module: The ModuleSurfaceArea to be checked\r
-# @param XmlTreeLevel: The top level of Module \r
+# @param XmlTreeLevel: The top level of Module\r
 #\r
 def ValidateMS2(Module, TopXmlTreeLevel):\r
     #\r
@@ -485,7 +485,7 @@ def ValidateMS2(Module, TopXmlTreeLevel):
         Logger.Error("UPT", FORMAT_INVALID, ERR_FILE_NAME_INVALIDE % Module.GetModulePath())\r
 \r
     #\r
-    # Check ModuleProperties->BootMode \r
+    # Check ModuleProperties->BootMode\r
     #\r
     XmlTreeLevel = TopXmlTreeLevel + ['ModuleProperties'] + ['BootMode']\r
     for Item in Module.GetBootModeList():\r
@@ -494,7 +494,7 @@ def ValidateMS2(Module, TopXmlTreeLevel):
         IsRequiredItemListNull(CheckDict, XmlTreeLevel)\r
 \r
     #\r
-    # Check ModuleProperties->Event \r
+    # Check ModuleProperties->Event\r
     #\r
     XmlTreeLevel = TopXmlTreeLevel + ['ModuleProperties'] + ['Event']\r
     for Item in Module.GetEventList():\r
@@ -503,7 +503,7 @@ def ValidateMS2(Module, TopXmlTreeLevel):
         IsRequiredItemListNull(CheckDict, XmlTreeLevel)\r
 \r
     #\r
-    # Check ModuleProperties->Hob \r
+    # Check ModuleProperties->Hob\r
     #\r
     XmlTreeLevel = TopXmlTreeLevel + ['ModuleProperties'] + ['HOB']\r
     for Item in Module.GetHobList():\r
@@ -512,8 +512,8 @@ def ValidateMS2(Module, TopXmlTreeLevel):
         IsRequiredItemListNull(CheckDict, XmlTreeLevel)\r
 \r
     #\r
-    # The UDP Specification supports the module type of UEFI_RUNTIME_DRIVER, which is not present in the EDK II INF \r
-    # File Specification v. 1.23, so UPT must perform the following translation that include the generation of a \r
+    # The UDP Specification supports the module type of UEFI_RUNTIME_DRIVER, which is not present in the EDK II INF\r
+    # File Specification v. 1.23, so UPT must perform the following translation that include the generation of a\r
     # [Depex] section.\r
     #\r
     if Module.ModuleType == "UEFI_RUNTIME_DRIVER":\r
@@ -549,7 +549,7 @@ def ValidateMS2(Module, TopXmlTreeLevel):
                      'Usage':Item.GetUsage()}\r
         IsRequiredItemListNull(CheckDict, XmlTreeLevel)\r
         #\r
-        # If the LibraryClass:SupModList is not "UNDEFINED" the LIBRARY_CLASS entry must have the list \r
+        # If the LibraryClass:SupModList is not "UNDEFINED" the LIBRARY_CLASS entry must have the list\r
         # appended using the format:\r
         # LIBRARY_CLASS = <ClassName> ["|" <Edk2ModuleTypeList>]\r
         #\r
@@ -574,10 +574,10 @@ def ValidateMS2(Module, TopXmlTreeLevel):
 \r
 \r
     #\r
-    # For Library modules (indicated by a LIBRARY_CLASS statement in the [Defines] section)                  \r
-    # If the SupModList attribute of the CONSTRUCTOR or DESTRUCTOR element does not match the Supported Module \r
-    # Types listed after "LIBRARY_CLASS = <Keyword> |", the tool should gracefully exit with an error message \r
-    # stating that there is a conflict in the module types the CONSTRUCTOR/DESTRUCTOR is to be used with and \r
+    # For Library modules (indicated by a LIBRARY_CLASS statement in the [Defines] section)\r
+    # If the SupModList attribute of the CONSTRUCTOR or DESTRUCTOR element does not match the Supported Module\r
+    # Types listed after "LIBRARY_CLASS = <Keyword> |", the tool should gracefully exit with an error message\r
+    # stating that there is a conflict in the module types the CONSTRUCTOR/DESTRUCTOR is to be used with and\r
     # the Module types this Library supports.\r
     #\r
     if IsLibraryModule:\r
@@ -591,10 +591,10 @@ def ValidateMS2(Module, TopXmlTreeLevel):
                          RaiseError=True)\r
 \r
     #\r
-    # If the module is not a library module, the MODULE_TYPE listed in the ModuleSurfaceArea.Header must match the \r
-    # SupModList attribute.  If these conditions cannot be met, the tool must exit gracefully, informing the user \r
+    # If the module is not a library module, the MODULE_TYPE listed in the ModuleSurfaceArea.Header must match the\r
+    # SupModList attribute.  If these conditions cannot be met, the tool must exit gracefully, informing the user\r
     # that the EDK II Build system does not currently support the features required by this Module.\r
-    #                   \r
+    #\r
     if not IsLibraryModule:\r
         for Item in Module.GetExternList():\r
             if hasattr(Item, 'SupModList') and len(Item.SupModList) > 0 and \\r
@@ -628,7 +628,7 @@ def ValidateMS2(Module, TopXmlTreeLevel):
 # Check if any required item is missing in ModuleSurfaceArea\r
 #\r
 # @param Module: The ModuleSurfaceArea to be checked\r
-# @param XmlTreeLevel: The top level of Module \r
+# @param XmlTreeLevel: The top level of Module\r
 #\r
 def ValidateMS3(Module, TopXmlTreeLevel):\r
     #\r
@@ -666,12 +666,12 @@ def ValidateMS3(Module, TopXmlTreeLevel):
         for AsBuilt in Item.GetAsBuiltList():\r
             #\r
             # Check LibInstance\r
-            #                        \r
+            #\r
             if len(AsBuilt.LibraryInstancesList) == 1 and not AsBuilt.LibraryInstancesList[0]:\r
                 CheckDict = {'GUID':''}\r
                 XmlTreeLevel = TopXmlTreeLevel + ['BinaryFiles', 'BinaryFile', 'AsBuilt', 'LibraryInstances']\r
                 IsRequiredItemListNull(CheckDict, XmlTreeLevel)\r
-                            \r
+\r
             for LibItem in AsBuilt.LibraryInstancesList:\r
                 CheckDict = {'Guid':LibItem.Guid,\r
                              'Version':LibItem.Version}\r
@@ -925,7 +925,7 @@ def ValidatePS2(Package):
 #\r
 # Check if any required item is missing in  PackageSurfaceArea\r
 #\r
-# @param Package: The PackageSurfaceArea to be checked \r
+# @param Package: The PackageSurfaceArea to be checked\r
 #\r
 def ValidatePackageSurfaceArea(Package):\r
     ValidatePS1(Package)\r
index 7e3dc94edf64499473311b921aad74646ad08ec3..d170761aad8e5e5cbc5a2240d5d810de89c7b8a4 100644 (file)
@@ -1,11 +1,11 @@
 ## @file\r
 # This file is used to parse a xml file of .PKG file\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -21,7 +21,7 @@ from Logger.ToolError import PARSER_ERROR
 import Logger.Log as Logger\r
 \r
 ## ConvertVariableName()\r
-# Convert VariableName to be L"string", \r
+# Convert VariableName to be L"string",\r
 # input of UCS-2 format Hex Array or L"string" (C style.) could be converted successfully,\r
 # others will not.\r
 #\r
@@ -31,11 +31,11 @@ import Logger.Log as Logger
 def ConvertVariableName(VariableName):\r
     VariableName = VariableName.strip()\r
     #\r
-    # check for L quoted string \r
+    # check for L quoted string\r
     #\r
     if VariableName.startswith('L"') and VariableName.endswith('"'):\r
         return VariableName\r
-    \r
+\r
     #\r
     # check for Hex Array, it should be little endian even number of hex numbers\r
     #\r
@@ -52,7 +52,7 @@ def ConvertVariableName(VariableName):
         SecondByte = int(ValueList[Index + 1], 16)\r
         if SecondByte != 0:\r
             return None\r
-  \r
+\r
         if FirstByte not in xrange(0x20, 0x7F):\r
             return None\r
         TransferedStr += ('%c')%FirstByte\r
@@ -63,10 +63,10 @@ def ConvertVariableName(VariableName):
 ## IsRequiredItemListNull\r
 #\r
 # Check if a required XML section item/attribue is NULL\r
-# \r
+#\r
 # @param ItemList:     The list of items to be checked\r
 # @param XmlTreeLevel: The error message tree level\r
-# \r
+#\r
 def IsRequiredItemListNull(ItemDict, XmlTreeLevel):\r
     for Key in ItemDict:\r
         if not ItemDict[Key]:\r
@@ -74,7 +74,7 @@ def IsRequiredItemListNull(ItemDict, XmlTreeLevel):
             ErrorMsg = ERR_XML_PARSER_REQUIRED_ITEM_MISSING % (Key, Msg)\r
             Logger.Error('\nUPT', PARSER_ERROR, ErrorMsg, RaiseError=True)\r
 \r
-## Get help text \r
+## Get help text\r
 #\r
 # @param HelpText\r
 #\r
@@ -86,8 +86,8 @@ def GetHelpTextList(HelpText):
         HelpTextObj.SetString(HelT.HelpText)\r
         HelpTextList.append(HelpTextObj)\r
     return HelpTextList\r
-    \r
-## Get Prompt text \r
+\r
+## Get Prompt text\r
 #\r
 # @param Prompt\r
 #\r
index f09eece5fb0e3110cd09961f21b4a48d74e65b16..e8283c03cb3684fb5bb6fc9f90b6324a14d800be 100644 (file)
@@ -4,11 +4,11 @@
 # This file is required to make Python interpreter treat the directory\r
 # as containing package.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
-# This program and the accompanying materials are licensed and made available \r
-# under the terms and conditions of the BSD License which accompanies this \r
-# distribution. The full text of the license may be found at \r
+# This program and the accompanying materials are licensed and made available\r
+# under the terms and conditions of the BSD License which accompanies this\r
+# distribution. The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -17,4 +17,4 @@
 \r
 '''\r
 Xml\r
-'''
\ No newline at end of file
+'''\r
index f35778d18afff744357fbdddd9144dbfcbf1fd6d..0aa72d8302a0be02d2b3807b740ff6850e31a200 100644 (file)
@@ -369,10 +369,10 @@ class MetaFileParser(object):
                     EdkLogger.error("Parser", FORMAT_INVALID, "Global macro %s is not permitted." % (Macro), ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
             else:\r
                 EdkLogger.error("Parser", FORMAT_INVALID, "%s not defined" % (Macro), ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
-        # Sometimes, we need to make differences between EDK and EDK2 modules \r
+        # Sometimes, we need to make differences between EDK and EDK2 modules\r
         if Name == 'INF_VERSION':\r
             if hexVersionPattern.match(Value):\r
-                self._Version = int(Value, 0)   \r
+                self._Version = int(Value, 0)\r
             elif decVersionPattern.match(Value):\r
                 ValueList = Value.split('.')\r
                 Major = '%04o' % int(ValueList[0], 0)\r
@@ -418,7 +418,7 @@ class MetaFileParser(object):
         Macros.update(self._GetApplicableSectionMacro())\r
         return Macros\r
 \r
-    ## Construct section Macro dict \r
+    ## Construct section Macro dict\r
     def _ConstructSectionMacroDict(self, Name, Value):\r
         ScopeKey = [(Scope[0], Scope[1], Scope[2]) for Scope in self._Scope]\r
         ScopeKey = tuple(ScopeKey)\r
@@ -433,7 +433,7 @@ class MetaFileParser(object):
 \r
         self._SectionsMacroDict[SectionDictKey][Name] = Value\r
 \r
-    ## Get section Macros that are applicable to current line, which may come from other sections \r
+    ## Get section Macros that are applicable to current line, which may come from other sections\r
     ## that share the same name while scope is wider\r
     def _GetApplicableSectionMacro(self):\r
         Macros = {}\r
@@ -1351,7 +1351,7 @@ class DscParser(MetaFileParser):
             try:\r
                 Processer[self._ItemType]()\r
             except EvaluationException as Excpt:\r
-                # \r
+                #\r
                 # Only catch expression evaluation error here. We need to report\r
                 # the precise number of line on which the error occurred\r
                 #\r
@@ -1478,7 +1478,7 @@ class DscParser(MetaFileParser):
                 EdkLogger.debug(EdkLogger.DEBUG_5, str(Exc), self._ValueList[1])\r
                 Result = False\r
             except WrnExpression as Excpt:\r
-                # \r
+                #\r
                 # Catch expression evaluation warning here. We need to report\r
                 # the precise number of line and return the evaluation result\r
                 #\r
@@ -1535,7 +1535,7 @@ class DscParser(MetaFileParser):
             __IncludeMacros['EFI_SOURCE'] = GlobalData.gGlobalDefines['EFI_SOURCE']\r
             __IncludeMacros['EDK_SOURCE'] = GlobalData.gGlobalDefines['EDK_SOURCE']\r
             #\r
-            # Allow using MACROs comes from [Defines] section to keep compatible. \r
+            # Allow using MACROs comes from [Defines] section to keep compatible.\r
             #\r
             __IncludeMacros.update(self._Macros)\r
 \r
index f528c1ee6642a8355192843f0966c42db8f00bce..ee1c7fffca3b36923f72ba37e5995170743a282e 100644 (file)
@@ -56,7 +56,7 @@ class MetaFileTable(Table):
             Result = self.Cur.execute("select ID from %s where ID<0" % (self.Table)).fetchall()\r
             if not Result:\r
                 # update the timestamp in database\r
-                self._FileIndexTable.SetFileTimeStamp(self.IdBase, TimeStamp)                \r
+                self._FileIndexTable.SetFileTimeStamp(self.IdBase, TimeStamp)\r
                 return False\r
 \r
             if TimeStamp != self._FileIndexTable.GetFileTimeStamp(self.IdBase):\r
@@ -113,28 +113,28 @@ class ModuleTable(MetaFileTable):
                BelongsToItem=-1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=0):\r
         (Value1, Value2, Value3, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2))\r
         return Table.Insert(\r
-                        self, \r
-                        Model, \r
-                        Value1, \r
-                        Value2, \r
-                        Value3, \r
-                        Scope1, \r
+                        self,\r
+                        Model,\r
+                        Value1,\r
+                        Value2,\r
+                        Value3,\r
+                        Scope1,\r
                         Scope2,\r
-                        BelongsToItem, \r
-                        StartLine, \r
-                        StartColumn, \r
-                        EndLine, \r
-                        EndColumn, \r
+                        BelongsToItem,\r
+                        StartLine,\r
+                        StartColumn,\r
+                        EndLine,\r
+                        EndColumn,\r
                         Enabled\r
                         )\r
 \r
     ## Query table\r
     #\r
-    # @param    Model:      The Model of Record \r
-    # @param    Arch:       The Arch attribute of Record \r
-    # @param    Platform    The Platform attribute of Record \r
+    # @param    Model:      The Model of Record\r
+    # @param    Arch:       The Arch attribute of Record\r
+    # @param    Platform    The Platform attribute of Record\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self, Model, Arch=None, Platform=None, BelongsToItem=None):\r
         ConditionString = "Model=%s AND Enabled>=0" % Model\r
@@ -195,27 +195,27 @@ class PackageTable(MetaFileTable):
                BelongsToItem=-1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=0):\r
         (Value1, Value2, Value3, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2))\r
         return Table.Insert(\r
-                        self, \r
-                        Model, \r
-                        Value1, \r
-                        Value2, \r
-                        Value3, \r
-                        Scope1, \r
+                        self,\r
+                        Model,\r
+                        Value1,\r
+                        Value2,\r
+                        Value3,\r
+                        Scope1,\r
                         Scope2,\r
-                        BelongsToItem, \r
-                        StartLine, \r
-                        StartColumn, \r
-                        EndLine, \r
-                        EndColumn, \r
+                        BelongsToItem,\r
+                        StartLine,\r
+                        StartColumn,\r
+                        EndLine,\r
+                        EndColumn,\r
                         Enabled\r
                         )\r
 \r
     ## Query table\r
     #\r
-    # @param    Model:  The Model of Record \r
-    # @param    Arch:   The Arch attribute of Record \r
+    # @param    Model:  The Model of Record\r
+    # @param    Arch:   The Arch attribute of Record\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self, Model, Arch=None):\r
         ConditionString = "Model=%s AND Enabled>=0" % Model\r
@@ -236,7 +236,7 @@ class PackageTable(MetaFileTable):
         try:\r
             for row in self.Cur:\r
                 comment = row[0]\r
-                \r
+\r
                 LineNum = row[1]\r
                 comment = comment.strip("#")\r
                 comment = comment.strip()\r
@@ -310,32 +310,32 @@ class PlatformTable(MetaFileTable):
                FromItem=-1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=1):\r
         (Value1, Value2, Value3, Scope1, Scope2, Scope3) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2, Scope3))\r
         return Table.Insert(\r
-                        self, \r
-                        Model, \r
-                        Value1, \r
-                        Value2, \r
-                        Value3, \r
-                        Scope1, \r
+                        self,\r
+                        Model,\r
+                        Value1,\r
+                        Value2,\r
+                        Value3,\r
+                        Scope1,\r
                         Scope2,\r
                         Scope3,\r
-                        BelongsToItem, \r
+                        BelongsToItem,\r
                         FromItem,\r
-                        StartLine, \r
-                        StartColumn, \r
-                        EndLine, \r
-                        EndColumn, \r
+                        StartLine,\r
+                        StartColumn,\r
+                        EndLine,\r
+                        EndColumn,\r
                         Enabled\r
                         )\r
 \r
     ## Query table\r
     #\r
-    # @param Model:          The Model of Record \r
+    # @param Model:          The Model of Record\r
     # @param Scope1:         Arch of a Dsc item\r
     # @param Scope2:         Module type of a Dsc item\r
     # @param BelongsToItem:  The item belongs to which another item\r
     # @param FromItem:       The item belongs to which dsc file\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self, Model, Scope1=None, Scope2=None, BelongsToItem=None, FromItem=None):\r
         ConditionString = "Model=%s AND Enabled>0" % Model\r
index 9e055fcfc46bf8a038827a838c2cb84a5476b36c..a40ab8fc8c882c49aa0c32041870655f337ac834 100644 (file)
@@ -114,8 +114,8 @@ class WorkspaceDatabase(object):
 \r
             # get the parser ready for this file\r
             MetaFile = self._FILE_PARSER_[FileType](\r
-                                FilePath, \r
-                                FileType, \r
+                                FilePath,\r
+                                FileType,\r
                                 Arch,\r
                                 MetaFileStorage(self.WorkspaceDb.Cur, FilePath, FileType)\r
                                 )\r
@@ -162,7 +162,7 @@ class WorkspaceDatabase(object):
             # remove db file in case inconsistency between db and file in file system\r
             if self._CheckWhetherDbNeedRenew(RenewDb, DbPath):\r
                 os.remove(DbPath)\r
-        \r
+\r
         # create db with optimized parameters\r
         self.Conn = sqlite3.connect(DbPath, isolation_level='DEFERRED')\r
         self.Conn.execute("PRAGMA synchronous=OFF")\r
@@ -199,11 +199,11 @@ class WorkspaceDatabase(object):
     def _CheckWhetherDbNeedRenew (self, force, DbPath):\r
         # if database does not exist, we need do nothing\r
         if not os.path.exists(DbPath): return False\r
-            \r
+\r
         # if user force to renew database, then not check whether database is out of date\r
         if force: return True\r
-        \r
-        #    \r
+\r
+        #\r
         # Check the time of last modified source file or build.exe\r
         # if is newer than time of database, then database need to be re-created.\r
         #\r
@@ -217,15 +217,15 @@ class WorkspaceDatabase(object):
             if rootPath == "" or rootPath is None:\r
                 EdkLogger.verbose("\nFail to find the root path of build.exe or python sources, so can not \\r
 determine whether database file is out of date!\n")\r
-        \r
+\r
             # walk the root path of source or build's binary to get the time last modified.\r
-        \r
+\r
             for root, dirs, files in os.walk (rootPath):\r
                 for dir in dirs:\r
-                    # bypass source control folder \r
+                    # bypass source control folder\r
                     if dir.lower() in [".svn", "_svn", "cvs"]:\r
                         dirs.remove(dir)\r
-                        \r
+\r
                 for file in files:\r
                     ext = os.path.splitext(file)[1]\r
                     if ext.lower() == ".py":            # only check .py files\r
@@ -235,9 +235,9 @@ determine whether database file is out of date!\n")
         if timeOfToolModified > os.stat(DbPath).st_mtime:\r
             EdkLogger.verbose("\nWorkspace database is out of data!")\r
             return True\r
-            \r
+\r
         return False\r
-            \r
+\r
     ## Initialize build database\r
     def InitDatabase(self):\r
         EdkLogger.verbose("\nInitialize build database started ...")\r
index 897167cd11d62fe6ad4a8ee84e6962d3f351409c..1555ec3c211f60f29b3a35bf3ae5bd6aff25acff 100644 (file)
@@ -220,7 +220,7 @@ def FindIncludeFiles(Source, IncludePathList, IncludeFiles):
 \r
 ## Split each lines in file\r
 #\r
-#  This method is used to split the lines in file to make the length of each line \r
+#  This method is used to split the lines in file to make the length of each line\r
 #  less than MaxLength.\r
 #\r
 #  @param      Content           The content of file\r
@@ -245,12 +245,12 @@ def FileLinesSplit(Content=None, MaxLength=None):
             NewContentList.append(Line)\r
     for NewLine in NewContentList:\r
         NewContent += NewLine + TAB_LINE_BREAK\r
-    \r
+\r
     NewContent = NewContent.replace(TAB_LINE_BREAK, gEndOfLine).replace('\r\r\n', gEndOfLine)\r
     return NewContent\r
-    \r
-    \r
-    \r
+\r
+\r
+\r
 ##\r
 # Parse binary dependency expression section\r
 #\r
@@ -280,10 +280,10 @@ class DepexParser(object):
                 for Guid in Package.Guids:\r
                     GuidValue = GuidStructureStringToGuidString(Package.Guids[Guid])\r
                     self._GuidDb[GuidValue.upper()] = Guid\r
-    \r
+\r
     ##\r
     # Parse the binary dependency expression files.\r
-    # \r
+    #\r
     # This function parses the binary dependency expression file and translate it\r
     # to the instruction list.\r
     #\r
@@ -305,7 +305,7 @@ class DepexParser(object):
             OpCode = DepexFile.read(1)\r
 \r
         return DepexStatement\r
-    \r
+\r
 ##\r
 # Reports library information\r
 #\r
@@ -411,7 +411,7 @@ class DepexReport(object):
 \r
         if ModuleType in [SUP_MODULE_SEC, SUP_MODULE_PEI_CORE, SUP_MODULE_DXE_CORE, SUP_MODULE_SMM_CORE, SUP_MODULE_MM_CORE_STANDALONE, SUP_MODULE_UEFI_APPLICATION]:\r
             return\r
-      \r
+\r
         for Source in M.SourceFileList:\r
             if os.path.splitext(Source.Path)[1].lower() == ".dxs":\r
                 Match = gDxsDependencyPattern.search(open(Source.Path).read())\r
@@ -457,7 +457,7 @@ class DepexReport(object):
                 FileWrite(File, gSubSectionSep)\r
             except:\r
                 EdkLogger.warn(None, "Dependency expression file is corrupted", self._DepexFileName)\r
-        \r
+\r
         FileWrite(File, "Dependency Expression (DEPEX) from %s" % self.Source)\r
 \r
         if self.Source == "INF":\r
@@ -1548,7 +1548,7 @@ class PredictionReport(object):
             EotEndTime = time.time()\r
             EotDuration = time.strftime("%H:%M:%S", time.gmtime(int(round(EotEndTime - EotStartTime))))\r
             EdkLogger.quiet("EOT run time: %s\n" % EotDuration)\r
-            \r
+\r
             #\r
             # Parse the output of EOT tool\r
             #\r
@@ -1746,7 +1746,7 @@ class FdRegionReport(object):
         PlatformPcds = {}\r
         #\r
         # Collect PCDs declared in DEC files.\r
-        #        \r
+        #\r
         for Pa in Wa.AutoGenObjectList:\r
             for Package in Pa.PackageList:\r
                 for (TokenCName, TokenSpaceGuidCName, DecType) in Package.Pcds:\r
@@ -2026,7 +2026,7 @@ class PlatformReport(object):
         self.DepexParser = None\r
         if "DEPEX" in ReportType:\r
             self.DepexParser = DepexParser(Wa)\r
-            \r
+\r
         self.ModuleReportList = []\r
         if MaList is not None:\r
             self._IsModuleBuild = True\r
@@ -2101,7 +2101,7 @@ class PlatformReport(object):
         if not self._IsModuleBuild:\r
             if "PCD" in ReportType:\r
                 self.PcdReport.GenerateReport(File, None)\r
-    \r
+\r
             if "FLASH" in ReportType:\r
                 for FdReportListItem in self.FdReportList:\r
                     FdReportListItem.GenerateReport(File)\r
@@ -2135,7 +2135,7 @@ class BuildReport(object):
         if ReportFile:\r
             self.ReportList = []\r
             self.ReportType = []\r
-            if ReportType: \r
+            if ReportType:\r
                 for ReportTypeItem in ReportType:\r
                     if ReportTypeItem not in self.ReportType:\r
                         self.ReportType.append(ReportTypeItem)\r
@@ -2181,7 +2181,7 @@ class BuildReport(object):
                 EdkLogger.error("BuildReport", CODE_ERROR, "Unknown fatal error when generating build report", ExtraData=self.ReportFile, RaiseError=False)\r
                 EdkLogger.quiet("(Python %s on %s\n%s)" % (platform.python_version(), sys.platform, traceback.format_exc()))\r
             File.close()\r
-            \r
+\r
 # This acts like the main() function for the script, unless it is 'import'ed into another script.\r
 if __name__ == '__main__':\r
     pass\r
index 08e81016de8b363fcddb67db8f011ce43a5e11de..6ad0e389687ce5c501b6eaebfe5d3685ab355350 100644 (file)
@@ -59,7 +59,7 @@ from collections import OrderedDict, defaultdict
 # Version and Copyright\r
 VersionNumber = "0.60" + ' ' + gBUILD_VERSION\r
 __version__ = "%prog Version " + VersionNumber\r
-__copyright__ = "Copyright (c) 2007 - 2017, Intel Corporation  All rights reserved."\r
+__copyright__ = "Copyright (c) 2007 - 2018, Intel Corporation  All rights reserved."\r
 \r
 ## standard targets of build command\r
 gSupportedTarget = ['all', 'genc', 'genmake', 'modules', 'libraries', 'fds', 'clean', 'cleanall', 'cleanlib', 'run']\r
@@ -111,7 +111,7 @@ def CheckEnvVariable():
         EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in WORKSPACE path",\r
                         ExtraData=WorkspaceDir)\r
     os.environ["WORKSPACE"] = WorkspaceDir\r
-    \r
+\r
     # set multiple workspace\r
     PackagesPath = os.getenv("PACKAGES_PATH")\r
     mws.setWs(WorkspaceDir, PackagesPath)\r
@@ -201,7 +201,7 @@ def CheckEnvVariable():
     GlobalData.gGlobalDefines["EDK_SOURCE"] = EdkSourceDir\r
     GlobalData.gGlobalDefines["ECP_SOURCE"] = EcpSourceDir\r
     GlobalData.gGlobalDefines["EDK_TOOLS_PATH"] = os.environ["EDK_TOOLS_PATH"]\r
-    \r
+\r
 ## Get normalized file path\r
 #\r
 # Convert the path to be local format, and remove the WORKSPACE path at the\r
@@ -266,7 +266,7 @@ def LaunchCommand(Command, WorkingDir):
     # if working directory doesn't exist, Popen() will raise an exception\r
     if not os.path.isdir(WorkingDir):\r
         EdkLogger.error("build", FILE_NOT_FOUND, ExtraData=WorkingDir)\r
-    \r
+\r
     # Command is used as the first Argument in following Popen().\r
     # It could be a string or sequence. We find that if command is a string in following Popen(),\r
     # ubuntu may fail with an error message that the command is not found.\r
@@ -849,14 +849,14 @@ class Build():
         # print current build environment and configuration\r
         EdkLogger.quiet("%-16s = %s" % ("WORKSPACE", os.environ["WORKSPACE"]))\r
         if "PACKAGES_PATH" in os.environ:\r
-            # WORKSPACE env has been converted before. Print the same path style with WORKSPACE env. \r
+            # WORKSPACE env has been converted before. Print the same path style with WORKSPACE env.\r
             EdkLogger.quiet("%-16s = %s" % ("PACKAGES_PATH", os.path.normcase(os.path.normpath(os.environ["PACKAGES_PATH"]))))\r
         EdkLogger.quiet("%-16s = %s" % ("ECP_SOURCE", os.environ["ECP_SOURCE"]))\r
         EdkLogger.quiet("%-16s = %s" % ("EDK_SOURCE", os.environ["EDK_SOURCE"]))\r
         EdkLogger.quiet("%-16s = %s" % ("EFI_SOURCE", os.environ["EFI_SOURCE"]))\r
         EdkLogger.quiet("%-16s = %s" % ("EDK_TOOLS_PATH", os.environ["EDK_TOOLS_PATH"]))\r
         if "EDK_TOOLS_BIN" in os.environ:\r
-            # Print the same path style with WORKSPACE env. \r
+            # Print the same path style with WORKSPACE env.\r
             EdkLogger.quiet("%-16s = %s" % ("EDK_TOOLS_BIN", os.path.normcase(os.path.normpath(os.environ["EDK_TOOLS_BIN"]))))\r
         EdkLogger.quiet("%-16s = %s" % ("CONF_PATH", GlobalData.gConfDirectory))\r
         self.InitPreBuild()\r
@@ -1962,7 +1962,7 @@ class Build():
                     self._SaveMapFile (MapBuffer, Wa)\r
 \r
     def _GenFfsCmd(self):\r
-        # convert dictionary of Cmd:(Inf,Arch) \r
+        # convert dictionary of Cmd:(Inf,Arch)\r
         # to a new dictionary of (Inf,Arch):Cmd,Cmd,Cmd...\r
         CmdSetDict = defaultdict(set)\r
         GenFfsDict = GenFds.GenFfsMakefile('', GlobalData.gFdfParser, self, self.ArchList, GlobalData)\r
@@ -2034,7 +2034,7 @@ class Build():
                     for Module in ModuleList:\r
                         # Get ModuleAutoGen object to generate C code file and makefile\r
                         Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile)\r
-                        \r
+\r
                         if Ma is None:\r
                             continue\r
                         if Ma.CanSkipbyHash():\r
index 4ea84c51296946422766167ca6217a4070747eea..3afa90700e300e032903883f82f7c9d852b1e530 100644 (file)
@@ -16,6 +16,6 @@ import locale
 if sys.platform == "darwin":\r
   DefaultLocal = locale.getdefaultlocale()[1]\r
   if DefaultLocal is None:\r
-    DefaultLocal = 'UTF8'  \r
+    DefaultLocal = 'UTF8'\r
   sys.setdefaultencoding(DefaultLocal)\r
 \r
index a55b29de4713ff4365c5d7a17ea0146c069f54bb..cc17ee0d258227c6ca954e92b352aab7274c0365 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 #  Unit tests for checking syntax of Python source code\r
 #\r
-#  Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -55,7 +55,7 @@ def MakePythonSyntaxCheckTests():
         newmethod = lambda self: self.SingleFileTest(filename)\r
         setattr(\r
             Tests,\r
-            test, \r
+            test,\r
             newmethod\r
             )\r
 \r
index d3a42ff426523065e069c0930653c81adfebfe4a..e16e993048e469ea58481e40955375deb40ba298 100644 (file)
@@ -2,7 +2,7 @@ from __future__ import print_function
 ## @file\r
 # Utility functions and classes for BaseTools unit tests\r
 #\r
-#  Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -78,7 +78,7 @@ class BaseToolsTest(unittest.TestCase):
     def HandleTreeDeleteError(self, function, path, excinfo):\r
         os.chmod(path, stat.S_IWRITE)\r
         function(path)\r
-    \r
+\r
     def RemoveDir(self, dir):\r
         shutil.rmtree(dir, False, self.HandleTreeDeleteError)\r
 \r
index e940cdb73fcaad8df210e21b7fa81f2a68fec31e..05fdb0932bf5c4150f160255e4d7fc9ab63140af 100755 (executable)
-#!/usr/bin/env python
-
-## @file
-#
-# Automation of instructions from:
-#   http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/trunk/mingw-w64-doc/
-#     howto-build/mingw-w64-howto-build.txt?revision=216&view=markup
-#
-# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution.    The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-
+#!/usr/bin/env python\r
+\r
+## @file\r
+#\r
+# Automation of instructions from:\r
+#   http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/trunk/mingw-w64-doc/\r
+#     howto-build/mingw-w64-howto-build.txt?revision=216&view=markup\r
+#\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution.    The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+\r
+\r
 from __future__ import print_function\r
-from optparse import OptionParser
-import os
-import shutil
-import subprocess
-import sys
-import tarfile
-import urllib
-import urlparse
-try:
-    from hashlib import md5
-except Exception:
-    from md5 import md5
-
-if sys.version_info < (2, 5):
-    #
-    # This script (and edk2 BaseTools) require Python 2.5 or newer
-    #
+from optparse import OptionParser\r
+import os\r
+import shutil\r
+import subprocess\r
+import sys\r
+import tarfile\r
+import urllib\r
+import urlparse\r
+try:\r
+    from hashlib import md5\r
+except Exception:\r
+    from md5 import md5\r
+\r
+if sys.version_info < (2, 5):\r
+    #\r
+    # This script (and edk2 BaseTools) require Python 2.5 or newer\r
+    #\r
     print('Python version 2.5 or later is required.')\r
-    sys.exit(-1)
-
-#
-# Version and Copyright
-#
-VersionNumber = "0.01"
-__version__ = "%prog Version " + VersionNumber
-__copyright__ = "Copyright (c) 2008 - 2010, Intel Corporation.  All rights reserved."
-
-class Config:
-    """class Config
-
-    Stores the configuration options for the rest of the script.
-
-    Handles the command line options, and allows the code within
-    the script to easily interact with the 'config' requested by
-    the user.
-    """
-
-    def __init__(self):
-        self.base_dir = os.getcwd()
-        (self.options, self.args) = self.CheckOptions()
-        self.__init_dirs__()
-
-    def CheckOptions(self):
-        Parser = \
-            OptionParser(
-                description=__copyright__,
-                version=__version__,
-                prog="mingw-gcc-build",
-                usage="%prog [options] [target]"
-                )
-        Parser.add_option(
-            "--arch",
-            action = "store", type = "string",
-            default = '',
-            dest = "arch",
-            help = "Processor architecture to build gcc for."
-            )
-        Parser.add_option(
-            "--src-dir",
-            action = "store", type = "string", dest = "src_dir",
-            default = os.path.join(self.base_dir, 'src'),
-            help = "Directory to download/extract binutils/gcc sources"
-            )
-        Parser.add_option(
-            "--build-dir",
-            action = "store", type = "string", dest = "build_dir",
-            default = os.path.join(self.base_dir, 'build'),
-            help = "Directory to download/extract binutils/gcc sources"
-            )
-        Parser.add_option(
-            "--prefix",
-            action = "store", type = "string", dest = "prefix",
-            default = os.path.join(self.base_dir, 'install'),
-            help = "Prefix to install binutils/gcc into"
-            )
-        Parser.add_option(
-            "--skip-binutils",
-            action = "store_true", dest = "skip_binutils",
-            default = False,
-            help = "Will skip building binutils"
-            )
-        Parser.add_option(
-            "--skip-gcc",
-            action = "store_true", dest = "skip_gcc",
-            default = False,
-            help = "Will skip building GCC"
-            )
-        Parser.add_option(
-            "--symlinks",
-            action = "store", type = "string", dest = "symlinks",
-            default = os.path.join(self.base_dir, 'symlinks'),
-            help = "Directory to create binutils/gcc symbolic links into."
-            )
-        Parser.add_option(
-            "-v", "--verbose",
-            action="store_true",
-            type=None, help="Print verbose messages"
-            )
-
-        (Opt, Args) = Parser.parse_args()
-
-        self.arch = Opt.arch.lower()
-        allowedArchs = ('ia32', 'x64', 'ipf')
-        if self.arch not in allowedArchs:
-            Parser.error(
-                'Please use --arch to specify one of: %s' %
-                    ', '.join(allowedArchs)
-                )
-        self.target_arch = {'ia32': 'i686', 'x64': 'x86_64', 'ipf': 'ia64'}[self.arch]
-        self.target_sys = {'ia32': 'pc', 'x64': 'pc', 'ipf': 'pc'}[self.arch]
-        self.target_bin = {'ia32': 'mingw32', 'x64': 'mingw32', 'ipf': 'elf'}[self.arch]
-        self.target_combo = '-'.join((self.target_arch, self.target_sys, self.target_bin))
-
-        return (Opt, Args)
-
-    def __init_dirs__(self):
-        self.src_dir = os.path.realpath(os.path.expanduser(self.options.src_dir))
-        self.build_dir = os.path.realpath(os.path.expanduser(self.options.build_dir))
-        self.prefix = os.path.realpath(os.path.expanduser(self.options.prefix))
-        self.symlinks = os.path.realpath(os.path.expanduser(self.options.symlinks))
-
-    def IsConfigOk(self):
-
-        building = []
-        if not self.options.skip_binutils:
-            building.append('binutils')
-        if not self.options.skip_gcc:
-            building.append('gcc')
-        if len(building) == 0:
+    sys.exit(-1)\r
+\r
+#\r
+# Version and Copyright\r
+#\r
+VersionNumber = "0.01"\r
+__version__ = "%prog Version " + VersionNumber\r
+__copyright__ = "Copyright (c) 2008 - 2018, Intel Corporation.  All rights reserved."\r
+\r
+class Config:\r
+    """class Config\r
+\r
+    Stores the configuration options for the rest of the script.\r
+\r
+    Handles the command line options, and allows the code within\r
+    the script to easily interact with the 'config' requested by\r
+    the user.\r
+    """\r
+\r
+    def __init__(self):\r
+        self.base_dir = os.getcwd()\r
+        (self.options, self.args) = self.CheckOptions()\r
+        self.__init_dirs__()\r
+\r
+    def CheckOptions(self):\r
+        Parser = \\r
+            OptionParser(\r
+                description=__copyright__,\r
+                version=__version__,\r
+                prog="mingw-gcc-build",\r
+                usage="%prog [options] [target]"\r
+                )\r
+        Parser.add_option(\r
+            "--arch",\r
+            action = "store", type = "string",\r
+            default = '',\r
+            dest = "arch",\r
+            help = "Processor architecture to build gcc for."\r
+            )\r
+        Parser.add_option(\r
+            "--src-dir",\r
+            action = "store", type = "string", dest = "src_dir",\r
+            default = os.path.join(self.base_dir, 'src'),\r
+            help = "Directory to download/extract binutils/gcc sources"\r
+            )\r
+        Parser.add_option(\r
+            "--build-dir",\r
+            action = "store", type = "string", dest = "build_dir",\r
+            default = os.path.join(self.base_dir, 'build'),\r
+            help = "Directory to download/extract binutils/gcc sources"\r
+            )\r
+        Parser.add_option(\r
+            "--prefix",\r
+            action = "store", type = "string", dest = "prefix",\r
+            default = os.path.join(self.base_dir, 'install'),\r
+            help = "Prefix to install binutils/gcc into"\r
+            )\r
+        Parser.add_option(\r
+            "--skip-binutils",\r
+            action = "store_true", dest = "skip_binutils",\r
+            default = False,\r
+            help = "Will skip building binutils"\r
+            )\r
+        Parser.add_option(\r
+            "--skip-gcc",\r
+            action = "store_true", dest = "skip_gcc",\r
+            default = False,\r
+            help = "Will skip building GCC"\r
+            )\r
+        Parser.add_option(\r
+            "--symlinks",\r
+            action = "store", type = "string", dest = "symlinks",\r
+            default = os.path.join(self.base_dir, 'symlinks'),\r
+            help = "Directory to create binutils/gcc symbolic links into."\r
+            )\r
+        Parser.add_option(\r
+            "-v", "--verbose",\r
+            action="store_true",\r
+            type=None, help="Print verbose messages"\r
+            )\r
+\r
+        (Opt, Args) = Parser.parse_args()\r
+\r
+        self.arch = Opt.arch.lower()\r
+        allowedArchs = ('ia32', 'x64', 'ipf')\r
+        if self.arch not in allowedArchs:\r
+            Parser.error(\r
+                'Please use --arch to specify one of: %s' %\r
+                    ', '.join(allowedArchs)\r
+                )\r
+        self.target_arch = {'ia32': 'i686', 'x64': 'x86_64', 'ipf': 'ia64'}[self.arch]\r
+        self.target_sys = {'ia32': 'pc', 'x64': 'pc', 'ipf': 'pc'}[self.arch]\r
+        self.target_bin = {'ia32': 'mingw32', 'x64': 'mingw32', 'ipf': 'elf'}[self.arch]\r
+        self.target_combo = '-'.join((self.target_arch, self.target_sys, self.target_bin))\r
+\r
+        return (Opt, Args)\r
+\r
+    def __init_dirs__(self):\r
+        self.src_dir = os.path.realpath(os.path.expanduser(self.options.src_dir))\r
+        self.build_dir = os.path.realpath(os.path.expanduser(self.options.build_dir))\r
+        self.prefix = os.path.realpath(os.path.expanduser(self.options.prefix))\r
+        self.symlinks = os.path.realpath(os.path.expanduser(self.options.symlinks))\r
+\r
+    def IsConfigOk(self):\r
+\r
+        building = []\r
+        if not self.options.skip_binutils:\r
+            building.append('binutils')\r
+        if not self.options.skip_gcc:\r
+            building.append('gcc')\r
+        if len(building) == 0:\r
             print("Nothing will be built!")\r
             print()\r
             print("Please try using --help and then change the configuration.")\r
-            return False
-
+            return False\r
+\r
         print("Current directory:")\r
         print("   ", self.base_dir)\r
         print("Sources download/extraction:", self.Relative(self.src_dir))\r
@@ -160,170 +160,170 @@ class Config:
         print("Create symlinks directory  :", self.Relative(self.symlinks))\r
         print("Building                   :", ', '.join(building))\r
         print()\r
-        answer = raw_input("Is this configuration ok? (default = no): ")
-        if (answer.lower() not in ('y', 'yes')):
+        answer = raw_input("Is this configuration ok? (default = no): ")\r
+        if (answer.lower() not in ('y', 'yes')):\r
             print()\r
             print("Please try using --help and then change the configuration.")\r
-            return False
-
-        if self.arch.lower() == 'ipf':
+            return False\r
+\r
+        if self.arch.lower() == 'ipf':\r
             print()\r
             print('Please note that the IPF compiler built by this script has')\r
             print('not yet been validated!')\r
             print()\r
-            answer = raw_input("Are you sure you want to build it? (default = no): ")
-            if (answer.lower() not in ('y', 'yes')):
+            answer = raw_input("Are you sure you want to build it? (default = no): ")\r
+            if (answer.lower() not in ('y', 'yes')):\r
                 print()\r
                 print("Please try using --help and then change the configuration.")\r
-                return False
-
+                return False\r
+\r
         print()\r
-        return True
-
-    def Relative(self, path):
-        if path.startswith(self.base_dir):
-            return '.' + path[len(self.base_dir):]
-        return path
-
-    def MakeDirs(self):
+        return True\r
+\r
+    def Relative(self, path):\r
+        if path.startswith(self.base_dir):\r
+            return '.' + path[len(self.base_dir):]\r
+        return path\r
+\r
+    def MakeDirs(self):\r
         for path in (self.src_dir, self.build_dir, self.prefix, self.symlinks):\r
-            if not os.path.exists(path):
-                os.makedirs(path)
-
-class SourceFiles:
-    """class SourceFiles
-
-    Handles the downloading of source files used by the script.
-    """
-
-    def __init__(self, config):
-        self.config = config
-        self.source_files = self.source_files[config.arch]
-
-        if config.options.skip_binutils:
-            del self.source_files['binutils']
-
-        if config.options.skip_gcc:
-            del self.source_files['gcc']
-            del self.source_files['mingw_hdr']
-
-    source_files_common = {
-        'binutils': {
-            'url': 'http://www.kernel.org/pub/linux/devel/binutils/' + \
-                   'binutils-$version.tar.bz2',
-            'version': '2.20.51.0.5',
-            'md5': '6d2de7cdf7a8389e70b124e3d73b4d37',
-            },
-        }
-
-    source_files_x64 = {
-        'gcc': {
-            'url': 'http://ftpmirror.gnu.org/gcc/' + \
-                   'gcc-$version/gcc-$version.tar.bz2',
-            'version': '4.3.0',
-            'md5': '197ed8468b38db1d3481c3111691d85b',
-            },
-        }
-
-    source_files_ia32 = {
-        'gcc': source_files_x64['gcc'],
-        }
-
-    source_files_ipf = source_files_x64.copy()
-    source_files_ipf['gcc']['configure-params'] = (
-        '--with-gnu-as', '--with-gnu-ld', '--with-newlib',
-        '--verbose', '--disable-libssp', '--disable-nls',
-        '--enable-languages=c,c++'
-        )
-
-    source_files = {
-        'ia32': [source_files_common, source_files_ia32],
-        'x64': [source_files_common, source_files_x64],
-        'ipf': [source_files_common, source_files_ipf],
-        }
-
-    for arch in source_files:
-        mergedSourceFiles = {}
-        for source_files_dict in source_files[arch]:
-            mergedSourceFiles.update(source_files_dict)
-        for downloadItem in mergedSourceFiles:
-            fdata = mergedSourceFiles[downloadItem]
-            fdata['filename'] = fdata['url'].split('/')[-1]
-            if 'extract-dir' not in fdata:
-                for ext in ('.tar.gz', '.tar.bz2', '.zip'):
-                    if fdata['filename'].endswith(ext):
-                        fdata['extract-dir'] = fdata['filename'][:-len(ext)]
-                        break
-            replaceables = ('extract-dir', 'filename', 'url')
-            for replaceItem in fdata:
-                if replaceItem in replaceables: continue
+            if not os.path.exists(path):\r
+                os.makedirs(path)\r
+\r
+class SourceFiles:\r
+    """class SourceFiles\r
+\r
+    Handles the downloading of source files used by the script.\r
+    """\r
+\r
+    def __init__(self, config):\r
+        self.config = config\r
+        self.source_files = self.source_files[config.arch]\r
+\r
+        if config.options.skip_binutils:\r
+            del self.source_files['binutils']\r
+\r
+        if config.options.skip_gcc:\r
+            del self.source_files['gcc']\r
+            del self.source_files['mingw_hdr']\r
+\r
+    source_files_common = {\r
+        'binutils': {\r
+            'url': 'http://www.kernel.org/pub/linux/devel/binutils/' + \\r
+                   'binutils-$version.tar.bz2',\r
+            'version': '2.20.51.0.5',\r
+            'md5': '6d2de7cdf7a8389e70b124e3d73b4d37',\r
+            },\r
+        }\r
+\r
+    source_files_x64 = {\r
+        'gcc': {\r
+            'url': 'http://ftpmirror.gnu.org/gcc/' + \\r
+                   'gcc-$version/gcc-$version.tar.bz2',\r
+            'version': '4.3.0',\r
+            'md5': '197ed8468b38db1d3481c3111691d85b',\r
+            },\r
+        }\r
+\r
+    source_files_ia32 = {\r
+        'gcc': source_files_x64['gcc'],\r
+        }\r
+\r
+    source_files_ipf = source_files_x64.copy()\r
+    source_files_ipf['gcc']['configure-params'] = (\r
+        '--with-gnu-as', '--with-gnu-ld', '--with-newlib',\r
+        '--verbose', '--disable-libssp', '--disable-nls',\r
+        '--enable-languages=c,c++'\r
+        )\r
+\r
+    source_files = {\r
+        'ia32': [source_files_common, source_files_ia32],\r
+        'x64': [source_files_common, source_files_x64],\r
+        'ipf': [source_files_common, source_files_ipf],\r
+        }\r
+\r
+    for arch in source_files:\r
+        mergedSourceFiles = {}\r
+        for source_files_dict in source_files[arch]:\r
+            mergedSourceFiles.update(source_files_dict)\r
+        for downloadItem in mergedSourceFiles:\r
+            fdata = mergedSourceFiles[downloadItem]\r
+            fdata['filename'] = fdata['url'].split('/')[-1]\r
+            if 'extract-dir' not in fdata:\r
+                for ext in ('.tar.gz', '.tar.bz2', '.zip'):\r
+                    if fdata['filename'].endswith(ext):\r
+                        fdata['extract-dir'] = fdata['filename'][:-len(ext)]\r
+                        break\r
+            replaceables = ('extract-dir', 'filename', 'url')\r
+            for replaceItem in fdata:\r
+                if replaceItem in replaceables: continue\r
                 if not isinstance(fdata[replaceItem], str): continue\r
-                for replaceable in replaceables:
+                for replaceable in replaceables:\r
                     if not isinstance(fdata[replaceable], str): continue\r
-                    if replaceable in fdata:
-                        fdata[replaceable] = \
-                            fdata[replaceable].replace(
-                                '$' + replaceItem,
-                                fdata[replaceItem]
-                                )
-        source_files[arch] = mergedSourceFiles
-    #print 'source_files:', source_files
-
-    def GetAll(self):
-
-        def progress(received, blockSize, fileSize):
-            if fileSize < 0: return
-            wDots = (100 * received * blockSize) / fileSize / 10
-            if wDots > self.dots:
-                for i in range(wDots - self.dots):
+                    if replaceable in fdata:\r
+                        fdata[replaceable] = \\r
+                            fdata[replaceable].replace(\r
+                                '$' + replaceItem,\r
+                                fdata[replaceItem]\r
+                                )\r
+        source_files[arch] = mergedSourceFiles\r
+    #print 'source_files:', source_files\r
+\r
+    def GetAll(self):\r
+\r
+        def progress(received, blockSize, fileSize):\r
+            if fileSize < 0: return\r
+            wDots = (100 * received * blockSize) / fileSize / 10\r
+            if wDots > self.dots:\r
+                for i in range(wDots - self.dots):\r
                     print('.', end=' ')\r
-                    sys.stdout.flush()
-                    self.dots += 1
-
-        maxRetries = 1
-        for (fname, fdata) in self.source_files.items():
-            for retries in range(maxRetries):
-                try:
-                    self.dots = 0
-                    local_file = os.path.join(self.config.src_dir, fdata['filename'])
-                    url = fdata['url']
+                    sys.stdout.flush()\r
+                    self.dots += 1\r
+\r
+        maxRetries = 1\r
+        for (fname, fdata) in self.source_files.items():\r
+            for retries in range(maxRetries):\r
+                try:\r
+                    self.dots = 0\r
+                    local_file = os.path.join(self.config.src_dir, fdata['filename'])\r
+                    url = fdata['url']\r
                     print('Downloading %s:' % fname, url)\r
-                    if retries > 0:
+                    if retries > 0:\r
                         print('(retry)', end=' ')\r
-                    sys.stdout.flush()
-
-                    completed = False
-                    if os.path.exists(local_file):
-                        md5_pass = self.checkHash(fdata)
-                        if md5_pass:
+                    sys.stdout.flush()\r
+\r
+                    completed = False\r
+                    if os.path.exists(local_file):\r
+                        md5_pass = self.checkHash(fdata)\r
+                        if md5_pass:\r
                             print('[md5 match]', end=' ')\r
-                        else:
+                        else:\r
                             print('[md5 mismatch]', end=' ')\r
-                        sys.stdout.flush()
-                        completed = md5_pass
-
-                    if not completed:
-                        urllib.urlretrieve(url, local_file, progress)
-
-                    #
-                    # BUGBUG: Suggest proxy to user if download fails.
-                    #
-                    # export http_proxy=http://proxyservername.mycompany.com:911
-                    # export ftp_proxy=http://proxyservername.mycompany.com:911
-
-                    if not completed and os.path.exists(local_file):
-                        md5_pass = self.checkHash(fdata)
-                        if md5_pass:
+                        sys.stdout.flush()\r
+                        completed = md5_pass\r
+\r
+                    if not completed:\r
+                        urllib.urlretrieve(url, local_file, progress)\r
+\r
+                    #\r
+                    # BUGBUG: Suggest proxy to user if download fails.\r
+                    #\r
+                    # export http_proxy=http://proxyservername.mycompany.com:911\r
+                    # export ftp_proxy=http://proxyservername.mycompany.com:911\r
+\r
+                    if not completed and os.path.exists(local_file):\r
+                        md5_pass = self.checkHash(fdata)\r
+                        if md5_pass:\r
                             print('[md5 match]', end=' ')\r
-                        else:
+                        else:\r
                             print('[md5 mismatch]', end=' ')\r
-                        sys.stdout.flush()
-                        completed = md5_pass
-
-                    if completed:
+                        sys.stdout.flush()\r
+                        completed = md5_pass\r
+\r
+                    if completed:\r
                         print('[done]')\r
-                        break
-                    else:
+                        break\r
+                    else:\r
                         print('[failed]')\r
                         print('  Tried to retrieve', url)\r
                         print('  to', local_file)\r
@@ -332,234 +332,234 @@ class SourceFiles:
                         print('http_proxy environment variable')\r
                         print('* You can try to download this file separately', end=' ')\r
                         print('and rerun this script')\r
-                        raise Exception()
-                
-                except KeyboardInterrupt:
+                        raise Exception()\r
+\r
+                except KeyboardInterrupt:\r
                     print('[KeyboardInterrupt]')\r
-                    return False
-
+                    return False\r
+\r
                 except Exception as e:\r
                     print(e)\r
-
-            if not completed: return False
-
-        return True
-
-    def checkHash(self, fdata):
-        local_file = os.path.join(self.config.src_dir, fdata['filename'])
-        expect_md5 = fdata['md5']
-        data = open(local_file).read()
-        md5sum = md5()
-        md5sum.update(data)
-        return md5sum.hexdigest().lower() == expect_md5.lower()
-
-    def GetModules(self):
-        return self.source_files.keys()
-
-    def GetFilenameOf(self, module):
-        return self.source_files[module]['filename']
-
-    def GetMd5Of(self, module):
-        return self.source_files[module]['md5']
-
-    def GetExtractDirOf(self, module):
-        return self.source_files[module]['extract-dir']
-
-    def GetAdditionalParameters(self, module, step):
-        key = step + '-params'
-        if key in self.source_files[module]:
-            return self.source_files[module][key]
-        else:
-            return tuple()
-
-class Extracter:
-    """class Extracter
-
-    Handles the extraction of the source files from their downloaded
-    archive files.
-    """
-
-    def __init__(self, source_files, config):
-        self.source_files = source_files
-        self.config = config
-
-    def Extract(self, module):
-        src = self.config.src_dir
-        extractDst = os.path.join(src, self.config.arch)
-        local_file = os.path.join(src, self.source_files.GetFilenameOf(module))
-        moduleMd5 = self.source_files.GetMd5Of(module)
-        extracted = os.path.join(extractDst, os.path.split(local_file)[1] + '.extracted')
-        if not os.path.exists(extractDst):
-            os.mkdir(extractDst)
-
-        extractedMd5 = None
-        if os.path.exists(extracted):
-            extractedMd5 = open(extracted).read()
-
-        if extractedMd5 != moduleMd5:
+\r
+            if not completed: return False\r
+\r
+        return True\r
+\r
+    def checkHash(self, fdata):\r
+        local_file = os.path.join(self.config.src_dir, fdata['filename'])\r
+        expect_md5 = fdata['md5']\r
+        data = open(local_file).read()\r
+        md5sum = md5()\r
+        md5sum.update(data)\r
+        return md5sum.hexdigest().lower() == expect_md5.lower()\r
+\r
+    def GetModules(self):\r
+        return self.source_files.keys()\r
+\r
+    def GetFilenameOf(self, module):\r
+        return self.source_files[module]['filename']\r
+\r
+    def GetMd5Of(self, module):\r
+        return self.source_files[module]['md5']\r
+\r
+    def GetExtractDirOf(self, module):\r
+        return self.source_files[module]['extract-dir']\r
+\r
+    def GetAdditionalParameters(self, module, step):\r
+        key = step + '-params'\r
+        if key in self.source_files[module]:\r
+            return self.source_files[module][key]\r
+        else:\r
+            return tuple()\r
+\r
+class Extracter:\r
+    """class Extracter\r
+\r
+    Handles the extraction of the source files from their downloaded\r
+    archive files.\r
+    """\r
+\r
+    def __init__(self, source_files, config):\r
+        self.source_files = source_files\r
+        self.config = config\r
+\r
+    def Extract(self, module):\r
+        src = self.config.src_dir\r
+        extractDst = os.path.join(src, self.config.arch)\r
+        local_file = os.path.join(src, self.source_files.GetFilenameOf(module))\r
+        moduleMd5 = self.source_files.GetMd5Of(module)\r
+        extracted = os.path.join(extractDst, os.path.split(local_file)[1] + '.extracted')\r
+        if not os.path.exists(extractDst):\r
+            os.mkdir(extractDst)\r
+\r
+        extractedMd5 = None\r
+        if os.path.exists(extracted):\r
+            extractedMd5 = open(extracted).read()\r
+\r
+        if extractedMd5 != moduleMd5:\r
             print('Extracting %s:' % self.config.Relative(local_file))\r
-            tar = tarfile.open(local_file)
-            tar.extractall(extractDst)
-            open(extracted, 'w').write(moduleMd5)
-        else:
-            pass
-            #print 'Previously extracted', self.config.Relative(local_file)
-
-    def ExtractAll(self):
-        for module in self.source_files.GetModules():
-            self.Extract(module)
-
-class Builder:
-    """class Builder
-
-    Builds and installs the GCC tool suite.
-    """
-
-    def __init__(self, source_files, config):
-        self.source_files = source_files
-        self.config = config
-
-    def Build(self):
-        if not self.config.options.skip_binutils:
-            self.BuildModule('binutils')
-        if not self.config.options.skip_gcc:
-            self.BuildModule('gcc')
-            self.MakeSymLinks()
-
-    def IsBuildStepComplete(self, step):
-        return \
-            os.path.exists(
-                os.path.join(
-                    self.config.build_dir, self.config.arch, step + '.completed'
-                    )
-                )
-
-    def MarkBuildStepComplete(self, step):
-        open(
-            os.path.join(
-                self.config.build_dir, self.config.arch, step + '.completed'
-                ),
-            "w"
-            ).close()
-
-
-    def BuildModule(self, module):
-        base_dir = os.getcwd()
-        build_dir = os.path.join(self.config.build_dir, self.config.arch, module)
-        module_dir = self.source_files.GetExtractDirOf(module)
-        module_dir = os.path.realpath(os.path.join('src', self.config.arch, module_dir))
-        configure = os.path.join(module_dir, 'configure')
-        prefix = self.config.prefix
-        if not os.path.exists(build_dir):
-            os.makedirs(build_dir)
-        os.chdir(build_dir)
-
-        cmd = (
-            configure,
-            '--target=%s' % self.config.target_combo,
-            '--prefix=' + prefix,
-            '--with-sysroot=' + prefix,
-            '--disable-werror',
-            )
-        if os.path.exists('/opt/local/include/gmp.h'):
-            cmd += ('--with-gmp=/opt/local',)
-        if module == 'gcc': cmd += ('--oldincludedir=/opt/local/include',)
-        cmd += self.source_files.GetAdditionalParameters(module, 'configure')
-        self.RunCommand(cmd, module, 'config', skipable=True)
-
-        cmd = ('make',)
-        if module == 'gcc':
-            cmd += ('all-gcc',)
-        self.RunCommand(cmd, module, 'build')
-
-        cmd = ('make',)
-        if module == 'gcc':
-            cmd += ('install-gcc',)
-        else:
-            cmd += ('install',)
-        self.RunCommand(cmd, module, 'install')
-
-        os.chdir(base_dir)
-
+            tar = tarfile.open(local_file)\r
+            tar.extractall(extractDst)\r
+            open(extracted, 'w').write(moduleMd5)\r
+        else:\r
+            pass\r
+            #print 'Previously extracted', self.config.Relative(local_file)\r
+\r
+    def ExtractAll(self):\r
+        for module in self.source_files.GetModules():\r
+            self.Extract(module)\r
+\r
+class Builder:\r
+    """class Builder\r
+\r
+    Builds and installs the GCC tool suite.\r
+    """\r
+\r
+    def __init__(self, source_files, config):\r
+        self.source_files = source_files\r
+        self.config = config\r
+\r
+    def Build(self):\r
+        if not self.config.options.skip_binutils:\r
+            self.BuildModule('binutils')\r
+        if not self.config.options.skip_gcc:\r
+            self.BuildModule('gcc')\r
+            self.MakeSymLinks()\r
+\r
+    def IsBuildStepComplete(self, step):\r
+        return \\r
+            os.path.exists(\r
+                os.path.join(\r
+                    self.config.build_dir, self.config.arch, step + '.completed'\r
+                    )\r
+                )\r
+\r
+    def MarkBuildStepComplete(self, step):\r
+        open(\r
+            os.path.join(\r
+                self.config.build_dir, self.config.arch, step + '.completed'\r
+                ),\r
+            "w"\r
+            ).close()\r
+\r
+\r
+    def BuildModule(self, module):\r
+        base_dir = os.getcwd()\r
+        build_dir = os.path.join(self.config.build_dir, self.config.arch, module)\r
+        module_dir = self.source_files.GetExtractDirOf(module)\r
+        module_dir = os.path.realpath(os.path.join('src', self.config.arch, module_dir))\r
+        configure = os.path.join(module_dir, 'configure')\r
+        prefix = self.config.prefix\r
+        if not os.path.exists(build_dir):\r
+            os.makedirs(build_dir)\r
+        os.chdir(build_dir)\r
+\r
+        cmd = (\r
+            configure,\r
+            '--target=%s' % self.config.target_combo,\r
+            '--prefix=' + prefix,\r
+            '--with-sysroot=' + prefix,\r
+            '--disable-werror',\r
+            )\r
+        if os.path.exists('/opt/local/include/gmp.h'):\r
+            cmd += ('--with-gmp=/opt/local',)\r
+        if module == 'gcc': cmd += ('--oldincludedir=/opt/local/include',)\r
+        cmd += self.source_files.GetAdditionalParameters(module, 'configure')\r
+        self.RunCommand(cmd, module, 'config', skipable=True)\r
+\r
+        cmd = ('make',)\r
+        if module == 'gcc':\r
+            cmd += ('all-gcc',)\r
+        self.RunCommand(cmd, module, 'build')\r
+\r
+        cmd = ('make',)\r
+        if module == 'gcc':\r
+            cmd += ('install-gcc',)\r
+        else:\r
+            cmd += ('install',)\r
+        self.RunCommand(cmd, module, 'install')\r
+\r
+        os.chdir(base_dir)\r
+\r
         print('%s module is now built and installed' % module)\r
-
-    def RunCommand(self, cmd, module, stage, skipable=False):
-        if skipable:
-            if self.IsBuildStepComplete('%s.%s' % (module, stage)):
-                return
-
-        popen = lambda cmd: \
-            subprocess.Popen(
-                cmd,
-                stdin=subprocess.PIPE,
-                stdout=subprocess.PIPE,
-                stderr=subprocess.STDOUT
-                )
-
+\r
+    def RunCommand(self, cmd, module, stage, skipable=False):\r
+        if skipable:\r
+            if self.IsBuildStepComplete('%s.%s' % (module, stage)):\r
+                return\r
+\r
+        popen = lambda cmd: \\r
+            subprocess.Popen(\r
+                cmd,\r
+                stdin=subprocess.PIPE,\r
+                stdout=subprocess.PIPE,\r
+                stderr=subprocess.STDOUT\r
+                )\r
+\r
         print('%s [%s] ...' % (module, stage), end=' ')\r
-        sys.stdout.flush()
-        p = popen(cmd)
-        output = p.stdout.read()
-        p.wait()
-        if p.returncode != 0:
+        sys.stdout.flush()\r
+        p = popen(cmd)\r
+        output = p.stdout.read()\r
+        p.wait()\r
+        if p.returncode != 0:\r
             print('[failed!]')\r
-            logFile = os.path.join(self.config.build_dir, 'log.txt')
-            f = open(logFile, "w")
-            f.write(output)
-            f.close()
+            logFile = os.path.join(self.config.build_dir, 'log.txt')\r
+            f = open(logFile, "w")\r
+            f.write(output)\r
+            f.close()\r
             raise Exception('Failed to %s %s\n' % (stage, module) + \\r
                 'See output log at %s' % self.config.Relative(logFile))\r
-        else:
+        else:\r
             print('[done]')\r
-
-        if skipable:
-            self.MarkBuildStepComplete('%s.%s' % (module, stage))
-
-    def MakeSymLinks(self):
-        links_dir = os.path.join(self.config.symlinks, self.config.arch)
-        if not os.path.exists(links_dir):
-            os.makedirs(links_dir)
-        startPrinted = False
-        for link in ('ar', 'ld', 'gcc'):
-            src = os.path.join(
-                self.config.prefix, 'bin', self.config.target_combo + '-' + link
-                )
-            linkdst = os.path.join(links_dir, link)
-            if not os.path.lexists(linkdst):
-                if not startPrinted:
+\r
+        if skipable:\r
+            self.MarkBuildStepComplete('%s.%s' % (module, stage))\r
+\r
+    def MakeSymLinks(self):\r
+        links_dir = os.path.join(self.config.symlinks, self.config.arch)\r
+        if not os.path.exists(links_dir):\r
+            os.makedirs(links_dir)\r
+        startPrinted = False\r
+        for link in ('ar', 'ld', 'gcc'):\r
+            src = os.path.join(\r
+                self.config.prefix, 'bin', self.config.target_combo + '-' + link\r
+                )\r
+            linkdst = os.path.join(links_dir, link)\r
+            if not os.path.lexists(linkdst):\r
+                if not startPrinted:\r
                     print('Making symlinks in %s:' % self.config.Relative(links_dir), end=' ')\r
-                    startPrinted = True
+                    startPrinted = True\r
                 print(link, end=' ')\r
-                os.symlink(src, linkdst)
-
-        if startPrinted:
+                os.symlink(src, linkdst)\r
+\r
+        if startPrinted:\r
             print('[done]')\r
-
-class App:
-    """class App
-
-    The main body of the application.
-    """
-
-    def __init__(self):
-        config = Config()
-
-        if not config.IsConfigOk():
-            return
-
-        config.MakeDirs()
-
-        sources = SourceFiles(config)
-        result = sources.GetAll()
-        if result:
+\r
+class App:\r
+    """class App\r
+\r
+    The main body of the application.\r
+    """\r
+\r
+    def __init__(self):\r
+        config = Config()\r
+\r
+        if not config.IsConfigOk():\r
+            return\r
+\r
+        config.MakeDirs()\r
+\r
+        sources = SourceFiles(config)\r
+        result = sources.GetAll()\r
+        if result:\r
             print('All files have been downloaded & verified')\r
-        else:
+        else:\r
             print('An error occured while downloading a file')\r
-            return
-
-        Extracter(sources, config).ExtractAll()
-
-        Builder(sources, config).Build()
-
-App()
-
+            return\r
+\r
+        Extracter(sources, config).ExtractAll()\r
+\r
+        Builder(sources, config).Build()\r
+\r
+App()\r
+\r
index 562f9932ff4d3d8c09a19d78e5938a3a7a00c1aa..33d50f58ad87df6909ae7dbcc691cd5503e3789e 100755 (executable)
@@ -1,18 +1,18 @@
 @REM @file\r
-@REM   This stand-alone program is typically called by the edksetup.bat file, \r
+@REM   This stand-alone program is typically called by the edksetup.bat file,\r
 @REM   however it may be executed directly from the BaseTools project folder\r
 @REM   if the file is not executed within a WORKSPACE\BaseTools folder.\r
 @REM\r
-@REM Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
+@REM Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 @REM (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 @REM\r
 @REM This program and the accompanying materials are licensed and made available\r
-@REM under the terms and conditions of the BSD License which accompanies this \r
+@REM under the terms and conditions of the BSD License which accompanies this\r
 @REM distribution.  The full text of the license may be found at:\r
 @REM   http://opensource.org/licenses/bsd-license.php\r
 @REM\r
 @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR \r
+@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR\r
 @REM IMPLIED.\r
 @REM\r
 \r
@@ -124,7 +124,7 @@ if /I "%1"=="/?" goto Usage
       echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!!\r
       echo Please check the directory %EDK_TOOLS_PATH%\Bin\Win32\r
       echo Or configure EDK_TOOLS_BIN env to point Win32 directory.\r
-      echo. \r
+      echo.\r
     )\r
   )\r
   set PATH=%EDK_TOOLS_BIN%;%PATH%\r
@@ -140,7 +140,7 @@ if /I "%1"=="/?" goto Usage
       echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!!\r
       echo Please check the directory %EDK_TOOLS_PATH%\Bin\Win32\r
       echo Or configure EDK_TOOLS_BIN env to point Win32 directory.\r
-      echo. \r
+      echo.\r
     )\r
   )\r
   set PATH=%EDK_TOOLS_BIN%;%PATH%\r
@@ -182,7 +182,7 @@ if NOT exist %CONF_PATH% (
     )\r
   )\r
 )\r
\r
+\r
 :CopyConf\r
 if NOT exist %CONF_PATH% (\r
   mkdir %CONF_PATH%\r
@@ -304,7 +304,7 @@ goto end
       set PYTHON_HOME=%PYTHONHOME%\r
     ) else (\r
       echo.\r
-      echo !!! ERROR !!! Binary python tools are missing. PYTHON_HOME environment variable is not set. \r
+      echo !!! ERROR !!! Binary python tools are missing. PYTHON_HOME environment variable is not set.\r
       echo PYTHON_HOME is required to build or execute the python tools.\r
       echo.\r
       goto end\r
@@ -322,7 +322,7 @@ goto end
 \r
   set BASETOOLS_PYTHON_SOURCE=%BASE_TOOLS_PATH%\Source\Python\r
   set PYTHONPATH=%BASETOOLS_PYTHON_SOURCE%;%PYTHONPATH%\r
-  \r
+\r
   echo                PATH = %PATH%\r
   echo         PYTHON_HOME = %PYTHON_HOME%\r
   echo          PYTHONPATH = %PYTHONPATH%\r
@@ -385,11 +385,11 @@ goto end
   @echo.\r
   echo  Usage: "%0 [-h | -help | --help | /h | /help | /?] [ Rebuild | ForceRebuild ] [Reconfig] [base_tools_path [edk_tools_path]]"\r
   @echo.\r
-  @echo         base_tools_path   BaseTools project path, BASE_TOOLS_PATH will be set to this path. \r
+  @echo         base_tools_path   BaseTools project path, BASE_TOOLS_PATH will be set to this path.\r
   @echo         edk_tools_path    EDK_TOOLS_PATH will be set to this path.\r
-  @echo         Rebuild           If sources are available perform an Incremental build, only \r
+  @echo         Rebuild           If sources are available perform an Incremental build, only\r
   @echo                           build those updated tools.\r
-  @echo         ForceRebuild      If sources are available, rebuild all tools regardless of \r
+  @echo         ForceRebuild      If sources are available, rebuild all tools regardless of\r
   @echo                           whether they have been updated or not.\r
   @echo         Reconfig          Reinstall target.txt, tools_def.txt and build_rule.txt.\r
   @echo.\r