Hardened plist.

This commit is contained in:
jief666 2020-08-18 19:45:44 +03:00
parent 2961827dce
commit 8dcf25dc6d
16 changed files with 1374 additions and 1010 deletions

View File

@ -44,7 +44,6 @@
9A105B5E24483AE40006DE06 /* Edid.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A105B3B24483ADF0006DE06 /* Edid.h */; };
9A105B5F24483AE40006DE06 /* Injectors.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A105B3C24483ADF0006DE06 /* Injectors.h */; };
9A105B6024483AE40006DE06 /* Net.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A105B3D24483ADF0006DE06 /* Net.h */; };
9A105B6124483AE40006DE06 /* MachO-loader.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A105B3E24483AE00006DE06 /* MachO-loader.h */; };
9A105B6224483AE40006DE06 /* BootOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A105B3F24483AE00006DE06 /* BootOptions.h */; };
9A105B6324483AE40006DE06 /* card_vlist.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A105B4024483AE00006DE06 /* card_vlist.h */; };
9A105B6424483AE40006DE06 /* plist.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A105B4124483AE00006DE06 /* plist.h */; };
@ -122,6 +121,7 @@
9A637AE82430D927000B9474 /* XTheme.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5E3262F2428F4EE002240E8 /* XTheme.cpp */; };
9A637AE92430D928000B9474 /* XTheme.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5E3262F2428F4EE002240E8 /* XTheme.cpp */; };
9A637AEA2430D928000B9474 /* XTheme.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5E3262F2428F4EE002240E8 /* XTheme.cpp */; };
9A63C6CB24EBEF78000EB836 /* Version.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A63C6CA24EBEF78000EB836 /* Version.h */; };
9A670D2224E53FD500B5D780 /* XBuffer_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A670D2024E53FD400B5D780 /* XBuffer_tests.cpp */; };
9A670D2324E53FD500B5D780 /* XBuffer_tests.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A670D2124E53FD500B5D780 /* XBuffer_tests.h */; };
9A7AEDE7245963BF003AAD04 /* XToolsCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A7AEDE6245963BF003AAD04 /* XToolsCommon.h */; };
@ -150,7 +150,6 @@
9AC77FC224176C04005CDD5C /* XObjArray_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC77ED524176C04005CDD5C /* XObjArray_tests.cpp */; };
9AC77FC324176C04005CDD5C /* XArray_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC77ED624176C04005CDD5C /* XArray_tests.cpp */; };
9AC77FC424176C04005CDD5C /* all_tests.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77ED724176C04005CDD5C /* all_tests.h */; };
9AC77FFD24176C04005CDD5C /* Version.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1224176C04005CDD5C /* Version.h */; };
9AC77FFE24176C04005CDD5C /* syslinux_mbr.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1424176C04005CDD5C /* syslinux_mbr.h */; };
9AC77FFF24176C04005CDD5C /* Handle.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1524176C04005CDD5C /* Handle.h */; };
9AC7800024176C04005CDD5C /* gma.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1724176C04005CDD5C /* gma.h */; };
@ -171,7 +170,6 @@
9AC7800F24176C04005CDD5C /* Nvram.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2624176C04005CDD5C /* Nvram.h */; };
9AC7801024176C04005CDD5C /* PlatformDriverOverride.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC77F2724176C04005CDD5C /* PlatformDriverOverride.cpp */; };
9AC7801124176C04005CDD5C /* Edid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC77F2824176C04005CDD5C /* Edid.cpp */; };
9AC7801224176C04005CDD5C /* LoaderUefi.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2924176C04005CDD5C /* LoaderUefi.h */; };
9AC7801324176C04005CDD5C /* sse3_5_patcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2A24176C04005CDD5C /* sse3_5_patcher.h */; };
9AC7801424176C04005CDD5C /* Console.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC77F2B24176C04005CDD5C /* Console.cpp */; };
9AC7801524176C04005CDD5C /* DataHubCpu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC77F2C24176C04005CDD5C /* DataHubCpu.cpp */; };
@ -201,7 +199,6 @@
9AC7802E24176C04005CDD5C /* StartupSound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC77F4524176C04005CDD5C /* StartupSound.cpp */; };
9AC7802F24176C04005CDD5C /* ati.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F4624176C04005CDD5C /* ati.h */; };
9AC7803024176C04005CDD5C /* DevicePath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC77F4724176C04005CDD5C /* DevicePath.cpp */; };
9AC7803124176C04005CDD5C /* loader.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F4824176C04005CDD5C /* loader.h */; };
9AC7803224176C04005CDD5C /* kext_inject.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F4924176C04005CDD5C /* kext_inject.h */; };
9AC7803324176C04005CDD5C /* sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC77F4A24176C04005CDD5C /* sound.cpp */; };
9AC7803424176C04005CDD5C /* LegacyBiosThunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F4B24176C04005CDD5C /* LegacyBiosThunk.h */; };
@ -306,7 +303,6 @@
9ACFE65C24309AF80071CC93 /* CloverKEK.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F8824176C04005CDD5C /* CloverKEK.h */; };
9ACFE65D24309AF80071CC93 /* StateGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1C24176C04005CDD5C /* StateGenerator.h */; };
9ACFE65E24309AF80071CC93 /* remove_ref.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77FAA24176C04005CDD5C /* remove_ref.h */; };
9ACFE66024309AF80071CC93 /* loader.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F4824176C04005CDD5C /* loader.h */; };
9ACFE66124309AF80071CC93 /* AmlGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1E24176C04005CDD5C /* AmlGenerator.h */; };
9ACFE66424309AF80071CC93 /* BootLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AF4173C242F15CB00D2644C /* BootLog.h */; };
9ACFE66924309AF80071CC93 /* XObjArray_tests.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77ED324176C04005CDD5C /* XObjArray_tests.h */; };
@ -336,7 +332,6 @@
9ACFE68324309AF80071CC93 /* spd.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F5524176C04005CDD5C /* spd.h */; };
9ACFE68524309AF80071CC93 /* device_inject.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2E24176C04005CDD5C /* device_inject.h */; };
9ACFE68624309AF80071CC93 /* entry_scan.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F8024176C04005CDD5C /* entry_scan.h */; };
9ACFE68724309AF80071CC93 /* LoaderUefi.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2924176C04005CDD5C /* LoaderUefi.h */; };
9ACFE68824309AF80071CC93 /* hda.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2D24176C04005CDD5C /* hda.h */; };
9ACFE68924309AF80071CC93 /* all_tests.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77ED724176C04005CDD5C /* all_tests.h */; };
9ACFE68A24309AF80071CC93 /* strncmp_test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CD30241BC0DF00F3D247 /* strncmp_test.h */; };
@ -362,7 +357,6 @@
9ACFE6A324309AF80071CC93 /* Nvram.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2624176C04005CDD5C /* Nvram.h */; };
9ACFE6A524309AF80071CC93 /* gma.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1724176C04005CDD5C /* gma.h */; };
9ACFE6A624309AF80071CC93 /* sse3_patcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F3B24176C04005CDD5C /* sse3_patcher.h */; };
9ACFE6A724309AF80071CC93 /* Version.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1224176C04005CDD5C /* Version.h */; };
9ACFE6A824309AF80071CC93 /* XString_test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CC96241AB34800F3D247 /* XString_test.h */; };
9ACFE6AA24309AF80071CC93 /* REFIT_MENU_SCREEN.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F9024176C04005CDD5C /* REFIT_MENU_SCREEN.h */; };
9ACFE6AB24309AF80071CC93 /* Platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F5824176C04005CDD5C /* Platform.h */; };
@ -491,7 +485,6 @@
9AF41592242CD75C00D2644C /* CloverKEK.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F8824176C04005CDD5C /* CloverKEK.h */; };
9AF41593242CD75C00D2644C /* StateGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1C24176C04005CDD5C /* StateGenerator.h */; };
9AF41594242CD75C00D2644C /* remove_ref.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77FAA24176C04005CDD5C /* remove_ref.h */; };
9AF41596242CD75C00D2644C /* loader.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F4824176C04005CDD5C /* loader.h */; };
9AF41597242CD75C00D2644C /* AmlGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1E24176C04005CDD5C /* AmlGenerator.h */; };
9AF4159E242CD75C00D2644C /* XObjArray_tests.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77ED324176C04005CDD5C /* XObjArray_tests.h */; };
9AF4159F242CD75C00D2644C /* Events.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F3424176C04005CDD5C /* Events.h */; };
@ -520,7 +513,6 @@
9AF415B9242CD75C00D2644C /* spd.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F5524176C04005CDD5C /* spd.h */; };
9AF415BB242CD75C00D2644C /* device_inject.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2E24176C04005CDD5C /* device_inject.h */; };
9AF415BC242CD75C00D2644C /* entry_scan.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F8024176C04005CDD5C /* entry_scan.h */; };
9AF415BD242CD75C00D2644C /* LoaderUefi.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2924176C04005CDD5C /* LoaderUefi.h */; };
9AF415BE242CD75C00D2644C /* hda.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2D24176C04005CDD5C /* hda.h */; };
9AF415BF242CD75C00D2644C /* all_tests.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77ED724176C04005CDD5C /* all_tests.h */; };
9AF415C0242CD75C00D2644C /* strncmp_test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CD30241BC0DF00F3D247 /* strncmp_test.h */; };
@ -546,7 +538,6 @@
9AF415D9242CD75C00D2644C /* Nvram.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2624176C04005CDD5C /* Nvram.h */; };
9AF415DB242CD75C00D2644C /* gma.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1724176C04005CDD5C /* gma.h */; };
9AF415DC242CD75C00D2644C /* sse3_patcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F3B24176C04005CDD5C /* sse3_patcher.h */; };
9AF415DD242CD75C00D2644C /* Version.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1224176C04005CDD5C /* Version.h */; };
9AF415DE242CD75C00D2644C /* XString_test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CC96241AB34800F3D247 /* XString_test.h */; };
9AF415E0242CD75C00D2644C /* REFIT_MENU_SCREEN.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F9024176C04005CDD5C /* REFIT_MENU_SCREEN.h */; };
9AF415E1242CD75C00D2644C /* Platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F5824176C04005CDD5C /* Platform.h */; };
@ -656,7 +647,6 @@
9AF4166F242CDA5800D2644C /* CloverKEK.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F8824176C04005CDD5C /* CloverKEK.h */; };
9AF41670242CDA5800D2644C /* StateGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1C24176C04005CDD5C /* StateGenerator.h */; };
9AF41671242CDA5800D2644C /* remove_ref.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77FAA24176C04005CDD5C /* remove_ref.h */; };
9AF41673242CDA5800D2644C /* loader.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F4824176C04005CDD5C /* loader.h */; };
9AF41674242CDA5800D2644C /* AmlGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1E24176C04005CDD5C /* AmlGenerator.h */; };
9AF4167B242CDA5800D2644C /* XObjArray_tests.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77ED324176C04005CDD5C /* XObjArray_tests.h */; };
9AF4167C242CDA5800D2644C /* Events.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F3424176C04005CDD5C /* Events.h */; };
@ -685,7 +675,6 @@
9AF41696242CDA5800D2644C /* spd.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F5524176C04005CDD5C /* spd.h */; };
9AF41698242CDA5800D2644C /* device_inject.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2E24176C04005CDD5C /* device_inject.h */; };
9AF41699242CDA5800D2644C /* entry_scan.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F8024176C04005CDD5C /* entry_scan.h */; };
9AF4169A242CDA5800D2644C /* LoaderUefi.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2924176C04005CDD5C /* LoaderUefi.h */; };
9AF4169B242CDA5800D2644C /* hda.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2D24176C04005CDD5C /* hda.h */; };
9AF4169C242CDA5800D2644C /* all_tests.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77ED724176C04005CDD5C /* all_tests.h */; };
9AF4169D242CDA5800D2644C /* strncmp_test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CD30241BC0DF00F3D247 /* strncmp_test.h */; };
@ -711,7 +700,6 @@
9AF416B6242CDA5800D2644C /* Nvram.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F2624176C04005CDD5C /* Nvram.h */; };
9AF416B8242CDA5800D2644C /* gma.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1724176C04005CDD5C /* gma.h */; };
9AF416B9242CDA5800D2644C /* sse3_patcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F3B24176C04005CDD5C /* sse3_patcher.h */; };
9AF416BA242CDA5800D2644C /* Version.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F1224176C04005CDD5C /* Version.h */; };
9AF416BB242CDA5800D2644C /* XString_test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CC96241AB34800F3D247 /* XString_test.h */; };
9AF416BD242CDA5800D2644C /* REFIT_MENU_SCREEN.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F9024176C04005CDD5C /* REFIT_MENU_SCREEN.h */; };
9AF416BE242CDA5800D2644C /* Platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC77F5824176C04005CDD5C /* Platform.h */; };
@ -830,7 +818,6 @@
9A105B3B24483ADF0006DE06 /* Edid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Edid.h; sourceTree = "<group>"; };
9A105B3C24483ADF0006DE06 /* Injectors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Injectors.h; sourceTree = "<group>"; };
9A105B3D24483ADF0006DE06 /* Net.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Net.h; sourceTree = "<group>"; };
9A105B3E24483AE00006DE06 /* MachO-loader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MachO-loader.h"; sourceTree = "<group>"; };
9A105B3F24483AE00006DE06 /* BootOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BootOptions.h; sourceTree = "<group>"; };
9A105B4024483AE00006DE06 /* card_vlist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = card_vlist.h; sourceTree = "<group>"; };
9A105B4124483AE00006DE06 /* plist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = plist.h; sourceTree = "<group>"; };
@ -875,6 +862,7 @@
9A35A6172451FE1500CAFF76 /* XStringAbstract.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XStringAbstract.h; sourceTree = "<group>"; };
9A4185B42439F29D00BEAFB8 /* LoadOptions_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadOptions_test.h; sourceTree = "<group>"; };
9A4185B52439F29D00BEAFB8 /* LoadOptions_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadOptions_test.cpp; sourceTree = "<group>"; };
9A63C6CA24EBEF78000EB836 /* Version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Version.h; path = ../../Version.h; sourceTree = "<group>"; };
9A670D2024E53FD400B5D780 /* XBuffer_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XBuffer_tests.cpp; sourceTree = "<group>"; };
9A670D2124E53FD500B5D780 /* XBuffer_tests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XBuffer_tests.h; sourceTree = "<group>"; };
9A7AEDE6245963BF003AAD04 /* XToolsCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XToolsCommon.h; sourceTree = "<group>"; };
@ -895,7 +883,6 @@
9AC77ED524176C04005CDD5C /* XObjArray_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XObjArray_tests.cpp; sourceTree = "<group>"; };
9AC77ED624176C04005CDD5C /* XArray_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XArray_tests.cpp; sourceTree = "<group>"; };
9AC77ED724176C04005CDD5C /* all_tests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = all_tests.h; sourceTree = "<group>"; };
9AC77F1224176C04005CDD5C /* Version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Version.h; sourceTree = "<group>"; };
9AC77F1424176C04005CDD5C /* syslinux_mbr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = syslinux_mbr.h; sourceTree = "<group>"; };
9AC77F1524176C04005CDD5C /* Handle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Handle.h; sourceTree = "<group>"; };
9AC77F1724176C04005CDD5C /* gma.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gma.h; sourceTree = "<group>"; };
@ -916,7 +903,6 @@
9AC77F2624176C04005CDD5C /* Nvram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Nvram.h; sourceTree = "<group>"; };
9AC77F2724176C04005CDD5C /* PlatformDriverOverride.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformDriverOverride.cpp; sourceTree = "<group>"; };
9AC77F2824176C04005CDD5C /* Edid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Edid.cpp; sourceTree = "<group>"; };
9AC77F2924176C04005CDD5C /* LoaderUefi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoaderUefi.h; sourceTree = "<group>"; };
9AC77F2A24176C04005CDD5C /* sse3_5_patcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sse3_5_patcher.h; sourceTree = "<group>"; };
9AC77F2B24176C04005CDD5C /* Console.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Console.cpp; sourceTree = "<group>"; };
9AC77F2C24176C04005CDD5C /* DataHubCpu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DataHubCpu.cpp; sourceTree = "<group>"; };
@ -946,7 +932,6 @@
9AC77F4524176C04005CDD5C /* StartupSound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StartupSound.cpp; sourceTree = "<group>"; };
9AC77F4624176C04005CDD5C /* ati.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ati.h; sourceTree = "<group>"; };
9AC77F4724176C04005CDD5C /* DevicePath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DevicePath.cpp; sourceTree = "<group>"; };
9AC77F4824176C04005CDD5C /* loader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = loader.h; sourceTree = "<group>"; };
9AC77F4924176C04005CDD5C /* kext_inject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = kext_inject.h; sourceTree = "<group>"; };
9AC77F4A24176C04005CDD5C /* sound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sound.cpp; sourceTree = "<group>"; };
9AC77F4B24176C04005CDD5C /* LegacyBiosThunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyBiosThunk.h; sourceTree = "<group>"; };
@ -1120,6 +1105,7 @@
9AC77EB824176B08005CDD5C = {
isa = PBXGroup;
children = (
9A63C6CA24EBEF78000EB836 /* Version.h */,
9AC77EBF24176B1B005CDD5C /* Clover */,
9AC77EC524176BF2005CDD5C /* Products */,
);
@ -1157,7 +1143,6 @@
9AC77F5C24176C04005CDD5C /* libeg */,
9AC77F1624176C04005CDD5C /* Platform */,
9AC77F9224176C04005CDD5C /* refit */,
9AC77F1224176C04005CDD5C /* Version.h */,
);
path = rEFIt_UEFI;
sourceTree = "<group>";
@ -1273,9 +1258,6 @@
9AC77F4B24176C04005CDD5C /* LegacyBiosThunk.h */,
9AC77F1824176C04005CDD5C /* LegacyBoot.cpp */,
9A105B4324483AE00006DE06 /* LegacyBoot.h */,
9AC77F4824176C04005CDD5C /* loader.h */,
9AC77F2924176C04005CDD5C /* LoaderUefi.h */,
9A105B3E24483AE00006DE06 /* MachO-loader.h */,
9AC77F1D24176C04005CDD5C /* memvendors.h */,
9AC77F3E24176C04005CDD5C /* Net.cpp */,
9A105B3D24483ADF0006DE06 /* Net.h */,
@ -1481,7 +1463,6 @@
9AC7806E24176C04005CDD5C /* CloverKEK.h in Headers */,
9AC7800524176C04005CDD5C /* StateGenerator.h in Headers */,
9AC7808C24176C04005CDD5C /* remove_ref.h in Headers */,
9AC7803124176C04005CDD5C /* loader.h in Headers */,
9AC7800724176C04005CDD5C /* AmlGenerator.h in Headers */,
9AEFE64624E2A7D1005D56D8 /* XIcon.h in Headers */,
9A105B2D24464A830006DE06 /* BmLib.h in Headers */,
@ -1529,10 +1510,8 @@
9A105B6424483AE40006DE06 /* plist.h in Headers */,
9AD469502452B5A600D6D0DB /* Efi.h in Headers */,
9AC7801724176C04005CDD5C /* device_inject.h in Headers */,
9A105B6124483AE40006DE06 /* MachO-loader.h in Headers */,
9AC7806624176C04005CDD5C /* entry_scan.h in Headers */,
9A105B6824483AE40006DE06 /* Console.h in Headers */,
9AC7801224176C04005CDD5C /* LoaderUefi.h in Headers */,
9AC7801624176C04005CDD5C /* hda.h in Headers */,
9A105B7D24483AE40006DE06 /* platformdata.h in Headers */,
9AC77FC424176C04005CDD5C /* all_tests.h in Headers */,
@ -1569,6 +1548,7 @@
9AC7803224176C04005CDD5C /* kext_inject.h in Headers */,
9AC7800F24176C04005CDD5C /* Nvram.h in Headers */,
9A9AEB97243F7B5600FBD7D8 /* unicode_conversions.h in Headers */,
9A63C6CB24EBEF78000EB836 /* Version.h in Headers */,
9A105B7724483AE40006DE06 /* string.h in Headers */,
9AC7800024176C04005CDD5C /* gma.h in Headers */,
9A105B7E24483AE40006DE06 /* smbios.h in Headers */,
@ -1578,7 +1558,6 @@
9A105B6024483AE40006DE06 /* Net.h in Headers */,
9A105B6724483AE40006DE06 /* AcpiPatcher.h in Headers */,
9AC7802424176C04005CDD5C /* sse3_patcher.h in Headers */,
9AC77FFD24176C04005CDD5C /* Version.h in Headers */,
9AD469552452B63300D6D0DB /* XToolsConf.h in Headers */,
9AD469512452B5A600D6D0DB /* Devices.h in Headers */,
9A28CC98241AB34800F3D247 /* XString_test.h in Headers */,
@ -1617,7 +1596,6 @@
9ACFE65C24309AF80071CC93 /* CloverKEK.h in Headers */,
9ACFE65D24309AF80071CC93 /* StateGenerator.h in Headers */,
9ACFE65E24309AF80071CC93 /* remove_ref.h in Headers */,
9ACFE66024309AF80071CC93 /* loader.h in Headers */,
9ACFE66124309AF80071CC93 /* AmlGenerator.h in Headers */,
9ACFE66424309AF80071CC93 /* BootLog.h in Headers */,
9ACFE66924309AF80071CC93 /* XObjArray_tests.h in Headers */,
@ -1648,7 +1626,6 @@
9ACFE68324309AF80071CC93 /* spd.h in Headers */,
9ACFE68524309AF80071CC93 /* device_inject.h in Headers */,
9ACFE68624309AF80071CC93 /* entry_scan.h in Headers */,
9ACFE68724309AF80071CC93 /* LoaderUefi.h in Headers */,
9ACFE68824309AF80071CC93 /* hda.h in Headers */,
9ACFE68924309AF80071CC93 /* all_tests.h in Headers */,
9ACFE68A24309AF80071CC93 /* strncmp_test.h in Headers */,
@ -1678,7 +1655,6 @@
9AD469582452B63900D6D0DB /* XToolsConf.h in Headers */,
9ACFE6A524309AF80071CC93 /* gma.h in Headers */,
9ACFE6A624309AF80071CC93 /* sse3_patcher.h in Headers */,
9ACFE6A724309AF80071CC93 /* Version.h in Headers */,
9ACFE6A824309AF80071CC93 /* XString_test.h in Headers */,
9ACFE6AA24309AF80071CC93 /* REFIT_MENU_SCREEN.h in Headers */,
9ACFE6AB24309AF80071CC93 /* Platform.h in Headers */,
@ -1709,7 +1685,6 @@
9AF41592242CD75C00D2644C /* CloverKEK.h in Headers */,
9AF41593242CD75C00D2644C /* StateGenerator.h in Headers */,
9AF41594242CD75C00D2644C /* remove_ref.h in Headers */,
9AF41596242CD75C00D2644C /* loader.h in Headers */,
9AF41597242CD75C00D2644C /* AmlGenerator.h in Headers */,
9AF4159E242CD75C00D2644C /* XObjArray_tests.h in Headers */,
9AF4159F242CD75C00D2644C /* Events.h in Headers */,
@ -1742,7 +1717,6 @@
9AF415B9242CD75C00D2644C /* spd.h in Headers */,
9AF415BB242CD75C00D2644C /* device_inject.h in Headers */,
9AF415BC242CD75C00D2644C /* entry_scan.h in Headers */,
9AF415BD242CD75C00D2644C /* LoaderUefi.h in Headers */,
9AF415BE242CD75C00D2644C /* hda.h in Headers */,
9AF415BF242CD75C00D2644C /* all_tests.h in Headers */,
9AF415C0242CD75C00D2644C /* strncmp_test.h in Headers */,
@ -1770,7 +1744,6 @@
9A105B2E24464A830006DE06 /* BmLib.h in Headers */,
9AF415DB242CD75C00D2644C /* gma.h in Headers */,
9AF415DC242CD75C00D2644C /* sse3_patcher.h in Headers */,
9AF415DD242CD75C00D2644C /* Version.h in Headers */,
9AF415DE242CD75C00D2644C /* XString_test.h in Headers */,
9A105B1F244644C50006DE06 /* XCinema.h in Headers */,
9AF415E0242CD75C00D2644C /* REFIT_MENU_SCREEN.h in Headers */,
@ -1801,7 +1774,6 @@
9AF4166F242CDA5800D2644C /* CloverKEK.h in Headers */,
9AF41670242CDA5800D2644C /* StateGenerator.h in Headers */,
9AF41671242CDA5800D2644C /* remove_ref.h in Headers */,
9AF41673242CDA5800D2644C /* loader.h in Headers */,
9AF41674242CDA5800D2644C /* AmlGenerator.h in Headers */,
9AF4167B242CDA5800D2644C /* XObjArray_tests.h in Headers */,
9AF4167C242CDA5800D2644C /* Events.h in Headers */,
@ -1834,7 +1806,6 @@
9AF41696242CDA5800D2644C /* spd.h in Headers */,
9AF41698242CDA5800D2644C /* device_inject.h in Headers */,
9AF41699242CDA5800D2644C /* entry_scan.h in Headers */,
9AF4169A242CDA5800D2644C /* LoaderUefi.h in Headers */,
9AF4169B242CDA5800D2644C /* hda.h in Headers */,
9AF4169C242CDA5800D2644C /* all_tests.h in Headers */,
9AF4169D242CDA5800D2644C /* strncmp_test.h in Headers */,
@ -1862,7 +1833,6 @@
9A105B2F24464A830006DE06 /* BmLib.h in Headers */,
9AF416B8242CDA5800D2644C /* gma.h in Headers */,
9AF416B9242CDA5800D2644C /* sse3_patcher.h in Headers */,
9AF416BA242CDA5800D2644C /* Version.h in Headers */,
9AF416BB242CDA5800D2644C /* XString_test.h in Headers */,
9A105B20244644C50006DE06 /* XCinema.h in Headers */,
9AF416BD242CDA5800D2644C /* REFIT_MENU_SCREEN.h in Headers */,

