all: update clang-format settings
This commit is contained in:
parent
a00687b092
commit
3c4b959f78
@ -8,6 +8,7 @@ IndentWidth: 4
|
||||
---
|
||||
Language: Cpp
|
||||
AccessModifierOffset: -4
|
||||
AlignConsecutiveMacros: AcrossComments
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
AttributeMacros:
|
||||
- __acc_cdecl
|
||||
|
||||
12
src/bele.h
12
src/bele.h
@ -752,9 +752,9 @@ inline unsigned UPX_MIN(const LE32 &a, unsigned b) { return UPX_MIN(unsigned(a),
|
||||
typedef BE16 NE16;
|
||||
typedef BE32 NE32;
|
||||
typedef BE64 NE64;
|
||||
#define ne16_compare be16_compare
|
||||
#define ne32_compare be32_compare
|
||||
#define ne64_compare be64_compare
|
||||
#define ne16_compare be16_compare
|
||||
#define ne32_compare be32_compare
|
||||
#define ne64_compare be64_compare
|
||||
#define ne16_compare_signed be16_compare_signed
|
||||
#define ne32_compare_signed be32_compare_signed
|
||||
#define ne64_compare_signed be64_compare_signed
|
||||
@ -762,9 +762,9 @@ typedef BE64 NE64;
|
||||
typedef LE16 NE16;
|
||||
typedef LE32 NE32;
|
||||
typedef LE64 NE64;
|
||||
#define ne16_compare le16_compare
|
||||
#define ne32_compare le32_compare
|
||||
#define ne64_compare le64_compare
|
||||
#define ne16_compare le16_compare
|
||||
#define ne32_compare le32_compare
|
||||
#define ne64_compare le64_compare
|
||||
#define ne16_compare_signed le16_compare_signed
|
||||
#define ne32_compare_signed le32_compare_signed
|
||||
#define ne64_compare_signed le64_compare_signed
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
#endif
|
||||
|
||||
#if 1 && defined(__linux__)
|
||||
#define USE_SCREEN 1
|
||||
#define USE_SCREEN 1
|
||||
#define USE_SCREEN_VCSA 1
|
||||
#if !(HAVE_LINUX_KD_H)
|
||||
#undef USE_SCREEN
|
||||
@ -59,10 +59,10 @@
|
||||
#if 1 && (ACC_OS_DOS32) && defined(__DJGPP__)
|
||||
#define USE_SCREEN 1
|
||||
#elif 1 && (ACC_OS_CYGWIN || ACC_OS_WIN32 || ACC_OS_WIN64)
|
||||
#define USE_SCREEN 1
|
||||
#define USE_SCREEN 1
|
||||
#define USE_SCREEN_WIN32 1
|
||||
#elif 1 && (ACC_OS_EMX && defined(__RSXNT__))
|
||||
#define USE_SCREEN 1
|
||||
#define USE_SCREEN 1
|
||||
#define USE_SCREEN_WIN32 1
|
||||
#elif 1 && (ACC_ARCH_M68K && ACC_OS_TOS)
|
||||
#define NO_CONSOLE 1
|
||||
@ -111,31 +111,31 @@ typedef struct {
|
||||
|
||||
void con_fprintf(FILE *f, const char *format, ...) attribute_format(2, 3);
|
||||
|
||||
#define FG_BLACK 0x00
|
||||
#define FG_BLUE 0x01
|
||||
#define FG_GREEN 0x02
|
||||
#define FG_CYAN 0x03
|
||||
#define FG_RED 0x04
|
||||
#define FG_VIOLET 0x05
|
||||
#define FG_ORANGE 0x06
|
||||
#define FG_LTGRAY 0x07
|
||||
#define FG_DKGRAY 0x08
|
||||
#define FG_BRTBLUE 0x09
|
||||
#define FG_BRTGREEN 0x0a
|
||||
#define FG_BRTCYAN 0x0b
|
||||
#define FG_BRTRED 0x0c
|
||||
#define FG_BLACK 0x00
|
||||
#define FG_BLUE 0x01
|
||||
#define FG_GREEN 0x02
|
||||
#define FG_CYAN 0x03
|
||||
#define FG_RED 0x04
|
||||
#define FG_VIOLET 0x05
|
||||
#define FG_ORANGE 0x06
|
||||
#define FG_LTGRAY 0x07
|
||||
#define FG_DKGRAY 0x08
|
||||
#define FG_BRTBLUE 0x09
|
||||
#define FG_BRTGREEN 0x0a
|
||||
#define FG_BRTCYAN 0x0b
|
||||
#define FG_BRTRED 0x0c
|
||||
#define FG_BRTVIOLET 0x0d
|
||||
#define FG_YELLOW 0x0e
|
||||
#define FG_WHITE 0x0f
|
||||
#define FG_YELLOW 0x0e
|
||||
#define FG_WHITE 0x0f
|
||||
|
||||
#define BG_BLACK 0x00
|
||||
#define BG_BLUE 0x10
|
||||
#define BG_GREEN 0x20
|
||||
#define BG_CYAN 0x30
|
||||
#define BG_RED 0x40
|
||||
#define BG_BLACK 0x00
|
||||
#define BG_BLUE 0x10
|
||||
#define BG_GREEN 0x20
|
||||
#define BG_CYAN 0x30
|
||||
#define BG_RED 0x40
|
||||
#define BG_VIOLET 0x50
|
||||
#define BG_ORANGE 0x60
|
||||
#define BG_WHITE 0x70
|
||||
#define BG_WHITE 0x70
|
||||
|
||||
#endif /* USE_CONSOLE */
|
||||
|
||||
@ -162,7 +162,7 @@ extern console_t console_screen;
|
||||
#else
|
||||
|
||||
#define con_fg(f, x) 0
|
||||
#define con_fprintf fprintf
|
||||
#define con_fprintf fprintf
|
||||
|
||||
#endif /* USE_CONSOLE */
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
#include <sys/farptr.h>
|
||||
#include <sys/movedata.h>
|
||||
#define dossel _go32_info_block.selector_for_linear_memory
|
||||
#define co80 _go32_info_block.linear_address_of_primary_screen
|
||||
#define co80 _go32_info_block.linear_address_of_primary_screen
|
||||
#undef kbhit
|
||||
|
||||
#define Cell upx_uint16_t
|
||||
|
||||
@ -81,11 +81,11 @@ static_assert(sizeof(void *) == 8);
|
||||
|
||||
#undef snprintf
|
||||
#undef vsnprintf
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define ACC_WANT_ACC_INCD_H 1
|
||||
#define ACC_WANT_ACC_INCE_H 1
|
||||
#define ACC_WANT_ACC_LIB_H 1
|
||||
#define ACC_WANT_ACC_CXX_H 1
|
||||
#define ACC_WANT_ACC_LIB_H 1
|
||||
#define ACC_WANT_ACC_CXX_H 1
|
||||
#include "miniacc.h"
|
||||
#if (ACC_CC_MSC)
|
||||
#include <intrin.h>
|
||||
|
||||
@ -55,8 +55,8 @@ LeFile::~LeFile() noexcept {
|
||||
}
|
||||
|
||||
#define objects ih.object_table_entries
|
||||
#define pages ih.memory_pages
|
||||
#define mps ih.memory_page_size
|
||||
#define pages ih.memory_pages
|
||||
#define mps ih.memory_page_size
|
||||
|
||||
void LeFile::readObjectTable() {
|
||||
soobject_table = objects;
|
||||
|
||||
@ -727,8 +727,8 @@ void ElfLinkerM68k::relocate1(const Relocation *rel, byte *location, upx_uint64_
|
||||
|
||||
void ElfLinkerMipsBE::relocate1(const Relocation *rel, byte *location, upx_uint64_t value,
|
||||
const char *type) {
|
||||
#define MIPS_HI(a) (((a) >> 16) + (((a) &0x8000) >> 15))
|
||||
#define MIPS_LO(a) ((a) &0xffff)
|
||||
#define MIPS_HI(a) (((a) >> 16) + (((a) &0x8000) >> 15))
|
||||
#define MIPS_LO(a) ((a) &0xffff)
|
||||
#define MIPS_PC16(a) ((a) >> 2)
|
||||
#define MIPS_PC26(a) (((a) &0x0fffffff) >> 2)
|
||||
|
||||
@ -754,8 +754,8 @@ void ElfLinkerMipsBE::relocate1(const Relocation *rel, byte *location, upx_uint6
|
||||
|
||||
void ElfLinkerMipsLE::relocate1(const Relocation *rel, byte *location, upx_uint64_t value,
|
||||
const char *type) {
|
||||
#define MIPS_HI(a) (((a) >> 16) + (((a) &0x8000) >> 15))
|
||||
#define MIPS_LO(a) ((a) &0xffff)
|
||||
#define MIPS_HI(a) (((a) >> 16) + (((a) &0x8000) >> 15))
|
||||
#define MIPS_LO(a) ((a) &0xffff)
|
||||
#define MIPS_PC16(a) ((a) >> 2)
|
||||
#define MIPS_PC26(a) (((a) &0x0fffffff) >> 2)
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
static const CLANG_FORMAT_DUMMY_STATEMENT
|
||||
#include "stub/i086-dos16.exe.h"
|
||||
|
||||
#define MAXMATCH 0x2000
|
||||
#define MAXMATCH 0x2000
|
||||
#define MAXRELOCSIZE (0x8000 - MAXMATCH)
|
||||
|
||||
#define DI_LIMIT 0xff00 // see the assembly why
|
||||
|
||||
@ -39,24 +39,24 @@
|
||||
static const CLANG_FORMAT_DUMMY_STATEMENT
|
||||
#include "stub/mipsel.r3000-ps1.h"
|
||||
|
||||
#define CD_SEC 2048
|
||||
#define PS_HDR_SIZE CD_SEC
|
||||
#define PS_RAM_SIZE ram_size
|
||||
#define PS_MIN_SIZE (PS_HDR_SIZE * 3)
|
||||
#define PS_MAX_SIZE ((PS_RAM_SIZE * 95) / 100)
|
||||
#define CD_SEC 2048
|
||||
#define PS_HDR_SIZE CD_SEC
|
||||
#define PS_RAM_SIZE ram_size
|
||||
#define PS_MIN_SIZE (PS_HDR_SIZE * 3)
|
||||
#define PS_MAX_SIZE ((PS_RAM_SIZE * 95) / 100)
|
||||
#define PS_STACK_SIZE (PS_RAM_SIZE / 256)
|
||||
|
||||
#define SZ_IH_BKUP (10 * sizeof(LE32))
|
||||
#define SZ_IH_BKUP (10 * sizeof(LE32))
|
||||
#define HD_CODE_OFS (sizeof(ps1_exe_t) + sz_cbh)
|
||||
|
||||
#define K0_BS (0x80000000)
|
||||
#define K1_BS (0xa0000000)
|
||||
#define EXE_BS (ih.epc & K0_BS)
|
||||
#define K0_BS (0x80000000)
|
||||
#define K1_BS (0xa0000000)
|
||||
#define EXE_BS (ih.epc & K0_BS)
|
||||
#define FIX_PSVR ((K1_BS - EXE_BS) + (PS_HDR_SIZE - HD_CODE_OFS))
|
||||
|
||||
// lui / addiu
|
||||
#define MIPS_HI(a) (((a) >> 16) + (((a) &0x8000) >> 15))
|
||||
#define MIPS_LO(a) ((a) &0xffff)
|
||||
#define MIPS_HI(a) (((a) >> 16) + (((a) &0x8000) >> 15))
|
||||
#define MIPS_LO(a) ((a) &0xffff)
|
||||
#define MIPS_PC16(a) ((a) >> 2)
|
||||
#define MIPS_PC26(a) (((a) &0x0fffffff) >> 2)
|
||||
|
||||
@ -340,21 +340,21 @@ void PackPs1::buildLoader(const Filter *) {
|
||||
|
||||
#define OPTYPE(x) (((x) >> 13) & 0x7)
|
||||
#define OPCODE(x) (((x) >> 10) & 0x7)
|
||||
#define REG1(x) (((x) >> 5) & 0x1f)
|
||||
#define REG2(x) ((x) &0x1f)
|
||||
#define REG1(x) (((x) >> 5) & 0x1f)
|
||||
#define REG2(x) ((x) &0x1f)
|
||||
|
||||
#define MIPS_IMM(a, b) ((((a) - (((b) &0x8000) >> 15)) << 16) | (b))
|
||||
|
||||
// Type
|
||||
#define REGIMM 1
|
||||
#define STORE 5
|
||||
#define STORE 5
|
||||
// Op
|
||||
#define LUI 7
|
||||
#define ADDIU 1
|
||||
#define SW 3
|
||||
#define LUI 7
|
||||
#define ADDIU 1
|
||||
#define SW 3
|
||||
|
||||
#define IS_LUI(a) ((OPTYPE(a) == REGIMM && OPCODE(a) == LUI))
|
||||
#define IS_ADDIU(a) ((OPTYPE(a) == REGIMM && OPCODE(a) == ADDIU))
|
||||
#define IS_LUI(a) ((OPTYPE(a) == REGIMM && OPCODE(a) == LUI))
|
||||
#define IS_ADDIU(a) ((OPTYPE(a) == REGIMM && OPCODE(a) == ADDIU))
|
||||
#define IS_SW_ZERO(a) ((OPTYPE(a) == STORE && OPCODE(a) == SW) && REG2(a) == 0)
|
||||
|
||||
#define BSS_CHK_LIMIT (18)
|
||||
|
||||
@ -87,7 +87,7 @@ void PackTmt::buildLoader(const Filter *ft) {
|
||||
**************************************************************************/
|
||||
|
||||
int PackTmt::readFileHeader() {
|
||||
#define H(x) get_le16(h + 2 * (x))
|
||||
#define H(x) get_le16(h + 2 * (x))
|
||||
#define H4(x) get_le32(h + (x))
|
||||
byte h[0x40];
|
||||
int ic;
|
||||
|
||||
@ -223,13 +223,13 @@ void PackTos::buildLoader(const Filter *ft) {
|
||||
/* flags for curproc->memflags */
|
||||
/* also used for program headers fh_flag */
|
||||
#define F_FASTLOAD 0x01 // don't zero heap
|
||||
#define F_ALTLOAD 0x02 // OK to load in alternate ram
|
||||
#define F_ALTLOAD 0x02 // OK to load in alternate ram
|
||||
#define F_ALTALLOC 0x04 // OK to malloc from alt. ram
|
||||
#define F_SMALLTPA 0x08
|
||||
// used in MagiC: TPA can be allocated as specified in the program header
|
||||
// rather than the biggest free memory block
|
||||
#define F_MEMFLAGS 0xf0 // reserved for future use
|
||||
#define F_SHTEXT 0x800 // program's text may be shared
|
||||
#define F_MEMFLAGS 0xf0 // reserved for future use
|
||||
#define F_SHTEXT 0x800 // program's text may be shared
|
||||
|
||||
#define F_MINALT 0xf0000000 // used to decide which type of RAM to load in
|
||||
|
||||
@ -243,11 +243,11 @@ void PackTos::buildLoader(const Filter *ft) {
|
||||
/* flags for curproc->memflags (that is, fh_flag) and also Mxalloc mode. */
|
||||
/* (Actually, when users call Mxalloc, they add 0x10 to what you see here) */
|
||||
#define F_PROTMODE 0xf0 // protection mode bits
|
||||
#define F_PROT_P 0x00 // no read or write
|
||||
#define F_PROT_G 0x10 // any access OK
|
||||
#define F_PROT_S 0x20 // any super access OK
|
||||
#define F_PROT_PR 0x30 // any read OK, no write
|
||||
#define F_PROT_I 0x40 // invalid page
|
||||
#define F_PROT_P 0x00 // no read or write
|
||||
#define F_PROT_G 0x10 // any access OK
|
||||
#define F_PROT_S 0x20 // any super access OK
|
||||
#define F_PROT_PR 0x30 // any read OK, no write
|
||||
#define F_PROT_I 0x40 // invalid page
|
||||
|
||||
/*************************************************************************
|
||||
// util
|
||||
|
||||
@ -36,11 +36,11 @@
|
||||
static const CLANG_FORMAT_DUMMY_STATEMENT
|
||||
#include "stub/i386-dos32.watcom.le.h"
|
||||
|
||||
#define LEOF_READ (1 << 0)
|
||||
#define LEOF_WRITE (1 << 1)
|
||||
#define LEOF_EXEC (1 << 2)
|
||||
#define LEOF_READ (1 << 0)
|
||||
#define LEOF_WRITE (1 << 1)
|
||||
#define LEOF_EXEC (1 << 2)
|
||||
#define LEOF_PRELOAD (1 << 6)
|
||||
#define LEOF_HUGE32 (1 << 13)
|
||||
#define LEOF_HUGE32 (1 << 13)
|
||||
|
||||
#define IOT(x, y) iobject_table[x].y
|
||||
#define OOT(x, y) oobject_table[x].y
|
||||
@ -56,14 +56,14 @@ static const CLANG_FORMAT_DUMMY_STATEMENT
|
||||
#define Opt_debug opt->debug.debug_level
|
||||
#else
|
||||
#define dputc(x, y) ((void) 0)
|
||||
#define Opt_debug 0
|
||||
#define Opt_debug 0
|
||||
#endif
|
||||
|
||||
#define my_base_address reserved
|
||||
#define objects ih.object_table_entries
|
||||
#define pages ih.memory_pages
|
||||
#define mps ih.memory_page_size
|
||||
#define opages oh.memory_pages
|
||||
#define objects ih.object_table_entries
|
||||
#define pages ih.memory_pages
|
||||
#define mps ih.memory_page_size
|
||||
#define opages oh.memory_pages
|
||||
|
||||
/*************************************************************************
|
||||
//
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
#include "linker.h"
|
||||
|
||||
#define FILLVAL 0
|
||||
#define import my_import // "import" is a keyword since C++20
|
||||
#define import my_import // "import" is a keyword since C++20
|
||||
|
||||
/*************************************************************************
|
||||
//
|
||||
@ -60,7 +60,7 @@ static void xcheck(const void *p, size_t plen, const void *b, size_t blen) {
|
||||
// #define imemset(a,b,c) ICHECK(a,c), memset(a,b,c)
|
||||
// #define omemset(a,b,c) OCHECK(a,c), memset(a,b,c)
|
||||
// #define imemcpy(a,b,c) ICHECK(a,c), memcpy(a,b,c)
|
||||
#define omemcpy(a, b, c) OCHECK(a, c), memcpy(a, b, c)
|
||||
#define omemcpy(a, b, c) OCHECK(a, c), memcpy(a, b, c)
|
||||
#define omemmove(a, b, c) OCHECK(a, c), memmove(a, b, c)
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
@ -146,8 +146,8 @@ void MemBuffer::fill(unsigned off, unsigned len, int value) {
|
||||
|
||||
// for use_simple_mcheck()
|
||||
#define PTR_BITS32(p) ((unsigned) ((upx_uintptr_t) (p) &0xffffffff))
|
||||
#define MAGIC1(p) ((PTR_BITS32(p) ^ 0xfefdbeeb) | 1)
|
||||
#define MAGIC2(p) ((PTR_BITS32(p) ^ 0xfefdbeeb ^ 0x88224411) | 1)
|
||||
#define MAGIC1(p) ((PTR_BITS32(p) ^ 0xfefdbeeb) | 1)
|
||||
#define MAGIC2(p) ((PTR_BITS32(p) ^ 0xfefdbeeb ^ 0x88224411) | 1)
|
||||
|
||||
void MemBuffer::checkState() const {
|
||||
if (!ptr)
|
||||
|
||||
@ -131,7 +131,7 @@ inline typename MemBufferBase<T>::pointer raw_index_bytes(const MemBufferBase<T>
|
||||
#define XSPAN_REQUIRES_CONVERTIBLE_ANY_DIRECTION(A, B, RType) \
|
||||
typename std::enable_if<std::is_same<A, B>::value, RType>::type
|
||||
#endif
|
||||
#define C MemBufferBase
|
||||
#define C MemBufferBase
|
||||
#define XSPAN_FWD_C_IS_MEMBUFFER 1
|
||||
#if WITH_XSPAN >= 1
|
||||
#define D XSPAN_NS(Ptr)
|
||||
|
||||
@ -53,8 +53,8 @@ upx_rsize_t upx_safe_strlen(const char *);
|
||||
#undef snprintf
|
||||
#undef sprintf
|
||||
#undef vsnprintf
|
||||
#define snprintf upx_safe_snprintf
|
||||
#define sprintf ERROR_sprintf_IS_DANGEROUS_USE_snprintf
|
||||
#define snprintf upx_safe_snprintf
|
||||
#define sprintf ERROR_sprintf_IS_DANGEROUS_USE_snprintf
|
||||
#define vsnprintf upx_safe_vsnprintf
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
@ -29,10 +29,10 @@
|
||||
#include <algorithm>
|
||||
#define ACC_WANT_ACC_INCI_H 1
|
||||
#include "../miniacc.h"
|
||||
#define ACC_WANT_ACCLIB_GETOPT 1
|
||||
#define ACC_WANT_ACCLIB_HSREAD 1
|
||||
#define ACC_WANT_ACCLIB_MISC 1
|
||||
#define ACC_WANT_ACCLIB_VGET 1
|
||||
#define ACC_WANT_ACCLIB_GETOPT 1
|
||||
#define ACC_WANT_ACCLIB_HSREAD 1
|
||||
#define ACC_WANT_ACCLIB_MISC 1
|
||||
#define ACC_WANT_ACCLIB_VGET 1
|
||||
#define ACC_WANT_ACCLIB_WILDARGV 1
|
||||
#undef HAVE_MKDIR
|
||||
#include "../miniacc.h"
|
||||
@ -645,18 +645,18 @@ const LEPolicy le_policy;
|
||||
ACC_OS_TOS || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
|
||||
|
||||
static const char dir_sep[] = "/\\";
|
||||
#define fn_is_drive(s) (s[0] && s[1] == ':')
|
||||
#define fn_is_sep(c) (strchr(dir_sep, c) != nullptr)
|
||||
#define fn_is_drive(s) (s[0] && s[1] == ':')
|
||||
#define fn_is_sep(c) (strchr(dir_sep, c) != nullptr)
|
||||
#define fn_skip_drive(s) (fn_is_drive(s) ? (s) + 2 : (s))
|
||||
#define fn_tolower(c) (tolower(((uchar) (c))))
|
||||
#define fn_tolower(c) (tolower(((uchar) (c))))
|
||||
|
||||
#else
|
||||
|
||||
// static const char dir_sep[] = "/";
|
||||
#define fn_is_drive(s) (0)
|
||||
#define fn_is_sep(c) ((c) == '/')
|
||||
#define fn_is_drive(s) (0)
|
||||
#define fn_is_sep(c) ((c) == '/')
|
||||
#define fn_skip_drive(s) (s)
|
||||
#define fn_tolower(c) (c)
|
||||
#define fn_tolower(c) (c)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -100,14 +100,14 @@ using XSPAN_NAMESPACE_NAME::raw_index_bytes; // overloaded for all classes
|
||||
// unchecked - just a no-op pointer wrapper, no extra functionality
|
||||
|
||||
// types
|
||||
#define XSPAN_0(type) Ptr<type>
|
||||
#define XSPAN_P(type) Ptr<type>
|
||||
#define XSPAN_S(type) Ptr<type>
|
||||
#define XSPAN_0(type) Ptr<type>
|
||||
#define XSPAN_P(type) Ptr<type>
|
||||
#define XSPAN_S(type) Ptr<type>
|
||||
|
||||
// create a value
|
||||
#define XSPAN_0_MAKE(type, first, ...) (XSPAN_0(type)((first)))
|
||||
#define XSPAN_P_MAKE(type, first, ...) (XSPAN_P(type)((first)))
|
||||
#define XSPAN_S_MAKE(type, first, ...) (XSPAN_S(type)((first)))
|
||||
#define XSPAN_0_MAKE(type, first, ...) (XSPAN_0(type)((first)))
|
||||
#define XSPAN_P_MAKE(type, first, ...) (XSPAN_P(type)((first)))
|
||||
#define XSPAN_S_MAKE(type, first, ...) (XSPAN_S(type)((first)))
|
||||
|
||||
// define a variable
|
||||
#define XSPAN_0_VAR(type, var, first, ...) XSPAN_0(type) var((first))
|
||||
@ -133,14 +133,14 @@ inline R *xspan_make_helper__(R * /*dummy*/, MemBuffer &mb) noexcept {
|
||||
}
|
||||
|
||||
// types
|
||||
#define XSPAN_0(type) type *
|
||||
#define XSPAN_P(type) type *
|
||||
#define XSPAN_S(type) type *
|
||||
#define XSPAN_0(type) type *
|
||||
#define XSPAN_P(type) type *
|
||||
#define XSPAN_S(type) type *
|
||||
|
||||
// create a value
|
||||
#define XSPAN_0_MAKE(type, first, ...) (xspan_make_helper__((type *) nullptr, (first)))
|
||||
#define XSPAN_P_MAKE(type, first, ...) (xspan_make_helper__((type *) nullptr, (first)))
|
||||
#define XSPAN_S_MAKE(type, first, ...) (xspan_make_helper__((type *) nullptr, (first)))
|
||||
#define XSPAN_0_MAKE(type, first, ...) (xspan_make_helper__((type *) nullptr, (first)))
|
||||
#define XSPAN_P_MAKE(type, first, ...) (xspan_make_helper__((type *) nullptr, (first)))
|
||||
#define XSPAN_S_MAKE(type, first, ...) (xspan_make_helper__((type *) nullptr, (first)))
|
||||
|
||||
// define a variable
|
||||
#define XSPAN_0_VAR(type, var, first, ...) type *var = XSPAN_0_MAKE(type, (first))
|
||||
@ -155,17 +155,17 @@ inline R *xspan_make_helper__(R * /*dummy*/, MemBuffer &mb) noexcept {
|
||||
|
||||
#if 1
|
||||
// types
|
||||
#define SPAN_0 XSPAN_0
|
||||
#define SPAN_P XSPAN_P
|
||||
#define SPAN_S XSPAN_S
|
||||
#define SPAN_0 XSPAN_0
|
||||
#define SPAN_P XSPAN_P
|
||||
#define SPAN_S XSPAN_S
|
||||
// create a value
|
||||
#define SPAN_0_MAKE XSPAN_0_MAKE
|
||||
#define SPAN_P_MAKE XSPAN_P_MAKE
|
||||
#define SPAN_S_MAKE XSPAN_S_MAKE
|
||||
// define a variable
|
||||
#define SPAN_0_VAR XSPAN_0_VAR
|
||||
#define SPAN_P_VAR XSPAN_P_VAR
|
||||
#define SPAN_S_VAR XSPAN_S_VAR
|
||||
#define SPAN_0_VAR XSPAN_0_VAR
|
||||
#define SPAN_P_VAR XSPAN_P_VAR
|
||||
#define SPAN_S_VAR XSPAN_S_VAR
|
||||
#endif
|
||||
|
||||
/* vim:set ts=4 sw=4 et: */
|
||||
|
||||
@ -29,14 +29,14 @@
|
||||
#if WITH_XSPAN
|
||||
|
||||
#if 1
|
||||
#define XSPAN_NAMESPACE_NAME XSpan
|
||||
#define XSPAN_NAMESPACE_NAME XSpan
|
||||
#define XSPAN_NAMESPACE_BEGIN namespace XSPAN_NAMESPACE_NAME {
|
||||
#define XSPAN_NAMESPACE_END }
|
||||
#define XSPAN_NS(x) XSPAN_NAMESPACE_NAME ::x
|
||||
#define XSPAN_NAMESPACE_END }
|
||||
#define XSPAN_NS(x) XSPAN_NAMESPACE_NAME ::x
|
||||
#else
|
||||
#define XSPAN_NAMESPACE_BEGIN /*empty*/
|
||||
#define XSPAN_NAMESPACE_END /*empty*/
|
||||
#define XSPAN_NS(x) ::x
|
||||
#define XSPAN_NS(x) ::x
|
||||
#endif
|
||||
|
||||
XSPAN_NAMESPACE_BEGIN
|
||||
|
||||
Loading…
Reference in New Issue
Block a user