BaseTools: Clean up source files

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>
This commit is contained in:
Liming Gao
2018-07-05 17:40:04 +08:00
parent 39456d00f3
commit f7496d7173
289 changed files with 10647 additions and 10647 deletions

View File

@@ -1,15 +1,15 @@
/** @file
The definition of CFormPkg's member function
Copyright (c) 2004 - 2017, 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.
Copyright (c) 2004 - 2018, 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.
**/
@@ -22,9 +22,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
*/
SPendingAssign::SPendingAssign (
IN CHAR8 *Key,
IN VOID *Addr,
IN UINT32 Len,
IN CHAR8 *Key,
IN VOID *Addr,
IN UINT32 Len,
IN UINT32 LineNo,
IN CONST CHAR8 *Msg
)
@@ -69,7 +69,7 @@ SPendingAssign::~SPendingAssign (
VOID
SPendingAssign::SetAddrAndLen (
IN VOID *Addr,
IN VOID *Addr,
IN UINT32 LineNo
)
{
@@ -79,7 +79,7 @@ SPendingAssign::SetAddrAndLen (
VOID
SPendingAssign::AssignValue (
IN VOID *Addr,
IN VOID *Addr,
IN UINT32 Len
)
{
@@ -255,7 +255,7 @@ CFormPkg::Close (
UINT32
CFormPkg::Read (
IN CHAR8 *Buffer,
IN CHAR8 *Buffer,
IN UINT32 Size
)
{
@@ -309,7 +309,7 @@ CFormPkg::BuildPkg (
OUT PACKAGE_DATA &TBuffer
)
{
CHAR8 *Temp;
UINT32 Size;
CHAR8 Buffer[1024];
@@ -357,7 +357,7 @@ CFormPkg::BuildPkg (
}
fwrite (PkgHdr, sizeof (EFI_HII_PACKAGE_HEADER), 1, Output);
delete PkgHdr;
if (PkgData == NULL) {
Open ();
while ((Size = Read (Buffer, 1024)) != 0) {
@@ -427,7 +427,7 @@ UINT32 gAdjustOpcodeOffset = 0;
BOOLEAN gNeedAdjustOpcode = FALSE;
UINT32 gAdjustOpcodeLen = 0;
EFI_VFR_RETURN_CODE
EFI_VFR_RETURN_CODE
CFormPkg::GenCFile (
IN CHAR8 *BaseName,
IN FILE *pFile,
@@ -454,24 +454,24 @@ CFormPkg::GenCFile (
// For framework vfr file, the extension framework header will be added.
//
if (VfrCompatibleMode) {
fprintf (pFile, " // FRAMEWORK PACKAGE HEADER Length\n");
PkgLength = PkgHdr->Length + sizeof (UINT32) + 2;
_WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, " ", (CHAR8 *)&PkgLength, sizeof (UINT32));
fprintf (pFile, "\n\n // FRAMEWORK PACKAGE HEADER Type\n");
PkgLength = 3;
_WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, " ", (CHAR8 *)&PkgLength, sizeof (UINT16));
} else {
fprintf (pFile, " // ARRAY LENGTH\n");
PkgLength = PkgHdr->Length + sizeof (UINT32);
_WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, " ", (CHAR8 *)&PkgLength, sizeof (UINT32));
}
fprintf (pFile, " // FRAMEWORK PACKAGE HEADER Length\n");
PkgLength = PkgHdr->Length + sizeof (UINT32) + 2;
_WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, " ", (CHAR8 *)&PkgLength, sizeof (UINT32));
fprintf (pFile, "\n\n // FRAMEWORK PACKAGE HEADER Type\n");
PkgLength = 3;
_WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, " ", (CHAR8 *)&PkgLength, sizeof (UINT16));
} else {
fprintf (pFile, " // ARRAY LENGTH\n");
PkgLength = PkgHdr->Length + sizeof (UINT32);
_WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, " ", (CHAR8 *)&PkgLength, sizeof (UINT32));
}
fprintf (pFile, "\n\n // PACKAGE HEADER\n");
_WRITE_PKG_LINE(pFile, BYTES_PRE_LINE, " ", (CHAR8 *)PkgHdr, sizeof (EFI_HII_PACKAGE_HEADER));
PkgLength = sizeof (EFI_HII_PACKAGE_HEADER);
fprintf (pFile, "\n\n // PACKAGE DATA\n");
if (PkgData == NULL) {
Open ();
while ((ReadSize = Read ((CHAR8 *)Buffer, BYTES_PRE_LINE * 8)) != 0) {
@@ -503,8 +503,8 @@ CFormPkg::GenCFile (
EFI_VFR_RETURN_CODE
CFormPkg::AssignPending (
IN CHAR8 *Key,
IN VOID *ValAddr,
IN CHAR8 *Key,
IN VOID *ValAddr,
IN UINT32 ValLen,
IN UINT32 LineNo,
IN CONST CHAR8 *Msg
@@ -524,8 +524,8 @@ CFormPkg::AssignPending (
VOID
CFormPkg::DoPendingAssign (
IN CHAR8 *Key,
IN VOID *ValAddr,
IN CHAR8 *Key,
IN VOID *ValAddr,
IN UINT32 ValLen
)
{
@@ -845,14 +845,14 @@ CFormPkg::DeclarePendingQuestion (
CIfrDisableIf DIObj;
DIObj.SetLineNo (LineNo);
*InsertOpcodeAddr = DIObj.GetObjBinAddr<CHAR8>();
//TrueOpcode
CIfrTrue TObj (LineNo);
// Declare Numeric qeustion for each undefined question.
for (pNode = PendingAssignList; pNode != NULL; pNode = pNode->mNext) {
if (pNode->mFlag == PENDING) {
EFI_VARSTORE_INFO Info;
EFI_VARSTORE_INFO Info;
EFI_QUESTION_ID QId = EFI_QUESTION_ID_INVALID;
//
// Register this question, assume it is normal question, not date or time question
@@ -863,7 +863,7 @@ CFormPkg::DeclarePendingQuestion (
gCVfrErrorHandle.HandleError (ReturnCode, pNode->mLineNo, pNode->mKey);
return ReturnCode;
}
#ifdef VFREXP_DEBUG
printf ("Undefined Question name is %s and Id is 0x%x\n", VarStr, QId);
#endif
@@ -883,7 +883,7 @@ CFormPkg::DeclarePendingQuestion (
gCVfrErrorHandle.PrintMsg (pNode->mLineNo, FName, "Error", "Var Store Type is not defined");
return ReturnCode;
}
VarStoreType = lCVfrDataStorage.GetVarStoreType (Info.mVarStoreId);
VarStoreType = lCVfrDataStorage.GetVarStoreType (Info.mVarStoreId);
if (*VarStr == '\0' && ArrayIdx != INVALID_ARRAY_INDEX) {
ReturnCode = lCVfrDataStorage.GetNameVarStoreInfo (&Info, ArrayIdx);
@@ -1149,7 +1149,7 @@ CIfrRecordInfoDB::IfrRecordOutput (
)
{
CHAR8 *Temp;
SIfrRecord *pNode;
SIfrRecord *pNode;
if (TBuffer.Buffer != NULL) {
delete[] TBuffer.Buffer;
@@ -1161,18 +1161,18 @@ CIfrRecordInfoDB::IfrRecordOutput (
if (mSwitch == FALSE) {
return;
}
}
for (pNode = mIfrRecordListHead; pNode != NULL; pNode = pNode->mNext) {
TBuffer.Size += pNode->mBinBufLen;
}
if (TBuffer.Size != 0) {
TBuffer.Buffer = new CHAR8[TBuffer.Size];
} else {
return;
}
Temp = TBuffer.Buffer;
for (pNode = mIfrRecordListHead; pNode != NULL; pNode = pNode->mNext) {
@@ -1182,8 +1182,8 @@ CIfrRecordInfoDB::IfrRecordOutput (
}
}
return;
}
return;
}
VOID
CIfrRecordInfoDB::IfrRecordOutput (
@@ -1217,7 +1217,7 @@ CIfrRecordInfoDB::IfrRecordOutput (
fprintf (File, "\n");
}
}
if (LineNo == 0) {
fprintf (File, "\nTotal Size of all record is 0x%08X\n", TotalSize);
}
@@ -1264,7 +1264,7 @@ CIfrRecordInfoDB::CheckIdOpCode (
default:
return FALSE;
}
}
}
EFI_QUESTION_ID
CIfrRecordInfoDB::GetOpcodeQuestionId (
@@ -1272,9 +1272,9 @@ CIfrRecordInfoDB::GetOpcodeQuestionId (
)
{
EFI_IFR_QUESTION_HEADER *QuestionHead;
QuestionHead = (EFI_IFR_QUESTION_HEADER *) (OpHead + 1);
return QuestionHead->QuestionId;
}
@@ -1458,7 +1458,7 @@ CIfrRecordInfoDB::IfrRecordAdjust (
QuestionScope = 0;
while (pNode != NULL) {
OpHead = (EFI_IFR_OP_HEADER *) pNode->mIfrBinBuf;
//
// make sure the inconsistent opcode in question scope
//
@@ -1468,7 +1468,7 @@ CIfrRecordInfoDB::IfrRecordAdjust (
QuestionScope --;
}
}
if (CheckQuestionOpCode (OpHead->OpCode)) {
QuestionScope = 1;
}
@@ -1481,7 +1481,7 @@ CIfrRecordInfoDB::IfrRecordAdjust (
//
//
// Count inconsistent opcode Scope
// Count inconsistent opcode Scope
//
StackCount = OpHead->Scope;
QuestionId = EFI_QUESTION_ID_INVALID;
@@ -1499,7 +1499,7 @@ CIfrRecordInfoDB::IfrRecordAdjust (
//
// by IdEqual opcode to get QuestionId
//
if (QuestionId == EFI_QUESTION_ID_INVALID &&
if (QuestionId == EFI_QUESTION_ID_INVALID &&
CheckIdOpCode (tOpHead->OpCode)) {
QuestionId = *(EFI_QUESTION_ID *) (tOpHead + 1);
}
@@ -1517,13 +1517,13 @@ CIfrRecordInfoDB::IfrRecordAdjust (
// extract inconsistent opcode list
// pNode is Incosistent opcode, tNode is End Opcode
//
//
// insert inconsistent opcode list into the right question scope by questionid
//
for (uNode = mIfrRecordListHead; uNode != NULL; uNode = uNode->mNext) {
tOpHead = (EFI_IFR_OP_HEADER *) uNode->mIfrBinBuf;
if (CheckQuestionOpCode (tOpHead->OpCode) &&
if (CheckQuestionOpCode (tOpHead->OpCode) &&
(QuestionId == GetOpcodeQuestionId (tOpHead))) {
break;
}
@@ -1538,7 +1538,7 @@ CIfrRecordInfoDB::IfrRecordAdjust (
//
OpHead->OpCode = EFI_IFR_NO_SUBMIT_IF_OP;
}
//
// skip the default storage for Date and Time
//
@@ -1565,7 +1565,7 @@ CIfrRecordInfoDB::IfrRecordAdjust (
Status = VFR_RETURN_MISMATCHED;
break;
}
} else if (OpHead->OpCode == EFI_IFR_VARSTORE_OP ||
} else if (OpHead->OpCode == EFI_IFR_VARSTORE_OP ||
OpHead->OpCode == EFI_IFR_VARSTORE_EFI_OP) {
//
// for new added group of varstore opcode
@@ -1573,9 +1573,9 @@ CIfrRecordInfoDB::IfrRecordAdjust (
tNode = pNode;
while (tNode->mNext != NULL) {
tOpHead = (EFI_IFR_OP_HEADER *) tNode->mNext->mIfrBinBuf;
if (tOpHead->OpCode != EFI_IFR_VARSTORE_OP &&
if (tOpHead->OpCode != EFI_IFR_VARSTORE_OP &&
tOpHead->OpCode != EFI_IFR_VARSTORE_EFI_OP) {
break;
break;
}
tNode = tNode->mNext;
}
@@ -1583,22 +1583,22 @@ CIfrRecordInfoDB::IfrRecordAdjust (
if (tNode->mNext == NULL) {
//
// invalid IfrCode, IfrCode end by EndOpCode
//
//
gCVfrErrorHandle.PrintMsg (0, NULL, "Error", "No found End Opcode in the end");
Status = VFR_RETURN_MISMATCHED;
break;
}
if (tOpHead->OpCode != EFI_IFR_END_OP) {
//
// not new added varstore, which are not needed to be adjust.
//
preNode = tNode;
pNode = tNode->mNext;
continue;
continue;
} else {
//
// move new added varstore opcode to the position befor form opcode
// move new added varstore opcode to the position befor form opcode
// varstore opcode between pNode and tNode
//
@@ -1639,9 +1639,9 @@ CIfrRecordInfoDB::IfrRecordAdjust (
// next node
//
preNode = pNode;
pNode = pNode->mNext;
pNode = pNode->mNext;
}
//
// Update Ifr Opcode Offset
//
@@ -2238,7 +2238,7 @@ CIfrObj::_EMIT_PENDING_OBJ (
)
{
CHAR8 *ObjBinBuf = NULL;
//
// do nothing
//
@@ -2254,7 +2254,7 @@ CIfrObj::_EMIT_PENDING_OBJ (
if (ObjBinBuf != NULL) {
memmove (ObjBinBuf, mObjBinBuf, mObjBinLen);
}
//
// update bin buffer to package data buffer
//
@@ -2262,7 +2262,7 @@ CIfrObj::_EMIT_PENDING_OBJ (
delete[] mObjBinBuf;
mObjBinBuf = ObjBinBuf;
}
mDelayEmit = FALSE;
}