View File

@ -205,11 +205,8 @@
9AF4156E242CBC6000D2644C /* printf_lite-conf.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "printf_lite-conf.h"; sourceTree = "<group>"; };
9AF4156F242CBE7500D2644C /* printlib-test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "printlib-test.h"; sourceTree = "<group>"; };
9AF41570242CBE7500D2644C /* printlib-test-cpp_conf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "printlib-test-cpp_conf.h"; sourceTree = "<group>"; };
9AF41571242CBE7600D2644C /* poolprint-test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "poolprint-test.cpp"; sourceTree = "<group>"; };
9AF41572242CBE7600D2644C /* poolprint-test-cpp_conf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "poolprint-test-cpp_conf.h"; sourceTree = "<group>"; };
9AF41573242CBE7600D2644C /* printlib-test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "printlib-test.cpp"; sourceTree = "<group>"; };
9AF41574242CBE7600D2644C /* printf_lite-test-cpp_conf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "printf_lite-test-cpp_conf.h"; sourceTree = "<group>"; };
9AF41575242CBE7600D2644C /* poolprint-test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "poolprint-test.h"; sourceTree = "<group>"; };
9AF41578242CBED700D2644C /* poolprint-test-cpp_conf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "poolprint-test-cpp_conf.h"; sourceTree = "<group>"; };
9AF41579242CBED700D2644C /* printlib-test-cpp_conf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "printlib-test-cpp_conf.h"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -273,9 +270,6 @@
9A57C20A2418A1FD0029A39F /* global_test.h */,
9A4185AF2439E4D500BEAFB8 /* LoadOptions_test.cpp */,
9A4185B02439E4D600BEAFB8 /* LoadOptions_test.h */,
9AF41572242CBE7600D2644C /* poolprint-test-cpp_conf.h */,
9AF41571242CBE7600D2644C /* poolprint-test.cpp */,
9AF41575242CBE7600D2644C /* poolprint-test.h */,
9AF41574242CBE7600D2644C /* printf_lite-test-cpp_conf.h */,
9AA045892425F94D000D6970 /* printf_lite-test.cpp */,
9AA045882425F94D000D6970 /* printf_lite-test.h */,

