Reactivate warnings.
Clean warnings reactivated. Clean build flags in the 4 configurations to make RELEASE_XCODE8 works in QEMU.
This commit is contained in:
parent
d4e748b87c
commit
95be95c531
|
@ -1980,7 +1980,7 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_N
|
|||
|
||||
DEFINE GCC_ALL_CC_FLAGS = -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common
|
||||
DEFINE GCC_IA32_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe
|
||||
DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe
|
||||
DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -mno-stack-arg-probe
|
||||
DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie
|
||||
DEFINE GCC_ARM_CC_XIPFLAGS = -mno-unaligned-access
|
||||
DEFINE GCC_AARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie -ffixed-x18
|
||||
|
@ -2008,10 +2008,10 @@ DEFINE GCC_X64_RC_FLAGS = -I binary -O elf64-x86-64 -B i386 --re
|
|||
DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm --rename-section .data=.hii
|
||||
DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii
|
||||
|
||||
DEFINE GCC48_ALL_CC_FLAGS = -fshort-wchar -fno-builtin -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -nostdinc -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -DNO_MSABI_VA_FUNCS -fno-strict-aliasing
|
||||
DEFINE GCC48_ALL_CC_FLAGS = -fshort-wchar -fno-builtin -Wall -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -nostdinc -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -DNO_MSABI_VA_FUNCS -fno-strict-aliasing
|
||||
DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20
|
||||
DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address
|
||||
DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector -mabi=ms "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables
|
||||
DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector -mabi=ms "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -mcmodel=small -fpie -fno-asynchronous-unwind-tables
|
||||
DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
|
||||
DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive
|
||||
DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON)
|
||||
|
@ -2032,8 +2032,8 @@ DEFINE GCC48_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_ASLDLINK_FLAGS) -Wl,--oformat
|
|||
DEFINE GCC48_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_ASLDLINK_FLAGS)
|
||||
DEFINE GCC48_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
|
||||
|
||||
DEFINE GCC49_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Wno-unused-const-variable
|
||||
DEFINE GCC49_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Wno-unused-const-variable
|
||||
DEFINE GCC49_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -fno-pic -fno-pie
|
||||
DEFINE GCC49_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS)
|
||||
DEFINE GCC49_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x40
|
||||
DEFINE GCC49_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0 DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
|
||||
DEFINE GCC49_IA32_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive
|
||||
|
@ -2079,7 +2079,7 @@ DEFINE GCC5_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS)
|
|||
DEFINE GCC5_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS) -fno-lto
|
||||
|
||||
DEFINE GCC53_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS)
|
||||
DEFINE GCC53_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Wno-unused-but-set-variable -fno-unwind-tables -Wno-incompatible-ms-struct -mms-bitfields -fno-ms-extensions -Wno-unused-parameter
|
||||
DEFINE GCC53_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -fno-unwind-tables -Wno-incompatible-ms-struct -mms-bitfields -fno-ms-extensions -ffreestanding -nostdinc
|
||||
DEFINE GCC53_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections,-z,common-page-size=0x40,--defsym=PECOFF_HEADER_SIZE=0x240,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds
|
||||
|
||||
DEFINE GCC53_IA32_X64_ASLDLINK_FLAGS = DEF(GCC53_IA32_X64_DLINK_COMMON),--entry,ReferenceAcpiTable,-u,ReferenceAcpiTable
|
||||
|
@ -2416,9 +2416,9 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
|
|||
|
||||
#Jief removed lto flag. It is set in CLover.dsc, from the env var 'DISABLE_LTO'
|
||||
DEBUG_GCC53_X64_CC_FLAGS = DEF(GCC53_X64_CC_FLAGS) -g3 -O0
|
||||
RELEASE_GCC53_X64_CC_FLAGS = DEF(GCC53_X64_CC_FLAGS) -Os
|
||||
RELEASE_GCC53_X64_CC_FLAGS = DEF(GCC53_X64_CC_FLAGS) -Os -Werror
|
||||
DEBUG_GCC53_X64_CXX_FLAGS = DEF(GCC53_X64_CC_FLAGS) -g3 -O0
|
||||
RELEASE_GCC53_X64_CXX_FLAGS = DEF(GCC53_X64_CC_FLAGS) -Os
|
||||
RELEASE_GCC53_X64_CXX_FLAGS = DEF(GCC53_X64_CC_FLAGS) -Os -Werror
|
||||
|
||||
#
|
||||
#
|
||||
|
@ -2572,7 +2572,7 @@ RELEASE_XCODE8_*_MTOC_FLAGS = -align 0x20
|
|||
DEBUGMACOS_XCODE8_X64_DLINK_FLAGS = -arch x86_64 -nostdlib -Wl,-u,_$(IMAGE_ENTRY_POINT),-e,_$(IMAGE_ENTRY_POINT),-preload,-segalign,0x20,-pie,-all_load,-dead_strip,-seg1addr,0x260,-map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
|
||||
RELEASE_XCODE8_X64_DLINK_FLAGS = -arch x86_64 -nostdlib -Wl,-u,_$(IMAGE_ENTRY_POINT),-e,_$(IMAGE_ENTRY_POINT),-preload,-segalign,0x20,-pie,-all_load,-dead_strip,-seg1addr,0x260,-map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
|
||||
|
||||
*_XCODE8_X64_SLINK_FLAGS = -static -o
|
||||
*_XCODE8_X64_SLINK_FLAGS = -static -no_warning_for_no_symbols -o
|
||||
|
||||
DEBUG_XCODE8_X64_ASM_FLAGS = -c -x assembler -arch x86_64 -g
|
||||
DEBUGMACOS_XCODE8_X64_ASM_FLAGS = -c -x assembler -arch x86_64 -g
|
||||
|
@ -2587,7 +2587,7 @@ RELEASE_XCODE8_*_MTOC_FLAGS = -align 0x20
|
|||
# -Wno-varargs
|
||||
# -Wno-unused-const-variable
|
||||
|
||||
DEFINE XCODE8_COMMON_FLAGS = -c -Wall -Wextra -include AutoGen.h -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mms-bitfields -Wno-unused-parameter -Wno-sign-compare -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -DNO_MSABI_VA_FUNCS -mno-red-zone -fno-common -fdata-sections -ffreestanding -ffunction-sections -fno-asynchronous-unwind-tables -m64 -mabi=ms -mcmodel=small
|
||||
DEFINE XCODE8_COMMON_FLAGS = -nostdinc -target x86_64-pc-win32-macho -c -Wall -Wextra -include AutoGen.h -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mms-bitfields -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -mno-red-zone -fno-common -fdata-sections -ffreestanding -ffunction-sections -fno-asynchronous-unwind-tables -m64 -mabi=ms -mcmodel=small -DNO_MSABI_VA_FUNCS "-DEFIAPI=__attribute__((ms_abi))" -fno-strict-aliasing -Wno-unused-parameter
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
//
|
||||
|
||||
#undef UINT8_MAX
|
||||
typedef INT16 NODE;
|
||||
typedef UINT16 NODE;
|
||||
#define UINT8_MAX 0xff
|
||||
#define UINT8_BIT 8
|
||||
#define THRESHOLD 3
|
||||
|
|
|
@ -597,6 +597,7 @@ ProcessModuleUnloadList (
|
|||
IN EFI_HANDLE ImageHandle
|
||||
)
|
||||
{
|
||||
(void)ImageHandle;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
"""),
|
||||
|
@ -738,6 +739,8 @@ ProcessLibrary${Type}List (
|
|||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
(void)ImageHandle;
|
||||
(void)SystemTable;
|
||||
${BEGIN} EFI_STATUS Status;
|
||||
${FunctionCall}${END}
|
||||
}
|
||||
|
|
|
@ -969,8 +969,8 @@ DEFINE JIEF_DEBUG_FLAG = -DJIEF_DEBUG
|
|||
|
||||
DEFINE BUILD_OPTIONS=-DIS_UEFI_MODULE -DMDEPKG_NDEBUG -DCLOVER_BUILD $(VBIOS_PATCH_CLOVEREFI_FLAG) $(ONLY_SATA_0_FLAG) $(BLOCKIO_FLAG) $(NOUSB_FLAG) $(NOUDMA_FLAG) $(AMD_FLAG) $(SECURE_BOOT_FLAG) $(ANDX86_FLAG) $(PS2MOUSE_LEGACYBOOT_FLAG) $(DEBUG_ON_SERIAL_PORT_FLAG) $(EXIT_USBKB_FLAG) $(LTO_FLAG) $(JIEF_DEBUG_FLAG) -DDISABLE_NEW_DEPRECATED_INTERFACES -DOC_TARGET_DEBUG
|
||||
|
||||
XCODE:DEBUG_*_*_CC_FLAGS = -target x86_64-pc-win32-macho
|
||||
XCODE:DEBUG_*_*_CXX_FLAGS = -target x86_64-pc-win32-macho
|
||||
XCODE:DEBUG_*_*_CC_FLAGS =
|
||||
XCODE:DEBUG_*_*_CXX_FLAGS =
|
||||
|
||||
#MSFT:*_*_*_CC_FLAGS = /FAcs /FR$(@R).SBR /wd4701 /wd4703 $(BUILD_OPTIONS)
|
||||
MSFT:*_*_*_CC_FLAGS = /FAcs $(BUILD_OPTIONS) -Dinline=__inline /Zi -DDISABLE_NEW_DEPRECATED_INTERFACES -DOC_TARGET_DEBUG
|
||||
|
|
|
@ -150,7 +150,7 @@ LegacyBiosInt86 (
|
|||
IN IA32_REGISTER_SET *Regs
|
||||
)
|
||||
{
|
||||
UINTN Status;
|
||||
// UINTN Status;
|
||||
UINTN Eflags;
|
||||
IA32_REGISTER_SET ThunkRegSet;
|
||||
BOOLEAN Ret;
|
||||
|
@ -188,7 +188,7 @@ LegacyBiosInt86 (
|
|||
//
|
||||
// Set Legacy16 state. 0x08, 0x70 is legacy 8259 vector bases.
|
||||
//
|
||||
Status = BiosDev->Legacy8259->SetMode (BiosDev->Legacy8259, Efi8259LegacyMode, NULL, NULL);
|
||||
/*Status =*/ BiosDev->Legacy8259->SetMode (BiosDev->Legacy8259, Efi8259LegacyMode, NULL, NULL);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
Stack16 = (UINT16 *)((UINT8 *) BiosDev->ThunkContext->RealModeBuffer + BiosDev->ThunkContext->RealModeBufferSize - sizeof (UINT16));
|
||||
|
@ -204,7 +204,7 @@ LegacyBiosInt86 (
|
|||
//
|
||||
// Restore protected mode interrupt state
|
||||
//
|
||||
Status = BiosDev->Legacy8259->SetMode (BiosDev->Legacy8259, Efi8259ProtectedMode, NULL, NULL);
|
||||
/*Status =*/ BiosDev->Legacy8259->SetMode (BiosDev->Legacy8259, Efi8259ProtectedMode, NULL, NULL);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
|
|
|
@ -150,7 +150,7 @@ LegacyBiosInt86 (
|
|||
IN IA32_REGISTER_SET *Regs
|
||||
)
|
||||
{
|
||||
UINTN Status;
|
||||
// UINTN Status;
|
||||
UINTN Eflags;
|
||||
IA32_REGISTER_SET ThunkRegSet;
|
||||
BOOLEAN Ret;
|
||||
|
@ -188,7 +188,7 @@ LegacyBiosInt86 (
|
|||
//
|
||||
// Set Legacy16 state. 0x08, 0x70 is legacy 8259 vector bases.
|
||||
//
|
||||
Status = BiosDev->Legacy8259->SetMode (BiosDev->Legacy8259, Efi8259LegacyMode, NULL, NULL);
|
||||
/*Status =*/ BiosDev->Legacy8259->SetMode (BiosDev->Legacy8259, Efi8259LegacyMode, NULL, NULL);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
Stack16 = (UINT16 *)((UINT8 *) BiosDev->ThunkContext->RealModeBuffer + BiosDev->ThunkContext->RealModeBufferSize - sizeof (UINT16));
|
||||
|
@ -204,7 +204,7 @@ LegacyBiosInt86 (
|
|||
//
|
||||
// Restore protected mode interrupt state
|
||||
//
|
||||
Status = BiosDev->Legacy8259->SetMode (BiosDev->Legacy8259, Efi8259ProtectedMode, NULL, NULL);
|
||||
/*Status =*/ BiosDev->Legacy8259->SetMode (BiosDev->Legacy8259, Efi8259ProtectedMode, NULL, NULL);
|
||||
// ASSERT_EFI_ERROR(Status);
|
||||
|
||||
//
|
||||
|
|
|
@ -47,7 +47,7 @@ OrderLegacyBootOption4SameType (
|
|||
UINTN *DisBootOptionCount
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
// EFI_STATUS Status;
|
||||
UINT16 *NewBootOption;
|
||||
UINT16 *BootOrder;
|
||||
UINTN BootOrderSize;
|
||||
|
@ -142,7 +142,7 @@ OrderLegacyBootOption4SameType (
|
|||
// Overwrite the old BootOption
|
||||
//
|
||||
CopyMem(&BootOrder[StartPosition], NewBootOption, (*DisBootOptionCount + *EnBootOptionCount) * sizeof (UINT16));
|
||||
Status = gRT->SetVariable (
|
||||
/*Status =*/ gRT->SetVariable (
|
||||
L"BootOrder",
|
||||
&gEfiGlobalVariableGuid,
|
||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
|
||||
[Includes]
|
||||
Include
|
||||
Library/OpensslLib/Include
|
||||
Library/OpensslLib/openssl-$(OPENSSL_VERSION)/include
|
||||
#Library/OpensslLib/Include
|
||||
#Library/OpensslLib/openssl-$(OPENSSL_VERSION)/include
|
||||
|
||||
[LibraryClasses]
|
||||
## @libraryclass Provides MsgLog service
|
||||
|
|
|
@ -655,13 +655,13 @@ OhciBulkTransfer(
|
|||
USB_OHCI_HC_DEV *Ohc;
|
||||
ED_DESCRIPTOR *HeadEd;
|
||||
ED_DESCRIPTOR *Ed;
|
||||
UINT8 EdDir;
|
||||
// UINT8 EdDir;
|
||||
UINT32 DataPidDir;
|
||||
TD_DESCRIPTOR *HeadTd;
|
||||
TD_DESCRIPTOR *DataTd;
|
||||
TD_DESCRIPTOR *EmptyTd;
|
||||
EFI_STATUS Status;
|
||||
EFI_USB_DATA_DIRECTION TransferDirection;
|
||||
// EFI_USB_DATA_DIRECTION TransferDirection;
|
||||
UINT8 EndPointNum;
|
||||
UINTN TimeCount;
|
||||
OHCI_ED_RESULT EdResult;
|
||||
|
@ -690,13 +690,13 @@ OhciBulkTransfer(
|
|||
Ohc = USB_OHCI_HC_DEV_FROM_THIS (This);
|
||||
|
||||
if ((EndPointAddress & 0x80) != 0) {
|
||||
TransferDirection = EfiUsbDataIn;
|
||||
EdDir = ED_IN_DIR;
|
||||
// TransferDirection = EfiUsbDataIn;
|
||||
// EdDir = ED_IN_DIR;
|
||||
DataPidDir = TD_IN_PID;
|
||||
MapOp = EfiPciIoOperationBusMasterWrite;
|
||||
} else {
|
||||
TransferDirection = EfiUsbDataOut;
|
||||
EdDir = ED_OUT_DIR;
|
||||
// TransferDirection = EfiUsbDataOut;
|
||||
// EdDir = ED_OUT_DIR;
|
||||
DataPidDir = TD_OUT_PID;
|
||||
MapOp = EfiPciIoOperationBusMasterRead;
|
||||
}
|
||||
|
@ -959,7 +959,7 @@ OhciInterruptTransfer (
|
|||
EFI_STATUS Status;
|
||||
UINT8 EndPointNum;
|
||||
UINT32 DataPidDir;
|
||||
EFI_USB_DATA_DIRECTION TransferDirection;
|
||||
// EFI_USB_DATA_DIRECTION TransferDirection;
|
||||
INTERRUPT_CONTEXT_ENTRY *Entry;
|
||||
EFI_TPL OldTpl;
|
||||
BOOLEAN FirstTD;
|
||||
|
@ -977,11 +977,11 @@ OhciInterruptTransfer (
|
|||
}
|
||||
|
||||
if ((EndPointAddress & 0x80) != 0) {
|
||||
TransferDirection = EfiUsbDataIn;
|
||||
// TransferDirection = EfiUsbDataIn;
|
||||
EdDir = ED_IN_DIR;
|
||||
DataPidDir = TD_IN_PID;
|
||||
} else {
|
||||
TransferDirection = EfiUsbDataOut;
|
||||
// TransferDirection = EfiUsbDataOut;
|
||||
EdDir = ED_OUT_DIR;
|
||||
DataPidDir = TD_OUT_PID;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ PartitionInstallAppleChildHandles (
|
|||
{
|
||||
EFI_STATUS Status;
|
||||
UINT32 Lba;
|
||||
EFI_BLOCK_IO_MEDIA *Media;
|
||||
// EFI_BLOCK_IO_MEDIA *Media;
|
||||
VOID *Block;
|
||||
//UINTN MaxIndex;
|
||||
/** @todo: wrong, as this PT can be on both HDD or CD */
|
||||
|
@ -70,27 +70,27 @@ PartitionInstallAppleChildHandles (
|
|||
EFI_STATUS Found;
|
||||
UINT32 Partition;
|
||||
UINT32 PartitionEntries;
|
||||
UINT32 VolSpaceSize;
|
||||
// UINT32 VolSpaceSize;
|
||||
UINT32 SubBlockSize;
|
||||
UINT32 BlkPerSec;
|
||||
UINT32 MediaId;
|
||||
UINT32 BlockSize;
|
||||
EFI_LBA LastBlock;
|
||||
// EFI_LBA LastBlock;
|
||||
EFI_DISK_IO2_TOKEN DiskIo2Token;
|
||||
|
||||
Found = EFI_NOT_FOUND;
|
||||
VolSpaceSize = 0;
|
||||
// VolSpaceSize = 0;
|
||||
|
||||
if (BlockIo2 != NULL)
|
||||
{
|
||||
Media = BlockIo2->Media;
|
||||
// Media = BlockIo2->Media;
|
||||
BlockSize = BlockIo2->Media->BlockSize;
|
||||
LastBlock = BlockIo2->Media->LastBlock;
|
||||
// LastBlock = BlockIo2->Media->LastBlock;
|
||||
MediaId = BlockIo2->Media->MediaId;
|
||||
} else {
|
||||
Media = BlockIo->Media;
|
||||
// Media = BlockIo->Media;
|
||||
BlockSize = BlockIo->Media->BlockSize;
|
||||
LastBlock = BlockIo->Media->LastBlock;
|
||||
// LastBlock = BlockIo->Media->LastBlock;
|
||||
MediaId = BlockIo->Media->MediaId;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ Revision History
|
|||
// FAT entry values
|
||||
//
|
||||
#define FAT_CLUSTER_SPECIAL_EXT (-1 & (~0xF))
|
||||
#define FAT_CLUSTER_SPECIAL ((FAT_CLUSTER_SPECIAL_EXT) | 0x07)
|
||||
#define FAT_CLUSTER_SPECIAL ((UINTN)((FAT_CLUSTER_SPECIAL_EXT) | 0x07))
|
||||
#define FAT_CLUSTER_FREE 0
|
||||
#define FAT_CLUSTER_RESERVED (FAT_CLUSTER_SPECIAL)
|
||||
#define FAT_CLUSTER_BAD (FAT_CLUSTER_SPECIAL)
|
||||
|
|
|
@ -51,7 +51,8 @@ CHAR16 *DriverNameString = L"efifs " WIDEN(STRINGIFY(FS_DRIVER_VERSION_MAJOR)) L
|
|||
EFI_GUID *
|
||||
GetFSGuid(VOID)
|
||||
{
|
||||
INTN i, j, k, Len = StrLen(WIDEN(STRINGIFY(DRIVERNAME)));
|
||||
INTN i, k, Len = StrLen(WIDEN(STRINGIFY(DRIVERNAME)));
|
||||
UINTN j;
|
||||
static EFI_GUID Guid = { 0xEF1F5EF1, 0xF17E, 0x5857, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } };
|
||||
CHAR16 *FsName = WIDEN(STRINGIFY(DRIVERNAME));
|
||||
const CHAR16 *PlusName = L"plus";
|
||||
|
|
|
@ -413,8 +413,11 @@ GrubRead(EFI_GRUB_FILE *File, VOID *Data, UINTN *Len)
|
|||
/* GRUB may return an error if we request more data than available */
|
||||
Remaining = f->size - f->offset;
|
||||
|
||||
if (*Len > Remaining)
|
||||
*Len = Remaining;
|
||||
if ( Remaining < 0 ) {
|
||||
*Len = 0;
|
||||
}else if (*Len > (UINTN)Remaining) {
|
||||
*Len = Remaining;
|
||||
}
|
||||
|
||||
len = p->read(f, (char *) Data, *Len);
|
||||
|
||||
|
|
|
@ -570,11 +570,11 @@ fsw_hfs_btree_search (struct fsw_hfs_btree *btree,
|
|||
|
||||
for (;;) { //node cycle
|
||||
fsw_s32 cmp = 0;
|
||||
int match;
|
||||
// int match;
|
||||
fsw_u32 count;
|
||||
BTreeKey *currkey;
|
||||
|
||||
match = 0;
|
||||
// match = 0;
|
||||
/* Read a node */
|
||||
if ((fsw_u32)fsw_hfs_read_file(btree->file,
|
||||
MultU64x32(currnode, btree->node_size),
|
||||
|
|
|
@ -129,7 +129,7 @@ static fsw_status_t fsw_reiserfs_volume_mount(struct fsw_reiserfs_volume *vol)
|
|||
return FSW_UNSUPPORTED;
|
||||
|
||||
// check the superblock
|
||||
if (vol->sb->s_v1.s_root_block == -1) // unfinished 'reiserfsck --rebuild-tree'
|
||||
if (vol->sb->s_v1.s_root_block == (__le32)-1) // unfinished 'reiserfsck --rebuild-tree'
|
||||
return FSW_VOLUME_CORRUPTED;
|
||||
|
||||
/*
|
||||
|
|
|
@ -7,8 +7,18 @@
|
|||
#ifndef __PRINTF_LITE_CONF_H__
|
||||
#define __PRINTF_LITE_CONF_H__
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h> // for size_t
|
||||
//#include <stdarg.h>
|
||||
//#include <stddef.h> // for size_t
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <Base.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
#ifdef _MSC_VER
|
||||
|
@ -20,6 +30,18 @@
|
|||
#define PRIu32 d
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
// VS define size_t
|
||||
|
||||
#else
|
||||
|
||||
// 2020-03 : On Gcc 9.2 and Clang (Apple LLVM version 10.0.0), size_t is not builtin, but __SIZE_TYPE__ is
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
//typedef long int ssize_t; // no __SSIZE_TYPE__. We don't use ssize_t in CLover. Let's try to keep it that way.
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define __attribute__(x)
|
||||
|
@ -38,6 +60,10 @@
|
|||
#define PRINTF_CFUNCTION_PREFIX
|
||||
#define PRINTF_CFUNCTION_SUFFIX f
|
||||
|
||||
#define PRINTF_VA_LIST VA_LIST
|
||||
#define PRINTF_VA_START VA_START
|
||||
#define PRINTF_VA_ARG VA_ARG
|
||||
#define PRINTF_VA_END VA_END
|
||||
|
||||
|
||||
#endif // __PRINTF_LITE_CONF_H__
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
#ifndef __PRINTF_LITE_H__
|
||||
#define __PRINTF_LITE_H__
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h> // for size_t
|
||||
// Includes for platform are made in printf_lite-conf.h
|
||||
//#include <stdarg.h>
|
||||
//#include <stddef.h> // for size_t
|
||||
|
||||
#include <printf_lite-conf.h>
|
||||
|
||||
|
@ -170,16 +171,32 @@ typedef union {
|
|||
#endif
|
||||
} printf_callback_t;
|
||||
|
||||
|
||||
#ifndef PRINTF_VA_LIST
|
||||
#define PRINTF_VA_LIST va_list
|
||||
#endif
|
||||
#ifndef PRINTF_VA_START
|
||||
#define PRINTF_VA_START va_start
|
||||
#endif
|
||||
#ifndef PRINTF_VA_ARG
|
||||
#define PRINTF_VA_ARG va_arg
|
||||
#endif
|
||||
#ifndef PRINTF_VA_END
|
||||
#define PRINTF_VA_END VA_END
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// I need to pass a va_list by reference, NOT value, because va_list is "incremented" in printf_handle_format_char
|
||||
// On macOS, the builtin va_list type seems to already be a pointer
|
||||
#ifdef __APPLE__
|
||||
#define VALIST_PARAM_TYPE va_list
|
||||
#define VALIST_PARAM(valist) valist
|
||||
#define VALIST_ACCESS(valist) valist
|
||||
#define PRINTF_VALIST_PARAM_TYPE PRINTF_VA_LIST
|
||||
#define PRINTF_VALIST_PARAM(valist) valist
|
||||
#define PRINTF_VALIST_ACCESS(valist) valist
|
||||
#else
|
||||
#define VALIST_PARAM_TYPE va_list*
|
||||
#define VALIST_PARAM(valist) &valist
|
||||
#define VALIST_ACCESS(valist) (*valist)
|
||||
#define PRINTF_VALIST_PARAM_TYPE PRINTF_VA_LIST*
|
||||
#define PRINTF_VALIST_PARAM(valist) &valist
|
||||
#define PRINTF_VALIST_ACCESS(valist) (*valist)
|
||||
#endif
|
||||
|
||||
//void printf_handle_format_char(char c, VALIST_PARAM_TYPE valist, PrintfParams* printfParams);
|
||||
|
@ -190,37 +207,37 @@ typedef union {
|
|||
// I tried to inline this in printf_lite.h, but GCC seems to not accept that an inline function could call another inline function.
|
||||
#if PRINTF_LITE_TIMESTAMP_SUPPORT == 1
|
||||
# if PRINTF_EMIT_CR_SUPPORT == 1
|
||||
void vprintf_with_callback_timestamp_emitcr(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp, int emitCr); // emitCr is a boolean flag
|
||||
void vprintf_with_callback_timestamp(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp);
|
||||
// inline void vprintf_with_callback_timestamp(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp) {
|
||||
void vprintf_with_callback_timestamp_emitcr(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp, int emitCr); // emitCr is a boolean flag
|
||||
void vprintf_with_callback_timestamp(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp);
|
||||
// inline void vprintf_with_callback_timestamp(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp) {
|
||||
// vprintf_with_callback_timestamp_emitcr(format, valist, transmitBufCallBack, context, newline, timestamp, 0);
|
||||
// }
|
||||
void vprintf_with_callback_emitcr(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context, int emitCr);
|
||||
// inline void vprintf_with_callback_emitcr(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context, int emitCr) {
|
||||
void vprintf_with_callback_emitcr(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context, int emitCr);
|
||||
// inline void vprintf_with_callback_emitcr(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context, int emitCr) {
|
||||
// vprintf_with_callback_timestamp_emitcr(format, valist, transmitBufCallBack, context, NULL, 0, emitCr);
|
||||
// }
|
||||
void vprintf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context);
|
||||
// inline void vprintf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context) {
|
||||
void vprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context);
|
||||
// inline void vprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context) {
|
||||
// vprintf_with_callback_timestamp_emitcr(format, valist, transmitBufCallBack, context, NULL, 0, 0);
|
||||
// }
|
||||
# else
|
||||
# if PRINTF_UTF8_OUTPUT_SUPPORT == 1
|
||||
void vprintf_with_callback_timestamp(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp);
|
||||
void vprintf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context);
|
||||
void vprintf_with_callback_timestamp(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp);
|
||||
void vprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context);
|
||||
# endif
|
||||
// inline void vprintf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context) {
|
||||
// inline void vprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context) {
|
||||
// vprintf_with_callback_timestamp(format, valist, transmitBufCallBack, context, NULL, 0);
|
||||
// }
|
||||
# endif
|
||||
#else
|
||||
# if PRINTF_EMIT_CR_SUPPORT == 1
|
||||
void vprintf_with_callback_emitcr(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context, int emitCr);
|
||||
void vprintf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context);
|
||||
// inline void vprintf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context) {
|
||||
void vprintf_with_callback_emitcr(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context, int emitCr);
|
||||
void vprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context);
|
||||
// inline void vprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context) {
|
||||
// vprintf_with_callback_emitcr(format, valist, transmitBufCallBack, context, 0);
|
||||
// }
|
||||
# else
|
||||
void vprintf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context);
|
||||
void vprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -229,31 +246,31 @@ typedef union {
|
|||
# if PRINTF_EMIT_CR_SUPPORT == 1
|
||||
void printf_with_callback_timestamp_emitcr(const char* format, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp, int emitCr, ...);
|
||||
inline void printf_with_callback_timestamp(const char* format, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp, ...) {
|
||||
va_list va;
|
||||
va_start(va, timestamp);
|
||||
PRINTF_VA_LIST va;
|
||||
PRINTF_VA_START(va, timestamp);
|
||||
vprintf_with_callback_timestamp(format, va, transmitBufCallBack, context, newline, timestamp);
|
||||
va_end(va);
|
||||
PRINTF_VA_END(va);
|
||||
}
|
||||
inline void printf_with_callback__emitcr(const char* format, transmitBufCallBackType transmitBufCallBack, void* context, int emitCr, ...) {
|
||||
va_list va;
|
||||
va_start(va, emitCr);
|
||||
PRINTF_VA_LIST va;
|
||||
PRINTF_VA_START(va, emitCr);
|
||||
vprintf_with_callback_emitcr(format, va, transmitBufCallBack, context, emitCr);
|
||||
va_end(va);
|
||||
PRINTF_VA_END(va);
|
||||
}
|
||||
inline void printf_with_callback(const char* format, transmitBufCallBackType transmitBufCallBack, void* context, ...) {
|
||||
va_list va;
|
||||
va_start(va, context);
|
||||
PRINTF_VA_LIST va;
|
||||
PRINTF_VA_START(va, context);
|
||||
vprintf_with_callback(format, va, transmitBufCallBack, context);
|
||||
va_end(va);
|
||||
PRINTF_VA_END(va);
|
||||
}
|
||||
# else
|
||||
# if PRINTF_UTF8_OUTPUT_SUPPORT == 1
|
||||
void printf_with_callback_timestamp(const char* format, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp, ...);
|
||||
inline void printf_with_callback(const char* format, transmitBufCallBackType transmitBufCallBack, void* context, ...) {
|
||||
va_list va;
|
||||
PRINTF_VA_LIST va;
|
||||
va_start(va, context);
|
||||
vprintf_with_callback_timestamp(format, va, transmitBufCallBack, context, NULL, 0);
|
||||
va_end(va);
|
||||
vprintf_with_callback_timestamp(foPRINTF_VA_ENDva, transmitBufCallBack, context, NULL, 0);
|
||||
PRINTF_VA_END(va);
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
@ -268,23 +285,23 @@ typedef union {
|
|||
|
||||
|
||||
#if PRINTF_LITE_TIMESTAMP_SUPPORT == 1
|
||||
void vwprintf_with_callback_timestamp(const char* format, va_list valist, transmitWBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp);
|
||||
inline void vwprintf_with_callback(const char* format, va_list valist, transmitWBufCallBackType transmitWBufCallBack, void* context) {
|
||||
void vwprintf_with_callback_timestamp(const char* format, PRINTF_VA_LIST valist, transmitWBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp);
|
||||
inline void vwprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitWBufCallBackType transmitWBufCallBack, void* context) {
|
||||
vwprintf_with_callback_timestamp(format, valist, transmitWBufCallBack, context, NULL, 0);
|
||||
}
|
||||
#else
|
||||
void vwprintf_with_callback(const char* format, va_list valist, transmitWBufCallBackType transmitWBufCallBack, void* context);
|
||||
void vwprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitWBufCallBackType transmitWBufCallBack, void* context);
|
||||
#endif
|
||||
|
||||
#if PRINTF_LITE_SNPRINTF_SUPPORT == 1
|
||||
#if PRINTF_UTF8_OUTPUT_SUPPORT == 1
|
||||
int (PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, vsnprint, PRINTF_CFUNCTION_SUFFIX))(char*, size_t, const char *__restrict, va_list valist);
|
||||
int (PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, vsnprint, PRINTF_CFUNCTION_SUFFIX))(char*, size_t, const char *__restrict, PRINTF_VA_LIST valist);
|
||||
// gcc-4.9.2-atmel3.5.4-arduino2 report snprintf to undefined. Change the name and it'll work. Strange isn't it ?
|
||||
int (PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, snprint, PRINTF_CFUNCTION_SUFFIX))(char*, size_t len, const char *__restrict format, ...) __attribute__((__format__ (__printf__, 3, 4)));
|
||||
#endif
|
||||
#if PRINTF_UNICODE_OUTPUT_SUPPORT == 1
|
||||
// ATTENTION : len is the number of wchar_t, NOT the number of bytes.
|
||||
int PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, vsnwprint, PRINTF_CFUNCTION_SUFFIX)(wchar_t*, size_t len, const char *__restrict, va_list valist);
|
||||
int PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, vsnwprint, PRINTF_CFUNCTION_SUFFIX)(wchar_t*, size_t len, const char *__restrict, PRINTF_VA_LIST valist);
|
||||
int PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, snwprint, PRINTF_CFUNCTION_SUFFIX)(wchar_t*, size_t len, const char *__restrict format, ...) __attribute__((__format__ (__printf__, 3, 4)));
|
||||
#endif
|
||||
|
||||
|
@ -296,17 +313,17 @@ void vwprintf_with_callback(const char* format, va_list valist, transmitWBufCall
|
|||
#endif
|
||||
|
||||
//#if defined(__cplusplus) && PRINTF_LITE_TIMESTAMP_SUPPORT == 1
|
||||
// void vprintf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context){
|
||||
// void vprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context){
|
||||
// vprintf_with_callback(format, valist, transmitBufCallBack, NULL, 0, context);
|
||||
// }
|
||||
//#endif
|
||||
//#if defined(__cplusplus) && PRINTF_LITE_TIMESTAMP_SUPPORT == 1
|
||||
// void printf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context){
|
||||
// void printf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context){
|
||||
// printf_with_callback(format, valist, transmitBufCallBack, NULL, 0, context);
|
||||
// }
|
||||
//#endif
|
||||
//#if defined(__cplusplus) && PRINTF_UNICODE_OUTPUT_SUPPORT == 1 && PRINTF_LITE_TIMESTAMP_SUPPORT == 1
|
||||
// void vwprintf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context){
|
||||
// void vwprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context){
|
||||
// vwprintf_with_callback(format, valist, transmitBufCallBack, NULL, 0, context);
|
||||
// }
|
||||
//#endif
|
||||
|
|
|
@ -17,11 +17,12 @@
|
|||
|
||||
#include "printf_lite.h"
|
||||
|
||||
// Includes are platform dependant. They are made in printf_lite-conf.h
|
||||
//#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
//#include <stdarg.h>
|
||||
//#include <stdint.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
//#include <limits.h>
|
||||
//#include <stdlib.h>
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
@ -781,7 +782,7 @@ __attribute__((noinline, section(".printf_handle_format_char")))
|
|||
#elif DEFINE_SECTIONS == 2
|
||||
__attribute__((noinline, section(".printf_lite")))
|
||||
#endif
|
||||
void printf_handle_format_char(char c, VALIST_PARAM_TYPE valist, PrintfParams* printfParams)
|
||||
void printf_handle_format_char(char c, PRINTF_VALIST_PARAM_TYPE valist, PrintfParams* printfParams)
|
||||
{
|
||||
if ( printfParams->inDirective )
|
||||
{
|
||||
|
@ -900,30 +901,30 @@ void printf_handle_format_char(char c, VALIST_PARAM_TYPE valist, PrintfParams* p
|
|||
printfParams->uppercase = c == 'X';
|
||||
#if PRINTF_LITE_ZSPECIFIER_SUPPORT == 1
|
||||
if ( printfParams->z_modifier ) {
|
||||
print_ulonglong(va_arg(VALIST_ACCESS(valist), size_t), 16, printfParams, 0);
|
||||
print_ulonglong(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), size_t), 16, printfParams, 0);
|
||||
}else
|
||||
#endif
|
||||
#if PRINTF_LITE_LONGLONGINT_SUPPORT == 1 && PRINTF_LITE_LONGINT_SUPPORT == 1
|
||||
if ( printfParams->l_modifier > 11 ) {
|
||||
print_ulonglong(va_arg(VALIST_ACCESS(valist), unsigned long long int), 16, printfParams, 0);
|
||||
print_ulonglong(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), unsigned long long int), 16, printfParams, 0);
|
||||
}else
|
||||
#endif
|
||||
#if PRINTF_LITE_LONGINT_SUPPORT == 1
|
||||
if ( printfParams->l_modifier == 11 ) {
|
||||
print_ulonglong(va_arg(VALIST_ACCESS(valist), unsigned long int), 16, printfParams, 0);
|
||||
print_ulonglong(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), unsigned long int), 16, printfParams, 0);
|
||||
}else
|
||||
#endif
|
||||
#if PRINTF_LITE_SHORTINT_SUPPORT == 1
|
||||
if ( printfParams->l_modifier == 9 ) {
|
||||
print_ulonglong((unsigned short)va_arg(VALIST_ACCESS(valist), unsigned int), 16, printfParams, 0); // we are using longlong version for every int to save code size.
|
||||
print_ulonglong((unsigned short)PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), unsigned int), 16, printfParams, 0); // we are using longlong version for every int to save code size.
|
||||
}else
|
||||
#endif
|
||||
#if PRINTF_LITE_SHORTSHORTINT_SUPPORT == 1
|
||||
if ( printfParams->l_modifier < 9 ) {
|
||||
print_ulonglong((unsigned char)va_arg(VALIST_ACCESS(valist), unsigned int), 16, printfParams, 0); // we are using longlong version for every int to save code size.
|
||||
print_ulonglong((unsigned char)PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), unsigned int), 16, printfParams, 0); // we are using longlong version for every int to save code size.
|
||||
}else
|
||||
#endif
|
||||
print_ulonglong(va_arg(VALIST_ACCESS(valist), unsigned int), 16, printfParams, 0);
|
||||
print_ulonglong(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), unsigned int), 16, printfParams, 0);
|
||||
printfParams->inDirective = 0;
|
||||
break;
|
||||
#endif
|
||||
|
@ -933,28 +934,28 @@ void printf_handle_format_char(char c, VALIST_PARAM_TYPE valist, PrintfParams* p
|
|||
case 'u':
|
||||
#if PRINTF_LITE_USPECIFIER_SUPPORT == 1
|
||||
#if PRINTF_LITE_ZSPECIFIER_SUPPORT == 1
|
||||
if ( printfParams->z_modifier ) print_ulonglong(va_arg(VALIST_ACCESS(valist), size_t), 10, printfParams, 0);
|
||||
if ( printfParams->z_modifier ) print_ulonglong(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), size_t), 10, printfParams, 0);
|
||||
else
|
||||
#endif
|
||||
#if PRINTF_LITE_LONGLONGINT_SUPPORT == 1 && PRINTF_LITE_LONGINT_SUPPORT == 1
|
||||
if ( printfParams->l_modifier > 11 ) print_ulonglong(va_arg(VALIST_ACCESS(valist), unsigned long long int), 10, printfParams, 0);
|
||||
if ( printfParams->l_modifier > 11 ) print_ulonglong(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), unsigned long long int), 10, printfParams, 0);
|
||||
else
|
||||
#endif // PRINTF_LITE_LONGLONGINT_SUPPORT == 1 && PRINTF_LITE_LONGINT_SUPPORT == 1
|
||||
#if PRINTF_LITE_LONGINT_SUPPORT == 1
|
||||
if ( printfParams->l_modifier == 11 ) print_ulonglong(va_arg(VALIST_ACCESS(valist), unsigned long int), 10, printfParams, 0);
|
||||
if ( printfParams->l_modifier == 11 ) print_ulonglong(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), unsigned long int), 10, printfParams, 0);
|
||||
else
|
||||
#endif // PRINTF_LITE_LONGINT_SUPPORT == 1
|
||||
#if PRINTF_LITE_SHORTINT_SUPPORT == 1
|
||||
if ( printfParams->l_modifier == 9 ) {
|
||||
print_ulonglong((unsigned short)va_arg(VALIST_ACCESS(valist), unsigned int), 10, printfParams, 0); // we are using longlong version for every int to save code size.
|
||||
print_ulonglong((unsigned short)PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), unsigned int), 10, printfParams, 0); // we are using longlong version for every int to save code size.
|
||||
}else
|
||||
#endif
|
||||
#if PRINTF_LITE_SHORTSHORTINT_SUPPORT == 1
|
||||
if ( printfParams->l_modifier < 9 ) {
|
||||
print_ulonglong((unsigned char)va_arg(VALIST_ACCESS(valist), unsigned int), 10, printfParams, 0); // we are using longlong version for every int to save code size.
|
||||
print_ulonglong((unsigned char)PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), unsigned int), 10, printfParams, 0); // we are using longlong version for every int to save code size.
|
||||
}else
|
||||
#endif
|
||||
print_ulonglong(va_arg(VALIST_ACCESS(valist), unsigned int), 10, printfParams, 0);
|
||||
print_ulonglong(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), unsigned int), 10, printfParams, 0);
|
||||
printfParams->inDirective = 0;
|
||||
break;
|
||||
#endif // PRINTF_LITE_USPECIFIER_SUPPORT
|
||||
|
@ -962,37 +963,37 @@ void printf_handle_format_char(char c, VALIST_PARAM_TYPE valist, PrintfParams* p
|
|||
|
||||
case 'd':
|
||||
#if PRINTF_LITE_ZSPECIFIER_SUPPORT == 1
|
||||
if ( printfParams->z_modifier ) print_ulonglong((UINT_BIGGEST_TYPE)va_arg(VALIST_ACCESS(valist), size_t), (unsigned int)10, printfParams, 0); // we are using longlong version for every int to save code size.
|
||||
if ( printfParams->z_modifier ) print_ulonglong((UINT_BIGGEST_TYPE)PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), size_t), (unsigned int)10, printfParams, 0); // we are using longlong version for every int to save code size.
|
||||
else
|
||||
#endif
|
||||
#if PRINTF_LITE_LONGLONGINT_SUPPORT == 1 && PRINTF_LITE_LONGINT_SUPPORT == 1
|
||||
if ( printfParams->l_modifier > 11 ) print_longlong(va_arg(VALIST_ACCESS(valist), long long int), 10, printfParams); // we are using longlong version for every int to save code size.
|
||||
if ( printfParams->l_modifier > 11 ) print_longlong(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), long long int), 10, printfParams); // we are using longlong version for every int to save code size.
|
||||
else
|
||||
#endif
|
||||
#if PRINTF_LITE_LONGINT_SUPPORT == 1
|
||||
if ( printfParams->l_modifier == 11 ) print_longlong(va_arg(VALIST_ACCESS(valist), long int), 10, printfParams); // we are using longlong version for every int to save code size.
|
||||
if ( printfParams->l_modifier == 11 ) print_longlong(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), long int), 10, printfParams); // we are using longlong version for every int to save code size.
|
||||
else
|
||||
#endif
|
||||
// #if PRINTF_LITE_SHORTINT_SUPPORT == 1
|
||||
// if ( printfParams->l_modifier == 9 ) print_longlong(va_arg(VALIST_ACCESS(valist), short int), 10, printfParams); // we are using longlong version for every int to save code size.
|
||||
// if ( printfParams->l_modifier == 9 ) print_longlong(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), short int), 10, printfParams); // we are using longlong version for every int to save code size.
|
||||
// else
|
||||
// #endif
|
||||
// #if PRINTF_LITE_SHORTSHORTINT_SUPPORT == 1
|
||||
// if ( printfParams->l_modifier < 9 ) print_longlong(va_arg(VALIST_ACCESS(valist), char), 10, printfParams); // we are using longlong version for every int to save code size.
|
||||
// if ( printfParams->l_modifier < 9 ) print_longlong(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), char), 10, printfParams); // we are using longlong version for every int to save code size.
|
||||
// else
|
||||
// #endif
|
||||
print_longlong(va_arg(VALIST_ACCESS(valist), int), 10, printfParams);
|
||||
print_longlong(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), int), 10, printfParams);
|
||||
printfParams->inDirective = 0;
|
||||
break;
|
||||
|
||||
#if PRINTF_LITE_FALLBACK_FOR_UNSUPPORTED == 1 || PRINTF_LITE_FLOAT_SUPPORT == 1
|
||||
case 'f':
|
||||
#if PRINTF_LITE_FLOAT_SUPPORT == 1
|
||||
print_double(va_arg(VALIST_ACCESS(valist), double), printfParams); // 'float' is promoted to 'double' when passed through '...'
|
||||
print_double(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), double), printfParams); // 'float' is promoted to 'double' when passed through '...'
|
||||
#elif PRINTF_LITE_FLOAT_AS_INT_SUPPORT == 1
|
||||
print_longlong((INT_BIGGEST_TYPE)va_arg(VALIST_ACCESS(valist), double), 10, printfParams); // Cost 144 byte on Arduino
|
||||
print_longlong((INT_BIGGEST_TYPE)PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), double), 10, printfParams); // Cost 144 byte on Arduino
|
||||
#else
|
||||
va_arg(VALIST_ACCESS(valist), double); // this cost 16 bytes on stm32, 8 bytes on Arduino
|
||||
PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), double); // this cost 16 bytes on stm32, 8 bytes on Arduino
|
||||
#endif
|
||||
printfParams->inDirective = 0;
|
||||
break;
|
||||
|
@ -1012,12 +1013,12 @@ void printf_handle_format_char(char c, VALIST_PARAM_TYPE valist, PrintfParams* p
|
|||
#endif
|
||||
case 'c':
|
||||
{
|
||||
int c1 = va_arg(VALIST_ACCESS(valist), int);
|
||||
int c1 = PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), int);
|
||||
#if PRINTF_UTF8_INPUT_SUPPORT == 1
|
||||
{
|
||||
// wchar_t tmp2 = L'a';
|
||||
// int tmp1 = va_arg(VALIST_ACCESS(valist), int);
|
||||
// int tmp3 = va_arg(VALIST_ACCESS(valist), wchar_t);
|
||||
// int tmp1 = PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), int);
|
||||
// int tmp3 = PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), wchar_t);
|
||||
if ( !printfParams->unicode_output && printfParams->l_modifier > 10 ) { // print unicode char to utf8
|
||||
print_char32_as_utf8_string((char32_t)c1, printfParams);
|
||||
}else{
|
||||
|
@ -1033,7 +1034,7 @@ void printf_handle_format_char(char c, VALIST_PARAM_TYPE valist, PrintfParams* p
|
|||
//#if PRINTF_LITE_FALLBACK_FOR_UNSUPPORTED == 1 || PRINTF_LITE_FLASHSTRING_SUPPORT == 1
|
||||
// case 'F':
|
||||
// #if PRINTF_LITE_FLASHSTRING_SUPPORT == 1
|
||||
// print_Fstring(va_arg(VALIST_ACCESS(valist), char *), printfParams);
|
||||
// print_Fstring(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), char *), printfParams);
|
||||
// #endif
|
||||
// printfParams->inDirective = 0;
|
||||
// break;
|
||||
|
@ -1048,7 +1049,7 @@ void printf_handle_format_char(char c, VALIST_PARAM_TYPE valist, PrintfParams* p
|
|||
case 'F':
|
||||
#endif
|
||||
#if defined(ARDUINO) && PRINTF_LITE_FLASHSTRING_SUPPORT == 1
|
||||
print_Fstring(va_arg(VALIST_ACCESS(valist), char *), printfParams);
|
||||
print_Fstring(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), char *), printfParams);
|
||||
printfParams->inDirective = 0;
|
||||
break;
|
||||
#endif //defined(ARDUINO) && PRINTF_LITE_FLASHSTRING_SUPPORT == 1
|
||||
|
@ -1056,7 +1057,7 @@ void printf_handle_format_char(char c, VALIST_PARAM_TYPE valist, PrintfParams* p
|
|||
{
|
||||
#ifdef PRINTF_LITE_DOT_STAR_SUPPORT
|
||||
if ( printfParams->precision_specifier == -2 ) {
|
||||
printfParams->precision_specifier = va_arg(VALIST_ACCESS(valist), int);
|
||||
printfParams->precision_specifier = PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), int);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1065,11 +1066,11 @@ void printf_handle_format_char(char c, VALIST_PARAM_TYPE valist, PrintfParams* p
|
|||
# if PRINTF_UTF8_INPUT_SUPPORT == 1 || PRINTF_UNICODE_INPUT_SUPPORT== 1
|
||||
# if PRINTF_UTF8_INPUT_SUPPORT == 0
|
||||
if ( printfParams->l_modifier <= 10 ) {
|
||||
va_arg(VALIST_ACCESS(valist), const char*);
|
||||
PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), const char*);
|
||||
# endif
|
||||
# if PRINTF_UNICODE_INPUT_SUPPORT == 0
|
||||
if ( printfParams->l_modifier > 10 ) {
|
||||
va_arg(VALIST_ACCESS(valist), const wchar_t*);
|
||||
PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), const wchar_t*);
|
||||
# endif
|
||||
# if PRINTF_UNICODE_OUTPUT_SUPPORT == 1 && PRINTF_UTF8_INPUT_SUPPORT == 0
|
||||
output_utf8_string(L"unsupported", printfParams);
|
||||
|
@ -1084,7 +1085,7 @@ void printf_handle_format_char(char c, VALIST_PARAM_TYPE valist, PrintfParams* p
|
|||
|
||||
#if PRINTF_UNICODE_INPUT_SUPPORT == 1
|
||||
if ( printfParams->l_modifier > 10 ) {
|
||||
const wchar_t* s = va_arg(VALIST_ACCESS(valist), const wchar_t*);
|
||||
const wchar_t* s = PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), const wchar_t*);
|
||||
if ( printfParams->unicode_output ) {
|
||||
output_wchar_string(s, printfParams);
|
||||
}else{
|
||||
|
@ -1095,7 +1096,7 @@ void printf_handle_format_char(char c, VALIST_PARAM_TYPE valist, PrintfParams* p
|
|||
#endif
|
||||
#if PRINTF_UTF8_INPUT_SUPPORT == 1
|
||||
{
|
||||
const char* s = va_arg(VALIST_ACCESS(valist), const char*);
|
||||
const char* s = PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), const char*);
|
||||
#if PRINTF_UTF8_OUTPUT_SUPPORT == 1 && PRINTF_UNICODE_OUTPUT_SUPPORT == 1
|
||||
if ( printfParams->unicode_output ) {
|
||||
output_utf8_string_as_wchar(s, printfParams);
|
||||
|
@ -1112,24 +1113,24 @@ void printf_handle_format_char(char c, VALIST_PARAM_TYPE valist, PrintfParams* p
|
|||
printfParams->inDirective = 0;
|
||||
}
|
||||
// {
|
||||
// output_utf8_string(va_arg(VALIST_ACCESS(valist), const output_char_type*), printfParams);
|
||||
// output_utf8_string(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), const output_char_type*), printfParams);
|
||||
// printfParams->inDirective = 0;
|
||||
// }
|
||||
|
||||
//#if PRINTF_UNICODE_INPUT_SUPPORT == 1 && PRINTF_UTF8_OUTPUT_SUPPORT == 1
|
||||
// if ( printfParams->l_modifier == 0 ) {
|
||||
// output_utf8_string(va_arg(VALIST_ACCESS(valist), const char*), printfParams);
|
||||
// output_utf8_string(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), const char*), printfParams);
|
||||
// printfParams->inDirective = 0;
|
||||
// }else
|
||||
//#elif PRINTF_UTF8_INPUT_SUPPORT == 1 && PRINTF_UNICODE_OUTPUT_SUPPORT == 1
|
||||
//#arning TODO
|
||||
// if ( printfParams->l_modifier == 1 ) {
|
||||
// output_utf8_string(va_arg(VALIST_ACCESS(valist), const char*), printfParams);
|
||||
// output_utf8_string(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), const char*), printfParams);
|
||||
// printfParams->inDirective = 0;
|
||||
// }else
|
||||
//#endif
|
||||
// {
|
||||
// output_utf8_string(va_arg(VALIST_ACCESS(valist), const output_char_type*), printfParams);
|
||||
// output_utf8_string(PRINTF_VA_ARG(PRINTF_VALIST_ACCESS(valist), const output_char_type*), printfParams);
|
||||
// printfParams->inDirective = 0;
|
||||
// }
|
||||
break;
|
||||
|
@ -1178,15 +1179,15 @@ __attribute__((noinline, section(".printf_lite")))
|
|||
#endif
|
||||
#if PRINTF_LITE_TIMESTAMP_SUPPORT == 1
|
||||
# if PRINTF_EMIT_CR_SUPPORT == 1
|
||||
void vprintf_with_callback_timestamp_emitcr(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp, int emitCr)
|
||||
void vprintf_with_callback_timestamp_emitcr(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp, int emitCr)
|
||||
# else
|
||||
void vprintf_with_callback_timestamp(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp)
|
||||
void vprintf_with_callback_timestamp(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp)
|
||||
# endif
|
||||
#else
|
||||
# if PRINTF_EMIT_CR_SUPPORT == 1
|
||||
void vprintf_with_callback_emitcr(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context, int emitCr)
|
||||
void vprintf_with_callback_emitcr(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context, int emitCr)
|
||||
# else
|
||||
void vprintf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context)
|
||||
void vprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context)
|
||||
# endif
|
||||
#endif
|
||||
{
|
||||
|
@ -1213,35 +1214,35 @@ __attribute__((noinline, section(".printf_lite")))
|
|||
{
|
||||
char c = *format++;
|
||||
if (c == 0) break;
|
||||
printf_handle_format_char(c, VALIST_PARAM(valist), &printfParams);
|
||||
printf_handle_format_char(c, PRINTF_VALIST_PARAM(valist), &printfParams);
|
||||
}
|
||||
#if PRINTF_LITE_BUF_SIZE > 1
|
||||
if ( printfParams.bufIdx > 0 ) printfParams.transmitBufCallBack.transmitBufCallBack(printfParams.buf.buf, printfParams.bufIdx, printfParams.context);
|
||||
#endif
|
||||
|
||||
va_end(valist);
|
||||
PRINTF_VA_END(valist);
|
||||
}
|
||||
|
||||
// I tried to inline this in printf_lite.h, but GCC seems to not accept that an inline function could call another inline function.
|
||||
#if PRINTF_LITE_TIMESTAMP_SUPPORT == 1
|
||||
# if PRINTF_EMIT_CR_SUPPORT == 1
|
||||
void vprintf_with_callback_timestamp(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp) {
|
||||
void vprintf_with_callback_timestamp(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context, int* newline, int timestamp) {
|
||||
vprintf_with_callback_timestamp_emitcr(format, valist, transmitBufCallBack, context, newline, timestamp, 0);
|
||||
}
|
||||
void vprintf_with_callback_emitcr(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context, int emitCr) {
|
||||
void vprintf_with_callback_emitcr(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context, int emitCr) {
|
||||
vprintf_with_callback_timestamp_emitcr(format, valist, transmitBufCallBack, context, NULL, 0, emitCr);
|
||||
}
|
||||
void vprintf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context) {
|
||||
void vprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context) {
|
||||
vprintf_with_callback_timestamp_emitcr(format, valist, transmitBufCallBack, context, NULL, 0, 0);
|
||||
}
|
||||
# else
|
||||
void vprintf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context) {
|
||||
void vprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context) {
|
||||
vprintf_with_callback_timestamp(format, valist, transmitBufCallBack, context, NULL, 0);
|
||||
}
|
||||
# endif
|
||||
#else
|
||||
# if PRINTF_EMIT_CR_SUPPORT == 1
|
||||
void vprintf_with_callback(const char* format, va_list valist, transmitBufCallBackType transmitBufCallBack, void* context) {
|
||||
void vprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitBufCallBackType transmitBufCallBack, void* context) {
|
||||
vprintf_with_callback_emitcr(format, valist, transmitBufCallBack, context, 0);
|
||||
}
|
||||
# endif
|
||||
|
@ -1267,18 +1268,18 @@ __attribute__((noinline, section(".printf_lite")))
|
|||
# endif
|
||||
#endif
|
||||
{
|
||||
va_list valist;
|
||||
PRINTF_VA_LIST valist;
|
||||
#if PRINTF_LITE_TIMESTAMP_SUPPORT == 1
|
||||
# if PRINTF_EMIT_CR_SUPPORT == 1
|
||||
va_start(valist, emitCr);
|
||||
PRINTF_VA_START(valist, emitCr);
|
||||
# else
|
||||
va_start(valist, timestamp);
|
||||
PRINTF_VA_START(valist, timestamp);
|
||||
#endif
|
||||
#else
|
||||
# if PRINTF_EMIT_CR_SUPPORT == 1
|
||||
va_start(valist, emitCr);
|
||||
PRINTF_VA_START(valist, emitCr);
|
||||
# else
|
||||
va_start(valist, context);
|
||||
PRINTF_VA_START(valist, context);
|
||||
#endif
|
||||
#endif
|
||||
#if PRINTF_LITE_TIMESTAMP_SUPPORT == 1
|
||||
|
@ -1294,7 +1295,7 @@ __attribute__((noinline, section(".printf_lite")))
|
|||
vprintf_with_callback(format, valist, transmitBufCallBack, context);
|
||||
# endif
|
||||
#endif
|
||||
va_end(valist);
|
||||
PRINTF_VA_END(valist);
|
||||
}
|
||||
|
||||
#if PRINTF_UNICODE_OUTPUT_SUPPORT == 1
|
||||
|
@ -1368,7 +1369,7 @@ tryagain:
|
|||
|
||||
#if PRINTF_LITE_TIMESTAMP_SUPPORT == 1
|
||||
|
||||
void vwprintf_with_callback_timestamp(const char* format, va_list valist, transmitWBufCallBackType transmitWBufCallBack, void* context, int* newline, int timestamp)
|
||||
void vwprintf_with_callback_timestamp(const char* format, PRINTF_VA_LIST valist, transmitWBufCallBackType transmitWBufCallBack, void* context, int* newline, int timestamp)
|
||||
{
|
||||
PrintfParams printfParams;
|
||||
printfParams.newlinePtr = newline;
|
||||
|
@ -1388,7 +1389,7 @@ tryagain:
|
|||
format = get_utf32_from_utf8(format, &c);
|
||||
if (format == 0) break;
|
||||
if ( c <= 0x80) {
|
||||
printf_handle_format_char((char)c, VALIST_PARAM(valist), &printfParams);
|
||||
printf_handle_format_char((char)c, PRINTF_VALIST_PARAM(valist), &printfParams);
|
||||
continue;
|
||||
}
|
||||
#if __WCHAR_MAX__ <= 0xFFFFu
|
||||
|
@ -1407,13 +1408,13 @@ tryagain:
|
|||
if ( printfParams.bufIdx > 0 ) printfParams.transmitBufCallBack.transmitBufCallBack(printfParams.buf.buf, printfParams.bufIdx, printfParams.context);
|
||||
#endif
|
||||
|
||||
va_end(valist);
|
||||
PRINTF_VA_END(valist);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
|
||||
void vwprintf_with_callback(const char* format, va_list valist, transmitWBufCallBackType transmitWBufCallBack, void* context)
|
||||
void vwprintf_with_callback(const char* format, PRINTF_VA_LIST valist, transmitWBufCallBackType transmitWBufCallBack, void* context)
|
||||
{
|
||||
PrintfParams printfParams;
|
||||
#if PRINTF_LITE_BUF_SIZE > 1
|
||||
|
@ -1432,7 +1433,7 @@ tryagain:
|
|||
format = get_utf32_from_utf8(format, &c);
|
||||
if (format == 0) break;
|
||||
if ( c <= 0x80) {
|
||||
printf_handle_format_char((char)c, VALIST_PARAM(valist), &printfParams);
|
||||
printf_handle_format_char((char)c, PRINTF_VALIST_PARAM(valist), &printfParams);
|
||||
continue;
|
||||
}
|
||||
#if __WCHAR_MAX__ <= 0xFFFFu
|
||||
|
@ -1451,7 +1452,7 @@ tryagain:
|
|||
if ( printfParams.bufIdx > 0 ) printfParams.transmitBufCallBack.transmitBufCallBack(printfParams.buf.buf, printfParams.bufIdx, printfParams.context);
|
||||
#endif
|
||||
|
||||
va_end(valist);
|
||||
PRINTF_VA_END(valist);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1461,18 +1462,18 @@ void wprintf_with_callback(const char* format, transmitWBufCallBackType transmit
|
|||
#endif
|
||||
...)
|
||||
{
|
||||
va_list valist;
|
||||
PRINTF_VA_LIST valist;
|
||||
#if PRINTF_LITE_TIMESTAMP_SUPPORT == 1
|
||||
va_start(valist, timestamp);
|
||||
PRINTF_VA_START(valist, timestamp);
|
||||
#else
|
||||
va_start(valist, context);
|
||||
PRINTF_VA_START(valist, context);
|
||||
#endif
|
||||
#if PRINTF_LITE_TIMESTAMP_SUPPORT == 1
|
||||
vwprintf_with_callback_timestamp(format, valist, transmitWBufCallBack, context, newline, timestamp);
|
||||
#else
|
||||
vwprintf_with_callback(format, valist, transmitWBufCallBack, context);
|
||||
#endif
|
||||
va_end(valist);
|
||||
PRINTF_VA_END(valist);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1504,7 +1505,7 @@ void transmitSPrintf(const char* buf, unsigned int nbchar, void* context)
|
|||
SPrintfContext->printf_callback_vsnprintf_count += nbchar;
|
||||
}
|
||||
|
||||
int (PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, vsnprint, PRINTF_CFUNCTION_SUFFIX))(char* buf, size_t len, const char *__restrict format, va_list valist)
|
||||
int (PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, vsnprint, PRINTF_CFUNCTION_SUFFIX))(char* buf, size_t len, const char *__restrict format, PRINTF_VA_LIST valist)
|
||||
{
|
||||
SPrintfContext_t SPrintfContext;
|
||||
SPrintfContext.printf_callback_vsnprintf_buffer = buf;
|
||||
|
@ -1521,10 +1522,10 @@ int (PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, vsnprint, PRINTF_CFUNCTION_SU
|
|||
|
||||
int (PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, snprint, PRINTF_CFUNCTION_SUFFIX))(char* buf, size_t len, const char *__restrict format, ...)
|
||||
{
|
||||
va_list valist;
|
||||
va_start(valist, format);
|
||||
PRINTF_VA_LIST valist;
|
||||
PRINTF_VA_START(valist, format);
|
||||
int ret = PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, vsnprint, PRINTF_CFUNCTION_SUFFIX)(buf, len, format, valist);
|
||||
va_end(valist);
|
||||
PRINTF_VA_END(valist);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1550,7 +1551,7 @@ void transmitSWPrintf(const wchar_t* buf, unsigned int nbchar, void* context)
|
|||
SWPrintfContext->printf_callback_vsnprintf_count += nbchar;
|
||||
}
|
||||
|
||||
int PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, vsnwprint, PRINTF_CFUNCTION_SUFFIX)(wchar_t* buf, size_t len, const char *__restrict format, va_list valist)
|
||||
int PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, vsnwprint, PRINTF_CFUNCTION_SUFFIX)(wchar_t* buf, size_t len, const char *__restrict format, PRINTF_VA_LIST valist)
|
||||
{
|
||||
SWPrintfContext_t SWPrintfContext;
|
||||
SWPrintfContext.printf_callback_vsnprintf_buffer = buf;
|
||||
|
@ -1570,10 +1571,10 @@ int PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, vsnwprint, PRINTF_CFUNCTION_SU
|
|||
|
||||
int PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, snwprint, PRINTF_CFUNCTION_SUFFIX)(wchar_t* buf, size_t len, const char *__restrict format, ...)
|
||||
{
|
||||
va_list valist;
|
||||
va_start(valist, format);
|
||||
PRINTF_VA_LIST valist;
|
||||
PRINTF_VA_START(valist, format);
|
||||
int ret = PRINTF_FUNCTION_NAME(PRINTF_CFUNCTION_PREFIX, vsnwprint, PRINTF_CFUNCTION_SUFFIX)(buf, len, format, valist);
|
||||
va_end(valist);
|
||||
PRINTF_VA_END(valist);
|
||||
return ret;
|
||||
}
|
||||
#endif // PRINTF_UNICODE_OUTPUT_SUPPORT == 1
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
|
||||
#include <Uefi.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused"
|
||||
|
||||
int gOpensslLibNullDummy; // to silence libtool warning saying that there is no symbols
|
||||
|
|
|
@ -102,7 +102,7 @@ BmFindBootOptionInVariable (
|
|||
CHAR16 OptionName[BM_OPTION_NAME_LEN];
|
||||
EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions;
|
||||
UINTN BootOptionCount;
|
||||
UINTN Index;
|
||||
INTN Index;
|
||||
|
||||
OptionNumber = LoadOptionNumberUnassigned;
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ BmIsKeyOptionVariable (
|
|||
*OptionNumber = 0;
|
||||
for (Index = 3; Index < 7; Index++) {
|
||||
Uint = BmCharToUint (Name[Index]);
|
||||
if (Uint == -1) {
|
||||
if (Uint == (UINTN)-1 ) { // BmCharToUint returns (UINTN)-1
|
||||
return FALSE;
|
||||
} else {
|
||||
*OptionNumber = (UINT16) Uint + *OptionNumber * 0x10;
|
||||
|
|
|
@ -822,7 +822,7 @@ EfiBootManagerIsValidLoadOptionVariableName (
|
|||
LocalOptionNumber = 0;
|
||||
for (Index = VariableNameLen - 4; Index < VariableNameLen; Index++) {
|
||||
Uint = BmCharToUint (VariableName[Index]);
|
||||
if (Uint == -1) {
|
||||
if (Uint == (UINTN)-1) { // BmCharToUint can return (UINTN)-1
|
||||
break;
|
||||
} else {
|
||||
LocalOptionNumber = (UINT16) Uint + LocalOptionNumber * 0x10;
|
||||
|
|
|
@ -4249,7 +4249,7 @@ ExecuteDataManip (
|
|||
//
|
||||
DataManipDispatchTableIndex = (Opcode & OPCODE_M_OPCODE) - OPCODE_NOT;
|
||||
if ((DataManipDispatchTableIndex < 0) ||
|
||||
(DataManipDispatchTableIndex >= ARRAY_SIZE (mDataManipDispatchTable))) {
|
||||
((UINTN)DataManipDispatchTableIndex >= ARRAY_SIZE (mDataManipDispatchTable))) {
|
||||
EbcDebugSignalException (
|
||||
EXCEPT_EBC_INVALID_OPCODE,
|
||||
EXCEPTION_FLAG_ERROR,
|
||||
|
|
|
@ -317,6 +317,19 @@ DebugPrintLevelEnabled (
|
|||
#define _DEBUG(Expression) DebugPrint Expression
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
#define DONT_EVALUATE(expression) \
|
||||
do { \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wtautological-compare\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wunused\"") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wunused-value\"") \
|
||||
TRUE ? (void)(0) : (void)((expression)); \
|
||||
_Pragma("GCC diagnostic pop") \
|
||||
} while (FALSE)
|
||||
|
||||
/**
|
||||
Macro that calls DebugAssert() if an expression evaluates to FALSE.
|
||||
|
||||
|
@ -340,7 +353,10 @@ DebugPrintLevelEnabled (
|
|||
} \
|
||||
} while (FALSE)
|
||||
#else
|
||||
#define ASSERT(Expression)
|
||||
#define ASSERT(Expression) \
|
||||
do { \
|
||||
DONT_EVALUATE(Expression); \
|
||||
} while (FALSE)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -363,7 +379,10 @@ DebugPrintLevelEnabled (
|
|||
} \
|
||||
} while (FALSE)
|
||||
#else
|
||||
#define DEBUG(Expression)
|
||||
#define DEBUG(Expression) \
|
||||
do { \
|
||||
DONT_EVALUATE(Expression); \
|
||||
} while (FALSE)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -389,7 +408,10 @@ DebugPrintLevelEnabled (
|
|||
} \
|
||||
} while (FALSE)
|
||||
#else
|
||||
#define ASSERT_EFI_ERROR(StatusParameter)
|
||||
#define ASSERT_EFI_ERROR(StatusParameter) \
|
||||
do { \
|
||||
DONT_EVALUATE(StatusParameter); \
|
||||
} while (FALSE)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -416,7 +438,10 @@ DebugPrintLevelEnabled (
|
|||
} \
|
||||
} while (FALSE)
|
||||
#else
|
||||
#define ASSERT_RETURN_ERROR(StatusParameter)
|
||||
#define ASSERT_RETURN_ERROR(StatusParameter) \
|
||||
do { \
|
||||
DONT_EVALUATE(StatusParameter); \
|
||||
} while (FALSE)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -459,7 +484,11 @@ DebugPrintLevelEnabled (
|
|||
} \
|
||||
} while (FALSE)
|
||||
#else
|
||||
#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid)
|
||||
#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid) \
|
||||
do { \
|
||||
DONT_EVALUATE(Handle); \
|
||||
DONT_EVALUATE(Guid); \
|
||||
} while (FALSE)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 6809233672eaa1c3f058c7e21605a653aca6f36c
|
||||
Subproject commit 5ab1a58d0b0ba6ddad3df1c8b464e66f4048d236
|
|
@ -216,13 +216,13 @@ AppleImageCodecEntrypoint (
|
|||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_HANDLE NewHandle;
|
||||
// EFI_HANDLE NewHandle;
|
||||
|
||||
//
|
||||
// Install instance of Apple image codec protocol for
|
||||
// PNG files
|
||||
//
|
||||
NewHandle = NULL; // install to a new handle
|
||||
// NewHandle = NULL; // install to a new handle
|
||||
// Status = gBS->InstallMultipleProtocolInterfaces(&NewHandle, &gAppleImageCodecProtocolGuid, &gAppleImageCodec, NULL);
|
||||
Status = gBS->InstallProtocolInterface (
|
||||
&ImageHandle,
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
//
|
||||
// Macro Definitions
|
||||
//
|
||||
typedef INT16 NODE;
|
||||
typedef UINT16 NODE;
|
||||
#define UINT8_MAX 0xff
|
||||
#define UINT8_BIT 8
|
||||
#define THRESHOLD 3
|
||||
|
|
File diff suppressed because it is too large
Load Diff
7
Xcode/CloverX64_ebuild/CloverX64_ebuild.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
Xcode/CloverX64_ebuild/CloverX64_ebuild.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:/JiefLand/5.Devel/Clover/Clover-projects/Clover--CloverHackyColor--master/Xcode/CloverX64_ebuild/CloverX64_ebuild.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1120"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "NO"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A27243D25D3AE7000F03E19"
|
||||
BuildableName = "CloverX64_Build_all"
|
||||
BlueprintName = "CloverX64_Build_all"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2C2A112C1A0ADBA200E9E558"
|
||||
BuildableName = "CloverX64_DEBUG_GCC53"
|
||||
BlueprintName = "CloverX64_DEBUG_GCC53"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A56844425D322D100BEE3B9"
|
||||
BuildableName = "CloverX64_DEBUG_XCODE8"
|
||||
BlueprintName = "CloverX64_DEBUG_XCODE8"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A27243525D3AE2100F03E19"
|
||||
BuildableName = "CloverX64_RELEASE_GCC53"
|
||||
BlueprintName = "CloverX64_RELEASE_GCC53"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A27243925D3AE2D00F03E19"
|
||||
BuildableName = "CloverX64_RELEASE_XCODE8"
|
||||
BlueprintName = "CloverX64_RELEASE_XCODE8"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A27243D25D3AE7000F03E19"
|
||||
BuildableName = "CloverX64_Build_all"
|
||||
BlueprintName = "CloverX64_Build_all"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1120"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2C2A112C1A0ADBA200E9E558"
|
||||
BuildableName = "CloverX64_DEBUG_GCC53"
|
||||
BlueprintName = "CloverX64_DEBUG_GCC53"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "TOOLCHAIN_DIR"
|
||||
value = "$(PROJECT_DIR)../../toolchain.gcc102.kbl"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
<EnvironmentVariable
|
||||
key = "GCC53_BIN"
|
||||
value = ""$TOOLCHAIN_DIR"/cross/bin/x86_64-clover-linux-gnu-"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
<EnvironmentVariable
|
||||
key = "NASM_PREFIX"
|
||||
value = ""$TOOLCHAIN_DIR"/bin/"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2C2A112C1A0ADBA200E9E558"
|
||||
BuildableName = "CloverX64_DEBUG_GCC53"
|
||||
BlueprintName = "CloverX64_DEBUG_GCC53"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1120"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A56844425D322D100BEE3B9"
|
||||
BuildableName = "CloverX64_DEBUG_XCODE8"
|
||||
BlueprintName = "CloverX64_DEBUG_XCODE8"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A56844425D322D100BEE3B9"
|
||||
BuildableName = "CloverX64_DEBUG_XCODE8"
|
||||
BlueprintName = "CloverX64_DEBUG_XCODE8"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1120"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A27243525D3AE2100F03E19"
|
||||
BuildableName = "CloverX64_RELEASE_GCC53"
|
||||
BlueprintName = "CloverX64_RELEASE_GCC53"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A27243525D3AE2100F03E19"
|
||||
BuildableName = "CloverX64_RELEASE_GCC53"
|
||||
BlueprintName = "CloverX64_RELEASE_GCC53"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1120"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A27243925D3AE2D00F03E19"
|
||||
BuildableName = "CloverX64_RELEASE_XCODE8"
|
||||
BlueprintName = "CloverX64_RELEASE_XCODE8"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A27243925D3AE2D00F03E19"
|
||||
BuildableName = "CloverX64_RELEASE_XCODE8"
|
||||
BlueprintName = "CloverX64_RELEASE_XCODE8"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1120"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "NO"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A27244125D3B6C200F03E19"
|
||||
BuildableName = "CloverX64_Rebuild_all"
|
||||
BlueprintName = "CloverX64_Rebuild_all"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2C2A112C1A0ADBA200E9E558"
|
||||
BuildableName = "CloverX64_DEBUG_GCC53"
|
||||
BlueprintName = "CloverX64_DEBUG_GCC53"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A56844425D322D100BEE3B9"
|
||||
BuildableName = "CloverX64_DEBUG_XCODE8"
|
||||
BlueprintName = "CloverX64_DEBUG_XCODE8"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A27243525D3AE2100F03E19"
|
||||
BuildableName = "CloverX64_RELEASE_GCC53"
|
||||
BlueprintName = "CloverX64_RELEASE_GCC53"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A27243925D3AE2D00F03E19"
|
||||
BuildableName = "CloverX64_RELEASE_XCODE8"
|
||||
BlueprintName = "CloverX64_RELEASE_XCODE8"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9A27244125D3B6C200F03E19"
|
||||
BuildableName = "CloverX64_Rebuild_all"
|
||||
BlueprintName = "CloverX64_Rebuild_all"
|
||||
ReferencedContainer = "container:CloverX64_ebuild.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -99,13 +99,13 @@ public:
|
|||
|
||||
void closeDebugLog()
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
// EFI_STATUS Status;
|
||||
|
||||
if ( !gLogFile ) return;
|
||||
|
||||
SuspendMemLogCallback smc;
|
||||
|
||||
Status = gLogFile->Close(gLogFile);
|
||||
/*Status =*/ gLogFile->Close(gLogFile);
|
||||
gLogFile = NULL;
|
||||
//DGB_nbCallback("closeDebugLog() -> %s\n", efiStrError(Status));
|
||||
}
|
||||
|
|
|
@ -259,9 +259,6 @@ ParseLoadOptions (
|
|||
};
|
||||
|
||||
UINTN PlistStringsLen;
|
||||
CHAR8 *AsciiConf;
|
||||
|
||||
AsciiConf = NULL;
|
||||
*Dict = NULL;
|
||||
|
||||
XStringW& ConfName = *ConfNamePtr;
|
||||
|
|
|
@ -428,7 +428,7 @@ EFI_STATUS __ParseTagList(bool isArray, CHAR8* buffer, TagStruct** tag, UINT32 e
|
|||
{
|
||||
EFI_STATUS Status = EFI_SUCCESS;
|
||||
UINT32 pos;
|
||||
TagStruct* tagTail;
|
||||
// TagStruct* tagTail;
|
||||
UINT32 length = 0;
|
||||
|
||||
if (isArray) {
|
||||
|
@ -436,7 +436,7 @@ EFI_STATUS __ParseTagList(bool isArray, CHAR8* buffer, TagStruct** tag, UINT32 e
|
|||
} else {
|
||||
DBG("parsing dict len=%d\n", *lenPtr);
|
||||
}
|
||||
tagTail = NULL;
|
||||
// tagTail = NULL;
|
||||
pos = 0;
|
||||
|
||||
TagStruct* dictOrArrayTag;
|
||||
|
|
|
@ -192,28 +192,28 @@ void XObjArrayNC<TYPE>::Init()
|
|||
template<class TYPE>
|
||||
XObjArray<TYPE>::XObjArray(bool FreeThem, TYPE* n1, ...)
|
||||
{
|
||||
va_list va;
|
||||
XTOOLS_VA_LIST va;
|
||||
|
||||
va_start (va, n1);
|
||||
XTOOLS_VA_START (va, n1);
|
||||
size_t count = 0;
|
||||
TYPE* t = va_arg(va, TYPE*);
|
||||
while ( t != nullptr ) {
|
||||
count++;
|
||||
t = va_arg(va, TYPE*);
|
||||
}
|
||||
va_end(va);
|
||||
XTOOLS_VA_END(va);
|
||||
|
||||
XObjArrayNC<TYPE>::Init();
|
||||
this->CheckSize(count+1, (size_t)0);
|
||||
XObjArrayNC<TYPE>::AddReference(n1, FreeThem);
|
||||
|
||||
va_start (va, n1);
|
||||
XTOOLS_VA_START (va, n1);
|
||||
t = va_arg(va, TYPE*);
|
||||
while ( t != nullptr ) {
|
||||
XObjArrayNC<TYPE>::AddReference(t, FreeThem);
|
||||
t = va_arg(va, TYPE*);
|
||||
}
|
||||
va_end(va);
|
||||
XTOOLS_VA_END(va);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,24 +29,24 @@ const XStringW NullXStringW;
|
|||
|
||||
XString8 S8Printf(const char* format, ...)
|
||||
{
|
||||
va_list va;
|
||||
XTOOLS_VA_LIST va;
|
||||
XString8 str;
|
||||
|
||||
va_start (va, format);
|
||||
XTOOLS_VA_START (va, format);
|
||||
str.vS8Printf(format, va);
|
||||
va_end(va);
|
||||
XTOOLS_VA_END(va);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
XStringW SWPrintf(const char* format, ...)
|
||||
{
|
||||
va_list va;
|
||||
XTOOLS_VA_LIST va;
|
||||
XStringW str;
|
||||
|
||||
va_start (va, format);
|
||||
XTOOLS_VA_START (va, format);
|
||||
str.vSWPrintf(format, va);
|
||||
va_end(va);
|
||||
XTOOLS_VA_END(va);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
|
|
@ -60,30 +60,30 @@ protected:
|
|||
((XString8*)(context))->strncat(buf, nbchar);
|
||||
}
|
||||
public:
|
||||
void vS8Printf(const char* format, va_list va)
|
||||
void vS8Printf(const char* format, XTOOLS_VA_LIST va)
|
||||
{
|
||||
setEmpty();
|
||||
vprintf_with_callback(format, va, transmitS8Printf, this);
|
||||
}
|
||||
void S8Printf(const char* format, ...) __attribute__((__format__(__printf__, 2, 3)))
|
||||
{
|
||||
va_list va;
|
||||
XTOOLS_VA_LIST va;
|
||||
|
||||
va_start (va, format);
|
||||
XTOOLS_VA_START (va, format);
|
||||
vS8Printf(format, va);
|
||||
va_end(va);
|
||||
XTOOLS_VA_END(va);
|
||||
}
|
||||
void vS8Catf(const char* format, va_list va)
|
||||
void vS8Catf(const char* format, XTOOLS_VA_LIST va)
|
||||
{
|
||||
vprintf_with_callback(format, va, transmitS8Printf, this);
|
||||
}
|
||||
void S8Catf(const char* format, ...) __attribute__((__format__(__printf__, 2, 3)))
|
||||
{
|
||||
va_list va;
|
||||
XTOOLS_VA_LIST va;
|
||||
|
||||
va_start (va, format);
|
||||
XTOOLS_VA_START (va, format);
|
||||
vS8Catf(format, va);
|
||||
va_end(va);
|
||||
XTOOLS_VA_END(va);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -177,30 +177,30 @@ protected:
|
|||
((XStringW*)(context))->strncat(buf, nbchar);
|
||||
}
|
||||
public:
|
||||
void vSWPrintf(const char* format, va_list va)
|
||||
void vSWPrintf(const char* format, XTOOLS_VA_LIST va)
|
||||
{
|
||||
setEmpty();
|
||||
vwprintf_with_callback(format, va, transmitSWPrintf, this);
|
||||
}
|
||||
void SWPrintf(const char* format, ...) __attribute__((__format__(__printf__, 2, 3)))
|
||||
{
|
||||
va_list va;
|
||||
XTOOLS_VA_LIST va;
|
||||
|
||||
va_start (va, format);
|
||||
XTOOLS_VA_START (va, format);
|
||||
vSWPrintf(format, va);
|
||||
va_end(va);
|
||||
XTOOLS_VA_END(va);
|
||||
}
|
||||
void vSWCatf(const char* format, va_list va)
|
||||
void vSWCatf(const char* format, XTOOLS_VA_LIST va)
|
||||
{
|
||||
vwprintf_with_callback(format, va, transmitSWPrintf, this);
|
||||
}
|
||||
void SWCatf(const char* format, ...) __attribute__((__format__(__printf__, 2, 3)))
|
||||
{
|
||||
va_list va;
|
||||
XTOOLS_VA_LIST va;
|
||||
|
||||
va_start (va, format);
|
||||
XTOOLS_VA_START (va, format);
|
||||
vSWCatf(format, va);
|
||||
va_end(va);
|
||||
XTOOLS_VA_END(va);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ class XStringArray_/* : public XStringArraySuper*/
|
|||
template<typename CharType>
|
||||
void AddStrings(const CharType* Val1, ...)
|
||||
{
|
||||
va_list va;
|
||||
XTOOLS_VA_LIST va;
|
||||
const wchar_t *p;
|
||||
|
||||
{
|
||||
|
@ -169,7 +169,7 @@ class XStringArray_/* : public XStringArraySuper*/
|
|||
newS->takeValueFrom(Val1);
|
||||
AddReference(newS, true);
|
||||
}
|
||||
va_start(va, Val1);
|
||||
XTOOLS_VA_START(va, Val1);
|
||||
p = VA_ARG(va, const CharType*);
|
||||
while ( p != nullptr ) {
|
||||
XStringClass* newS = new XStringClass;
|
||||
|
@ -177,7 +177,7 @@ class XStringArray_/* : public XStringArraySuper*/
|
|||
AddReference(newS, true);
|
||||
p = VA_ARG(va, const CharType*);
|
||||
}
|
||||
va_end(va);
|
||||
XTOOLS_VA_END(va);
|
||||
}
|
||||
|
||||
void AddNoNull(const XStringClass &aString) { if ( !aString.isEmpty() ) array.AddCopy(aString); }
|
||||
|
|
|
@ -1383,8 +1383,8 @@ SimpleString testtrim_(const InitialValue& initialValue, const ExpectedValue& ex
|
|||
XStringClass str;
|
||||
str.takeValueFrom(initialValue.cha);
|
||||
|
||||
char32_t expectedChar = 0;
|
||||
if ( initialValue.utf32_length > 0) expectedChar = initialValue.utf32[initialValue.utf32_length-1];
|
||||
// char32_t expectedChar = 0;
|
||||
// if ( initialValue.utf32_length > 0) expectedChar = initialValue.utf32[initialValue.utf32_length-1];
|
||||
|
||||
str.trim();
|
||||
|
||||
|
@ -1417,8 +1417,8 @@ SimpleString teststartWith_(const InitialValue& initialValue)
|
|||
XStringClass initia__String;
|
||||
initia__String.takeValueFrom(initialValue.cha);
|
||||
|
||||
char32_t expectedChar = 0;
|
||||
if ( initialValue.utf32_length > 0) expectedChar = initialValue.utf32[initialValue.utf32_length-1];
|
||||
// char32_t expectedChar = 0;
|
||||
// if ( initialValue.utf32_length > 0) expectedChar = initialValue.utf32[initialValue.utf32_length-1];
|
||||
|
||||
for ( size_t count = 0 ; count < initialValue.utf32_length+3 ; count+=1 )
|
||||
{
|
||||
|
|
|
@ -2038,12 +2038,12 @@ void REFIT_MENU_SCREEN::DrawMainMenuEntry(REFIT_ABSTRACT_MENU_ENTRY *Entry, BOOL
|
|||
INTN CompWidth = (Entry->Row == 0) ? ThemeX.row0TileSize : ThemeX.row1TileSize;
|
||||
INTN CompHeight = CompWidth;
|
||||
|
||||
float fScale;
|
||||
if (ThemeX.TypeSVG) {
|
||||
fScale = (selected ? 1.f : -1.f);
|
||||
} else {
|
||||
fScale = ((Entry->Row == 0) ? (ThemeX.MainEntriesSize/128.f * (selected ? 1.f : -1.f)): 1.f) ;
|
||||
}
|
||||
// float fScale;
|
||||
// if (ThemeX.TypeSVG) {
|
||||
// fScale = (selected ? 1.f : -1.f);
|
||||
// } else {
|
||||
// fScale = ((Entry->Row == 0) ? (ThemeX.MainEntriesSize/128.f * (selected ? 1.f : -1.f)): 1.f) ;
|
||||
// }
|
||||
|
||||
if (Entry->Row == 0) {
|
||||
BadgeIcon = Entry->getBadgeImage();
|
||||
|
|
|
@ -3,6 +3,16 @@
|
|||
|
||||
#include <posix.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <Base.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#define xsize size_t
|
||||
//#define xisize INTN
|
||||
|
@ -21,5 +31,8 @@
|
|||
|
||||
#define Xrealloc(ptr, newsize, oldsize) reallocWithOldSize(ptr, newsize, oldsize)
|
||||
|
||||
#define XTOOLS_VA_LIST VA_LIST
|
||||
#define XTOOLS_VA_START VA_START
|
||||
#define XTOOLS_VA_END VA_END
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3178,7 +3178,7 @@ static void parseImage(NSVGparser* p, char** dict)
|
|||
NSVGpattern *pt = NULL;
|
||||
int i;
|
||||
UINTN len = 0;
|
||||
float w,h;
|
||||
// float w,h;
|
||||
const char *href = NULL;
|
||||
UINT8 *tmpData = NULL;
|
||||
// EG_IMAGE *NewImage = NULL;
|
||||
|
@ -3186,9 +3186,9 @@ static void parseImage(NSVGparser* p, char** dict)
|
|||
|
||||
for (i = 0; dict[i]; i += 2) {
|
||||
if (strcmp(dict[i], "width") == 0) {
|
||||
w = nsvg__parseCoordinate(p, dict[i+1], 0.0f, nsvg__actualWidth(p));
|
||||
/*w =*/ nsvg__parseCoordinate(p, dict[i+1], 0.0f, nsvg__actualWidth(p));
|
||||
} else if (strcmp(dict[i], "height") == 0) {
|
||||
h = nsvg__parseCoordinate(p, dict[i+1], 0.0f, nsvg__actualHeight(p));
|
||||
/*h =*/ nsvg__parseCoordinate(p, dict[i+1], 0.0f, nsvg__actualHeight(p));
|
||||
} else if (strcmp(dict[i], "xlink:href") == 0) {
|
||||
href = dict[i+1];
|
||||
} else {
|
||||
|
|
|
@ -502,13 +502,13 @@
|
|||
|
||||
[BuildOptions]
|
||||
|
||||
XCODE:*_*_*_CC_FLAGS = -fno-use-cxa-atexit -fno-omit-frame-pointer -fno-rtti -fno-exceptions -Wno-deprecated -Wno-unused-const-variable -DJCONST=CONST -Wno-incompatible-ms-struct
|
||||
XCODE:*_*_*_CXX_FLAGS = -fno-use-cxa-atexit -fno-omit-frame-pointer -fno-rtti -fno-exceptions -Wno-deprecated -Wno-unused-const-variable -DJCONST=CONST -Wno-incompatible-ms-struct
|
||||
XCODE:*_*_*_CC_FLAGS = -fno-use-cxa-atexit -fno-omit-frame-pointer -fno-rtti -fno-exceptions -DJCONST=CONST -Wno-incompatible-ms-struct #-Wunused-parameter
|
||||
XCODE:*_*_*_CXX_FLAGS = -fno-use-cxa-atexit -fno-omit-frame-pointer -fno-rtti -fno-exceptions -DJCONST=CONST -Wno-incompatible-ms-struct #-Wunused-parameter
|
||||
|
||||
|
||||
# -Wno-unused-const-variable, -maccumulate-outgoing-args is set in tools_def.template
|
||||
GCC:*_*_*_CC_FLAGS = -fno-omit-frame-pointer -ffreestanding -fno-exceptions -Wno-deprecated -Wno-write-strings -Wno-pointer-arith -DJCONST=CONST
|
||||
GCC:*_*_*_CXX_FLAGS = -fno-omit-frame-pointer -ffreestanding -fno-rtti -fno-exceptions -Wno-deprecated -Wno-write-strings -Wno-pointer-arith -DJCONST=CONST
|
||||
GCC:*_*_*_CC_FLAGS = -fno-omit-frame-pointer -ffreestanding -fno-exceptions -DJCONST=CONST
|
||||
GCC:*_*_*_CXX_FLAGS = -fno-omit-frame-pointer -ffreestanding -fno-rtti -fno-exceptions -DJCONST=CONST
|
||||
|
||||
|
||||
MSFT:*_*_*_CC_FLAGS = /Os /wd4201 /D JCONST=const
|
||||
|
|
|
@ -546,7 +546,7 @@ void ReadSIPCfg()
|
|||
// text output from boot.efi when booting in graphics mode
|
||||
//
|
||||
EFI_STATUS EFIAPI
|
||||
NullConOutOutputString(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CONST CHAR16 *String) {
|
||||
NullConOutOutputString(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *, IN CONST CHAR16 *) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue