diff --git a/UEFIExtract/ffsdumper.h b/UEFIExtract/ffsdumper.h index 4d2cd55..2d485b8 100644 --- a/UEFIExtract/ffsdumper.h +++ b/UEFIExtract/ffsdumper.h @@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __FFSDUMPER_H__ -#define __FFSDUMPER_H__ +#ifndef FFSDUMPER_H +#define FFSDUMPER_H #include #include @@ -38,4 +38,4 @@ private: bool dumped; }; -#endif +#endif // FFSDUMPER_H diff --git a/UEFIFind/uefifind.h b/UEFIFind/uefifind.h index 7f222f6..4b76a82 100644 --- a/UEFIFind/uefifind.h +++ b/UEFIFind/uefifind.h @@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __UEFIFIND_H__ -#define __UEFIFIND_H__ +#ifndef UEFIFIND_H +#define UEFIFIND_H #include @@ -47,4 +47,4 @@ private: bool initDone; }; -#endif +#endif // UEFIFIND_H diff --git a/UEFITool/ffsfinder.h b/UEFITool/ffsfinder.h index 789d1e0..13d345a 100644 --- a/UEFITool/ffsfinder.h +++ b/UEFITool/ffsfinder.h @@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __FFSFINDER_H__ -#define __FFSFINDER_H__ +#ifndef FFSFINDER_H +#define FFSFINDER_H #include @@ -30,19 +30,19 @@ class FfsFinder public: explicit FfsFinder(const TreeModel * treeModel); ~FfsFinder(); - + std::vector > getMessages() const; void clearMessages(); - + STATUS findHexPattern(const QModelIndex & index, const QByteArray & hexPattern, const UINT8 mode); STATUS findGuidPattern(const QModelIndex & index, const QByteArray & guidPattern, const UINT8 mode); STATUS findTextPattern(const QModelIndex & index, const QString & pattern, const UINT8 mode, const bool unicode, const Qt::CaseSensitivity caseSensitive); - + private: const TreeModel* model; std::vector > messagesVector; - - void msg(const QString & message, const QModelIndex &index = QModelIndex()); + + void msg(const QString & message, const QModelIndex &index = QModelIndex()); }; -#endif +#endif // FFSFINDER_H diff --git a/UEFITool/guidlineedit.h b/UEFITool/guidlineedit.h index 636cf7a..e9a4bc4 100644 --- a/UEFITool/guidlineedit.h +++ b/UEFITool/guidlineedit.h @@ -11,8 +11,8 @@ */ -#ifndef __GUIDLINEEDIT_H__ -#define __GUIDLINEEDIT_H__ +#ifndef GUIDLINEEDIT_H +#define GUIDLINEEDIT_H #include #include @@ -33,4 +33,4 @@ protected: }; -#endif +#endif // GUIDLINEEDIT_H diff --git a/UEFITool/messagelistitem.h b/UEFITool/messagelistitem.h index 82d8bcf..dd579f2 100644 --- a/UEFITool/messagelistitem.h +++ b/UEFITool/messagelistitem.h @@ -11,8 +11,8 @@ */ -#ifndef __MESSAGELISTITEM_H__ -#define __MESSAGELISTITEM_H__ +#ifndef MESSAGELISTITEM_H +#define MESSAGELISTITEM_H #include #include @@ -34,4 +34,4 @@ private: QModelIndex itemIndex; }; -#endif +#endif // MESSAGELISTITEM_H diff --git a/UEFITool/searchdialog.h b/UEFITool/searchdialog.h index c5308dc..56a673c 100644 --- a/UEFITool/searchdialog.h +++ b/UEFITool/searchdialog.h @@ -11,8 +11,8 @@ */ -#ifndef __SEARCHDIALOG_H__ -#define __SEARCHDIALOG_H__ +#ifndef SEARCHDIALOG_H +#define SEARCHDIALOG_H #include #include @@ -35,4 +35,4 @@ private: QRegExpValidator guidValidator; }; -#endif +#endif // SEARCHDIALOG_H diff --git a/UEFITool/uefitool.h b/UEFITool/uefitool.h index ea505e5..517cac2 100644 --- a/UEFITool/uefitool.h +++ b/UEFITool/uefitool.h @@ -11,8 +11,8 @@ */ -#ifndef __UEFITOOL_H__ -#define __UEFITOOL_H__ +#ifndef UEFITOOL_H +#define UEFITOOL_H #include #include @@ -128,4 +128,4 @@ private: void showBuilderMessages(); }; -#endif +#endif // UEFITOOL_H diff --git a/common/LZMA/LzmaCompress.h b/common/LZMA/LzmaCompress.h index 5767d1e..eeadb5c 100644 --- a/common/LZMA/LzmaCompress.h +++ b/common/LZMA/LzmaCompress.h @@ -11,8 +11,8 @@ */ -#ifndef __LZMACOMPRESS_H__ -#define __LZMACOMPRESS_H__ +#ifndef LZMACOMPRESS_H +#define LZMACOMPRESS_H #include "SDK/C/Types.h" #include "../basetypes.h" @@ -36,4 +36,5 @@ extern "C" { #ifdef __cplusplus } #endif -#endif + +#endif // LZMACOMPRESS_H diff --git a/common/LZMA/LzmaDecompress.h b/common/LZMA/LzmaDecompress.h index d8e0fae..fe89b86 100644 --- a/common/LZMA/LzmaDecompress.h +++ b/common/LZMA/LzmaDecompress.h @@ -11,8 +11,8 @@ */ -#ifndef __LZMADECOMPRESS_H__ -#define __LZMADECOMPRESS_H__ +#ifndef LZMADECOMPRESS_H +#define LZMADECOMPRESS_H #include "../basetypes.h" #include "SDK/C/LzmaDec.h" @@ -95,4 +95,5 @@ extern "C" { #ifdef __cplusplus } #endif -#endif + +#endif // LZMADECOMPRESS_H diff --git a/common/Tiano/EfiTianoCompress.h b/common/Tiano/EfiTianoCompress.h index bb887bf..9dc042e 100644 --- a/common/Tiano/EfiTianoCompress.h +++ b/common/Tiano/EfiTianoCompress.h @@ -20,8 +20,8 @@ Header file for compression routine. */ -#ifndef __EFITIANOCOMPRESS_H__ -#define __EFITIANOCOMPRESS_H__ +#ifndef EFITIANOCOMPRESS_H +#define EFITIANOCOMPRESS_H #include #include @@ -115,4 +115,4 @@ extern "C" { #ifdef __cplusplus } #endif -#endif +#endif // EFITIANOCOMPRESS_H diff --git a/common/Tiano/EfiTianoDecompress.h b/common/Tiano/EfiTianoDecompress.h index 7a8a0f1..d6bb30d 100644 --- a/common/Tiano/EfiTianoDecompress.h +++ b/common/Tiano/EfiTianoDecompress.h @@ -21,8 +21,8 @@ Providing both EFI and Tiano decompress algorithms. --*/ -#ifndef __EFITIANODECOMPRESS_H__ -#define __EFITIANODECOMPRESS_H__ +#ifndef EFITIANODECOMPRESS_H +#define EFITIANODECOMPRESS_H #include #include @@ -135,4 +135,4 @@ EFI_INVALID_PARAMETER - The source data is corrupted #ifdef __cplusplus } #endif -#endif +#endif // EFITIANODECOMPRESS_H diff --git a/common/basetypes.h b/common/basetypes.h index d4b1b42..5b13e2f 100644 --- a/common/basetypes.h +++ b/common/basetypes.h @@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __BASETYPES_H__ -#define __BASETYPES_H__ +#ifndef BASETYPES_H +#define BASETYPES_H #include #include @@ -166,5 +166,4 @@ UINT8: 8; #define hexarg(X) arg(QString("%1").arg((X),0,16).toUpper()) #define hexarg2(X, Y) arg(QString("%1").arg((X),(Y),16,QLatin1Char('0')).toUpper()) - -#endif +#endif // BASETYPES_H diff --git a/common/descriptor.h b/common/descriptor.h index 02064fc..e618743 100644 --- a/common/descriptor.h +++ b/common/descriptor.h @@ -10,8 +10,8 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __DESCRIPTOR_H__ -#define __DESCRIPTOR_H__ +#ifndef DESCRIPTOR_H +#define DESCRIPTOR_H #include "basetypes.h" @@ -200,4 +200,5 @@ extern const UINT8* calculateAddress16(const UINT8* baseAddress, const UINT16 ba extern UINT32 calculateRegionOffset(const UINT16 base); // Calculate size of region using it's base and limit extern UINT32 calculateRegionSize(const UINT16 base, const UINT16 limit); -#endif + +#endif // DESCRIPTOR_H diff --git a/common/ffs.h b/common/ffs.h index a53a641..b833a19 100644 --- a/common/ffs.h +++ b/common/ffs.h @@ -10,8 +10,8 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __FFS_H__ -#define __FFS_H__ +#ifndef FFS_H +#define FFS_H #include @@ -591,4 +591,4 @@ typedef EFI_COMMON_SECTION_HEADER2 EFI_USER_INTERFACE_SECTION2; // Restore previous packing rules #pragma pack(pop) -#endif +#endif // FFS_H diff --git a/common/ffsbuilder.h b/common/ffsbuilder.h index 0110f44..08701b7 100644 --- a/common/ffsbuilder.h +++ b/common/ffsbuilder.h @@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __FFSBUILDER_H__ -#define __FFSBUILDER_H__ +#ifndef FFSBUILDER_H +#define FFSBUILDER_H #include @@ -58,4 +58,4 @@ private: STATUS erase(const QModelIndex & index, QByteArray & erased); }; -#endif +#endif // FFSBUILDER_H diff --git a/common/ffsops.h b/common/ffsops.h index 374130b..56f2e82 100644 --- a/common/ffsops.h +++ b/common/ffsops.h @@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __FFSOPS_H__ -#define __FFSOPS_H__ +#ifndef FFSOPS_H +#define FFSOPS_H #include @@ -48,4 +48,4 @@ private: void msg(const QString & message, const QModelIndex &index = QModelIndex()); }; -#endif +#endif // FFSOPS_H diff --git a/common/ffsparser.h b/common/ffsparser.h index d093053..e0c4c0d 100644 --- a/common/ffsparser.h +++ b/common/ffsparser.h @@ -10,8 +10,8 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __FFSPARSER_H__ -#define __FFSPARSER_H__ +#ifndef FFSPARSER_H +#define FFSPARSER_H #include @@ -121,4 +121,4 @@ private: void msg(const QString & message, const QModelIndex &index = QModelIndex()); }; -#endif +#endif // FFSPARSER_H diff --git a/common/fit.h b/common/fit.h index ea9d126..a988ab8 100644 --- a/common/fit.h +++ b/common/fit.h @@ -10,14 +10,14 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __FIT_H__ -#define __FIT_H__ +#ifndef FIT_H +#define FIT_H #include #include "basetypes.h" // Make sure we use right packing rules -#pragma pack(push,1) +#pragma pack(push, 1) // Memory address of a pointer to FIT, 40h back from the end of flash chip #define FIT_POINTER_OFFSET 0x40 @@ -63,4 +63,4 @@ typedef struct _INTEL_MICROCODE_HEADER { #pragma pack(pop) -#endif \ No newline at end of file +#endif // FIT_H diff --git a/common/fitparser.h b/common/fitparser.h index 5e008c0..232b11f 100644 --- a/common/fitparser.h +++ b/common/fitparser.h @@ -10,8 +10,8 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __FITPARSER_H__ -#define __FITPARSER_H__ +#ifndef FITPARSER_H +#define FITPARSER_H #include @@ -56,4 +56,4 @@ private: void msg(const QString & message, const QModelIndex &index = QModelIndex()); }; -#endif +#endif // FITPARSER_H diff --git a/common/gbe.h b/common/gbe.h index 6c49e0a..361d6ad 100644 --- a/common/gbe.h +++ b/common/gbe.h @@ -10,13 +10,13 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __GBE_H__ -#define __GBE_H__ +#ifndef GBE_H +#define GBE_H #include "basetypes.h" // Make sure we use right packing rules -#pragma pack(push,1) +#pragma pack(push, 1) typedef struct _GBE_MAC_ADDRESS { UINT8 vendor[3]; @@ -33,4 +33,5 @@ typedef struct _GBE_VERSION { // Restore previous packing rules #pragma pack(pop) -#endif + +#endif // GBE_H diff --git a/common/me.h b/common/me.h index 1245e89..951bfef 100644 --- a/common/me.h +++ b/common/me.h @@ -10,13 +10,13 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __ME_H__ -#define __ME_H__ +#ifndef ME_H +#define ME_H #include "basetypes.h" // Make sure we use right packing rules -#pragma pack(push,1) +#pragma pack(push, 1) const QByteArray ME_VERSION_SIGNATURE("\x24\x4D\x41\x4E", 4); //$MAN const QByteArray ME_VERSION_SIGNATURE2("\x24\x4D\x4E\x32", 4); //$MN2 @@ -32,4 +32,5 @@ typedef struct _ME_VERSION { // Restore previous packing rules #pragma pack(pop) -#endif + +#endif // ME_H diff --git a/common/nvram.h b/common/nvram.h index 4d650ab..99f1c9b 100644 --- a/common/nvram.h +++ b/common/nvram.h @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __NVRAM_H__ -#define __NVRAM_H__ +#ifndef NVRAM_H +#define NVRAM_H #include #include @@ -36,7 +36,7 @@ extern QString nvarAttributesToQString(const UINT8 attributes); extern QString efiTimeToQString(const EFI_TIME & time); // Make sure we use right packing rules -#pragma pack(push,1) +#pragma pack(push, 1) // Variable header typedef struct _NVAR_VARIABLE_HEADER { @@ -263,4 +263,5 @@ typedef struct _EVSA_DATA_ENTRY { // Restore previous packing rules #pragma pack(pop) -#endif + +#endif // NVRAM_H diff --git a/common/parsingdata.h b/common/parsingdata.h index 2613fa7..89cdcd9 100644 --- a/common/parsingdata.h +++ b/common/parsingdata.h @@ -14,8 +14,8 @@ routines without the need of backward traversal */ -#ifndef __PARSINGDATA_H__ -#define __PARSINGDATA_H__ +#ifndef PARSINGDATA_H +#define PARSINGDATA_H #include "basetypes.h" @@ -96,6 +96,7 @@ typedef struct _NVRAM_PARSING_DATA { //}; } NVRAM_PARSING_DATA; +// TODO: add more NVRAM-related PD typedef struct _PARSING_DATA { UINT8 emptyByte; @@ -114,4 +115,4 @@ typedef struct _PARSING_DATA { }; } PARSING_DATA; -#endif +#endif // NVRAM_H diff --git a/common/peimage.h b/common/peimage.h index 6cc4d9d..0d0260b 100644 --- a/common/peimage.h +++ b/common/peimage.h @@ -13,18 +13,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __PE_IMAGE_H__ -#define __PE_IMAGE_H__ +#ifndef PEIMAGE_H +#define PEIMAGE_H #include - #include "basetypes.h" -// Make sure we use right packing rules -#pragma pack(push,1) - extern QString machineTypeToQString(UINT16 machineType); +// Make sure we use right packing rules +#pragma pack(push, 1) + // // PE32+ Subsystem type for EFI images // @@ -724,4 +723,4 @@ typedef struct { // Restore previous packing rules #pragma pack(pop) -#endif +#endif // PEIMAGE_H diff --git a/common/treeitem.h b/common/treeitem.h index 7901348..5ce7d11 100644 --- a/common/treeitem.h +++ b/common/treeitem.h @@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __TREEITEM_H__ -#define __TREEITEM_H__ +#ifndef TREEITEM_H +#define TREEITEM_H #include #include @@ -96,4 +96,4 @@ private: TreeItem* parentItem; }; -#endif +#endif // TREEITEM_H diff --git a/common/treemodel.h b/common/treemodel.h index 0251504..6098673 100644 --- a/common/treemodel.h +++ b/common/treemodel.h @@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __TREEMODEL_H__ -#define __TREEMODEL_H__ +#ifndef TREEMODEL_H +#define TREEMODEL_H #include #include @@ -81,4 +81,4 @@ private: TreeItem *rootItem; }; -#endif +#endif // TREEMODEL_H diff --git a/common/types.h b/common/types.h index 0348b61..cd3017c 100644 --- a/common/types.h +++ b/common/types.h @@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __TYPES_H__ -#define __TYPES_H__ +#ifndef TYPES_H +#define TYPES_H #include "basetypes.h" @@ -125,4 +125,4 @@ extern QString itemSubtypeToQString(const UINT8 type, const UINT8 subtype); extern QString compressionTypeToQString(const UINT8 algorithm); extern QString regionTypeToQString(const UINT8 type); -#endif \ No newline at end of file +#endif // TYPES_H diff --git a/common/utility.h b/common/utility.h index 40d52d7..f594311 100644 --- a/common/utility.h +++ b/common/utility.h @@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. */ -#ifndef __UTILITY_H__ -#define __UTILITY_H__ +#ifndef UTILITY_H +#define UTILITY_H #include #include @@ -43,4 +43,4 @@ extern UINT8 calculateChecksum8(const UINT8* buffer, UINT32 bufferSize); // 16bit checksum calculation routine extern UINT16 calculateChecksum16(const UINT16* buffer, UINT32 bufferSize); -#endif +#endif // UTILITY_H