View File

@ -414,13 +414,13 @@ GetSleepImageLocation(IN REFIT_VOLUME *Volume, REFIT_VOLUME **SleepImageVolume,
dict2 = GetProperty(dict, "AC Power");
if (dict2) {
prop = GetProperty(dict2, "Hibernate File");
if (prop && prop->type == kTagTypeString ) {
if (prop->string.contains("/Volumes/")) {
if (prop && prop->isString() ) {
if (prop->stringValue().contains("/Volumes/")) {
CHAR8 *VolNameStart = NULL, *VolNameEnd = NULL;
XStringW VolName;
UINTN VolNameSize = 0;
// Extract Volumes Name
VolNameStart = AsciiStrStr(prop->string.c_str() + 1, "/") + 1;
VolNameStart = AsciiStrStr(prop->stringValue().c_str() + 1, "/") + 1;
if (VolNameStart) {
VolNameEnd = AsciiStrStr(VolNameStart, "/");
if (VolNameEnd) {
@ -438,10 +438,10 @@ GetSleepImageLocation(IN REFIT_VOLUME *Volume, REFIT_VOLUME **SleepImageVolume,
ImageVolume = Volume;
}
}
} else if ( prop->string.contains("/var") && !prop->string.contains("private")) {
SleepImageName = SWPrintf("\\private%s", prop->string.c_str());
} else if ( prop->stringValue().contains("/var") && !prop->stringValue().contains("private")) {
SleepImageName = SWPrintf("\\private%s", prop->stringValue().c_str());
} else {
SleepImageName = SWPrintf("%s", prop->string.c_str());
SleepImageName = SWPrintf("%s", prop->stringValue().c_str());
}
wchar_t* p = SleepImageName.data(0);
while (*p) {

View File

@ -1079,7 +1079,7 @@ EFI_STATUS bootLegacyBiosDefault(IN UINT16 LegacyBiosDefaultEntry)
BbsDPN = (BBS_BBS_DEVICE_PATH *) CreateDeviceNode(BBS_DEVICE_PATH, BBS_BBS_DP, sizeof(BBS_BBS_DEVICE_PATH));
BbsDPN->DeviceType = BBS_TYPE_HARDDRIVE; // BBS_TYPE_CDROM;
BbsDPN->StatusFlag = 0;
BbsDPN->String[0] = '\0';
BbsDPN->stringValue()[0] = '\0';
// appends end-of-device-path node and returns complete DP
BbsDP = (BBS_BBS_DEVICE_PATH *) AppendDevicePathNode(NULL, (EFI_DEVICE_PATH_PROTOCOL *) BbsDPN);

View File

@ -1046,66 +1046,66 @@ PutNvramPlistToRtVars ()
DbgHeader("PutNvramPlistToRtVars");
// DBG("PutNvramPlistToRtVars ...\n");
// iterate over dict elements
for (Tag = gNvramDict->tag; Tag != NULL; Tag = Tag->tagNext) {
for (Tag = gNvramDict->dictTagValue(); Tag != NULL; Tag = Tag->nextTagValue()) {
EFI_GUID *VendorGuid = &gEfiAppleBootGuid;
Value = NULL;
ValTag = (TagPtr)Tag->tag;
ValTag = Tag->dictTagValue();
// process only valid <key> tags
if (Tag->type != kTagTypeKey || ValTag == NULL) {
DBG(" ERROR: Tag is not <key>, type = %llu\n", Tag->type);
if (!Tag->isKey() || ValTag == NULL) {
DBG(" ERROR: Tag is not <key> : type %s\n", ValTag->getTypeAsXString8().c_str());
continue;
}
// DBG("tag: %s\n", Tag->string);
// DBG("tag: %s\n", Tag->stringValue());
// skip OsxAptioFixDrv-RelocBase - appears and causes trouble
// in kernel and kext patcher when mixing UEFI and CloverEFI boot
if ( Tag->string == "OsxAptioFixDrv-RelocBase"_XS8 ) {
if ( Tag->keyValue() == "OsxAptioFixDrv-RelocBase"_XS8 ) {
DBG(" Skipping OsxAptioFixDrv-RelocBase\n");
continue;
} else if ( Tag->string == "OsxAptioFixDrv-ErrorExitingBootServices"_XS8 ) {
} else if ( Tag->keyValue() == "OsxAptioFixDrv-ErrorExitingBootServices"_XS8 ) {
DBG(" Skipping OsxAptioFixDrv-ErrorExitingBootServices\n");
continue;
} else if ( Tag->string == "EmuVariableUefiPresent"_XS8 ) {
} else if ( Tag->keyValue() == "EmuVariableUefiPresent"_XS8 ) {
DBG(" Skipping EmuVariableUefiPresent\n");
continue;
} else if ( Tag->string == "aapl,panic-info"_XS8 ) {
} else if ( Tag->keyValue() == "aapl,panic-info"_XS8 ) {
DBG(" Skipping aapl,panic-info\n");
continue;
}
// // key to unicode; check if key buffer is large enough
// if ( Tag->string.length() > sizeof(KeyBuf) - 1 ) {
// DBG(" ERROR: Skipping too large key %s\n", Tag->string.c_str());
// if ( Tag->keyValue().length() > sizeof(KeyBuf) - 1 ) {
// DBG(" ERROR: Skipping too large key %s\n", Tag->keyValue().c_str());
// continue;
// }
if ( Tag->string == "Boot0082"_XS8 || Tag->string == "BootNext"_XS8 ) {
if ( Tag->keyValue() == "Boot0082"_XS8 || Tag->keyValue() == "BootNext"_XS8 ) {
VendorGuid = &gEfiGlobalVariableGuid;
// it may happen only in this case
GlobalConfig.HibernationFixup = TRUE;
}
// AsciiStrToUnicodeStrS(Tag->string, KeyBuf, 128);
XStringW KeyBuf = Tag->string;
// AsciiStrToUnicodeStrS(Tag->stringValue(), KeyBuf, 128);
XStringW KeyBuf = Tag->keyValue();
if (!GlobalConfig.DebugLog) {
DBG(" Adding Key: %ls: ", KeyBuf.wc_str());
}
// process value tag
if (ValTag->type == kTagTypeString) {
if (ValTag->isString()) {
// <string> element
Value = (void*)ValTag->string.c_str();
Size = ValTag->string.length();
Value = (void*)ValTag->stringValue().c_str();
Size = ValTag->stringValue().length();
if (!GlobalConfig.DebugLog) {
DBG("String: Size = %lld, Val = '%s'\n", Size, ValTag->string.c_str());
DBG("String: Size = %lld, Val = '%s'\n", Size, ValTag->stringValue().c_str());
}
} else if (ValTag->type == kTagTypeData) {
} else if (ValTag->isData()) {
// <data> element
Size = ValTag->dataLen;
Value = ValTag->data;
Size = ValTag->dataLenValue();
Value = ValTag->dataValue();
if (!GlobalConfig.DebugLog) {
DBG("Size = %lld, Data: ", Size);
for (i = 0; i < Size; i++) {
@ -1116,7 +1116,7 @@ PutNvramPlistToRtVars ()
DBG("\n");
}
} else {
DBG("ERROR: Unsupported tag type: %llu\n", ValTag->type);
DBG("ERROR: Unsupported tag type: %s\n", ValTag->getTypeAsXString8().c_str());
continue;
}

File diff suppressed because it is too large Load Diff

View File

@ -112,7 +112,7 @@ VOID FillCardList(TagPtr CfgDict)
CONST CHAR8 *key = VEN[Index];
prop = GetProperty(CfgDict, key);
if(prop && (prop->type == kTagTypeArray)) {
if( prop && prop->isArray() ) {
INTN i;
INTN count;
@ -130,8 +130,9 @@ VOID FillCardList(TagPtr CfgDict)
if (status == EFI_SUCCESS) {
if (element) {
if ((prop2 = GetProperty(element, "Model")) != 0) {
model_name = prop2->string.c_str();
prop2 = GetProperty(element, "Model");
if ( prop2->isString() && prop2->stringValue().notEmpty() ) {
model_name = prop2->stringValue().c_str();
} else {
model_name = "VideoCard";
}

View File

@ -103,7 +103,7 @@ BOOLEAN checkOSBundleRequired(UINT8 loaderType, TagPtr dict)
osBundleRequiredTag = GetProperty(dict,"OSBundleRequired");
if (osBundleRequiredTag) {
osbundlerequired = osBundleRequiredTag->string;
osbundlerequired = osBundleRequiredTag->stringValue();
osbundlerequired.lowerAscii();
}
@ -170,9 +170,9 @@ EFI_STATUS LOADER_ENTRY::LoadKext(IN EFI_FILE *RootDir, IN CONST CHAR16 *FileNam
}
prop = GetProperty(dict,"CFBundleExecutable");
if(prop!=0) {
Executable.takeValueFrom(prop->string);
// AsciiStrToUnicodeStrS(prop->string, Executable, 256);
if( prop != NULL && prop->isString() && prop->stringValue().notEmpty() ) {
Executable.takeValueFrom(prop->stringValue());
// AsciiStrToUnicodeStrS(prop->stringValue(), Executable, 256);
if (NoContents) {
TempName = SWPrintf("%ls\\%ls", FileName, Executable.wc_str());
// snwprintf(TempName, 512, "%s\\%s", FileName, Executable);

View File

@ -45,20 +45,59 @@
#define DBG(...) DebugLog(DEBUG_PLIST, __VA_ARGS__)
#endif
XObjArray<TagStruct> gTagsFree;
void TagStruct::FreeTag()
{
// Clear and free the tag.
type = kTagTypeNone;
_string.setEmpty();
_intValue = 0;
_floatValue = 0;
if ( _data ) {
FreePool(_data);
_data = NULL;
}
_dataLen = 0;
if ( _tag ) {
_tag->FreeTag();
_tag = NULL;
}
if ( _nextTag ) {
_nextTag->FreeTag();
_nextTag = NULL;
}
gTagsFree.AddReference(this, false);
}
CHAR8* buffer_start = NULL;
// Forward declarations
EFI_STATUS ParseTagList( CHAR8* buffer, TagPtr * tag, UINT32 type, UINT32 empty, UINT32* lenPtr);
EFI_STATUS ParseTagDict( CHAR8* buffer, TagPtr * tag, UINT32 empty, UINT32* lenPtr);
EFI_STATUS ParseTagArray( CHAR8* buffer, TagPtr * tag, UINT32 empty, UINT32* lenPtr);
EFI_STATUS ParseTagKey( char * buffer, TagPtr * tag, UINT32* lenPtr);
EFI_STATUS ParseTagString(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr);
EFI_STATUS ParseTagInteger(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr);
EFI_STATUS ParseTagFloat(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr);
EFI_STATUS ParseTagData(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr);
EFI_STATUS ParseTagDate(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr);
EFI_STATUS ParseTagBoolean(CHAR8* buffer, TagPtr * tag, UINT32 type, UINT32* lenPtr);
EFI_STATUS ParseTagBoolean(CHAR8* buffer, TagPtr * tag, bool value, UINT32* lenPtr);
//defined in Platform.h
//EFI_STATUS GetElement( TagPtr dict, INTN id, TagPtr *dict1);
//INTN GetTagCount( TagPtr dict );
@ -137,24 +176,24 @@ INTN GetTagCount( TagPtr dict )
INTN count = 0;
TagPtr tagList, tag;
if (!dict || (dict->type != kTagTypeDict && dict->type != kTagTypeArray)) {
if ( !dict || (!dict->isDict() && !dict->isArray()) ) {
return 0;
}
tag = 0;
tagList = dict->tag;
tagList = dict->dictOrArrayTagValue();
while (tagList)
{
tag = tagList;
tagList = tag->tagNext;
tagList = tag->nextTagValue();
if (((dict->type == kTagTypeDict) && (tag->type == kTagTypeKey)) ||
(dict->type == kTagTypeArray) // If we are an array, any element is valid
if ( (dict->isDict() && tag->isKey()) ||
dict->isArray() // If we are an array, any element is valid
)
{
count++;
}
//if(tag->type == kTagTypeKey) printf("Located key %s\n", tag->string);
//if(tag->type == kTagTypeKey) printf("Located key %s\n", tag->stringValue());
}
return count;
@ -165,20 +204,20 @@ EFI_STATUS GetElement( TagPtr dict, INTN id, TagPtr * dict1)
INTN element = 0;
TagPtr child;
if(!dict || !dict1 || ((dict->type != kTagTypeArray) && (dict->type != kTagTypeDict))) {
if( !dict || (!dict->isArray() && !dict->isDict()) ) {
return EFI_UNSUPPORTED;
}
child = dict->tag;
child = dict->dictOrArrayTagValue();
while (child != NULL)
{
if (((dict->type == kTagTypeDict) && (child->type == kTagTypeKey)) || //in Dict count Keys
(dict->type == kTagTypeArray) // If we are an array, any element is valid
if ( (dict->isDict() && child->isKey()) || //in Dict count Keys
dict->isArray() // If we are an array, any element is valid
)
{
if (element++ >= id) break;
}
child = child->tagNext;
child = child->nextTagValue();
}
*dict1 = child;
return EFI_SUCCESS;
@ -236,7 +275,7 @@ EFI_STATUS ParseXML(const CHAR8* buffer, TagPtr * dict, UINT32 bufSize)
if (tag == NULL) {
continue;
}
if (tag->type == kTagTypeDict) {
if (tag->isDict()) {
break;
}
@ -264,56 +303,45 @@ EFI_STATUS ParseXML(const CHAR8* buffer, TagPtr * dict, UINT32 bufSize)
TagPtr GetProperty( TagPtr dict, const CHAR8* key )
{
TagPtr tagList, tag;
if (dict->type != kTagTypeDict) {
return NULL;
}
tag = NULL;
tagList = dict->tag;
if ( !dict->isDict() ) return NULL;
TagPtr tag = NULL;
TagPtr tagList = dict->dictOrArrayTagValue();
while (tagList)
{
tag = tagList;
tagList = tag->tagNext;
tagList = tag->nextTagValue();
if ( tag->type != kTagTypeKey || tag->string.isEmpty() ) {
continue;
}
if ( tag->string.equalIC(key) ) {
return tag->tag;
}
if ( tag->isKey() && tag->keyValue().equalIC(key) ) return tag->keyTagValue();
}
return NULL;
}
TagPtr GetNextProperty(TagPtr dict)
{
TagPtr tagList, tag;
if (dict->type != kTagTypeDict) {
return NULL;
}
tag = NULL;
tagList = dict->tag;
while (tagList)
{
tag = tagList;
tagList = tag->tagNext;
if ( tag->type != kTagTypeKey || tag->string.isEmpty() ) {
continue;
}
return tag->tag;
}
return NULL;
}
//TagPtr GetNextProperty(TagPtr dict)
//{
// TagPtr tagList, tag;
//
// if (dict->isDict()) {
// return NULL;
// }
//
// tag = NULL;
// tagList = dict->tag;
// while (tagList)
// {
// tag = tagList;
// tagList = tag->tagNext;
//
// if ( !tag->isKey() || tag->keyValue().isEmpty() ) {
// continue;
//
// }
// return tag->tag;
// }
//
// return NULL;
//}
@ -344,17 +372,17 @@ EFI_STATUS XMLParseNextTag(CHAR8* buffer, TagPtr* tag, UINT32* lenPtr)
else if (!AsciiStrCmp(tagName, kXMLTagDict))
{
DBG("begin dict len=%d\n", length);
Status = ParseTagList(buffer + pos, tag, kTagTypeDict, 0, &length);
Status = ParseTagDict(buffer + pos, tag, 0, &length);
}
else if (!AsciiStrCmp(tagName, kXMLTagDict "/"))
{
DBG("end dict len=%d\n", length);
Status = ParseTagList(buffer + pos, tag, kTagTypeDict, 1, &length);
Status = ParseTagDict(buffer + pos, tag, 1, &length);
}
else if (!strncmp(tagName, kXMLTagDict " ", 5))
{
DBG("space dict len=%d\n", length);
Status = ParseTagList(buffer + pos, tag, kTagTypeDict, 0, &length);
Status = ParseTagDict(buffer + pos, tag, 0, &length);
}
/***** key ****/
else if (!AsciiStrCmp(tagName, kXMLTagKey))
@ -409,27 +437,27 @@ EFI_STATUS XMLParseNextTag(CHAR8* buffer, TagPtr* tag, UINT32* lenPtr)
/***** FALSE ****/
else if (!AsciiStrCmp(tagName, kXMLTagFalse))
{
Status = ParseTagBoolean(buffer + pos, tag, kTagTypeFalse, &length);
Status = ParseTagBoolean(buffer + pos, tag, false, &length);
}
/***** TRUE ****/
else if (!AsciiStrCmp(tagName, kXMLTagTrue))
{
Status = ParseTagBoolean(buffer + pos, tag, kTagTypeTrue, &length);
Status = ParseTagBoolean(buffer + pos, tag, true, &length);
}
/***** array ****/
else if (!AsciiStrCmp(tagName, kXMLTagArray))
{
Status = ParseTagList(buffer + pos, tag, kTagTypeArray, 0, &length);
Status = ParseTagArray(buffer + pos, tag, 0, &length);
}
else if (!strncmp(tagName, kXMLTagArray " ", 6))
{
DBG("begin array len=%d\n", length);
Status = ParseTagList(buffer + pos, tag, kTagTypeArray, 0, &length);
Status = ParseTagArray(buffer + pos, tag, 0, &length);
}
else if (!AsciiStrCmp(tagName, kXMLTagArray "/"))
{
DBG("end array len=%d\n", length);
Status = ParseTagList(buffer + pos, tag, kTagTypeArray, 1, &length);
Status = ParseTagArray(buffer + pos, tag, 1, &length);
}
/***** unknown ****/
else
@ -456,7 +484,7 @@ EFI_STATUS XMLParseNextTag(CHAR8* buffer, TagPtr* tag, UINT32* lenPtr)
//==========================================================================
// ParseTagList
EFI_STATUS ParseTagList( CHAR8* buffer, TagPtr* tag, UINT32 type, UINT32 empty, UINT32* lenPtr)
EFI_STATUS __ParseTagList(bool isArray, CHAR8* buffer, TagPtr* tag, UINT32 empty, UINT32* lenPtr)
{
EFI_STATUS Status = EFI_SUCCESS;
UINT32 pos;
@ -465,9 +493,9 @@ EFI_STATUS ParseTagList( CHAR8* buffer, TagPtr* tag, UINT32 type, UINT32 empty,
TagPtr tmpTag = NULL;
UINT32 length = 0;
if (type == kTagTypeArray) {
if (isArray) {
DBG("parsing array len=%d\n", *lenPtr);
} else if (type == kTagTypeDict) {
} else {
DBG("parsing dict len=%d\n", *lenPtr);
}
tagList = NULL;
@ -489,7 +517,7 @@ EFI_STATUS ParseTagList( CHAR8* buffer, TagPtr* tag, UINT32 type, UINT32 empty,
}
if (tagTail) {
tagTail->tagNext = tmpTag;
tagTail->setNextTagValue(tmpTag);
} else {
tagList = tmpTag;
}
@ -513,11 +541,11 @@ EFI_STATUS ParseTagList( CHAR8* buffer, TagPtr* tag, UINT32 type, UINT32 empty,
return EFI_OUT_OF_RESOURCES;
}
tmpTag->type = type;
tmpTag->string.setEmpty();
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start : 0);
tmpTag->tag = tagList;
tmpTag->tagNext = NULL;
if (isArray) {
tmpTag->setArrayTagValue(tagList);
} else {
tmpTag->setDictTagValue(tagList);
}
*tag = tmpTag;
*lenPtr=pos;
@ -525,6 +553,16 @@ EFI_STATUS ParseTagList( CHAR8* buffer, TagPtr* tag, UINT32 type, UINT32 empty,
return Status;
}
EFI_STATUS ParseTagDict( CHAR8* buffer, TagPtr* tag, UINT32 empty, UINT32* lenPtr)
{
return __ParseTagList(false, buffer, tag, empty, lenPtr);
}
EFI_STATUS ParseTagArray( CHAR8* buffer, TagPtr* tag, UINT32 empty, UINT32* lenPtr)
{
return __ParseTagList(true, buffer, tag, empty, lenPtr);
}
//==========================================================================
// ParseTagKey
@ -547,16 +585,7 @@ EFI_STATUS ParseTagKey( char * buffer, TagPtr* tag, UINT32* lenPtr)
return Status;
}
tmpTag = NewTag();
if (tmpTag == NULL) {
FreeTag(subTag);
return EFI_OUT_OF_RESOURCES;
}
tmpTag->type = kTagTypeKey;
tmpTag->string.takeValueFrom(buffer);
tmpTag->tag = subTag;
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start: 0);
tmpTag->tagNext = NULL;
tmpTag->setKeyValue(LString8(buffer), subTag);
*tag = tmpTag;
*lenPtr = length + length2;
@ -583,11 +612,7 @@ EFI_STATUS ParseTagString(CHAR8* buffer, TagPtr * tag,UINT32* lenPtr)
return EFI_OUT_OF_RESOURCES;
}
tmpTag->type = kTagTypeString;
tmpTag->string.takeValueFrom(XMLDecode(buffer));
tmpTag->tag = NULL;
tmpTag->tagNext = NULL;
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start: 0);
tmpTag->setStringValue(LString8(XMLDecode(buffer)));
*tag = tmpTag;
*lenPtr = length;
DBG(" parse string %s\n", tmpString);
@ -613,13 +638,7 @@ EFI_STATUS ParseTagInteger(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr)
}
tmpTag = NewTag();
tmpTag->type = kTagTypeInteger;
tmpTag->string.setEmpty();
tmpTag->intValue = 0;
tmpTag->floatValue = 0;
tmpTag->tag = NULL;
tmpTag->offset = 0;
tmpTag->tagNext = NULL;
tmpTag->setIntValue(0);
size = length;
integer = 0;
@ -675,8 +694,7 @@ EFI_STATUS ParseTagInteger(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr)
}
tmpTag->intValue = integer;
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start: 0);
tmpTag->setIntValue(integer);
*tag = tmpTag;
*lenPtr = length;
@ -689,13 +707,8 @@ EFI_STATUS ParseTagInteger(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr)
EFI_STATUS ParseTagFloat(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr)
{
EFI_STATUS Status;
UINT32 length = 0; //unused?
// BOOLEAN negative = FALSE;
// CHAR8* val = buffer;
UINT32 length;
TagPtr tmpTag;
FlMix fVar;
fVar.B.fNum = 0.f;
fVar.B.pad = 0;
Status = FixDataMatchingTag(buffer, kXMLTagFloat, &length);
if (EFI_ERROR(Status)) {
@ -707,13 +720,10 @@ EFI_STATUS ParseTagFloat(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr)
return EFI_OUT_OF_RESOURCES;
}
//----
AsciiStrToFloat(buffer, NULL, &fVar.B.fNum);
float f;
AsciiStrToFloat(buffer, NULL, &f);
//----
tmpTag->type = kTagTypeFloat;
tmpTag->floatValue = fVar.B.fNum;
tmpTag->tag = NULL;
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start: 0);
tmpTag->tagNext = NULL;
tmpTag->setFloatValue(f);
*tag = tmpTag;
*lenPtr = length;
@ -727,7 +737,6 @@ EFI_STATUS ParseTagData(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr)
{
EFI_STATUS Status;
UINT32 length = 0;
UINTN len = 0;
TagPtr tmpTag;
Status = FixDataMatchingTag(buffer, kXMLTagData,&length);
@ -740,14 +749,11 @@ EFI_STATUS ParseTagData(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr)
return EFI_OUT_OF_RESOURCES;
}
//Slice - correction as Apple 2003
tmpTag->type = kTagTypeData;
tmpTag->string.takeValueFrom(buffer);
// tmpTag->setStringValue(LString8(buffer));
// dmazar: base64 decode data
tmpTag->data = (UINT8 *)Base64DecodeClover(tmpTag->string.c_str(), &len);
tmpTag->dataLen = len;
tmpTag->tag = NULL;
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start: 0);
tmpTag->tagNext = NULL;
UINTN len = 0;
UINT8* data = (UINT8 *)Base64DecodeClover(buffer, &len);
tmpTag->setDataValue(data, len);
*tag = tmpTag;
*lenPtr = length;
@ -775,11 +781,7 @@ EFI_STATUS ParseTagDate(CHAR8* buffer, TagPtr * tag,UINT32* lenPtr)
return EFI_OUT_OF_RESOURCES;
}
tmpTag->type = kTagTypeDate;
tmpTag->string.setEmpty();
tmpTag->tag = NULL;
tmpTag->tagNext = NULL;
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start: 0);
tmpTag->setDateValue(LString8(buffer));
*tag = tmpTag;
*lenPtr = length;
@ -790,7 +792,7 @@ EFI_STATUS ParseTagDate(CHAR8* buffer, TagPtr * tag,UINT32* lenPtr)
//==========================================================================
// ParseTagBoolean
EFI_STATUS ParseTagBoolean(CHAR8* buffer, TagPtr * tag, UINT32 type,UINT32* lenPtr)
EFI_STATUS ParseTagBoolean(CHAR8* buffer, TagPtr * tag, bool value, UINT32* lenPtr)
{
TagPtr tmpTag;
@ -799,11 +801,7 @@ EFI_STATUS ParseTagBoolean(CHAR8* buffer, TagPtr * tag, UINT32 type,UINT32* lenP
return EFI_OUT_OF_RESOURCES;
}
tmpTag->type = type;
tmpTag->string.setEmpty();
tmpTag->tag = NULL;
tmpTag->tagNext = NULL;
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start: 0);
tmpTag->setBoolValue(value);
*tag = tmpTag;
*lenPtr = 0;
@ -921,25 +919,7 @@ void FreeTag( TagPtr tag )
if (tag == NULL) {
return;
}
tag->string.setEmpty();
if (tag->data) {
FreePool(tag->data);
}
FreeTag(tag->tag);
FreeTag(tag->tagNext);
// Clear and free the tag.
tag->type = kTagTypeNone;
tag->string.setEmpty();
tag->data = NULL;
tag->dataLen = 0;
tag->tag = NULL;
tag->offset = 0;
tag->tagNext = NULL;
gTagsFree.AddReference(tag, false);
tag->FreeTag();
}
@ -951,14 +931,9 @@ void FreeTag( TagPtr tag )
else return FALSE
*/
BOOLEAN
IsPropertyTrue(
TagPtr Prop
)
IsPropertyTrue(TagPtr Prop)
{
return Prop != NULL &&
((Prop->type == kTagTypeTrue) ||
((Prop->type == kTagTypeString) && Prop->string.notEmpty() &&
((Prop->string[0] == 'y') || (Prop->string[0] == 'Y'))));
return Prop != NULL && Prop->isTrueOrYy();
}
/*
@ -966,14 +941,9 @@ IsPropertyTrue(
else return FALSE
*/
BOOLEAN
IsPropertyFalse(
TagPtr Prop
)
IsPropertyFalse(TagPtr Prop)
{
return Prop != NULL &&
((Prop->type == kTagTypeFalse) ||
((Prop->type == kTagTypeString) && Prop->string.notEmpty() &&
((Prop->string[0] == 'N') || (Prop->string[0] == 'n'))));
return Prop != NULL && Prop->isFalseOrNn();
}
/*
@ -993,19 +963,19 @@ GetPropertyInteger(
return Default;
}
if (Prop->type == kTagTypeInteger) {
return Prop->intValue; //this is union char* or size_t
} else if ((Prop->type == kTagTypeString) && Prop->string.notEmpty()) {
if ( Prop->string.length() > 1 && (Prop->string[1] == 'x' || Prop->string[1] == 'X') ) {
return (INTN)AsciiStrHexToUintn(Prop->string);
if (Prop->isInt()) {
return Prop->intValue();
} else if ((Prop->isString()) && Prop->stringValue().notEmpty()) {
if ( Prop->stringValue().length() > 1 && (Prop->stringValue()[1] == 'x' || Prop->stringValue()[1] == 'X') ) {
return (INTN)AsciiStrHexToUintn(Prop->stringValue());
}
if (Prop->string[0] == '-') {
return -(INTN)AsciiStrDecimalToUintn (Prop->string.c_str() + 1);
if (Prop->stringValue()[0] == '-') {
return -(INTN)AsciiStrDecimalToUintn (Prop->stringValue().c_str() + 1);
}
// return (INTN)AsciiStrDecimalToUintn (Prop->string);
return (INTN)AsciiStrDecimalToUintn((Prop->string[0] == '+') ? (Prop->string.c_str() + 1) : Prop->string.c_str());
// return (INTN)AsciiStrDecimalToUintn (Prop->stringValue());
return (INTN)AsciiStrDecimalToUintn((Prop->stringValue()[0] == '+') ? (Prop->stringValue().c_str() + 1) : Prop->stringValue().c_str());
}
return Default;
}
@ -1015,11 +985,11 @@ float GetPropertyFloat (TagPtr Prop, float Default)
if (Prop == NULL) {
return Default;
}
if (Prop->type == kTagTypeFloat) {
return Prop->floatValue; //this is union char* or float
} else if ((Prop->type == kTagTypeString) && Prop->string.notEmpty()) {
if (Prop->isFloat()) {
return Prop->floatValue(); //this is union char* or float
} else if ((Prop->isString()) && Prop->stringValue().notEmpty()) {
float fVar = 0.f;
if(!AsciiStrToFloat(Prop->string.c_str(), NULL, &fVar)) //if success then return 0
if(!AsciiStrToFloat(Prop->stringValue().c_str(), NULL, &fVar)) //if success then return 0
return fVar;
}

View File

@ -8,7 +8,6 @@
#ifndef PLATFORM_PLIST_H_
#define PLATFORM_PLIST_H_
/* XML Tags */
#define kXMLTagPList "plist"
#define kXMLTagDict "dict"
@ -28,36 +27,242 @@
typedef enum {
kTagTypeNone,
kTagTypeDict,
kTagTypeKey,
kTagTypeString,
kTagTypeInteger,
kTagTypeData,
kTagTypeDate,
kTagTypeFalse,
kTagTypeTrue,
kTagTypeArray,
kTagTypeFloat
kTagTypeDict, // 1
kTagTypeKey, // 2
kTagTypeString, // 3
kTagTypeInteger,// 4
kTagTypeData, // 5
kTagTypeDate, // 6
kTagTypeFalse, // 7
kTagTypeTrue, // 8
kTagTypeArray, // 9
kTagTypeFloat // 10
} TAG_TYPE;
class TagStruct;
extern XObjArray<TagStruct> gTagsFree;
class TagStruct
{
public:
UINTN type;
XString8 string;
INTN intValue;
float floatValue;
UINT8 *data;
UINTN dataLen;
UINTN offset;
TagStruct *tag;
TagStruct *tagNext;
UINTN type; // type is private. Use is... functions.
XString8 _string;
INTN _intValue;
float _floatValue;
UINT8 *_data;
UINTN _dataLen;
TagStruct *_tag;
TagStruct *_nextTag;
TagStruct() : type(kTagTypeNone), string(), intValue(0), floatValue(0), data(0), dataLen(0), offset(0), tag(NULL), tagNext(NULL) {}
public:
TagStruct() : type(kTagTypeNone), _string(), _intValue(0), _floatValue(0), _data(0), _dataLen(0), /*offset(0), */_tag(NULL), _nextTag(NULL) {}
TagStruct(const TagStruct& other) = delete; // Can be defined if needed
const TagStruct& operator = ( const TagStruct & ) = delete; // Can be defined if needed
~TagStruct() {}
void FreeTag();
// Property<XString8> string();
bool isDict() { return type == kTagTypeDict; }
bool isKey() { return type == kTagTypeKey; }
bool isString() { return type == kTagTypeString; }
bool isInt() { return type == kTagTypeInteger; }
bool isFloat() { return type == kTagTypeFloat; }
bool isBool() { return type == kTagTypeTrue || type == kTagTypeFalse; }
bool isData() { return type == kTagTypeData; }
bool isDate() { return type == kTagTypeDate; }
bool isArray() { return type == kTagTypeArray; }
TagStruct* nextTagValue()
{
return _nextTag;
}
void setNextTagValue(TagStruct* nextTag)
{
if ( nextTag == NULL ) panic("TagStruct::setDictNextTagValue() : nextTag == NULL ");
if ( _nextTag != NULL ) panic("TagStruct::setDictNextTagValue() : _nextTag != NULL ");
_nextTag = nextTag;
}
const XString8 getTypeAsXString8() {
if ( isDict() ) return "Dict"_XS8;
if ( isKey() ) return "Dict"_XS8;
if ( isString() ) return "Dict"_XS8;
if ( isInt() ) return "Dict"_XS8;
if ( isFloat() ) return "Dict"_XS8;
if ( isBool() ) return "Dict"_XS8;
if ( isData() ) return "Dict"_XS8;
if ( isDate() ) return "Dict"_XS8;
if ( isArray() ) return "Dict"_XS8;
panic("Unknown type %lld : this is bug", type);
}
// getter and setter
UINT8* dataValue()
{
if ( !isData() ) panic("TagStruct::dataValue() : !isData() ");
return _data;
}
const XString8& dataStringValue()
{
if ( !isData() ) panic("TagStruct::dataStringValue() : !isData() ");
return _string;
}
UINTN dataLenValue()
{
if ( !isData() ) panic("TagStruct::dataLenValue() : !isData() ");
return _dataLen;
}
void setDataValue(UINT8* data, UINTN dataLen)
{
if ( data == NULL ) panic("TagStruct::setDictValue() : _data == NULL ");
_data = data;
_dataLen = dataLen;
type = kTagTypeData;
}
const XString8& dateValue()
{
if ( !isDict() ) panic("TagStruct::dictValue() : !isDict() ");
return _string;
}
void setDateValue(const XString8& xstring)
{
if ( xstring.isEmpty() ) panic("TagStruct::setDateValue() : xstring.isEmpty() ");
type = kTagTypeDate;
_string = xstring;
}
TagStruct* dictTagValue()
{
if ( !isDict() ) panic("TagStruct::dictValue() : !isDict() ");
return _tag;
}
void setDictTagValue(TagStruct* tagList)
{
if ( tagList == NULL ) panic("TagStruct::setDictValue() : tagList == NULL ");
if ( _tag != NULL ) panic("TagStruct::setDictValue() : _tag != NULL ");
if ( _nextTag != NULL ) panic("TagStruct::setDictValue() : _nextTag != NULL ");
_tag = tagList;
_nextTag = NULL;
type = kTagTypeDict;
}
TagStruct* arrayTagValue()
{
if ( !isArray() ) panic("TagStruct::arrayValue() : !isArray() ");
return _tag;
}
void setArrayTagValue(TagStruct* tag)
{
// Array value with tagList = NULL is allowed
//if ( tag == NULL ) panic("TagStruct::setArrayValue() : tag == NULL ");
if ( _tag != NULL ) panic("TagStruct::setArrayValue() : _tag != NULL ");
if ( _nextTag != NULL ) panic("TagStruct::setArrayTagValue() : _nextTag != NULL ");
_tag = tag;
type = kTagTypeArray;
}
XString8& keyValue()
{
if ( !isKey() ) panic("TagStruct::keyValue() : !isKey() ");
return _string;
}
TagStruct* keyTagValue()
{
if ( !isKey() ) panic("TagStruct::keyTagValue() : !isKey() ");
return _tag;
}
void setKeyValue(const XString8& xstring, TagStruct* subTag)
{
if ( xstring.isEmpty() ) panic("TagStruct::setKeyValue() : xstring.isEmpty() ");
type = kTagTypeKey;
_string = xstring;
_tag = subTag;
}
const XString8& stringValue()
{
if ( !isString() ) panic("TagStruct::stringValue() : !isString() ");
return _string;
}
void setStringValue(const XString8& xstring)
{
// empty string is allowed
//if ( xstring.isEmpty() ) panic("TagStruct::setStringValue() : xstring.isEmpty() ");
type = kTagTypeString;
_string = xstring;
}
INTN intValue()
{
if ( !isInt() ) panic("TagStruct::intValue() : !isInt() ");
return _intValue;
}
void setIntValue(INTN i)
{
type = kTagTypeInteger;
_intValue = i;
}
float floatValue()
{
if ( !isFloat() ) panic("TagStruct::floatValue() : !isFloat() ");
return _floatValue;
}
void setFloatValue(float f)
{
type = kTagTypeFloat;
_floatValue = f;
}
INTN boolValue()
{
if ( !isBool() ) panic("TagStruct::boolValue() : !isBool() ");
return type == kTagTypeTrue;
}
void setBoolValue(bool b)
{
if ( b ) type = kTagTypeTrue;
else type = kTagTypeFalse;
}
// Convenience method
bool isTrue()
{
if ( isBool() ) return boolValue();
return false;
}
bool isFalse()
{
if ( isBool() ) return !boolValue();
return false;
}
bool isTrueOrYy()
{
if ( isBool() ) return boolValue();
if ( isString() && stringValue().notEmpty() && (stringValue()[0] == 'y' || stringValue()[0] == 'Y') ) return true;
return false;
}
bool isTrueOrYes()
{
if ( isBool() ) return boolValue();
if ( isString() && stringValue().equal("Yes"_XS8) ) return true;
return false;
}
bool isFalseOrNn()
{
if ( isBool() ) return !boolValue();
if ( isString() && stringValue().notEmpty() && (stringValue()[0] == 'n' || stringValue()[0] == 'N') ) return true;
return false;
}
TagStruct* dictOrArrayTagValue()
{
if ( isDict() ) return dictTagValue();
if ( isArray() ) return arrayTagValue();
panic("TagStruct::dictOrArrayTagValue() : !isDict() && isArray() ");
}
};
typedef TagStruct* TagPtr;

View File

@ -1118,7 +1118,7 @@ VOID PatchTableType11()
// AsciiStrnCatS(OEMString, MAX_OEM_STRING, gSettings.BoardNumber, iStrLen(gSettings.BoardNumber, 64));
// snprintf(TempRev, MAX_OEM_STRING, "\n⌘ Powered by %s\n", gRevisionStr);
// AsciiStrCatS(OEMString, MAX_OEM_STRING, TempRev);
XString8 OEMString = S8Printf("Apple ROM Version.\n Board-ID : %s\r\n⌘ Powered by %s\r\n", gSettings.BoardNumber.c_str(), gRevisionStr);
XString8 OEMString = S8Printf("Apple ROM Version.\nBoard-ID : %s\n⌘ Powered by %s\n", gSettings.BoardNumber.c_str(), gRevisionStr);
UpdateSmbiosString(newSmbiosTable, &newSmbiosTable.Type11->StringCount, OEMString);

View File

@ -52,7 +52,7 @@ class XString8 : public XStringAbstract<char, XString8>
using XStringAbstract<char, XString8>::operator =;
const char* c_str() const { return m_data; }
char* copy_str() const { return (char*)AllocateCopyPool(length()+1, m_data); }
// char* copy_str() const { return (char*)AllocateCopyPool(length()+1, m_data); }
protected:
static void transmitS8Printf(const char* buf, unsigned int nbchar, void* context)

View File

@ -1004,7 +1004,7 @@ public:
p = m_data + ( p - previousData );
previousData = m_data;
}
sizeLeft -= p-previousP;
sizeLeft -= uintptr_t(p-previousP);
memmove(p+replaceBySize, p+searchSize, (sizeLeft - searchSize + 1)*sizeof(T));
// memmove(m_data+pos+replaceBySize-searchSize, m_data+pos, (currentSize - pos + 1)*sizeof(T));
utf_stringnn_from_utf_string(p, replaceBySize, replaceBy.s());

View File

@ -1506,14 +1506,6 @@ XStringClass xstr2 = initia__String.basename();
// (void)xsw;
//}
class C
{
public:
typedef char char_t;
const char* data;
constexpr C() : data(0) { }
};
//constexpr LString8 g_xs1 = "foobar";
//constexpr LStringW g_xsw1 = L"foobar";
//XString g_xs2 = "foobar"_XS8;

View File

@ -366,8 +366,8 @@ EFI_STATUS XTheme::ParseSVGXTheme(CONST CHAR8* buffer)
NewFilm->SetIndex((UINTN)GetPropertyInteger(Dict2, 1)); //default=main screen
Dict2 = GetProperty(Dict3, "Path");
if (Dict2 != NULL && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty() ) {
NewFilm->Path.takeValueFrom(Dict2->string);
if (Dict2 != NULL && (Dict2->isString()) && Dict2->stringValue().notEmpty() ) {
NewFilm->Path.takeValueFrom(Dict2->stringValue());
}
Dict2 = GetProperty(Dict3, "Frames");
@ -377,19 +377,19 @@ EFI_STATUS XTheme::ParseSVGXTheme(CONST CHAR8* buffer)
NewFilm->FrameTime = (UINTN)GetPropertyInteger(Dict2, 50); //default will be 50ms
Dict2 = GetProperty(Dict3, "ScreenEdgeX");
if (Dict2 != NULL && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty() ) {
if (Dict2->string.equal("left")) {
if (Dict2 != NULL && (Dict2->isString()) && Dict2->stringValue().notEmpty() ) {
if (Dict2->stringValue().equal("left")) {
NewFilm->ScreenEdgeHorizontal = SCREEN_EDGE_LEFT;
} else if (Dict2->string.equal("right")) {
} else if (Dict2->stringValue().equal("right")) {
NewFilm->ScreenEdgeHorizontal = SCREEN_EDGE_RIGHT;
}
}
Dict2 = GetProperty(Dict3, "ScreenEdgeY");
if (Dict2 != NULL && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty() ) {
if (Dict2->string.equal("top")) {
if (Dict2 != NULL && (Dict2->isString()) && Dict2->stringValue().notEmpty() ) {
if (Dict2->stringValue().equal("top")) {
NewFilm->ScreenEdgeVertical = SCREEN_EDGE_TOP;
} else if (Dict2->string.equal("bottom")) {
} else if (Dict2->stringValue().equal("bottom")) {
NewFilm->ScreenEdgeVertical = SCREEN_EDGE_BOTTOM;
}
}

View File

@ -1955,9 +1955,7 @@ RefitMain (IN EFI_HANDLE ImageHandle,
if (gConfigDict[1]) {
UniteTag = GetProperty(gConfigDict[1], "Unite");
if(UniteTag) {
UniteConfigs = (UniteTag->type == kTagTypeTrue) ||
((UniteTag->type == kTagTypeString) &&
((UniteTag->string[0] == 'y') || (UniteTag->string[0] == 'Y')));
UniteConfigs = UniteTag->isTrueOrYy();
DBG("UniteConfigs = %ls", UniteConfigs ? L"TRUE\n": L"FALSE\n" );
}
}