mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
Xcode project.
printf_lite. Add test guard.
This commit is contained in:
parent
b68cd5ec56
commit
c7cc003809
@ -1333,7 +1333,7 @@ int PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, vsnprint, PRINTF_CFUNCTION_SUF
|
||||
, NULL, 0
|
||||
#endif
|
||||
);
|
||||
*(char*)(SPrintfContext.printf_callback_vsnprintf_buffer) = 0;
|
||||
if ( len > 0 ) *(char*)(SPrintfContext.printf_callback_vsnprintf_buffer) = 0;
|
||||
return SPrintfContext.printf_callback_vsnprintf_count;
|
||||
}
|
||||
|
||||
|
@ -62,6 +62,66 @@
|
||||
9A2A7C7E24576CCE00422263 /* XArray_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0B08532402FE9B00E2B470 /* XArray_tests.cpp */; };
|
||||
9A2A7C7F24576CCE00422263 /* printf_lite-test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AA045892425F94D000D6970 /* printf_lite-test.cpp */; };
|
||||
9A2A7C8024576CCE00422263 /* Platform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0B085D240300E000E2B470 /* Platform.cpp */; };
|
||||
9A36E4F024F3B537007A1107 /* TagString8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4DB24F3B536007A1107 /* TagString8.cpp */; };
|
||||
9A36E4F124F3B537007A1107 /* TagString8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4DB24F3B536007A1107 /* TagString8.cpp */; };
|
||||
9A36E4F224F3B537007A1107 /* TagString8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4DB24F3B536007A1107 /* TagString8.cpp */; };
|
||||
9A36E4F324F3B537007A1107 /* TagString8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4DB24F3B536007A1107 /* TagString8.cpp */; };
|
||||
9A36E4F424F3B537007A1107 /* plist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4DD24F3B536007A1107 /* plist.cpp */; };
|
||||
9A36E4F524F3B537007A1107 /* plist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4DD24F3B536007A1107 /* plist.cpp */; };
|
||||
9A36E4F624F3B537007A1107 /* plist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4DD24F3B536007A1107 /* plist.cpp */; };
|
||||
9A36E4F724F3B537007A1107 /* plist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4DD24F3B536007A1107 /* plist.cpp */; };
|
||||
9A36E4F824F3B537007A1107 /* xml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4DF24F3B536007A1107 /* xml.cpp */; };
|
||||
9A36E4F924F3B537007A1107 /* xml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4DF24F3B536007A1107 /* xml.cpp */; };
|
||||
9A36E4FA24F3B537007A1107 /* xml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4DF24F3B536007A1107 /* xml.cpp */; };
|
||||
9A36E4FB24F3B537007A1107 /* xml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4DF24F3B536007A1107 /* xml.cpp */; };
|
||||
9A36E4FC24F3B537007A1107 /* TagBool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E024F3B537007A1107 /* TagBool.cpp */; };
|
||||
9A36E4FD24F3B537007A1107 /* TagBool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E024F3B537007A1107 /* TagBool.cpp */; };
|
||||
9A36E4FE24F3B537007A1107 /* TagBool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E024F3B537007A1107 /* TagBool.cpp */; };
|
||||
9A36E4FF24F3B537007A1107 /* TagBool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E024F3B537007A1107 /* TagBool.cpp */; };
|
||||
9A36E50024F3B537007A1107 /* TagDict.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E124F3B537007A1107 /* TagDict.cpp */; };
|
||||
9A36E50124F3B537007A1107 /* TagDict.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E124F3B537007A1107 /* TagDict.cpp */; };
|
||||
9A36E50224F3B537007A1107 /* TagDict.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E124F3B537007A1107 /* TagDict.cpp */; };
|
||||
9A36E50324F3B537007A1107 /* TagDict.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E124F3B537007A1107 /* TagDict.cpp */; };
|
||||
9A36E50424F3B537007A1107 /* TagInt64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E224F3B537007A1107 /* TagInt64.cpp */; };
|
||||
9A36E50524F3B537007A1107 /* TagInt64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E224F3B537007A1107 /* TagInt64.cpp */; };
|
||||
9A36E50624F3B537007A1107 /* TagInt64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E224F3B537007A1107 /* TagInt64.cpp */; };
|
||||
9A36E50724F3B537007A1107 /* TagInt64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E224F3B537007A1107 /* TagInt64.cpp */; };
|
||||
9A36E50824F3B537007A1107 /* TagDate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E424F3B537007A1107 /* TagDate.cpp */; };
|
||||
9A36E50924F3B537007A1107 /* TagDate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E424F3B537007A1107 /* TagDate.cpp */; };
|
||||
9A36E50A24F3B537007A1107 /* TagDate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E424F3B537007A1107 /* TagDate.cpp */; };
|
||||
9A36E50B24F3B537007A1107 /* TagDate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E424F3B537007A1107 /* TagDate.cpp */; };
|
||||
9A36E50C24F3B537007A1107 /* TagData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E524F3B537007A1107 /* TagData.cpp */; };
|
||||
9A36E50D24F3B537007A1107 /* TagData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E524F3B537007A1107 /* TagData.cpp */; };
|
||||
9A36E50E24F3B537007A1107 /* TagData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E524F3B537007A1107 /* TagData.cpp */; };
|
||||
9A36E50F24F3B537007A1107 /* TagData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E524F3B537007A1107 /* TagData.cpp */; };
|
||||
9A36E51024F3B537007A1107 /* TagArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E624F3B537007A1107 /* TagArray.cpp */; };
|
||||
9A36E51124F3B537007A1107 /* TagArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E624F3B537007A1107 /* TagArray.cpp */; };
|
||||
9A36E51224F3B537007A1107 /* TagArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E624F3B537007A1107 /* TagArray.cpp */; };
|
||||
9A36E51324F3B537007A1107 /* TagArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4E624F3B537007A1107 /* TagArray.cpp */; };
|
||||
9A36E51424F3B537007A1107 /* TagFloat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4EA24F3B537007A1107 /* TagFloat.cpp */; };
|
||||
9A36E51524F3B537007A1107 /* TagFloat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4EA24F3B537007A1107 /* TagFloat.cpp */; };
|
||||
9A36E51624F3B537007A1107 /* TagFloat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4EA24F3B537007A1107 /* TagFloat.cpp */; };
|
||||
9A36E51724F3B537007A1107 /* TagFloat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4EA24F3B537007A1107 /* TagFloat.cpp */; };
|
||||
9A36E51824F3B537007A1107 /* TagKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4EC24F3B537007A1107 /* TagKey.cpp */; };
|
||||
9A36E51924F3B537007A1107 /* TagKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4EC24F3B537007A1107 /* TagKey.cpp */; };
|
||||
9A36E51A24F3B537007A1107 /* TagKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4EC24F3B537007A1107 /* TagKey.cpp */; };
|
||||
9A36E51B24F3B537007A1107 /* TagKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E4EC24F3B537007A1107 /* TagKey.cpp */; };
|
||||
9A36E51F24F3B82A007A1107 /* b64cdecode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E51E24F3B82A007A1107 /* b64cdecode.cpp */; };
|
||||
9A36E52024F3B82A007A1107 /* b64cdecode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E51E24F3B82A007A1107 /* b64cdecode.cpp */; };
|
||||
9A36E52124F3B82A007A1107 /* b64cdecode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E51E24F3B82A007A1107 /* b64cdecode.cpp */; };
|
||||
9A36E52224F3B82A007A1107 /* b64cdecode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E51E24F3B82A007A1107 /* b64cdecode.cpp */; };
|
||||
9A36E52624F3BB6B007A1107 /* FloatLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E52424F3BB6B007A1107 /* FloatLib.cpp */; };
|
||||
9A36E52724F3BB6B007A1107 /* FloatLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E52424F3BB6B007A1107 /* FloatLib.cpp */; };
|
||||
9A36E52824F3BB6B007A1107 /* FloatLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E52424F3BB6B007A1107 /* FloatLib.cpp */; };
|
||||
9A36E52924F3BB6B007A1107 /* FloatLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E52424F3BB6B007A1107 /* FloatLib.cpp */; };
|
||||
9A36E52C24F3C846007A1107 /* plist_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E52A24F3C845007A1107 /* plist_tests.cpp */; };
|
||||
9A36E52D24F3C846007A1107 /* plist_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E52A24F3C845007A1107 /* plist_tests.cpp */; };
|
||||
9A36E52E24F3C846007A1107 /* plist_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E52A24F3C845007A1107 /* plist_tests.cpp */; };
|
||||
9A36E52F24F3C846007A1107 /* plist_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E52A24F3C845007A1107 /* plist_tests.cpp */; };
|
||||
9A36E53C24F3EDED007A1107 /* base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E53B24F3EDED007A1107 /* base64.cpp */; };
|
||||
9A36E53D24F3EDED007A1107 /* base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E53B24F3EDED007A1107 /* base64.cpp */; };
|
||||
9A36E53E24F3EDED007A1107 /* base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E53B24F3EDED007A1107 /* base64.cpp */; };
|
||||
9A36E53F24F3EDED007A1107 /* base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E53B24F3EDED007A1107 /* base64.cpp */; };
|
||||
9A4185B12439E4D600BEAFB8 /* LoadOptions_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A4185AF2439E4D500BEAFB8 /* LoadOptions_test.cpp */; };
|
||||
9A4185B22439E4D600BEAFB8 /* LoadOptions_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A4185AF2439E4D500BEAFB8 /* LoadOptions_test.cpp */; };
|
||||
9A4185B32439E4D600BEAFB8 /* LoadOptions_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A4185AF2439E4D500BEAFB8 /* LoadOptions_test.cpp */; };
|
||||
@ -168,6 +228,36 @@
|
||||
9A28CD49241F437C00F3D247 /* xcode_utf_fixed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xcode_utf_fixed.h; sourceTree = "<group>"; };
|
||||
9A28CD4A241F4CCE00F3D247 /* xcode_utf_fixed.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xcode_utf_fixed.cpp; sourceTree = "<group>"; };
|
||||
9A2A7C8624576CCE00422263 /* cpp_tests UTF32 c++17 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "cpp_tests UTF32 c++17"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9A36E4DA24F3B536007A1107 /* TagBool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagBool.h; sourceTree = "<group>"; };
|
||||
9A36E4DB24F3B536007A1107 /* TagString8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TagString8.cpp; sourceTree = "<group>"; };
|
||||
9A36E4DC24F3B536007A1107 /* plist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = plist.h; sourceTree = "<group>"; };
|
||||
9A36E4DD24F3B536007A1107 /* plist.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = plist.cpp; sourceTree = "<group>"; };
|
||||
9A36E4DE24F3B536007A1107 /* TagInt64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagInt64.h; sourceTree = "<group>"; };
|
||||
9A36E4DF24F3B536007A1107 /* xml.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xml.cpp; sourceTree = "<group>"; };
|
||||
9A36E4E024F3B537007A1107 /* TagBool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TagBool.cpp; sourceTree = "<group>"; };
|
||||
9A36E4E124F3B537007A1107 /* TagDict.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TagDict.cpp; sourceTree = "<group>"; };
|
||||
9A36E4E224F3B537007A1107 /* TagInt64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TagInt64.cpp; sourceTree = "<group>"; };
|
||||
9A36E4E324F3B537007A1107 /* xml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xml.h; sourceTree = "<group>"; };
|
||||
9A36E4E424F3B537007A1107 /* TagDate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TagDate.cpp; sourceTree = "<group>"; };
|
||||
9A36E4E524F3B537007A1107 /* TagData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TagData.cpp; sourceTree = "<group>"; };
|
||||
9A36E4E624F3B537007A1107 /* TagArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TagArray.cpp; sourceTree = "<group>"; };
|
||||
9A36E4E724F3B537007A1107 /* TagDate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagDate.h; sourceTree = "<group>"; };
|
||||
9A36E4E824F3B537007A1107 /* TagData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagData.h; sourceTree = "<group>"; };
|
||||
9A36E4E924F3B537007A1107 /* TagArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagArray.h; sourceTree = "<group>"; };
|
||||
9A36E4EA24F3B537007A1107 /* TagFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TagFloat.cpp; sourceTree = "<group>"; };
|
||||
9A36E4EB24F3B537007A1107 /* TagFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagFloat.h; sourceTree = "<group>"; };
|
||||
9A36E4EC24F3B537007A1107 /* TagKey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TagKey.cpp; sourceTree = "<group>"; };
|
||||
9A36E4ED24F3B537007A1107 /* TagDict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagDict.h; sourceTree = "<group>"; };
|
||||
9A36E4EE24F3B537007A1107 /* TagKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagKey.h; sourceTree = "<group>"; };
|
||||
9A36E4EF24F3B537007A1107 /* TagString8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagString8.h; sourceTree = "<group>"; };
|
||||
9A36E51D24F3B82A007A1107 /* b64cdecode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b64cdecode.h; sourceTree = "<group>"; };
|
||||
9A36E51E24F3B82A007A1107 /* b64cdecode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b64cdecode.cpp; sourceTree = "<group>"; };
|
||||
9A36E52424F3BB6B007A1107 /* FloatLib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FloatLib.cpp; sourceTree = "<group>"; };
|
||||
9A36E52524F3BB6B007A1107 /* FloatLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FloatLib.h; sourceTree = "<group>"; };
|
||||
9A36E52A24F3C845007A1107 /* plist_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = plist_tests.cpp; sourceTree = "<group>"; };
|
||||
9A36E52B24F3C846007A1107 /* plist_tests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = plist_tests.h; sourceTree = "<group>"; };
|
||||
9A36E53A24F3EDED007A1107 /* base64.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = base64.h; sourceTree = "<group>"; };
|
||||
9A36E53B24F3EDED007A1107 /* base64.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = base64.cpp; sourceTree = "<group>"; };
|
||||
9A4185AF2439E4D500BEAFB8 /* LoadOptions_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadOptions_test.cpp; sourceTree = "<group>"; };
|
||||
9A4185B02439E4D600BEAFB8 /* LoadOptions_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadOptions_test.h; sourceTree = "<group>"; };
|
||||
9A4185BE2439F73A00BEAFB8 /* XStringArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XStringArray.cpp; sourceTree = "<group>"; };
|
||||
@ -257,13 +347,14 @@
|
||||
9A4185BE2439F73A00BEAFB8 /* XStringArray.cpp */,
|
||||
9A4185BF2439F73A00BEAFB8 /* XStringArray.h */,
|
||||
);
|
||||
name = cpp_foundation;
|
||||
path = ../../rEFIt_UEFI/cpp_foundation;
|
||||
path = cpp_foundation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9A0B084C2402FE9B00E2B470 /* cpp_unit_test */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9A36E52A24F3C845007A1107 /* plist_tests.cpp */,
|
||||
9A36E52B24F3C846007A1107 /* plist_tests.h */,
|
||||
9A0B08512402FE9B00E2B470 /* all_tests.cpp */,
|
||||
9A0B08542402FE9B00E2B470 /* all_tests.h */,
|
||||
9A0B08642403144C00E2B470 /* global_test.cpp */,
|
||||
@ -295,8 +386,7 @@
|
||||
9A670D1B24E535AB00B5D780 /* XBuffer_tests.cpp */,
|
||||
9A670D1A24E535AB00B5D780 /* XBuffer_tests.h */,
|
||||
);
|
||||
name = cpp_unit_test;
|
||||
path = ../../rEFIt_UEFI/cpp_unit_test;
|
||||
path = cpp_unit_test;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9A1A3FD82424BC22008C89EB /* MemLogLibDefault */ = {
|
||||
@ -314,10 +404,12 @@
|
||||
9A28CCAC241B816400F3D247 /* Platform */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9A36E51E24F3B82A007A1107 /* b64cdecode.cpp */,
|
||||
9A36E51D24F3B82A007A1107 /* b64cdecode.h */,
|
||||
9A36E4D924F3B51C007A1107 /* plist */,
|
||||
9A28CCAF241B816400F3D247 /* Posix */,
|
||||
);
|
||||
name = Platform;
|
||||
path = ../../rEFIt_UEFI/Platform;
|
||||
path = Platform;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9A28CCAF241B816400F3D247 /* Posix */ = {
|
||||
@ -331,15 +423,65 @@
|
||||
path = Posix;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9A36E4D924F3B51C007A1107 /* plist */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9A36E53A24F3EDED007A1107 /* base64.h */,
|
||||
9A36E53B24F3EDED007A1107 /* base64.cpp */,
|
||||
9A36E4DD24F3B536007A1107 /* plist.cpp */,
|
||||
9A36E4DC24F3B536007A1107 /* plist.h */,
|
||||
9A36E4E624F3B537007A1107 /* TagArray.cpp */,
|
||||
9A36E4E924F3B537007A1107 /* TagArray.h */,
|
||||
9A36E4E024F3B537007A1107 /* TagBool.cpp */,
|
||||
9A36E4DA24F3B536007A1107 /* TagBool.h */,
|
||||
9A36E4E524F3B537007A1107 /* TagData.cpp */,
|
||||
9A36E4E824F3B537007A1107 /* TagData.h */,
|
||||
9A36E4E424F3B537007A1107 /* TagDate.cpp */,
|
||||
9A36E4E724F3B537007A1107 /* TagDate.h */,
|
||||
9A36E4E124F3B537007A1107 /* TagDict.cpp */,
|
||||
9A36E4ED24F3B537007A1107 /* TagDict.h */,
|
||||
9A36E4EA24F3B537007A1107 /* TagFloat.cpp */,
|
||||
9A36E4EB24F3B537007A1107 /* TagFloat.h */,
|
||||
9A36E4E224F3B537007A1107 /* TagInt64.cpp */,
|
||||
9A36E4DE24F3B536007A1107 /* TagInt64.h */,
|
||||
9A36E4EC24F3B537007A1107 /* TagKey.cpp */,
|
||||
9A36E4EE24F3B537007A1107 /* TagKey.h */,
|
||||
9A36E4DB24F3B536007A1107 /* TagString8.cpp */,
|
||||
9A36E4EF24F3B537007A1107 /* TagString8.h */,
|
||||
9A36E4DF24F3B536007A1107 /* xml.cpp */,
|
||||
9A36E4E324F3B537007A1107 /* xml.h */,
|
||||
);
|
||||
path = plist;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9A36E51C24F3B5B4007A1107 /* rEFIt_UEFI */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9A36E52324F3BB52007A1107 /* libeg */,
|
||||
9A0B084C2402FE9B00E2B470 /* cpp_unit_test */,
|
||||
9A0B08432402FE9300E2B470 /* cpp_foundation */,
|
||||
9AD469462452B30500D6D0DB /* gui */,
|
||||
9A28CCAC241B816400F3D247 /* Platform */,
|
||||
);
|
||||
name = rEFIt_UEFI;
|
||||
path = ../../rEFIt_UEFI;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9A36E52324F3BB52007A1107 /* libeg */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9A36E52424F3BB6B007A1107 /* FloatLib.cpp */,
|
||||
9A36E52524F3BB6B007A1107 /* FloatLib.h */,
|
||||
);
|
||||
path = libeg;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9A9223242402FD1000483CBA = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9AD469462452B30500D6D0DB /* gui */,
|
||||
9A36E51C24F3B5B4007A1107 /* rEFIt_UEFI */,
|
||||
9A1A3FD82424BC22008C89EB /* MemLogLibDefault */,
|
||||
9A0B08432402FE9300E2B470 /* cpp_foundation */,
|
||||
9A0B084C2402FE9B00E2B470 /* cpp_unit_test */,
|
||||
9A92232F2402FD1000483CBA /* Main */,
|
||||
9A28CCAC241B816400F3D247 /* Platform */,
|
||||
9A92232E2402FD1000483CBA /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
@ -391,8 +533,7 @@
|
||||
9AD469472452B33700D6D0DB /* shared_with_menu.cpp */,
|
||||
9AD469482452B33700D6D0DB /* shared_with_menu.h */,
|
||||
);
|
||||
name = gui;
|
||||
path = ../../rEFIt_UEFI/gui;
|
||||
path = gui;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
@ -506,12 +647,19 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9A36E50524F3B537007A1107 /* TagInt64.cpp in Sources */,
|
||||
9A36E50124F3B537007A1107 /* TagDict.cpp in Sources */,
|
||||
9A36E50D24F3B537007A1107 /* TagData.cpp in Sources */,
|
||||
9A4185B22439E4D600BEAFB8 /* LoadOptions_test.cpp in Sources */,
|
||||
9A36E52D24F3C846007A1107 /* plist_tests.cpp in Sources */,
|
||||
9A0B08732403B08400E2B470 /* XObjArray_tests.cpp in Sources */,
|
||||
9A36E53D24F3EDED007A1107 /* base64.cpp in Sources */,
|
||||
9A28CD20241BB61B00F3D247 /* abort.cpp in Sources */,
|
||||
9A4FFA842451C9740050B38B /* XString.cpp in Sources */,
|
||||
9A4FFA822451C88D0050B38B /* XString_test.cpp in Sources */,
|
||||
9A36E51924F3B537007A1107 /* TagKey.cpp in Sources */,
|
||||
9A9EA7F9245AAB310076EC02 /* XToolsCommon_test.cpp in Sources */,
|
||||
9A36E52724F3BB6B007A1107 /* FloatLib.cpp in Sources */,
|
||||
9A28CD23241BB61B00F3D247 /* strlen.cpp in Sources */,
|
||||
9A28CD4C241F4CCE00F3D247 /* xcode_utf_fixed.cpp in Sources */,
|
||||
9A0B08742403B08400E2B470 /* main.cpp in Sources */,
|
||||
@ -521,13 +669,21 @@
|
||||
9A0B087A2403B08400E2B470 /* all_tests.cpp in Sources */,
|
||||
9A9AEB8E243F752C00FBD7D8 /* unicode_conversions.cpp in Sources */,
|
||||
9A0B087B2403B08400E2B470 /* global_test.cpp in Sources */,
|
||||
9A36E4FD24F3B537007A1107 /* TagBool.cpp in Sources */,
|
||||
9A36E4F524F3B537007A1107 /* plist.cpp in Sources */,
|
||||
9ACAB1192426255C00BDB3CF /* printf_lite.c in Sources */,
|
||||
9A36E4F924F3B537007A1107 /* xml.cpp in Sources */,
|
||||
9A0B087D2403B08400E2B470 /* XStringArray_test.cpp in Sources */,
|
||||
9A28CD11241B9EF800F3D247 /* strcmp.cpp in Sources */,
|
||||
9A36E51124F3B537007A1107 /* TagArray.cpp in Sources */,
|
||||
9A36E4F124F3B537007A1107 /* TagString8.cpp in Sources */,
|
||||
9A36E50924F3B537007A1107 /* TagDate.cpp in Sources */,
|
||||
9A4185C12439F73A00BEAFB8 /* XStringArray.cpp in Sources */,
|
||||
9A36E52024F3B82A007A1107 /* b64cdecode.cpp in Sources */,
|
||||
9A0B087E2403B08400E2B470 /* XArray_tests.cpp in Sources */,
|
||||
9A670D1D24E535AB00B5D780 /* XBuffer_tests.cpp in Sources */,
|
||||
9AA0458B2425F94D000D6970 /* printf_lite-test.cpp in Sources */,
|
||||
9A36E51524F3B537007A1107 /* TagFloat.cpp in Sources */,
|
||||
9A0B087F2403B08400E2B470 /* Platform.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -536,12 +692,19 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9A36E50724F3B537007A1107 /* TagInt64.cpp in Sources */,
|
||||
9A36E50324F3B537007A1107 /* TagDict.cpp in Sources */,
|
||||
9A36E50F24F3B537007A1107 /* TagData.cpp in Sources */,
|
||||
9A2A7C6C24576CCE00422263 /* LoadOptions_test.cpp in Sources */,
|
||||
9A36E52F24F3C846007A1107 /* plist_tests.cpp in Sources */,
|
||||
9A2A7C6D24576CCE00422263 /* XObjArray_tests.cpp in Sources */,
|
||||
9A36E53F24F3EDED007A1107 /* base64.cpp in Sources */,
|
||||
9A2A7C6E24576CCE00422263 /* abort.cpp in Sources */,
|
||||
9A2A7C6F24576CCE00422263 /* XString.cpp in Sources */,
|
||||
9A2A7C7024576CCE00422263 /* XString_test.cpp in Sources */,
|
||||
9A36E51B24F3B537007A1107 /* TagKey.cpp in Sources */,
|
||||
9A9EA7FB245AAB310076EC02 /* XToolsCommon_test.cpp in Sources */,
|
||||
9A36E52924F3BB6B007A1107 /* FloatLib.cpp in Sources */,
|
||||
9A2A7C7124576CCE00422263 /* strlen.cpp in Sources */,
|
||||
9A2A7C7224576CCE00422263 /* xcode_utf_fixed.cpp in Sources */,
|
||||
9A2A7C7324576CCE00422263 /* main.cpp in Sources */,
|
||||
@ -551,13 +714,21 @@
|
||||
9A2A7C7724576CCE00422263 /* all_tests.cpp in Sources */,
|
||||
9A2A7C7824576CCE00422263 /* unicode_conversions.cpp in Sources */,
|
||||
9A2A7C7924576CCE00422263 /* global_test.cpp in Sources */,
|
||||
9A36E4FF24F3B537007A1107 /* TagBool.cpp in Sources */,
|
||||
9A36E4F724F3B537007A1107 /* plist.cpp in Sources */,
|
||||
9A2A7C7A24576CCE00422263 /* printf_lite.c in Sources */,
|
||||
9A36E4FB24F3B537007A1107 /* xml.cpp in Sources */,
|
||||
9A2A7C7B24576CCE00422263 /* XStringArray_test.cpp in Sources */,
|
||||
9A2A7C7C24576CCE00422263 /* strcmp.cpp in Sources */,
|
||||
9A36E51324F3B537007A1107 /* TagArray.cpp in Sources */,
|
||||
9A36E4F324F3B537007A1107 /* TagString8.cpp in Sources */,
|
||||
9A36E50B24F3B537007A1107 /* TagDate.cpp in Sources */,
|
||||
9A2A7C7D24576CCE00422263 /* XStringArray.cpp in Sources */,
|
||||
9A36E52224F3B82A007A1107 /* b64cdecode.cpp in Sources */,
|
||||
9A2A7C7E24576CCE00422263 /* XArray_tests.cpp in Sources */,
|
||||
9A670D1F24E535AB00B5D780 /* XBuffer_tests.cpp in Sources */,
|
||||
9A2A7C7F24576CCE00422263 /* printf_lite-test.cpp in Sources */,
|
||||
9A36E51724F3B537007A1107 /* TagFloat.cpp in Sources */,
|
||||
9A2A7C8024576CCE00422263 /* Platform.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -566,12 +737,19 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9A36E50624F3B537007A1107 /* TagInt64.cpp in Sources */,
|
||||
9A36E50224F3B537007A1107 /* TagDict.cpp in Sources */,
|
||||
9A36E50E24F3B537007A1107 /* TagData.cpp in Sources */,
|
||||
9A4185B32439E4D600BEAFB8 /* LoadOptions_test.cpp in Sources */,
|
||||
9A36E52E24F3C846007A1107 /* plist_tests.cpp in Sources */,
|
||||
9A57C21A2418B9A00029A39F /* XObjArray_tests.cpp in Sources */,
|
||||
9A36E53E24F3EDED007A1107 /* base64.cpp in Sources */,
|
||||
9A28CD21241BB61B00F3D247 /* abort.cpp in Sources */,
|
||||
9A4FFA852451C9740050B38B /* XString.cpp in Sources */,
|
||||
9A4FFA832451C88D0050B38B /* XString_test.cpp in Sources */,
|
||||
9A36E51A24F3B537007A1107 /* TagKey.cpp in Sources */,
|
||||
9A9EA7FA245AAB310076EC02 /* XToolsCommon_test.cpp in Sources */,
|
||||
9A36E52824F3BB6B007A1107 /* FloatLib.cpp in Sources */,
|
||||
9A28CD24241BB61B00F3D247 /* strlen.cpp in Sources */,
|
||||
9A28CD4D241F4CCE00F3D247 /* xcode_utf_fixed.cpp in Sources */,
|
||||
9A57C21B2418B9A00029A39F /* main.cpp in Sources */,
|
||||
@ -581,13 +759,21 @@
|
||||
9A57C2222418B9A00029A39F /* all_tests.cpp in Sources */,
|
||||
9A9AEB8F243F752C00FBD7D8 /* unicode_conversions.cpp in Sources */,
|
||||
9A57C2232418B9A00029A39F /* global_test.cpp in Sources */,
|
||||
9A36E4FE24F3B537007A1107 /* TagBool.cpp in Sources */,
|
||||
9A36E4F624F3B537007A1107 /* plist.cpp in Sources */,
|
||||
9ACAB11A2426255C00BDB3CF /* printf_lite.c in Sources */,
|
||||
9A36E4FA24F3B537007A1107 /* xml.cpp in Sources */,
|
||||
9A57C2252418B9A00029A39F /* XStringArray_test.cpp in Sources */,
|
||||
9A28CD12241B9EF800F3D247 /* strcmp.cpp in Sources */,
|
||||
9A36E51224F3B537007A1107 /* TagArray.cpp in Sources */,
|
||||
9A36E4F224F3B537007A1107 /* TagString8.cpp in Sources */,
|
||||
9A36E50A24F3B537007A1107 /* TagDate.cpp in Sources */,
|
||||
9A4185C22439F73A00BEAFB8 /* XStringArray.cpp in Sources */,
|
||||
9A36E52124F3B82A007A1107 /* b64cdecode.cpp in Sources */,
|
||||
9A57C2272418B9A00029A39F /* XArray_tests.cpp in Sources */,
|
||||
9A670D1E24E535AB00B5D780 /* XBuffer_tests.cpp in Sources */,
|
||||
9AA0458C2425F94D000D6970 /* printf_lite-test.cpp in Sources */,
|
||||
9A36E51624F3B537007A1107 /* TagFloat.cpp in Sources */,
|
||||
9A57C2282418B9A00029A39F /* Platform.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -596,12 +782,19 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9A36E50424F3B537007A1107 /* TagInt64.cpp in Sources */,
|
||||
9A36E50024F3B537007A1107 /* TagDict.cpp in Sources */,
|
||||
9A36E50C24F3B537007A1107 /* TagData.cpp in Sources */,
|
||||
9A0B085A2402FF8400E2B470 /* XObjArray_tests.cpp in Sources */,
|
||||
9A36E52C24F3C846007A1107 /* plist_tests.cpp in Sources */,
|
||||
9A28CD1F241BB61B00F3D247 /* abort.cpp in Sources */,
|
||||
9A36E53C24F3EDED007A1107 /* base64.cpp in Sources */,
|
||||
9A4FFA7E2451C8330050B38B /* XString.cpp in Sources */,
|
||||
9A4FFA812451C88D0050B38B /* XString_test.cpp in Sources */,
|
||||
9A28CD22241BB61B00F3D247 /* strlen.cpp in Sources */,
|
||||
9A36E51824F3B537007A1107 /* TagKey.cpp in Sources */,
|
||||
9A9EA7F8245AAB310076EC02 /* XToolsCommon_test.cpp in Sources */,
|
||||
9A36E52624F3BB6B007A1107 /* FloatLib.cpp in Sources */,
|
||||
9A28CD4B241F4CCE00F3D247 /* xcode_utf_fixed.cpp in Sources */,
|
||||
9A9223312402FD1000483CBA /* main.cpp in Sources */,
|
||||
9A28CD16241BACBB00F3D247 /* strlen_test.cpp in Sources */,
|
||||
@ -611,13 +804,21 @@
|
||||
9A0B08662403144C00E2B470 /* global_test.cpp in Sources */,
|
||||
9A4185B12439E4D600BEAFB8 /* LoadOptions_test.cpp in Sources */,
|
||||
9ACAB117242623EE00BDB3CF /* printf_lite.c in Sources */,
|
||||
9A36E4FC24F3B537007A1107 /* TagBool.cpp in Sources */,
|
||||
9A36E4F424F3B537007A1107 /* plist.cpp in Sources */,
|
||||
9A0B08582402FF7F00E2B470 /* XStringArray_test.cpp in Sources */,
|
||||
9A36E4F824F3B537007A1107 /* xml.cpp in Sources */,
|
||||
9A9AEB8D243F73CE00FBD7D8 /* unicode_conversions.cpp in Sources */,
|
||||
9A4185C02439F73A00BEAFB8 /* XStringArray.cpp in Sources */,
|
||||
9A36E51024F3B537007A1107 /* TagArray.cpp in Sources */,
|
||||
9A36E4F024F3B537007A1107 /* TagString8.cpp in Sources */,
|
||||
9A36E50824F3B537007A1107 /* TagDate.cpp in Sources */,
|
||||
9A28CD10241B9EF800F3D247 /* strcmp.cpp in Sources */,
|
||||
9A36E51F24F3B82A007A1107 /* b64cdecode.cpp in Sources */,
|
||||
9A0B085B2402FF8700E2B470 /* XArray_tests.cpp in Sources */,
|
||||
9A670D1C24E535AB00B5D780 /* XBuffer_tests.cpp in Sources */,
|
||||
9AA0458A2425F94D000D6970 /* printf_lite-test.cpp in Sources */,
|
||||
9A36E51424F3B537007A1107 /* TagFloat.cpp in Sources */,
|
||||
9A0B085E240300E000E2B470 /* Platform.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
@ -44,7 +44,7 @@
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
enableASanStackUseAfterReturn = "YES"
|
||||
enableUBSanitizer = "YES"
|
||||
disableMainThreadChecker = "YES"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
@ -62,28 +62,6 @@
|
||||
ReferencedContainer = "container:cpp_tests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
<AdditionalOption
|
||||
key = "DYLD_INSERT_LIBRARIES"
|
||||
value = "/usr/lib/libgmalloc.dylib"
|
||||
isEnabled = "YES">
|
||||
</AdditionalOption>
|
||||
<AdditionalOption
|
||||
key = "NSZombieEnabled"
|
||||
value = "YES"
|
||||
isEnabled = "YES">
|
||||
</AdditionalOption>
|
||||
<AdditionalOption
|
||||
key = "MallocGuardEdges"
|
||||
value = ""
|
||||
isEnabled = "YES">
|
||||
</AdditionalOption>
|
||||
<AdditionalOption
|
||||
key = "MallocScribble"
|
||||
value = ""
|
||||
isEnabled = "YES">
|
||||
</AdditionalOption>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
@ -57,19 +57,16 @@ void CpuDeadLoop(void)
|
||||
//
|
||||
// return res;
|
||||
//}
|
||||
//
|
||||
//void DebugLog(INTN DebugMode, const char *FormatString, ...)
|
||||
//{
|
||||
// (void)DebugMode;
|
||||
//
|
||||
// char* NewFormat = (char*)alloca(strlen(FormatString)+1);
|
||||
//// dull_replace(FormatString, "%a", "%s", NewFormat);
|
||||
//
|
||||
// va_list va;
|
||||
// va_start(va, FormatString);
|
||||
// vprintf(NewFormat, va);
|
||||
// va_end(va);
|
||||
//}
|
||||
|
||||
void DebugLog(INTN DebugMode, const char *FormatString, ...)
|
||||
{
|
||||
(void)DebugMode;
|
||||
|
||||
va_list va;
|
||||
va_start(va, FormatString);
|
||||
vprintf(FormatString, va);
|
||||
va_end(va);
|
||||
}
|
||||
|
||||
void PauseForKey(const wchar_t* msg)
|
||||
{
|
||||
@ -77,6 +74,55 @@ void PauseForKey(const wchar_t* msg)
|
||||
getchar();
|
||||
}
|
||||
|
||||
static char efiStrError_buf[40];
|
||||
const char* efiStrError(EFI_STATUS Status)
|
||||
{
|
||||
snprintf(efiStrError_buf, sizeof(efiStrError_buf), "efi error %llu(0x%llx)", Status, Status);
|
||||
return efiStrError_buf;
|
||||
}
|
||||
|
||||
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
AsciiStrDecimalToUintnS (
|
||||
IN CONST CHAR8 *String,
|
||||
OUT CHAR8 **EndPointer, OPTIONAL
|
||||
OUT UINTN *Data
|
||||
)
|
||||
{
|
||||
*Data = 0;
|
||||
if ( !String ) return RETURN_INVALID_PARAMETER;
|
||||
int ret = sscanf(String, "%llu", Data);
|
||||
if ( EndPointer ) *EndPointer += ret;
|
||||
if ( ret == 0 ) return RETURN_INVALID_PARAMETER;
|
||||
return RETURN_SUCCESS;
|
||||
}
|
||||
|
||||
UINTN EFIAPI AsciiStrHexToUintn(IN CONST CHAR8 *String)
|
||||
{
|
||||
if ( !String ) return RETURN_INVALID_PARAMETER;
|
||||
UINTN value = 0;
|
||||
int ret = sscanf(String, "%llx", &value);
|
||||
if ( ret == 0 ) return 0;
|
||||
return value;
|
||||
}
|
||||
|
||||
UINTN
|
||||
EFIAPI
|
||||
AsciiStrDecimalToUintn (
|
||||
IN CONST CHAR8 *String
|
||||
)
|
||||
{
|
||||
if ( !String ) panic("AsciiStrDecimalToUintn : !String");
|
||||
UINTN value;
|
||||
int ret = sscanf(String, "%llu", &value);
|
||||
if ( ret == 0 ) return 0;
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UINTN StrLen(const wchar_t* String)
|
||||
@ -141,59 +187,3 @@ CHAR16* StrStr (IN CONST CHAR16 *String, IN CONST CHAR16 *SearchString)
|
||||
{
|
||||
return (CHAR16*)wcsstr_fixed(String, SearchString);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//UINTN AsciiStrLen(const char* String)
|
||||
//{
|
||||
// return (UINTN)strlen(String);
|
||||
//}
|
||||
//
|
||||
//INTN AsciiStrCmp (const char *FirstString,const char *SecondString)
|
||||
//{
|
||||
// return (INTN)strcmp(FirstString, SecondString);
|
||||
//}
|
||||
//int StrCmp(const wchar_t* FirstString, const wchar_t* SecondString)
|
||||
//{
|
||||
//#if __WCHAR_MAX__ > 0xFFFFu || _MSC_VER
|
||||
// int ret = wcscmp(FirstString, SecondString);
|
||||
// return ret;
|
||||
//#else
|
||||
// // Looks like wcscmp doesn't work with Utf16, even if compiled with -fshort-wchar.
|
||||
// // So conversion to Utf32 needed first.
|
||||
//
|
||||
// std::vector<char32_t> FirstStringUtf32;
|
||||
// std::vector<char32_t> SecondStringUtf32;
|
||||
//
|
||||
// convert_utf16_to_utf32((const char16_t*)FirstString, StrLen(FirstString), &FirstStringUtf32);
|
||||
// convert_utf16_to_utf32((const char16_t*)SecondString, StrLen(SecondString), &SecondStringUtf32);
|
||||
//
|
||||
// int ret = wcscmp((const wchar_t*)FirstStringUtf32.data(), (const wchar_t*)SecondStringUtf32.data());
|
||||
// return ret;
|
||||
//#endif
|
||||
//}
|
||||
//
|
||||
//int StrnCmp(const wchar_t* FirstString, const wchar_t* SecondString, UINTN Length)
|
||||
//{
|
||||
//#if __WCHAR_MAX__ > 0xFFFFu
|
||||
// return wcsncmp(FirstString, SecondString, Length);
|
||||
//#else
|
||||
//
|
||||
//#ifdef _MSC_VER
|
||||
// return wcsncmp(FirstString, SecondString, (size_t)Length);
|
||||
//#else
|
||||
// // Looks like wcscmp doesn't work with Utf16, even if compiled with -fshort-wchar.
|
||||
// // So conversion to Utf32 needed first.
|
||||
//
|
||||
// std::vector<char32_t> FirstStringUtf32;
|
||||
// std::vector<char32_t> SecondStringUtf32;
|
||||
//
|
||||
// convert_utf16_to_utf32((const char16_t*)FirstString, StrLen(FirstString), &FirstStringUtf32);
|
||||
// convert_utf16_to_utf32((const char16_t*)SecondString, StrLen(FirstString), &SecondStringUtf32);
|
||||
//
|
||||
// int ret = wcsncmp((const wchar_t*)FirstStringUtf32.data(), (const wchar_t*)SecondStringUtf32.data(), Length);
|
||||
////printf("wcsncmp=%d\n", ret);
|
||||
// return ret;
|
||||
//#endif
|
||||
//#endif
|
||||
//}
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "../../../rEFIt_UEFI/Platform/Posix/abort.h"
|
||||
#include "../../../rEFIt_UEFI/cpp_foundation/unicode_conversions.h"
|
||||
#include "../../../rEFIt_UEFI/cpp_foundation/XString.h"
|
||||
#include "../../../rEFIt_UEFI/cpp_foundation/XObjArray.h"
|
||||
|
||||
#include "xcode_utf_fixed.h"
|
||||
|
||||
@ -53,16 +54,93 @@ typedef uint16_t char16_t;
|
||||
#define VOID void
|
||||
#define EFIAPI
|
||||
#define CONST const
|
||||
#define EFI_STATUS INT64
|
||||
|
||||
typedef UINTN RETURN_STATUS;
|
||||
typedef RETURN_STATUS EFI_STATUS;
|
||||
#define MAX_BIT 0x8000000000000000ULL
|
||||
#define ENCODE_ERROR(StatusCode) ((RETURN_STATUS)(MAX_BIT | (StatusCode)))
|
||||
|
||||
#define RETURN_OUT_OF_RESOURCES ENCODE_ERROR (9)
|
||||
|
||||
#define EFI_SUCCESS 0
|
||||
|
||||
#define RETURN_SUCCESS 0
|
||||
#define RETURN_LOAD_ERROR ENCODE_ERROR (1)
|
||||
#define RETURN_INVALID_PARAMETER ENCODE_ERROR (2)
|
||||
#define RETURN_UNSUPPORTED ENCODE_ERROR (3)
|
||||
#define RETURN_BAD_BUFFER_SIZE ENCODE_ERROR (4)
|
||||
#define RETURN_BUFFER_TOO_SMALL ENCODE_ERROR (5)
|
||||
#define RETURN_NOT_READY ENCODE_ERROR (6)
|
||||
#define RETURN_DEVICE_ERROR ENCODE_ERROR (7)
|
||||
#define RETURN_WRITE_PROTECTED ENCODE_ERROR (8)
|
||||
#define RETURN_OUT_OF_RESOURCES ENCODE_ERROR (9)
|
||||
#define RETURN_VOLUME_CORRUPTED ENCODE_ERROR (10)
|
||||
#define RETURN_VOLUME_FULL ENCODE_ERROR (11)
|
||||
#define RETURN_NO_MEDIA ENCODE_ERROR (12)
|
||||
#define RETURN_MEDIA_CHANGED ENCODE_ERROR (13)
|
||||
#define RETURN_NOT_FOUND ENCODE_ERROR (14)
|
||||
#define RETURN_ACCESS_DENIED ENCODE_ERROR (15)
|
||||
#define RETURN_NO_RESPONSE ENCODE_ERROR (16)
|
||||
#define RETURN_NO_MAPPING ENCODE_ERROR (17)
|
||||
#define RETURN_TIMEOUT ENCODE_ERROR (18)
|
||||
#define RETURN_NOT_STARTED ENCODE_ERROR (19)
|
||||
#define RETURN_ALREADY_STARTED ENCODE_ERROR (20)
|
||||
#define RETURN_ABORTED ENCODE_ERROR (21)
|
||||
#define RETURN_ICMP_ERROR ENCODE_ERROR (22)
|
||||
#define RETURN_TFTP_ERROR ENCODE_ERROR (23)
|
||||
#define RETURN_PROTOCOL_ERROR ENCODE_ERROR (24)
|
||||
#define RETURN_INCOMPATIBLE_VERSION ENCODE_ERROR (25)
|
||||
#define RETURN_SECURITY_VIOLATION ENCODE_ERROR (26)
|
||||
#define RETURN_CRC_ERROR ENCODE_ERROR (27)
|
||||
#define RETURN_END_OF_MEDIA ENCODE_ERROR (28)
|
||||
#define RETURN_END_OF_FILE ENCODE_ERROR (31)
|
||||
|
||||
#define RETURN_WARN_UNKNOWN_GLYPH ENCODE_WARNING (1)
|
||||
#define RETURN_WARN_DELETE_FAILURE ENCODE_WARNING (2)
|
||||
#define RETURN_WARN_WRITE_FAILURE ENCODE_WARNING (3)
|
||||
#define RETURN_WARN_BUFFER_TOO_SMALL ENCODE_WARNING (4)
|
||||
|
||||
//
|
||||
// Enumeration of EFI_STATUS.
|
||||
//
|
||||
#define EFI_SUCCESS RETURN_SUCCESS
|
||||
#define EFI_LOAD_ERROR RETURN_LOAD_ERROR
|
||||
#define EFI_INVALID_PARAMETER RETURN_INVALID_PARAMETER
|
||||
#define EFI_UNSUPPORTED RETURN_UNSUPPORTED
|
||||
#define EFI_BAD_BUFFER_SIZE RETURN_BAD_BUFFER_SIZE
|
||||
#define EFI_BUFFER_TOO_SMALL RETURN_BUFFER_TOO_SMALL
|
||||
#define EFI_NOT_READY RETURN_NOT_READY
|
||||
#define EFI_DEVICE_ERROR RETURN_DEVICE_ERROR
|
||||
#define EFI_WRITE_PROTECTED RETURN_WRITE_PROTECTED
|
||||
#define EFI_OUT_OF_RESOURCES RETURN_OUT_OF_RESOURCES
|
||||
#define EFI_VOLUME_CORRUPTED RETURN_VOLUME_CORRUPTED
|
||||
#define EFI_VOLUME_FULL RETURN_VOLUME_FULL
|
||||
#define EFI_NO_MEDIA RETURN_NO_MEDIA
|
||||
#define EFI_MEDIA_CHANGED RETURN_MEDIA_CHANGED
|
||||
#define EFI_NOT_FOUND RETURN_NOT_FOUND
|
||||
#define EFI_ACCESS_DENIED RETURN_ACCESS_DENIED
|
||||
#define EFI_NO_RESPONSE RETURN_NO_RESPONSE
|
||||
#define EFI_NO_MAPPING RETURN_NO_MAPPING
|
||||
#define EFI_TIMEOUT RETURN_TIMEOUT
|
||||
#define EFI_NOT_STARTED RETURN_NOT_STARTED
|
||||
#define EFI_ALREADY_STARTED RETURN_ALREADY_STARTED
|
||||
#define EFI_ABORTED RETURN_ABORTED
|
||||
#define EFI_ICMP_ERROR RETURN_ICMP_ERROR
|
||||
#define EFI_TFTP_ERROR RETURN_TFTP_ERROR
|
||||
#define EFI_PROTOCOL_ERROR RETURN_PROTOCOL_ERROR
|
||||
#define EFI_INCOMPATIBLE_VERSION RETURN_INCOMPATIBLE_VERSION
|
||||
#define EFI_SECURITY_VIOLATION RETURN_SECURITY_VIOLATION
|
||||
#define EFI_CRC_ERROR RETURN_CRC_ERROR
|
||||
#define EFI_END_OF_MEDIA RETURN_END_OF_MEDIA
|
||||
#define EFI_END_OF_FILE RETURN_END_OF_FILE
|
||||
|
||||
#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH
|
||||
#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE
|
||||
#define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE
|
||||
#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL
|
||||
|
||||
#define RETURN_ERROR(StatusCode) (((INTN)(RETURN_STATUS)(StatusCode)) < 0)
|
||||
#define EFI_ERROR(A) RETURN_ERROR(A)
|
||||
|
||||
|
||||
#define OPTIONAL
|
||||
#define ASSERT(x)
|
||||
@ -72,10 +150,38 @@ typedef UINTN RETURN_STATUS;
|
||||
#endif
|
||||
|
||||
void CpuDeadLoop(void);
|
||||
//void DebugLog(INTN DebugMode, const char *FormatString, ...);
|
||||
void DebugLog(INTN DebugMode, const char *FormatString, ...);
|
||||
#define MsgLog ::printf
|
||||
|
||||
void PauseForKey(const wchar_t* msg);
|
||||
|
||||
const char* efiStrError(EFI_STATUS Status);
|
||||
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
AsciiStrDecimalToUintnS (
|
||||
IN CONST CHAR8 *String,
|
||||
OUT CHAR8 **EndPointer, OPTIONAL
|
||||
OUT UINTN *Data
|
||||
);
|
||||
|
||||
UINTN EFIAPI AsciiStrHexToUintn (IN CONST CHAR8 *String);
|
||||
inline
|
||||
UINTN EFIAPI AsciiStrHexToUintn (const XString8& String)
|
||||
{
|
||||
return AsciiStrHexToUintn(String.c_str());
|
||||
}
|
||||
|
||||
UINTN
|
||||
EFIAPI
|
||||
AsciiStrDecimalToUintn (
|
||||
IN CONST CHAR8 *String
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void* AllocatePool(UINTN AllocationSize);
|
||||
void* AllocateZeroPool(UINTN AllocationSize);
|
||||
|
@ -179,7 +179,7 @@ bool TagStruct::debugIsEqual(const TagStruct& other, const XString8& label) cons
|
||||
void TagStruct::printf(unsigned int ident) const
|
||||
{
|
||||
XString8 s;
|
||||
sprintf(0, &s);
|
||||
sprintf(ident, &s);
|
||||
MsgLog("%s", s.c_str());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user