@@ -158,7 +158,8 @@ required, but is kept for backwards compatibility.
158158 * XXX Should really be a Configure probe, with HAS__FUNCTION__
159159 * and FUNCTION__ as results.
160160 * XXX Similarly, a Configure probe for __FILE__ and __LINE__ is needed. */
161- #if (defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L ) || (defined(__SUNPRO_C )) /* C99 or close enough. */
161+ #if (defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L ) || \
162+ (defined(__SUNPRO_C )) /* C99 or close enough. */
162163# define FUNCTION__ __func__
163164# define SAFE_FUNCTION__ __func__
164165#elif (defined(__DECC_VER )) /* Tru64 or VMS, and strict C89 being used, but not modern enough cc (in Tru64, -c99 not known, only -std1). */
@@ -485,7 +486,8 @@ Perl_xxx(aTHX_ ...) form for any API calls where it's used.
485486 Perl_sv_catxmlpvn(aTHX_ dsv, STR_WITH_LEN(str), utf8)
486487
487488
488- #define lex_stuff_pvs (pv ,flags ) Perl_lex_stuff_pvn(aTHX_ STR_WITH_LEN(pv), flags)
489+ #define lex_stuff_pvs (pv ,flags ) \
490+ Perl_lex_stuff_pvn(aTHX_ STR_WITH_LEN(pv), flags)
489491
490492#define get_cvs (str , flags ) \
491493 Perl_get_cvn_flags(aTHX_ STR_WITH_LEN(str), (flags))
@@ -712,7 +714,8 @@ based on the underlying C library functions):
712714#define strnNE (s1 ,s2 ,l ) (strncmp(s1,s2,l) != 0)
713715#define strnEQ (s1 ,s2 ,l ) (strncmp(s1,s2,l) == 0)
714716
715- #define memEQ (s1 ,s2 ,l ) (memcmp(((const void *) (s1)), ((const void *) (s2)), l) == 0)
717+ #define memEQ (s1 ,s2 ,l ) \
718+ (memcmp(((const void *) (s1)), ((const void *) (s2)), l) == 0)
716719#define memNE (s1 ,s2 ,l ) (! memEQ(s1,s2,l))
717720
718721/* memEQ and memNE where second comparand is a string constant */
@@ -744,7 +747,8 @@ based on the underlying C library functions):
744747#define memGT (s1 ,s2 ,l ) (memcmp(s1,s2,l) > 0)
745748#define memGE (s1 ,s2 ,l ) (memcmp(s1,s2,l) >= 0)
746749
747- #define memCHRs (s1 ,c ) ((const char *) memchr(ASSERT_IS_LITERAL(s1) , c, sizeof(s1)-1))
750+ #define memCHRs (s1 ,c ) \
751+ ((const char *) memchr(ASSERT_IS_LITERAL(s1) , c, sizeof(s1)-1))
748752
749753/*
750754 * Character classes.
@@ -1666,7 +1670,8 @@ END_EXTERN_C
16661670# define isPUNCT_A (c ) generic_isCC_A_(c, CC_PUNCT_)
16671671# define isSPACE_A (c ) generic_isCC_A_(c, CC_SPACE_)
16681672# define isWORDCHAR_A (c ) generic_isCC_A_(c, CC_WORDCHAR_)
1669- # define isXDIGIT_A (c ) generic_isCC_(c, CC_XDIGIT_) /* No non-ASCII xdigits */
1673+ # define isXDIGIT_A (c ) generic_isCC_(c, CC_XDIGIT_) /* No non-ASCII
1674+ xdigits */
16701675# define isIDFIRST_A (c ) generic_isCC_A_(c, CC_IDFIRST_)
16711676# define isALPHA_L1 (c ) generic_isCC_(c, CC_ALPHA_)
16721677# define isALPHANUMERIC_L1 (c ) generic_isCC_(c, CC_ALPHANUMERIC_)
@@ -2204,11 +2209,13 @@ END_EXTERN_C
22042209#define isPRINT_uvchr (c ) generic_invlist_uvchr_(CC_PRINT_, c)
22052210
22062211#define isPUNCT_uvchr (c ) generic_invlist_uvchr_(CC_PUNCT_, c)
2207- #define isSPACE_uvchr (c ) generic_uvchr_(CC_SPACE_, is_XPERLSPACE_cp_high, c)
2212+ #define isSPACE_uvchr (c ) \
2213+ generic_uvchr_(CC_SPACE_, is_XPERLSPACE_cp_high, c)
22082214#define isPSXSPC_uvchr (c ) isSPACE_uvchr(c)
22092215
22102216#define isUPPER_uvchr (c ) generic_invlist_uvchr_(CC_UPPER_, c)
2211- #define isVERTWS_uvchr (c ) generic_uvchr_(CC_VERTSPACE_, is_VERTWS_cp_high, c)
2217+ #define isVERTWS_uvchr (c ) \
2218+ generic_uvchr_(CC_VERTSPACE_, is_VERTWS_cp_high, c)
22122219#define isWORDCHAR_uvchr (c ) generic_invlist_uvchr_(CC_WORDCHAR_, c)
22132220#define isXDIGIT_uvchr (c ) generic_uvchr_(CC_XDIGIT_, is_XDIGIT_cp_high, c)
22142221
@@ -2749,7 +2756,8 @@ PoisonWith(0xEF) for catching access to freed memory.
27492756
27502757#define MEM_SIZE_MAX ((MEM_SIZE)-1)
27512758
2752- #define _PERL_STRLEN_ROUNDUP_UNCHECKED (n ) (((n) - 1 + PERL_STRLEN_ROUNDUP_QUANTUM) & ~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM - 1))
2759+ #define _PERL_STRLEN_ROUNDUP_UNCHECKED (n ) \
2760+ (((n) - 1 + PERL_STRLEN_ROUNDUP_QUANTUM) & ~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM - 1))
27532761
27542762#ifdef PERL_MALLOC_WRAP
27552763
@@ -2803,7 +2811,8 @@ PoisonWith(0xEF) for catching access to freed memory.
28032811
28042812# define MEM_WRAP_CHECK_ (n ,t ) MEM_WRAP_CHECK(n,t),
28052813
2806- # define PERL_STRLEN_ROUNDUP (n ) ((void)(((n) > MEM_SIZE_MAX - 2 * PERL_STRLEN_ROUNDUP_QUANTUM) ? (croak_memory_wrap(),0) : 0), _PERL_STRLEN_ROUNDUP_UNCHECKED(n))
2814+ # define PERL_STRLEN_ROUNDUP (n ) \
2815+ ((void)(((n) > MEM_SIZE_MAX - 2 * PERL_STRLEN_ROUNDUP_QUANTUM) ? (croak_memory_wrap(),0) : 0), _PERL_STRLEN_ROUNDUP_UNCHECKED(n))
28072816#else
28082817
28092818# define MEM_WRAP_CHECK (n ,t )
@@ -2863,9 +2872,12 @@ enum mem_log_type {
28632872#endif
28642873
28652874#ifdef PERL_MEM_LOG
2866- #define MEM_LOG_ALLOC (n ,t ,a ) Perl_mem_log_alloc(n,sizeof(t),STRINGIFY(t),a,__FILE__,__LINE__,FUNCTION__)
2867- #define MEM_LOG_REALLOC (n ,t ,v ,a ) Perl_mem_log_realloc(n,sizeof(t),STRINGIFY(t),v,a,__FILE__,__LINE__,FUNCTION__)
2868- #define MEM_LOG_FREE (a ) Perl_mem_log_free(a,__FILE__,__LINE__,FUNCTION__)
2875+ #define MEM_LOG_ALLOC (n ,t ,a ) \
2876+ Perl_mem_log_alloc(n,sizeof(t),STRINGIFY(t),a,__FILE__,__LINE__,FUNCTION__)
2877+ #define MEM_LOG_REALLOC (n ,t ,v ,a ) \
2878+ Perl_mem_log_realloc(n,sizeof(t),STRINGIFY(t),v,a,__FILE__,__LINE__,FUNCTION__)
2879+ #define MEM_LOG_FREE (a ) \
2880+ Perl_mem_log_free(a,__FILE__,__LINE__,FUNCTION__)
28692881#endif
28702882
28712883#ifndef MEM_LOG_ALLOC
@@ -2878,9 +2890,12 @@ enum mem_log_type {
28782890#define MEM_LOG_FREE (a ) (a)
28792891#endif
28802892
2881- #define Newx (v ,n ,t ) (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
2882- #define Newxc (v ,n ,t ,c ) (v = (MEM_WRAP_CHECK_(n,t) (c*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
2883- #define Newxz (v ,n ,t ) (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safecalloc((n),sizeof(t)))))
2893+ #define Newx (v ,n ,t ) \
2894+ (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
2895+ #define Newxc (v ,n ,t ,c ) \
2896+ (v = (MEM_WRAP_CHECK_(n,t) (c*)MEM_LOG_ALLOC(n,t,safemalloc((MEM_SIZE)((n)*sizeof(t))))))
2897+ #define Newxz (v ,n ,t ) \
2898+ (v = (MEM_WRAP_CHECK_(n,t) (t*)MEM_LOG_ALLOC(n,t,safecalloc((n),sizeof(t)))))
28842899
28852900#ifndef PERL_CORE
28862901/* pre 5.9.x compatibility */
@@ -2907,16 +2922,23 @@ enum mem_log_type {
29072922#define perl_assert_ptr (p ) assert( ((void*)(p)) != 0 )
29082923
29092924
2910- #define Move (s ,d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), (void)memmove((char*)(d),(const char*)(s), (n) * sizeof(t)))
2911- #define Copy (s ,d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), (void)memcpy((char*)(d),(const char*)(s), (n) * sizeof(t)))
2912- #define Zero (d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), (void)memzero((char*)(d), (n) * sizeof(t)))
2925+ #define Move (s ,d ,n ,t ) \
2926+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), (void)memmove((char*)(d),(const char*)(s), (n) * sizeof(t)))
2927+ #define Copy (s ,d ,n ,t ) \
2928+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), (void)memcpy((char*)(d),(const char*)(s), (n) * sizeof(t)))
2929+ #define Zero (d ,n ,t ) \
2930+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), (void)memzero((char*)(d), (n) * sizeof(t)))
29132931
29142932/* Like above, but returns a pointer to 'd' */
2915- #define MoveD (s ,d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), memmove((char*)(d),(const char*)(s), (n) * sizeof(t)))
2916- #define CopyD (s ,d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), memcpy((char*)(d),(const char*)(s), (n) * sizeof(t)))
2917- #define ZeroD (d ,n ,t ) (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), memzero((char*)(d), (n) * sizeof(t)))
2918-
2919- #define PoisonWith (d ,n ,t ,b ) (MEM_WRAP_CHECK_(n,t) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t)))
2933+ #define MoveD (s ,d ,n ,t ) \
2934+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), memmove((char*)(d),(const char*)(s), (n) * sizeof(t)))
2935+ #define CopyD (s ,d ,n ,t ) \
2936+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), perl_assert_ptr(s), memcpy((char*)(d),(const char*)(s), (n) * sizeof(t)))
2937+ #define ZeroD (d ,n ,t ) \
2938+ (MEM_WRAP_CHECK_(n,t) perl_assert_ptr(d), memzero((char*)(d), (n) * sizeof(t)))
2939+
2940+ #define PoisonWith (d ,n ,t ,b ) \
2941+ (MEM_WRAP_CHECK_(n,t) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t)))
29202942#define PoisonNew (d ,n ,t ) PoisonWith(d,n,t,0xAB)
29212943#define PoisonFree (d ,n ,t ) PoisonWith(d,n,t,0xEF)
29222944#define Poison (d ,n ,t ) PoisonFree(d,n,t)
0 commit comments