diff --git a/EXTERN.h b/EXTERN.h index 8def9173a2fd..4aa398a1aa25 100644 --- a/EXTERN.h +++ b/EXTERN.h @@ -23,32 +23,32 @@ # if defined(WIN32) && !defined(PERL_STATIC_SYMS) /* miniperl should not export anything */ # if defined(PERL_IS_MINIPERL) -# define EXT extern +# define EXT extern # define dEXT -# define EXTCONST extern const -# define dEXTCONST const +# define EXTCONST extern const +# define dEXTCONST const # elif defined(PERLDLL) -# define EXT EXTERN_C __declspec(dllexport) +# define EXT EXTERN_C __declspec(dllexport) # define dEXT -# define EXTCONST EXTERN_C __declspec(dllexport) const -# define dEXTCONST const +# define EXTCONST EXTERN_C __declspec(dllexport) const +# define dEXTCONST const # else -# define EXT EXTERN_C __declspec(dllimport) +# define EXT EXTERN_C __declspec(dllimport) # define dEXT -# define EXTCONST EXTERN_C __declspec(dllimport) const -# define dEXTCONST const +# define EXTCONST EXTERN_C __declspec(dllimport) const +# define dEXTCONST const # endif # else # if defined(__CYGWIN__) && defined(USEIMPORTLIB) -# define EXT extern __declspec(dllimport) +# define EXT extern __declspec(dllimport) # define dEXT -# define EXTCONST extern __declspec(dllimport) const -# define dEXTCONST const +# define EXTCONST extern __declspec(dllimport) const +# define dEXTCONST const # else -# define EXT extern +# define EXT extern # define dEXT -# define EXTCONST extern const -# define dEXTCONST const +# define EXTCONST extern const +# define dEXTCONST const # endif # endif diff --git a/INTERN.h b/INTERN.h index 8969d6e44eb3..4843b678946a 100644 --- a/INTERN.h +++ b/INTERN.h @@ -19,31 +19,31 @@ # if (defined(WIN32) && defined(__MINGW32__) && ! defined(PERL_IS_MINIPERL)) # ifdef __cplusplus -# define EXT __declspec(dllexport) +# define EXT __declspec(dllexport) # define dEXT -# define EXTCONST __declspec(dllexport) extern const -# define dEXTCONST const +# define EXTCONST __declspec(dllexport) extern const +# define dEXTCONST const # else -# define EXT __declspec(dllexport) +# define EXT __declspec(dllexport) # define dEXT -# define EXTCONST __declspec(dllexport) const -# define dEXTCONST const +# define EXTCONST __declspec(dllexport) const +# define dEXTCONST const # endif # else # ifdef __cplusplus # define EXT # define dEXT -# define EXTCONST EXTERN_C const -# define dEXTCONST const +# define EXTCONST EXTERN_C const +# define dEXTCONST const # else # define EXT # define dEXT -# define EXTCONST const -# define dEXTCONST const +# define EXTCONST const +# define dEXTCONST const # endif # endif #undef INIT -#define INIT(x) = x +#define INIT(x) = x #define DOINIT diff --git a/XSUB.h b/XSUB.h index e5efa47405d1..0792209f4ffe 100644 --- a/XSUB.h +++ b/XSUB.h @@ -9,7 +9,7 @@ */ #ifndef PERL_XSUB_H_ -#define PERL_XSUB_H_ 1 +#define PERL_XSUB_H_ 1 /* first, some documentation for xsubpp-generated items */ @@ -108,13 +108,13 @@ C<$_> in scope. */ #ifndef PERL_UNUSED_ARG -# define PERL_UNUSED_ARG(x) ((void)sizeof(x)) +# define PERL_UNUSED_ARG(x) ((void)sizeof(x)) #endif #ifndef PERL_UNUSED_VAR -# define PERL_UNUSED_VAR(x) ((void)sizeof(x)) +# define PERL_UNUSED_VAR(x) ((void)sizeof(x)) #endif -#define ST(off) PL_stack_base[ax + (off)] +#define ST(off) PL_stack_base[ax + (off)] /* XSPROTO() is also used by SWIG like this: * @@ -133,36 +133,36 @@ C<$_> in scope. * ie. it exports XSUB symbols. You probably don't want that. */ -#define XSPROTO(name) void name(pTHX_ CV* cv __attribute__unused__) +#define XSPROTO(name) void name(pTHX_ CV* cv __attribute__unused__) #undef XS #undef XS_EXTERNAL #undef XS_INTERNAL #if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) -# define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name) -# define XS_INTERNAL(name) STATIC XSPROTO(name) +# define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name) +# define XS_INTERNAL(name) STATIC XSPROTO(name) #elif defined(__cplusplus) -# define XS_EXTERNAL(name) extern "C" XSPROTO(name) -# define XS_INTERNAL(name) static XSPROTO(name) +# define XS_EXTERNAL(name) extern "C" XSPROTO(name) +# define XS_INTERNAL(name) static XSPROTO(name) #elif defined(HASATTRIBUTE_UNUSED) -# define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) -# define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__) +# define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) +# define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__) #else -# define XS_EXTERNAL(name) XSPROTO(name) -# define XS_INTERNAL(name) STATIC XSPROTO(name) +# define XS_EXTERNAL(name) XSPROTO(name) +# define XS_INTERNAL(name) STATIC XSPROTO(name) #endif /* We do export xsub symbols by default for the public XS macro. Try * explicitly using XS_INTERNAL/XS_EXTERNAL instead, please. */ -#define XS(name) XS_EXTERNAL(name) +#define XS(name) XS_EXTERNAL(name) -#define dAX const I32 ax = (I32)(MARK - PL_stack_base + 1) +#define dAX const I32 ax = (I32)(MARK - PL_stack_base + 1) #define dAXMARK \ I32 ax = POPMARK; \ SV **mark = PL_stack_base + ax++ -#define dITEMS I32 items = (I32)(SP - MARK) +#define dITEMS I32 items = (I32)(SP - MARK) #define dXSARGS \ dSP; dAXMARK; dITEMS @@ -190,26 +190,26 @@ C<$_> in scope. ? PAD_SV(PL_op->op_targ) : sv_newmortal()) /* Should be used before final PUSHi etc. if not in PPCODE section. */ -#define XSprePUSH (sp = PL_stack_base + ax - 1) +#define XSprePUSH (sp = PL_stack_base + ax - 1) -#define XSANY CvXSUBANY(cv) +#define XSANY CvXSUBANY(cv) -#define dXSI32 I32 ix = XSANY.any_i32 +#define dXSI32 I32 ix = XSANY.any_i32 #ifdef __cplusplus -# define XSINTERFACE_CVT(ret,name) ret (*name)(...) -# define XSINTERFACE_CVT_ANON(ret) ret (*)(...) +# define XSINTERFACE_CVT(ret,name) ret (*name)(...) +# define XSINTERFACE_CVT_ANON(ret) ret (*)(...) #else -# define XSINTERFACE_CVT(ret,name) ret (*name)() -# define XSINTERFACE_CVT_ANON(ret) ret (*)() +# define XSINTERFACE_CVT(ret,name) ret (*name)() +# define XSINTERFACE_CVT_ANON(ret) ret (*)() #endif -#define dXSFUNCTION(ret) XSINTERFACE_CVT(ret,XSFUNCTION) -#define XSINTERFACE_FUNC(ret,cv,f) ((XSINTERFACE_CVT_ANON(ret))(f)) +#define dXSFUNCTION(ret) XSINTERFACE_CVT(ret,XSFUNCTION) +#define XSINTERFACE_FUNC(ret,cv,f) ((XSINTERFACE_CVT_ANON(ret))(f)) #define XSINTERFACE_FUNC_SET(cv,f) \ CvXSUBANY(cv).any_dxptr = (void (*) (pTHX_ void*))(f) -#define dUNDERBAR dNOOP -#define UNDERBAR find_rundefsv() +#define dUNDERBAR dNOOP +#define UNDERBAR find_rundefsv() /* Simple macros to put new mortal values onto the stack. */ /* Typically used to return values from XS functions. */ @@ -309,14 +309,14 @@ Rethrows a previously caught exception. See L. =cut */ -#define XST_mIV(i,v) (ST(i) = sv_2mortal(newSViv(v)) ) -#define XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) ) -#define XST_mNV(i,v) (ST(i) = sv_2mortal(newSVnv(v)) ) -#define XST_mPV(i,v) (ST(i) = sv_2mortal(newSVpv(v,0))) -#define XST_mPVN(i,v,n) (ST(i) = newSVpvn_flags(v,n, SVs_TEMP)) -#define XST_mNO(i) (ST(i) = &PL_sv_no ) -#define XST_mYES(i) (ST(i) = &PL_sv_yes ) -#define XST_mUNDEF(i) (ST(i) = &PL_sv_undef) +#define XST_mIV(i,v) (ST(i) = sv_2mortal(newSViv(v)) ) +#define XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) ) +#define XST_mNV(i,v) (ST(i) = sv_2mortal(newSVnv(v)) ) +#define XST_mPV(i,v) (ST(i) = sv_2mortal(newSVpv(v,0))) +#define XST_mPVN(i,v,n) (ST(i) = newSVpvn_flags(v,n, SVs_TEMP)) +#define XST_mNO(i) (ST(i) = &PL_sv_no ) +#define XST_mYES(i) (ST(i) = &PL_sv_yes ) +#define XST_mUNDEF(i) (ST(i) = &PL_sv_undef) #define XSRETURN(off) \ STMT_START { \ @@ -326,17 +326,17 @@ Rethrows a previously caught exception. See L. return; \ } STMT_END -#define XSRETURN_IV(v) STMT_START { XST_mIV(0,v); XSRETURN(1); } STMT_END -#define XSRETURN_UV(v) STMT_START { XST_mUV(0,v); XSRETURN(1); } STMT_END -#define XSRETURN_NV(v) STMT_START { XST_mNV(0,v); XSRETURN(1); } STMT_END -#define XSRETURN_PV(v) STMT_START { XST_mPV(0,v); XSRETURN(1); } STMT_END -#define XSRETURN_PVN(v,n) STMT_START { XST_mPVN(0,v,n); XSRETURN(1); } STMT_END -#define XSRETURN_NO STMT_START { XST_mNO(0); XSRETURN(1); } STMT_END -#define XSRETURN_YES STMT_START { XST_mYES(0); XSRETURN(1); } STMT_END -#define XSRETURN_UNDEF STMT_START { XST_mUNDEF(0); XSRETURN(1); } STMT_END -#define XSRETURN_EMPTY STMT_START { XSRETURN(0); } STMT_END +#define XSRETURN_IV(v) STMT_START { XST_mIV(0,v); XSRETURN(1); } STMT_END +#define XSRETURN_UV(v) STMT_START { XST_mUV(0,v); XSRETURN(1); } STMT_END +#define XSRETURN_NV(v) STMT_START { XST_mNV(0,v); XSRETURN(1); } STMT_END +#define XSRETURN_PV(v) STMT_START { XST_mPV(0,v); XSRETURN(1); } STMT_END +#define XSRETURN_PVN(v,n) STMT_START { XST_mPVN(0,v,n); XSRETURN(1); } STMT_END +#define XSRETURN_NO STMT_START { XST_mNO(0); XSRETURN(1); } STMT_END +#define XSRETURN_YES STMT_START { XST_mYES(0); XSRETURN(1); } STMT_END +#define XSRETURN_UNDEF STMT_START { XST_mUNDEF(0); XSRETURN(1); } STMT_END +#define XSRETURN_EMPTY STMT_START { XSRETURN(0); } STMT_END -#define newXSproto(a,b,c,d) newXS_flags(a,b,c,d,0) +#define newXSproto(a,b,c,d) newXS_flags(a,b,c,d,0) #ifdef XS_VERSION # define XS_VERSION_BOOTCHECK \ @@ -358,7 +358,7 @@ Rethrows a previously caught exception. See L. #else /* should this be a #error? if you want both checked, you better supply XS_VERSION right? */ -# define XS_BOTHVERSION_BOOTCHECK XS_APIVERSION_BOOTCHECK +# define XS_BOTHVERSION_BOOTCHECK XS_APIVERSION_BOOTCHECK #endif /* private API */ @@ -397,11 +397,11 @@ Rethrows a previously caught exception. See L. Perl_xs_handshake(HS_KEY(TRUE, TRUE, "", "") | HSf_NOCHK, HS_CXT, __FILE__) #ifdef NO_XSLOCKS -# define dXCPT dJMPENV; int rEtV = 0 -# define XCPT_TRY_START JMPENV_PUSH(rEtV); if (rEtV == 0) -# define XCPT_TRY_END JMPENV_POP; -# define XCPT_CATCH if (rEtV != 0) -# define XCPT_RETHROW JMPENV_JUMP(rEtV) +# define dXCPT dJMPENV; int rEtV = 0 +# define XCPT_TRY_START JMPENV_PUSH(rEtV); if (rEtV == 0) +# define XCPT_TRY_END JMPENV_POP; +# define XCPT_CATCH if (rEtV != 0) +# define XCPT_RETHROW JMPENV_JUMP(rEtV) #endif /* @@ -455,42 +455,42 @@ Rethrows a previously caught exception. See L. } STMT_END #if 1 /* for compatibility */ -# define VTBL_sv &PL_vtbl_sv -# define VTBL_env &PL_vtbl_env -# define VTBL_envelem &PL_vtbl_envelem -# define VTBL_sigelem &PL_vtbl_sigelem -# define VTBL_pack &PL_vtbl_pack -# define VTBL_packelem &PL_vtbl_packelem -# define VTBL_dbline &PL_vtbl_dbline -# define VTBL_isa &PL_vtbl_isa -# define VTBL_isaelem &PL_vtbl_isaelem -# define VTBL_arylen &PL_vtbl_arylen -# define VTBL_glob &PL_vtbl_glob -# define VTBL_mglob &PL_vtbl_mglob -# define VTBL_nkeys &PL_vtbl_nkeys -# define VTBL_taint &PL_vtbl_taint -# define VTBL_substr &PL_vtbl_substr -# define VTBL_vec &PL_vtbl_vec -# define VTBL_pos &PL_vtbl_pos -# define VTBL_bm &PL_vtbl_bm -# define VTBL_fm &PL_vtbl_fm -# define VTBL_uvar &PL_vtbl_uvar -# define VTBL_defelem &PL_vtbl_defelem -# define VTBL_regexp &PL_vtbl_regexp -# define VTBL_regdata &PL_vtbl_regdata -# define VTBL_regdatum &PL_vtbl_regdatum +# define VTBL_sv &PL_vtbl_sv +# define VTBL_env &PL_vtbl_env +# define VTBL_envelem &PL_vtbl_envelem +# define VTBL_sigelem &PL_vtbl_sigelem +# define VTBL_pack &PL_vtbl_pack +# define VTBL_packelem &PL_vtbl_packelem +# define VTBL_dbline &PL_vtbl_dbline +# define VTBL_isa &PL_vtbl_isa +# define VTBL_isaelem &PL_vtbl_isaelem +# define VTBL_arylen &PL_vtbl_arylen +# define VTBL_glob &PL_vtbl_glob +# define VTBL_mglob &PL_vtbl_mglob +# define VTBL_nkeys &PL_vtbl_nkeys +# define VTBL_taint &PL_vtbl_taint +# define VTBL_substr &PL_vtbl_substr +# define VTBL_vec &PL_vtbl_vec +# define VTBL_pos &PL_vtbl_pos +# define VTBL_bm &PL_vtbl_bm +# define VTBL_fm &PL_vtbl_fm +# define VTBL_uvar &PL_vtbl_uvar +# define VTBL_defelem &PL_vtbl_defelem +# define VTBL_regexp &PL_vtbl_regexp +# define VTBL_regdata &PL_vtbl_regdata +# define VTBL_regdatum &PL_vtbl_regdatum # ifdef USE_LOCALE_COLLATE -# define VTBL_collxfrm &PL_vtbl_collxfrm +# define VTBL_collxfrm &PL_vtbl_collxfrm # endif -# define VTBL_amagic &PL_vtbl_amagic -# define VTBL_amagicelem &PL_vtbl_amagicelem +# define VTBL_amagic &PL_vtbl_amagic +# define VTBL_amagicelem &PL_vtbl_amagicelem #endif #if defined(MULTIPLICITY) && !defined(PERL_NO_GET_CONTEXT) && !defined(PERL_CORE) # undef aTHX # undef aTHX_ -# define aTHX PERL_GET_THX -# define aTHX_ aTHX, +# define aTHX PERL_GET_THX +# define aTHX_ aTHX, #endif #if defined(PERL_IMPLICIT_SYS) && !defined(PERL_CORE) @@ -518,157 +518,157 @@ Rethrows a previously caught exception. See L. # undef socketpair -# define mkdir PerlDir_mkdir -# define chdir PerlDir_chdir -# define rmdir PerlDir_rmdir -# define closedir PerlDir_close -# define opendir PerlDir_open -# define readdir PerlDir_read -# define rewinddir PerlDir_rewind -# define seekdir PerlDir_seek -# define telldir PerlDir_tell -# define putenv PerlEnv_putenv -# define getenv PerlEnv_getenv -# define uname PerlEnv_uname -# define stdin PerlSIO_stdin -# define stdout PerlSIO_stdout -# define stderr PerlSIO_stderr -# define fopen PerlSIO_fopen -# define fclose PerlSIO_fclose -# define feof PerlSIO_feof -# define ferror PerlSIO_ferror -# define clearerr PerlSIO_clearerr -# define getc PerlSIO_getc -# define fgets PerlSIO_fgets -# define fputc PerlSIO_fputc -# define fputs PerlSIO_fputs -# define fflush PerlSIO_fflush -# define ungetc PerlSIO_ungetc -# define fileno PerlSIO_fileno -# define fdopen PerlSIO_fdopen -# define freopen PerlSIO_freopen -# define fread PerlSIO_fread -# define fwrite PerlSIO_fwrite -# define setbuf PerlSIO_setbuf -# define setvbuf PerlSIO_setvbuf -# define setlinebuf PerlSIO_setlinebuf -# define stdoutf PerlSIO_stdoutf -# define vfprintf PerlSIO_vprintf -# define ftell PerlSIO_ftell -# define fseek PerlSIO_fseek -# define fgetpos PerlSIO_fgetpos -# define fsetpos PerlSIO_fsetpos -# define frewind PerlSIO_rewind -# define tmpfile PerlSIO_tmpfile -# define access PerlLIO_access -# define chmod PerlLIO_chmod -# define chsize PerlLIO_chsize -# define close PerlLIO_close -# define dup PerlLIO_dup -# define dup2 PerlLIO_dup2 -# define flock PerlLIO_flock -# define fstat PerlLIO_fstat -# define ioctl PerlLIO_ioctl -# define isatty PerlLIO_isatty -# define link PerlLIO_link -# define lseek PerlLIO_lseek -# define lstat PerlLIO_lstat -# define mktemp PerlLIO_mktemp -# define open PerlLIO_open -# define read PerlLIO_read -# define rename PerlLIO_rename -# define setmode PerlLIO_setmode -# define stat(buf,sb) PerlLIO_stat(buf,sb) -# define tmpnam PerlLIO_tmpnam -# define umask PerlLIO_umask -# define unlink PerlLIO_unlink -# define utime PerlLIO_utime -# define write PerlLIO_write -# define malloc PerlMem_malloc -# define calloc PerlMem_calloc -# define realloc PerlMem_realloc -# define free PerlMem_free -# define abort PerlProc_abort -# define exit PerlProc_exit -# define _exit PerlProc__exit -# define execl PerlProc_execl -# define execv PerlProc_execv -# define execvp PerlProc_execvp -# define getuid PerlProc_getuid -# define geteuid PerlProc_geteuid -# define getgid PerlProc_getgid -# define getegid PerlProc_getegid -# define getlogin PerlProc_getlogin -# define kill PerlProc_kill -# define killpg PerlProc_killpg -# define pause PerlProc_pause -# define popen PerlProc_popen -# define pclose PerlProc_pclose -# define pipe PerlProc_pipe -# define setuid PerlProc_setuid -# define setgid PerlProc_setgid -# define sleep PerlProc_sleep -# define times PerlProc_times -# define wait PerlProc_wait -# define setjmp PerlProc_setjmp -# define longjmp PerlProc_longjmp -# define signal PerlProc_signal -# define getpid PerlProc_getpid -# define gettimeofday PerlProc_gettimeofday -# define htonl PerlSock_htonl -# define htons PerlSock_htons -# define ntohl PerlSock_ntohl -# define ntohs PerlSock_ntohs -# define accept PerlSock_accept -# define bind PerlSock_bind -# define connect PerlSock_connect -# define endhostent PerlSock_endhostent -# define endnetent PerlSock_endnetent -# define endprotoent PerlSock_endprotoent -# define endservent PerlSock_endservent -# define gethostbyaddr PerlSock_gethostbyaddr -# define gethostbyname PerlSock_gethostbyname -# define gethostent PerlSock_gethostent -# define gethostname PerlSock_gethostname -# define getnetbyaddr PerlSock_getnetbyaddr -# define getnetbyname PerlSock_getnetbyname -# define getnetent PerlSock_getnetent -# define getpeername PerlSock_getpeername -# define getprotobyname PerlSock_getprotobyname -# define getprotobynumber PerlSock_getprotobynumber -# define getprotoent PerlSock_getprotoent -# define getservbyname PerlSock_getservbyname -# define getservbyport PerlSock_getservbyport -# define getservent PerlSock_getservent -# define getsockname PerlSock_getsockname -# define getsockopt PerlSock_getsockopt -# define inet_addr PerlSock_inet_addr -# define inet_ntoa PerlSock_inet_ntoa -# define listen PerlSock_listen -# define recv PerlSock_recv -# define recvfrom PerlSock_recvfrom -# define select PerlSock_select -# define send PerlSock_send -# define sendto PerlSock_sendto -# define sethostent PerlSock_sethostent -# define setnetent PerlSock_setnetent -# define setprotoent PerlSock_setprotoent -# define setservent PerlSock_setservent -# define setsockopt PerlSock_setsockopt -# define shutdown PerlSock_shutdown -# define socket PerlSock_socket -# define socketpair PerlSock_socketpair +# define mkdir PerlDir_mkdir +# define chdir PerlDir_chdir +# define rmdir PerlDir_rmdir +# define closedir PerlDir_close +# define opendir PerlDir_open +# define readdir PerlDir_read +# define rewinddir PerlDir_rewind +# define seekdir PerlDir_seek +# define telldir PerlDir_tell +# define putenv PerlEnv_putenv +# define getenv PerlEnv_getenv +# define uname PerlEnv_uname +# define stdin PerlSIO_stdin +# define stdout PerlSIO_stdout +# define stderr PerlSIO_stderr +# define fopen PerlSIO_fopen +# define fclose PerlSIO_fclose +# define feof PerlSIO_feof +# define ferror PerlSIO_ferror +# define clearerr PerlSIO_clearerr +# define getc PerlSIO_getc +# define fgets PerlSIO_fgets +# define fputc PerlSIO_fputc +# define fputs PerlSIO_fputs +# define fflush PerlSIO_fflush +# define ungetc PerlSIO_ungetc +# define fileno PerlSIO_fileno +# define fdopen PerlSIO_fdopen +# define freopen PerlSIO_freopen +# define fread PerlSIO_fread +# define fwrite PerlSIO_fwrite +# define setbuf PerlSIO_setbuf +# define setvbuf PerlSIO_setvbuf +# define setlinebuf PerlSIO_setlinebuf +# define stdoutf PerlSIO_stdoutf +# define vfprintf PerlSIO_vprintf +# define ftell PerlSIO_ftell +# define fseek PerlSIO_fseek +# define fgetpos PerlSIO_fgetpos +# define fsetpos PerlSIO_fsetpos +# define frewind PerlSIO_rewind +# define tmpfile PerlSIO_tmpfile +# define access PerlLIO_access +# define chmod PerlLIO_chmod +# define chsize PerlLIO_chsize +# define close PerlLIO_close +# define dup PerlLIO_dup +# define dup2 PerlLIO_dup2 +# define flock PerlLIO_flock +# define fstat PerlLIO_fstat +# define ioctl PerlLIO_ioctl +# define isatty PerlLIO_isatty +# define link PerlLIO_link +# define lseek PerlLIO_lseek +# define lstat PerlLIO_lstat +# define mktemp PerlLIO_mktemp +# define open PerlLIO_open +# define read PerlLIO_read +# define rename PerlLIO_rename +# define setmode PerlLIO_setmode +# define stat(buf,sb) PerlLIO_stat(buf,sb) +# define tmpnam PerlLIO_tmpnam +# define umask PerlLIO_umask +# define unlink PerlLIO_unlink +# define utime PerlLIO_utime +# define write PerlLIO_write +# define malloc PerlMem_malloc +# define calloc PerlMem_calloc +# define realloc PerlMem_realloc +# define free PerlMem_free +# define abort PerlProc_abort +# define exit PerlProc_exit +# define _exit PerlProc__exit +# define execl PerlProc_execl +# define execv PerlProc_execv +# define execvp PerlProc_execvp +# define getuid PerlProc_getuid +# define geteuid PerlProc_geteuid +# define getgid PerlProc_getgid +# define getegid PerlProc_getegid +# define getlogin PerlProc_getlogin +# define kill PerlProc_kill +# define killpg PerlProc_killpg +# define pause PerlProc_pause +# define popen PerlProc_popen +# define pclose PerlProc_pclose +# define pipe PerlProc_pipe +# define setuid PerlProc_setuid +# define setgid PerlProc_setgid +# define sleep PerlProc_sleep +# define times PerlProc_times +# define wait PerlProc_wait +# define setjmp PerlProc_setjmp +# define longjmp PerlProc_longjmp +# define signal PerlProc_signal +# define getpid PerlProc_getpid +# define gettimeofday PerlProc_gettimeofday +# define htonl PerlSock_htonl +# define htons PerlSock_htons +# define ntohl PerlSock_ntohl +# define ntohs PerlSock_ntohs +# define accept PerlSock_accept +# define bind PerlSock_bind +# define connect PerlSock_connect +# define endhostent PerlSock_endhostent +# define endnetent PerlSock_endnetent +# define endprotoent PerlSock_endprotoent +# define endservent PerlSock_endservent +# define gethostbyaddr PerlSock_gethostbyaddr +# define gethostbyname PerlSock_gethostbyname +# define gethostent PerlSock_gethostent +# define gethostname PerlSock_gethostname +# define getnetbyaddr PerlSock_getnetbyaddr +# define getnetbyname PerlSock_getnetbyname +# define getnetent PerlSock_getnetent +# define getpeername PerlSock_getpeername +# define getprotobyname PerlSock_getprotobyname +# define getprotobynumber PerlSock_getprotobynumber +# define getprotoent PerlSock_getprotoent +# define getservbyname PerlSock_getservbyname +# define getservbyport PerlSock_getservbyport +# define getservent PerlSock_getservent +# define getsockname PerlSock_getsockname +# define getsockopt PerlSock_getsockopt +# define inet_addr PerlSock_inet_addr +# define inet_ntoa PerlSock_inet_ntoa +# define listen PerlSock_listen +# define recv PerlSock_recv +# define recvfrom PerlSock_recvfrom +# define select PerlSock_select +# define send PerlSock_send +# define sendto PerlSock_sendto +# define sethostent PerlSock_sethostent +# define setnetent PerlSock_setnetent +# define setprotoent PerlSock_setprotoent +# define setservent PerlSock_setservent +# define setsockopt PerlSock_setsockopt +# define shutdown PerlSock_shutdown +# define socket PerlSock_socket +# define socketpair PerlSock_socketpair # undef fd_set # undef FD_SET # undef FD_CLR # undef FD_ISSET # undef FD_ZERO -# define fd_set Perl_fd_set -# define FD_SET(n,p) PERL_FD_SET(n,p) -# define FD_CLR(n,p) PERL_FD_CLR(n,p) -# define FD_ISSET(n,p) PERL_FD_ISSET(n,p) -# define FD_ZERO(p) PERL_FD_ZERO(p) +# define fd_set Perl_fd_set +# define FD_SET(n,p) PERL_FD_SET(n,p) +# define FD_CLR(n,p) PERL_FD_CLR(n,p) +# define FD_ISSET(n,p) PERL_FD_ISSET(n,p) +# define FD_ZERO(p) PERL_FD_ZERO(p) # endif /* NO_XSLOCKS */ #endif /* PERL_IMPLICIT_SYS && !PERL_CORE */ diff --git a/av.h b/av.h index 1c1b4164882b..945f1dda3912 100644 --- a/av.h +++ b/av.h @@ -72,41 +72,41 @@ need is to look up an array element, then prefer C. */ #ifndef PERL_CORE -# define Nullav Null(AV*) +# define Nullav Null(AV*) #endif -#define AvARRAY(av) ((av)->sv_u.svu_array) -#define AvALLOC(av) ((XPVAV*) SvANY(av))->xav_alloc -#define AvMAX(av) ((XPVAV*) SvANY(av))->xav_max -#define AvFILLp(av) ((XPVAV*) SvANY(av))->xav_fill -#define AvARYLEN(av) (*Perl_av_arylen_p(aTHX_ MUTABLE_AV(av))) +#define AvARRAY(av) ((av)->sv_u.svu_array) +#define AvALLOC(av) ((XPVAV*) SvANY(av))->xav_alloc +#define AvMAX(av) ((XPVAV*) SvANY(av))->xav_max +#define AvFILLp(av) ((XPVAV*) SvANY(av))->xav_fill +#define AvARYLEN(av) (*Perl_av_arylen_p(aTHX_ MUTABLE_AV(av))) -#define AvREAL(av) (SvFLAGS(av) & SVpav_REAL) -#define AvREAL_on(av) (SvFLAGS(av) |= SVpav_REAL) -#define AvREAL_off(av) (SvFLAGS(av) &= ~SVpav_REAL) -#define AvREAL_only(av) (AvREIFY_off(av), SvFLAGS(av) |= SVpav_REAL) -#define AvREIFY(av) (SvFLAGS(av) & SVpav_REIFY) -#define AvREIFY_on(av) (SvFLAGS(av) |= SVpav_REIFY) -#define AvREIFY_off(av) (SvFLAGS(av) &= ~SVpav_REIFY) -#define AvREIFY_only(av) (AvREAL_off(av), SvFLAGS(av) |= SVpav_REIFY) +#define AvREAL(av) (SvFLAGS(av) & SVpav_REAL) +#define AvREAL_on(av) (SvFLAGS(av) |= SVpav_REAL) +#define AvREAL_off(av) (SvFLAGS(av) &= ~SVpav_REAL) +#define AvREAL_only(av) (AvREIFY_off(av), SvFLAGS(av) |= SVpav_REAL) +#define AvREIFY(av) (SvFLAGS(av) & SVpav_REIFY) +#define AvREIFY_on(av) (SvFLAGS(av) |= SVpav_REIFY) +#define AvREIFY_off(av) (SvFLAGS(av) &= ~SVpav_REIFY) +#define AvREIFY_only(av) (AvREAL_off(av), SvFLAGS(av) |= SVpav_REIFY) -#define AvREALISH(av) (SvFLAGS(av) & (SVpav_REAL|SVpav_REIFY)) +#define AvREALISH(av) (SvFLAGS(av) & (SVpav_REAL|SVpav_REIFY)) #define AvFILL(av) \ ((SvRMAGICAL((const SV *) (av))) \ ? mg_size(MUTABLE_SV(av)) : AvFILLp(av)) -#define av_top_index(av) AvFILL(av) -#define av_tindex(av) av_top_index(av) +#define av_top_index(av) AvFILL(av) +#define av_tindex(av) av_top_index(av) /* Note that it doesn't make sense to do this: * SvGETMAGIC(av); IV x = av_tindex_nomg(av); */ # define av_top_index_skip_len_mg(av) \ (__ASSERT_(SvTYPE(av) == SVt_PVAV) AvFILLp(av)) -# define av_tindex_skip_len_mg(av) av_top_index_skip_len_mg(av) +# define av_tindex_skip_len_mg(av) av_top_index_skip_len_mg(av) -#define NEGATIVE_INDICES_VAR "NEGATIVE_INDICES" +#define NEGATIVE_INDICES_VAR "NEGATIVE_INDICES" /* @@ -209,9 +209,9 @@ to fit one element without extending: =cut */ -#define newAV() MUTABLE_AV(newSV_type(SVt_PVAV)) -#define newAV_alloc_x(size) av_new_alloc(size,0) -#define newAV_alloc_xz(size) av_new_alloc(size,1) +#define newAV() MUTABLE_AV(newSV_type(SVt_PVAV)) +#define newAV_alloc_x(size) av_new_alloc(size,0) +#define newAV_alloc_xz(size) av_new_alloc(size,1) /* * ex: set ts=8 sts=4 sw=4 et: diff --git a/cop.h b/cop.h index d8c0954aa6c8..9df4b2d2165f 100644 --- a/cop.h +++ b/cop.h @@ -42,15 +42,15 @@ struct jmpenv { typedef struct jmpenv JMPENV; #if defined DEBUGGING && !defined DEBUGGING_RE_ONLY -# define JE_OLD_STACK_HWM_zero PL_start_env.je_old_stack_hwm = 0 +# define JE_OLD_STACK_HWM_zero PL_start_env.je_old_stack_hwm = 0 # define JE_OLD_STACK_HWM_save(je) \ (je).je_old_stack_hwm = PL_curstackinfo->si_stack_hwm # define JE_OLD_STACK_HWM_restore(je) \ if (PL_curstackinfo->si_stack_hwm < (je).je_old_stack_hwm) \ PL_curstackinfo->si_stack_hwm = (je).je_old_stack_hwm #else -# define JE_OLD_STACK_HWM_zero NOOP -# define JE_OLD_STACK_HWM_save(je) NOOP +# define JE_OLD_STACK_HWM_zero NOOP +# define JE_OLD_STACK_HWM_save(je) NOOP # define JE_OLD_STACK_HWM_restore(je) NOOP #endif @@ -107,7 +107,7 @@ typedef struct jmpenv JMPENV; * https://github.com/Perl/perl5/commit/14dd3ad8c9bf82cf09798a22cc89a9862dfd6d1a */ -#define dJMPENV JMPENV cur_env +#define dJMPENV JMPENV cur_env #define JMPENV_PUSH(v) \ STMT_START { \ @@ -172,7 +172,7 @@ typedef struct jmpenv JMPENV; PerlProc_exit(1); \ } STMT_END -#define CATCH_GET (PL_top_env->je_mustcatch) +#define CATCH_GET (PL_top_env->je_mustcatch) #define CATCH_SET(v) \ STMT_START { \ DEBUG_l( \ @@ -189,8 +189,8 @@ typedef struct jmpenv JMPENV; typedef struct refcounted_he COPHH; -#define COPHH_KEY_UTF8 REFCOUNTED_HE_KEY_UTF8 -#define COPHH_EXISTS REFCOUNTED_HE_EXISTS +#define COPHH_KEY_UTF8 REFCOUNTED_HE_KEY_UTF8 +#define COPHH_EXISTS REFCOUNTED_HE_EXISTS /* =for apidoc Amx|SV *|cophh_fetch_pv |const COPHH *cophh|const char *key |U32 hash|U32 flags @@ -301,7 +301,7 @@ Make and return a complete copy of the cop hints hash C. =cut */ -#define cophh_copy(cophh) Perl_refcounted_he_inc(aTHX_ cophh) +#define cophh_copy(cophh) Perl_refcounted_he_inc(aTHX_ cophh) /* =for apidoc Amx|void|cophh_free|COPHH *cophh @@ -311,7 +311,7 @@ Discard the cop hints hash C, freeing all resources associated with it. =cut */ -#define cophh_free(cophh) Perl_refcounted_he_free(aTHX_ cophh) +#define cophh_free(cophh) Perl_refcounted_he_free(aTHX_ cophh) /* =for apidoc Amx|COPHH *|cophh_new_empty @@ -321,7 +321,7 @@ Generate and return a fresh cop hints hash containing no entries. =cut */ -#define cophh_new_empty() ((COPHH *)NULL) +#define cophh_new_empty() ((COPHH *)NULL) /* =for apidoc Amx|COPHH *|cophh_store_pv |COPHH *cophh|const char *key |U32 hash|SV *value|U32 flags @@ -541,7 +541,7 @@ struct rcpv { typedef struct rcpv RCPV; #define RCPVf_USE_STRLEN 1 -#define RCPVf_NO_COPY 2 +#define RCPVf_NO_COPY 2 #define RCPVx(pv_arg) \ ((RCPV *)((pv_arg) - STRUCT_OFFSET(struct rcpv, pv))) #define RCPV_REFCOUNT(pv) (RCPVx(pv)->refcount) @@ -549,16 +549,16 @@ typedef struct rcpv RCPV; #ifdef USE_ITHREADS -# define CopFILE(c) ((c)->cop_file) -# define CopFILE_LEN(c) (CopFILE(c) ? RCPV_LEN(CopFILE(c)) : 0) +# define CopFILE(c) ((c)->cop_file) +# define CopFILE_LEN(c) (CopFILE(c) ? RCPV_LEN(CopFILE(c)) : 0) # define CopFILEGV(c) \ (CopFILE(c) \ ? gv_fetchfile(CopFILE(c)) : NULL) # define CopFILE_set_x(c,pv) \ ((c)->cop_file = rcpv_new((pv),0,RCPVf_USE_STRLEN)) -# define CopFILE_setn_x(c,pv,l) ((c)->cop_file = rcpv_new((pv),(l),0)) -# define CopFILE_free_x(c) ((c)->cop_file = rcpv_free((c)->cop_file)) +# define CopFILE_setn_x(c,pv,l) ((c)->cop_file = rcpv_new((pv),(l),0)) +# define CopFILE_free_x(c) ((c)->cop_file = rcpv_free((c)->cop_file)) # define CopFILE_copy_x(dst,src) \ ((dst)->cop_file = rcpv_copy((src)->cop_file)) @@ -608,8 +608,8 @@ typedef struct rcpv RCPV; # define CopFILEAVx(c) \ (assert_(CopFILE(c)) \ GvAV(gv_fetchfile(CopFILE(c)))) -# define CopFILEAVn(c) (cop_file_avn(c)) -# define CopSTASH(c) PL_stashpad[(c)->cop_stashoff] +# define CopFILEAVn(c) (cop_file_avn(c)) +# define CopSTASH(c) PL_stashpad[(c)->cop_stashoff] # define CopSTASH_set(c,hv) \ ((c)->cop_stashoff = (hv) \ ? alloccopstash(hv) \ @@ -617,40 +617,40 @@ typedef struct rcpv RCPV; #else /* Above: yes threads; Below no threads */ -# define CopFILEGV(c) ((c)->cop_filegv) -# define CopFILEGV_set(c,gv) ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv)) -# define CopFILE_set(c,pv) CopFILEGV_set((c), gv_fetchfile(pv)) -# define CopFILE_copy(dst,src) CopFILEGV_set((dst),CopFILEGV(src)) +# define CopFILEGV(c) ((c)->cop_filegv) +# define CopFILEGV_set(c,gv) ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv)) +# define CopFILE_set(c,pv) CopFILEGV_set((c), gv_fetchfile(pv)) +# define CopFILE_copy(dst,src) CopFILEGV_set((dst),CopFILEGV(src)) # define CopFILE_setn(c,pv,l) \ CopFILEGV_set((c), gv_fetchfile_flags((pv),(l),0)) -# define CopFILESV(c) (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : NULL) -# define CopFILEAV(c) (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : NULL) +# define CopFILESV(c) (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : NULL) +# define CopFILEAV(c) (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : NULL) # ifdef DEBUGGING -# define CopFILEAVx(c) (assert(CopFILEGV(c)), GvAV(CopFILEGV(c))) +# define CopFILEAVx(c) (assert(CopFILEGV(c)), GvAV(CopFILEGV(c))) # else -# define CopFILEAVx(c) (GvAV(CopFILEGV(c))) +# define CopFILEAVx(c) (GvAV(CopFILEGV(c))) # endif -# define CopFILEAVn(c) (CopFILEGV(c) ? GvAVn(CopFILEGV(c)) : NULL) +# define CopFILEAVn(c) (CopFILEGV(c) ? GvAVn(CopFILEGV(c)) : NULL) # define CopFILE(c) \ (CopFILEGV(c) /* +2 for '_<' */ \ ? GvNAME(CopFILEGV(c))+2 : NULL) # define CopFILE_LEN(c) \ (CopFILEGV(c) /* -2 for '_<' */ \ ? GvNAMELEN(CopFILEGV(c))-2 : 0) -# define CopSTASH(c) ((c)->cop_stash) -# define CopSTASH_set(c,hv) ((c)->cop_stash = (hv)) +# define CopSTASH(c) ((c)->cop_stash) +# define CopSTASH_set(c,hv) ((c)->cop_stash = (hv)) # define CopFILE_free(c) \ (SvREFCNT_dec(CopFILEGV(c)),(CopFILEGV(c) = NULL)) #endif /* USE_ITHREADS */ -#define CopSTASHPV(c) (CopSTASH(c) ? HvNAME_get(CopSTASH(c)) : NULL) +#define CopSTASHPV(c) (CopSTASH(c) ? HvNAME_get(CopSTASH(c)) : NULL) /* cop_stash is not refcounted */ -#define CopSTASHPV_set(c,pv) CopSTASH_set((c), gv_stashpv(pv,GV_ADD)) -#define CopSTASH_eq(c,hv) (CopSTASH(c) == (hv)) +#define CopSTASHPV_set(c,pv) CopSTASH_set((c), gv_stashpv(pv,GV_ADD)) +#define CopSTASH_eq(c,hv) (CopSTASH(c) == (hv)) -#define CopHINTHASH_get(c) ((COPHH*)((c)->cop_hints_hash)) -#define CopHINTHASH_set(c,h) ((c)->cop_hints_hash = (h)) +#define CopHINTHASH_get(c) ((COPHH*)((c)->cop_hints_hash)) +#define CopHINTHASH_set(c,h) ((c)->cop_hints_hash = (h)) #define CopFEATURES_setfrom(dst, src) \ ((dst)->cop_features = (src)->cop_features) @@ -768,22 +768,22 @@ returned label, by setting C<*flags> to 0 or C. =cut */ -#define CopLABEL(c) Perl_cop_fetch_label(aTHX_ (c), NULL, NULL) -#define CopLABEL_len(c,len) Perl_cop_fetch_label(aTHX_ (c), len, NULL) +#define CopLABEL(c) Perl_cop_fetch_label(aTHX_ (c), NULL, NULL) +#define CopLABEL_len(c,len) Perl_cop_fetch_label(aTHX_ (c), len, NULL) #define CopLABEL_len_flags(c,len,flags) \ Perl_cop_fetch_label(aTHX_ (c), len, flags) -#define CopLABEL_alloc(pv) ((pv)?savepv(pv):NULL) +#define CopLABEL_alloc(pv) ((pv)?savepv(pv):NULL) -#define CopSTASH_ne(c,hv) (!CopSTASH_eq(c,hv)) -#define CopLINE(c) ((c)->cop_line) -#define CopLINE_inc(c) (++CopLINE(c)) -#define CopLINE_dec(c) (--CopLINE(c)) -#define CopLINE_set(c,l) (CopLINE(c) = (l)) +#define CopSTASH_ne(c,hv) (!CopSTASH_eq(c,hv)) +#define CopLINE(c) ((c)->cop_line) +#define CopLINE_inc(c) (++CopLINE(c)) +#define CopLINE_dec(c) (--CopLINE(c)) +#define CopLINE_set(c,l) (CopLINE(c) = (l)) /* OutCopFILE() is CopFILE for output (caller, die, warn, etc.) */ -#define OutCopFILE(c) CopFILE(c) +#define OutCopFILE(c) CopFILE(c) -#define CopHINTS_get(c) ((c)->cop_hints + 0) +#define CopHINTS_get(c) ((c)->cop_hints + 0) #define CopHINTS_set(c, h) \ STMT_START { \ (c)->cop_hints = (h); \ @@ -820,11 +820,11 @@ struct block_format { /* return a pointer to the current context */ -#define CX_CUR() (&cxstack[cxstack_ix]) +#define CX_CUR() (&cxstack[cxstack_ix]) /* free all savestack items back to the watermark of the specified context */ -#define CX_LEAVE_SCOPE(cx) LEAVE_SCOPE(cx->blk_oldsaveix) +#define CX_LEAVE_SCOPE(cx) LEAVE_SCOPE(cx->blk_oldsaveix) #ifdef DEBUGGING /* on debugging builds, poison cx afterwards so we know no code @@ -835,7 +835,7 @@ struct block_format { cxstack_ix--; \ cx = NULL; #else -# define CX_POP(cx) cxstack_ix--; +# define CX_POP(cx) cxstack_ix--; #endif #define CX_PUSHSUB_GET_LVALUE_MASK(func) \ @@ -885,9 +885,9 @@ struct block_eval { /* blk_u16 bit usage for eval contexts: */ -#define CxOLD_IN_EVAL(cx) (((cx)->blk_u16) & 0x3F) /* saved PL_in_eval */ +#define CxOLD_IN_EVAL(cx) (((cx)->blk_u16) & 0x3F) /* saved PL_in_eval */ #define CxEVAL_TXT_REFCNTED(cx) (((cx)->blk_u16) & 0x40) /* cur_text rc++ */ -#define CxOLD_OP_TYPE(cx) (((cx)->blk_u16) >> 7) /* type of eval op */ +#define CxOLD_OP_TYPE(cx) (((cx)->blk_u16) >> 7) /* type of eval op */ /* loop context */ struct block_loop { @@ -927,11 +927,11 @@ struct block_loop { ? &GvSV((c)->blk_loop.itervar_u.gv) \ : (SV **)&(c)->blk_loop.itervar_u.gv) -#define CxLABEL(c) (CopLABEL((c)->blk_oldcop)) -#define CxLABEL_len(c,len) (CopLABEL_len((c)->blk_oldcop, len)) +#define CxLABEL(c) (CopLABEL((c)->blk_oldcop)) +#define CxLABEL_len(c,len) (CopLABEL_len((c)->blk_oldcop, len)) #define CxLABEL_len_flags(c,len,flags) \ ((const char *)CopLABEL_len_flags((c)->blk_oldcop, len, flags)) -#define CxHASARGS(c) (((c)->cx_type & CXp_HASARGS) == CXp_HASARGS) +#define CxHASARGS(c) (((c)->cx_type & CXp_HASARGS) == CXp_HASARGS) /* CxLVAL(): the lval flags of the call site: the relevant flag bits from * the op_private field of the calling pp_entersub (or its caller's caller @@ -944,7 +944,7 @@ struct block_loop { * Note the contrast with CvLVALUE(), which is a property of the sub * rather than the call site. */ -#define CxLVAL(c) (0 + ((U8)((c)->blk_u16))) +#define CxLVAL(c) (0 + ((U8)((c)->blk_u16))) @@ -978,20 +978,20 @@ struct block { struct block_givwhen blku_givwhen; } blk_u; }; -#define blk_oldsp cx_u.cx_blk.blku_oldsp -#define blk_oldcop cx_u.cx_blk.blku_oldcop -#define blk_oldmarksp cx_u.cx_blk.blku_oldmarksp -#define blk_oldscopesp cx_u.cx_blk.blku_oldscopesp -#define blk_oldpm cx_u.cx_blk.blku_oldpm -#define blk_gimme cx_u.cx_blk.blku_gimme -#define blk_u16 cx_u.cx_blk.blku_u16 -#define blk_oldsaveix cx_u.cx_blk.blku_oldsaveix -#define blk_old_tmpsfloor cx_u.cx_blk.blku_old_tmpsfloor -#define blk_sub cx_u.cx_blk.blk_u.blku_sub -#define blk_format cx_u.cx_blk.blk_u.blku_format -#define blk_eval cx_u.cx_blk.blk_u.blku_eval -#define blk_loop cx_u.cx_blk.blk_u.blku_loop -#define blk_givwhen cx_u.cx_blk.blk_u.blku_givwhen +#define blk_oldsp cx_u.cx_blk.blku_oldsp +#define blk_oldcop cx_u.cx_blk.blku_oldcop +#define blk_oldmarksp cx_u.cx_blk.blku_oldmarksp +#define blk_oldscopesp cx_u.cx_blk.blku_oldscopesp +#define blk_oldpm cx_u.cx_blk.blku_oldpm +#define blk_gimme cx_u.cx_blk.blku_gimme +#define blk_u16 cx_u.cx_blk.blku_u16 +#define blk_oldsaveix cx_u.cx_blk.blku_oldsaveix +#define blk_old_tmpsfloor cx_u.cx_blk.blku_old_tmpsfloor +#define blk_sub cx_u.cx_blk.blk_u.blku_sub +#define blk_format cx_u.cx_blk.blk_u.blku_format +#define blk_eval cx_u.cx_blk.blk_u.blku_eval +#define blk_loop cx_u.cx_blk.blk_u.blku_loop +#define blk_givwhen cx_u.cx_blk.blk_u.blku_givwhen #define CX_DEBUG(cx, action) \ DEBUG_l( \ @@ -1028,18 +1028,18 @@ struct subst { #ifdef PERL_CORE -#define sb_iters cx_u.cx_subst.sbu_iters -#define sb_maxiters cx_u.cx_subst.sbu_maxiters -#define sb_rflags cx_u.cx_subst.sbu_rflags -#define sb_rxtainted cx_u.cx_subst.sbu_rxtainted -#define sb_orig cx_u.cx_subst.sbu_orig -#define sb_dstr cx_u.cx_subst.sbu_dstr -#define sb_targ cx_u.cx_subst.sbu_targ -#define sb_s cx_u.cx_subst.sbu_s -#define sb_m cx_u.cx_subst.sbu_m -#define sb_strend cx_u.cx_subst.sbu_strend -#define sb_rxres cx_u.cx_subst.sbu_rxres -#define sb_rx cx_u.cx_subst.sbu_rx +#define sb_iters cx_u.cx_subst.sbu_iters +#define sb_maxiters cx_u.cx_subst.sbu_maxiters +#define sb_rflags cx_u.cx_subst.sbu_rflags +#define sb_rxtainted cx_u.cx_subst.sbu_rxtainted +#define sb_orig cx_u.cx_subst.sbu_orig +#define sb_dstr cx_u.cx_subst.sbu_dstr +#define sb_targ cx_u.cx_subst.sbu_targ +#define sb_s cx_u.cx_subst.sbu_s +#define sb_m cx_u.cx_subst.sbu_m +#define sb_strend cx_u.cx_subst.sbu_strend +#define sb_rxres cx_u.cx_subst.sbu_rxres +#define sb_rx cx_u.cx_subst.sbu_rx # define CX_PUSHSUBST(cx) \ CXINC, cx = CX_CUR(), \ @@ -1073,7 +1073,7 @@ struct subst { } STMT_END #endif -#define CxONCE(cx) ((cx)->cx_type & CXp_ONCE) +#define CxONCE(cx) ((cx)->cx_type & CXp_ONCE) struct context { union { @@ -1081,33 +1081,33 @@ struct context { struct subst cx_subst; } cx_u; }; -#define cx_type cx_u.cx_subst.sbu_type +#define cx_type cx_u.cx_subst.sbu_type /* If you re-order these, there is also an array of uppercase names in perl.h and a static array of context names in pp_ctl.c */ -#define CXTYPEMASK 0xf -#define CXt_NULL 0 /* currently only used for sort BLOCK */ -#define CXt_WHEN 1 -#define CXt_BLOCK 2 +#define CXTYPEMASK 0xf +#define CXt_NULL 0 /* currently only used for sort BLOCK */ +#define CXt_WHEN 1 +#define CXt_BLOCK 2 /* When micro-optimising :-) keep GIVEN next to the LOOPs, as these 5 share a jump table in pp_ctl.c The first 4 don't have a 'case' in at least one switch statement in pp_ctl.c */ -#define CXt_GIVEN 3 +#define CXt_GIVEN 3 /* be careful of the ordering of these five. Macros * like CxTYPE_is_LOOP, CxFOREACH compare ranges */ -#define CXt_LOOP_ARY 4 /* for (@ary) { ...; } */ -#define CXt_LOOP_LAZYSV 5 /* for ('a'..'z') { ...; } */ -#define CXt_LOOP_LAZYIV 6 /* for (1..9) { ...; } */ -#define CXt_LOOP_LIST 7 /* for (1,2,3) { ...; } */ -#define CXt_LOOP_PLAIN 8 /* while (...) { ...; } +#define CXt_LOOP_ARY 4 /* for (@ary) { ...; } */ +#define CXt_LOOP_LAZYSV 5 /* for ('a'..'z') { ...; } */ +#define CXt_LOOP_LAZYIV 6 /* for (1..9) { ...; } */ +#define CXt_LOOP_LIST 7 /* for (1,2,3) { ...; } */ +#define CXt_LOOP_PLAIN 8 /* while (...) { ...; } or plain block { ...; } */ -#define CXt_SUB 9 -#define CXt_FORMAT 10 -#define CXt_EVAL 11 /* eval'', eval{}, try{} */ -#define CXt_SUBST 12 -#define CXt_DEFER 13 +#define CXt_SUB 9 +#define CXt_FORMAT 10 +#define CXt_EVAL 11 /* eval'', eval{}, try{} */ +#define CXt_SUBST 12 +#define CXt_DEFER 13 /* SUBST doesn't feature in all switch statements. */ /* private flags for CXt_SUB and CXt_FORMAT */ @@ -1134,7 +1134,7 @@ struct context { #define CxPADLOOP(c) ((c)->cx_type & CXp_FOR_PAD) /* private flags for CXt_SUBST */ -#define CXp_ONCE 0x10 /* What was sbu_once in struct subst */ +#define CXp_ONCE 0x10 /* What was sbu_once in struct subst */ #define CxTYPE(c) ((c)->cx_type & CXTYPEMASK) #define CxTYPE_is_LOOP(c) \ @@ -1162,45 +1162,45 @@ struct context { #define CXp_TRYBLOCK CXp_EVALBLOCK #define CxTRYBLOCK(c) CxEVALBLOCK(c) -#define CXINC (cxstack_ix < cxstack_max ? ++cxstack_ix : (cxstack_ix = cxinc())) +#define CXINC (cxstack_ix < cxstack_max ? ++cxstack_ix : (cxstack_ix = cxinc())) -#define G_SCALAR 2 -#define G_LIST 3 -#define G_VOID 1 -#define G_WANT 3 +#define G_SCALAR 2 +#define G_LIST 3 +#define G_VOID 1 +#define G_WANT 3 #ifndef PERL_CORE /* name prior to 5.31.1 */ -# define G_ARRAY G_LIST +# define G_ARRAY G_LIST #endif /* extra flags for Perl_call_* routines */ -#define G_DISCARD 0x4 /* Call FREETMPS. Don't change this +#define G_DISCARD 0x4 /* Call FREETMPS. Don't change this without consulting the hash actions codes defined in hv.h */ -#define G_EVAL 0x8 /* Assume eval {} around subroutine call. */ -#define G_NOARGS 0x10 /* Don't construct a @_ array. */ -#define G_KEEPERR 0x20 /* Warn for errors, don't overwrite $@ */ -#define G_NODEBUG 0x40 /* Disable debugging at toplevel. */ -#define G_METHOD 0x80 /* Calling method. */ -#define G_FAKINGEVAL 0x100 /* Faking an eval context for call_sv +#define G_EVAL 0x8 /* Assume eval {} around subroutine call. */ +#define G_NOARGS 0x10 /* Don't construct a @_ array. */ +#define G_KEEPERR 0x20 /* Warn for errors, don't overwrite $@ */ +#define G_NODEBUG 0x40 /* Disable debugging at toplevel. */ +#define G_METHOD 0x80 /* Calling method. */ +#define G_FAKINGEVAL 0x100 /* Faking an eval context for call_sv or fold_constants. */ -#define G_UNDEF_FILL 0x200 /* Fill the stack with &PL_sv_undef +#define G_UNDEF_FILL 0x200 /* Fill the stack with &PL_sv_undef A special case for UNSHIFT in Perl_magic_methcall(). */ -#define G_WRITING_TO_STDERR 0x400 /* Perl_write_to_stderr() is calling +#define G_WRITING_TO_STDERR 0x400 /* Perl_write_to_stderr() is calling Perl_magic_methcall(). */ -#define G_RE_REPARSING 0x800 /* compiling a run-time /(?{..})/ */ -#define G_METHOD_NAMED 0x1000 /* calling named method, eg without :: or ' */ -#define G_RETHROW 0x2000 /* eval_sv(): re-throw any error */ +#define G_RE_REPARSING 0x800 /* compiling a run-time /(?{..})/ */ +#define G_METHOD_NAMED 0x1000 /* calling named method, eg without :: or ' */ +#define G_RETHROW 0x2000 /* eval_sv(): re-throw any error */ /* flag bits for PL_in_eval */ -#define EVAL_NULL 0 /* not in an eval */ -#define EVAL_INEVAL 1 /* some enclosing scope is an eval */ -#define EVAL_WARNONLY 2 /* used by yywarn() when calling yyerror() */ -#define EVAL_KEEPERR 4 /* set by Perl_call_sv if G_KEEPERR */ -#define EVAL_INREQUIRE 8 /* The code is being required. */ -#define EVAL_RE_REPARSING 0x10 /* eval_sv() called with G_RE_REPARSING */ +#define EVAL_NULL 0 /* not in an eval */ +#define EVAL_INEVAL 1 /* some enclosing scope is an eval */ +#define EVAL_WARNONLY 2 /* used by yywarn() when calling yyerror() */ +#define EVAL_KEEPERR 4 /* set by Perl_call_sv if G_KEEPERR */ +#define EVAL_INREQUIRE 8 /* The code is being required. */ +#define EVAL_RE_REPARSING 0x10 /* eval_sv() called with G_RE_REPARSING */ /* if adding extra bits, make sure they can fit in CxOLD_OP_TYPE() */ /* Support for switching (stack and block) contexts. This ensures @@ -1210,18 +1210,18 @@ struct context { */ #define PERLSI_UNKNOWN -1 -#define PERLSI_UNDEF 0 -#define PERLSI_MAIN 1 -#define PERLSI_MAGIC 2 -#define PERLSI_SORT 3 -#define PERLSI_SIGNAL 4 -#define PERLSI_OVERLOAD 5 -#define PERLSI_DESTROY 6 -#define PERLSI_WARNHOOK 7 -#define PERLSI_DIEHOOK 8 -#define PERLSI_REQUIRE 9 -#define PERLSI_MULTICALL 10 -#define PERLSI_REGCOMP 11 +#define PERLSI_UNDEF 0 +#define PERLSI_MAIN 1 +#define PERLSI_MAGIC 2 +#define PERLSI_SORT 3 +#define PERLSI_SIGNAL 4 +#define PERLSI_OVERLOAD 5 +#define PERLSI_DESTROY 6 +#define PERLSI_WARNHOOK 7 +#define PERLSI_DIEHOOK 8 +#define PERLSI_REQUIRE 9 +#define PERLSI_MULTICALL 10 +#define PERLSI_REGCOMP 11 struct stackinfo { AV * si_stack; /* stack for current runlevel */ @@ -1252,21 +1252,21 @@ Use this typedef to declare variables that are to hold C. */ typedef struct stackinfo PERL_SI; -#define cxstack (PL_curstackinfo->si_cxstack) -#define cxstack_ix (PL_curstackinfo->si_cxix) -#define cxstack_max (PL_curstackinfo->si_cxmax) +#define cxstack (PL_curstackinfo->si_cxstack) +#define cxstack_ix (PL_curstackinfo->si_cxix) +#define cxstack_max (PL_curstackinfo->si_cxmax) #ifdef DEBUGGING -# define SET_MARK_OFFSET \ +# define SET_MARK_OFFSET \ PL_curstackinfo->si_markoff = PL_markstack_ptr - PL_markstack #else -# define SET_MARK_OFFSET NOOP +# define SET_MARK_OFFSET NOOP #endif #if defined DEBUGGING && !defined DEBUGGING_RE_ONLY -# define PUSHSTACK_INIT_HWM(si) ((si)->si_stack_hwm = 0) +# define PUSHSTACK_INIT_HWM(si) ((si)->si_stack_hwm = 0) #else -# define PUSHSTACK_INIT_HWM(si) NOOP +# define PUSHSTACK_INIT_HWM(si) NOOP #endif #define PUSHSTACKi(type) \ @@ -1292,7 +1292,7 @@ typedef struct stackinfo PERL_SI; SET_MARK_OFFSET; \ } STMT_END -#define PUSHSTACK PUSHSTACKi(PERLSI_UNKNOWN) +#define PUSHSTACK PUSHSTACKi(PERLSI_UNKNOWN) /* POPSTACK works with PL_stack_sp, so it may need to be bracketed by * PUTBACK/SPAGAIN to flush/refresh any local SP that may be active */ @@ -1333,8 +1333,8 @@ execution phase of the program; otherwise 0; =cut */ -#define IN_PERL_COMPILETIME cBOOL(PL_curcop == &PL_compiling) -#define IN_PERL_RUNTIME cBOOL(PL_curcop != &PL_compiling) +#define IN_PERL_COMPILETIME cBOOL(PL_curcop == &PL_compiling) +#define IN_PERL_RUNTIME cBOOL(PL_curcop != &PL_compiling) /* =for apidoc_section $multicall diff --git a/cv.h b/cv.h index 316dbb585cd1..51d1d8593169 100644 --- a/cv.h +++ b/cv.h @@ -36,21 +36,21 @@ L. */ #ifndef PERL_CORE -# define Nullcv Null(CV*) +# define Nullcv Null(CV*) #endif #define CvSTASH(sv) \ (MUTABLE_HV(((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_stash)) -#define CvSTASH_set(cv,st) Perl_cvstash_set(aTHX_ cv, st) -#define CvSTART(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_start_u.xcv_start -#define CvROOT(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_root_u.xcv_root -#define CvXSUB(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_root_u.xcv_xsub +#define CvSTASH_set(cv,st) Perl_cvstash_set(aTHX_ cv, st) +#define CvSTART(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_start_u.xcv_start +#define CvROOT(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_root_u.xcv_root +#define CvXSUB(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_root_u.xcv_xsub #define CvXSUBANY(sv) \ ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_start_u.xcv_xsubany -#define CvGV(sv) Perl_CvGV(aTHX_ (CV *)(sv)) -#define CvGV_set(cv,gv) Perl_cvgv_set(aTHX_ cv, gv) -#define CvHASGV(cv) cBOOL(SvANY(cv)->xcv_gv_u.xcv_gv) -#define CvFILE(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_file +#define CvGV(sv) Perl_CvGV(aTHX_ (CV *)(sv)) +#define CvGV_set(cv,gv) Perl_cvgv_set(aTHX_ cv, gv) +#define CvHASGV(cv) cBOOL(SvANY(cv)->xcv_gv_u.xcv_gv) +#define CvFILE(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_file #ifdef USE_ITHREADS # define CvFILE_set_from_cop(sv, cop) \ (CvFILE(sv) = savepv(CopFILE(cop)), CvDYNFILE_on(sv)) @@ -58,11 +58,11 @@ L. # define CvFILE_set_from_cop(sv, cop) \ (CvFILE(sv) = CopFILE(cop), CvDYNFILE_off(sv)) #endif -#define CvFILEGV(sv) (gv_fetchfile(CvFILE(sv))) -#define CvDEPTH(sv) (*Perl_CvDEPTH((const CV *)sv)) +#define CvFILEGV(sv) (gv_fetchfile(CvFILE(sv))) +#define CvDEPTH(sv) (*Perl_CvDEPTH((const CV *)sv)) /* For use when you only have a XPVCV*, not a real CV*. Must be assert protected as in Perl_CvDEPTH before use. */ -#define CvDEPTHunsafe(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_depth +#define CvDEPTHunsafe(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_depth /* these CvPADLIST/CvRESERVED asserts can be reverted one day, once stabilized */ @@ -72,9 +72,9 @@ L. /* CvPADLIST_set is not public API, it can be removed one day, once stabilized */ #ifdef DEBUGGING -# define CvPADLIST_set(sv, padlist) Perl_set_padlist((CV*)sv, padlist) +# define CvPADLIST_set(sv, padlist) Perl_set_padlist((CV*)sv, padlist) #else -# define CvPADLIST_set(sv, padlist) (CvPADLIST(sv) = (padlist)) +# define CvPADLIST_set(sv, padlist) (CvPADLIST(sv) = (padlist)) #endif #define CvHSCXT(sv) \ *(assert_(CvISXSUB((CV*)(sv))) \ @@ -90,12 +90,12 @@ L. # error unknown pointer size # endif #else -# define PoisonPADLIST(sv) NOOP +# define PoisonPADLIST(sv) NOOP #endif -#define CvOUTSIDE(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_outside -#define CvOUTSIDE_SEQ(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_outside_seq -#define CvFLAGS(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_flags +#define CvOUTSIDE(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_outside +#define CvOUTSIDE_SEQ(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_outside_seq +#define CvFLAGS(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_flags /* These two are sometimes called on non-CVs */ #define CvPROTO(sv) \ @@ -116,32 +116,32 @@ L. /* CV has the `:method` attribute. This used to be called CVf_METHOD * but is renamed to avoid collision with an upcoming feature */ -#define CVf_NOWARN_AMBIGUOUS 0x0001 +#define CVf_NOWARN_AMBIGUOUS 0x0001 -#define CVf_LVALUE 0x0002 /* CV return value can be used as lvalue */ -#define CVf_CONST 0x0004 /* inlinable sub */ -#define CVf_ISXSUB 0x0008 /* CV is an XSUB, not pure perl. */ +#define CVf_LVALUE 0x0002 /* CV return value can be used as lvalue */ +#define CVf_CONST 0x0004 /* inlinable sub */ +#define CVf_ISXSUB 0x0008 /* CV is an XSUB, not pure perl. */ -#define CVf_WEAKOUTSIDE 0x0010 /* CvOUTSIDE isn't ref counted */ -#define CVf_CLONE 0x0020 /* anon CV uses external lexicals */ -#define CVf_CLONED 0x0040 /* a clone of one of those */ -#define CVf_ANON 0x0080 /* CV is not pointed to by a GV */ -#define CVf_UNIQUE 0x0100 /* sub is only called once (eg PL_main_cv, +#define CVf_WEAKOUTSIDE 0x0010 /* CvOUTSIDE isn't ref counted */ +#define CVf_CLONE 0x0020 /* anon CV uses external lexicals */ +#define CVf_CLONED 0x0040 /* a clone of one of those */ +#define CVf_ANON 0x0080 /* CV is not pointed to by a GV */ +#define CVf_UNIQUE 0x0100 /* sub is only called once (eg PL_main_cv, require, eval). */ -#define CVf_NODEBUG 0x0200 /* no DB::sub indirection for this CV (esp. +#define CVf_NODEBUG 0x0200 /* no DB::sub indirection for this CV (esp. useful for special XSUBs) */ -#define CVf_CVGV_RC 0x0400 /* CvGV is reference counted */ +#define CVf_CVGV_RC 0x0400 /* CvGV is reference counted */ #if defined(PERL_CORE) || defined(PERL_EXT) -# define CVf_SLABBED 0x0800 /* Holds refcount on op slab */ +# define CVf_SLABBED 0x0800 /* Holds refcount on op slab */ #endif -#define CVf_DYNFILE 0x1000 /* The filename is malloced */ -#define CVf_AUTOLOAD 0x2000 /* SvPVX contains AUTOLOADed sub name */ -#define CVf_HASEVAL 0x4000 /* contains string eval */ -#define CVf_NAMED 0x8000 /* Has a name HEK */ -#define CVf_LEXICAL 0x10000 /* Omit package from name */ -#define CVf_ANONCONST 0x20000 /* :const - create anonconst op */ -#define CVf_SIGNATURE 0x40000 /* CV uses a signature */ -#define CVf_REFCOUNTED_ANYSV 0x80000 /* CvXSUBANY().any_sv is refcounted */ +#define CVf_DYNFILE 0x1000 /* The filename is malloced */ +#define CVf_AUTOLOAD 0x2000 /* SvPVX contains AUTOLOADed sub name */ +#define CVf_HASEVAL 0x4000 /* contains string eval */ +#define CVf_NAMED 0x8000 /* Has a name HEK */ +#define CVf_LEXICAL 0x10000 /* Omit package from name */ +#define CVf_ANONCONST 0x20000 /* :const - create anonconst op */ +#define CVf_SIGNATURE 0x40000 /* CV uses a signature */ +#define CVf_REFCOUNTED_ANYSV 0x80000 /* CvXSUBANY().any_sv is refcounted */ /* This symbol for optimised communication between toke.c and op.c: */ #define CVf_BUILTIN_ATTRS (CVf_NOWARN_AMBIGUOUS|CVf_LVALUE|CVf_ANONCONST) @@ -167,9 +167,9 @@ L. #define CvNODEBUG_on(cv) (CvFLAGS(cv) |= CVf_NODEBUG) #define CvNODEBUG_off(cv) (CvFLAGS(cv) &= ~CVf_NODEBUG) -#define CvNOWARN_AMBIGUOUS(cv) (CvFLAGS(cv) & CVf_NOWARN_AMBIGUOUS) -#define CvNOWARN_AMBIGUOUS_on(cv) (CvFLAGS(cv) |= CVf_NOWARN_AMBIGUOUS) -#define CvNOWARN_AMBIGUOUS_off(cv) (CvFLAGS(cv) &= ~CVf_NOWARN_AMBIGUOUS) +#define CvNOWARN_AMBIGUOUS(cv) (CvFLAGS(cv) & CVf_NOWARN_AMBIGUOUS) +#define CvNOWARN_AMBIGUOUS_on(cv) (CvFLAGS(cv) |= CVf_NOWARN_AMBIGUOUS) +#define CvNOWARN_AMBIGUOUS_off(cv) (CvFLAGS(cv) &= ~CVf_NOWARN_AMBIGUOUS) #define CvLVALUE(cv) (CvFLAGS(cv) & CVf_LVALUE) #define CvLVALUE_on(cv) (CvFLAGS(cv) |= CVf_LVALUE) @@ -202,9 +202,9 @@ L. #define CvCVGV_RC_off(cv) (CvFLAGS(cv) &= ~CVf_CVGV_RC) #ifdef PERL_CORE -# define CvSLABBED(cv) (CvFLAGS(cv) & CVf_SLABBED) -# define CvSLABBED_on(cv) (CvFLAGS(cv) |= CVf_SLABBED) -# define CvSLABBED_off(cv) (CvFLAGS(cv) &= ~CVf_SLABBED) +# define CvSLABBED(cv) (CvFLAGS(cv) & CVf_SLABBED) +# define CvSLABBED_on(cv) (CvFLAGS(cv) |= CVf_SLABBED) +# define CvSLABBED_off(cv) (CvFLAGS(cv) &= ~CVf_SLABBED) #endif #define CvDYNFILE(cv) (CvFLAGS(cv) & CVf_DYNFILE) @@ -260,16 +260,16 @@ Helper macro to turn off the C flag. =cut */ -#define CvREFCOUNTED_ANYSV(cv) (CvFLAGS(cv) & CVf_REFCOUNTED_ANYSV) -#define CvREFCOUNTED_ANYSV_on(cv) (CvFLAGS(cv) |= CVf_REFCOUNTED_ANYSV) -#define CvREFCOUNTED_ANYSV_off(cv) (CvFLAGS(cv) &= ~CVf_REFCOUNTED_ANYSV) +#define CvREFCOUNTED_ANYSV(cv) (CvFLAGS(cv) & CVf_REFCOUNTED_ANYSV) +#define CvREFCOUNTED_ANYSV_on(cv) (CvFLAGS(cv) |= CVf_REFCOUNTED_ANYSV) +#define CvREFCOUNTED_ANYSV_off(cv) (CvFLAGS(cv) &= ~CVf_REFCOUNTED_ANYSV) /* Back-compat */ #ifndef PERL_CORE -# define CVf_METHOD CVf_NOWARN_AMBIGUOUS -# define CvMETHOD(cv) CvNOWARN_AMBIGUOUS(cv) -# define CvMETHOD_on(cv) CvNOWARN_AMBIGUOUS_on(cv) -# define CvMETHOD_off(cv) CvNOWARN_AMBIGUOUS_off(cv) +# define CVf_METHOD CVf_NOWARN_AMBIGUOUS +# define CvMETHOD(cv) CvNOWARN_AMBIGUOUS(cv) +# define CvMETHOD_on(cv) CvNOWARN_AMBIGUOUS_on(cv) +# define CvMETHOD_off(cv) CvNOWARN_AMBIGUOUS_off(cv) #endif /* Flags for newXS_flags */ @@ -357,12 +357,12 @@ unbroken. For example, the following should print 123: typedef OP *(*Perl_call_checker)(pTHX_ OP *, GV *, SV *); -#define CALL_CHECKER_REQUIRE_GV MGf_REQUIRE_GV +#define CALL_CHECKER_REQUIRE_GV MGf_REQUIRE_GV -#define CV_NAME_NOTQUAL 1 +#define CV_NAME_NOTQUAL 1 #ifdef PERL_CORE -# define CV_UNDEF_KEEP_NAME 1 +# define CV_UNDEF_KEEP_NAME 1 #endif /* diff --git a/dosish.h b/dosish.h index a22a4678247c..2c1609d7db52 100644 --- a/dosish.h +++ b/dosish.h @@ -7,21 +7,21 @@ * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. */ -#define ABORT() abort(); +#define ABORT() abort(); #ifndef SH_PATH -#define SH_PATH "/bin/sh" +#define SH_PATH "/bin/sh" #endif #ifdef WIN32 # define PERL_SYS_INIT_BODY(c,v) \ MALLOC_CHECK_TAINT2(*c,*v) Perl_win32_init(c,v); PERLIO_INIT -# define PERL_SYS_TERM_BODY() Perl_win32_term() -# define BIT_BUCKET "nul" +# define PERL_SYS_TERM_BODY() Perl_win32_term() +# define BIT_BUCKET "nul" #else # define PERL_SYS_INIT_BODY(c,v) \ MALLOC_CHECK_TAINT2(*c,*v); PERLIO_INIT -# define BIT_BUCKET "\\dev\\nul" /* "wanna be like, umm, Newlined, +# define BIT_BUCKET "\\dev\\nul" /* "wanna be like, umm, Newlined, or somethin?" */ #endif @@ -37,7 +37,7 @@ OP_CHECK_MUTEX_TERM; OP_REFCNT_TERM; \ PERLIO_TERM; MALLOC_TERM; #endif -#define dXSUB_SYS dNOOP +#define dXSUB_SYS dNOOP /* USEMYBINMODE This symbol, if defined, indicates that the program * should use the routine my_binmode(FILE *fp, char iotype, int @@ -51,15 +51,15 @@ * include and to get any typedef'ed information. */ #if defined(WIN32) -# define Stat_t struct w32_stat +# define Stat_t struct w32_stat #else -# define Stat_t struct _stati64 +# define Stat_t struct _stati64 #endif /* USE_STAT_RDEV: This symbol is defined if this system * has a stat structure declaring st_rdev */ -#define USE_STAT_RDEV /**/ +#define USE_STAT_RDEV /**/ /* ACME_MESS: This symbol, if defined, indicates that error * messages should be should be generated in a format that allows @@ -86,14 +86,14 @@ * stream (unlike fwrite() itself, which on some systems outputs several * distinct records if the number_of_items parameter is >1). */ -#define fwrite1 fwrite +#define fwrite1 fwrite -#define Fstat(fd,bufptr) fstat((fd),(bufptr)) -#define Fflush(fp) fflush(fp) -#define Mkdir(path,mode) mkdir((path),(mode)) +#define Fstat(fd,bufptr) fstat((fd),(bufptr)) +#define Fflush(fp) fflush(fp) +#define Mkdir(path,mode) mkdir((path),(mode)) #ifndef WIN32 -# define Stat(fname,bufptr) stat((fname),(bufptr)) +# define Stat(fname,bufptr) stat((fname),(bufptr)) #else # define HAS_IOCTL # define HAS_UTIME diff --git a/fakesdio.h b/fakesdio.h index 6ce92c4b1108..d22279a3aba1 100644 --- a/fakesdio.h +++ b/fakesdio.h @@ -12,9 +12,9 @@ * This is "source level" stdio compatibility mode. We * try and #define stdio functions in terms of PerlIO. */ -#define _CANNOT "CANNOT" +#define _CANNOT "CANNOT" #undef FILE -#define FILE PerlIO +#define FILE PerlIO #undef clearerr #undef fclose #undef fdopen @@ -63,64 +63,64 @@ #if defined(__GNUC__) && !defined(__STRICT_ANSI__) && !defined(PERL_GCC_PEDANTIC) #define printf(fmt,args...) PerlIO_stdoutf(fmt,##args) #else -#define printf PerlIO_stdoutf +#define printf PerlIO_stdoutf #endif -#define fprintf PerlIO_printf -#define stdin PerlIO_stdin() -#define stdout PerlIO_stdout() -#define stderr PerlIO_stderr() -#define tmpfile() PerlIO_tmpfile() -#define fclose(f) PerlIO_close(f) -#define fflush(f) PerlIO_flush(f) -#define fopen(p,m) PerlIO_open(p,m) -#define vfprintf(f,fmt,a) PerlIO_vprintf(f,fmt,a) -#define fgetc(f) PerlIO_getc(f) -#define fputc(c,f) PerlIO_putc(f,c) -#define fputs(s,f) PerlIO_puts(f,s) -#define getc(f) PerlIO_getc(f) -#define getc_unlocked(f) PerlIO_getc(f) -#define putc(c,f) PerlIO_putc(f,c) -#define putc_unlocked(c,f) PerlIO_putc(c,f) -#define ungetc(c,f) PerlIO_ungetc(f,c) +#define fprintf PerlIO_printf +#define stdin PerlIO_stdin() +#define stdout PerlIO_stdout() +#define stderr PerlIO_stderr() +#define tmpfile() PerlIO_tmpfile() +#define fclose(f) PerlIO_close(f) +#define fflush(f) PerlIO_flush(f) +#define fopen(p,m) PerlIO_open(p,m) +#define vfprintf(f,fmt,a) PerlIO_vprintf(f,fmt,a) +#define fgetc(f) PerlIO_getc(f) +#define fputc(c,f) PerlIO_putc(f,c) +#define fputs(s,f) PerlIO_puts(f,s) +#define getc(f) PerlIO_getc(f) +#define getc_unlocked(f) PerlIO_getc(f) +#define putc(c,f) PerlIO_putc(f,c) +#define putc_unlocked(c,f) PerlIO_putc(c,f) +#define ungetc(c,f) PerlIO_ungetc(f,c) #if 0 /* return values of read/write need work */ -#define fread(b,s,c,f) PerlIO_read(f,b,(s*c)) -#define fwrite(b,s,c,f) PerlIO_write(f,b,(s*c)) +#define fread(b,s,c,f) PerlIO_read(f,b,(s*c)) +#define fwrite(b,s,c,f) PerlIO_write(f,b,(s*c)) #else -#define fread(b,s,c,f) _CANNOT fread -#define fwrite(b,s,c,f) _CANNOT fwrite +#define fread(b,s,c,f) _CANNOT fread +#define fwrite(b,s,c,f) _CANNOT fwrite #endif -#define fseek(f,o,w) PerlIO_seek(f,o,w) -#define ftell(f) PerlIO_tell(f) -#define rewind(f) PerlIO_rewind(f) -#define clearerr(f) PerlIO_clearerr(f) -#define feof(f) PerlIO_eof(f) -#define ferror(f) PerlIO_error(f) -#define fdopen(fd,p) PerlIO_fdopen(fd,p) -#define fileno(f) PerlIO_fileno(f) -#define popen(c,m) my_popen(c,m) -#define pclose(f) my_pclose(f) +#define fseek(f,o,w) PerlIO_seek(f,o,w) +#define ftell(f) PerlIO_tell(f) +#define rewind(f) PerlIO_rewind(f) +#define clearerr(f) PerlIO_clearerr(f) +#define feof(f) PerlIO_eof(f) +#define ferror(f) PerlIO_error(f) +#define fdopen(fd,p) PerlIO_fdopen(fd,p) +#define fileno(f) PerlIO_fileno(f) +#define popen(c,m) my_popen(c,m) +#define pclose(f) my_pclose(f) -#define fsetpos(f,p) _CANNOT _fsetpos_ -#define fgetpos(f,p) _CANNOT _fgetpos_ +#define fsetpos(f,p) _CANNOT _fsetpos_ +#define fgetpos(f,p) _CANNOT _fgetpos_ -#define __filbuf(f) _CANNOT __filbuf_ -#define _filbuf(f) _CANNOT _filbuf_ -#define __flsbuf(c,f) _CANNOT __flsbuf_ -#define _flsbuf(c,f) _CANNOT _flsbuf_ -#define getw(f) _CANNOT _getw_ -#define putw(v,f) _CANNOT _putw_ +#define __filbuf(f) _CANNOT __filbuf_ +#define _filbuf(f) _CANNOT _filbuf_ +#define __flsbuf(c,f) _CANNOT __flsbuf_ +#define _flsbuf(c,f) _CANNOT _flsbuf_ +#define getw(f) _CANNOT _getw_ +#define putw(v,f) _CANNOT _putw_ #if SFIO_VERSION < 20000101L -#define flockfile(f) _CANNOT _flockfile_ -#define ftrylockfile(f) _CANNOT _ftrylockfile_ -#define funlockfile(f) _CANNOT _funlockfile_ +#define flockfile(f) _CANNOT _flockfile_ +#define ftrylockfile(f) _CANNOT _ftrylockfile_ +#define funlockfile(f) _CANNOT _funlockfile_ #endif -#define freopen(p,m,f) _CANNOT _freopen_ -#define setbuf(f,b) _CANNOT _setbuf_ -#define setvbuf(f,b,x,s) _CANNOT _setvbuf_ -#define fscanf _CANNOT _fscanf_ -#define fgets(s,n,f) _CANNOT _fgets_ +#define freopen(p,m,f) _CANNOT _freopen_ +#define setbuf(f,b) _CANNOT _setbuf_ +#define setvbuf(f,b,x,s) _CANNOT _setvbuf_ +#define fscanf _CANNOT _fscanf_ +#define fgets(s,n,f) _CANNOT _fgets_ /* * ex: set ts=8 sts=4 sw=4 et: diff --git a/form.h b/form.h index 42a34ae3da27..4c1e61df83dd 100644 --- a/form.h +++ b/form.h @@ -7,23 +7,23 @@ * License or the Artistic License, as specified in the README file. */ -#define FF_END 0 /* tidy up, then return */ -#define FF_LINEMARK 1 /* start (or end) of a line */ -#define FF_LITERAL 2 /* append literal chars */ -#define FF_SKIP 3 /* skip chars in format */ -#define FF_FETCH 4 /* get next item and set field size to */ -#define FF_CHECKNL 5 /* find max len of item (up to +#define FF_END 0 /* tidy up, then return */ +#define FF_LINEMARK 1 /* start (or end) of a line */ +#define FF_LITERAL 2 /* append literal chars */ +#define FF_SKIP 3 /* skip chars in format */ +#define FF_FETCH 4 /* get next item and set field size to */ +#define FF_CHECKNL 5 /* find max len of item (up to \n) that fits field */ -#define FF_CHECKCHOP 6 /* like CHECKNL, but up to highest split point */ -#define FF_SPACE 7 /* append padding space (diff +#define FF_CHECKCHOP 6 /* like CHECKNL, but up to highest split point */ +#define FF_SPACE 7 /* append padding space (diff of field, item size) */ -#define FF_HALFSPACE 8 /* like FF_SPACE, but only append half as many */ -#define FF_ITEM 9 /* append a text item, while blanking ctrl chars */ -#define FF_CHOP 10 /* (for ^*) chop the current item */ -#define FF_LINEGLOB 11 /* process @* */ -#define FF_DECIMAL 12 /* do @##, ^##, where =(precision|flags) */ -#define FF_NEWLINE 13 /* delete trailing spaces, then append \n */ -#define FF_BLANK 14 /* for arg==0: do '~'; for arg>0 : do '~~' */ -#define FF_MORE 15 /* replace long end of string with '...' */ -#define FF_0DECIMAL 16 /* like FF_DECIMAL but for 0### */ -#define FF_LINESNGL 17 /* process ^* */ +#define FF_HALFSPACE 8 /* like FF_SPACE, but only append half as many */ +#define FF_ITEM 9 /* append a text item, while blanking ctrl chars */ +#define FF_CHOP 10 /* (for ^*) chop the current item */ +#define FF_LINEGLOB 11 /* process @* */ +#define FF_DECIMAL 12 /* do @##, ^##, where =(precision|flags) */ +#define FF_NEWLINE 13 /* delete trailing spaces, then append \n */ +#define FF_BLANK 14 /* for arg==0: do '~'; for arg>0 : do '~~' */ +#define FF_MORE 15 /* replace long end of string with '...' */ +#define FF_0DECIMAL 16 /* like FF_DECIMAL but for 0### */ +#define FF_LINESNGL 17 /* process ^* */ diff --git a/gv.h b/gv.h index c54ac080997f..3a5f1bebbc38 100644 --- a/gv.h +++ b/gv.h @@ -62,14 +62,14 @@ struct gp { # define GvNAMEUTF8(gv) \ ({ assert(GvNAME_HEK(gv)); HEK_UTF8(GvNAME_HEK(gv)); }) #else -# define GvGP(gv) (0+(gv)->sv_u.svu_gp) -# define GvGP_set(gv,gp) ((gv)->sv_u.svu_gp = (gp)) -# define GvFLAGS(gv) (GvXPVGV(gv)->xpv_cur) -# define GvSTASH(gv) (GvXPVGV(gv)->xnv_u.xgv_stash) -# define GvNAME_HEK(gv) (GvXPVGV(gv)->xiv_u.xivu_namehek) -# define GvNAME_get(gv) HEK_KEY(GvNAME_HEK(gv)) -# define GvNAMELEN_get(gv) HEK_LEN(GvNAME_HEK(gv)) -# define GvNAMEUTF8(gv) HEK_UTF8(GvNAME_HEK(gv)) +# define GvGP(gv) (0+(gv)->sv_u.svu_gp) +# define GvGP_set(gv,gp) ((gv)->sv_u.svu_gp = (gp)) +# define GvFLAGS(gv) (GvXPVGV(gv)->xpv_cur) +# define GvSTASH(gv) (GvXPVGV(gv)->xnv_u.xgv_stash) +# define GvNAME_HEK(gv) (GvXPVGV(gv)->xiv_u.xivu_namehek) +# define GvNAME_get(gv) HEK_KEY(GvNAME_HEK(gv)) +# define GvNAMELEN_get(gv) HEK_LEN(GvNAME_HEK(gv)) +# define GvNAMEUTF8(gv) HEK_UTF8(GvNAME_HEK(gv)) #endif #define GvNAME(gv) GvNAME_get(gv) @@ -166,15 +166,15 @@ Return the CV from the GV. assignment of a reference to the glob is to be localised; it distinguishes 'local *g = $ref' from '*g = $ref'. */ -#define GVf_INTRO 0x01 -#define GVf_MULTI 0x02 -#define GVf_ASSUMECV 0x04 -#define GVf_RESERVED 0x08 /* unused */ -#define GVf_IMPORTED 0xF0 -#define GVf_IMPORTED_SV 0x10 -#define GVf_IMPORTED_AV 0x20 -#define GVf_IMPORTED_HV 0x40 -#define GVf_IMPORTED_CV 0x80 +#define GVf_INTRO 0x01 +#define GVf_MULTI 0x02 +#define GVf_ASSUMECV 0x04 +#define GVf_RESERVED 0x08 /* unused */ +#define GVf_IMPORTED 0xF0 +#define GVf_IMPORTED_SV 0x10 +#define GVf_IMPORTED_AV 0x20 +#define GVf_IMPORTED_HV 0x40 +#define GVf_IMPORTED_CV 0x80 #define GvINTRO(gv) (GvFLAGS(gv) & GVf_INTRO) #define GvINTRO_on(gv) (GvFLAGS(gv) |= GVf_INTRO) @@ -209,43 +209,43 @@ Return the CV from the GV. #define GvIMPORTED_CV_off(gv) (GvFLAGS(gv) &= ~GVf_IMPORTED_CV) #ifndef PERL_CORE -# define GvIN_PAD(gv) 0 -# define GvIN_PAD_on(gv) NOOP -# define GvIN_PAD_off(gv) NOOP -# define Nullgv Null(GV*) +# define GvIN_PAD(gv) 0 +# define GvIN_PAD_on(gv) NOOP +# define GvIN_PAD_off(gv) NOOP +# define Nullgv Null(GV*) #endif -#define DM_RUID 0x001 -#define DM_EUID 0x002 -#define DM_UID (DM_RUID|DM_EUID) -#define DM_ARRAY_ISA 0x004 -#define DM_RGID 0x010 -#define DM_EGID 0x020 -#define DM_GID (DM_RGID|DM_EGID) -#define DM_DELAY 0x100 +#define DM_RUID 0x001 +#define DM_EUID 0x002 +#define DM_UID (DM_RUID|DM_EUID) +#define DM_ARRAY_ISA 0x004 +#define DM_RGID 0x010 +#define DM_EGID 0x020 +#define DM_GID (DM_RGID|DM_EGID) +#define DM_DELAY 0x100 /* * symbol creation flags, for use in gv_fetchpv() and get_*v() */ -#define GV_ADD 0x01 /* add, if symbol not already there For +#define GV_ADD 0x01 /* add, if symbol not already there For gv_name_set, adding a HEK for the first time, so don't try to free what's there. */ -#define GV_ADDMULTI 0x02 /* add, pretending it has been added already; +#define GV_ADDMULTI 0x02 /* add, pretending it has been added already; used also by gv_init_* */ -#define GV_ADDWARN 0x04 /* add, but warn if symbol wasn't already there */ +#define GV_ADDWARN 0x04 /* add, but warn if symbol wasn't already there */ /* 0x08 UNUSED */ -#define GV_NOINIT 0x10 /* add, but don't init symbol, if type != PVGV */ +#define GV_NOINIT 0x10 /* add, but don't init symbol, if type != PVGV */ /* This is used by toke.c to avoid turing placeholder constants in the symbol table into full PVGVs with attached constant subroutines. */ -#define GV_NOADD_NOINIT 0x20 /* Don't add the symbol if it's not there. +#define GV_NOADD_NOINIT 0x20 /* Don't add the symbol if it's not there. Don't init it if it is there but ! PVGV */ -#define GV_NOEXPAND 0x40 /* Don't expand SvOK() entries to PVGV */ -#define GV_NOTQUAL 0x80 /* A plain symbol name, not qualified with a +#define GV_NOEXPAND 0x40 /* Don't expand SvOK() entries to PVGV */ +#define GV_NOTQUAL 0x80 /* A plain symbol name, not qualified with a package (so skip checks for :: and ') */ -#define GV_AUTOLOAD 0x100 /* gv_fetchmethod_flags() should AUTOLOAD */ -#define GV_CROAK 0x200 /* gv_fetchmethod_flags() should croak */ -#define GV_ADDMG 0x400 /* add if magical */ -#define GV_NO_SVGMAGIC 0x800 /* Skip get-magic on an SV argument; used +#define GV_AUTOLOAD 0x100 /* gv_fetchmethod_flags() should AUTOLOAD */ +#define GV_CROAK 0x200 /* gv_fetchmethod_flags() should croak */ +#define GV_ADDMG 0x400 /* add if magical */ +#define GV_NO_SVGMAGIC 0x800 /* Skip get-magic on an SV argument; used only by gv_fetchsv(_nomg) */ #define GV_CACHE_ONLY 0x1000 /* return stash only if found in cache; used only in flags parameter @@ -256,7 +256,7 @@ Return the CV from the GV. #define GV_NOUNIVERSAL 0x2000 /* Skip UNIVERSAL lookup */ /* Flags for gv_autoload_ */ -#define GV_AUTOLOAD_ISMETHOD 1 /* autoloading a method? */ +#define GV_AUTOLOAD_ISMETHOD 1 /* autoloading a method? */ /* SVf_UTF8 (more accurately the return value from SvUTF8) is also valid as a flag to various gv_* functions, so ensure it lies outside this range. @@ -268,12 +268,12 @@ Return the CV from the GV. (with the exception GV_ADDMG, which *might* cause the symbol to be added) */ /* gv_fetchfile_flags() */ -#define GVF_NOADD 0x01 /* don't add the glob if it doesn't exist */ +#define GVF_NOADD 0x01 /* don't add the glob if it doesn't exist */ -#define gv_fullname3(sv,gv,prefix) gv_fullname4(sv,gv,prefix,TRUE) -#define gv_efullname3(sv,gv,prefix) gv_efullname4(sv,gv,prefix,TRUE) -#define gv_fetchmethod(stash, name) gv_fetchmethod_autoload(stash, name, TRUE) -#define gv_fetchsv_nomg(n,f,t) gv_fetchsv(n,(f)|GV_NO_SVGMAGIC,t) +#define gv_fullname3(sv,gv,prefix) gv_fullname4(sv,gv,prefix,TRUE) +#define gv_efullname3(sv,gv,prefix) gv_efullname4(sv,gv,prefix,TRUE) +#define gv_fetchmethod(stash, name) gv_fetchmethod_autoload(stash, name, TRUE) +#define gv_fetchsv_nomg(n,f,t) gv_fetchsv(n,(f)|GV_NO_SVGMAGIC,t) #define gv_init(gv,stash,name,len,multi) \ gv_init_pvn(gv,stash,name,len,GV_ADDMULTI*cBOOL(multi)) #define gv_fetchmeth(stash,name,len,level) \ @@ -291,7 +291,7 @@ Equivalent to C>. */ #define gv_autoload4(stash, name, len, autoload) \ gv_autoload_pvn(stash, name, len, cBOOL(autoload)) -#define newGVgen(pack) newGVgen_flags(pack, 0) +#define newGVgen(pack) newGVgen_flags(pack, 0) #define gv_method_changed(gv) \ ( \ assert_(isGV_with_GP(gv)) \ @@ -311,10 +311,10 @@ Make sure there is a slot of the given type (AV, HV, IO, SV) in the GV C. =cut */ -#define gv_AVadd(gv) gv_add_by_type((gv), SVt_PVAV) -#define gv_HVadd(gv) gv_add_by_type((gv), SVt_PVHV) -#define gv_IOadd(gv) gv_add_by_type((gv), SVt_PVIO) -#define gv_SVadd(gv) gv_add_by_type((gv), SVt_NULL) +#define gv_AVadd(gv) gv_add_by_type((gv), SVt_PVAV) +#define gv_HVadd(gv) gv_add_by_type((gv), SVt_PVHV) +#define gv_IOadd(gv) gv_add_by_type((gv), SVt_PVIO) +#define gv_SVadd(gv) gv_add_by_type((gv), SVt_NULL) /* * ex: set ts=8 sts=4 sw=4 et: diff --git a/handy.h b/handy.h index 67df0192c196..bf5b77df3230 100644 --- a/handy.h +++ b/handy.h @@ -15,7 +15,7 @@ #define PERL_HANDY_H_ #ifndef PERL_CORE -# define Null(type) ((type)NULL) +# define Null(type) ((type)NULL) /* =for apidoc_section $string @@ -53,9 +53,9 @@ gleaned from it, and are very unlikely to change =cut */ -# define Nullch Null(char*) -# define Nullfp Null(PerlIO*) -# define Nullsv Null(SV*) +# define Nullch Null(char*) +# define Nullfp Null(PerlIO*) +# define Nullsv Null(SV*) #endif #ifdef TRUE @@ -64,8 +64,8 @@ gleaned from it, and are very unlikely to change #ifdef FALSE #undef FALSE #endif -#define TRUE (1) -#define FALSE (0) +#define TRUE (1) +#define FALSE (0) /* =for apidoc_section $SV @@ -95,17 +95,17 @@ The brace group version will raise a diagnostic if 'p' is const; the other blindly casts away const. */ #if defined(PERL_USE_GCC_BRACE_GROUPS) -# define MUTABLE_PTR(p) ({ void *p_ = (p); p_; }) +# define MUTABLE_PTR(p) ({ void *p_ = (p); p_; }) #else -# define MUTABLE_PTR(p) ((void *) (p)) +# define MUTABLE_PTR(p) ((void *) (p)) #endif -#define MUTABLE_AV(p) ((AV *)MUTABLE_PTR(p)) -#define MUTABLE_CV(p) ((CV *)MUTABLE_PTR(p)) -#define MUTABLE_GV(p) ((GV *)MUTABLE_PTR(p)) -#define MUTABLE_HV(p) ((HV *)MUTABLE_PTR(p)) -#define MUTABLE_IO(p) ((IO *)MUTABLE_PTR(p)) -#define MUTABLE_SV(p) ((SV *)MUTABLE_PTR(p)) +#define MUTABLE_AV(p) ((AV *)MUTABLE_PTR(p)) +#define MUTABLE_CV(p) ((CV *)MUTABLE_PTR(p)) +#define MUTABLE_GV(p) ((GV *)MUTABLE_PTR(p)) +#define MUTABLE_HV(p) ((HV *)MUTABLE_PTR(p)) +#define MUTABLE_IO(p) ((IO *)MUTABLE_PTR(p)) +#define MUTABLE_SV(p) ((SV *)MUTABLE_PTR(p)) /* =for apidoc_section $SV @@ -128,12 +128,12 @@ definitely a reference SV that refers to an SV of the right type. assert(SvTYPE(SvRV(_ref)) == SVt_PV ## XV); \ (XV *)(SvRV(_ref)); }) #else -# define xV_FROM_REF(XV, ref) ((XV *)(SvRV(ref))) +# define xV_FROM_REF(XV, ref) ((XV *)(SvRV(ref))) #endif -#define AV_FROM_REF(ref) xV_FROM_REF(AV, ref) -#define CV_FROM_REF(ref) xV_FROM_REF(CV, ref) -#define HV_FROM_REF(ref) xV_FROM_REF(HV, ref) +#define AV_FROM_REF(ref) xV_FROM_REF(AV, ref) +#define CV_FROM_REF(ref) xV_FROM_REF(CV, ref) +#define HV_FROM_REF(ref) xV_FROM_REF(HV, ref) #ifndef __cplusplus # include @@ -151,7 +151,7 @@ required, but is kept for backwards compatibility. =cut */ -#define cBOOL(cbool) ((bool) (cbool)) +#define cBOOL(cbool) ((bool) (cbool)) /* Try to figure out __func__ or __FUNCTION__ equivalent, if * any. XXX Should really be a Configure probe, with @@ -159,16 +159,16 @@ required, but is kept for backwards compatibility. * Configure probe for __FILE__ and __LINE__ is needed. */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ (defined(__SUNPRO_C)) /* C99 or close enough. */ -# define FUNCTION__ __func__ -# define SAFE_FUNCTION__ __func__ +# define FUNCTION__ __func__ +# define SAFE_FUNCTION__ __func__ #elif (defined(__DECC_VER)) /* Tru64 or VMS, and strict C89 being used, but not modern enough cc (in Tru64, -c99 not known, only -std1). */ -# define FUNCTION__ ("") -# define SAFE_FUNCTION__ ("UNKNOWN") +# define FUNCTION__ ("") +# define SAFE_FUNCTION__ ("UNKNOWN") #else -# define FUNCTION__ __FUNCTION__ /* Common extension. */ -# define SAFE_FUNCTION__ __FUNCTION__ /* Common extension. */ +# define FUNCTION__ __FUNCTION__ /* Common extension. */ +# define SAFE_FUNCTION__ __FUNCTION__ /* Common extension. */ #endif /* XXX A note on the perl source internal type system. The original intent @@ -202,11 +202,11 @@ required, but is kept for backwards compatibility. # include # ifdef INT32_MIN_BROKEN # undef INT32_MIN -# define INT32_MIN (-2147483647-1) +# define INT32_MIN (-2147483647-1) # endif # ifdef INT64_MIN_BROKEN # undef INT64_MIN -# define INT64_MIN (-9223372036854775807LL-1) +# define INT64_MIN (-9223372036854775807LL-1) # endif #endif @@ -225,68 +225,68 @@ typedef U64TYPE U64; /* I8_MAX and I8_MIN constants are not defined, as I8 is an ambiguous type. Please search CHAR_MAX in perl.h for further details. */ #ifdef UINT8_MAX -# define U8_MAX UINT8_MAX +# define U8_MAX UINT8_MAX #else -# define U8_MAX PERL_UCHAR_MAX +# define U8_MAX PERL_UCHAR_MAX #endif #ifdef UINT8_MIN -# define U8_MIN UINT8_MIN +# define U8_MIN UINT8_MIN #else -# define U8_MIN PERL_UCHAR_MIN +# define U8_MIN PERL_UCHAR_MIN #endif #ifdef INT16_MAX -# define I16_MAX INT16_MAX +# define I16_MAX INT16_MAX #else -# define I16_MAX PERL_SHORT_MAX +# define I16_MAX PERL_SHORT_MAX #endif #ifdef INT16_MIN -# define I16_MIN INT16_MIN +# define I16_MIN INT16_MIN #else -# define I16_MIN PERL_SHORT_MIN +# define I16_MIN PERL_SHORT_MIN #endif #ifdef UINT16_MAX -# define U16_MAX UINT16_MAX +# define U16_MAX UINT16_MAX #else -# define U16_MAX PERL_USHORT_MAX +# define U16_MAX PERL_USHORT_MAX #endif #ifdef UINT16_MIN -# define U16_MIN UINT16_MIN +# define U16_MIN UINT16_MIN #else -# define U16_MIN PERL_USHORT_MIN +# define U16_MIN PERL_USHORT_MIN #endif #ifdef INT32_MAX -# define I32_MAX INT32_MAX +# define I32_MAX INT32_MAX #elif LONGSIZE > 4 -# define I32_MAX PERL_INT_MAX +# define I32_MAX PERL_INT_MAX #else -# define I32_MAX PERL_LONG_MAX +# define I32_MAX PERL_LONG_MAX #endif #ifdef INT32_MIN -# define I32_MIN INT32_MIN +# define I32_MIN INT32_MIN #elif LONGSIZE > 4 -# define I32_MIN PERL_INT_MIN +# define I32_MIN PERL_INT_MIN #else -# define I32_MIN PERL_LONG_MIN +# define I32_MIN PERL_LONG_MIN #endif #ifdef UINT32_MAX # ifndef UINT32_MAX_BROKEN /* e.g. HP-UX with gcc messes this up */ -# define U32_MAX UINT_MAX +# define U32_MAX UINT_MAX # else -# define U32_MAX 4294967295U +# define U32_MAX 4294967295U # endif #elif LONGSIZE > 4 -# define U32_MAX PERL_UINT_MAX +# define U32_MAX PERL_UINT_MAX #else -# define U32_MAX PERL_ULONG_MAX +# define U32_MAX PERL_ULONG_MAX #endif #ifdef UINT32_MIN -# define U32_MIN UINT32_MIN +# define U32_MIN UINT32_MIN #elif LONGSIZE > 4 -# define U32_MIN PERL_UINT_MIN +# define U32_MIN PERL_UINT_MIN #else -# define U32_MIN PERL_ULONG_MIN +# define U32_MIN PERL_ULONG_MIN #endif /* @@ -319,19 +319,19 @@ that don't, so that you can portably take advantage of this C99 feature. * decimal digits required to represent any possible unsigned number * containing N bits. TYPE_DIGITS gives the number of decimal digits * required to represent any possible unsigned number of type T. */ -#define BIT_DIGITS(N) (((N)*146)/485 + 1) /* log10(2) =~ 146/485 */ -#define TYPE_DIGITS(T) BIT_DIGITS(sizeof(T) * 8) -#define TYPE_CHARS(T) (TYPE_DIGITS(T) + 2) /* sign, NUL */ +#define BIT_DIGITS(N) (((N)*146)/485 + 1) /* log10(2) =~ 146/485 */ +#define TYPE_DIGITS(T) BIT_DIGITS(sizeof(T) * 8) +#define TYPE_CHARS(T) (TYPE_DIGITS(T) + 2) /* sign, NUL */ /* Unused by core; should be deprecated */ -#define Ctl(ch) ((ch) & 037) +#define Ctl(ch) ((ch) & 037) #if defined(PERL_CORE) || defined(PERL_EXT) # ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) +# define MIN(a,b) ((a) < (b) ? (a) : (b)) # endif # ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) +# define MAX(a,b) ((a) > (b) ? (a) : (b)) # endif #endif @@ -340,14 +340,14 @@ that don't, so that you can portably take advantage of this C99 feature. * just a single bit set. If not, subtracting 1 would leave * the uppermost bit set, so the & would yield non-zero */ #if defined(PERL_CORE) || defined(PERL_EXT) -# define isPOWER_OF_2(n) ((n) && ((n) & ((n)-1)) == 0) +# define isPOWER_OF_2(n) ((n) && ((n) & ((n)-1)) == 0) #endif /* Returns a mask with the lowest n bits set */ -#define nBIT_MASK(n) ((UINTMAX_C(1) << (n)) - 1) +#define nBIT_MASK(n) ((UINTMAX_C(1) << (n)) - 1) /* The largest unsigned number that will fit into n bits */ -#define nBIT_UMAX(n) nBIT_MASK(n) +#define nBIT_UMAX(n) nBIT_MASK(n) /* =for apidoc_section $directives @@ -366,7 +366,7 @@ all excited. */ #if defined(DEBUGGING) && !defined(__COVERITY__) \ && ! defined(PERL_SMALL_MACRO_BUFFER) -# define __ASSERT_(statement) assert(statement), +# define __ASSERT_(statement) assert(statement), #else # define __ASSERT_(statement) #endif @@ -449,10 +449,10 @@ Perl_xxx(aTHX_ ...) form for any API calls where it's used. =cut */ -#define STR_WITH_LEN(s) ASSERT_IS_LITERAL(s), (sizeof(s)-1) +#define STR_WITH_LEN(s) ASSERT_IS_LITERAL(s), (sizeof(s)-1) /* STR_WITH_LEN() shortcuts */ -#define newSVpvs(str) Perl_newSVpvn(aTHX_ STR_WITH_LEN(str)) +#define newSVpvs(str) Perl_newSVpvn(aTHX_ STR_WITH_LEN(str)) #define newSVpvs_flags(str,flags) \ Perl_newSVpvn_flags(aTHX_ STR_WITH_LEN(str), flags) #define newSVpvs_share(str) Perl_newSVpvn_share(aTHX_ STR_WITH_LEN(str), 0) @@ -464,18 +464,18 @@ Perl_xxx(aTHX_ ...) form for any API calls where it's used. Perl_sv_catpvn_flags(aTHX_ sv, STR_WITH_LEN(str), SV_GMAGIC) #define sv_catpvs_mg(sv, str) \ Perl_sv_catpvn_flags(aTHX_ sv, STR_WITH_LEN(str), SV_GMAGIC|SV_SMAGIC) -#define sv_setpvs(sv, str) Perl_sv_setpvn(aTHX_ sv, STR_WITH_LEN(str)) +#define sv_setpvs(sv, str) Perl_sv_setpvn(aTHX_ sv, STR_WITH_LEN(str)) #define sv_setpvs_mg(sv, str) Perl_sv_setpvn_mg(aTHX_ sv, STR_WITH_LEN(str)) #define sv_setref_pvs(rv, classname, str) \ Perl_sv_setref_pvn(aTHX_ rv, classname, STR_WITH_LEN(str)) -#define savepvs(str) Perl_savepvn(aTHX_ STR_WITH_LEN(str)) -#define savesharedpvs(str) Perl_savesharedpvn(aTHX_ STR_WITH_LEN(str)) +#define savepvs(str) Perl_savepvn(aTHX_ STR_WITH_LEN(str)) +#define savesharedpvs(str) Perl_savesharedpvn(aTHX_ STR_WITH_LEN(str)) #define gv_stashpvs(str, create) \ Perl_gv_stashpvn(aTHX_ STR_WITH_LEN(str), create) #define gv_fetchpvs(namebeg, flags, sv_type) \ Perl_gv_fetchpvn_flags(aTHX_ STR_WITH_LEN(namebeg), flags, sv_type) -#define gv_fetchpvn gv_fetchpvn_flags +#define gv_fetchpvn gv_fetchpvn_flags #define sv_catxmlpvs(dsv, str, utf8) \ Perl_sv_catxmlpvn(aTHX_ dsv, STR_WITH_LEN(str), utf8) @@ -567,7 +567,7 @@ becomes ? ( (j) == PERL_VERSION_MAJOR \ && (n) == PERL_VERSION_MINOR) \ : (PERL_DECIMAL_VERSION_ == PERL_JNP_TO_DECIMAL_(j,n,p))) -# define PERL_VERSION_NE(j,n,p) (! PERL_VERSION_EQ(j,n,p)) +# define PERL_VERSION_NE(j,n,p) (! PERL_VERSION_EQ(j,n,p)) # define PERL_VERSION_LT(j,n,p) \ /* < '*' effectively means < 0 */ \ @@ -581,7 +581,7 @@ becomes (PERL_DECIMAL_VERSION_ < PERL_JNP_TO_DECIMAL_( (j), \ (((p) == '*') ? ((n)+1) : (n)), \ (((p) == '*') ? 0 : p))) -# define PERL_VERSION_GT(j,n,p) (! PERL_VERSION_LE(j,n,p)) +# define PERL_VERSION_GT(j,n,p) (! PERL_VERSION_LE(j,n,p)) /* =for apidoc_section $string @@ -695,29 +695,29 @@ based on the underlying C library functions): */ -#define strNE(s1,s2) (strcmp(s1,s2) != 0) -#define strEQ(s1,s2) (strcmp(s1,s2) == 0) -#define strLT(s1,s2) (strcmp(s1,s2) < 0) -#define strLE(s1,s2) (strcmp(s1,s2) <= 0) -#define strGT(s1,s2) (strcmp(s1,s2) > 0) -#define strGE(s1,s2) (strcmp(s1,s2) >= 0) +#define strNE(s1,s2) (strcmp(s1,s2) != 0) +#define strEQ(s1,s2) (strcmp(s1,s2) == 0) +#define strLT(s1,s2) (strcmp(s1,s2) < 0) +#define strLE(s1,s2) (strcmp(s1,s2) <= 0) +#define strGT(s1,s2) (strcmp(s1,s2) > 0) +#define strGE(s1,s2) (strcmp(s1,s2) >= 0) -#define strnNE(s1,s2,l) (strncmp(s1,s2,l) != 0) -#define strnEQ(s1,s2,l) (strncmp(s1,s2,l) == 0) +#define strnNE(s1,s2,l) (strncmp(s1,s2,l) != 0) +#define strnEQ(s1,s2,l) (strncmp(s1,s2,l) == 0) #define memEQ(s1,s2,l) \ (memcmp(((const void *) (s1)), ((const void *) (s2)), l) == 0) -#define memNE(s1,s2,l) (! memEQ(s1,s2,l)) +#define memNE(s1,s2,l) (! memEQ(s1,s2,l)) /* memEQ and memNE where second comparand is a string constant */ #define memEQs(s1, l, s2) \ (((sizeof(s2)-1) == (l)) && memEQ((s1), ASSERT_IS_LITERAL(s2), (sizeof(s2)-1))) -#define memNEs(s1, l, s2) (! memEQs(s1, l, s2)) +#define memNEs(s1, l, s2) (! memEQs(s1, l, s2)) /* Keep these private until we decide it was a good idea */ #if defined(PERL_CORE) || defined(PERL_EXT) || defined(PERL_EXT_POSIX) -#define strBEGINs(s1,s2) (strncmp(s1,ASSERT_IS_LITERAL(s2), sizeof(s2)-1) == 0) +#define strBEGINs(s1,s2) (strncmp(s1,ASSERT_IS_LITERAL(s2), sizeof(s2)-1) == 0) #define memBEGINs(s1, l, s2) \ ( (Ptrdiff_t) (l) >= (Ptrdiff_t) sizeof(s2) - 1 \ @@ -733,10 +733,10 @@ based on the underlying C library functions): && memEQ(s1 + (l) - (sizeof(s2) - 1), ASSERT_IS_LITERAL(s2), sizeof(s2)-1)) #endif /* End of making macros private */ -#define memLT(s1,s2,l) (memcmp(s1,s2,l) < 0) -#define memLE(s1,s2,l) (memcmp(s1,s2,l) <= 0) -#define memGT(s1,s2,l) (memcmp(s1,s2,l) > 0) -#define memGE(s1,s2,l) (memcmp(s1,s2,l) >= 0) +#define memLT(s1,s2,l) (memcmp(s1,s2,l) < 0) +#define memLE(s1,s2,l) (memcmp(s1,s2,l) <= 0) +#define memGT(s1,s2,l) (memcmp(s1,s2,l) > 0) +#define memGE(s1,s2,l) (memcmp(s1,s2,l) >= 0) #define memCHRs(s1,c) \ ((const char *) memchr(ASSERT_IS_LITERAL(s1) , c, sizeof(s1)-1)) @@ -1396,7 +1396,7 @@ or casts =cut */ -#define WIDEST_UTYPE PERL_UINTMAX_T +#define WIDEST_UTYPE PERL_UINTMAX_T /* Where there could be some confusion, use this as a static assert in * macros to make sure that a parameter isn't a pointer. But some @@ -1404,9 +1404,9 @@ or casts * is gcc 3.3.6; the check below isn't thorough for such an old * compiler, so may have to be revised if experience so dictates. */ #if ! PERL_IS_GCC || PERL_GCC_VERSION_GT(3,3,6) -# define ASSERT_NOT_PTR(x) ((x) | 0) +# define ASSERT_NOT_PTR(x) ((x) | 0) #else -# define ASSERT_NOT_PTR(x) (x) +# define ASSERT_NOT_PTR(x) (x) #endif /* Likewise, this is effectively a static assert to @@ -1414,7 +1414,7 @@ or casts * * NOT suitable for void* */ -#define ASSERT_IS_PTR(x) (__ASSERT_(sizeof(*(x))) (x)) +#define ASSERT_IS_PTR(x) (__ASSERT_(sizeof(*(x))) (x)) /* FITS_IN_8_BITS(c) returns true if c doesn't have a bit set other than in the * lower 8. It is designed to be hopefully bomb-proof, making sure that no @@ -1434,7 +1434,7 @@ or casts ( (sizeof(c) == 1) \ || (((WIDEST_UTYPE) ASSERT_NOT_PTR(c)) >> 8) == 0) #else -# define FITS_IN_8_BITS(c) (1) +# define FITS_IN_8_BITS(c) (1) #endif /* Returns true if l <= c <= (l + n), where 'l' and 'n' are @@ -1489,13 +1489,13 @@ or casts * an unsigned type. khw supposes that it could be written as && ((c) * == '\0' || (c) > 0) to avoid the message, but the cast will likely * avoid extra branches even with stupid compilers. */ -# define isASCII(c) (((WIDEST_UTYPE) ASSERT_NOT_PTR(c)) < 128) +# define isASCII(c) (((WIDEST_UTYPE) ASSERT_NOT_PTR(c)) < 128) #endif /* Take the eight possible bit patterns of the lower 3 bits and you get the * lower 3 bits of the 8 octal digits, in both ASCII and EBCDIC, so those * bits can be ignored. If the rest match '0', we have an octal */ -#define isOCTAL_A(c) ((((WIDEST_UTYPE) ASSERT_NOT_PTR(c)) & ~7) == '0') +#define isOCTAL_A(c) ((((WIDEST_UTYPE) ASSERT_NOT_PTR(c)) & ~7) == '0') #ifdef H_PERL /* If have access to perl.h, lookup in its table */ @@ -1515,37 +1515,37 @@ or casts * others as it may be useful to group these which have no members that * match above Latin1, (or above ASCII in the latter case) */ -# define CC_WORDCHAR_ 0 /* \w and [:word:] */ -# define CC_DIGIT_ 1 /* \d and [:digit:] */ -# define CC_ALPHA_ 2 /* [:alpha:] */ -# define CC_LOWER_ 3 /* [:lower:] */ -# define CC_UPPER_ 4 /* [:upper:] */ -# define CC_PUNCT_ 5 /* [:punct:] */ -# define CC_PRINT_ 6 /* [:print:] */ -# define CC_ALPHANUMERIC_ 7 /* [:alnum:] */ -# define CC_GRAPH_ 8 /* [:graph:] */ -# define CC_CASED_ 9 /* [:lower:] or [:upper:] under /i */ -# define CC_SPACE_ 10 /* \s, [:space:] */ -# define CC_BLANK_ 11 /* [:blank:] */ -# define CC_XDIGIT_ 12 /* [:xdigit:] */ -# define CC_CNTRL_ 13 /* [:cntrl:] */ -# define CC_ASCII_ 14 /* [:ascii:] */ -# define CC_VERTSPACE_ 15 /* \v */ - -# define HIGHEST_REGCOMP_DOT_H_SYNC_ CC_VERTSPACE_ +# define CC_WORDCHAR_ 0 /* \w and [:word:] */ +# define CC_DIGIT_ 1 /* \d and [:digit:] */ +# define CC_ALPHA_ 2 /* [:alpha:] */ +# define CC_LOWER_ 3 /* [:lower:] */ +# define CC_UPPER_ 4 /* [:upper:] */ +# define CC_PUNCT_ 5 /* [:punct:] */ +# define CC_PRINT_ 6 /* [:print:] */ +# define CC_ALPHANUMERIC_ 7 /* [:alnum:] */ +# define CC_GRAPH_ 8 /* [:graph:] */ +# define CC_CASED_ 9 /* [:lower:] or [:upper:] under /i */ +# define CC_SPACE_ 10 /* \s, [:space:] */ +# define CC_BLANK_ 11 /* [:blank:] */ +# define CC_XDIGIT_ 12 /* [:xdigit:] */ +# define CC_CNTRL_ 13 /* [:cntrl:] */ +# define CC_ASCII_ 14 /* [:ascii:] */ +# define CC_VERTSPACE_ 15 /* \v */ + +# define HIGHEST_REGCOMP_DOT_H_SYNC_ CC_VERTSPACE_ /* The members of the third group below do not need to be coordinated * with data structures in regcomp.[ch] and regexec.c. */ -# define CC_IDFIRST_ 16 -# define CC_CHARNAME_CONT_ 17 -# define CC_NONLATIN1_FOLD_ 18 -# define CC_NONLATIN1_SIMPLE_FOLD_ 19 -# define CC_QUOTEMETA_ 20 -# define CC_NON_FINAL_FOLD_ 21 -# define CC_IS_IN_SOME_FOLD_ 22 -# define CC_BINDIGIT_ 23 -# define CC_OCTDIGIT_ 24 -# define CC_MNEMONIC_CNTRL_ 25 +# define CC_IDFIRST_ 16 +# define CC_CHARNAME_CONT_ 17 +# define CC_NONLATIN1_FOLD_ 18 +# define CC_NONLATIN1_SIMPLE_FOLD_ 19 +# define CC_QUOTEMETA_ 20 +# define CC_NON_FINAL_FOLD_ 21 +# define CC_IS_IN_SOME_FOLD_ 22 +# define CC_BINDIGIT_ 23 +# define CC_OCTDIGIT_ 24 +# define CC_MNEMONIC_CNTRL_ 25 /* Unused: 26-31 If more bits are needed, one could add a second word for * non-64bit QUAD_IS_INT systems, using some #ifdefs to distinguish @@ -1580,7 +1580,7 @@ typedef enum { } char_class_number_; #endif -#define POSIX_CC_COUNT (HIGHEST_REGCOMP_DOT_H_SYNC_ + 1) +#define POSIX_CC_COUNT (HIGHEST_REGCOMP_DOT_H_SYNC_ + 1) START_EXTERN_C # ifdef DOINIT @@ -1595,7 +1595,7 @@ END_EXTERN_C /* The 1U keeps Solaris from griping when shifting sets the uppermost bit */ -# define CC_mask_(classnum) (1U << (classnum)) +# define CC_mask_(classnum) (1U << (classnum)) /* For internal core Perl use only: the base macro * for defining macros like isALPHA */ @@ -1605,7 +1605,7 @@ END_EXTERN_C /* The mask for the _A versions of the macros; * it just adds in the bit for ASCII. */ -# define CC_mask_A_(classnum) (CC_mask_(classnum) | CC_mask_(CC_ASCII_)) +# define CC_mask_A_(classnum) (CC_mask_(classnum) | CC_mask_(CC_ASCII_)) /* For internal core Perl use only: the base macro for defining * macros like isALPHA_A. The foo_A version makes sure that @@ -1618,49 +1618,49 @@ END_EXTERN_C /* On ASCII platforms certain classes form a single range. It's faster to * special case these. isDIGIT is a single range on all platforms */ # ifdef EBCDIC -# define isALPHA_A(c) generic_isCC_A_(c, CC_ALPHA_) -# define isGRAPH_A(c) generic_isCC_A_(c, CC_GRAPH_) -# define isLOWER_A(c) generic_isCC_A_(c, CC_LOWER_) -# define isPRINT_A(c) generic_isCC_A_(c, CC_PRINT_) -# define isUPPER_A(c) generic_isCC_A_(c, CC_UPPER_) +# define isALPHA_A(c) generic_isCC_A_(c, CC_ALPHA_) +# define isGRAPH_A(c) generic_isCC_A_(c, CC_GRAPH_) +# define isLOWER_A(c) generic_isCC_A_(c, CC_LOWER_) +# define isPRINT_A(c) generic_isCC_A_(c, CC_PRINT_) +# define isUPPER_A(c) generic_isCC_A_(c, CC_UPPER_) # else /* By folding the upper and lowercase, we can use a single range */ -# define isALPHA_A(c) inRANGE((~('A' ^ 'a') & (c)), 'A', 'Z') -# define isGRAPH_A(c) inRANGE(c, ' ' + 1, 0x7e) -# define isLOWER_A(c) inRANGE(c, 'a', 'z') -# define isPRINT_A(c) inRANGE(c, ' ', 0x7e) -# define isUPPER_A(c) inRANGE(c, 'A', 'Z') +# define isALPHA_A(c) inRANGE((~('A' ^ 'a') & (c)), 'A', 'Z') +# define isGRAPH_A(c) inRANGE(c, ' ' + 1, 0x7e) +# define isLOWER_A(c) inRANGE(c, 'a', 'z') +# define isPRINT_A(c) inRANGE(c, ' ', 0x7e) +# define isUPPER_A(c) inRANGE(c, 'A', 'Z') # endif -# define isALPHANUMERIC_A(c) generic_isCC_A_(c, CC_ALPHANUMERIC_) -# define isBLANK_A(c) generic_isCC_A_(c, CC_BLANK_) -# define isCNTRL_A(c) generic_isCC_A_(c, CC_CNTRL_) -# define isDIGIT_A(c) inRANGE(c, '0', '9') -# define isPUNCT_A(c) generic_isCC_A_(c, CC_PUNCT_) -# define isSPACE_A(c) generic_isCC_A_(c, CC_SPACE_) -# define isWORDCHAR_A(c) generic_isCC_A_(c, CC_WORDCHAR_) -# define isXDIGIT_A(c) generic_isCC_(c, CC_XDIGIT_) /* No non-ASCII +# define isALPHANUMERIC_A(c) generic_isCC_A_(c, CC_ALPHANUMERIC_) +# define isBLANK_A(c) generic_isCC_A_(c, CC_BLANK_) +# define isCNTRL_A(c) generic_isCC_A_(c, CC_CNTRL_) +# define isDIGIT_A(c) inRANGE(c, '0', '9') +# define isPUNCT_A(c) generic_isCC_A_(c, CC_PUNCT_) +# define isSPACE_A(c) generic_isCC_A_(c, CC_SPACE_) +# define isWORDCHAR_A(c) generic_isCC_A_(c, CC_WORDCHAR_) +# define isXDIGIT_A(c) generic_isCC_(c, CC_XDIGIT_) /* No non-ASCII xdigits */ -# define isIDFIRST_A(c) generic_isCC_A_(c, CC_IDFIRST_) -# define isALPHA_L1(c) generic_isCC_(c, CC_ALPHA_) -# define isALPHANUMERIC_L1(c) generic_isCC_(c, CC_ALPHANUMERIC_) -# define isBLANK_L1(c) generic_isCC_(c, CC_BLANK_) +# define isIDFIRST_A(c) generic_isCC_A_(c, CC_IDFIRST_) +# define isALPHA_L1(c) generic_isCC_(c, CC_ALPHA_) +# define isALPHANUMERIC_L1(c) generic_isCC_(c, CC_ALPHANUMERIC_) +# define isBLANK_L1(c) generic_isCC_(c, CC_BLANK_) /* continuation character for legal NAME in \N{NAME} */ -# define isCHARNAME_CONT(c) generic_isCC_(c, CC_CHARNAME_CONT_) - -# define isCNTRL_L1(c) generic_isCC_(c, CC_CNTRL_) -# define isGRAPH_L1(c) generic_isCC_(c, CC_GRAPH_) -# define isLOWER_L1(c) generic_isCC_(c, CC_LOWER_) -# define isPRINT_L1(c) generic_isCC_(c, CC_PRINT_) -# define isPSXSPC_L1(c) isSPACE_L1(c) -# define isPUNCT_L1(c) generic_isCC_(c, CC_PUNCT_) -# define isSPACE_L1(c) generic_isCC_(c, CC_SPACE_) -# define isUPPER_L1(c) generic_isCC_(c, CC_UPPER_) -# define isWORDCHAR_L1(c) generic_isCC_(c, CC_WORDCHAR_) -# define isIDFIRST_L1(c) generic_isCC_(c, CC_IDFIRST_) +# define isCHARNAME_CONT(c) generic_isCC_(c, CC_CHARNAME_CONT_) + +# define isCNTRL_L1(c) generic_isCC_(c, CC_CNTRL_) +# define isGRAPH_L1(c) generic_isCC_(c, CC_GRAPH_) +# define isLOWER_L1(c) generic_isCC_(c, CC_LOWER_) +# define isPRINT_L1(c) generic_isCC_(c, CC_PRINT_) +# define isPSXSPC_L1(c) isSPACE_L1(c) +# define isPUNCT_L1(c) generic_isCC_(c, CC_PUNCT_) +# define isSPACE_L1(c) generic_isCC_(c, CC_SPACE_) +# define isUPPER_L1(c) generic_isCC_(c, CC_UPPER_) +# define isWORDCHAR_L1(c) generic_isCC_(c, CC_WORDCHAR_) +# define isIDFIRST_L1(c) generic_isCC_(c, CC_IDFIRST_) # ifdef EBCDIC -# define isASCII(c) generic_isCC_(c, CC_ASCII_) +# define isASCII(c) generic_isCC_(c, CC_ASCII_) # endif /* Participates in a single-character fold with a character above 255 */ @@ -1669,8 +1669,8 @@ END_EXTERN_C (( ! cBOOL(FITS_IN_8_BITS(c))) \ || (PL_charclass[(U8) (c)] & CC_mask_(CC_NONLATIN1_SIMPLE_FOLD_))) -# define IS_NON_FINAL_FOLD(c) generic_isCC_(c, CC_NON_FINAL_FOLD_) -# define IS_IN_SOME_FOLD_L1(c) generic_isCC_(c, CC_IS_IN_SOME_FOLD_) +# define IS_NON_FINAL_FOLD(c) generic_isCC_(c, CC_NON_FINAL_FOLD_) +# define IS_IN_SOME_FOLD_L1(c) generic_isCC_(c, CC_IS_IN_SOME_FOLD_) # endif /* Like the above, but also can be part of a multi-char fold */ @@ -1678,7 +1678,7 @@ END_EXTERN_C ( (! cBOOL(FITS_IN_8_BITS(c))) \ || (PL_charclass[(U8) (c)] & CC_mask_(CC_NONLATIN1_FOLD_))) -# define _isQUOTEMETA(c) generic_isCC_(c, CC_QUOTEMETA_) +# define _isQUOTEMETA(c) generic_isCC_(c, CC_QUOTEMETA_) /* is c a control character for which we have a mnemonic? */ # if defined(PERL_CORE) || defined(PERL_EXT) @@ -1690,8 +1690,8 @@ END_EXTERN_C * hard-code various macro definitions that wouldn't otherwise be * available to it. Most are coded based on first principles. These are * written to avoid EBCDIC vs. ASCII #ifdef's as much as possible. */ -# define isDIGIT_A(c) inRANGE(c, '0', '9') -# define isBLANK_A(c) ((c) == ' ' || (c) == '\t') +# define isDIGIT_A(c) inRANGE(c, '0', '9') +# define isBLANK_A(c) ((c) == ' ' || (c) == '\t') # define isSPACE_A(c) \ (isBLANK_A(c) \ || (c) == '\n' \ @@ -1710,10 +1710,10 @@ END_EXTERN_C inRANGE((c), 'A', 'I') \ || inRANGE((c), 'J', 'R') \ || inRANGE((c), 'S', 'Z') -# define isALPHA_A(c) (isUPPER_A(c) || isLOWER_A(c)) -# define isALPHANUMERIC_A(c) (isALPHA_A(c) || isDIGIT_A(c)) -# define isWORDCHAR_A(c) (isALPHANUMERIC_A(c) || (c) == '_') -# define isIDFIRST_A(c) (isALPHA_A(c) || (c) == '_') +# define isALPHA_A(c) (isUPPER_A(c) || isLOWER_A(c)) +# define isALPHANUMERIC_A(c) (isALPHA_A(c) || isDIGIT_A(c)) +# define isWORDCHAR_A(c) (isALPHANUMERIC_A(c) || (c) == '_') +# define isIDFIRST_A(c) (isALPHA_A(c) || (c) == '_') # define isXDIGIT_A(c) \ ( isDIGIT_A(c) \ || inRANGE((c), 'a', 'f') \ @@ -1730,8 +1730,8 @@ END_EXTERN_C || (c) == ']' || (c) == '^' || (c) == '_' \ || (c) == '`' || (c) == '{' || (c) == '|' \ || (c) == '}' || (c) == '~') -# define isGRAPH_A(c) (isALPHANUMERIC_A(c) || isPUNCT_A(c)) -# define isPRINT_A(c) (isGRAPH_A(c) || (c) == ' ') +# define isGRAPH_A(c) (isALPHANUMERIC_A(c) || isPUNCT_A(c)) +# define isPRINT_A(c) (isGRAPH_A(c) || (c) == ' ') # ifdef EBCDIC /* The below is accurate for the 3 EBCDIC code pages traditionally @@ -1757,10 +1757,10 @@ END_EXTERN_C || (c) == 0x3C /* U+14 DC4 */ \ || (c) == 0x3D /* U+15 NAK */ \ || (c) == 0x3F)/* U+1A SUB */ -# define isASCII(c) (isCNTRL_A(c) || isPRINT_A(c)) +# define isASCII(c) (isCNTRL_A(c) || isPRINT_A(c)) # else /* isASCII is already defined for ASCII platforms, so can use that to define isCNTRL */ -# define isCNTRL_A(c) (isASCII(c) && ! isPRINT_A(c)) +# define isCNTRL_A(c) (isASCII(c) && ! isPRINT_A(c)) # endif /* The _L1 macros may be unnecessary for the utilities; I (khw) added @@ -1770,14 +1770,14 @@ END_EXTERN_C # if ! defined(EBCDIC) && ! defined(NATIVE_TO_LATIN1) # define NATIVE_TO_LATIN1(ch) (ch) # endif -# define isALPHA_L1(c) (isUPPER_L1(c) || isLOWER_L1(c)) -# define isALPHANUMERIC_L1(c) (isALPHA_L1(c) || isDIGIT_A(c)) +# define isALPHA_L1(c) (isUPPER_L1(c) || isLOWER_L1(c)) +# define isALPHANUMERIC_L1(c) (isALPHA_L1(c) || isDIGIT_A(c)) # define isBLANK_L1(c) \ (isBLANK_A(c) \ || (FITS_IN_8_BITS(c) \ && NATIVE_TO_LATIN1((U8) c) == 0xA0)) -# define isCNTRL_L1(c) (FITS_IN_8_BITS(c) && (! isPRINT_L1(c))) -# define isGRAPH_L1(c) (isPRINT_L1(c) && (! isBLANK_L1(c))) +# define isCNTRL_L1(c) (FITS_IN_8_BITS(c) && (! isPRINT_L1(c))) +# define isGRAPH_L1(c) (isPRINT_L1(c) && (! isBLANK_L1(c))) # define isLOWER_L1(c) \ (isLOWER_A(c) \ || (FITS_IN_8_BITS(c) \ @@ -1811,8 +1811,8 @@ END_EXTERN_C && ( IN_RANGE(NATIVE_TO_LATIN1((U8) c), \ 0xC0, 0xDE) \ && NATIVE_TO_LATIN1((U8) c) != 0xD7))) -# define isWORDCHAR_L1(c) (isIDFIRST_L1(c) || isDIGIT_A(c)) -# define isIDFIRST_L1(c) (isALPHA_L1(c) || NATIVE_TO_LATIN1(c) == '_') +# define isWORDCHAR_L1(c) (isIDFIRST_L1(c) || isDIGIT_A(c)) +# define isIDFIRST_L1(c) (isALPHA_L1(c) || NATIVE_TO_LATIN1(c) == '_') # define isCHARNAME_CONT(c) \ (isWORDCHAR_L1(c) \ || isBLANK_L1(c) \ @@ -1822,7 +1822,7 @@ END_EXTERN_C /* The following are not fully accurate in the above-ASCII * range. I (khw) don't think it's necessary to be so for * the purposes where this gets compiled */ -# define isQUOTEMETA_(c) (FITS_IN_8_BITS(c) && ! isWORDCHAR_L1(c)) +# define isQUOTEMETA_(c) (FITS_IN_8_BITS(c) && ! isWORDCHAR_L1(c)) /* Many of the macros later in this file are defined in terms of these. By * implementing them with a function, which converts the class number into @@ -1837,25 +1837,25 @@ END_EXTERN_C (FITS_IN_8_BITS(c) && S_bootstrap_ctype((U8) (c), (classnum), FALSE)) #endif /* End of no perl.h H_PERL */ -#define isALPHANUMERIC(c) isALPHANUMERIC_A(c) -#define isALPHA(c) isALPHA_A(c) -#define isASCII_A(c) isASCII(c) -#define isASCII_L1(c) isASCII(c) -#define isBLANK(c) isBLANK_A(c) -#define isCNTRL(c) isCNTRL_A(c) -#define isDIGIT(c) isDIGIT_A(c) -#define isGRAPH(c) isGRAPH_A(c) -#define isIDFIRST(c) isIDFIRST_A(c) -#define isLOWER(c) isLOWER_A(c) -#define isPRINT(c) isPRINT_A(c) -#define isPSXSPC_A(c) isSPACE_A(c) -#define isPSXSPC(c) isPSXSPC_A(c) -#define isPSXSPC_L1(c) isSPACE_L1(c) -#define isPUNCT(c) isPUNCT_A(c) -#define isSPACE(c) isSPACE_A(c) -#define isUPPER(c) isUPPER_A(c) -#define isWORDCHAR(c) isWORDCHAR_A(c) -#define isXDIGIT(c) isXDIGIT_A(c) +#define isALPHANUMERIC(c) isALPHANUMERIC_A(c) +#define isALPHA(c) isALPHA_A(c) +#define isASCII_A(c) isASCII(c) +#define isASCII_L1(c) isASCII(c) +#define isBLANK(c) isBLANK_A(c) +#define isCNTRL(c) isCNTRL_A(c) +#define isDIGIT(c) isDIGIT_A(c) +#define isGRAPH(c) isGRAPH_A(c) +#define isIDFIRST(c) isIDFIRST_A(c) +#define isLOWER(c) isLOWER_A(c) +#define isPRINT(c) isPRINT_A(c) +#define isPSXSPC_A(c) isSPACE_A(c) +#define isPSXSPC(c) isPSXSPC_A(c) +#define isPSXSPC_L1(c) isSPACE_L1(c) +#define isPUNCT(c) isPUNCT_A(c) +#define isSPACE(c) isSPACE_A(c) +#define isUPPER(c) isUPPER_A(c) +#define isWORDCHAR(c) isWORDCHAR_A(c) +#define isXDIGIT(c) isXDIGIT_A(c) /* ASCII casing. These could also be written as #define toLOWER(c) (isASCII(c) ? toLOWER_LATIN1(c) : (c)) #define toUPPER(c) (isASCII(c) ? @@ -1866,27 +1866,27 @@ END_EXTERN_C These actually are UTF-8 invariant casing, not just ASCII, as any non-ASCII UTF-8 invariants are neither upper nor lower. (Only on EBCDIC platforms are there non-ASCII invariants, and all of them are controls.) */ -#define toLOWER(c) (isUPPER(c) ? (U8)((c) + ('a' - 'A')) : (c)) -#define toUPPER(c) (isLOWER(c) ? (U8)((c) - ('a' - 'A')) : (c)) +#define toLOWER(c) (isUPPER(c) ? (U8)((c) + ('a' - 'A')) : (c)) +#define toUPPER(c) (isLOWER(c) ? (U8)((c) - ('a' - 'A')) : (c)) /* In the ASCII range, these are equivalent to what they're here defined to * be. But by creating these definitions, other code doesn't have to be aware * of this detail. Actually this works for all UTF-8 invariants, not just the * ASCII range. (EBCDIC platforms can have non-ASCII invariants.) */ -#define toFOLD(c) toLOWER(c) -#define toTITLE(c) toUPPER(c) +#define toFOLD(c) toLOWER(c) +#define toTITLE(c) toUPPER(c) -#define toLOWER_A(c) toLOWER(c) -#define toUPPER_A(c) toUPPER(c) -#define toFOLD_A(c) toFOLD(c) -#define toTITLE_A(c) toTITLE(c) +#define toLOWER_A(c) toLOWER(c) +#define toUPPER_A(c) toUPPER(c) +#define toFOLD_A(c) toFOLD(c) +#define toTITLE_A(c) toTITLE(c) /* Use table lookup for speed; returns the input itself if is out-of-range */ #define toLOWER_LATIN1(c) \ ((! FITS_IN_8_BITS(c)) \ ? (c) \ : PL_latin1_lc[ (U8) (c) ]) -#define toLOWER_L1(c) toLOWER_LATIN1(c) /* Synonym for consistency */ +#define toLOWER_L1(c) toLOWER_LATIN1(c) /* Synonym for consistency */ /* Modified uc. Is correct uc except for three non-ascii chars * which are all mapped to one of them, and these need special @@ -1896,11 +1896,11 @@ END_EXTERN_C ? (c) \ : PL_mod_latin1_uc[ (U8) (c) ]) #ifdef USE_LOCALE_CTYPE -# define IN_UTF8_CTYPE_LOCALE PL_in_utf8_CTYPE_locale -# define IN_UTF8_TURKIC_LOCALE PL_in_utf8_turkic_locale +# define IN_UTF8_CTYPE_LOCALE PL_in_utf8_CTYPE_locale +# define IN_UTF8_TURKIC_LOCALE PL_in_utf8_turkic_locale #else -# define IN_UTF8_CTYPE_LOCALE false -# define IN_UTF8_TURKIC_LOCALE false +# define IN_UTF8_CTYPE_LOCALE false +# define IN_UTF8_TURKIC_LOCALE false #endif /* Use foo_LC_uvchr() instead of these for beyond the Latin1 range */ @@ -1944,27 +1944,27 @@ END_EXTERN_C * The first two aren't in C89, so the fallback is to use the non-locale * sensitive versions; these are the same for all platforms */ #if defined(HAS_ISASCII) -# define is_base_ASCII(c) isascii((U8) (c)) +# define is_base_ASCII(c) isascii((U8) (c)) #else -# define is_base_ASCII(c) isASCII(c) +# define is_base_ASCII(c) isASCII(c) #endif #if defined(HAS_ISBLANK) -# define is_base_BLANK(c) isblank((U8) (c)) +# define is_base_BLANK(c) isblank((U8) (c)) #else -# define is_base_BLANK(c) isBLANK(c) +# define is_base_BLANK(c) isBLANK(c) #endif /* The next few are the same in all platforms. */ -#define is_base_CNTRL(c) iscntrl((U8) (c)) -#define is_base_IDFIRST(c) (UNLIKELY((c) == '_') || is_base_ALPHA(c)) -#define is_base_SPACE(c) isspace((U8) (c)) -#define is_base_WORDCHAR(c) (UNLIKELY((c) == '_') || is_base_ALPHANUMERIC(c)) +#define is_base_CNTRL(c) iscntrl((U8) (c)) +#define is_base_IDFIRST(c) (UNLIKELY((c) == '_') || is_base_ALPHA(c)) +#define is_base_SPACE(c) isspace((U8) (c)) +#define is_base_WORDCHAR(c) (UNLIKELY((c) == '_') || is_base_ALPHANUMERIC(c)) /* The base-level case changing macros are also the same in all platforms */ -#define to_base_LOWER(c) tolower((U8) (c)) -#define to_base_UPPER(c) toupper((U8) (c)) -#define to_base_FOLD(c) to_base_LOWER(c) +#define to_base_LOWER(c) tolower((U8) (c)) +#define to_base_UPPER(c) toupper((U8) (c)) +#define to_base_FOLD(c) to_base_LOWER(c) #ifdef WIN32 @@ -2002,24 +2002,24 @@ END_EXTERN_C /* For all other platforms, as far as we know, * isdigit(), etc. work sanely enough */ -# define is_base_ALPHA(c) isalpha((U8) (c)) -# define is_base_ALPHANUMERIC(c) isalnum((U8) (c)) +# define is_base_ALPHA(c) isalpha((U8) (c)) +# define is_base_ALPHANUMERIC(c) isalnum((U8) (c)) # define is_base_CASED(c) (islower((U8) (c)) || isupper((U8) (c))) -# define is_base_DIGIT(c) isdigit((U8) (c)) +# define is_base_DIGIT(c) isdigit((U8) (c)) /* ... But it seems that IBM products treat NBSP as both a space and a * graphic; these are the two platforms that we have active test beds for. */ # if defined(OS390) || defined(_AIX) -# define is_base_GRAPH(c) (isgraph((U8) (c)) && ! isspace((U8) (c))) +# define is_base_GRAPH(c) (isgraph((U8) (c)) && ! isspace((U8) (c))) # else -# define is_base_GRAPH(c) isgraph((U8) (c)) +# define is_base_GRAPH(c) isgraph((U8) (c)) # endif -# define is_base_LOWER(c) islower((U8) (c)) -# define is_base_PRINT(c) isprint((U8) (c)) -# define is_base_PUNCT(c) ispunct((U8) (c)) -# define is_base_UPPER(c) isupper((U8) (c)) -# define is_base_XDIGIT(c) isxdigit((U8) (c)) +# define is_base_LOWER(c) islower((U8) (c)) +# define is_base_PRINT(c) isprint((U8) (c)) +# define is_base_PUNCT(c) ispunct((U8) (c)) +# define is_base_UPPER(c) isupper((U8) (c)) +# define is_base_XDIGIT(c) isxdigit((U8) (c)) #endif /* Below is the next level up, which currently expands to nothing more than @@ -2034,29 +2034,29 @@ END_EXTERN_C * (Note, proper general operation of the bare libc functons requires you * to cast to U8. These do that for you automatically.) */ -# define WRAP_U8_LC_(c, classnum, base) base(c) +# define WRAP_U8_LC_(c, classnum, base) base(c) #define isU8_ALPHANUMERIC_LC(c) \ WRAP_U8_LC_((c), CC_ALPHANUMERIC_, is_base_ALPHANUMERIC) -#define isU8_ALPHA_LC(c) WRAP_U8_LC_((c), CC_ALPHA_, is_base_ALPHA) -#define isU8_ASCII_LC(c) WRAP_U8_LC_((c), CC_ASCII_, is_base_ASCII) -#define isU8_BLANK_LC(c) WRAP_U8_LC_((c), CC_BLANK_, is_base_BLANK) -#define isU8_CASED_LC(c) WRAP_U8_LC_((c), CC_CASED_, is_base_CASED) -#define isU8_CNTRL_LC(c) WRAP_U8_LC_((c), CC_CNTRL_, is_base_CNTRL) -#define isU8_DIGIT_LC(c) WRAP_U8_LC_((c), CC_DIGIT_, is_base_DIGIT) -#define isU8_GRAPH_LC(c) WRAP_U8_LC_((c), CC_GRAPH_, is_base_GRAPH) -#define isU8_IDFIRST_LC(c) WRAP_U8_LC_((c), CC_IDFIRST_, is_base_IDFIRST) -#define isU8_LOWER_LC(c) WRAP_U8_LC_((c), CC_LOWER_, is_base_LOWER) -#define isU8_PRINT_LC(c) WRAP_U8_LC_((c), CC_PRINT_, is_base_PRINT) -#define isU8_PUNCT_LC(c) WRAP_U8_LC_((c), CC_PUNCT_, is_base_PUNCT) -#define isU8_SPACE_LC(c) WRAP_U8_LC_((c), CC_SPACE_, is_base_SPACE) -#define isU8_UPPER_LC(c) WRAP_U8_LC_((c), CC_UPPER_, is_base_UPPER) -#define isU8_WORDCHAR_LC(c) WRAP_U8_LC_((c), CC_WORDCHAR_, is_base_WORDCHAR) -#define isU8_XDIGIT_LC(c) WRAP_U8_LC_((c), CC_XDIGIT_, is_base_XDIGIT) - -#define toU8_LOWER_LC(c) WRAP_U8_LC_((c), CC_TOLOWER_, to_base_LOWER) -#define toU8_UPPER_LC(c) WRAP_U8_LC_((c), CC_TOUPPER_, to_base_UPPER) -#define toU8_FOLD_LC(c) toU8_LOWER_LC(c) +#define isU8_ALPHA_LC(c) WRAP_U8_LC_((c), CC_ALPHA_, is_base_ALPHA) +#define isU8_ASCII_LC(c) WRAP_U8_LC_((c), CC_ASCII_, is_base_ASCII) +#define isU8_BLANK_LC(c) WRAP_U8_LC_((c), CC_BLANK_, is_base_BLANK) +#define isU8_CASED_LC(c) WRAP_U8_LC_((c), CC_CASED_, is_base_CASED) +#define isU8_CNTRL_LC(c) WRAP_U8_LC_((c), CC_CNTRL_, is_base_CNTRL) +#define isU8_DIGIT_LC(c) WRAP_U8_LC_((c), CC_DIGIT_, is_base_DIGIT) +#define isU8_GRAPH_LC(c) WRAP_U8_LC_((c), CC_GRAPH_, is_base_GRAPH) +#define isU8_IDFIRST_LC(c) WRAP_U8_LC_((c), CC_IDFIRST_, is_base_IDFIRST) +#define isU8_LOWER_LC(c) WRAP_U8_LC_((c), CC_LOWER_, is_base_LOWER) +#define isU8_PRINT_LC(c) WRAP_U8_LC_((c), CC_PRINT_, is_base_PRINT) +#define isU8_PUNCT_LC(c) WRAP_U8_LC_((c), CC_PUNCT_, is_base_PUNCT) +#define isU8_SPACE_LC(c) WRAP_U8_LC_((c), CC_SPACE_, is_base_SPACE) +#define isU8_UPPER_LC(c) WRAP_U8_LC_((c), CC_UPPER_, is_base_UPPER) +#define isU8_WORDCHAR_LC(c) WRAP_U8_LC_((c), CC_WORDCHAR_, is_base_WORDCHAR) +#define isU8_XDIGIT_LC(c) WRAP_U8_LC_((c), CC_XDIGIT_, is_base_XDIGIT) + +#define toU8_LOWER_LC(c) WRAP_U8_LC_((c), CC_TOLOWER_, to_base_LOWER) +#define toU8_UPPER_LC(c) WRAP_U8_LC_((c), CC_TOUPPER_, to_base_UPPER) +#define toU8_FOLD_LC(c) toU8_LOWER_LC(c) /* The definitions below use the ones above to create versions in which the * input domain isn't restricted to bytes (though always returning false if @@ -2074,19 +2074,19 @@ END_EXTERN_C #define isCNTRL_LC(c) generic_LC_(c, CC_CNTRL_, isU8_CNTRL_LC) #define isDIGIT_LC(c) generic_LC_(c, CC_DIGIT_, isU8_DIGIT_LC) #define isGRAPH_LC(c) generic_LC_(c, CC_GRAPH_, isU8_GRAPH_LC) -#define isIDFIRST_LC(c) generic_LC_(c, CC_IDFIRST_, isU8_IDFIRST_LC) +#define isIDFIRST_LC(c) generic_LC_(c, CC_IDFIRST_, isU8_IDFIRST_LC) #define isLOWER_LC(c) generic_LC_(c, CC_LOWER_, isU8_LOWER_LC) #define isPRINT_LC(c) generic_LC_(c, CC_PRINT_, isU8_PRINT_LC) #define isPUNCT_LC(c) generic_LC_(c, CC_PUNCT_, isU8_PUNCT_LC) #define isSPACE_LC(c) generic_LC_(c, CC_SPACE_, isU8_SPACE_LC) #define isUPPER_LC(c) generic_LC_(c, CC_UPPER_, isU8_UPPER_LC) -#define isWORDCHAR_LC(c) generic_LC_(c, CC_WORDCHAR_, isU8_WORDCHAR_LC) -#define isXDIGIT_LC(c) generic_LC_(c, CC_XDIGIT_, isU8_XDIGIT_LC) +#define isWORDCHAR_LC(c) generic_LC_(c, CC_WORDCHAR_, isU8_WORDCHAR_LC) +#define isXDIGIT_LC(c) generic_LC_(c, CC_XDIGIT_, isU8_XDIGIT_LC) #ifndef CTYPE256 -# define toLOWER_LC(c) toLOWER_A(c) -# define toUPPER_LC(c) toUPPER_A(c) -# define toFOLD_LC(c) toFOLD_A(c) +# define toLOWER_LC(c) toLOWER_A(c) +# define toUPPER_LC(c) toUPPER_A(c) +# define toFOLD_LC(c) toFOLD_A(c) #else /* In the next three macros, the reason for using the PL_latin @@ -2134,11 +2134,11 @@ END_EXTERN_C toLOWER_LC(c))) #endif -#define isIDCONT(c) isWORDCHAR(c) -#define isIDCONT_A(c) isWORDCHAR_A(c) -#define isIDCONT_L1(c) isWORDCHAR_L1(c) -#define isIDCONT_LC(c) isWORDCHAR_LC(c) -#define isPSXSPC_LC(c) isSPACE_LC(c) +#define isIDCONT(c) isWORDCHAR(c) +#define isIDCONT_A(c) isWORDCHAR_A(c) +#define isIDCONT_L1(c) isWORDCHAR_L1(c) +#define isIDCONT_LC(c) isWORDCHAR_LC(c) +#define isPSXSPC_LC(c) isSPACE_LC(c) /* For internal core Perl use only: the base macros for defining macros like * isALPHA_uvchr. 'c' is the code point to check. 'classnum' is the POSIX @@ -2162,60 +2162,60 @@ END_EXTERN_C ((c) < 256 \ ? generic_isCC_(c, classnum) \ : _is_uni_FOO(classnum, c)) -#define isALPHA_uvchr(c) generic_invlist_uvchr_(CC_ALPHA_, c) -#define isALPHANUMERIC_uvchr(c) generic_invlist_uvchr_(CC_ALPHANUMERIC_, c) -#define isASCII_uvchr(c) isASCII(c) -#define isBLANK_uvchr(c) generic_uvchr_(CC_BLANK_, is_HORIZWS_cp_high, c) -#define isCNTRL_uvchr(c) isCNTRL_L1(c) /* All controls are in Latin1 */ -#define isDIGIT_uvchr(c) generic_invlist_uvchr_(CC_DIGIT_, c) -#define isGRAPH_uvchr(c) generic_invlist_uvchr_(CC_GRAPH_, c) +#define isALPHA_uvchr(c) generic_invlist_uvchr_(CC_ALPHA_, c) +#define isALPHANUMERIC_uvchr(c) generic_invlist_uvchr_(CC_ALPHANUMERIC_, c) +#define isASCII_uvchr(c) isASCII(c) +#define isBLANK_uvchr(c) generic_uvchr_(CC_BLANK_, is_HORIZWS_cp_high, c) +#define isCNTRL_uvchr(c) isCNTRL_L1(c) /* All controls are in Latin1 */ +#define isDIGIT_uvchr(c) generic_invlist_uvchr_(CC_DIGIT_, c) +#define isGRAPH_uvchr(c) generic_invlist_uvchr_(CC_GRAPH_, c) #define isIDCONT_uvchr(c) \ generic_uvchr_(CC_WORDCHAR_, _is_uni_perl_idcont, c) #define isIDFIRST_uvchr(c) \ generic_uvchr_(CC_IDFIRST_, _is_uni_perl_idstart, c) -#define isLOWER_uvchr(c) generic_invlist_uvchr_(CC_LOWER_, c) -#define isPRINT_uvchr(c) generic_invlist_uvchr_(CC_PRINT_, c) +#define isLOWER_uvchr(c) generic_invlist_uvchr_(CC_LOWER_, c) +#define isPRINT_uvchr(c) generic_invlist_uvchr_(CC_PRINT_, c) -#define isPUNCT_uvchr(c) generic_invlist_uvchr_(CC_PUNCT_, c) +#define isPUNCT_uvchr(c) generic_invlist_uvchr_(CC_PUNCT_, c) #define isSPACE_uvchr(c) \ generic_uvchr_(CC_SPACE_, is_XPERLSPACE_cp_high, c) -#define isPSXSPC_uvchr(c) isSPACE_uvchr(c) +#define isPSXSPC_uvchr(c) isSPACE_uvchr(c) -#define isUPPER_uvchr(c) generic_invlist_uvchr_(CC_UPPER_, c) +#define isUPPER_uvchr(c) generic_invlist_uvchr_(CC_UPPER_, c) #define isVERTWS_uvchr(c) \ generic_uvchr_(CC_VERTSPACE_, is_VERTWS_cp_high, c) -#define isWORDCHAR_uvchr(c) generic_invlist_uvchr_(CC_WORDCHAR_, c) -#define isXDIGIT_uvchr(c) generic_uvchr_(CC_XDIGIT_, is_XDIGIT_cp_high, c) +#define isWORDCHAR_uvchr(c) generic_invlist_uvchr_(CC_WORDCHAR_, c) +#define isXDIGIT_uvchr(c) generic_uvchr_(CC_XDIGIT_, is_XDIGIT_cp_high, c) -#define toFOLD_uvchr(c,s,l) to_uni_fold(c,s,l) -#define toLOWER_uvchr(c,s,l) to_uni_lower(c,s,l) -#define toTITLE_uvchr(c,s,l) to_uni_title(c,s,l) -#define toUPPER_uvchr(c,s,l) to_uni_upper(c,s,l) +#define toFOLD_uvchr(c,s,l) to_uni_fold(c,s,l) +#define toLOWER_uvchr(c,s,l) to_uni_lower(c,s,l) +#define toTITLE_uvchr(c,s,l) to_uni_title(c,s,l) +#define toUPPER_uvchr(c,s,l) to_uni_upper(c,s,l) /* For backwards compatibility, even though '_uni' should mean official * Unicode code points, in Perl it means native for those below 256 */ -#define isALPHA_uni(c) isALPHA_uvchr(c) -#define isALPHANUMERIC_uni(c) isALPHANUMERIC_uvchr(c) -#define isASCII_uni(c) isASCII_uvchr(c) -#define isBLANK_uni(c) isBLANK_uvchr(c) -#define isCNTRL_uni(c) isCNTRL_uvchr(c) -#define isDIGIT_uni(c) isDIGIT_uvchr(c) -#define isGRAPH_uni(c) isGRAPH_uvchr(c) -#define isIDCONT_uni(c) isIDCONT_uvchr(c) -#define isIDFIRST_uni(c) isIDFIRST_uvchr(c) -#define isLOWER_uni(c) isLOWER_uvchr(c) -#define isPRINT_uni(c) isPRINT_uvchr(c) -#define isPUNCT_uni(c) isPUNCT_uvchr(c) -#define isSPACE_uni(c) isSPACE_uvchr(c) -#define isPSXSPC_uni(c) isPSXSPC_uvchr(c) -#define isUPPER_uni(c) isUPPER_uvchr(c) -#define isVERTWS_uni(c) isVERTWS_uvchr(c) -#define isWORDCHAR_uni(c) isWORDCHAR_uvchr(c) -#define isXDIGIT_uni(c) isXDIGIT_uvchr(c) -#define toFOLD_uni(c,s,l) toFOLD_uvchr(c,s,l) -#define toLOWER_uni(c,s,l) toLOWER_uvchr(c,s,l) -#define toTITLE_uni(c,s,l) toTITLE_uvchr(c,s,l) -#define toUPPER_uni(c,s,l) toUPPER_uvchr(c,s,l) +#define isALPHA_uni(c) isALPHA_uvchr(c) +#define isALPHANUMERIC_uni(c) isALPHANUMERIC_uvchr(c) +#define isASCII_uni(c) isASCII_uvchr(c) +#define isBLANK_uni(c) isBLANK_uvchr(c) +#define isCNTRL_uni(c) isCNTRL_uvchr(c) +#define isDIGIT_uni(c) isDIGIT_uvchr(c) +#define isGRAPH_uni(c) isGRAPH_uvchr(c) +#define isIDCONT_uni(c) isIDCONT_uvchr(c) +#define isIDFIRST_uni(c) isIDFIRST_uvchr(c) +#define isLOWER_uni(c) isLOWER_uvchr(c) +#define isPRINT_uni(c) isPRINT_uvchr(c) +#define isPUNCT_uni(c) isPUNCT_uvchr(c) +#define isSPACE_uni(c) isSPACE_uvchr(c) +#define isPSXSPC_uni(c) isPSXSPC_uvchr(c) +#define isUPPER_uni(c) isUPPER_uvchr(c) +#define isVERTWS_uni(c) isVERTWS_uvchr(c) +#define isWORDCHAR_uni(c) isWORDCHAR_uvchr(c) +#define isXDIGIT_uni(c) isXDIGIT_uvchr(c) +#define toFOLD_uni(c,s,l) toFOLD_uvchr(c,s,l) +#define toLOWER_uni(c,s,l) toLOWER_uvchr(c,s,l) +#define toTITLE_uni(c,s,l) toTITLE_uvchr(c,s,l) +#define toUPPER_uni(c,s,l) toUPPER_uvchr(c,s,l) /* For internal core Perl use only: the base macros for defining macros * like isALPHA_LC_uvchr. These are like isALPHA_LC, but the input can be @@ -2227,31 +2227,31 @@ END_EXTERN_C #define generic_LC_invlist_uvchr_(latin1, classnum, c) \ (c < 256 ? latin1(c) : _is_uni_FOO(classnum, c)) -#define isALPHA_LC_uvchr(c) generic_LC_invlist_uvchr_(isALPHA_LC, CC_ALPHA_, c) +#define isALPHA_LC_uvchr(c) generic_LC_invlist_uvchr_(isALPHA_LC, CC_ALPHA_, c) #define isALPHANUMERIC_LC_uvchr(c) \ generic_LC_invlist_uvchr_(isALPHANUMERIC_LC, \ CC_ALPHANUMERIC_, c) -#define isASCII_LC_uvchr(c) isASCII_LC(c) +#define isASCII_LC_uvchr(c) isASCII_LC(c) #define isBLANK_LC_uvchr(c) \ generic_LC_uvchr_(isBLANK_LC, \ is_HORIZWS_cp_high, c) -#define isCNTRL_LC_uvchr(c) (c < 256 ? isCNTRL_LC(c) : 0) -#define isDIGIT_LC_uvchr(c) generic_LC_invlist_uvchr_(isDIGIT_LC, CC_DIGIT_, c) -#define isGRAPH_LC_uvchr(c) generic_LC_invlist_uvchr_(isGRAPH_LC, CC_GRAPH_, c) +#define isCNTRL_LC_uvchr(c) (c < 256 ? isCNTRL_LC(c) : 0) +#define isDIGIT_LC_uvchr(c) generic_LC_invlist_uvchr_(isDIGIT_LC, CC_DIGIT_, c) +#define isGRAPH_LC_uvchr(c) generic_LC_invlist_uvchr_(isGRAPH_LC, CC_GRAPH_, c) #define isIDCONT_LC_uvchr(c) \ generic_LC_uvchr_(isIDCONT_LC, \ _is_uni_perl_idcont, c) #define isIDFIRST_LC_uvchr(c) \ generic_LC_uvchr_(isIDFIRST_LC, \ _is_uni_perl_idstart, c) -#define isLOWER_LC_uvchr(c) generic_LC_invlist_uvchr_(isLOWER_LC, CC_LOWER_, c) -#define isPRINT_LC_uvchr(c) generic_LC_invlist_uvchr_(isPRINT_LC, CC_PRINT_, c) -#define isPSXSPC_LC_uvchr(c) isSPACE_LC_uvchr(c) -#define isPUNCT_LC_uvchr(c) generic_LC_invlist_uvchr_(isPUNCT_LC, CC_PUNCT_, c) +#define isLOWER_LC_uvchr(c) generic_LC_invlist_uvchr_(isLOWER_LC, CC_LOWER_, c) +#define isPRINT_LC_uvchr(c) generic_LC_invlist_uvchr_(isPRINT_LC, CC_PRINT_, c) +#define isPSXSPC_LC_uvchr(c) isSPACE_LC_uvchr(c) +#define isPUNCT_LC_uvchr(c) generic_LC_invlist_uvchr_(isPUNCT_LC, CC_PUNCT_, c) #define isSPACE_LC_uvchr(c) \ generic_LC_uvchr_(isSPACE_LC, \ is_XPERLSPACE_cp_high, c) -#define isUPPER_LC_uvchr(c) generic_LC_invlist_uvchr_(isUPPER_LC, CC_UPPER_, c) +#define isUPPER_LC_uvchr(c) generic_LC_invlist_uvchr_(isUPPER_LC, CC_UPPER_, c) #define isWORDCHAR_LC_uvchr(c) \ generic_LC_invlist_uvchr_(isWORDCHAR_LC, \ CC_WORDCHAR_, c) @@ -2259,7 +2259,7 @@ END_EXTERN_C generic_LC_uvchr_(isXDIGIT_LC, \ is_XDIGIT_cp_high, c) -#define isBLANK_LC_uni(c) isBLANK_LC_uvchr(UNI_TO_NATIVE(c)) +#define isBLANK_LC_uni(c) isBLANK_LC_uvchr(UNI_TO_NATIVE(c)) /* The "_safe" macros make sure that we don't attempt to read beyond 'e', * but they don't otherwise go out of their way to look for malformed @@ -2279,9 +2279,9 @@ END_EXTERN_C * end, so that *e = \0. A bunch of code in toke.c assumes that this is * true, so the assertion allows for that */ #ifdef PERL_IN_TOKE_C -# define _utf8_safe_assert(p,e) ((e) > (p) || ((e) == (p) && *(p) == '\0')) +# define _utf8_safe_assert(p,e) ((e) > (p) || ((e) == (p) && *(p) == '\0')) #else -# define _utf8_safe_assert(p,e) ((e) > (p)) +# define _utf8_safe_assert(p,e) ((e) > (p)) #endif #define generic_utf8_safe_(classnum, p, e, above_latin1) \ @@ -2324,26 +2324,26 @@ END_EXTERN_C : above_latin1) -#define isALPHA_utf8(p, e) isALPHA_utf8_safe(p, e) -#define isALPHANUMERIC_utf8(p, e) isALPHANUMERIC_utf8_safe(p, e) -#define isASCII_utf8(p, e) isASCII_utf8_safe(p, e) -#define isBLANK_utf8(p, e) isBLANK_utf8_safe(p, e) -#define isCNTRL_utf8(p, e) isCNTRL_utf8_safe(p, e) -#define isDIGIT_utf8(p, e) isDIGIT_utf8_safe(p, e) -#define isGRAPH_utf8(p, e) isGRAPH_utf8_safe(p, e) -#define isIDCONT_utf8(p, e) isIDCONT_utf8_safe(p, e) -#define isIDFIRST_utf8(p, e) isIDFIRST_utf8_safe(p, e) -#define isLOWER_utf8(p, e) isLOWER_utf8_safe(p, e) -#define isPRINT_utf8(p, e) isPRINT_utf8_safe(p, e) -#define isPSXSPC_utf8(p, e) isPSXSPC_utf8_safe(p, e) -#define isPUNCT_utf8(p, e) isPUNCT_utf8_safe(p, e) -#define isSPACE_utf8(p, e) isSPACE_utf8_safe(p, e) -#define isUPPER_utf8(p, e) isUPPER_utf8_safe(p, e) -#define isVERTWS_utf8(p, e) isVERTWS_utf8_safe(p, e) -#define isWORDCHAR_utf8(p, e) isWORDCHAR_utf8_safe(p, e) -#define isXDIGIT_utf8(p, e) isXDIGIT_utf8_safe(p, e) - -#define isALPHA_utf8_safe(p, e) generic_invlist_utf8_safe_(CC_ALPHA_, p, e) +#define isALPHA_utf8(p, e) isALPHA_utf8_safe(p, e) +#define isALPHANUMERIC_utf8(p, e) isALPHANUMERIC_utf8_safe(p, e) +#define isASCII_utf8(p, e) isASCII_utf8_safe(p, e) +#define isBLANK_utf8(p, e) isBLANK_utf8_safe(p, e) +#define isCNTRL_utf8(p, e) isCNTRL_utf8_safe(p, e) +#define isDIGIT_utf8(p, e) isDIGIT_utf8_safe(p, e) +#define isGRAPH_utf8(p, e) isGRAPH_utf8_safe(p, e) +#define isIDCONT_utf8(p, e) isIDCONT_utf8_safe(p, e) +#define isIDFIRST_utf8(p, e) isIDFIRST_utf8_safe(p, e) +#define isLOWER_utf8(p, e) isLOWER_utf8_safe(p, e) +#define isPRINT_utf8(p, e) isPRINT_utf8_safe(p, e) +#define isPSXSPC_utf8(p, e) isPSXSPC_utf8_safe(p, e) +#define isPUNCT_utf8(p, e) isPUNCT_utf8_safe(p, e) +#define isSPACE_utf8(p, e) isSPACE_utf8_safe(p, e) +#define isUPPER_utf8(p, e) isUPPER_utf8_safe(p, e) +#define isVERTWS_utf8(p, e) isVERTWS_utf8_safe(p, e) +#define isWORDCHAR_utf8(p, e) isWORDCHAR_utf8_safe(p, e) +#define isXDIGIT_utf8(p, e) isXDIGIT_utf8_safe(p, e) + +#define isALPHA_utf8_safe(p, e) generic_invlist_utf8_safe_(CC_ALPHA_, p, e) #define isALPHANUMERIC_utf8_safe(p, e) \ generic_invlist_utf8_safe_(CC_ALPHANUMERIC_, p, e) #define isASCII_utf8_safe(p, e) \ @@ -2358,13 +2358,13 @@ END_EXTERN_C # define isCNTRL_utf8_safe(p, e) \ (__ASSERT_(_utf8_safe_assert(p, e)) isCNTRL_L1(*(p))) #else -# define isCNTRL_utf8_safe(p, e) generic_utf8_safe_(CC_CNTRL_, p, e, 0) +# define isCNTRL_utf8_safe(p, e) generic_utf8_safe_(CC_CNTRL_, p, e, 0) #endif #define isDIGIT_utf8_safe(p, e) \ generic_utf8_safe_no_upper_latin1_(CC_DIGIT_, p, e, \ _is_utf8_FOO(CC_DIGIT_, p, e)) -#define isGRAPH_utf8_safe(p, e) generic_invlist_utf8_safe_(CC_GRAPH_, p, e) +#define isGRAPH_utf8_safe(p, e) generic_invlist_utf8_safe_(CC_GRAPH_, p, e) #define isIDCONT_utf8_safe(p, e) \ generic_func_utf8_safe_(CC_WORDCHAR_, \ _is_utf8_perl_idcont, p, e) @@ -2380,11 +2380,11 @@ END_EXTERN_C #define isLOWER_utf8_safe(p, e) generic_invlist_utf8_safe_(CC_LOWER_, p, e) #define isPRINT_utf8_safe(p, e) generic_invlist_utf8_safe_(CC_PRINT_, p, e) -#define isPSXSPC_utf8_safe(p, e) isSPACE_utf8_safe(p, e) +#define isPSXSPC_utf8_safe(p, e) isSPACE_utf8_safe(p, e) #define isPUNCT_utf8_safe(p, e) generic_invlist_utf8_safe_(CC_PUNCT_, p, e) #define isSPACE_utf8_safe(p, e) \ generic_non_invlist_utf8_safe_(CC_SPACE_, is_XPERLSPACE_high, p, e) -#define isUPPER_utf8_safe(p, e) generic_invlist_utf8_safe_(CC_UPPER_, p, e) +#define isUPPER_utf8_safe(p, e) generic_invlist_utf8_safe_(CC_UPPER_, p, e) #define isVERTWS_utf8_safe(p, e) \ generic_non_invlist_utf8_safe_(CC_VERTSPACE_, is_VERTWS_high, p, e) #define isWORDCHAR_utf8_safe(p, e) \ @@ -2396,13 +2396,13 @@ END_EXTERN_C (U8 *) (p), (U8 *) (e), 0, 1), 0) \ : is_XDIGIT_high(p))) -#define toFOLD_utf8(p,e,s,l) toFOLD_utf8_safe(p,e,s,l) -#define toLOWER_utf8(p,e,s,l) toLOWER_utf8_safe(p,e,s,l) -#define toTITLE_utf8(p,e,s,l) toTITLE_utf8_safe(p,e,s,l) -#define toUPPER_utf8(p,e,s,l) toUPPER_utf8_safe(p,e,s,l) +#define toFOLD_utf8(p,e,s,l) toFOLD_utf8_safe(p,e,s,l) +#define toLOWER_utf8(p,e,s,l) toLOWER_utf8_safe(p,e,s,l) +#define toTITLE_utf8(p,e,s,l) toTITLE_utf8_safe(p,e,s,l) +#define toUPPER_utf8(p,e,s,l) toUPPER_utf8_safe(p,e,s,l) /* For internal core use only, subject to change */ -#define _toFOLD_utf8_flags(p,e,s,l,f) _to_utf8_fold_flags (p,e,s,l,f) +#define _toFOLD_utf8_flags(p,e,s,l,f) _to_utf8_fold_flags (p,e,s,l,f) #define _toLOWER_utf8_flags(p,e,s,l,f) _to_utf8_lower_flags(p,e,s,l,f) #define _toTITLE_utf8_flags(p,e,s,l,f) _to_utf8_title_flags(p,e,s,l,f) #define _toUPPER_utf8_flags(p,e,s,l,f) _to_utf8_upper_flags(p,e,s,l,f) @@ -2412,23 +2412,23 @@ END_EXTERN_C #define toTITLE_utf8_safe(p,e,s,l) _toTITLE_utf8_flags(p,e,s,l, 0) #define toUPPER_utf8_safe(p,e,s,l) _toUPPER_utf8_flags(p,e,s,l, 0) -#define isALPHA_LC_utf8(p, e) isALPHA_LC_utf8_safe(p, e) -#define isALPHANUMERIC_LC_utf8(p, e) isALPHANUMERIC_LC_utf8_safe(p, e) -#define isASCII_LC_utf8(p, e) isASCII_LC_utf8_safe(p, e) -#define isBLANK_LC_utf8(p, e) isBLANK_LC_utf8_safe(p, e) -#define isCNTRL_LC_utf8(p, e) isCNTRL_LC_utf8_safe(p, e) -#define isDIGIT_LC_utf8(p, e) isDIGIT_LC_utf8_safe(p, e) -#define isGRAPH_LC_utf8(p, e) isGRAPH_LC_utf8_safe(p, e) -#define isIDCONT_LC_utf8(p, e) isIDCONT_LC_utf8_safe(p, e) -#define isIDFIRST_LC_utf8(p, e) isIDFIRST_LC_utf8_safe(p, e) -#define isLOWER_LC_utf8(p, e) isLOWER_LC_utf8_safe(p, e) -#define isPRINT_LC_utf8(p, e) isPRINT_LC_utf8_safe(p, e) -#define isPSXSPC_LC_utf8(p, e) isPSXSPC_LC_utf8_safe(p, e) -#define isPUNCT_LC_utf8(p, e) isPUNCT_LC_utf8_safe(p, e) -#define isSPACE_LC_utf8(p, e) isSPACE_LC_utf8_safe(p, e) -#define isUPPER_LC_utf8(p, e) isUPPER_LC_utf8_safe(p, e) -#define isWORDCHAR_LC_utf8(p, e) isWORDCHAR_LC_utf8_safe(p, e) -#define isXDIGIT_LC_utf8(p, e) isXDIGIT_LC_utf8_safe(p, e) +#define isALPHA_LC_utf8(p, e) isALPHA_LC_utf8_safe(p, e) +#define isALPHANUMERIC_LC_utf8(p, e) isALPHANUMERIC_LC_utf8_safe(p, e) +#define isASCII_LC_utf8(p, e) isASCII_LC_utf8_safe(p, e) +#define isBLANK_LC_utf8(p, e) isBLANK_LC_utf8_safe(p, e) +#define isCNTRL_LC_utf8(p, e) isCNTRL_LC_utf8_safe(p, e) +#define isDIGIT_LC_utf8(p, e) isDIGIT_LC_utf8_safe(p, e) +#define isGRAPH_LC_utf8(p, e) isGRAPH_LC_utf8_safe(p, e) +#define isIDCONT_LC_utf8(p, e) isIDCONT_LC_utf8_safe(p, e) +#define isIDFIRST_LC_utf8(p, e) isIDFIRST_LC_utf8_safe(p, e) +#define isLOWER_LC_utf8(p, e) isLOWER_LC_utf8_safe(p, e) +#define isPRINT_LC_utf8(p, e) isPRINT_LC_utf8_safe(p, e) +#define isPSXSPC_LC_utf8(p, e) isPSXSPC_LC_utf8_safe(p, e) +#define isPUNCT_LC_utf8(p, e) isPUNCT_LC_utf8_safe(p, e) +#define isSPACE_LC_utf8(p, e) isSPACE_LC_utf8_safe(p, e) +#define isUPPER_LC_utf8(p, e) isUPPER_LC_utf8_safe(p, e) +#define isWORDCHAR_LC_utf8(p, e) isWORDCHAR_LC_utf8_safe(p, e) +#define isXDIGIT_LC_utf8(p, e) isXDIGIT_LC_utf8_safe(p, e) /* For internal core Perl use only: the base macros for defining * macros like isALPHA_LC_utf8_safe. These are like generic_utf8_, @@ -2484,7 +2484,7 @@ END_EXTERN_C generic_LC_invlist_utf8_safe_(isLOWER_LC, CC_LOWER_, p, e) #define isPRINT_LC_utf8_safe(p, e) \ generic_LC_invlist_utf8_safe_(isPRINT_LC, CC_PRINT_, p, e) -#define isPSXSPC_LC_utf8_safe(p, e) isSPACE_LC_utf8_safe(p, e) +#define isPSXSPC_LC_utf8_safe(p, e) isSPACE_LC_utf8_safe(p, e) #define isPUNCT_LC_utf8_safe(p, e) \ generic_LC_invlist_utf8_safe_(isPUNCT_LC, CC_PUNCT_, p, e) #define isSPACE_LC_utf8_safe(p, e) \ @@ -2498,31 +2498,31 @@ END_EXTERN_C /* Macros for backwards compatibility and for completeness * when the ASCII and Latin1 values are identical */ -#define isALPHAU(c) isALPHA_L1(c) -#define isDIGIT_L1(c) isDIGIT_A(c) -#define isOCTAL(c) isOCTAL_A(c) -#define isOCTAL_L1(c) isOCTAL_A(c) -#define isXDIGIT_L1(c) isXDIGIT_A(c) -#define isALNUM(c) isWORDCHAR(c) -#define isALNUM_A(c) isALNUM(c) -#define isALNUMU(c) isWORDCHAR_L1(c) -#define isALNUM_LC(c) isWORDCHAR_LC(c) -#define isALNUM_uni(c) isWORDCHAR_uni(c) -#define isALNUM_LC_uvchr(c) isWORDCHAR_LC_uvchr(c) -#define isALNUM_utf8(p,e) isWORDCHAR_utf8(p,e) -#define isALNUM_utf8_safe(p,e) isWORDCHAR_utf8_safe(p,e) -#define isALNUM_LC_utf8(p,e) isWORDCHAR_LC_utf8(p,e) -#define isALNUM_LC_utf8_safe(p,e) isWORDCHAR_LC_utf8_safe(p,e) -#define isALNUMC_A(c) isALPHANUMERIC_A(c) /* Mnemonic: "C's +#define isALPHAU(c) isALPHA_L1(c) +#define isDIGIT_L1(c) isDIGIT_A(c) +#define isOCTAL(c) isOCTAL_A(c) +#define isOCTAL_L1(c) isOCTAL_A(c) +#define isXDIGIT_L1(c) isXDIGIT_A(c) +#define isALNUM(c) isWORDCHAR(c) +#define isALNUM_A(c) isALNUM(c) +#define isALNUMU(c) isWORDCHAR_L1(c) +#define isALNUM_LC(c) isWORDCHAR_LC(c) +#define isALNUM_uni(c) isWORDCHAR_uni(c) +#define isALNUM_LC_uvchr(c) isWORDCHAR_LC_uvchr(c) +#define isALNUM_utf8(p,e) isWORDCHAR_utf8(p,e) +#define isALNUM_utf8_safe(p,e) isWORDCHAR_utf8_safe(p,e) +#define isALNUM_LC_utf8(p,e) isWORDCHAR_LC_utf8(p,e) +#define isALNUM_LC_utf8_safe(p,e) isWORDCHAR_LC_utf8_safe(p,e) +#define isALNUMC_A(c) isALPHANUMERIC_A(c) /* Mnemonic: "C's alnum" */ -#define isALNUMC_L1(c) isALPHANUMERIC_L1(c) -#define isALNUMC(c) isALPHANUMERIC(c) -#define isALNUMC_LC(c) isALPHANUMERIC_LC(c) -#define isALNUMC_uni(c) isALPHANUMERIC_uni(c) -#define isALNUMC_LC_uvchr(c) isALPHANUMERIC_LC_uvchr(c) -#define isALNUMC_utf8(p,e) isALPHANUMERIC_utf8(p,e) -#define isALNUMC_utf8_safe(p,e) isALPHANUMERIC_utf8_safe(p,e) -#define isALNUMC_LC_utf8_safe(p,e) isALPHANUMERIC_LC_utf8_safe(p,e) +#define isALNUMC_L1(c) isALPHANUMERIC_L1(c) +#define isALNUMC(c) isALPHANUMERIC(c) +#define isALNUMC_LC(c) isALPHANUMERIC_LC(c) +#define isALNUMC_uni(c) isALPHANUMERIC_uni(c) +#define isALNUMC_LC_uvchr(c) isALPHANUMERIC_LC_uvchr(c) +#define isALNUMC_utf8(p,e) isALPHANUMERIC_utf8(p,e) +#define isALNUMC_utf8_safe(p,e) isALPHANUMERIC_utf8_safe(p,e) +#define isALNUMC_LC_utf8_safe(p,e) isALPHANUMERIC_LC_utf8_safe(p,e) /* On EBCDIC platforms, CTRL-@ is 0, CTRL-A is 1, etc, just like on * ASCII, except that they don't necessarily mean the same characters, @@ -2534,7 +2534,7 @@ END_EXTERN_C * special cased, it would yield a non-control. The conversion works * both ways, so toCTRL('D') is 4, and toCTRL(4) is D, etc. */ #ifndef EBCDIC -# define toCTRL(c) (__ASSERT_(FITS_IN_8_BITS(c)) toUPPER(((U8)(c))) ^ 64) +# define toCTRL(c) (__ASSERT_(FITS_IN_8_BITS(c)) toUPPER(((U8)(c))) ^ 64) #else # define toCTRL(c) \ (__ASSERT_(FITS_IN_8_BITS(c)) \ @@ -2556,8 +2556,8 @@ The typedef to use to declare variables that are to hold line numbers. Line numbers are unsigned, 32 bits. */ typedef U32 line_t; -#define LINE_Tf U32uf -#define NOLINE ((line_t) 4294967295UL) /* = FFFFFFFF */ +#define LINE_Tf U32uf +#define NOLINE ((line_t) 4294967295UL) /* = FFFFFFFF */ /* Helpful alias for version prescan */ #define is_LAX_VERSION(a,b) \ @@ -2588,13 +2588,13 @@ typedef U32 line_t; + ((c) & 0xF)) /* 0-9 if input valid hex digit */ /* The argument is a string pointer, which is advanced. */ -#define READ_XDIGIT(s) ((s)++, XDIGIT_VALUE(*((s) - 1))) +#define READ_XDIGIT(s) ((s)++, XDIGIT_VALUE(*((s) - 1))) /* Converts a character known to represent an octal digit (0-7) * to its numeric value. The input is validated only by an * assert() in DEBUGGING builds. In both ASCII and EBCDIC the * last 3 bits of the octal digits range from 0-7. */ -#define OCTAL_VALUE(c) (__ASSERT_(isOCTAL(c)) (7 & (c))) +#define OCTAL_VALUE(c) (__ASSERT_(isOCTAL(c)) (7 & (c))) /* Efficiently returns a boolean as to if two native characters are equivalent * case-insensitively. At least one of the characters must be one of [A-Za-z]; @@ -2613,7 +2613,7 @@ typedef U32 line_t; #define isALPHA_FOLD_EQ(c1, c2) \ (__ASSERT_(isALPHA_A(c1) || isALPHA_A(c2)) \ ((c1) & ~('A' ^ 'a')) == ((c2) & ~('A' ^ 'a'))) -#define isALPHA_FOLD_NE(c1, c2) (! isALPHA_FOLD_EQ((c1), (c2))) +#define isALPHA_FOLD_NE(c1, c2) (! isALPHA_FOLD_EQ((c1), (c2))) /* =for apidoc_section $memory @@ -2715,10 +2715,10 @@ PoisonWith(0xEF) for catching access to freed memory. /* Maintained for backwards-compatibility only. Use newSV() instead. */ #ifndef PERL_CORE -#define NEWSV(x,len) newSV(len) +#define NEWSV(x,len) newSV(len) #endif -#define MEM_SIZE_MAX ((MEM_SIZE)-1) +#define MEM_SIZE_MAX ((MEM_SIZE)-1) #define _PERL_STRLEN_ROUNDUP_UNCHECKED(n) \ (((n) - 1 + PERL_STRLEN_ROUNDUP_QUANTUM) & ~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM - 1)) @@ -2771,7 +2771,7 @@ PoisonWith(0xEF) for catching access to freed memory. ( (void) (UNLIKELY(_MEM_WRAP_WILL_WRAP(n,t)) \ && (Perl_croak_nocontext(ASSERT_IS_LITERAL(a)), 0))) -# define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t), +# define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t), # 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)) @@ -2782,7 +2782,7 @@ PoisonWith(0xEF) for catching access to freed memory. # define MEM_WRAP_CHECK_s(n,t,a) # define MEM_WRAP_CHECK_(n,t) -# define PERL_STRLEN_ROUNDUP(n) _PERL_STRLEN_ROUNDUP_UNCHECKED(n) +# define PERL_STRLEN_ROUNDUP(n) _PERL_STRLEN_ROUNDUP_UNCHECKED(n) #endif @@ -2843,13 +2843,13 @@ enum mem_log_type { #endif #ifndef MEM_LOG_ALLOC -#define MEM_LOG_ALLOC(n,t,a) (a) +#define MEM_LOG_ALLOC(n,t,a) (a) #endif #ifndef MEM_LOG_REALLOC -#define MEM_LOG_REALLOC(n,t,v,a) (a) +#define MEM_LOG_REALLOC(n,t,v,a) (a) #endif #ifndef MEM_LOG_FREE -#define MEM_LOG_FREE(a) (a) +#define MEM_LOG_FREE(a) (a) #endif #define Newx(v,n,t) \ @@ -2861,9 +2861,9 @@ enum mem_log_type { #ifndef PERL_CORE /* pre 5.9.x compatibility */ -#define New(x,v,n,t) Newx(v,n,t) -#define Newc(x,v,n,t,c) Newxc(v,n,t,c) -#define Newz(x,v,n,t) Newxz(v,n,t) +#define New(x,v,n,t) Newx(v,n,t) +#define Newc(x,v,n,t,c) Newxc(v,n,t,c) +#define Newz(x,v,n,t) Newxz(v,n,t) #endif #define Renew(v,n,t) \ @@ -2875,13 +2875,13 @@ enum mem_log_type { #define Safefree(d) \ ((d) ? (void)(safefree(MEM_LOG_FREE((Malloc_t)(d))), Poison(&(d), 1, Malloc_t)) : (void) 0) #else -#define Safefree(d) safefree(MEM_LOG_FREE((Malloc_t)(d))) +#define Safefree(d) safefree(MEM_LOG_FREE((Malloc_t)(d))) #endif /* assert that a valid ptr has been supplied - use this instead of assert(ptr) * as it handles cases like constant string arguments without throwing warnings * the cast is required, as is the inequality check, to avoid warnings */ -#define perl_assert_ptr(p) assert( ((void*)(p)) != 0 ) +#define perl_assert_ptr(p) assert( ((void*)(p)) != 0 ) #define Move(s,d,n,t) \ @@ -2901,18 +2901,18 @@ enum mem_log_type { #define PoisonWith(d,n,t,b) \ (MEM_WRAP_CHECK_(n,t) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t))) -#define PoisonNew(d,n,t) PoisonWith(d,n,t,0xAB) -#define PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF) -#define Poison(d,n,t) PoisonFree(d,n,t) +#define PoisonNew(d,n,t) PoisonWith(d,n,t,0xAB) +#define PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF) +#define Poison(d,n,t) PoisonFree(d,n,t) #ifdef PERL_POISON -# define PERL_POISON_EXPR(x) x +# define PERL_POISON_EXPR(x) x #else # define PERL_POISON_EXPR(x) #endif /* Shallow copy */ -#define StructCopy(s,d,t) (*((t*)(d)) = *((t*)(s))) +#define StructCopy(s,d,t) (*((t*)(d)) = *((t*)(s))) /* =for apidoc_section $utility @@ -2931,33 +2931,33 @@ Returns a pointer to one element past the final element of the input C array. C_ARRAY_END is one past the last: half-open/half-closed range, not last-inclusive range. */ -#define C_ARRAY_LENGTH(a) (sizeof(a)/sizeof((a)[0])) -#define C_ARRAY_END(a) ((a) + C_ARRAY_LENGTH(a)) +#define C_ARRAY_LENGTH(a) (sizeof(a)/sizeof((a)[0])) +#define C_ARRAY_END(a) ((a) + C_ARRAY_LENGTH(a)) #if defined(PERL_CORE) || defined(PERL_EXT_RE_BUILD) /* strlen() of a literal string constant. Restricting this to core, in part * because it can generate compiler warnings about comparing unlike signs */ -# define STRLENs(s) (sizeof("" s "") - 1) +# define STRLENs(s) (sizeof("" s "") - 1) #endif #ifdef NEED_VA_COPY # ifdef va_copy -# define Perl_va_copy(s, d) va_copy(d, s) +# define Perl_va_copy(s, d) va_copy(d, s) # elif defined(__va_copy) -# define Perl_va_copy(s, d) __va_copy(d, s) +# define Perl_va_copy(s, d) __va_copy(d, s) # else -# define Perl_va_copy(s, d) Copy(s, d, 1, va_list) +# define Perl_va_copy(s, d) Copy(s, d, 1, va_list) # endif #endif /* convenience debug macros */ #ifdef USE_ITHREADS -#define pTHX_FORMAT "Perl interpreter: 0x%p" -#define pTHX__FORMAT ", Perl interpreter: 0x%p" -#define pTHX_VALUE_ (void *)my_perl, -#define pTHX_VALUE (void *)my_perl -#define pTHX__VALUE_ ,(void *)my_perl, -#define pTHX__VALUE ,(void *)my_perl +#define pTHX_FORMAT "Perl interpreter: 0x%p" +#define pTHX__FORMAT ", Perl interpreter: 0x%p" +#define pTHX_VALUE_ (void *)my_perl, +#define pTHX_VALUE (void *)my_perl +#define pTHX__VALUE_ ,(void *)my_perl, +#define pTHX__VALUE ,(void *)my_perl #else #define pTHX_FORMAT #define pTHX__FORMAT @@ -2987,25 +2987,25 @@ last-inclusive range. #ifdef PERL_CORE # if Uid_t_size > IVSIZE -# define sv_setuid(sv, uid) sv_setnv((sv), (NV)(uid)) -# define SvUID(sv) SvNV(sv) +# define sv_setuid(sv, uid) sv_setnv((sv), (NV)(uid)) +# define SvUID(sv) SvNV(sv) # elif Uid_t_sign <= 0 -# define sv_setuid(sv, uid) sv_setiv((sv), (IV)(uid)) -# define SvUID(sv) SvIV(sv) +# define sv_setuid(sv, uid) sv_setiv((sv), (IV)(uid)) +# define SvUID(sv) SvIV(sv) # else -# define sv_setuid(sv, uid) sv_setuv((sv), (UV)(uid)) -# define SvUID(sv) SvUV(sv) +# define sv_setuid(sv, uid) sv_setuv((sv), (UV)(uid)) +# define SvUID(sv) SvUV(sv) # endif /* Uid_t_size */ # if Gid_t_size > IVSIZE -# define sv_setgid(sv, gid) sv_setnv((sv), (NV)(gid)) -# define SvGID(sv) SvNV(sv) +# define sv_setgid(sv, gid) sv_setnv((sv), (NV)(gid)) +# define SvGID(sv) SvNV(sv) # elif Gid_t_sign <= 0 -# define sv_setgid(sv, gid) sv_setiv((sv), (IV)(gid)) -# define SvGID(sv) SvIV(sv) +# define sv_setgid(sv, gid) sv_setiv((sv), (IV)(gid)) +# define SvGID(sv) SvIV(sv) # else -# define sv_setgid(sv, gid) sv_setuv((sv), (UV)(gid)) -# define SvGID(sv) SvUV(sv) +# define sv_setgid(sv, gid) sv_setuv((sv), (UV)(gid)) +# define SvGID(sv) SvUV(sv) # endif /* Gid_t_size */ #endif diff --git a/hv.h b/hv.h index cf35ac96388a..374c2364cc4b 100644 --- a/hv.h +++ b/hv.h @@ -13,17 +13,17 @@ * tests, but should otherwise work fine. See perlrun for more details. */ #if defined(PERL_PERTURB_KEYS_DISABLED) -# define PL_HASH_RAND_BITS_ENABLED 0 -# define PERL_HASH_ITER_BUCKET(iter) ((iter)->xhv_riter) +# define PL_HASH_RAND_BITS_ENABLED 0 +# define PERL_HASH_ITER_BUCKET(iter) ((iter)->xhv_riter) #else -# define PERL_HASH_RANDOMIZE_KEYS 1 +# define PERL_HASH_RANDOMIZE_KEYS 1 # if defined(PERL_PERTURB_KEYS_RANDOM) -# define PL_HASH_RAND_BITS_ENABLED 1 +# define PL_HASH_RAND_BITS_ENABLED 1 # elif defined(PERL_PERTURB_KEYS_DETERMINISTIC) -# define PL_HASH_RAND_BITS_ENABLED 2 +# define PL_HASH_RAND_BITS_ENABLED 2 # else -# define USE_PERL_PERTURB_KEYS 1 -# define PL_HASH_RAND_BITS_ENABLED PL_hash_rand_bits_enabled +# define USE_PERL_PERTURB_KEYS 1 +# define PL_HASH_RAND_BITS_ENABLED PL_hash_rand_bits_enabled # endif # define PERL_HASH_ITER_BUCKET(iter) \ (((iter)->xhv_riter) ^ ((iter)->xhv_rand)) @@ -33,7 +33,7 @@ #define LARGE_HASH_HEURISTIC(hv,new_max) \ S_large_hash_heuristic(aTHX_ (hv), (new_max)) #else -#define LARGE_HASH_HEURISTIC(hv,new_max) 0 +#define LARGE_HASH_HEURISTIC(hv,new_max) 0 #endif @@ -134,8 +134,8 @@ struct xpvhv_aux { U32 xhv_aux_flags; /* assorted extra flags */ }; -#define HvAUXf_SCAN_STASH 0x1 /* stash is being scanned by gv_check */ -#define HvAUXf_NO_DEREF 0x2 /* @{}, %{} etc (and nomethod) not present */ +#define HvAUXf_SCAN_STASH 0x1 /* stash is being scanned by gv_check */ +#define HvAUXf_NO_DEREF 0x2 /* @{}, %{} etc (and nomethod) not present */ /* hash structure: */ /* This structure must match the beginning of struct xpvmg in sv.h. */ @@ -251,15 +251,15 @@ indicate the presence of an C key, and returns the same C. =cut */ -#define PERL_HASH_DEFAULT_HvMAX 7 +#define PERL_HASH_DEFAULT_HvMAX 7 /* these hash entry flags ride on hent_klen (for use only in magic/tied HVs) */ -#define HEf_SVKEY -2 /* hent_key is an SV* */ +#define HEf_SVKEY -2 /* hent_key is an SV* */ #ifndef PERL_CORE -# define Nullhv Null(HV*) +# define Nullhv Null(HV*) #endif -#define HvARRAY(hv) ((hv)->sv_u.svu_hash) +#define HvARRAY(hv) ((hv)->sv_u.svu_hash) /* @@ -274,8 +274,8 @@ be costly to execute as it must iterate over all the buckets in the hash. =cut */ -#define HvFILL(hv) Perl_hv_fill(aTHX_ MUTABLE_HV(hv)) -#define HvMAX(hv) ((XPVHV*) SvANY(hv))->xhv_max +#define HvFILL(hv) Perl_hv_fill(aTHX_ MUTABLE_HV(hv)) +#define HvMAX(hv) ((XPVHV*) SvANY(hv))->xhv_max /* @@ -286,24 +286,24 @@ Use this to check whether it is valid to call C. =cut */ -#define HvHasAUX(hv) (SvFLAGS(hv) & SVphv_HasAUX) +#define HvHasAUX(hv) (SvFLAGS(hv) & SVphv_HasAUX) /* This quite intentionally does no flag checking first. That's your responsibility. Use HvHasAUX() first */ -#define HvAUX(hv) (&(((struct xpvhv_with_aux*) SvANY(hv))->xhv_aux)) -#define HvRITER(hv) (*Perl_hv_riter_p(aTHX_ MUTABLE_HV(hv))) -#define HvEITER(hv) (*Perl_hv_eiter_p(aTHX_ MUTABLE_HV(hv))) -#define HvRITER_set(hv,r) Perl_hv_riter_set(aTHX_ MUTABLE_HV(hv), r) -#define HvEITER_set(hv,e) Perl_hv_eiter_set(aTHX_ MUTABLE_HV(hv), e) -#define HvRITER_get(hv) (HvHasAUX(hv) ? HvAUX(hv)->xhv_riter : -1) -#define HvEITER_get(hv) (HvHasAUX(hv) ? HvAUX(hv)->xhv_eiter : NULL) -#define HvRAND_get(hv) (HvHasAUX(hv) ? HvAUX(hv)->xhv_rand : 0) -#define HvLASTRAND_get(hv) (HvHasAUX(hv) ? HvAUX(hv)->xhv_last_rand : 0) - -#define HvNAME(hv) HvNAME_get(hv) -#define HvNAMELEN(hv) HvNAMELEN_get(hv) -#define HvENAME(hv) HvENAME_get(hv) -#define HvENAMELEN(hv) HvENAMELEN_get(hv) +#define HvAUX(hv) (&(((struct xpvhv_with_aux*) SvANY(hv))->xhv_aux)) +#define HvRITER(hv) (*Perl_hv_riter_p(aTHX_ MUTABLE_HV(hv))) +#define HvEITER(hv) (*Perl_hv_eiter_p(aTHX_ MUTABLE_HV(hv))) +#define HvRITER_set(hv,r) Perl_hv_riter_set(aTHX_ MUTABLE_HV(hv), r) +#define HvEITER_set(hv,e) Perl_hv_eiter_set(aTHX_ MUTABLE_HV(hv), e) +#define HvRITER_get(hv) (HvHasAUX(hv) ? HvAUX(hv)->xhv_riter : -1) +#define HvEITER_get(hv) (HvHasAUX(hv) ? HvAUX(hv)->xhv_eiter : NULL) +#define HvRAND_get(hv) (HvHasAUX(hv) ? HvAUX(hv)->xhv_rand : 0) +#define HvLASTRAND_get(hv) (HvHasAUX(hv) ? HvAUX(hv)->xhv_last_rand : 0) + +#define HvNAME(hv) HvNAME_get(hv) +#define HvNAMELEN(hv) HvNAMELEN_get(hv) +#define HvENAME(hv) HvENAME_get(hv) +#define HvENAMELEN(hv) HvENAMELEN_get(hv) /* Checking that hv is a valid package stash is the caller's responsibility */ #define HvMROMETA(hv) \ @@ -353,10 +353,10 @@ Use this to check whether it is valid to call C. * backwards compatibility with old XS code. The core uses HvUSEDKEYS * (keys, excluding placeholders) and HvTOTALKEYS (including placeholders) */ -#define HvKEYS(hv) HvUSEDKEYS(hv) -#define HvUSEDKEYS(hv) (HvTOTALKEYS(hv) - HvPLACEHOLDERS_get(hv)) -#define HvTOTALKEYS(hv) (((XPVHV*) SvANY(hv))->xhv_keys) -#define HvPLACEHOLDERS(hv) (*Perl_hv_placeholders_p(aTHX_ MUTABLE_HV(hv))) +#define HvKEYS(hv) HvUSEDKEYS(hv) +#define HvUSEDKEYS(hv) (HvTOTALKEYS(hv) - HvPLACEHOLDERS_get(hv)) +#define HvTOTALKEYS(hv) (((XPVHV*) SvANY(hv))->xhv_keys) +#define HvPLACEHOLDERS(hv) (*Perl_hv_placeholders_p(aTHX_ MUTABLE_HV(hv))) #define HvPLACEHOLDERS_get(hv) \ (SvMAGIC(hv) ? Perl_hv_placeholders_get(aTHX_ (const HV *)hv) : 0) #define HvPLACEHOLDERS_set(hv,p) \ @@ -369,9 +369,9 @@ Use this to check whether it is valid to call C. * * If we didn't do this, we'd have to reallocate all keys when we switched * this flag, which would be work for no real gain. */ -#define HvSHAREKEYS(hv) (SvFLAGS(hv) & SVphv_SHAREKEYS) -#define HvSHAREKEYS_on(hv) (SvFLAGS(hv) |= SVphv_SHAREKEYS) -#define HvSHAREKEYS_off(hv) (SvFLAGS(hv) &= ~SVphv_SHAREKEYS) +#define HvSHAREKEYS(hv) (SvFLAGS(hv) & SVphv_SHAREKEYS) +#define HvSHAREKEYS_on(hv) (SvFLAGS(hv) |= SVphv_SHAREKEYS) +#define HvSHAREKEYS_off(hv) (SvFLAGS(hv) &= ~SVphv_SHAREKEYS) /* This is an optimisation flag. It won't be set if all hash keys have * a 0 flag. Currently the only flags relate to utf8. Hence it won't @@ -380,28 +380,28 @@ Use this to check whether it is valid to call C. * when retrieved during iteration. It may still be set when there are * no longer any utf8 keys. See HVhek_ENABLEHVKFLAGS for the trigger. */ -#define HvHASKFLAGS(hv) (SvFLAGS(hv) & SVphv_HASKFLAGS) -#define HvHASKFLAGS_on(hv) (SvFLAGS(hv) |= SVphv_HASKFLAGS) -#define HvHASKFLAGS_off(hv) (SvFLAGS(hv) &= ~SVphv_HASKFLAGS) +#define HvHASKFLAGS(hv) (SvFLAGS(hv) & SVphv_HASKFLAGS) +#define HvHASKFLAGS_on(hv) (SvFLAGS(hv) |= SVphv_HASKFLAGS) +#define HvHASKFLAGS_off(hv) (SvFLAGS(hv) &= ~SVphv_HASKFLAGS) -#define HvLAZYDEL(hv) (SvFLAGS(hv) & SVphv_LAZYDEL) -#define HvLAZYDEL_on(hv) (SvFLAGS(hv) |= SVphv_LAZYDEL) -#define HvLAZYDEL_off(hv) (SvFLAGS(hv) &= ~SVphv_LAZYDEL) +#define HvLAZYDEL(hv) (SvFLAGS(hv) & SVphv_LAZYDEL) +#define HvLAZYDEL_on(hv) (SvFLAGS(hv) |= SVphv_LAZYDEL) +#define HvLAZYDEL_off(hv) (SvFLAGS(hv) &= ~SVphv_LAZYDEL) #ifndef PERL_CORE -# define Nullhe Null(HE*) +# define Nullhe Null(HE*) #endif -#define HeNEXT(he) (he)->hent_next -#define HeKEY_hek(he) (he)->hent_hek -#define HeKEY(he) HEK_KEY(HeKEY_hek(he)) -#define HeKEY_sv(he) (*(SV**)HeKEY(he)) -#define HeKLEN(he) HEK_LEN(HeKEY_hek(he)) -#define HeKUTF8(he) HEK_UTF8(HeKEY_hek(he)) -#define HeKWASUTF8(he) HEK_WASUTF8(HeKEY_hek(he)) -#define HeKLEN_UTF8(he) (HeKUTF8(he) ? -HeKLEN(he) : HeKLEN(he)) -#define HeKFLAGS(he) HEK_FLAGS(HeKEY_hek(he)) -#define HeVAL(he) (he)->he_valu.hent_val -#define HeHASH(he) HEK_HASH(HeKEY_hek(he)) +#define HeNEXT(he) (he)->hent_next +#define HeKEY_hek(he) (he)->hent_hek +#define HeKEY(he) HEK_KEY(HeKEY_hek(he)) +#define HeKEY_sv(he) (*(SV**)HeKEY(he)) +#define HeKLEN(he) HEK_LEN(HeKEY_hek(he)) +#define HeKUTF8(he) HEK_UTF8(HeKEY_hek(he)) +#define HeKWASUTF8(he) HEK_WASUTF8(HeKEY_hek(he)) +#define HeKLEN_UTF8(he) (HeKUTF8(he) ? -HeKLEN(he) : HeKLEN(he)) +#define HeKFLAGS(he) HEK_FLAGS(HeKEY_hek(he)) +#define HeVAL(he) (he)->he_valu.hent_val +#define HeHASH(he) HEK_HASH(HeKEY_hek(he)) #define HePV(he,lp) \ ((HeKLEN(he) == HEf_SVKEY) ? \ SvPV(HeKEY_sv(he),lp) : \ @@ -425,30 +425,30 @@ Use this to check whether it is valid to call C. SVs_TEMP | \ ( HeKUTF8(he) ? SVf_UTF8 : 0 ))) : \ &PL_sv_undef) -#define HeSVKEY_set(he,sv) ((HeKLEN(he) = HEf_SVKEY), (HeKEY_sv(he) = sv)) +#define HeSVKEY_set(he,sv) ((HeKLEN(he) = HEf_SVKEY), (HeKEY_sv(he) = sv)) #ifndef PERL_CORE -# define Nullhek Null(HEK*) +# define Nullhek Null(HEK*) #endif -#define HEK_BASESIZE STRUCT_OFFSET(HEK, hek_key[0]) -#define HEK_HASH(hek) (hek)->hek_hash -#define HEK_LEN(hek) (hek)->hek_len -#define HEK_KEY(hek) (hek)->hek_key -#define HEK_FLAGS(hek) (*((unsigned char *)(HEK_KEY(hek))+HEK_LEN(hek)+1)) - -#define HVhek_UTF8 0x01 /* Key is utf8 encoded. */ -#define HVhek_WASUTF8 0x02 /* Key is bytes here, but was +#define HEK_BASESIZE STRUCT_OFFSET(HEK, hek_key[0]) +#define HEK_HASH(hek) (hek)->hek_hash +#define HEK_LEN(hek) (hek)->hek_len +#define HEK_KEY(hek) (hek)->hek_key +#define HEK_FLAGS(hek) (*((unsigned char *)(HEK_KEY(hek))+HEK_LEN(hek)+1)) + +#define HVhek_UTF8 0x01 /* Key is utf8 encoded. */ +#define HVhek_WASUTF8 0x02 /* Key is bytes here, but was supplied as utf8. */ -#define HVhek_NOTSHARED 0x04 /* This key isn't a shared hash key. */ +#define HVhek_NOTSHARED 0x04 /* This key isn't a shared hash key. */ /* the following flags are options for functions, they are not stored in heks */ -#define HVhek_FREEKEY 0x100 /* Internal flag to say key is Newx()ed. */ -#define HVhek_PLACEHOLD 0x200 /* Internal flag to create placeholder. (may +#define HVhek_FREEKEY 0x100 /* Internal flag to say key is Newx()ed. */ +#define HVhek_PLACEHOLD 0x200 /* Internal flag to create placeholder. (may * change, but Storable is a core module) */ -#define HVhek_KEYCANONICAL 0x400 /* Internal flag - key is in canonical +#define HVhek_KEYCANONICAL 0x400 /* Internal flag - key is in canonical form. If the string is UTF-8, it cannot be converted to bytes. */ -#define HVhek_ENABLEHVKFLAGS (HVhek_UTF8|HVhek_WASUTF8) +#define HVhek_ENABLEHVKFLAGS (HVhek_UTF8|HVhek_WASUTF8) #define HEK_UTF8(hek) (HEK_FLAGS(hek) & HVhek_UTF8) #define HEK_UTF8_on(hek) (HEK_FLAGS(hek) |= HVhek_UTF8) @@ -462,9 +462,9 @@ Use this to check whether it is valid to call C. /* Default to allocating the correct size - default to assuming that malloc() is not broken and is efficient at allocating blocks sized at powers-of-two. */ -# define PERL_HV_ARRAY_ALLOC_BYTES(size) ((size) * sizeof(HE*)) +# define PERL_HV_ARRAY_ALLOC_BYTES(size) ((size) * sizeof(HE*)) #else -# define MALLOC_OVERHEAD 16 +# define MALLOC_OVERHEAD 16 # define PERL_HV_ARRAY_ALLOC_BYTES(size) \ (((size) < 64) \ ? (size) * sizeof(HE*) \ @@ -474,13 +474,13 @@ Use this to check whether it is valid to call C. /* Flags for hv_iternext_flags. */ #define HV_ITERNEXT_WANTPLACEHOLDERS 0x01 /* Don't skip placeholders. */ -#define hv_iternext(hv) hv_iternext_flags(hv, 0) +#define hv_iternext(hv) hv_iternext_flags(hv, 0) #define hv_magic(hv, gv, how) \ sv_magic(MUTABLE_SV(hv), MUTABLE_SV(gv), how, NULL, 0) -#define hv_undef(hv) Perl_hv_undef_flags(aTHX_ hv, 0) +#define hv_undef(hv) Perl_hv_undef_flags(aTHX_ hv, 0) #define Perl_sharepvn(pv, len, hash) HEK_KEY(share_hek(pv, len, hash)) -#define sharepvn(pv, len, hash) Perl_sharepvn(pv, len, hash) +#define sharepvn(pv, len, hash) Perl_sharepvn(pv, len, hash) #define share_hek_hek(hek) \ (++(((struct shared_he *)(((char *)hek) \ @@ -572,8 +572,8 @@ Use this to check whether it is valid to call C. struct refcounted_he; /* flags for the refcounted_he API */ -#define REFCOUNTED_HE_KEY_UTF8 0x00000001 -#define REFCOUNTED_HE_EXISTS 0x00000002 +#define REFCOUNTED_HE_KEY_UTF8 0x00000001 +#define REFCOUNTED_HE_EXISTS 0x00000002 #ifdef PERL_CORE @@ -623,15 +623,15 @@ instead of a string/length pair, and no precomputed hash. Perl_refcounted_he_new_pvn(aTHX_ parent, STR_WITH_LEN(key), 0, value, flags) /* Flag bits are HVhek_UTF8, HVhek_WASUTF8, then */ -#define HVrhek_undef 0x00 /* Value is undef. */ -#define HVrhek_delete 0x10 /* Value is placeholder - signifies delete. */ -#define HVrhek_IV 0x20 /* Value is IV. */ -#define HVrhek_UV 0x30 /* Value is UV. */ -#define HVrhek_PV 0x40 /* Value is a (byte) string. */ -#define HVrhek_PV_UTF8 0x50 /* Value is a (utf8) string. */ +#define HVrhek_undef 0x00 /* Value is undef. */ +#define HVrhek_delete 0x10 /* Value is placeholder - signifies delete. */ +#define HVrhek_IV 0x20 /* Value is IV. */ +#define HVrhek_UV 0x30 /* Value is UV. */ +#define HVrhek_PV 0x40 /* Value is a (byte) string. */ +#define HVrhek_PV_UTF8 0x50 /* Value is a (utf8) string. */ /* Two spare. As these have to live in the optree, you can't store anything interpreter specific, such as SVs. :-( */ -#define HVrhek_typemask 0x70 +#define HVrhek_typemask 0x70 #ifdef USE_ITHREADS /* A big expression to find the key offset */ @@ -642,36 +642,36 @@ instead of a string/length pair, and no precomputed hash. #endif # ifdef USE_ITHREADS -# define HINTS_REFCNT_LOCK MUTEX_LOCK(&PL_hints_mutex) -# define HINTS_REFCNT_UNLOCK MUTEX_UNLOCK(&PL_hints_mutex) +# define HINTS_REFCNT_LOCK MUTEX_LOCK(&PL_hints_mutex) +# define HINTS_REFCNT_UNLOCK MUTEX_UNLOCK(&PL_hints_mutex) # else -# define HINTS_REFCNT_LOCK NOOP -# define HINTS_REFCNT_UNLOCK NOOP +# define HINTS_REFCNT_LOCK NOOP +# define HINTS_REFCNT_UNLOCK NOOP # endif #endif #ifdef USE_ITHREADS -# define HINTS_REFCNT_INIT MUTEX_INIT(&PL_hints_mutex) -# define HINTS_REFCNT_TERM MUTEX_DESTROY(&PL_hints_mutex) +# define HINTS_REFCNT_INIT MUTEX_INIT(&PL_hints_mutex) +# define HINTS_REFCNT_TERM MUTEX_DESTROY(&PL_hints_mutex) #else -# define HINTS_REFCNT_INIT NOOP -# define HINTS_REFCNT_TERM NOOP +# define HINTS_REFCNT_INIT NOOP +# define HINTS_REFCNT_TERM NOOP #endif /* Hash actions Passed in PERL_MAGIC_uvar calls */ -#define HV_DISABLE_UVAR_XKEY 0x01 +#define HV_DISABLE_UVAR_XKEY 0x01 /* We need to ensure that these don't clash with G_DISCARD, which is 2, as it is documented as being passed to hv_delete(). */ -#define HV_FETCH_ISSTORE 0x04 -#define HV_FETCH_ISEXISTS 0x08 -#define HV_FETCH_LVALUE 0x10 -#define HV_FETCH_JUST_SV 0x20 -#define HV_DELETE 0x40 -#define HV_FETCH_EMPTY_HE 0x80 /* Leave HeVAL null. */ +#define HV_FETCH_ISSTORE 0x04 +#define HV_FETCH_ISEXISTS 0x08 +#define HV_FETCH_LVALUE 0x10 +#define HV_FETCH_JUST_SV 0x20 +#define HV_DELETE 0x40 +#define HV_FETCH_EMPTY_HE 0x80 /* Leave HeVAL null. */ /* Must not conflict with HVhek_UTF8 */ -#define HV_NAME_SETALL 0x02 +#define HV_NAME_SETALL 0x02 /* =for apidoc newHV @@ -681,7 +681,7 @@ Creates a new HV. The reference count is set to 1. =cut */ -#define newHV() MUTABLE_HV(newSV_type(SVt_PVHV)) +#define newHV() MUTABLE_HV(newSV_type(SVt_PVHV)) #include "hv_func.h" diff --git a/hv_func.h b/hv_func.h index 43311c1c9728..f2bb9e5f64a8 100644 --- a/hv_func.h +++ b/hv_func.h @@ -25,9 +25,9 @@ #ifndef PERL_HASH_USE_SBOX32_ALSO # if defined(PERL_HASH_USE_SBOX32) || !defined(PERL_HASH_NO_SBOX32) -# define PERL_HASH_USE_SBOX32_ALSO 1 +# define PERL_HASH_USE_SBOX32_ALSO 1 # else -# define PERL_HASH_USE_SBOX32_ALSO 0 +# define PERL_HASH_USE_SBOX32_ALSO 0 # endif #endif @@ -40,41 +40,41 @@ #endif #ifndef SBOX32_MAX_LEN -#define SBOX32_MAX_LEN 24 +#define SBOX32_MAX_LEN 24 #endif /* this must be after the SBOX32_MAX_LEN define */ #include "sbox32_hash.h" #if defined(PERL_HASH_FUNC_SIPHASH) -# define PERL_HASH_FUNC_DEFINE "PERL_HASH_FUNC_SIPHASH" -# define PVT__PERL_HASH_FUNC "SIPHASH_2_4" -# define PVT__PERL_HASH_WORD_TYPE U64 -# define PVT__PERL_HASH_WORD_SIZE sizeof(PVT__PERL_HASH_WORD_TYPE) -# define PVT__PERL_HASH_SEED_BYTES (PVT__PERL_HASH_WORD_SIZE * 2) -# define PVT__PERL_HASH_STATE_BYTES (PVT__PERL_HASH_WORD_SIZE * 4) +# define PERL_HASH_FUNC_DEFINE "PERL_HASH_FUNC_SIPHASH" +# define PVT__PERL_HASH_FUNC "SIPHASH_2_4" +# define PVT__PERL_HASH_WORD_TYPE U64 +# define PVT__PERL_HASH_WORD_SIZE sizeof(PVT__PERL_HASH_WORD_TYPE) +# define PVT__PERL_HASH_SEED_BYTES (PVT__PERL_HASH_WORD_SIZE * 2) +# define PVT__PERL_HASH_STATE_BYTES (PVT__PERL_HASH_WORD_SIZE * 4) # define PVT__PERL_HASH_SEED_STATE(seed,state) \ S_perl_siphash_seed_state(seed,state) # define PVT__PERL_HASH_WITH_STATE(state,str,len) \ S_perl_hash_siphash_2_4_with_state((state),(U8*)(str),(len)) #elif defined(PERL_HASH_FUNC_SIPHASH13) -# define PERL_HASH_FUNC_DEFINE "PERL_HASH_FUNC_SIPHASH13" -# define PVT__PERL_HASH_FUNC "SIPHASH_1_3" -# define PVT__PERL_HASH_WORD_TYPE U64 -# define PVT__PERL_HASH_WORD_SIZE sizeof(PVT__PERL_HASH_WORD_TYPE) -# define PVT__PERL_HASH_SEED_BYTES (PVT__PERL_HASH_WORD_SIZE * 2) -# define PVT__PERL_HASH_STATE_BYTES (PVT__PERL_HASH_WORD_SIZE * 4) +# define PERL_HASH_FUNC_DEFINE "PERL_HASH_FUNC_SIPHASH13" +# define PVT__PERL_HASH_FUNC "SIPHASH_1_3" +# define PVT__PERL_HASH_WORD_TYPE U64 +# define PVT__PERL_HASH_WORD_SIZE sizeof(PVT__PERL_HASH_WORD_TYPE) +# define PVT__PERL_HASH_SEED_BYTES (PVT__PERL_HASH_WORD_SIZE * 2) +# define PVT__PERL_HASH_STATE_BYTES (PVT__PERL_HASH_WORD_SIZE * 4) # define PVT__PERL_HASH_SEED_STATE(seed,state) \ S_perl_siphash_seed_state(seed,state) # define PVT__PERL_HASH_WITH_STATE(state,str,len) \ S_perl_hash_siphash_1_3_with_state((state),(U8*)(str),(len)) #elif defined(PERL_HASH_FUNC_ZAPHOD32) -# define PERL_HASH_FUNC_DEFINE "PERL_HASH_FUNC_ZAPHOD32" -# define PVT__PERL_HASH_FUNC "ZAPHOD32" -# define PVT__PERL_HASH_WORD_TYPE U32 -# define PVT__PERL_HASH_WORD_SIZE sizeof(PVT__PERL_HASH_WORD_TYPE) -# define PVT__PERL_HASH_SEED_BYTES (PVT__PERL_HASH_WORD_SIZE * 3) -# define PVT__PERL_HASH_STATE_BYTES (PVT__PERL_HASH_WORD_SIZE * 3) +# define PERL_HASH_FUNC_DEFINE "PERL_HASH_FUNC_ZAPHOD32" +# define PVT__PERL_HASH_FUNC "ZAPHOD32" +# define PVT__PERL_HASH_WORD_TYPE U32 +# define PVT__PERL_HASH_WORD_SIZE sizeof(PVT__PERL_HASH_WORD_TYPE) +# define PVT__PERL_HASH_SEED_BYTES (PVT__PERL_HASH_WORD_SIZE * 3) +# define PVT__PERL_HASH_STATE_BYTES (PVT__PERL_HASH_WORD_SIZE * 3) # define PVT__PERL_HASH_SEED_STATE(seed,state) zaphod32_seed_state(seed,state) # define PVT__PERL_HASH_WITH_STATE(state,str,len) \ (U32)zaphod32_hash_with_state((state),(U8*)(str),(len)) @@ -102,20 +102,20 @@ #define PVT_PERL_HASH_SEED_roundup(x) \ PVT__PERL_HASH_SEED_roundup(x,PVT__PERL_HASH_WORD_SIZE) -#define PL_hash_seed ((U8 *)PL_hash_seed_w) -#define PL_hash_state ((U8 *)PL_hash_state_w) +#define PL_hash_seed ((U8 *)PL_hash_seed_w) +#define PL_hash_state ((U8 *)PL_hash_state_w) #if PERL_HASH_USE_SBOX32_ALSO == 0 -# define PVT_PERL_HASH_FUNC PVT__PERL_HASH_FUNC -# define PVT_PERL_HASH_SEED_BYTES PVT__PERL_HASH_SEED_BYTES -# define PVT_PERL_HASH_STATE_BYTES PVT__PERL_HASH_STATE_BYTES +# define PVT_PERL_HASH_FUNC PVT__PERL_HASH_FUNC +# define PVT_PERL_HASH_SEED_BYTES PVT__PERL_HASH_SEED_BYTES +# define PVT_PERL_HASH_STATE_BYTES PVT__PERL_HASH_STATE_BYTES # define PVT_PERL_HASH_SEED_STATE(seed,state) \ PVT__PERL_HASH_SEED_STATE(seed,state) # define PVT_PERL_HASH_WITH_STATE(state,str,len) \ PVT__PERL_HASH_WITH_STATE(state,str,len) #else -#define PVT_PERL_HASH_FUNC "SBOX32_WITH_" PVT__PERL_HASH_FUNC +#define PVT_PERL_HASH_FUNC "SBOX32_WITH_" PVT__PERL_HASH_FUNC /* note the 4 in the below code comes from the fact the seed to initialize the SBOX is 128 bits */ #define PVT_PERL_HASH_SEED_BYTES \ @@ -142,15 +142,15 @@ #define PERL_HASH_WITH_STATE(state,hash,str,len) \ (hash) = PVT_PERL_HASH_WITH_STATE((state),(U8*)(str),(len)) -#define PERL_HASH_SEED_STATE(seed,state) PVT_PERL_HASH_SEED_STATE(seed,state) +#define PERL_HASH_SEED_STATE(seed,state) PVT_PERL_HASH_SEED_STATE(seed,state) #define PERL_HASH_SEED_BYTES \ PVT_PERL_HASH_SEED_roundup(PVT_PERL_HASH_SEED_BYTES) #define PERL_HASH_STATE_BYTES \ PVT_PERL_HASH_SEED_roundup(PVT_PERL_HASH_STATE_BYTES) -#define PERL_HASH_FUNC PVT_PERL_HASH_FUNC +#define PERL_HASH_FUNC PVT_PERL_HASH_FUNC -#define PERL_HASH_SEED_WORDS (PERL_HASH_SEED_BYTES/PVT__PERL_HASH_WORD_SIZE) -#define PERL_HASH_STATE_WORDS (PERL_HASH_STATE_BYTES/PVT__PERL_HASH_WORD_SIZE) +#define PERL_HASH_SEED_WORDS (PERL_HASH_SEED_BYTES/PVT__PERL_HASH_WORD_SIZE) +#define PERL_HASH_STATE_WORDS (PERL_HASH_STATE_BYTES/PVT__PERL_HASH_WORD_SIZE) #ifdef PERL_USE_SINGLE_CHAR_HASH_CACHE #define PERL_HASH(state,str,len) \ @@ -169,7 +169,7 @@ #ifndef PERL_HASH_SEED # if defined(USE_HASH_SEED) -# define PERL_HASH_SEED PL_hash_seed +# define PERL_HASH_SEED PL_hash_seed # else /* this is a 512 bit seed, which should be more than enough for * the configuration of any of our hash functions (with or @@ -187,7 +187,7 @@ /* legacy - only mod_perl should be doing this. */ #ifdef PERL_HASH_INTERNAL_ACCESS -#define PERL_HASH_INTERNAL(hash,str,len) PERL_HASH(hash,str,len) +#define PERL_HASH_INTERNAL(hash,str,len) PERL_HASH(hash,str,len) #endif PERL_STATIC_INLINE U32 diff --git a/hv_macro.h b/hv_macro.h index 12ab9e97cee6..2e815273342d 100644 --- a/hv_macro.h +++ b/hv_macro.h @@ -9,7 +9,7 @@ #ifndef U64TYPE /* This probably isn't going to work, but failing with a compiler error due to lack of uint64_t is no worse than failing right now with an #error. */ - #define U64 uint64_t + #define U64 uint64_t #endif #endif @@ -31,9 +31,9 @@ #define _shifted_octet(type,ptr,idx,shift) \ (((type)(((U8*)(ptr))[(idx)]))<<(shift)) #if defined(USE_UNALIGNED_PTR_DEREF) && (BYTEORDER == 0x1234 || BYTEORDER == 0x12345678) - #define U8TO16_LE(ptr) (*((const U16*)(ptr))) - #define U8TO32_LE(ptr) (*((const U32*)(ptr))) - #define U8TO64_LE(ptr) (*((const U64*)(ptr))) + #define U8TO16_LE(ptr) (*((const U16*)(ptr))) + #define U8TO32_LE(ptr) (*((const U32*)(ptr))) + #define U8TO64_LE(ptr) (*((const U64*)(ptr))) #else #define U8TO16_LE(ptr) \ (_shifted_octet(U16,(ptr),0, 0)| \ @@ -60,26 +60,26 @@ /* Find best way to ROTL32/ROTL64 */ #if defined(_MSC_VER) #include /* Microsoft put _rotl declaration in here */ - #define ROTL32(x,r) _rotl(x,r) - #define ROTR32(x,r) _rotr(x,r) - #define ROTL64(x,r) _rotl64(x,r) - #define ROTR64(x,r) _rotr64(x,r) + #define ROTL32(x,r) _rotl(x,r) + #define ROTR32(x,r) _rotr(x,r) + #define ROTL64(x,r) _rotl64(x,r) + #define ROTR64(x,r) _rotr64(x,r) #else /* gcc recognises this code and generates a rotate instruction for CPUs with one */ - #define ROTL32(x,r) (((U32)(x) << (r)) | ((U32)(x) >> (32 - (r)))) - #define ROTR32(x,r) (((U32)(x) << (32 - (r))) | ((U32)(x) >> (r))) - #define ROTL64(x,r) ( ( (U64)(x) << (r) ) | ( (U64)(x) >> ( 64 - (r) ) ) ) - #define ROTR64(x,r) ( ( (U64)(x) << ( 64 - (r) ) ) | ( (U64)(x) >> (r) ) ) + #define ROTL32(x,r) (((U32)(x) << (r)) | ((U32)(x) >> (32 - (r)))) + #define ROTR32(x,r) (((U32)(x) << (32 - (r))) | ((U32)(x) >> (r))) + #define ROTL64(x,r) ( ( (U64)(x) << (r) ) | ( (U64)(x) >> ( 64 - (r) ) ) ) + #define ROTR64(x,r) ( ( (U64)(x) << ( 64 - (r) ) ) | ( (U64)(x) >> (r) ) ) #endif #ifdef UV_IS_QUAD -#define ROTL_UV(x,r) ROTL64(x,r) -#define ROTR_UV(x,r) ROTL64(x,r) +#define ROTL_UV(x,r) ROTL64(x,r) +#define ROTR_UV(x,r) ROTL64(x,r) #else -#define ROTL_UV(x,r) ROTL32(x,r) -#define ROTR_UV(x,r) ROTR32(x,r) +#define ROTL_UV(x,r) ROTL32(x,r) +#define ROTR_UV(x,r) ROTR32(x,r) #endif #if IVSIZE == 8 #define CAN64BITHASH diff --git a/inline.h b/inline.h index aec79533e9c8..a666f2089e1d 100644 --- a/inline.h +++ b/inline.h @@ -499,12 +499,12 @@ Perl_is_utf8_invariant_string_loc(const U8* const s, STRLEN len, const U8 ** ep) send = s + len; /* This looks like 0x010101... */ -# define PERL_COUNT_MULTIPLIER (~ (UINTMAX_C(0)) / 0xFF) +# define PERL_COUNT_MULTIPLIER (~ (UINTMAX_C(0)) / 0xFF) /* This looks like 0x808080... */ -# define PERL_VARIANTS_WORD_MASK (PERL_COUNT_MULTIPLIER * 0x80) -# define PERL_WORDSIZE sizeof(PERL_UINTMAX_T) -# define PERL_WORD_BOUNDARY_MASK (PERL_WORDSIZE - 1) +# define PERL_VARIANTS_WORD_MASK (PERL_COUNT_MULTIPLIER * 0x80) +# define PERL_WORDSIZE sizeof(PERL_UINTMAX_T) +# define PERL_WORD_BOUNDARY_MASK (PERL_WORDSIZE - 1) /* Evaluates to 0 if 'x' is at a word boundary; otherwise evaluates * to 1, by or'ing together the lowest bits of 'x'. Hopefully the @@ -597,52 +597,52 @@ Perl_is_utf8_invariant_string_loc(const U8* const s, STRLEN len, const U8 ** ep) * bit, and which one is right for using on 32 and 64 bit operands */ #if (__has_builtin(__builtin_clz) || PERL_GCC_VERSION_GE(3,4,0)) # if U32SIZE == INTSIZE -# define PERL_CLZ_32 __builtin_clz +# define PERL_CLZ_32 __builtin_clz # endif # if defined(U64TYPE) && U64SIZE == INTSIZE -# define PERL_CLZ_64 __builtin_clz +# define PERL_CLZ_64 __builtin_clz # endif #endif #if (__has_builtin(__builtin_ctz) || PERL_GCC_VERSION_GE(3,4,0)) # if U32SIZE == INTSIZE -# define PERL_CTZ_32 __builtin_ctz +# define PERL_CTZ_32 __builtin_ctz # endif # if defined(U64TYPE) && U64SIZE == INTSIZE -# define PERL_CTZ_64 __builtin_ctz +# define PERL_CTZ_64 __builtin_ctz # endif #endif #if (__has_builtin(__builtin_clzl) || PERL_GCC_VERSION_GE(3,4,0)) # if U32SIZE == LONGSIZE && ! defined(PERL_CLZ_32) -# define PERL_CLZ_32 __builtin_clzl +# define PERL_CLZ_32 __builtin_clzl # endif # if defined(U64TYPE) && U64SIZE == LONGSIZE && ! defined(PERL_CLZ_64) -# define PERL_CLZ_64 __builtin_clzl +# define PERL_CLZ_64 __builtin_clzl # endif #endif #if (__has_builtin(__builtin_ctzl) || PERL_GCC_VERSION_GE(3,4,0)) # if U32SIZE == LONGSIZE && ! defined(PERL_CTZ_32) -# define PERL_CTZ_32 __builtin_ctzl +# define PERL_CTZ_32 __builtin_ctzl # endif # if defined(U64TYPE) && U64SIZE == LONGSIZE && ! defined(PERL_CTZ_64) -# define PERL_CTZ_64 __builtin_ctzl +# define PERL_CTZ_64 __builtin_ctzl # endif #endif #if (__has_builtin(__builtin_clzll) || PERL_GCC_VERSION_GE(3,4,0)) # if U32SIZE == LONGLONGSIZE && ! defined(PERL_CLZ_32) -# define PERL_CLZ_32 __builtin_clzll +# define PERL_CLZ_32 __builtin_clzll # endif # if defined(U64TYPE) && U64SIZE == LONGLONGSIZE && ! defined(PERL_CLZ_64) -# define PERL_CLZ_64 __builtin_clzll +# define PERL_CLZ_64 __builtin_clzll # endif #endif #if (__has_builtin(__builtin_ctzll) || PERL_GCC_VERSION_GE(3,4,0)) # if U32SIZE == LONGLONGSIZE && ! defined(PERL_CTZ_32) -# define PERL_CTZ_32 __builtin_ctzll +# define PERL_CTZ_32 __builtin_ctzll # endif # if defined(U64TYPE) && U64SIZE == LONGLONGSIZE && ! defined(PERL_CTZ_64) -# define PERL_CTZ_64 __builtin_ctzll +# define PERL_CTZ_64 __builtin_ctzll # endif #endif @@ -721,9 +721,9 @@ Perl_lsbit_pos64(U64 word) } -# define lsbit_pos_uintmax_(word) lsbit_pos64(word) +# define lsbit_pos_uintmax_(word) lsbit_pos64(word) #else /* ! QUAD */ -# define lsbit_pos_uintmax_(word) lsbit_pos32(word) +# define lsbit_pos_uintmax_(word) lsbit_pos32(word) #endif PERL_STATIC_INLINE unsigned /* Like above for 32 bit word */ @@ -765,7 +765,7 @@ Perl_lsbit_pos32(U32 word) * taking the exclusive-or of the two numbers. To see why, first note that * the sum of any number, x, and its complement, x', is all ones. So all * ones minus x is x'. Then note that the xor of x and all ones is x'. */ -#define LZC_TO_MSBIT_POS_(size, lzc) ((size##SIZE * CHARBITS - 1) ^ (lzc)) +#define LZC_TO_MSBIT_POS_(size, lzc) ((size##SIZE * CHARBITS - 1) ^ (lzc)) #ifdef U64TYPE /* HAS_QUAD not usable outside the core */ @@ -824,9 +824,9 @@ Perl_msbit_pos64(U64 word) } -# define msbit_pos_uintmax_(word) msbit_pos64(word) +# define msbit_pos_uintmax_(word) msbit_pos64(word) #else /* ! QUAD */ -# define msbit_pos_uintmax_(word) msbit_pos32(word) +# define msbit_pos_uintmax_(word) msbit_pos32(word) #endif PERL_STATIC_INLINE unsigned @@ -866,11 +866,11 @@ Perl_msbit_pos32(U32 word) } #if UVSIZE == U64SIZE -# define msbit_pos(word) msbit_pos64(word) -# define lsbit_pos(word) lsbit_pos64(word) +# define msbit_pos(word) msbit_pos64(word) +# define lsbit_pos(word) lsbit_pos64(word) #elif UVSIZE == U32SIZE -# define msbit_pos(word) msbit_pos32(word) -# define lsbit_pos(word) lsbit_pos32(word) +# define msbit_pos(word) msbit_pos32(word) +# define lsbit_pos(word) lsbit_pos32(word) #endif #ifdef U64TYPE /* HAS_QUAD not usable outside the core */ @@ -1116,7 +1116,7 @@ C>, =cut */ -#define is_utf8_string(s, len) is_utf8_string_loclen(s, len, NULL, NULL) +#define is_utf8_string(s, len) is_utf8_string_loclen(s, len, NULL, NULL) #if defined(PERL_CORE) || defined (PERL_EXT) @@ -1429,12 +1429,12 @@ Perl_is_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el) * after it. */ -#define DFA_RETURN_SUCCESS_ return s - s0 -#define DFA_RETURN_FAILURE_ return 0 +#define DFA_RETURN_SUCCESS_ return s - s0 +#define DFA_RETURN_FAILURE_ return 0 #ifdef HAS_EXTRA_LONG_UTF8 -# define DFA_TEASE_APART_FF_ goto tease_apart_FF +# define DFA_TEASE_APART_FF_ goto tease_apart_FF #else -# define DFA_TEASE_APART_FF_ DFA_RETURN_FAILURE_ +# define DFA_TEASE_APART_FF_ DFA_RETURN_FAILURE_ #endif #define PERL_IS_UTF8_CHAR_DFA(s0, e, dfa_tab, \ @@ -2539,7 +2539,7 @@ S_lossless_NV_to_IV(const NV nv, IV *ivp) defined(PERL_IN_TOKE_C) || \ defined(PERL_IN_UNIVERSAL_C) -#define MAX_CHARSET_NAME_LENGTH 2 +#define MAX_CHARSET_NAME_LENGTH 2 PERL_STATIC_INLINE const char * S_get_regex_charset_name(const U32 flags, STRLEN* const lenp) diff --git a/intrpvar.h b/intrpvar.h index f733f60db321..bafb4c593853 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -110,9 +110,9 @@ current value of the creating thread's copy. PERLVAR(I, dowarn, U8) #if defined (PERL_UTF8_CACHE_ASSERT) || defined (DEBUGGING) -# define PERL___I -1 +# define PERL___I -1 #else -# define PERL___I 1 +# define PERL___I 1 #endif PERLVARI(I, utf8cache, I8, PERL___I) /* Is the utf8 caching code enabled? */ #undef PERL___I @@ -718,9 +718,9 @@ PERLVARI(I, breakable_sub_gen, U32, 0) #ifdef DEBUGGING /* exercise wrap-around */ - #define PERL_COP_SEQMAX (U32_MAX-50) + #define PERL_COP_SEQMAX (U32_MAX-50) #else - #define PERL_COP_SEQMAX 0 + #define PERL_COP_SEQMAX 0 #endif PERLVARI(I, cop_seqmax, U32, PERL_COP_SEQMAX) /* statement sequence number */ @@ -949,10 +949,10 @@ PERLVARI(I, lockhook, share_proc_t, Perl_sv_nosharing) GCC_DIAG_IGNORE(-Wdeprecated-declarations) #ifdef NO_MATHOMS -# define PERL_UNLOCK_HOOK Perl_sv_nosharing +# define PERL_UNLOCK_HOOK Perl_sv_nosharing #else /* This reference ensures that the mathoms are linked with perl */ -# define PERL_UNLOCK_HOOK Perl_sv_nounlocking +# define PERL_UNLOCK_HOOK Perl_sv_nounlocking #endif PERLVARI(I, unlockhook, share_proc_t, PERL_UNLOCK_HOOK) @@ -996,7 +996,7 @@ PERLVARI(I, globhook, globhook_t, NULL) when 5.18.0 was released. The offset of the end of this is baked into a global variable in any shared perl library which will allow a sanity test in future perl releases. */ -# define PERL_LAST_5_18_0_INTERP_MEMBER Iglobhook +# define PERL_LAST_5_18_0_INTERP_MEMBER Iglobhook #endif #ifdef MULTIPLICITY @@ -1102,7 +1102,7 @@ PERLVAR(I, wcrtomb_ps, mbstate_t) /* Enough space for the reserved byte, 1 for a potential * leading 0, then enough for the longest representable integer * plus an extra, the 3 flag characters, and NUL */ -#define PERL_MEM_LOG_ARYLEN (1 + 1 + TYPE_DIGITS(UV) + 1 + 3 + 1) +#define PERL_MEM_LOG_ARYLEN (1 + 1 + TYPE_DIGITS(UV) + 1 + 3 + 1) PERLVARA(I, mem_log, PERL_MEM_LOG_ARYLEN, char) #endif diff --git a/invlist_inline.h b/invlist_inline.h index d85aa1ee78bb..0a6222373912 100644 --- a/invlist_inline.h +++ b/invlist_inline.h @@ -21,11 +21,11 @@ /* An element is in an inversion list iff its * index is even numbered: 0, 2, 4, etc */ #define ELEMENT_RANGE_MATCHES_INVLIST(i) (! ((i) & 1)) -#define PREV_RANGE_MATCHES_INVLIST(i) (! ELEMENT_RANGE_MATCHES_INVLIST(i)) +#define PREV_RANGE_MATCHES_INVLIST(i) (! ELEMENT_RANGE_MATCHES_INVLIST(i)) /* This converts to/from our UVs to what the SV code is expecting: bytes. */ -#define TO_INTERNAL_SIZE(x) ((x) * sizeof(UV)) -#define FROM_INTERNAL_SIZE(x) ((x)/ sizeof(UV)) +#define TO_INTERNAL_SIZE(x) ((x) * sizeof(UV)) +#define FROM_INTERNAL_SIZE(x) ((x)/ sizeof(UV)) PERL_STATIC_INLINE bool S_is_invlist(const SV* const invlist) diff --git a/iperlsys.h b/iperlsys.h index 88316f6ecf25..9ecc0eb3a303 100644 --- a/iperlsys.h +++ b/iperlsys.h @@ -158,12 +158,12 @@ struct IPerlStdIOInfo /* These do not belong here ... NI-S, 14 Nov 2000 */ # ifdef USE_STDIO_PTR -# define PerlSIO_has_cntptr(f) 1 +# define PerlSIO_has_cntptr(f) 1 # ifdef STDIO_PTR_LVALUE # ifdef STDIO_CNT_LVALUE # define PerlSIO_canset_cnt(f) 1 # ifdef STDIO_PTR_LVAL_NOCHANGE_CNT -# define PerlSIO_fast_gets(f) 1 +# define PerlSIO_fast_gets(f) 1 # endif # else /* STDIO_CNT_LVALUE */ # define PerlSIO_canset_cnt(f) 0 @@ -174,18 +174,18 @@ struct IPerlStdIOInfo # endif # endif # else /* USE_STDIO_PTR */ -# define PerlSIO_has_cntptr(f) 0 -# define PerlSIO_canset_cnt(f) 0 +# define PerlSIO_has_cntptr(f) 0 +# define PerlSIO_canset_cnt(f) 0 # endif /* USE_STDIO_PTR */ # ifndef PerlSIO_fast_gets -# define PerlSIO_fast_gets(f) 0 +# define PerlSIO_fast_gets(f) 0 # endif # ifdef FILE_base -# define PerlSIO_has_base(f) 1 +# define PerlSIO_has_base(f) 1 # else -# define PerlSIO_has_base(f) 0 +# define PerlSIO_has_base(f) 0 # endif /* Now take FILE * via function table */ @@ -246,8 +246,8 @@ struct IPerlStdIOInfo (*PL_StdIO->pSetPtr)(PL_StdIO, (f), (p)) # define PerlSIO_setlinebuf(f) \ (*PL_StdIO->pSetlinebuf)(PL_StdIO, (f)) -# define PerlSIO_printf Perl_fprintf_nocontext -# define PerlSIO_stdoutf Perl_printf_nocontext +# define PerlSIO_printf Perl_fprintf_nocontext +# define PerlSIO_stdoutf Perl_printf_nocontext # define PerlSIO_vprintf(f,fmt,a) \ (*PL_StdIO->pVprintf)(PL_StdIO, (f),(fmt),a) # define PerlSIO_ftell(f) \ @@ -272,42 +272,42 @@ struct IPerlStdIOInfo #else /* ! PERL_IMPLICIT_SYS */ -# define PerlSIO_stdin stdin -# define PerlSIO_stdout stdout -# define PerlSIO_stderr stderr -# define PerlSIO_fopen(x,y) fopen(x,y) +# define PerlSIO_stdin stdin +# define PerlSIO_stdout stdout +# define PerlSIO_stderr stderr +# define PerlSIO_fopen(x,y) fopen(x,y) # ifdef __VOS__ /* Work around VOS bug posix-979, wrongly setting errno when at end of file. */ -# define PerlSIO_fclose(f) (((errno==1025)?errno=0:0),fclose(f)) +# define PerlSIO_fclose(f) (((errno==1025)?errno=0:0),fclose(f)) # define PerlSIO_feof(f) \ (((errno==1025)?errno=0:0),feof(f)) -# define PerlSIO_ferror(f) (((errno==1025)?errno=0:0),ferror(f)) +# define PerlSIO_ferror(f) (((errno==1025)?errno=0:0),ferror(f)) # else -# define PerlSIO_fclose(f) fclose(f) -# define PerlSIO_feof(f) feof(f) -# define PerlSIO_ferror(f) ferror(f) +# define PerlSIO_fclose(f) fclose(f) +# define PerlSIO_feof(f) feof(f) +# define PerlSIO_ferror(f) ferror(f) # endif -# define PerlSIO_clearerr(f) clearerr(f) -# define PerlSIO_fgetc(f) fgetc(f) +# define PerlSIO_clearerr(f) clearerr(f) +# define PerlSIO_fgetc(f) fgetc(f) # ifdef FILE_base -# define PerlSIO_get_base(f) FILE_base(f) -# define PerlSIO_get_bufsiz(f) FILE_bufsiz(f) +# define PerlSIO_get_base(f) FILE_base(f) +# define PerlSIO_get_bufsiz(f) FILE_bufsiz(f) # else -# define PerlSIO_get_base(f) NULL -# define PerlSIO_get_bufsiz(f) 0 +# define PerlSIO_get_base(f) NULL +# define PerlSIO_get_bufsiz(f) 0 # endif # ifdef USE_STDIO_PTR -# define PerlSIO_get_cnt(f) FILE_cnt(f) -# define PerlSIO_get_ptr(f) FILE_ptr(f) +# define PerlSIO_get_cnt(f) FILE_cnt(f) +# define PerlSIO_get_ptr(f) FILE_ptr(f) # else -# define PerlSIO_get_cnt(f) 0 -# define PerlSIO_get_ptr(f) NULL +# define PerlSIO_get_cnt(f) 0 +# define PerlSIO_get_ptr(f) NULL # endif -# define PerlSIO_fputc(c,f) fputc(c,f) -# define PerlSIO_fputs(s,f) fputs(s,f) -# define PerlSIO_fflush(f) Fflush(f) -# define PerlSIO_fgets(s, n, f) fgets(s,n,f) +# define PerlSIO_fputc(c,f) fputc(c,f) +# define PerlSIO_fputs(s,f) fputs(s,f) +# define PerlSIO_fflush(f) Fflush(f) +# define PerlSIO_fgets(s, n, f) fgets(s,n,f) # if defined(__VMS) /* Unusual definition of ungetc() here to accommodate fast_sv_gets()' * belief that it can mix getc/ungetc with reads from stdio buffer */ @@ -320,36 +320,36 @@ END_EXTERN_C ((*(f))->_ptr > (*(f))->_base)) ? \ ((*(f))->_cnt++, *(--(*(f))->_ptr) = (c)) : decc$ungetc(c,f))) # else -# define PerlSIO_ungetc(c,f) ungetc(c,f) +# define PerlSIO_ungetc(c,f) ungetc(c,f) # endif -# define PerlSIO_fileno(f) fileno(f) -# define PerlSIO_fdopen(f, s) fdopen(f,s) -# define PerlSIO_freopen(p, m, f) freopen(p,m,f) -# define PerlSIO_fread(buf,sz,count,f) fread(buf,sz,count,f) -# define PerlSIO_fwrite(buf,sz,count,f) fwrite(buf,sz,count,f) -# define PerlSIO_setbuf(f,b) setbuf(f,b) -# define PerlSIO_setvbuf(f,b,t,s) setvbuf(f,b,t,s) +# define PerlSIO_fileno(f) fileno(f) +# define PerlSIO_fdopen(f, s) fdopen(f,s) +# define PerlSIO_freopen(p, m, f) freopen(p,m,f) +# define PerlSIO_fread(buf,sz,count,f) fread(buf,sz,count,f) +# define PerlSIO_fwrite(buf,sz,count,f) fwrite(buf,sz,count,f) +# define PerlSIO_setbuf(f,b) setbuf(f,b) +# define PerlSIO_setvbuf(f,b,t,s) setvbuf(f,b,t,s) # if defined(USE_STDIO_PTR) && defined(STDIO_CNT_LVALUE) -# define PerlSIO_set_cnt(f,c) FILE_cnt(f) = (c) +# define PerlSIO_set_cnt(f,c) FILE_cnt(f) = (c) # else -# define PerlSIO_set_cnt(f,c) PerlIOProc_abort() +# define PerlSIO_set_cnt(f,c) PerlIOProc_abort() # endif # if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE) -# define PerlSIO_set_ptr(f,p) (FILE_ptr(f) = (p)) +# define PerlSIO_set_ptr(f,p) (FILE_ptr(f) = (p)) # else -# define PerlSIO_set_ptr(f,p) PerlIOProc_abort() +# define PerlSIO_set_ptr(f,p) PerlIOProc_abort() # endif -# define PerlSIO_setlinebuf(f) setlinebuf(f) -# define PerlSIO_printf fprintf -# define PerlSIO_stdoutf printf -# define PerlSIO_vprintf(f,fmt,a) vfprintf(f,fmt,a) -# define PerlSIO_ftell(f) ftell(f) -# define PerlSIO_fseek(f,o,w) fseek(f,o,w) -# define PerlSIO_fgetpos(f,p) fgetpos(f,p) -# define PerlSIO_fsetpos(f,p) fsetpos(f,p) -# define PerlSIO_rewind(f) rewind(f) -# define PerlSIO_tmpfile() tmpfile() -# define PerlSIO_fdupopen(f) (f) +# define PerlSIO_setlinebuf(f) setlinebuf(f) +# define PerlSIO_printf fprintf +# define PerlSIO_stdoutf printf +# define PerlSIO_vprintf(f,fmt,a) vfprintf(f,fmt,a) +# define PerlSIO_ftell(f) ftell(f) +# define PerlSIO_fseek(f,o,w) fseek(f,o,w) +# define PerlSIO_fgetpos(f,p) fgetpos(f,p) +# define PerlSIO_fsetpos(f,p) fsetpos(f,p) +# define PerlSIO_rewind(f) rewind(f) +# define PerlSIO_tmpfile() tmpfile() +# define PerlSIO_fdupopen(f) (f) #endif /* PERL_IMPLICIT_SYS */ @@ -426,22 +426,22 @@ struct IPerlDirInfo # else /* ! PERL_IMPLICIT_SYS */ -# define PerlDir_mkdir(name, mode) Mkdir((name), (mode)) +# define PerlDir_mkdir(name, mode) Mkdir((name), (mode)) # ifdef VMS -# define PerlDir_chdir(n) Chdir((n)) +# define PerlDir_chdir(n) Chdir((n)) # else -# define PerlDir_chdir(name) chdir((name)) +# define PerlDir_chdir(name) chdir((name)) # endif -# define PerlDir_rmdir(name) rmdir((name)) -# define PerlDir_close(dir) closedir((dir)) -# define PerlDir_open(name) opendir((name)) -# define PerlDir_read(dir) readdir((dir)) -# define PerlDir_rewind(dir) rewinddir((dir)) -# define PerlDir_seek(dir, loc) seekdir((dir), (loc)) -# define PerlDir_tell(dir) telldir((dir)) +# define PerlDir_rmdir(name) rmdir((name)) +# define PerlDir_close(dir) closedir((dir)) +# define PerlDir_open(name) opendir((name)) +# define PerlDir_read(dir) readdir((dir)) +# define PerlDir_rewind(dir) rewinddir((dir)) +# define PerlDir_seek(dir, loc) seekdir((dir), (loc)) +# define PerlDir_tell(dir) telldir((dir)) # ifdef WIN32 -# define PerlDir_mapA(dir) dir -# define PerlDir_mapW(dir) dir +# define PerlDir_mapA(dir) dir +# define PerlDir_mapW(dir) dir # endif #endif /* PERL_IMPLICIT_SYS */ @@ -563,40 +563,40 @@ struct IPerlEnvInfo ? (ENV_UNLOCK, 1) \ : (ENV_UNLOCK, 0))) # else -# define PerlEnv_putenv(str) putenv(str) +# define PerlEnv_putenv(str) putenv(str) # endif -# define PerlEnv_getenv(str) mortal_getenv(str) -# define PerlEnv_getenv_len(str,l) getenv_len((str), (l)) +# define PerlEnv_getenv(str) mortal_getenv(str) +# define PerlEnv_getenv_len(str,l) getenv_len((str), (l)) # ifdef HAS_ENVGETENV -# define PerlEnv_ENVgetenv(str) ENVgetenv((str)) -# define PerlEnv_ENVgetenv_len(str,l) ENVgetenv_len((str), (l)) +# define PerlEnv_ENVgetenv(str) ENVgetenv((str)) +# define PerlEnv_ENVgetenv_len(str,l) ENVgetenv_len((str), (l)) # else -# define PerlEnv_ENVgetenv(str) PerlEnv_getenv((str)) -# define PerlEnv_ENVgetenv_len(str,l) PerlEnv_getenv_len((str), (l)) +# define PerlEnv_ENVgetenv(str) PerlEnv_getenv((str)) +# define PerlEnv_ENVgetenv_len(str,l) PerlEnv_getenv_len((str), (l)) # endif -# define PerlEnv_uname(name) uname((name)) +# define PerlEnv_uname(name) uname((name)) # ifdef WIN32 -# define PerlEnv_os_id() win32_os_id() +# define PerlEnv_os_id() win32_os_id() # define PerlEnv_lib_path(str, lenp) \ win32_get_privlib(WIN32_NO_REGISTRY_M_(str) lenp) -# define PerlEnv_sitelib_path(str, lenp) win32_get_sitelib(str, lenp) -# define PerlEnv_vendorlib_path(str, lenp) win32_get_vendorlib(str, lenp) -# define PerlEnv_get_child_IO(ptr) win32_get_child_IO(ptr) -# define PerlEnv_clearenv() win32_clearenv() -# define PerlEnv_get_childenv() win32_get_childenv() -# define PerlEnv_free_childenv(e) win32_free_childenv((e)) -# define PerlEnv_get_childdir() win32_get_childdir() -# define PerlEnv_free_childdir(d) win32_free_childdir((d)) +# define PerlEnv_sitelib_path(str, lenp) win32_get_sitelib(str, lenp) +# define PerlEnv_vendorlib_path(str, lenp) win32_get_vendorlib(str, lenp) +# define PerlEnv_get_child_IO(ptr) win32_get_child_IO(ptr) +# define PerlEnv_clearenv() win32_clearenv() +# define PerlEnv_get_childenv() win32_get_childenv() +# define PerlEnv_free_childenv(e) win32_free_childenv((e)) +# define PerlEnv_get_childdir() win32_get_childdir() +# define PerlEnv_free_childdir(d) win32_free_childdir((d)) # else # define PerlEnv_clearenv(str) \ (ENV_LOCK, (clearenv(str) \ ? (ENV_UNLOCK, 1) \ : (ENV_UNLOCK, 0))) -# define PerlEnv_get_childenv() get_childenv() -# define PerlEnv_free_childenv(e) free_childenv((e)) -# define PerlEnv_get_childdir() get_childdir() -# define PerlEnv_free_childdir(d) free_childdir((d)) +# define PerlEnv_get_childenv() get_childenv() +# define PerlEnv_free_childenv(e) free_childenv((e)) +# define PerlEnv_get_childdir() get_childdir() +# define PerlEnv_free_childdir(d) free_childdir((d)) # endif #endif /* PERL_IMPLICIT_SYS */ @@ -747,59 +747,59 @@ struct IPerlLIOInfo #else /* ! PERL_IMPLICIT_SYS */ -# define PerlLIO_access(file, mode) access((file), (mode)) -# define PerlLIO_chmod(file, mode) chmod((file), (mode)) -# define PerlLIO_chown(file, owner, grp) chown((file), (owner), (grp)) +# define PerlLIO_access(file, mode) access((file), (mode)) +# define PerlLIO_chmod(file, mode) chmod((file), (mode)) +# define PerlLIO_chown(file, owner, grp) chown((file), (owner), (grp)) # if defined(HAS_TRUNCATE) -# define PerlLIO_chsize(fd, size) ftruncate((fd), (size)) +# define PerlLIO_chsize(fd, size) ftruncate((fd), (size)) # elif defined(HAS_CHSIZE) -# define PerlLIO_chsize(fd, size) chsize((fd), (size)) +# define PerlLIO_chsize(fd, size) chsize((fd), (size)) # else -# define PerlLIO_chsize(fd, size) my_chsize((fd), (size)) +# define PerlLIO_chsize(fd, size) my_chsize((fd), (size)) # endif -# define PerlLIO_close(fd) close((fd)) -# define PerlLIO_dup(fd) dup((fd)) -# define PerlLIO_dup2(fd1, fd2) dup2((fd1), (fd2)) -# define PerlLIO_flock(fd, op) FLOCK((fd), (op)) -# define PerlLIO_fstat(fd, buf) Fstat((fd), (buf)) -# define PerlLIO_ioctl(fd, u, buf) ioctl((fd), (u), (buf)) -# define PerlLIO_isatty(fd) isatty((fd)) -# define PerlLIO_link(oldname, newname) link((oldname), (newname)) -# define PerlLIO_symlink(oldname, newname) symlink((oldname), (newname)) +# define PerlLIO_close(fd) close((fd)) +# define PerlLIO_dup(fd) dup((fd)) +# define PerlLIO_dup2(fd1, fd2) dup2((fd1), (fd2)) +# define PerlLIO_flock(fd, op) FLOCK((fd), (op)) +# define PerlLIO_fstat(fd, buf) Fstat((fd), (buf)) +# define PerlLIO_ioctl(fd, u, buf) ioctl((fd), (u), (buf)) +# define PerlLIO_isatty(fd) isatty((fd)) +# define PerlLIO_link(oldname, newname) link((oldname), (newname)) +# define PerlLIO_symlink(oldname, newname) symlink((oldname), (newname)) # define PerlLIO_readlink(path, buf, bufsiz) \ readlink((path), (buf), (bufsiz)) -# define PerlLIO_lseek(fd, offset, mode) lseek((fd), (offset), (mode)) -# define PerlLIO_stat(name, buf) Stat((name), (buf)) +# define PerlLIO_lseek(fd, offset, mode) lseek((fd), (offset), (mode)) +# define PerlLIO_stat(name, buf) Stat((name), (buf)) # ifdef HAS_LSTAT -# define PerlLIO_lstat(name, buf) lstat((name), (buf)) +# define PerlLIO_lstat(name, buf) lstat((name), (buf)) # else -# define PerlLIO_lstat(name, buf) PerlLIO_stat((name), (buf)) +# define PerlLIO_lstat(name, buf) PerlLIO_stat((name), (buf)) # endif -# define PerlLIO_mktemp(file) mktemp((file)) +# define PerlLIO_mktemp(file) mktemp((file)) # if defined(OEMVS) # if (__CHARSET_LIB == 1) int asciiopen(const char* path, int oflag); int asciiopen3(const char* path, int oflag, int perm); -# define PerlLIO_open(file, flag) asciiopen((file), (flag)) +# define PerlLIO_open(file, flag) asciiopen((file), (flag)) # define PerlLIO_open3(file, flag, perm) \ asciiopen3((file), (flag), (perm)) # else -# define PerlLIO_open(file, flag) open((file), (flag)) -# define PerlLIO_open3(file, flag, perm) open((file), (flag), (perm)) +# define PerlLIO_open(file, flag) open((file), (flag)) +# define PerlLIO_open3(file, flag, perm) open((file), (flag), (perm)) # endif # else -# define PerlLIO_open(file, flag) open((file), (flag)) -# define PerlLIO_open3(file, flag, perm) open((file), (flag), (perm)) +# define PerlLIO_open(file, flag) open((file), (flag)) +# define PerlLIO_open3(file, flag, perm) open((file), (flag), (perm)) # endif -# define PerlLIO_read(fd, buf, count) read((fd), (buf), (count)) -# define PerlLIO_rename(old, new) rename((old), (new)) -# define PerlLIO_setmode(fd, mode) setmode((fd), (mode)) -# define PerlLIO_tmpnam(str) tmpnam((str)) -# define PerlLIO_umask(mode) umask((mode)) -# define PerlLIO_unlink(file) unlink((file)) -# define PerlLIO_utime(file, time) utime((file), (time)) -# define PerlLIO_write(fd, buf, count) write((fd), (buf), (count)) +# define PerlLIO_read(fd, buf, count) read((fd), (buf), (count)) +# define PerlLIO_rename(old, new) rename((old), (new)) +# define PerlLIO_setmode(fd, mode) setmode((fd), (mode)) +# define PerlLIO_tmpnam(str) tmpnam((str)) +# define PerlLIO_umask(mode) umask((mode)) +# define PerlLIO_unlink(file) unlink((file)) +# define PerlLIO_utime(file, time) utime((file), (time)) +# define PerlLIO_write(fd, buf, count) write((fd), (buf), (count)) #endif /* PERL_IMPLICIT_SYS */ @@ -889,31 +889,31 @@ struct IPerlMemInfo #else /* ! PERL_IMPLICIT_SYS */ /* Interpreter specific memory macros */ -# define PerlMem_malloc(size) malloc((size)) -# define PerlMem_realloc(buf, size) realloc((buf), (size)) -# define PerlMem_free(buf) free((buf)) -# define PerlMem_calloc(num, size) calloc((num), (size)) +# define PerlMem_malloc(size) malloc((size)) +# define PerlMem_realloc(buf, size) realloc((buf), (size)) +# define PerlMem_free(buf) free((buf)) +# define PerlMem_calloc(num, size) calloc((num), (size)) # define PerlMem_get_lock() # define PerlMem_free_lock() -# define PerlMem_is_locked() 0 +# define PerlMem_is_locked() 0 /* Shared memory macros */ -# define PerlMemShared_malloc(size) malloc((size)) -# define PerlMemShared_realloc(buf, size) realloc((buf), (size)) -# define PerlMemShared_free(buf) free((buf)) -# define PerlMemShared_calloc(num, size) calloc((num), (size)) +# define PerlMemShared_malloc(size) malloc((size)) +# define PerlMemShared_realloc(buf, size) realloc((buf), (size)) +# define PerlMemShared_free(buf) free((buf)) +# define PerlMemShared_calloc(num, size) calloc((num), (size)) # define PerlMemShared_get_lock() # define PerlMemShared_free_lock() -# define PerlMemShared_is_locked() 0 +# define PerlMemShared_is_locked() 0 /* Parse tree memory macros */ -# define PerlMemParse_malloc(size) malloc((size)) -# define PerlMemParse_realloc(buf, size) realloc((buf), (size)) -# define PerlMemParse_free(buf) free((buf)) -# define PerlMemParse_calloc(num, size) calloc((num), (size)) +# define PerlMemParse_malloc(size) malloc((size)) +# define PerlMemParse_realloc(buf, size) realloc((buf), (size)) +# define PerlMemParse_free(buf) free((buf)) +# define PerlMemParse_calloc(num, size) calloc((num), (size)) # define PerlMemParse_get_lock() # define PerlMemParse_free_lock() -# define PerlMemParse_is_locked() 0 +# define PerlMemParse_is_locked() 0 #endif /* PERL_IMPLICIT_SYS */ @@ -1080,8 +1080,8 @@ struct IPerlProcInfo (*PL_Proc->pFork)(PL_Proc) # define PerlProc_getpid() \ (*PL_Proc->pGetpid)(PL_Proc) -# define PerlProc_setjmp(b, n) Sigsetjmp((b), (n)) -# define PerlProc_longjmp(b, n) Siglongjmp((b), (n)) +# define PerlProc_setjmp(b, n) Sigsetjmp((b), (n)) +# define PerlProc_longjmp(b, n) Siglongjmp((b), (n)) # ifdef WIN32 # define PerlProc_DynaLoad(f) \ @@ -1098,38 +1098,38 @@ struct IPerlProcInfo #else /* ! PERL_IMPLICIT_SYS */ -# define PerlProc_abort() abort() -# define PerlProc_crypt(c,s) crypt((c), (s)) -# define PerlProc_exit(s) exit((s)) -# define PerlProc__exit(s) _exit((s)) +# define PerlProc_abort() abort() +# define PerlProc_crypt(c,s) crypt((c), (s)) +# define PerlProc_exit(s) exit((s)) +# define PerlProc__exit(s) _exit((s)) # define PerlProc_execl(c,w,x,y,z) \ execl((c), (w), (x), (y), (z)) -# define PerlProc_execv(c, a) execv((c), (a)) -# define PerlProc_execvp(c, a) execvp((c), (a)) -# define PerlProc_getuid() getuid() -# define PerlProc_geteuid() geteuid() -# define PerlProc_getgid() getgid() -# define PerlProc_getegid() getegid() -# define PerlProc_getlogin() getlogin() -# define PerlProc_kill(i, a) kill((i), (a)) -# define PerlProc_killpg(i, a) killpg((i), (a)) -# define PerlProc_pause() Pause() -# define PerlProc_popen(c, m) my_popen((c), (m)) -# define PerlProc_popen_list(m,n,a) my_popen_list((m),(n),(a)) -# define PerlProc_pclose(f) my_pclose((f)) -# define PerlProc_pipe(fd) pipe((fd)) -# define PerlProc_setuid(u) setuid((u)) -# define PerlProc_setgid(g) setgid((g)) -# define PerlProc_sleep(t) sleep((t)) -# define PerlProc_times(t) times((t)) -# define PerlProc_wait(t) wait((t)) -# define PerlProc_waitpid(p,s,f) waitpid((p), (s), (f)) -# define PerlProc_setjmp(b, n) Sigsetjmp((b), (n)) -# define PerlProc_longjmp(b, n) Siglongjmp((b), (n)) -# define PerlProc_signal(n, h) signal((n), (h)) -# define PerlProc_fork() my_fork() -# define PerlProc_getpid() getpid() -# define PerlProc_gettimeofday(t,z) gettimeofday((t),(z)) +# define PerlProc_execv(c, a) execv((c), (a)) +# define PerlProc_execvp(c, a) execvp((c), (a)) +# define PerlProc_getuid() getuid() +# define PerlProc_geteuid() geteuid() +# define PerlProc_getgid() getgid() +# define PerlProc_getegid() getegid() +# define PerlProc_getlogin() getlogin() +# define PerlProc_kill(i, a) kill((i), (a)) +# define PerlProc_killpg(i, a) killpg((i), (a)) +# define PerlProc_pause() Pause() +# define PerlProc_popen(c, m) my_popen((c), (m)) +# define PerlProc_popen_list(m,n,a) my_popen_list((m),(n),(a)) +# define PerlProc_pclose(f) my_pclose((f)) +# define PerlProc_pipe(fd) pipe((fd)) +# define PerlProc_setuid(u) setuid((u)) +# define PerlProc_setgid(g) setgid((g)) +# define PerlProc_sleep(t) sleep((t)) +# define PerlProc_times(t) times((t)) +# define PerlProc_wait(t) wait((t)) +# define PerlProc_waitpid(p,s,f) waitpid((p), (s), (f)) +# define PerlProc_setjmp(b, n) Sigsetjmp((b), (n)) +# define PerlProc_longjmp(b, n) Siglongjmp((b), (n)) +# define PerlProc_signal(n, h) signal((n), (h)) +# define PerlProc_fork() my_fork() +# define PerlProc_getpid() getpid() +# define PerlProc_gettimeofday(t,z) gettimeofday((t),(z)) # ifdef WIN32 # define PerlProc_DynaLoad(f) \ @@ -1139,7 +1139,7 @@ struct IPerlProcInfo # define PerlProc_spawnvp(m, c, a) \ win32_spawnvp((m), (c), (a)) # undef PerlProc_signal -# define PerlProc_signal(n, h) win32_signal((n), (h)) +# define PerlProc_signal(n, h) win32_signal((n), (h)) # endif #endif /* PERL_IMPLICIT_SYS */ @@ -1358,66 +1358,66 @@ struct IPerlSockInfo (*PL_Sock->pSocketpair)(PL_Sock, a, t, p, f) # ifdef WIN32 -# define PerlSock_closesocket(s) \ +# define PerlSock_closesocket(s) \ (*PL_Sock->pClosesocket)(PL_Sock, s) # endif #else /* ! PERL_IMPLICIT_SYS below */ -# define PerlSock_htonl(x) htonl(x) -# define PerlSock_htons(x) htons(x) -# define PerlSock_ntohl(x) ntohl(x) -# define PerlSock_ntohs(x) ntohs(x) -# define PerlSock_accept(s, a, l) accept(s, a, l) -# define PerlSock_bind(s, n, l) bind(s, n, l) -# define PerlSock_connect(s, n, l) connect(s, n, l) +# define PerlSock_htonl(x) htonl(x) +# define PerlSock_htons(x) htons(x) +# define PerlSock_ntohl(x) ntohl(x) +# define PerlSock_ntohs(x) ntohs(x) +# define PerlSock_accept(s, a, l) accept(s, a, l) +# define PerlSock_bind(s, n, l) bind(s, n, l) +# define PerlSock_connect(s, n, l) connect(s, n, l) # define PerlSock_gethostbyaddr(a, l, t) gethostbyaddr(a, l, t) -# define PerlSock_gethostbyname(n) gethostbyname(n) -# define PerlSock_gethostent gethostent -# define PerlSock_endhostent endhostent -# define PerlSock_gethostname(n, l) gethostname(n, l) - -# define PerlSock_getnetbyaddr(n, t) getnetbyaddr(n, t) -# define PerlSock_getnetbyname(n) getnetbyname(n) -# define PerlSock_getnetent getnetent -# define PerlSock_endnetent endnetent -# define PerlSock_getpeername(s, n, l) getpeername(s, n, l) - -# define PerlSock_getprotobyname(n) getprotobyname(n) -# define PerlSock_getprotobynumber(n) getprotobynumber(n) -# define PerlSock_getprotoent getprotoent -# define PerlSock_endprotoent endprotoent - -# define PerlSock_getservbyname(n, p) getservbyname(n, p) +# define PerlSock_gethostbyname(n) gethostbyname(n) +# define PerlSock_gethostent gethostent +# define PerlSock_endhostent endhostent +# define PerlSock_gethostname(n, l) gethostname(n, l) + +# define PerlSock_getnetbyaddr(n, t) getnetbyaddr(n, t) +# define PerlSock_getnetbyname(n) getnetbyname(n) +# define PerlSock_getnetent getnetent +# define PerlSock_endnetent endnetent +# define PerlSock_getpeername(s, n, l) getpeername(s, n, l) + +# define PerlSock_getprotobyname(n) getprotobyname(n) +# define PerlSock_getprotobynumber(n) getprotobynumber(n) +# define PerlSock_getprotoent getprotoent +# define PerlSock_endprotoent endprotoent + +# define PerlSock_getservbyname(n, p) getservbyname(n, p) # define PerlSock_getservbyport(port, p) getservbyport(port, p) -# define PerlSock_getservent getservent -# define PerlSock_endservent endservent +# define PerlSock_getservent getservent +# define PerlSock_endservent endservent -# define PerlSock_getsockname(s, n, l) getsockname(s, n, l) +# define PerlSock_getsockname(s, n, l) getsockname(s, n, l) # define PerlSock_getsockopt(s,l,n,v,i) getsockopt(s, l, n, v, i) -# define PerlSock_inet_addr(c) inet_addr(c) -# define PerlSock_inet_ntoa(i) inet_ntoa(i) -# define PerlSock_listen(s, b) listen(s, b) -# define PerlSock_recv(s, b, l, f) recv(s, b, l, f) +# define PerlSock_inet_addr(c) inet_addr(c) +# define PerlSock_inet_ntoa(i) inet_ntoa(i) +# define PerlSock_listen(s, b) listen(s, b) +# define PerlSock_recv(s, b, l, f) recv(s, b, l, f) # define PerlSock_recvfrom(s, b, l, f, from, fromlen) \ recvfrom(s, b, l, f, from, fromlen) -# define PerlSock_select(n, r, w, e, t) select(n, r, w, e, t) -# define PerlSock_send(s, b, l, f) send(s, b, l, f) +# define PerlSock_select(n, r, w, e, t) select(n, r, w, e, t) +# define PerlSock_send(s, b, l, f) send(s, b, l, f) # define PerlSock_sendto(s, b, l, f, t, tlen) \ sendto(s, b, l, f, t, tlen) -# define PerlSock_sethostent(f) sethostent(f) -# define PerlSock_setnetent(f) setnetent(f) -# define PerlSock_setprotoent(f) setprotoent(f) -# define PerlSock_setservent(f) setservent(f) +# define PerlSock_sethostent(f) sethostent(f) +# define PerlSock_setnetent(f) setnetent(f) +# define PerlSock_setprotoent(f) setprotoent(f) +# define PerlSock_setservent(f) setservent(f) # define PerlSock_setsockopt(s, l, n, v, len) \ setsockopt(s, l, n, v, len) -# define PerlSock_shutdown(s, h) shutdown(s, h) -# define PerlSock_socket(a, t, p) socket(a, t, p) +# define PerlSock_shutdown(s, h) shutdown(s, h) +# define PerlSock_socket(a, t, p) socket(a, t, p) # define PerlSock_socketpair(a, t, p, f) socketpair(a, t, p, f) # ifdef WIN32 -# define PerlSock_closesocket(s) closesocket(s) +# define PerlSock_closesocket(s) closesocket(s) # endif #endif /* PERL_IMPLICIT_SYS */ diff --git a/mg.h b/mg.h index 3dbacf28fbaa..d554f8ab127b 100644 --- a/mg.h +++ b/mg.h @@ -31,16 +31,16 @@ struct magic { char* mg_ptr; }; -#define MGf_TAINTEDDIR 1 /* PERL_MAGIC_envelem only */ -#define MGf_MINMATCH 1 /* PERL_MAGIC_regex_global only */ -#define MGf_REQUIRE_GV 1 /* PERL_MAGIC_checkcall only */ -#define MGf_REFCOUNTED 2 -#define MGf_GSKIP 4 /* skip further GETs until after next SET */ -#define MGf_COPY 8 /* has an svt_copy MGVTBL entry */ -#define MGf_DUP 0x10 /* has an svt_dup MGVTBL entry */ -#define MGf_LOCAL 0x20 /* has an svt_local MGVTBL entry */ -#define MGf_BYTES 0x40 /* PERL_MAGIC_regex_global only */ -#define MGf_PERSIST 0x80 /* PERL_MAGIC_lvref only */ +#define MGf_TAINTEDDIR 1 /* PERL_MAGIC_envelem only */ +#define MGf_MINMATCH 1 /* PERL_MAGIC_regex_global only */ +#define MGf_REQUIRE_GV 1 /* PERL_MAGIC_checkcall only */ +#define MGf_REFCOUNTED 2 +#define MGf_GSKIP 4 /* skip further GETs until after next SET */ +#define MGf_COPY 8 /* has an svt_copy MGVTBL entry */ +#define MGf_DUP 0x10 /* has an svt_dup MGVTBL entry */ +#define MGf_LOCAL 0x20 /* has an svt_local MGVTBL entry */ +#define MGf_BYTES 0x40 /* PERL_MAGIC_regex_global only */ +#define MGf_PERSIST 0x80 /* PERL_MAGIC_lvref only */ #define MgTAINTEDDIR(mg) (mg->mg_flags & MGf_TAINTEDDIR) #define MgTAINTEDDIR_on(mg) (mg->mg_flags |= MGf_TAINTEDDIR) @@ -69,12 +69,12 @@ struct magic { SvPV_nolen_const(MUTABLE_SV((mg)->mg_ptr)) : \ (const char*)(mg)->mg_ptr) -#define SvTIED_mg(sv,how) (SvRMAGICAL(sv) ? mg_find((sv),(how)) : NULL) +#define SvTIED_mg(sv,how) (SvRMAGICAL(sv) ? mg_find((sv),(how)) : NULL) #define SvTIED_obj(sv,mg) \ ((mg)->mg_obj ? (mg)->mg_obj : sv_2mortal(newRV(sv))) #if defined(PERL_CORE) || defined(PERL_EXT) -# define MgBYTEPOS(mg,sv,pv,len) S_MgBYTEPOS(aTHX_ mg,sv,pv,len) +# define MgBYTEPOS(mg,sv,pv,len) S_MgBYTEPOS(aTHX_ mg,sv,pv,len) /* assumes get-magic and stringification have already occurred */ # define MgBYTEPOS_set(mg,sv,pv,off) \ ( \ @@ -87,7 +87,7 @@ struct magic { (mg)->mg_flags &= ~MGf_BYTES)) #endif -#define whichsig(pv) whichsig_pv(pv) +#define whichsig(pv) whichsig_pv(pv) /* * ex: set ts=8 sts=4 sw=4 et: diff --git a/nostdio.h b/nostdio.h index 781178f35f1d..85093f932a90 100644 --- a/nostdio.h +++ b/nostdio.h @@ -22,12 +22,12 @@ #define _STDIO_INCLUDED #define __STDIO_LOADED struct _FILE; -#define FILE struct _FILE +#define FILE struct _FILE #endif #if !defined(OEMVS) -#define _CANNOT "CANNOT" +#define _CANNOT "CANNOT" #undef clearerr #undef fclose @@ -72,59 +72,59 @@ struct _FILE; #undef vfprintf #undef printf -#define fprintf _CANNOT _fprintf_ -#define printf _CANNOT _printf_ -#define stdin _CANNOT _stdin_ -#define stdout _CANNOT _stdout_ -#define stderr _CANNOT _stderr_ +#define fprintf _CANNOT _fprintf_ +#define printf _CANNOT _printf_ +#define stdin _CANNOT _stdin_ +#define stdout _CANNOT _stdout_ +#define stderr _CANNOT _stderr_ #ifndef OS2 -#define tmpfile() _CANNOT _tmpfile_ +#define tmpfile() _CANNOT _tmpfile_ #endif -#define fclose(f) _CANNOT _fclose_ -#define fflush(f) _CANNOT _fflush_ -#define fopen(p,m) _CANNOT _fopen_ -#define freopen(p,m,f) _CANNOT _freopen_ -#define setbuf(f,b) _CANNOT _setbuf_ -#define setvbuf(f,b,x,s) _CANNOT _setvbuf_ -#define fscanf _CANNOT _fscanf_ -#define vfprintf(f,fmt,a) _CANNOT _vfprintf_ -#define fgetc(f) _CANNOT _fgetc_ -#define fgets(s,n,f) _CANNOT _fgets_ -#define fputc(c,f) _CANNOT _fputc_ -#define fputs(s,f) _CANNOT _fputs_ -#define getc(f) _CANNOT _getc_ -#define putc(c,f) _CANNOT _putc_ +#define fclose(f) _CANNOT _fclose_ +#define fflush(f) _CANNOT _fflush_ +#define fopen(p,m) _CANNOT _fopen_ +#define freopen(p,m,f) _CANNOT _freopen_ +#define setbuf(f,b) _CANNOT _setbuf_ +#define setvbuf(f,b,x,s) _CANNOT _setvbuf_ +#define fscanf _CANNOT _fscanf_ +#define vfprintf(f,fmt,a) _CANNOT _vfprintf_ +#define fgetc(f) _CANNOT _fgetc_ +#define fgets(s,n,f) _CANNOT _fgets_ +#define fputc(c,f) _CANNOT _fputc_ +#define fputs(s,f) _CANNOT _fputs_ +#define getc(f) _CANNOT _getc_ +#define putc(c,f) _CANNOT _putc_ #ifndef OS2 -#define ungetc(c,f) _CANNOT _ungetc_ +#define ungetc(c,f) _CANNOT _ungetc_ #endif -#define fread(b,s,c,f) _CANNOT _fread_ -#define fwrite(b,s,c,f) _CANNOT _fwrite_ -#define fgetpos(f,p) _CANNOT _fgetpos_ -#define fseek(f,o,w) _CANNOT _fseek_ -#define fsetpos(f,p) _CANNOT _fsetpos_ -#define ftell(f) _CANNOT _ftell_ -#define rewind(f) _CANNOT _rewind_ -#define clearerr(f) _CANNOT _clearerr_ -#define feof(f) _CANNOT _feof_ -#define ferror(f) _CANNOT _ferror_ -#define __filbuf(f) _CANNOT __filbuf_ -#define __flsbuf(c,f) _CANNOT __flsbuf_ -#define _filbuf(f) _CANNOT _filbuf_ -#define _flsbuf(c,f) _CANNOT _flsbuf_ -#define fdopen(fd,p) _CANNOT _fdopen_ -#define fileno(f) _CANNOT _fileno_ +#define fread(b,s,c,f) _CANNOT _fread_ +#define fwrite(b,s,c,f) _CANNOT _fwrite_ +#define fgetpos(f,p) _CANNOT _fgetpos_ +#define fseek(f,o,w) _CANNOT _fseek_ +#define fsetpos(f,p) _CANNOT _fsetpos_ +#define ftell(f) _CANNOT _ftell_ +#define rewind(f) _CANNOT _rewind_ +#define clearerr(f) _CANNOT _clearerr_ +#define feof(f) _CANNOT _feof_ +#define ferror(f) _CANNOT _ferror_ +#define __filbuf(f) _CANNOT __filbuf_ +#define __flsbuf(c,f) _CANNOT __flsbuf_ +#define _filbuf(f) _CANNOT _filbuf_ +#define _flsbuf(c,f) _CANNOT _flsbuf_ +#define fdopen(fd,p) _CANNOT _fdopen_ +#define fileno(f) _CANNOT _fileno_ #if defined(SFIO_VERSION) && SFIO_VERSION < 20000101L -#define flockfile(f) _CANNOT _flockfile_ -#define ftrylockfile(f) _CANNOT _ftrylockfile_ -#define funlockfile(f) _CANNOT _funlockfile_ +#define flockfile(f) _CANNOT _flockfile_ +#define ftrylockfile(f) _CANNOT _ftrylockfile_ +#define funlockfile(f) _CANNOT _funlockfile_ #endif -#define getc_unlocked(f) _CANNOT _getc_unlocked_ +#define getc_unlocked(f) _CANNOT _getc_unlocked_ #define putc_unlocked(c,f) _CANNOT _putc_unlocked_ -#define popen(c,m) _CANNOT _popen_ -#define getw(f) _CANNOT _getw_ -#define putw(v,f) _CANNOT _putw_ +#define popen(c,m) _CANNOT _popen_ +#define getw(f) _CANNOT _getw_ +#define putw(v,f) _CANNOT _putw_ #ifndef OS2 -#define pclose(f) _CANNOT _pclose_ +#define pclose(f) _CANNOT _pclose_ #endif #endif /*not define EBCDIC */ diff --git a/op.h b/op.h index 16679da790c2..a198fd6b5519 100644 --- a/op.h +++ b/op.h @@ -31,12 +31,12 @@ */ #include "op_reg_common.h" -#define OPCODE U16 +#define OPCODE U16 typedef PERL_BITFIELD16 Optype; #ifdef BASEOP_DEFINITION -#define BASEOP BASEOP_DEFINITION +#define BASEOP BASEOP_DEFINITION #else #define BASEOP \ OP* op_next; \ @@ -94,18 +94,18 @@ C. Deprecated. Use C instead. /* Public flags */ -#define OPf_WANT 3 /* Mask for "want" bits: */ -#define OPf_WANT_VOID 1 /* Want nothing */ -#define OPf_WANT_SCALAR 2 /* Want single value */ -#define OPf_WANT_LIST 3 /* Want list of any length */ -#define OPf_KIDS 4 /* There is a firstborn child. */ -#define OPf_PARENS 8 /* This operator was parenthesized. */ +#define OPf_WANT 3 /* Mask for "want" bits: */ +#define OPf_WANT_VOID 1 /* Want nothing */ +#define OPf_WANT_SCALAR 2 /* Want single value */ +#define OPf_WANT_LIST 3 /* Want list of any length */ +#define OPf_KIDS 4 /* There is a firstborn child. */ +#define OPf_PARENS 8 /* This operator was parenthesized. */ /* (Or block needs explicit scope entry.) */ -#define OPf_REF 16 /* Certified reference. */ +#define OPf_REF 16 /* Certified reference. */ /* (Return container, not containee). */ -#define OPf_MOD 32 /* Will modify (lvalue). */ +#define OPf_MOD 32 /* Will modify (lvalue). */ -#define OPf_STACKED 64 /* Some arg is arriving on the stack. */ +#define OPf_STACKED 64 /* Some arg is arriving on the stack. */ /* Indicates mutator-variant of op for those * ops which support them, e.g. $x += 1 */ @@ -178,8 +178,8 @@ C. Deprecated. Use C instead. #define OPpTRANS_ALL \ (OPpTRANS_USE_SVOP|OPpTRANS_CAN_FORCE_UTF8|OPpTRANS_IDENTICAL|OPpTRANS_SQUASH|OPpTRANS_COMPLEMENT|OPpTRANS_GROWS|OPpTRANS_DELETE) -#define OPpTRANS_FROM_UTF OPpTRANS_USE_SVOP -#define OPpTRANS_TO_UTF OPpTRANS_CAN_FORCE_UTF8 +#define OPpTRANS_FROM_UTF OPpTRANS_USE_SVOP +#define OPpTRANS_TO_UTF OPpTRANS_CAN_FORCE_UTF8 /* Mask for OP_ENTERSUB flags, the absence of which @@ -198,9 +198,9 @@ typedef union { } UNOP_AUX_item; #ifdef USE_ITHREADS -# define UNOP_AUX_item_sv(item) PAD_SVl((item)->pad_offset); +# define UNOP_AUX_item_sv(item) PAD_SVl((item)->pad_offset); #else -# define UNOP_AUX_item_sv(item) ((item)->sv); +# define UNOP_AUX_item_sv(item) ((item)->sv); #endif @@ -338,7 +338,7 @@ struct pmop { * allocate off the low end until you get to PMf_BASE_SHIFT+0. If that * isn't enough, move PMf_BASE_SHIFT down (if possible) and add the new bit * at the other end instead; this preserves binary compatibility. */ -#define PMf_BASE_SHIFT (_RXf_PMf_SHIFT_NEXT+2) +#define PMf_BASE_SHIFT (_RXf_PMf_SHIFT_NEXT+2) /* Set by the parser if it discovers an error, * so the regex shouldn't be compiled */ @@ -378,7 +378,7 @@ struct pmop { /* op_code_list is private; don't free it etc. It may well point * to code within another sub, with different pad etc */ -#define PMf_CODELIST_PRIVATE (1U<<(PMf_BASE_SHIFT+14)) +#define PMf_CODELIST_PRIVATE (1U<<(PMf_BASE_SHIFT+14)) /* the PMOP is a QR (we should be able to detect that from the op type, but the * regex compilation API passes just the pm flags, not the op itself */ @@ -422,7 +422,7 @@ struct pmop { #endif #define PmopSTASHPV(o) (PmopSTASH(o) ? HvNAME_get(PmopSTASH(o)) : NULL) /* op_pmstashstartu.op_pmstash is not refcounted */ -#define PmopSTASHPV_set(o,pv) PmopSTASH_set((o), gv_stashpv(pv,GV_ADD)) +#define PmopSTASHPV_set(o,pv) PmopSTASH_set((o), gv_stashpv(pv,GV_ADD)) struct svop { BASEOP @@ -520,95 +520,95 @@ typedef enum { #ifdef USE_ITHREADS -# define cGVOPx_gv(o) ((GV*)PAD_SVl(cPADOPx(o)->op_padix)) +# define cGVOPx_gv(o) ((GV*)PAD_SVl(cPADOPx(o)->op_padix)) # ifndef PERL_CORE -# define IS_PADGV(v) (v && isGV(v)) -# define IS_PADCONST(v) \ +# define IS_PADGV(v) (v && isGV(v)) +# define IS_PADCONST(v) \ (v && (SvREADONLY(v) || (SvIsCOW(v) && !SvLEN(v)))) # endif -# define cSVOPx_sv(v) \ - (cSVOPx(v)->op_sv \ +# define cSVOPx_sv(v) \ + (cSVOPx(v)->op_sv \ ? cSVOPx(v)->op_sv : PAD_SVl((v)->op_targ)) -# define cSVOPx_svp(v) \ - (cSVOPx(v)->op_sv \ +# define cSVOPx_svp(v) \ + (cSVOPx(v)->op_sv \ ? &cSVOPx(v)->op_sv : &PAD_SVl((v)->op_targ)) -# define cMETHOPx_meth(v) \ +# define cMETHOPx_meth(v) \ (cMETHOPx(v)->op_u.op_meth_sv \ ? cMETHOPx(v)->op_u.op_meth_sv : PAD_SVl((v)->op_targ)) -# define cMETHOPx_rclass(v) PAD_SVl(cMETHOPx(v)->op_rclass_targ) +# define cMETHOPx_rclass(v) PAD_SVl(cMETHOPx(v)->op_rclass_targ) #else -# define cGVOPx_gv(o) ((GV*)cSVOPx(o)->op_sv) +# define cGVOPx_gv(o) ((GV*)cSVOPx(o)->op_sv) # ifndef PERL_CORE -# define IS_PADGV(v) FALSE -# define IS_PADCONST(v) FALSE +# define IS_PADGV(v) FALSE +# define IS_PADCONST(v) FALSE # endif -# define cSVOPx_sv(v) (cSVOPx(v)->op_sv) -# define cSVOPx_svp(v) (&cSVOPx(v)->op_sv) -# define cMETHOPx_meth(v) (cMETHOPx(v)->op_u.op_meth_sv) -# define cMETHOPx_rclass(v) (cMETHOPx(v)->op_rclass_sv) +# define cSVOPx_sv(v) (cSVOPx(v)->op_sv) +# define cSVOPx_svp(v) (&cSVOPx(v)->op_sv) +# define cMETHOPx_meth(v) (cMETHOPx(v)->op_u.op_meth_sv) +# define cMETHOPx_rclass(v) (cMETHOPx(v)->op_rclass_sv) #endif -#define cMETHOP_meth cMETHOPx_meth(PL_op) -#define cMETHOP_rclass cMETHOPx_rclass(PL_op) +#define cMETHOP_meth cMETHOPx_meth(PL_op) +#define cMETHOP_rclass cMETHOPx_rclass(PL_op) -#define cMETHOPo_meth cMETHOPx_meth(o) -#define cMETHOPo_rclass cMETHOPx_rclass(o) +#define cMETHOPo_meth cMETHOPx_meth(o) +#define cMETHOPo_rclass cMETHOPx_rclass(o) -#define cGVOP_gv cGVOPx_gv(PL_op) -#define cGVOPo_gv cGVOPx_gv(o) -#define kGVOP_gv cGVOPx_gv(kid) -#define cSVOP_sv cSVOPx_sv(PL_op) -#define cSVOPo_sv cSVOPx_sv(o) -#define kSVOP_sv cSVOPx_sv(kid) +#define cGVOP_gv cGVOPx_gv(PL_op) +#define cGVOPo_gv cGVOPx_gv(o) +#define kGVOP_gv cGVOPx_gv(kid) +#define cSVOP_sv cSVOPx_sv(PL_op) +#define cSVOPo_sv cSVOPx_sv(o) +#define kSVOP_sv cSVOPx_sv(kid) #ifndef PERL_CORE -# define Nullop ((OP*)NULL) +# define Nullop ((OP*)NULL) #endif /* Lowest byte of PL_opargs */ -#define OA_MARK 1 -#define OA_FOLDCONST 2 -#define OA_RETSCALAR 4 -#define OA_TARGET 8 -#define OA_TARGLEX 16 -#define OA_OTHERINT 32 -#define OA_DANGEROUS 64 -#define OA_DEFGV 128 +#define OA_MARK 1 +#define OA_FOLDCONST 2 +#define OA_RETSCALAR 4 +#define OA_TARGET 8 +#define OA_TARGLEX 16 +#define OA_OTHERINT 32 +#define OA_DANGEROUS 64 +#define OA_DEFGV 128 /* The next 4 bits (8..11) encode op class information */ -#define OCSHIFT 8 - -#define OA_CLASS_MASK (15 << OCSHIFT) - -#define OA_BASEOP (0 << OCSHIFT) -#define OA_UNOP (1 << OCSHIFT) -#define OA_BINOP (2 << OCSHIFT) -#define OA_LOGOP (3 << OCSHIFT) -#define OA_LISTOP (4 << OCSHIFT) -#define OA_PMOP (5 << OCSHIFT) -#define OA_SVOP (6 << OCSHIFT) -#define OA_PADOP (7 << OCSHIFT) +#define OCSHIFT 8 + +#define OA_CLASS_MASK (15 << OCSHIFT) + +#define OA_BASEOP (0 << OCSHIFT) +#define OA_UNOP (1 << OCSHIFT) +#define OA_BINOP (2 << OCSHIFT) +#define OA_LOGOP (3 << OCSHIFT) +#define OA_LISTOP (4 << OCSHIFT) +#define OA_PMOP (5 << OCSHIFT) +#define OA_SVOP (6 << OCSHIFT) +#define OA_PADOP (7 << OCSHIFT) #define OA_PVOP_OR_SVOP (8 << OCSHIFT) -#define OA_LOOP (9 << OCSHIFT) -#define OA_COP (10 << OCSHIFT) +#define OA_LOOP (9 << OCSHIFT) +#define OA_COP (10 << OCSHIFT) #define OA_BASEOP_OR_UNOP (11 << OCSHIFT) -#define OA_FILESTATOP (12 << OCSHIFT) -#define OA_LOOPEXOP (13 << OCSHIFT) -#define OA_METHOP (14 << OCSHIFT) -#define OA_UNOP_AUX (15 << OCSHIFT) +#define OA_FILESTATOP (12 << OCSHIFT) +#define OA_LOOPEXOP (13 << OCSHIFT) +#define OA_METHOP (14 << OCSHIFT) +#define OA_UNOP_AUX (15 << OCSHIFT) /* Each remaining nybble of PL_opargs (i.e. bits 12..15, * 16..19 etc) encode the type for each arg */ -#define OASHIFT 12 +#define OASHIFT 12 -#define OA_SCALAR 1 -#define OA_LIST 2 -#define OA_AVREF 3 -#define OA_HVREF 4 -#define OA_CVREF 5 -#define OA_FILEREF 6 -#define OA_SCALARREF 7 -#define OA_OPTIONAL 8 +#define OA_SCALAR 1 +#define OA_LIST 2 +#define OA_AVREF 3 +#define OA_HVREF 4 +#define OA_CVREF 5 +#define OA_FILEREF 6 +#define OA_SCALARREF 7 +#define OA_OPTIONAL 8 /* Op_REFCNT is a reference count at the head of each op tree: needed since * the tree is shared between threads, and between cloned closure copies in @@ -619,40 +619,40 @@ typedef enum { */ #ifdef USE_ITHREADS -# define OP_REFCNT_INIT MUTEX_INIT(&PL_op_mutex) +# define OP_REFCNT_INIT MUTEX_INIT(&PL_op_mutex) # ifdef PERL_CORE -# define OP_REFCNT_LOCK MUTEX_LOCK(&PL_op_mutex) -# define OP_REFCNT_UNLOCK MUTEX_UNLOCK(&PL_op_mutex) +# define OP_REFCNT_LOCK MUTEX_LOCK(&PL_op_mutex) +# define OP_REFCNT_UNLOCK MUTEX_UNLOCK(&PL_op_mutex) # else /* Subject non-core uses to clang thread safety analysis */ -# define OP_REFCNT_LOCK op_refcnt_lock() -# define OP_REFCNT_UNLOCK op_refcnt_unlock() +# define OP_REFCNT_LOCK op_refcnt_lock() +# define OP_REFCNT_UNLOCK op_refcnt_unlock() # endif -# define OP_REFCNT_TERM MUTEX_DESTROY(&PL_op_mutex) +# define OP_REFCNT_TERM MUTEX_DESTROY(&PL_op_mutex) #else -# define OP_REFCNT_INIT NOOP -# define OP_REFCNT_LOCK NOOP -# define OP_REFCNT_UNLOCK NOOP -# define OP_REFCNT_TERM NOOP +# define OP_REFCNT_INIT NOOP +# define OP_REFCNT_LOCK NOOP +# define OP_REFCNT_UNLOCK NOOP +# define OP_REFCNT_TERM NOOP #endif -#define OpREFCNT_set(o,n) ((o)->op_targ = (n)) +#define OpREFCNT_set(o,n) ((o)->op_targ = (n)) #ifdef PERL_DEBUG_READONLY_OPS -# define OpREFCNT_inc(o) Perl_op_refcnt_inc(aTHX_ o) -# define OpREFCNT_dec(o) Perl_op_refcnt_dec(aTHX_ o) +# define OpREFCNT_inc(o) Perl_op_refcnt_inc(aTHX_ o) +# define OpREFCNT_dec(o) Perl_op_refcnt_dec(aTHX_ o) #else -# define OpREFCNT_inc(o) ((o) ? (++(o)->op_targ, (o)) : NULL) -# define OpREFCNT_dec(o) (--(o)->op_targ) +# define OpREFCNT_inc(o) ((o) ? (++(o)->op_targ, (o)) : NULL) +# define OpREFCNT_dec(o) (--(o)->op_targ) #endif /* flags used by Perl_load_module() */ -#define PERL_LOADMOD_DENY 0x1 /* no Module */ -#define PERL_LOADMOD_NOIMPORT 0x2 /* use Module () */ -#define PERL_LOADMOD_IMPORT_OPS 0x4 /* import arguments are passed +#define PERL_LOADMOD_DENY 0x1 /* no Module */ +#define PERL_LOADMOD_NOIMPORT 0x2 /* use Module () */ +#define PERL_LOADMOD_IMPORT_OPS 0x4 /* import arguments are passed as a sin- gle op tree, not a list of SVs */ #if defined(PERL_IN_PERLY_C) || defined(PERL_IN_OP_C) || defined(PERL_IN_TOKE_C) -#define ref(o, type) doref(o, type, TRUE) +#define ref(o, type) doref(o, type, TRUE) #endif @@ -676,7 +676,7 @@ o->op_next >> is not already set, C should be at least an C. =cut */ -#define LINKLIST(o) ((o)->op_next ? (o)->op_next : op_linklist((OP*)o)) +#define LINKLIST(o) ((o)->op_next ? (o)->op_next : op_linklist((OP*)o)) /* no longer used anywhere in core */ #ifndef PERL_CORE @@ -685,7 +685,7 @@ o->op_next >> is not already set, C should be at least an C. #endif #ifdef PERL_CORE -# define my(o) my_attrs((o), NULL) +# define my(o) my_attrs((o), NULL) #endif #ifdef USE_REENTRANT_API @@ -696,7 +696,7 @@ o->op_next >> is not already set, C should be at least an C. (var = (type *) Perl_Slab_Alloc(aTHX_ c*sizeof(type))) #define NewOpSz(m,var,size) \ (var = (OP *) Perl_Slab_Alloc(aTHX_ size)) -#define FreeOp(p) Perl_Slab_Free(aTHX_ p) +#define FreeOp(p) Perl_Slab_Free(aTHX_ p) /* * The per-CV op slabs consist of a header (the opslab struct) and a bunch of @@ -742,7 +742,7 @@ struct opslab { OPSLOT opslab_slots; /* slots begin here */ }; -# define OPSLOT_HEADER STRUCT_OFFSET(OPSLOT, opslot_op) +# define OPSLOT_HEADER STRUCT_OFFSET(OPSLOT, opslot_op) # define OpSLOT(o) \ (assert_(o->op_slabbed) \ (OPSLOT *)(((char *)o)-OPSLOT_HEADER)) @@ -809,12 +809,12 @@ preprocessing token; the type of C depends on C. =cut */ -#define BhkFLAGS(hk) ((hk)->bhk_flags) +#define BhkFLAGS(hk) ((hk)->bhk_flags) -#define BHKf_bhk_start 0x01 -#define BHKf_bhk_pre_end 0x02 -#define BHKf_bhk_post_end 0x04 -#define BHKf_bhk_eval 0x08 +#define BHKf_bhk_start 0x01 +#define BHKf_bhk_pre_end 0x02 +#define BHKf_bhk_post_end 0x04 +#define BHKf_bhk_eval 0x08 #define BhkENTRY(hk, which) \ ((BhkFLAGS(hk) & BHKf_ ## which) ? ((hk)->which) : NULL) @@ -858,20 +858,20 @@ preprocessing token; the type of C depends on C. /* flags for rv2cv_op_cv */ -#define RV2CVOPCV_MARK_EARLY 0x00000001 +#define RV2CVOPCV_MARK_EARLY 0x00000001 #define RV2CVOPCV_RETURN_NAME_GV 0x00000002 -#define RV2CVOPCV_RETURN_STUB 0x00000004 +#define RV2CVOPCV_RETURN_STUB 0x00000004 #if defined(PERL_CORE) || \ defined(PERL_EXT) /* behaviour of this flag is subject to change: */ -# define RV2CVOPCV_MAYBE_NAME_GV 0x00000008 +# define RV2CVOPCV_MAYBE_NAME_GV 0x00000008 #endif -#define RV2CVOPCV_FLAG_MASK 0x0000000f /* all of the above */ +#define RV2CVOPCV_FLAG_MASK 0x0000000f /* all of the above */ -#define op_lvalue(op,t) Perl_op_lvalue_flags(aTHX_ op,t,0) +#define op_lvalue(op,t) Perl_op_lvalue_flags(aTHX_ op,t,0) /* flags for op_lvalue_flags */ -#define OP_LVALUE_NO_CROAK 1 +#define OP_LVALUE_NO_CROAK 1 /* =for apidoc_section $custom @@ -924,7 +924,7 @@ typedef union { XOP *xop_ptr; } XOPRETANY; -#define XopFLAGS(xop) ((xop)->xop_flags) +#define XopFLAGS(xop) ((xop)->xop_flags) #define XOPf_xop_name 0x01 #define XOPf_xop_desc 0x02 @@ -940,10 +940,10 @@ typedef enum { XOPe_xop_peep = XOPf_xop_peep } xop_flags_enum; -#define XOPd_xop_name PL_op_name[OP_CUSTOM] -#define XOPd_xop_desc PL_op_desc[OP_CUSTOM] -#define XOPd_xop_class OA_BASEOP -#define XOPd_xop_peep ((Perl_cpeep_t)0) +#define XOPd_xop_name PL_op_name[OP_CUSTOM] +#define XOPd_xop_desc PL_op_desc[OP_CUSTOM] +#define XOPd_xop_class OA_BASEOP +#define XOPd_xop_peep ((Perl_cpeep_t)0) #define XopENTRY_set(xop, which, to) \ STMT_START { \ @@ -957,7 +957,7 @@ typedef enum { #define XopENTRYCUSTOM(o, which) \ (Perl_custom_op_get_field(aTHX_ o, XOPe_ ## which).which) -#define XopDISABLE(xop, which) ((xop)->xop_flags &= ~XOPf_ ## which) +#define XopDISABLE(xop, which) ((xop)->xop_flags &= ~XOPf_ ## which) #define XopENABLE(xop, which) \ STMT_START { \ (xop)->xop_flags |= XOPf_ ## which; \ @@ -1040,9 +1040,9 @@ C>. ? XopENTRYCUSTOM(o, xop_class) \ : (PL_opargs[(o)->op_type] & OA_CLASS_MASK)) -#define OP_TYPE_IS(o, type) ((o) && (o)->op_type == (type)) -#define OP_TYPE_IS_NN(o, type) ((o)->op_type == (type)) -#define OP_TYPE_ISNT(o, type) ((o) && (o)->op_type != (type)) +#define OP_TYPE_IS(o, type) ((o) && (o)->op_type == (type)) +#define OP_TYPE_IS_NN(o, type) ((o)->op_type == (type)) +#define OP_TYPE_ISNT(o, type) ((o) && (o)->op_type != (type)) #define OP_TYPE_ISNT_NN(o, type) ((o)->op_type != (type)) #define OP_TYPE_IS_OR_WAS_NN(o, type) \ @@ -1069,7 +1069,7 @@ C>. #define OpHAS_SIBLING(o) (cBOOL((o)->op_moresib)) #define OpSIBLING(o) (0 + (o)->op_moresib ? (o)->op_sibparent : NULL) -#define OpMORESIB_set(o, sib) ((o)->op_moresib = 1, (o)->op_sibparent = (sib)) +#define OpMORESIB_set(o, sib) ((o)->op_moresib = 1, (o)->op_sibparent = (sib)) #define OpLASTSIB_set(o, parent) \ ((o)->op_moresib = 0, (o)->op_sibparent = (parent)) #define OpMAYBESIB_set(o, sib, parent) \ @@ -1077,22 +1077,22 @@ C>. #if !defined(PERL_CORE) && !defined(PERL_EXT) /* for backwards compatibility only */ -# define OP_SIBLING(o) OpSIBLING(o) +# define OP_SIBLING(o) OpSIBLING(o) #endif #define newATTRSUB(f, o, p, a, b) Perl_newATTRSUB_x(aTHX_ f, o, p, a, b, FALSE) #define newSUB(f, o, p, b) newATTRSUB((f), (o), (p), NULL, (b)) #ifdef USE_ITHREADS -# define OP_CHECK_MUTEX_INIT MUTEX_INIT(&PL_check_mutex) -# define OP_CHECK_MUTEX_LOCK MUTEX_LOCK(&PL_check_mutex) -# define OP_CHECK_MUTEX_UNLOCK MUTEX_UNLOCK(&PL_check_mutex) -# define OP_CHECK_MUTEX_TERM MUTEX_DESTROY(&PL_check_mutex) +# define OP_CHECK_MUTEX_INIT MUTEX_INIT(&PL_check_mutex) +# define OP_CHECK_MUTEX_LOCK MUTEX_LOCK(&PL_check_mutex) +# define OP_CHECK_MUTEX_UNLOCK MUTEX_UNLOCK(&PL_check_mutex) +# define OP_CHECK_MUTEX_TERM MUTEX_DESTROY(&PL_check_mutex) #else -# define OP_CHECK_MUTEX_INIT NOOP -# define OP_CHECK_MUTEX_LOCK NOOP -# define OP_CHECK_MUTEX_UNLOCK NOOP -# define OP_CHECK_MUTEX_TERM NOOP +# define OP_CHECK_MUTEX_INIT NOOP +# define OP_CHECK_MUTEX_LOCK NOOP +# define OP_CHECK_MUTEX_UNLOCK NOOP +# define OP_CHECK_MUTEX_TERM NOOP #endif @@ -1101,39 +1101,39 @@ C>. /* actions */ /* Load another word of actions/flag bits. Must be 0 */ -#define MDEREF_reload 0 +#define MDEREF_reload 0 -#define MDEREF_AV_pop_rv2av_aelem 1 -#define MDEREF_AV_gvsv_vivify_rv2av_aelem 2 -#define MDEREF_AV_padsv_vivify_rv2av_aelem 3 -#define MDEREF_AV_vivify_rv2av_aelem 4 -#define MDEREF_AV_padav_aelem 5 -#define MDEREF_AV_gvav_aelem 6 +#define MDEREF_AV_pop_rv2av_aelem 1 +#define MDEREF_AV_gvsv_vivify_rv2av_aelem 2 +#define MDEREF_AV_padsv_vivify_rv2av_aelem 3 +#define MDEREF_AV_vivify_rv2av_aelem 4 +#define MDEREF_AV_padav_aelem 5 +#define MDEREF_AV_gvav_aelem 6 -#define MDEREF_HV_pop_rv2hv_helem 8 -#define MDEREF_HV_gvsv_vivify_rv2hv_helem 9 -#define MDEREF_HV_padsv_vivify_rv2hv_helem 10 -#define MDEREF_HV_vivify_rv2hv_helem 11 -#define MDEREF_HV_padhv_helem 12 -#define MDEREF_HV_gvhv_helem 13 +#define MDEREF_HV_pop_rv2hv_helem 8 +#define MDEREF_HV_gvsv_vivify_rv2hv_helem 9 +#define MDEREF_HV_padsv_vivify_rv2hv_helem 10 +#define MDEREF_HV_vivify_rv2hv_helem 11 +#define MDEREF_HV_padhv_helem 12 +#define MDEREF_HV_gvhv_helem 13 -#define MDEREF_ACTION_MASK 0xf +#define MDEREF_ACTION_MASK 0xf /* key / index type */ -#define MDEREF_INDEX_none 0x00 /* run external ops to generate index */ -#define MDEREF_INDEX_const 0x10 /* index is const PV/UV */ -#define MDEREF_INDEX_padsv 0x20 /* index is lexical var */ -#define MDEREF_INDEX_gvsv 0x30 /* index is GV */ +#define MDEREF_INDEX_none 0x00 /* run external ops to generate index */ +#define MDEREF_INDEX_const 0x10 /* index is const PV/UV */ +#define MDEREF_INDEX_padsv 0x20 /* index is lexical var */ +#define MDEREF_INDEX_gvsv 0x30 /* index is GV */ -#define MDEREF_INDEX_MASK 0x30 +#define MDEREF_INDEX_MASK 0x30 /* bit flags */ -#define MDEREF_FLAG_last 0x40 /* the last [ah]elem; PL_op flags apply */ +#define MDEREF_FLAG_last 0x40 /* the last [ah]elem; PL_op flags apply */ -#define MDEREF_MASK 0x7F -#define MDEREF_SHIFT 7 +#define MDEREF_MASK 0x7F +#define MDEREF_SHIFT 7 #if defined(PERL_IN_DOOP_C) || defined(PERL_IN_PP_C) # define FATAL_ABOVE_FF_MSG \ @@ -1141,17 +1141,17 @@ C>. "%s operator is not allowed" #endif #if defined(PERL_IN_OP_C) || defined(PERL_IN_DOOP_C) || defined(PERL_IN_PERL_C) -# define TR_UNMAPPED (UV)-1 -# define TR_DELETE (UV)-2 -# define TR_R_EMPTY (UV)-3 /* rhs (replacement) is empty */ -# define TR_OOB (UV)-4 /* Something that isn't one +# define TR_UNMAPPED (UV)-1 +# define TR_DELETE (UV)-2 +# define TR_R_EMPTY (UV)-3 /* rhs (replacement) is empty */ +# define TR_OOB (UV)-4 /* Something that isn't one of the others */ -# define TR_SPECIAL_HANDLING TR_DELETE /* Can occupy same value */ -# define TR_UNLISTED TR_UNMAPPED /* A synonym whose name is +# define TR_SPECIAL_HANDLING TR_DELETE /* Can occupy same value */ +# define TR_UNLISTED TR_UNMAPPED /* A synonym whose name is clearer at times */ #endif #if defined(PERL_IN_OP_C) || defined(PERL_IN_TOKE_C) -#define RANGE_INDICATOR ILLEGAL_UTF8_BYTE +#define RANGE_INDICATOR ILLEGAL_UTF8_BYTE #endif /* stuff for OP_ARGCHECK */ @@ -1162,7 +1162,7 @@ struct op_argcheck_aux { char slurpy; /* presence of slurpy: may be '\0', '@' or '%' */ }; -#define MI_INIT_WORKAROUND_PACK "Module::Install::DSL" +#define MI_INIT_WORKAROUND_PACK "Module::Install::DSL" /* diff --git a/op_reg_common.h b/op_reg_common.h index 6e0be7148a27..d42be39122b8 100644 --- a/op_reg_common.h +++ b/op_reg_common.h @@ -21,21 +21,21 @@ /* Make sure to update ext/re/re.pm when changing this! */ #ifndef RXf_PMf_STD_PMMOD_SHIFT /* Only expand #include of this file once */ -#define RXf_PMf_STD_PMMOD_SHIFT 0 +#define RXf_PMf_STD_PMMOD_SHIFT 0 /* The bits need to be ordered so that the msixn are contiguous starting * at bit RXf_PMf_STD_PMMOD_SHIFT, followed by the p. See STD_PAT_MODS * and INT_PAT_MODS in regexp.h for the reason contiguity is needed */ /* Make sure to update lib/re.pm when changing these! */ /* Make sure you keep the pure PMf_ versions below in sync */ -#define RXf_PMf_MULTILINE (1U << (RXf_PMf_STD_PMMOD_SHIFT+0)) /* /m */ -#define RXf_PMf_SINGLELINE (1U << (RXf_PMf_STD_PMMOD_SHIFT+1)) /* /s */ -#define RXf_PMf_FOLD (1U << (RXf_PMf_STD_PMMOD_SHIFT+2)) /* /i */ -#define RXf_PMf_EXTENDED (1U << (RXf_PMf_STD_PMMOD_SHIFT+3)) /* /x */ -#define RXf_PMf_EXTENDED_MORE (1U << (RXf_PMf_STD_PMMOD_SHIFT+4)) /* /xx */ -#define RXf_PMf_NOCAPTURE (1U << (RXf_PMf_STD_PMMOD_SHIFT+5)) /* /n */ +#define RXf_PMf_MULTILINE (1U << (RXf_PMf_STD_PMMOD_SHIFT+0)) /* /m */ +#define RXf_PMf_SINGLELINE (1U << (RXf_PMf_STD_PMMOD_SHIFT+1)) /* /s */ +#define RXf_PMf_FOLD (1U << (RXf_PMf_STD_PMMOD_SHIFT+2)) /* /i */ +#define RXf_PMf_EXTENDED (1U << (RXf_PMf_STD_PMMOD_SHIFT+3)) /* /x */ +#define RXf_PMf_EXTENDED_MORE (1U << (RXf_PMf_STD_PMMOD_SHIFT+4)) /* /xx */ +#define RXf_PMf_NOCAPTURE (1U << (RXf_PMf_STD_PMMOD_SHIFT+5)) /* /n */ -#define RXf_PMf_KEEPCOPY (1U << (RXf_PMf_STD_PMMOD_SHIFT+6)) /* /p */ +#define RXf_PMf_KEEPCOPY (1U << (RXf_PMf_STD_PMMOD_SHIFT+6)) /* /p */ /* The character set for the regex is stored in a field of more * than one bit using an enum, for reasons of compactness and @@ -51,8 +51,8 @@ typedef enum { REGEX_ASCII_MORE_RESTRICTED_CHARSET } regex_charset; -#define _RXf_PMf_CHARSET_SHIFT ((RXf_PMf_STD_PMMOD_SHIFT)+7) -#define RXf_PMf_CHARSET (7U << (_RXf_PMf_CHARSET_SHIFT)) /* 3 bits */ +#define _RXf_PMf_CHARSET_SHIFT ((RXf_PMf_STD_PMMOD_SHIFT)+7) +#define RXf_PMf_CHARSET (7U << (_RXf_PMf_CHARSET_SHIFT)) /* 3 bits */ /* Manually decorate these functions here with gcc-style attributes * just to avoid making the regex_charset typedef global, which it @@ -83,7 +83,7 @@ get_regex_charset(const U32 flags) return (regex_charset) ((flags & RXf_PMf_CHARSET) >> _RXf_PMf_CHARSET_SHIFT); } -#define RXf_PMf_STRICT (1U<<(RXf_PMf_STD_PMMOD_SHIFT+10)) +#define RXf_PMf_STRICT (1U<<(RXf_PMf_STD_PMMOD_SHIFT+10)) #define _RXf_PMf_SHIFT_COMPILETIME (RXf_PMf_STD_PMMOD_SHIFT+11) @@ -93,11 +93,11 @@ get_regex_charset(const U32 flags) be used by regex engines to check whether they should set RXf_SKIPWHITE */ -#define RXf_PMf_SPLIT (1U<<(RXf_PMf_STD_PMMOD_SHIFT+11)) +#define RXf_PMf_SPLIT (1U<<(RXf_PMf_STD_PMMOD_SHIFT+11)) /* Next available bit after the above. Name begins * with '_' so won't be exported by B */ -#define _RXf_PMf_SHIFT_NEXT (RXf_PMf_STD_PMMOD_SHIFT+12) +#define _RXf_PMf_SHIFT_NEXT (RXf_PMf_STD_PMMOD_SHIFT+12) /* Mask of the above bits. These need to be transferred from * op_pmflags to re->extflags during compilation */ @@ -130,16 +130,16 @@ get_regex_charset(const U32 flags) /* These copies need to be numerical or ext/B/Makefile.PL * won't think they are constants */ -#define PMf_MULTILINE (1U<<0) -#define PMf_SINGLELINE (1U<<1) -#define PMf_FOLD (1U<<2) -#define PMf_EXTENDED (1U<<3) -#define PMf_EXTENDED_MORE (1U<<4) -#define PMf_NOCAPTURE (1U<<5) -#define PMf_KEEPCOPY (1U<<6) -#define PMf_CHARSET (7U<<7) -#define PMf_STRICT (1U<<10) -#define PMf_SPLIT (1U<<11) +#define PMf_MULTILINE (1U<<0) +#define PMf_SINGLELINE (1U<<1) +#define PMf_FOLD (1U<<2) +#define PMf_EXTENDED (1U<<3) +#define PMf_EXTENDED_MORE (1U<<4) +#define PMf_NOCAPTURE (1U<<5) +#define PMf_KEEPCOPY (1U<<6) +#define PMf_CHARSET (7U<<7) +#define PMf_STRICT (1U<<10) +#define PMf_SPLIT (1U<<11) #if PMf_MULTILINE != RXf_PMf_MULTILINE || \ PMf_SINGLELINE != RXf_PMf_SINGLELINE || \ diff --git a/pad.h b/pad.h index bdb8af81a31b..8c6e9e5edc35 100644 --- a/pad.h +++ b/pad.h @@ -15,7 +15,7 @@ /* offsets within a pad */ typedef SSize_t PADOFFSET; /* signed so that -1 is a valid value */ -#define NOT_IN_PAD ((PADOFFSET) -1) +#define NOT_IN_PAD ((PADOFFSET) -1) /* B.xs expects the first members of these two structs to line up (xpadl_max with xpadnl_fill). @@ -92,7 +92,7 @@ struct padname_with_str { /* a value that PL_cop_seqmax is guaranteed never to be, flagging * that a lexical is being introduced, or has not yet left scope */ -#define PERL_PADSEQ_INTRO U32_MAX +#define PERL_PADSEQ_INTRO U32_MAX #define COP_SEQMAX_INC \ (PL_cop_seqmax++, \ (void)(PL_cop_seqmax == PERL_PADSEQ_INTRO && PL_cop_seqmax++)) @@ -102,21 +102,21 @@ struct padname_with_str { /* Low range end is exclusive (valid from the cop seq after this one) */ /* High range end is inclusive (valid up to this cop seq) */ -#define COP_SEQ_RANGE_LOW(pn) (pn)->xpadn_low -#define COP_SEQ_RANGE_HIGH(pn) (pn)->xpadn_high -#define PARENT_PAD_INDEX(pn) (pn)->xpadn_low -#define PARENT_FAKELEX_FLAGS(pn) (pn)->xpadn_high +#define COP_SEQ_RANGE_LOW(pn) (pn)->xpadn_low +#define COP_SEQ_RANGE_HIGH(pn) (pn)->xpadn_high +#define PARENT_PAD_INDEX(pn) (pn)->xpadn_low +#define PARENT_FAKELEX_FLAGS(pn) (pn)->xpadn_high /* Flags set in the SvIVX field of FAKE namesvs */ -#define PAD_FAKELEX_ANON 1 /* the lex is declared in an ANON, or ... */ -#define PAD_FAKELEX_MULTI 2 /* the lex can be instantiated multiple times */ +#define PAD_FAKELEX_ANON 1 /* the lex is declared in an ANON, or ... */ +#define PAD_FAKELEX_MULTI 2 /* the lex can be instantiated multiple times */ /* flags for the pad_new() function */ -#define padnew_CLONE 1 /* this pad is for a cloned CV */ -#define padnew_SAVE 2 /* save old globals */ -#define padnew_SAVESUB 4 /* also save extra stuff for start of sub */ +#define padnew_CLONE 1 /* this pad is for a cloned CV */ +#define padnew_SAVE 2 /* save old globals */ +#define padnew_SAVESUB 4 /* also save extra stuff for start of sub */ /* values for the pad_tidy() function */ @@ -128,10 +128,10 @@ typedef enum { /* flags for pad_add_name_pvn. */ -#define padadd_OUR 0x01 /* our declaration. */ -#define padadd_STATE 0x02 /* state declaration. */ -#define padadd_NO_DUP_CHECK 0x04 /* skip warning on dups. */ -#define padadd_STALEOK 0x08 /* allow stale lexical in active +#define padadd_OUR 0x01 /* our declaration. */ +#define padadd_STATE 0x02 /* state declaration. */ +#define padadd_NO_DUP_CHECK 0x04 /* skip warning on dups. */ +#define padadd_STALEOK 0x08 /* allow stale lexical in active * sub, but only one level up */ /* ASSERT_CURPAD_LEGAL and ASSERT_CURPAD_ACTIVE respectively @@ -304,20 +304,20 @@ C #define PadlistNAMES(pl) *((PADNAMELIST **)PadlistARRAY(pl)) #define PadlistNAMESARRAY(pl) PadnamelistARRAY(PadlistNAMES(pl)) #define PadlistNAMESMAX(pl) PadnamelistMAX(PadlistNAMES(pl)) -#define PadlistREFCNT(pl) 1 /* reserved for future use */ +#define PadlistREFCNT(pl) 1 /* reserved for future use */ -#define PadnamelistARRAY(pnl) (pnl)->xpadnl_alloc -#define PadnamelistMAX(pnl) (pnl)->xpadnl_fill -#define PadnamelistMAXNAMED(pnl) (pnl)->xpadnl_max_named -#define PadnamelistREFCNT(pnl) (pnl)->xpadnl_refcnt -#define PadnamelistREFCNT_dec(pnl) Perl_padnamelist_free(aTHX_ pnl) +#define PadnamelistARRAY(pnl) (pnl)->xpadnl_alloc +#define PadnamelistMAX(pnl) (pnl)->xpadnl_fill +#define PadnamelistMAXNAMED(pnl) (pnl)->xpadnl_max_named +#define PadnamelistREFCNT(pnl) (pnl)->xpadnl_refcnt +#define PadnamelistREFCNT_dec(pnl) Perl_padnamelist_free(aTHX_ pnl) -#define PadARRAY(pad) AvARRAY(pad) -#define PadMAX(pad) AvFILLp(pad) +#define PadARRAY(pad) AvARRAY(pad) +#define PadMAX(pad) AvFILLp(pad) -#define PadnamePV(pn) (pn)->xpadn_pv -#define PadnameLEN(pn) (pn)->xpadn_len -#define PadnameUTF8(pn) 1 +#define PadnamePV(pn) (pn)->xpadn_pv +#define PadnameLEN(pn) (pn)->xpadn_len +#define PadnameUTF8(pn) 1 #define PadnameSV(pn) \ newSVpvn_flags(PadnamePV(pn), PadnameLEN(pn), SVs_TEMP|SVf_UTF8) #define PadnameFLAGS(pn) (pn)->xpadn_flags @@ -330,7 +330,7 @@ C #define PadnameREFCNT_inc(pn) Perl_padname_refcnt_inc(pn) #define PadnameREFCNT_dec(pn) Perl_padname_free(aTHX_ pn) #define PadnameOURSTASH_set(pn,s) (PadnameOURSTASH(pn) = (s)) -#define PadnameTYPE_set(pn,s) (PadnameTYPE(pn) = (s)) +#define PadnameTYPE_set(pn,s) (PadnameTYPE(pn) = (s)) #define PadnameOUTER(pn) (PadnameFLAGS(pn) & PADNAMEf_OUTER) #define PadnameIsSTATE(pn) (PadnameFLAGS(pn) & PADNAMEf_STATE) #define PadnameLVALUE(pn) (PadnameFLAGS(pn) & PADNAMEf_LVALUE) @@ -346,33 +346,33 @@ C /* backward compatibility */ #ifndef PERL_CORE -# define SvPAD_STATE PadnameIsSTATE -# define SvPAD_TYPED PadnameHasTYPE -# define SvPAD_OUR(pn) cBOOL(PadnameOURSTASH(pn)) -# define SvPAD_STATE_on PadnameIsSTATE_on -# define SvPAD_TYPED_on(pn) (PadnameFLAGS(pn) |= PADNAMEf_TYPED) -# define SvPAD_OUR_on(pn) (PadnameFLAGS(pn) |= PADNAMEf_OUR) -# define SvOURSTASH PadnameOURSTASH -# define SvOURSTASH_set PadnameOURSTASH_set -# define SVpad_STATE PADNAMEf_STATE -# define SVpad_TYPED PADNAMEf_TYPED -# define SVpad_OUR PADNAMEf_OUR -# define PADNAMEt_OUTER PADNAMEf_OUTER -# define PADNAMEt_STATE PADNAMEf_STATE -# define PADNAMEt_LVALUE PADNAMEf_LVALUE -# define PADNAMEt_TYPED PADNAMEf_TYPED -# define PADNAMEt_OUR PADNAMEf_OUR +# define SvPAD_STATE PadnameIsSTATE +# define SvPAD_TYPED PadnameHasTYPE +# define SvPAD_OUR(pn) cBOOL(PadnameOURSTASH(pn)) +# define SvPAD_STATE_on PadnameIsSTATE_on +# define SvPAD_TYPED_on(pn) (PadnameFLAGS(pn) |= PADNAMEf_TYPED) +# define SvPAD_OUR_on(pn) (PadnameFLAGS(pn) |= PADNAMEf_OUR) +# define SvOURSTASH PadnameOURSTASH +# define SvOURSTASH_set PadnameOURSTASH_set +# define SVpad_STATE PADNAMEf_STATE +# define SVpad_TYPED PADNAMEf_TYPED +# define SVpad_OUR PADNAMEf_OUR +# define PADNAMEt_OUTER PADNAMEf_OUTER +# define PADNAMEt_STATE PADNAMEf_STATE +# define PADNAMEt_LVALUE PADNAMEf_LVALUE +# define PADNAMEt_TYPED PADNAMEf_TYPED +# define PADNAMEt_OUR PADNAMEf_OUR #endif #ifdef DEBUGGING -# define PAD_SV(po) pad_sv(po) -# define PAD_SETSV(po,sv) pad_setsv(po,sv) +# define PAD_SV(po) pad_sv(po) +# define PAD_SETSV(po,sv) pad_setsv(po,sv) #else -# define PAD_SV(po) (PL_curpad[po]) -# define PAD_SETSV(po,sv) PL_curpad[po] = (sv) +# define PAD_SV(po) (PL_curpad[po]) +# define PAD_SETSV(po,sv) PL_curpad[po] = (sv) #endif -#define PAD_SVl(po) (PL_curpad[po]) +#define PAD_SVl(po) (PL_curpad[po]) #define PAD_BASE_SV(padlist, po) \ (PadlistARRAY(padlist)[1]) \ @@ -426,8 +426,8 @@ given context block structure (can be used as an lvalue). =cut */ -#define CX_CURPAD_SAVE(block) (block).oldcomppad = PL_comppad -#define CX_CURPAD_SV(block,po) (AvARRAY(MUTABLE_AV(((block).oldcomppad)))[po]) +#define CX_CURPAD_SAVE(block) (block).oldcomppad = PL_comppad +#define CX_CURPAD_SV(block,po) (AvARRAY(MUTABLE_AV(((block).oldcomppad)))[po]) /* @@ -457,15 +457,15 @@ current ling pad (lvalue) to C. =cut */ -#define PAD_COMPNAME(po) PAD_COMPNAME_SV(po) -#define PAD_COMPNAME_SV(po) (PadnamelistARRAY(PL_comppad_name)[(po)]) -#define PAD_COMPNAME_FLAGS(po) PadnameFLAGS(PAD_COMPNAME(po)) +#define PAD_COMPNAME(po) PAD_COMPNAME_SV(po) +#define PAD_COMPNAME_SV(po) (PadnamelistARRAY(PL_comppad_name)[(po)]) +#define PAD_COMPNAME_FLAGS(po) PadnameFLAGS(PAD_COMPNAME(po)) #define PAD_COMPNAME_FLAGS_isOUR(po) PadnameIsOUR(PAD_COMPNAME_SV(po)) -#define PAD_COMPNAME_PV(po) PadnamePV(PAD_COMPNAME(po)) +#define PAD_COMPNAME_PV(po) PadnamePV(PAD_COMPNAME(po)) -#define PAD_COMPNAME_TYPE(po) PadnameTYPE(PAD_COMPNAME(po)) +#define PAD_COMPNAME_TYPE(po) PadnameTYPE(PAD_COMPNAME(po)) -#define PAD_COMPNAME_OURSTASH(po) (PadnameOURSTASH(PAD_COMPNAME_SV(po))) +#define PAD_COMPNAME_OURSTASH(po) (PadnameOURSTASH(PAD_COMPNAME_SV(po))) #define PAD_COMPNAME_GEN(po) \ ((STRLEN)PadnamelistARRAY(PL_comppad_name)[po]->xpadn_gen) diff --git a/parser.h b/parser.h index 35ab203ddb7f..9bb98a33243b 100644 --- a/parser.h +++ b/parser.h @@ -9,7 +9,7 @@ * parser and lexer (perly.c, toke.c). */ -#define YYEMPTY (-2) +#define YYEMPTY (-2) typedef struct { YYSTYPE val; /* semantic value */ @@ -127,22 +127,22 @@ typedef struct yy_parser { } yy_parser; /* flags for lexer API */ -#define LEX_STUFF_UTF8 0x00000001 -#define LEX_KEEP_PREVIOUS 0x00000002 +#define LEX_STUFF_UTF8 0x00000001 +#define LEX_KEEP_PREVIOUS 0x00000002 #ifdef PERL_CORE -# define LEX_START_SAME_FILTER 0x00000001 -# define LEX_IGNORE_UTF8_HINTS 0x00000002 -# define LEX_EVALBYTES 0x00000004 -# define LEX_START_COPIED 0x00000008 -# define LEX_DONT_CLOSE_RSFP 0x00000010 +# define LEX_START_SAME_FILTER 0x00000001 +# define LEX_IGNORE_UTF8_HINTS 0x00000002 +# define LEX_EVALBYTES 0x00000004 +# define LEX_START_COPIED 0x00000008 +# define LEX_DONT_CLOSE_RSFP 0x00000010 # define LEX_START_FLAGS \ (LEX_START_SAME_FILTER|LEX_START_COPIED \ |LEX_IGNORE_UTF8_HINTS|LEX_EVALBYTES|LEX_DONT_CLOSE_RSFP) #endif /* flags for parser API */ -#define PARSE_OPTIONAL 0x00000001 +#define PARSE_OPTIONAL 0x00000001 /* values for lex_fakeeof */ enum { diff --git a/perl.h b/perl.h index 13bd9aaa3fed..b768040f5aef 100644 --- a/perl.h +++ b/perl.h @@ -9,7 +9,7 @@ */ #ifndef H_PERL -#define H_PERL 1 +#define H_PERL 1 #ifdef PERL_FOR_X2P /* @@ -48,8 +48,8 @@ parameter. */ #ifdef DEBUGGING -# define _pDEPTH ,U32 depth -# define _aDEPTH ,depth +# define _pDEPTH ,U32 depth +# define _aDEPTH ,depth #else # define _pDEPTH # define _aDEPTH @@ -63,7 +63,7 @@ parameter. * the C99 features are there and are correct. */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ defined(_STDC_C99) || defined(__c99) -# define HAS_C99 1 +# define HAS_C99 1 #endif /* See L for detailed notes @@ -134,13 +134,13 @@ Otherwise ends a section of code already begun by a C>. #undef END_EXTERN_C #undef EXTERN_C #ifdef __cplusplus -# define EXTERN_C extern "C" -# define START_EXTERN_C EXTERN_C { -# define END_EXTERN_C } +# define EXTERN_C extern "C" +# define START_EXTERN_C EXTERN_C { +# define END_EXTERN_C } #else # define START_EXTERN_C # define END_EXTERN_C -# define EXTERN_C extern +# define EXTERN_C extern #endif /* Fallback definitions in case we don't have definitions from config.h. @@ -149,9 +149,9 @@ Otherwise ends a section of code already begun by a C>. */ #if !defined(PERL_STATIC_INLINE) # ifdef HAS_STATIC_INLINE -# define PERL_STATIC_INLINE static inline +# define PERL_STATIC_INLINE static inline # else -# define PERL_STATIC_INLINE static +# define PERL_STATIC_INLINE static # endif #endif @@ -167,24 +167,24 @@ Now a synonym for C>. */ #ifdef MULTIPLICITY -# define tTHX PerlInterpreter* -# define pTHX tTHX my_perl PERL_UNUSED_DECL -# define aTHX my_perl -# define aTHXa(a) aTHX = (tTHX)a -# define dTHXa(a) pTHX = (tTHX)a -# define dTHX pTHX = PERL_GET_THX -# define pTHX_ pTHX, -# define aTHX_ aTHX, -# define pTHX_1 2 -# define pTHX_2 3 -# define pTHX_3 4 -# define pTHX_4 5 -# define pTHX_5 6 -# define pTHX_6 7 -# define pTHX_7 8 -# define pTHX_8 9 -# define pTHX_9 10 -# define pTHX_12 13 +# define tTHX PerlInterpreter* +# define pTHX tTHX my_perl PERL_UNUSED_DECL +# define aTHX my_perl +# define aTHXa(a) aTHX = (tTHX)a +# define dTHXa(a) pTHX = (tTHX)a +# define dTHX pTHX = PERL_GET_THX +# define pTHX_ pTHX, +# define aTHX_ aTHX, +# define pTHX_1 2 +# define pTHX_2 3 +# define pTHX_3 4 +# define pTHX_4 5 +# define pTHX_5 6 +# define pTHX_6 7 +# define pTHX_7 8 +# define pTHX_8 9 +# define pTHX_9 10 +# define pTHX_12 13 # if defined(DEBUGGING) && !defined(PERL_TRACK_MEMPOOL) # define PERL_TRACK_MEMPOOL # endif @@ -193,12 +193,12 @@ Now a synonym for C>. #endif #ifdef DEBUGGING -# define dTHX_DEBUGGING dTHX +# define dTHX_DEBUGGING dTHX #else -# define dTHX_DEBUGGING dNOOP +# define dTHX_DEBUGGING dNOOP #endif -#define STATIC static +#define STATIC static #ifndef PERL_CORE /* Do not use these macros. They were part of PERL_OBJECT, which was an * @@ -211,20 +211,20 @@ Now a synonym for C>. =cut */ -# define CPERLscope(x) x -# define CPERLarg void +# define CPERLscope(x) x +# define CPERLarg void # define CPERLarg_ # define _CPERLarg # define PERL_OBJECT_THIS # define _PERL_OBJECT_THIS # define PERL_OBJECT_THIS_ -# define CALL_FPTR(fptr) (*fptr) +# define CALL_FPTR(fptr) (*fptr) # define MEMBER_TO_FPTR(name) name #endif /* !PERL_CORE */ -#define CALLRUNOPS PL_runops +#define CALLRUNOPS PL_runops -#define CALLREGCOMP(sv, flags) Perl_pregcomp(aTHX_ (sv),(flags)) +#define CALLREGCOMP(sv, flags) Perl_pregcomp(aTHX_ (sv),(flags)) #define CALLREGCOMP_ENG(prog, sv, flags) (prog)->comp(aTHX_ sv, flags) #define CALLREGEXEC(prog,stringarg,strend,strbeg,minend,sv,data,flags) \ @@ -295,7 +295,7 @@ Now a synonym for C>. /* some compilers impersonate gcc */ #if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) -# define PERL_IS_GCC 1 +# define PERL_IS_GCC 1 #endif #define PERL_GCC_VERSION_GE(major,minor,patch) \ @@ -350,7 +350,7 @@ Now a synonym for C>. # define HASATTRIBUTE_UNUSED # endif # if __GNUC__ == 3 && __GNUC_MINOR__ == 3 && !defined(__cplusplus) -# define HASATTRIBUTE_UNUSED /* gcc-3.3, but not g++-3.3. */ +# define HASATTRIBUTE_UNUSED /* gcc-3.3, but not g++-3.3. */ # endif # if PERL_GCC_VERSION_GE(3,4,0) # define HASATTRIBUTE_WARN_UNUSED_RESULT @@ -366,25 +366,25 @@ Now a synonym for C>. #endif /* #ifndef PERL_MICRO */ #ifdef HASATTRIBUTE_DEPRECATED -# define __attribute__deprecated__ __attribute__((deprecated)) +# define __attribute__deprecated__ __attribute__((deprecated)) #endif #ifdef HASATTRIBUTE_FORMAT -# define __attribute__format__(x,y,z) __attribute__((format(x,y,z))) +# define __attribute__format__(x,y,z) __attribute__((format(x,y,z))) #endif #ifdef HASATTRIBUTE_MALLOC -# define __attribute__malloc__ __attribute__((__malloc__)) +# define __attribute__malloc__ __attribute__((__malloc__)) #endif #ifdef HASATTRIBUTE_NONNULL -# define __attribute__nonnull__(a) __attribute__((nonnull(a))) +# define __attribute__nonnull__(a) __attribute__((nonnull(a))) #endif #ifdef HASATTRIBUTE_NORETURN -# define __attribute__noreturn__ __attribute__((noreturn)) +# define __attribute__noreturn__ __attribute__((noreturn)) #endif #ifdef HASATTRIBUTE_PURE -# define __attribute__pure__ __attribute__((pure)) +# define __attribute__pure__ __attribute__((pure)) #endif #ifdef HASATTRIBUTE_UNUSED -# define __attribute__unused__ __attribute__((unused)) +# define __attribute__unused__ __attribute__((unused)) #endif #ifdef HASATTRIBUTE_WARN_UNUSED_RESULT # define __attribute__warn_unused_result__ __attribute__((warn_unused_result)) @@ -392,7 +392,7 @@ Now a synonym for C>. #ifdef HASATTRIBUTE_ALWAYS_INLINE /* always_inline is buggy in gcc <= 4.6 and causes compilation errors */ # if !defined(PERL_IS_GCC) || PERL_GCC_VERSION_GE(4,7,0) -# define __attribute__always_inline__ __attribute__((always_inline)) +# define __attribute__always_inline__ __attribute__((always_inline)) # endif #endif #if defined(HASATTRIBUTE_VISIBILITY) && !defined(_WIN32) && !defined(__CYGWIN__) @@ -401,7 +401,7 @@ Now a synonym for C>. * the definition of ldflags near the end of hints/cygwin.sh and * the visibility attribute doesn't appear to control that. */ -# define __attribute__visibility__(x) __attribute__((visibility(x))) +# define __attribute__visibility__(x) __attribute__((visibility(x))) #endif /* If we haven't defined the attributes yet, define them to blank. */ @@ -438,7 +438,7 @@ Now a synonym for C>. /* Some OS warn on NULL format to printf */ #ifdef PRINTF_FORMAT_NULL_OK -# define __attribute__format__null_ok__(x,y,z) __attribute__format__(x,y,z) +# define __attribute__format__null_ok__(x,y,z) __attribute__format__(x,y,z) #else # define __attribute__format__null_ok__(x,y,z) #endif @@ -476,7 +476,7 @@ Example usage: */ #ifndef PERL_UNUSED_DECL -# define PERL_UNUSED_DECL __attribute__unused__ +# define PERL_UNUSED_DECL __attribute__unused__ #endif /* gcc -Wall: for silencing unused variables that are actually used most of the @@ -503,14 +503,14 @@ conditional compilation causes it be used just some times. =cut */ #ifndef PERL_UNUSED_ARG -# define PERL_UNUSED_ARG(x) ((void)sizeof(x)) +# define PERL_UNUSED_ARG(x) ((void)sizeof(x)) #endif #ifndef PERL_UNUSED_VAR -# define PERL_UNUSED_VAR(x) ((void)sizeof(x)) +# define PERL_UNUSED_VAR(x) ((void)sizeof(x)) #endif #if defined(USE_ITHREADS) -# define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl) +# define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl) #else # define PERL_UNUSED_CONTEXT #endif @@ -564,7 +564,7 @@ icc), we want exactly the gcc extension __typeof__ and nothing else. # define PERL_UNUSED_RESULT(v) \ STMT_START { __typeof__(v) z = (v); (void)sizeof(z); } STMT_END # else -# define PERL_UNUSED_RESULT(v) ((void)(v)) +# define PERL_UNUSED_RESULT(v) ((void)(v)) # endif #endif @@ -591,49 +591,49 @@ icc), we want exactly the gcc extension __typeof__ and nothing else. */ #if defined(__clang__) || defined(__clang) || PERL_GCC_VERSION_GE(4,6,0) -# define GCC_DIAG_PRAGMA(x) _Pragma (#x) +# define GCC_DIAG_PRAGMA(x) _Pragma (#x) /* clang has "clang diagnostic" pragmas, but also understands gcc. */ # define GCC_DIAG_IGNORE(x) \ _Pragma("GCC diagnostic push") \ GCC_DIAG_PRAGMA(GCC diagnostic ignored #x) -# define GCC_DIAG_RESTORE _Pragma("GCC diagnostic pop") +# define GCC_DIAG_RESTORE _Pragma("GCC diagnostic pop") #else # define GCC_DIAG_IGNORE(w) # define GCC_DIAG_RESTORE #endif -#define GCC_DIAG_IGNORE_DECL(x) GCC_DIAG_IGNORE(x) dNOOP -#define GCC_DIAG_RESTORE_DECL GCC_DIAG_RESTORE dNOOP -#define GCC_DIAG_IGNORE_STMT(x) GCC_DIAG_IGNORE(x) NOOP -#define GCC_DIAG_RESTORE_STMT GCC_DIAG_RESTORE NOOP +#define GCC_DIAG_IGNORE_DECL(x) GCC_DIAG_IGNORE(x) dNOOP +#define GCC_DIAG_RESTORE_DECL GCC_DIAG_RESTORE dNOOP +#define GCC_DIAG_IGNORE_STMT(x) GCC_DIAG_IGNORE(x) NOOP +#define GCC_DIAG_RESTORE_STMT GCC_DIAG_RESTORE NOOP /* for clang specific pragmas */ #if defined(__clang__) || defined(__clang) -# define CLANG_DIAG_PRAGMA(x) _Pragma (#x) +# define CLANG_DIAG_PRAGMA(x) _Pragma (#x) # define CLANG_DIAG_IGNORE(x) \ _Pragma("clang diagnostic push") \ CLANG_DIAG_PRAGMA(clang diagnostic ignored #x) -# define CLANG_DIAG_RESTORE _Pragma("clang diagnostic pop") +# define CLANG_DIAG_RESTORE _Pragma("clang diagnostic pop") #else # define CLANG_DIAG_IGNORE(w) # define CLANG_DIAG_RESTORE #endif -#define CLANG_DIAG_IGNORE_DECL(x) CLANG_DIAG_IGNORE(x) dNOOP -#define CLANG_DIAG_RESTORE_DECL CLANG_DIAG_RESTORE dNOOP -#define CLANG_DIAG_IGNORE_STMT(x) CLANG_DIAG_IGNORE(x) NOOP -#define CLANG_DIAG_RESTORE_STMT CLANG_DIAG_RESTORE NOOP +#define CLANG_DIAG_IGNORE_DECL(x) CLANG_DIAG_IGNORE(x) dNOOP +#define CLANG_DIAG_RESTORE_DECL CLANG_DIAG_RESTORE dNOOP +#define CLANG_DIAG_IGNORE_STMT(x) CLANG_DIAG_IGNORE(x) NOOP +#define CLANG_DIAG_RESTORE_STMT CLANG_DIAG_RESTORE NOOP #if defined(_MSC_VER) # define MSVC_DIAG_IGNORE(x) \ __pragma(warning(push)) \ __pragma(warning(disable : x)) -# define MSVC_DIAG_RESTORE __pragma(warning(pop)) +# define MSVC_DIAG_RESTORE __pragma(warning(pop)) #else # define MSVC_DIAG_IGNORE(x) # define MSVC_DIAG_RESTORE #endif -#define MSVC_DIAG_IGNORE_DECL(x) MSVC_DIAG_IGNORE(x) dNOOP -#define MSVC_DIAG_RESTORE_DECL MSVC_DIAG_RESTORE dNOOP -#define MSVC_DIAG_IGNORE_STMT(x) MSVC_DIAG_IGNORE(x) NOOP -#define MSVC_DIAG_RESTORE_STMT MSVC_DIAG_RESTORE NOOP +#define MSVC_DIAG_IGNORE_DECL(x) MSVC_DIAG_IGNORE(x) dNOOP +#define MSVC_DIAG_RESTORE_DECL MSVC_DIAG_RESTORE dNOOP +#define MSVC_DIAG_IGNORE_STMT(x) MSVC_DIAG_IGNORE(x) NOOP +#define MSVC_DIAG_RESTORE_STMT MSVC_DIAG_RESTORE NOOP /* =for apidoc Amn;||NOOP @@ -647,30 +647,30 @@ compilers that require declarations before any code. =cut */ -#define NOOP /*EMPTY */(void)0 -#define dNOOP struct Perl___notused_struct +#define NOOP /*EMPTY */(void)0 +#define dNOOP struct Perl___notused_struct #ifndef pTHX /* Don't bother defining tTHX; using it outside * code guarded by MULTIPLICITY is an error. */ -# define pTHX void +# define pTHX void # define pTHX_ # define aTHX # define aTHX_ -# define aTHXa(a) NOOP -# define dTHXa(a) dNOOP -# define dTHX dNOOP -# define pTHX_1 1 -# define pTHX_2 2 -# define pTHX_3 3 -# define pTHX_4 4 -# define pTHX_5 5 -# define pTHX_6 6 -# define pTHX_7 7 -# define pTHX_8 8 -# define pTHX_9 9 -# define pTHX_12 12 +# define aTHXa(a) NOOP +# define dTHXa(a) dNOOP +# define dTHX dNOOP +# define pTHX_1 1 +# define pTHX_2 2 +# define pTHX_3 3 +# define pTHX_4 4 +# define pTHX_5 5 +# define pTHX_6 6 +# define pTHX_7 7 +# define pTHX_8 8 +# define pTHX_9 9 +# define pTHX_12 12 #endif /* @@ -688,36 +688,36 @@ Now a placeholder that declares nothing #ifndef PERL_CORE /* Backwards compatibility macro for XS code. It used to be part of the * PERL_GLOBAL_STRUCT(_PRIVATE) feature, which no longer exists */ -# define dVAR dNOOP +# define dVAR dNOOP /* these are only defined for compatibility; * should not be used internally. */ -# define dMY_CXT_SV dNOOP +# define dMY_CXT_SV dNOOP # ifndef pTHXo -# define pTHXo pTHX -# define pTHXo_ pTHX_ -# define aTHXo aTHX -# define aTHXo_ aTHX_ -# define dTHXo dTHX -# define dTHXoa(x) dTHXa(x) +# define pTHXo pTHX +# define pTHXo_ pTHX_ +# define aTHXo aTHX +# define aTHXo_ aTHX_ +# define dTHXo dTHX +# define dTHXoa(x) dTHXa(x) # endif #endif #ifndef pTHXx -# define pTHXx PerlInterpreter *my_perl -# define pTHXx_ pTHXx, -# define aTHXx my_perl -# define aTHXx_ aTHXx, -# define dTHXx dTHX +# define pTHXx PerlInterpreter *my_perl +# define pTHXx_ pTHXx, +# define aTHXx my_perl +# define aTHXx_ aTHXx, +# define dTHXx dTHX #endif /* Under PERL_IMPLICIT_SYS (used in Windows for fork emulation) * PerlIO_foo() expands to PL_StdIO->pFOO(PL_StdIO, ...). * dTHXs is therefore needed for all functions using PerlIO_foo(). */ #ifdef PERL_IMPLICIT_SYS -# define dTHXs dTHX +# define dTHXs dTHX #else -# define dTHXs dNOOP +# define dTHXs dNOOP #endif #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus) @@ -745,7 +745,7 @@ any of various types, depending on context, you can handle that situation in some situations by adding the type of the return as an extra accompanying parameter: - #define foo(param, type) STMT_START { + #define foo(param, type) STMT_START { type * param; *param = do_calc; ... } STMT_END @@ -800,12 +800,12 @@ Example usage: Trying to select a version that gives no warnings... */ #if !(defined(STMT_START) && defined(STMT_END)) -# define STMT_START do -# define STMT_END while (0) +# define STMT_START do +# define STMT_END while (0) #endif #ifndef BYTEORDER /* Should never happen -- byteorder is in config.h */ -# define BYTEORDER 0x1234 +# define BYTEORDER 0x1234 #endif /* @@ -833,14 +833,14 @@ this symbol would not be defined on C> platforms. /* define this once if either system, instead of cluttering up the src */ #if defined(WIN32) -#define DOSISH 1 +#define DOSISH 1 #endif /* These exist only for back-compat with XS modules. */ #ifndef PERL_CORE -#define VOL volatile +#define VOL volatile #define CAN_PROTOTYPE -#define _(args) args +#define _(args) args #define I_LIMITS #define I_STDARG #define STANDARD_C @@ -861,7 +861,7 @@ this symbol would not be defined on C> platforms. * nonexistent warranty! */ #if defined(SILENT_NO_TAINT_SUPPORT) && !defined(NO_TAINT_SUPPORT) -# define NO_TAINT_SUPPORT 1 +# define NO_TAINT_SUPPORT 1 #endif /* NO_TAINT_SUPPORT can be set to transform virtually all taint-related @@ -869,17 +869,17 @@ this symbol would not be defined on C> platforms. * what you're doing: tests and CPAN modules' tests are bound to fail. */ #ifdef NO_TAINT_SUPPORT -# define TAINT NOOP -# define TAINT_NOT NOOP -# define TAINT_IF(c) NOOP -# define TAINT_ENV() NOOP -# define TAINT_PROPER(s) NOOP -# define TAINT_set(s) NOOP -# define TAINT_get 0 -# define TAINTING_get 0 -# define TAINTING_set(s) NOOP -# define TAINT_WARN_get 0 -# define TAINT_WARN_set(s) NOOP +# define TAINT NOOP +# define TAINT_NOT NOOP +# define TAINT_IF(c) NOOP +# define TAINT_ENV() NOOP +# define TAINT_PROPER(s) NOOP +# define TAINT_set(s) NOOP +# define TAINT_get 0 +# define TAINTING_get 0 +# define TAINTING_set(s) NOOP +# define TAINT_WARN_get 0 +# define TAINT_WARN_set(s) NOOP #else /* @@ -944,32 +944,32 @@ that tainting violations are fatal. =cut */ /* Set to tainted if we are running under tainting mode */ -# define TAINT (PL_tainted = PL_tainting) +# define TAINT (PL_tainted = PL_tainting) -# define TAINT_NOT (PL_tainted = FALSE) /* Untaint */ -# define TAINT_IF(c) if (UNLIKELY(c)) { TAINT; } /* Conditionally taint */ -# define TAINT_ENV() if (UNLIKELY(PL_tainting)) { taint_env(); } +# define TAINT_NOT (PL_tainted = FALSE) /* Untaint */ +# define TAINT_IF(c) if (UNLIKELY(c)) { TAINT; } /* Conditionally taint */ +# define TAINT_ENV() if (UNLIKELY(PL_tainting)) { taint_env(); } /* croak or warn if tainting */ # define TAINT_PROPER(s) \ if (UNLIKELY(PL_tainting)) { \ taint_proper(NULL, s); \ } -# define TAINT_set(s) (PL_tainted = cBOOL(s)) -# define TAINT_get (cBOOL(UNLIKELY(PL_tainted))) /* Is something +# define TAINT_set(s) (PL_tainted = cBOOL(s)) +# define TAINT_get (cBOOL(UNLIKELY(PL_tainted))) /* Is something tainted? */ -# define TAINTING_get (cBOOL(UNLIKELY(PL_tainting))) -# define TAINTING_set(s) (PL_tainting = cBOOL(s)) -# define TAINT_WARN_get (PL_taint_warn) -# define TAINT_WARN_set(s) (PL_taint_warn = cBOOL(s)) +# define TAINTING_get (cBOOL(UNLIKELY(PL_tainting))) +# define TAINTING_set(s) (PL_tainting = cBOOL(s)) +# define TAINT_WARN_get (PL_taint_warn) +# define TAINT_WARN_set(s) (PL_taint_warn = cBOOL(s)) #endif /* flags used internally only within pp_subst and pp_substcont */ #ifdef PERL_CORE -# define SUBST_TAINT_STR 1 /* string tainted */ -# define SUBST_TAINT_PAT 2 /* pattern tainted */ -# define SUBST_TAINT_REPL 4 /* replacement tainted */ -# define SUBST_TAINT_RETAINT 8 /* use re'taint' in scope */ -# define SUBST_TAINT_BOOLRET 16 /* return is boolean (don't taint) */ +# define SUBST_TAINT_STR 1 /* string tainted */ +# define SUBST_TAINT_PAT 2 /* pattern tainted */ +# define SUBST_TAINT_REPL 4 /* replacement tainted */ +# define SUBST_TAINT_RETAINT 8 /* use re'taint' in scope */ +# define SUBST_TAINT_BOOLRET 16 /* return is boolean (don't taint) */ #endif /* XXX All process group stuff is handled in pp_sys.c. Should these defines @@ -980,28 +980,28 @@ that tainting violations are fatal. so we'll try to preserve that, if possible. */ #ifdef HAS_SETPGID -# define BSD_SETPGRP(pid, pgrp) setpgid((pid), (pgrp)) +# define BSD_SETPGRP(pid, pgrp) setpgid((pid), (pgrp)) #elif defined(HAS_SETPGRP) && defined(USE_BSD_SETPGRP) -# define BSD_SETPGRP(pid, pgrp) setpgrp((pid), (pgrp)) +# define BSD_SETPGRP(pid, pgrp) setpgrp((pid), (pgrp)) #elif defined(HAS_SETPGRP2) -# define BSD_SETPGRP(pid, pgrp) setpgrp2((pid), (pgrp)) +# define BSD_SETPGRP(pid, pgrp) setpgrp2((pid), (pgrp)) #endif #if defined(BSD_SETPGRP) && !defined(HAS_SETPGRP) -# define HAS_SETPGRP /* Well, effectively it does . . . */ +# define HAS_SETPGRP /* Well, effectively it does . . . */ #endif /* getpgid isn't POSIX, but at least Solaris and Linux have it, and it makes our life easier :-) so we'll try it. */ #ifdef HAS_GETPGID -# define BSD_GETPGRP(pid) getpgid((pid)) +# define BSD_GETPGRP(pid) getpgid((pid)) #elif defined(HAS_GETPGRP) && defined(USE_BSD_GETPGRP) -# define BSD_GETPGRP(pid) getpgrp((pid)) +# define BSD_GETPGRP(pid) getpgrp((pid)) #elif defined(HAS_GETPGRP2) -# define BSD_GETPGRP(pid) getpgrp2((pid)) +# define BSD_GETPGRP(pid) getpgrp2((pid)) #endif #if defined(BSD_GETPGRP) && !defined(HAS_GETPGRP) -# define HAS_GETPGRP /* Well, effectively it does . . . */ +# define HAS_GETPGRP /* Well, effectively it does . . . */ #endif /* These are not exact synonyms, since setpgrp() and getpgrp() may @@ -1137,85 +1137,85 @@ that tainting violations are fatal. /* Now create LC_foo_INDEX_ #defines for just those categories on this system */ # ifdef USE_LOCALE_CTYPE -# define LC_CTYPE_INDEX_ 0 -# define PERL_DUMMY_CTYPE_ LC_CTYPE_INDEX_ +# define LC_CTYPE_INDEX_ 0 +# define PERL_DUMMY_CTYPE_ LC_CTYPE_INDEX_ # else -# define PERL_DUMMY_CTYPE_ -1 +# define PERL_DUMMY_CTYPE_ -1 # endif # ifdef USE_LOCALE_NUMERIC -# define LC_NUMERIC_INDEX_ PERL_DUMMY_CTYPE_ + 1 -# define PERL_DUMMY_NUMERIC_ LC_NUMERIC_INDEX_ +# define LC_NUMERIC_INDEX_ PERL_DUMMY_CTYPE_ + 1 +# define PERL_DUMMY_NUMERIC_ LC_NUMERIC_INDEX_ # else -# define PERL_DUMMY_NUMERIC_ PERL_DUMMY_CTYPE_ +# define PERL_DUMMY_NUMERIC_ PERL_DUMMY_CTYPE_ # endif # ifdef USE_LOCALE_COLLATE -# define LC_COLLATE_INDEX_ PERL_DUMMY_NUMERIC_ + 1 -# define PERL_DUMMY_COLLATE_ LC_COLLATE_INDEX_ +# define LC_COLLATE_INDEX_ PERL_DUMMY_NUMERIC_ + 1 +# define PERL_DUMMY_COLLATE_ LC_COLLATE_INDEX_ # else -# define PERL_DUMMY_COLLATE_ PERL_DUMMY_NUMERIC_ +# define PERL_DUMMY_COLLATE_ PERL_DUMMY_NUMERIC_ # endif # ifdef USE_LOCALE_TIME -# define LC_TIME_INDEX_ PERL_DUMMY_COLLATE_ + 1 -# define PERL_DUMMY_TIME_ LC_TIME_INDEX_ +# define LC_TIME_INDEX_ PERL_DUMMY_COLLATE_ + 1 +# define PERL_DUMMY_TIME_ LC_TIME_INDEX_ # else -# define PERL_DUMMY_TIME_ PERL_DUMMY_COLLATE_ +# define PERL_DUMMY_TIME_ PERL_DUMMY_COLLATE_ # endif # ifdef USE_LOCALE_MESSAGES -# define LC_MESSAGES_INDEX_ PERL_DUMMY_TIME_ + 1 -# define PERL_DUMMY_MESSAGES_ LC_MESSAGES_INDEX_ +# define LC_MESSAGES_INDEX_ PERL_DUMMY_TIME_ + 1 +# define PERL_DUMMY_MESSAGES_ LC_MESSAGES_INDEX_ # else -# define PERL_DUMMY_MESSAGES_ PERL_DUMMY_TIME_ +# define PERL_DUMMY_MESSAGES_ PERL_DUMMY_TIME_ # endif # ifdef USE_LOCALE_MONETARY -# define LC_MONETARY_INDEX_ PERL_DUMMY_MESSAGES_ + 1 -# define PERL_DUMMY_MONETARY_ LC_MONETARY_INDEX_ +# define LC_MONETARY_INDEX_ PERL_DUMMY_MESSAGES_ + 1 +# define PERL_DUMMY_MONETARY_ LC_MONETARY_INDEX_ # else -# define PERL_DUMMY_MONETARY_ PERL_DUMMY_MESSAGES_ +# define PERL_DUMMY_MONETARY_ PERL_DUMMY_MESSAGES_ # endif # ifdef USE_LOCALE_ADDRESS -# define LC_ADDRESS_INDEX_ PERL_DUMMY_MONETARY_ + 1 -# define PERL_DUMMY_ADDRESS_ LC_ADDRESS_INDEX_ +# define LC_ADDRESS_INDEX_ PERL_DUMMY_MONETARY_ + 1 +# define PERL_DUMMY_ADDRESS_ LC_ADDRESS_INDEX_ # else -# define PERL_DUMMY_ADDRESS_ PERL_DUMMY_MONETARY_ +# define PERL_DUMMY_ADDRESS_ PERL_DUMMY_MONETARY_ # endif # ifdef USE_LOCALE_IDENTIFICATION -# define LC_IDENTIFICATION_INDEX_ PERL_DUMMY_ADDRESS_ + 1 -# define PERL_DUMMY_IDENTIFICATION_ LC_IDENTIFICATION_INDEX_ +# define LC_IDENTIFICATION_INDEX_ PERL_DUMMY_ADDRESS_ + 1 +# define PERL_DUMMY_IDENTIFICATION_ LC_IDENTIFICATION_INDEX_ # else -# define PERL_DUMMY_IDENTIFICATION_ PERL_DUMMY_ADDRESS_ +# define PERL_DUMMY_IDENTIFICATION_ PERL_DUMMY_ADDRESS_ # endif # ifdef USE_LOCALE_MEASUREMENT -# define LC_MEASUREMENT_INDEX_ PERL_DUMMY_IDENTIFICATION_ + 1 -# define PERL_DUMMY_MEASUREMENT_ LC_MEASUREMENT_INDEX_ +# define LC_MEASUREMENT_INDEX_ PERL_DUMMY_IDENTIFICATION_ + 1 +# define PERL_DUMMY_MEASUREMENT_ LC_MEASUREMENT_INDEX_ # else -# define PERL_DUMMY_MEASUREMENT_ PERL_DUMMY_IDENTIFICATION_ +# define PERL_DUMMY_MEASUREMENT_ PERL_DUMMY_IDENTIFICATION_ # endif # ifdef USE_LOCALE_PAPER -# define LC_PAPER_INDEX_ PERL_DUMMY_MEASUREMENT_ + 1 -# define PERL_DUMMY_PAPER_ LC_PAPER_INDEX_ +# define LC_PAPER_INDEX_ PERL_DUMMY_MEASUREMENT_ + 1 +# define PERL_DUMMY_PAPER_ LC_PAPER_INDEX_ # else -# define PERL_DUMMY_PAPER_ PERL_DUMMY_MEASUREMENT_ +# define PERL_DUMMY_PAPER_ PERL_DUMMY_MEASUREMENT_ # endif # ifdef USE_LOCALE_TELEPHONE -# define LC_TELEPHONE_INDEX_ PERL_DUMMY_PAPER_ + 1 -# define PERL_DUMMY_TELEPHONE_ LC_TELEPHONE_INDEX_ +# define LC_TELEPHONE_INDEX_ PERL_DUMMY_PAPER_ + 1 +# define PERL_DUMMY_TELEPHONE_ LC_TELEPHONE_INDEX_ # else -# define PERL_DUMMY_TELEPHONE_ PERL_DUMMY_PAPER_ +# define PERL_DUMMY_TELEPHONE_ PERL_DUMMY_PAPER_ # endif # ifdef USE_LOCALE_SYNTAX -# define LC_SYNTAX_INDEX_ PERL_DUMMY_TELEPHONE_ + 1 -# define PERL_DUMMY_SYNTAX_ LC_SYNTAX_INDEX_ +# define LC_SYNTAX_INDEX_ PERL_DUMMY_TELEPHONE_ + 1 +# define PERL_DUMMY_SYNTAX_ LC_SYNTAX_INDEX_ # else -# define PERL_DUMMY_SYNTAX_ PERL_DUMMY_TELEPHONE_ +# define PERL_DUMMY_SYNTAX_ PERL_DUMMY_TELEPHONE_ # endif # ifdef USE_LOCALE_TOD -# define LC_TOD_INDEX_ PERL_DUMMY_SYNTAX_ + 1 -# define PERL_DUMMY_TOD_ LC_TOD_INDEX_ +# define LC_TOD_INDEX_ PERL_DUMMY_SYNTAX_ + 1 +# define PERL_DUMMY_TOD_ LC_TOD_INDEX_ # else -# define PERL_DUMMY_TOD_ PERL_DUMMY_SYNTAX_ +# define PERL_DUMMY_TOD_ PERL_DUMMY_SYNTAX_ # endif # ifdef LC_ALL -# define LC_ALL_INDEX_ PERL_DUMMY_TOD_ + 1 +# define LC_ALL_INDEX_ PERL_DUMMY_TOD_ + 1 # endif @@ -1358,7 +1358,7 @@ typedef enum { /* Is the locale UTF8? */ * etc. so replace with custom version based on abc-shell code. */ extern char **myenviron; # undef environ -# define environ myenviron +# define environ myenviron # endif #endif @@ -1406,17 +1406,17 @@ C> to get the largest type available on the platform. */ #ifndef UINT16_C # if INTSIZE >= 2 -# define UINT16_C(x) ((U16_TYPE)x##U) +# define UINT16_C(x) ((U16_TYPE)x##U) # else -# define UINT16_C(x) ((U16_TYPE)x##UL) +# define UINT16_C(x) ((U16_TYPE)x##UL) # endif #endif #ifndef UINT32_C # if INTSIZE >= 4 -# define UINT32_C(x) ((U32_TYPE)x##U) +# define UINT32_C(x) ((U32_TYPE)x##U) # else -# define UINT32_C(x) ((U32_TYPE)x##UL) +# define UINT32_C(x) ((U32_TYPE)x##UL) # endif #endif @@ -1436,24 +1436,24 @@ C> to get the largest type available on the platform. /* Prefer the native integer types (int and long) over long * long (which is not C89) and Win32-specific __int64. */ # if QUADKIND == QUAD_IS_INT && INTSIZE == 8 -# define PeRl_INT64_C(c) (c) -# define PeRl_UINT64_C(c) CAT2(c,U) +# define PeRl_INT64_C(c) (c) +# define PeRl_UINT64_C(c) CAT2(c,U) # endif # if QUADKIND == QUAD_IS_LONG && LONGSIZE == 8 -# define PeRl_INT64_C(c) CAT2(c,L) -# define PeRl_UINT64_C(c) CAT2(c,UL) +# define PeRl_INT64_C(c) CAT2(c,L) +# define PeRl_UINT64_C(c) CAT2(c,UL) # endif # if QUADKIND == QUAD_IS_LONG_LONG && defined(HAS_LONG_LONG) -# define PeRl_INT64_C(c) CAT2(c,LL) -# define PeRl_UINT64_C(c) CAT2(c,ULL) +# define PeRl_INT64_C(c) CAT2(c,LL) +# define PeRl_UINT64_C(c) CAT2(c,ULL) # endif # if QUADKIND == QUAD_IS___INT64 -# define PeRl_INT64_C(c) CAT2(c,I64) -# define PeRl_UINT64_C(c) CAT2(c,UI64) +# define PeRl_INT64_C(c) CAT2(c,I64) +# define PeRl_UINT64_C(c) CAT2(c,UI64) # endif # ifndef PeRl_INT64_C -# define PeRl_INT64_C(c) ((I64)(c)) /* last resort */ -# define PeRl_UINT64_C(c) ((U64TYPE)(c)) +# define PeRl_INT64_C(c) ((I64)(c)) /* last resort */ +# define PeRl_UINT64_C(c) ((U64TYPE)(c)) # endif /* In OS X the INT64_C/UINT64_C are defined with LL/ULL, which will not * fly with C89-pedantic gcc, so let's undefine them first so that we @@ -1463,10 +1463,10 @@ C> to get the largest type available on the platform. # undef UINT64_C # endif # ifndef INT64_C -# define INT64_C(c) PeRl_INT64_C(c) +# define INT64_C(c) PeRl_INT64_C(c) # endif # ifndef UINT64_C -# define UINT64_C(c) PeRl_UINT64_C(c) +# define UINT64_C(c) PeRl_UINT64_C(c) # endif /* @@ -1501,10 +1501,10 @@ Use L to declare variables of the maximum usable size on this platform. typedef U64TYPE PERL_UINTMAX_T; # endif # ifndef INTMAX_C -# define INTMAX_C(c) INT64_C(c) +# define INTMAX_C(c) INT64_C(c) # endif # ifndef UINTMAX_C -# define UINTMAX_C(c) UINT64_C(c) +# define UINTMAX_C(c) UINT64_C(c) # endif #else /* below QUADKIND is undefined */ @@ -1515,10 +1515,10 @@ Use L to declare variables of the maximum usable size on this platform. typedef U32TYPE PERL_UINTMAX_T; # endif # ifndef INTMAX_C -# define INTMAX_C(c) INT32_C(c) +# define INTMAX_C(c) INT32_C(c) # endif # ifndef UINTMAX_C -# define UINTMAX_C(c) UINT32_C(c) +# define UINTMAX_C(c) UINT32_C(c) # endif #endif /* no QUADKIND */ @@ -1553,7 +1553,7 @@ Use L to declare variables of the maximum usable size on this platform. /* Maximum level of recursion */ #ifndef PERL_SUB_DEPTH_WARN -#define PERL_SUB_DEPTH_WARN 100 +#define PERL_SUB_DEPTH_WARN 100 #endif #endif /* PERL_CORE */ @@ -1562,21 +1562,21 @@ Use L to declare variables of the maximum usable size on this platform. * OP_MULTICONCAT op. It determines the size of local arrays * in S_maybe_multiconcat() and pp_multiconcat(). */ -#define PERL_MULTICONCAT_MAXARG 64 +#define PERL_MULTICONCAT_MAXARG 64 /* The indexes of fields of a multiconcat aux struct. The fixed * fields are followed by nargs+1 const segment lengths, and if * utf8 and non-utf8 differ, a second nargs+1 set for utf8. */ -#define PERL_MULTICONCAT_IX_NARGS 0 /* number of arguments */ -#define PERL_MULTICONCAT_IX_PLAIN_PV 1 /* non-utf8 constant string */ -#define PERL_MULTICONCAT_IX_PLAIN_LEN 2 /* non-utf8 constant string length */ -#define PERL_MULTICONCAT_IX_UTF8_PV 3 /* utf8 constant string */ -#define PERL_MULTICONCAT_IX_UTF8_LEN 4 /* utf8 constant string length */ -#define PERL_MULTICONCAT_IX_LENGTHS 5 /* first of nargs+1 const +#define PERL_MULTICONCAT_IX_NARGS 0 /* number of arguments */ +#define PERL_MULTICONCAT_IX_PLAIN_PV 1 /* non-utf8 constant string */ +#define PERL_MULTICONCAT_IX_PLAIN_LEN 2 /* non-utf8 constant string length */ +#define PERL_MULTICONCAT_IX_UTF8_PV 3 /* utf8 constant string */ +#define PERL_MULTICONCAT_IX_UTF8_LEN 4 /* utf8 constant string length */ +#define PERL_MULTICONCAT_IX_LENGTHS 5 /* first of nargs+1 const segment lens */ -#define PERL_MULTICONCAT_HEADER_SIZE 5 /* The number of fields of a +#define PERL_MULTICONCAT_HEADER_SIZE 5 /* The number of fields of a multiconcat header */ /* We no longer default to creating a new SV @@ -1595,13 +1595,13 @@ Use L to declare variables of the maximum usable size on this platform. #define PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION #endif -#define MEM_SIZE Size_t +#define MEM_SIZE Size_t /* Round all values passed to malloc up, by default to a multiple of sizeof(size_t) */ #ifndef PERL_STRLEN_ROUNDUP_QUANTUM -#define PERL_STRLEN_ROUNDUP_QUANTUM Size_t_size +#define PERL_STRLEN_ROUNDUP_QUANTUM Size_t_size #endif /* sv_grow() will expand strings by at least a certain percentage @@ -1609,17 +1609,17 @@ Use L to declare variables of the maximum usable size on this platform. realloc(). The default is 25% of the current length. */ #ifndef PERL_STRLEN_EXPAND_SHIFT -# define PERL_STRLEN_EXPAND_SHIFT 2 +# define PERL_STRLEN_EXPAND_SHIFT 2 #endif /* This use of offsetof() requires /Zc:offsetof- for VS2017 (and * presumably onwards) when building Socket.xs, but we can just * use a different definition for STRUCT_OFFSET instead. */ #if defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1910 -# define STRUCT_OFFSET(s,m) (Size_t)(&(((s *)0)->m)) +# define STRUCT_OFFSET(s,m) (Size_t)(&(((s *)0)->m)) #else # include -# define STRUCT_OFFSET(s,m) offsetof(s,m) +# define STRUCT_OFFSET(s,m) offsetof(s,m) #endif /* ptrdiff_t is C11, so undef it under pedantic builds. (Actually it is in @@ -1630,9 +1630,9 @@ Use L to declare variables of the maximum usable size on this platform. #endif #ifdef HAS_PTRDIFF_T -# define Ptrdiff_t ptrdiff_t +# define Ptrdiff_t ptrdiff_t #else -# define Ptrdiff_t SSize_t +# define Ptrdiff_t SSize_t #endif # include @@ -1643,19 +1643,19 @@ Use L to declare variables of the maximum usable size on this platform. #ifdef MYMALLOC # ifdef PERL_POLLUTE_MALLOC # ifndef PERL_EXTMALLOC_DEF -# define Perl_malloc malloc -# define Perl_calloc calloc -# define Perl_realloc realloc -# define Perl_mfree free +# define Perl_malloc malloc +# define Perl_calloc calloc +# define Perl_realloc realloc +# define Perl_mfree free # endif # else -# define EMBEDMYMALLOC /* for compatibility */ +# define EMBEDMYMALLOC /* for compatibility */ # endif -# define safemalloc Perl_malloc -# define safecalloc Perl_calloc -# define saferealloc Perl_realloc -# define safefree Perl_mfree +# define safemalloc Perl_malloc +# define safecalloc Perl_calloc +# define saferealloc Perl_realloc +# define safefree Perl_mfree # define CHECK_MALLOC_TOO_LATE_FOR_(code) \ STMT_START { \ if (!TAINTING_get && MallocCfg_ptr[MallocCfg_cfg_env_read]) \ @@ -1663,7 +1663,7 @@ Use L to declare variables of the maximum usable size on this platform. } STMT_END # define CHECK_MALLOC_TOO_LATE_FOR(ch) \ CHECK_MALLOC_TOO_LATE_FOR_(MALLOC_TOO_LATE_FOR(ch)) -# define panic_write2(s) write(2, s, strlen(s)) +# define panic_write2(s) write(2, s, strlen(s)) # define CHECK_MALLOC_TAINT(newval) \ CHECK_MALLOC_TOO_LATE_FOR_( \ if (newval) { \ @@ -1676,20 +1676,20 @@ Use L to declare variables of the maximum usable size on this platform. } \ } STMT_END; #else /* MYMALLOC */ -# define safemalloc safesysmalloc -# define safecalloc safesyscalloc -# define saferealloc safesysrealloc -# define safefree safesysfree -# define CHECK_MALLOC_TOO_LATE_FOR(ch) ((void)0) -# define CHECK_MALLOC_TAINT(newval) ((void)0) +# define safemalloc safesysmalloc +# define safecalloc safesyscalloc +# define saferealloc safesysrealloc +# define safefree safesysfree +# define CHECK_MALLOC_TOO_LATE_FOR(ch) ((void)0) +# define CHECK_MALLOC_TAINT(newval) ((void)0) # define MALLOC_CHECK_TAINT(argc,argv,env) #endif /* MYMALLOC */ /* diag_listed_as: "-T" is on the #! line, it must also be used on the command line */ -#define TOO_LATE_FOR_(ch,what) Perl_croak(aTHX_ "\"-%c\" is on the #! line, it must also be used on the command line%s", (char)(ch), what) -#define TOO_LATE_FOR(ch) TOO_LATE_FOR_(ch, "") -#define MALLOC_TOO_LATE_FOR(ch) TOO_LATE_FOR_(ch, " with $ENV{PERL_MALLOC_OPT}") -#define MALLOC_CHECK_TAINT2(argc,argv) MALLOC_CHECK_TAINT(argc,argv,NULL) +#define TOO_LATE_FOR_(ch,what) Perl_croak(aTHX_ "\"-%c\" is on the #! line, it must also be used on the command line%s", (char)(ch), what) +#define TOO_LATE_FOR(ch) TOO_LATE_FOR_(ch, "") +#define MALLOC_TOO_LATE_FOR(ch) TOO_LATE_FOR_(ch, " with $ENV{PERL_MALLOC_OPT}") +#define MALLOC_CHECK_TAINT2(argc,argv) MALLOC_CHECK_TAINT(argc,argv,NULL) /* =for apidoc Am|void|memzero|void * d|Size_t l @@ -1698,7 +1698,7 @@ Set the C bytes starting at C<*d> to all zeroes. =cut */ #ifndef memzero -# define memzero(d,l) memset(d,0,l) +# define memzero(d,l) memset(d,0,l) #endif #ifdef I_NETINET_IN @@ -1717,7 +1717,7 @@ Set the C bytes starting at C<*d> to all zeroes. definition should ideally go into win32/win32.h, but S_IFIFO is used later here in perl.h before win32/win32.h is being included. */ #if !defined(S_IFIFO) && defined(_S_IFIFO) -# define S_IFIFO _S_IFIFO +# define S_IFIFO _S_IFIFO #endif /* The stat macros for Unisoft System V/88 (and derivatives like @@ -1757,7 +1757,7 @@ Set the C bytes starting at C<*d> to all zeroes. #include #if defined(WIN32) && defined(PERL_IMPLICIT_SYS) -# define WIN32SCK_IS_STDSCK /* don't pull in custom wsock layer */ +# define WIN32SCK_IS_STDSCK /* don't pull in custom wsock layer */ #endif #if defined(HAS_SOCKET) && !defined(WIN32) /* WIN32 handles sockets @@ -1765,7 +1765,7 @@ Set the C bytes starting at C<*d> to all zeroes. # include # if defined(USE_SOCKS) && defined(I_SOCKS) # if !defined(INCLUDE_PROTOTYPES) -# define INCLUDE_PROTOTYPES /* for */ +# define INCLUDE_PROTOTYPES /* for */ # define PERL_SOCKS_NEED_PROTOTYPES # endif # include @@ -1854,45 +1854,45 @@ that was saved by C or C. set_errno(errcode); \ set_vaxc_errno(vmserrcode); \ } STMT_END -# define dSAVEDERRNO int saved_errno; unsigned saved_vms_errno +# define dSAVEDERRNO int saved_errno; unsigned saved_vms_errno # define dSAVE_ERRNO \ int saved_errno = errno; unsigned saved_vms_errno = vaxc$errno -# define SAVE_ERRNO ( saved_errno = errno, saved_vms_errno = vaxc$errno ) -# define RESTORE_ERRNO SETERRNO(saved_errno, saved_vms_errno) - -# define LIB_INVARG LIB$_INVARG -# define RMS_DIR RMS$_DIR -# define RMS_FAC RMS$_FAC -# define RMS_FEX RMS$_FEX -# define RMS_FNF RMS$_FNF -# define RMS_IFI RMS$_IFI -# define RMS_ISI RMS$_ISI -# define RMS_PRV RMS$_PRV -# define SS_ACCVIO SS$_ACCVIO -# define SS_DEVOFFLINE SS$_DEVOFFLINE -# define SS_IVCHAN SS$_IVCHAN -# define SS_NORMAL SS$_NORMAL -# define SS_NOPRIV SS$_NOPRIV -# define SS_BUFFEROVF SS$_BUFFEROVF +# define SAVE_ERRNO ( saved_errno = errno, saved_vms_errno = vaxc$errno ) +# define RESTORE_ERRNO SETERRNO(saved_errno, saved_vms_errno) + +# define LIB_INVARG LIB$_INVARG +# define RMS_DIR RMS$_DIR +# define RMS_FAC RMS$_FAC +# define RMS_FEX RMS$_FEX +# define RMS_FNF RMS$_FNF +# define RMS_IFI RMS$_IFI +# define RMS_ISI RMS$_ISI +# define RMS_PRV RMS$_PRV +# define SS_ACCVIO SS$_ACCVIO +# define SS_DEVOFFLINE SS$_DEVOFFLINE +# define SS_IVCHAN SS$_IVCHAN +# define SS_NORMAL SS$_NORMAL +# define SS_NOPRIV SS$_NOPRIV +# define SS_BUFFEROVF SS$_BUFFEROVF #else -# define LIB_INVARG 0 -# define RMS_DIR 0 -# define RMS_FAC 0 -# define RMS_FEX 0 -# define RMS_FNF 0 -# define RMS_IFI 0 -# define RMS_ISI 0 -# define RMS_PRV 0 -# define SS_ACCVIO 0 -# define SS_DEVOFFLINE 0 -# define SS_IVCHAN 0 -# define SS_NORMAL 0 -# define SS_NOPRIV 0 -# define SS_BUFFEROVF 0 +# define LIB_INVARG 0 +# define RMS_DIR 0 +# define RMS_FAC 0 +# define RMS_FEX 0 +# define RMS_FNF 0 +# define RMS_IFI 0 +# define RMS_ISI 0 +# define RMS_PRV 0 +# define SS_ACCVIO 0 +# define SS_DEVOFFLINE 0 +# define SS_IVCHAN 0 +# define SS_NORMAL 0 +# define SS_NOPRIV 0 +# define SS_BUFFEROVF 0 #endif #ifdef WIN32 -# define dSAVEDERRNO int saved_errno; DWORD saved_win32_errno +# define dSAVEDERRNO int saved_errno; DWORD saved_win32_errno # define dSAVE_ERRNO \ int saved_errno = errno; DWORD saved_win32_errno = GetLastError() # define SAVE_ERRNO \ @@ -1902,11 +1902,11 @@ that was saved by C or C. #endif #ifdef OS2 -# define dSAVEDERRNO int saved_errno; unsigned long saved_os2_errno +# define dSAVEDERRNO int saved_errno; unsigned long saved_os2_errno # define dSAVE_ERRNO \ int saved_errno = errno; unsigned long saved_os2_errno = Perl_rc -# define SAVE_ERRNO ( saved_errno = errno, saved_os2_errno = Perl_rc ) -# define RESTORE_ERRNO ( errno = saved_errno, Perl_rc = saved_os2_errno ) +# define SAVE_ERRNO ( saved_errno = errno, saved_os2_errno = Perl_rc ) +# define RESTORE_ERRNO ( errno = saved_errno, Perl_rc = saved_os2_errno ) #endif #ifndef SETERRNO @@ -1914,10 +1914,10 @@ that was saved by C or C. #endif #ifndef dSAVEDERRNO -# define dSAVEDERRNO int saved_errno -# define dSAVE_ERRNO int saved_errno = errno -# define SAVE_ERRNO (saved_errno = errno) -# define RESTORE_ERRNO (errno = saved_errno) +# define dSAVEDERRNO int saved_errno +# define dSAVE_ERRNO int saved_errno = errno +# define SAVE_ERRNO (saved_errno = errno) +# define RESTORE_ERRNO (errno = saved_errno) #endif /* @@ -1943,7 +1943,7 @@ any magic. =cut */ -#define ERRSV GvSVn(PL_errgv) +#define ERRSV GvSVn(PL_errgv) /* contains inlined gv_add_by_type */ #define CLEAR_ERRSV() \ @@ -1984,7 +1984,7 @@ any magic. #ifdef PERL_CORE -# define DEFSV (0 + GvSVn(PL_defgv)) +# define DEFSV (0 + GvSVn(PL_defgv)) # define DEFSV_set(sv) \ (SvREFCNT_dec(GvSV(PL_defgv)), GvSV(PL_defgv) = SvREFCNT_inc(sv)) # define SAVE_DEFSV \ @@ -1995,9 +1995,9 @@ any magic. GvSV(PL_defgv) = NULL \ ) #else -# define DEFSV GvSVn(PL_defgv) -# define DEFSV_set(sv) (GvSV(PL_defgv) = (sv)) -# define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv)) +# define DEFSV GvSVn(PL_defgv) +# define DEFSV_set(sv) (GvSV(PL_defgv) = (sv)) +# define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv)) #endif /* @@ -2021,12 +2021,12 @@ Localize C<$_>. See L. * *_errno(void); #define errno (*_errno()) */ #endif -#define UNKNOWN_ERRNO_MSG "(unknown)" +#define UNKNOWN_ERRNO_MSG "(unknown)" #ifdef VMS -#define Strerror(e) strerror((e), vaxc$errno) +#define Strerror(e) strerror((e), vaxc$errno) #else -#define Strerror(e) strerror(e) +#define Strerror(e) strerror(e) #endif #ifdef I_SYS_IOCTL @@ -2046,16 +2046,16 @@ Localize C<$_>. See L. #ifndef HAS_SOCKETPAIR # ifdef HAS_SOCKET -# define socketpair Perl_my_socketpair +# define socketpair Perl_my_socketpair # endif #endif #if INTSIZE == 2 -# define htoni htons -# define ntohi ntohs +# define htoni htons +# define ntohi ntohs #else -# define htoni htonl -# define ntohi ntohl +# define htoni htonl +# define ntohi ntohl #endif /* Configure already sets Direntry_t */ @@ -2079,118 +2079,118 @@ Localize C<$_>. See L. #ifndef S_IFMT # ifdef _S_IFMT -# define S_IFMT _S_IFMT +# define S_IFMT _S_IFMT # else -# define S_IFMT 0170000 +# define S_IFMT 0170000 # endif #endif #ifndef S_ISDIR -# define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) +# define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) #endif #ifndef S_ISCHR -# define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR) +# define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR) #endif #ifndef S_ISBLK # ifdef S_IFBLK -# define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK) +# define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK) # else -# define S_ISBLK(m) (0) +# define S_ISBLK(m) (0) # endif #endif #ifndef S_ISREG -# define S_ISREG(m) ((m & S_IFMT) == S_IFREG) +# define S_ISREG(m) ((m & S_IFMT) == S_IFREG) #endif #ifndef S_ISFIFO # ifdef S_IFIFO -# define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO) +# define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO) # else -# define S_ISFIFO(m) (0) +# define S_ISFIFO(m) (0) # endif #endif #ifndef S_ISLNK # ifdef _S_ISLNK -# define S_ISLNK(m) _S_ISLNK(m) +# define S_ISLNK(m) _S_ISLNK(m) # elif defined(_S_IFLNK) -# define S_ISLNK(m) ((m & S_IFMT) == _S_IFLNK) +# define S_ISLNK(m) ((m & S_IFMT) == _S_IFLNK) # elif defined(S_IFLNK) -# define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK) +# define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK) # else -# define S_ISLNK(m) (0) +# define S_ISLNK(m) (0) # endif #endif #ifndef S_ISSOCK # ifdef _S_ISSOCK -# define S_ISSOCK(m) _S_ISSOCK(m) +# define S_ISSOCK(m) _S_ISSOCK(m) # elif defined(_S_IFSOCK) -# define S_ISSOCK(m) ((m & S_IFMT) == _S_IFSOCK) +# define S_ISSOCK(m) ((m & S_IFMT) == _S_IFSOCK) # elif defined(S_IFSOCK) -# define S_ISSOCK(m) ((m & S_IFMT) == S_IFSOCK) +# define S_ISSOCK(m) ((m & S_IFMT) == S_IFSOCK) # else -# define S_ISSOCK(m) (0) +# define S_ISSOCK(m) (0) # endif #endif #ifndef S_IRUSR # ifdef S_IREAD -# define S_IRUSR S_IREAD -# define S_IWUSR S_IWRITE -# define S_IXUSR S_IEXEC +# define S_IRUSR S_IREAD +# define S_IWUSR S_IWRITE +# define S_IXUSR S_IEXEC # else -# define S_IRUSR 0400 -# define S_IWUSR 0200 -# define S_IXUSR 0100 +# define S_IRUSR 0400 +# define S_IWUSR 0200 +# define S_IXUSR 0100 # endif #endif #ifndef S_IRGRP # ifdef S_IRUSR -# define S_IRGRP (S_IRUSR>>3) -# define S_IWGRP (S_IWUSR>>3) -# define S_IXGRP (S_IXUSR>>3) +# define S_IRGRP (S_IRUSR>>3) +# define S_IWGRP (S_IWUSR>>3) +# define S_IXGRP (S_IXUSR>>3) # else -# define S_IRGRP 0040 -# define S_IWGRP 0020 -# define S_IXGRP 0010 +# define S_IRGRP 0040 +# define S_IWGRP 0020 +# define S_IXGRP 0010 # endif #endif #ifndef S_IROTH # ifdef S_IRUSR -# define S_IROTH (S_IRUSR>>6) -# define S_IWOTH (S_IWUSR>>6) -# define S_IXOTH (S_IXUSR>>6) +# define S_IROTH (S_IRUSR>>6) +# define S_IWOTH (S_IWUSR>>6) +# define S_IXOTH (S_IXUSR>>6) # else -# define S_IROTH 0040 -# define S_IWOTH 0020 -# define S_IXOTH 0010 +# define S_IROTH 0040 +# define S_IWOTH 0020 +# define S_IXOTH 0010 # endif #endif #ifndef S_ISUID -# define S_ISUID 04000 +# define S_ISUID 04000 #endif #ifndef S_ISGID -# define S_ISGID 02000 +# define S_ISGID 02000 #endif #ifndef S_IRWXU -# define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR) +# define S_IRWXU (S_IRUSR|S_IWUSR|S_IXUSR) #endif #ifndef S_IRWXG -# define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP) +# define S_IRWXG (S_IRGRP|S_IWGRP|S_IXGRP) #endif #ifndef S_IRWXO -# define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH) +# define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH) #endif /* Haiku R1 seems to define S_IREAD and S_IWRITE in @@ -2198,15 +2198,15 @@ Localize C<$_>. See L. * lines in the future. --jhi */ #if !defined(S_IREAD) && !defined(__HAIKU__) -# define S_IREAD S_IRUSR +# define S_IREAD S_IRUSR #endif #if !defined(S_IWRITE) && !defined(__HAIKU__) -# define S_IWRITE S_IWUSR +# define S_IWRITE S_IWUSR #endif #ifndef S_IEXEC -# define S_IEXEC S_IXUSR +# define S_IEXEC S_IXUSR #endif #if defined(cray) || defined(gould) || defined(i860) || defined(pyr) @@ -2230,7 +2230,7 @@ my_snprintf() =cut */ -#define my_sprintf sprintf +#define my_sprintf sprintf /* * If we have v?snprintf() and the C99 variadic macros, we can just use @@ -2250,7 +2250,7 @@ my_snprintf() STMT_START { if ((max) > 0 && (Size_t)len > (max)) Perl_croak_nocontext("panic: %s buffer overflow", STRINGIFY(api)); } STMT_END #ifdef USE_QUADMATH -# define my_snprintf Perl_my_snprintf +# define my_snprintf Perl_my_snprintf # define PERL_MY_SNPRINTF_GUARDED #elif defined(HAS_SNPRINTF) && defined(HAS_C99_VARIADIC_MACROS) && !(defined(DEBUGGING) && !defined(PERL_USE_GCC_BRACE_GROUPS)) && !defined(PERL_GCC_PEDANTIC) # ifdef PERL_USE_GCC_BRACE_GROUPS @@ -2258,10 +2258,10 @@ my_snprintf() ({ int len = snprintf(buffer, max, __VA_ARGS__); PERL_SNPRINTF_CHECK(len, max, snprintf); len; }) # define PERL_MY_SNPRINTF_GUARDED # else -# define my_snprintf(buffer, max, ...) snprintf(buffer, max, __VA_ARGS__) +# define my_snprintf(buffer, max, ...) snprintf(buffer, max, __VA_ARGS__) # endif #else -# define my_snprintf Perl_my_snprintf +# define my_snprintf Perl_my_snprintf # define PERL_MY_SNPRINTF_GUARDED #endif @@ -2273,10 +2273,10 @@ my_snprintf() ({ int len = vsnprintf(buffer, max, __VA_ARGS__); PERL_SNPRINTF_CHECK(len, max, vsnprintf); len; }) # define PERL_MY_VSNPRINTF_GUARDED # else -# define my_vsnprintf(buffer, max, ...) vsnprintf(buffer, max, __VA_ARGS__) +# define my_vsnprintf(buffer, max, ...) vsnprintf(buffer, max, __VA_ARGS__) # endif #else -# define my_vsnprintf Perl_my_vsnprintf +# define my_vsnprintf Perl_my_vsnprintf # define PERL_MY_VSNPRINTF_GUARDED #endif @@ -2303,34 +2303,34 @@ my_snprintf() # define PERL_MY_SNPRINTF_POST_GUARD(len, max) \ PERL_SNPRINTF_CHECK(len, max, snprintf) #else -# define PERL_MY_SNPRINTF_POST_GUARD(len, max) PERL_UNUSED_VAR(len) +# define PERL_MY_SNPRINTF_POST_GUARD(len, max) PERL_UNUSED_VAR(len) #endif #ifndef PERL_MY_VSNPRINTF_GUARDED # define PERL_MY_VSNPRINTF_POST_GUARD(len, max) \ PERL_SNPRINTF_CHECK(len, max, vsnprintf) #else -# define PERL_MY_VSNPRINTF_POST_GUARD(len, max) PERL_UNUSED_VAR(len) +# define PERL_MY_VSNPRINTF_POST_GUARD(len, max) PERL_UNUSED_VAR(len) #endif #ifdef HAS_STRLCAT -# define my_strlcat strlcat +# define my_strlcat strlcat #endif #if defined(PERL_CORE) || defined(PERL_EXT) # ifdef HAS_MEMRCHR -# define my_memrchr memrchr +# define my_memrchr memrchr # else -# define my_memrchr S_my_memrchr +# define my_memrchr S_my_memrchr # endif #endif #ifdef HAS_STRLCPY -# define my_strlcpy strlcpy +# define my_strlcpy strlcpy #endif #ifdef HAS_STRNLEN -# define my_strnlen strnlen +# define my_strnlen strnlen #endif /* @@ -2344,39 +2344,39 @@ typedef UVTYPE UV; #if defined(USE_64_BIT_INT) && defined(HAS_QUAD) # if QUADKIND == QUAD_IS_INT64_T && defined(INT64_MAX) -# define IV_MAX ((IV)INT64_MAX) -# define IV_MIN ((IV)INT64_MIN) -# define UV_MAX ((UV)UINT64_MAX) +# define IV_MAX ((IV)INT64_MAX) +# define IV_MIN ((IV)INT64_MIN) +# define UV_MAX ((UV)UINT64_MAX) # ifndef UINT64_MIN -# define UINT64_MIN 0 +# define UINT64_MIN 0 # endif -# define UV_MIN ((UV)UINT64_MIN) +# define UV_MIN ((UV)UINT64_MIN) # else -# define IV_MAX PERL_QUAD_MAX -# define IV_MIN PERL_QUAD_MIN -# define UV_MAX PERL_UQUAD_MAX -# define UV_MIN PERL_UQUAD_MIN +# define IV_MAX PERL_QUAD_MAX +# define IV_MIN PERL_QUAD_MIN +# define UV_MAX PERL_UQUAD_MAX +# define UV_MIN PERL_UQUAD_MIN # endif # define IV_IS_QUAD # define UV_IS_QUAD #else # if defined(INT32_MAX) && IVSIZE == 4 -# define IV_MAX ((IV)INT32_MAX) -# define IV_MIN ((IV)INT32_MIN) +# define IV_MAX ((IV)INT32_MAX) +# define IV_MIN ((IV)INT32_MIN) # ifndef UINT32_MAX_BROKEN /* e.g. HP-UX with gcc messes this up */ -# define UV_MAX ((UV)UINT32_MAX) +# define UV_MAX ((UV)UINT32_MAX) # else -# define UV_MAX ((UV)4294967295U) +# define UV_MAX ((UV)4294967295U) # endif # ifndef UINT32_MIN -# define UINT32_MIN 0 +# define UINT32_MIN 0 # endif -# define UV_MIN ((UV)UINT32_MIN) +# define UV_MIN ((UV)UINT32_MIN) # else -# define IV_MAX PERL_LONG_MAX -# define IV_MIN PERL_LONG_MIN -# define UV_MAX PERL_ULONG_MAX -# define UV_MIN PERL_ULONG_MIN +# define IV_MAX PERL_LONG_MAX +# define IV_MIN PERL_LONG_MIN +# define UV_MAX PERL_ULONG_MAX +# define UV_MIN PERL_ULONG_MIN # endif # if IVSIZE == 8 # define IV_IS_QUAD @@ -2396,14 +2396,14 @@ typedef UVTYPE UV; # endif #endif -#define Size_t_MAX (~(Size_t)0) -#define SSize_t_MAX (SSize_t)(~(Size_t)0 >> 1) +#define Size_t_MAX (~(Size_t)0) +#define SSize_t_MAX (SSize_t)(~(Size_t)0 >> 1) -#define IV_DIG (BIT_DIGITS(IVSIZE * 8)) -#define UV_DIG (BIT_DIGITS(UVSIZE * 8)) +#define IV_DIG (BIT_DIGITS(IVSIZE * 8)) +#define UV_DIG (BIT_DIGITS(UVSIZE * 8)) #ifndef NO_PERL_PRESERVE_IVUV -#define PERL_PRESERVE_IVUV /* We like our integers to stay integers. */ +#define PERL_PRESERVE_IVUV /* We like our integers to stay integers. */ #endif /* @@ -2420,20 +2420,20 @@ hex (lowercase C), and hex (uppercase C). */ #if U32SIZE == UVSIZE -# define U32uf UVuf -# define U32of UVof -# define U32xf UVxf -# define U32Xf UVXf +# define U32uf UVuf +# define U32of UVof +# define U32xf UVxf +# define U32Xf UVXf #elif U32SIZE == INTSIZE -# define U32uf "u" -# define U32of "o" -# define U32xf "x" -# define U32Xf "X" +# define U32uf "u" +# define U32of "o" +# define U32xf "x" +# define U32Xf "X" #elif U32SIZE == LONGSIZE -# define U32uf "lu" -# define U32of "lo" -# define U32xf "lx" -# define U32Xf "lX" +# define U32uf "lu" +# define U32of "lo" +# define U32xf "lx" +# define U32Xf "lX" #else # error Cant figure out formatting strings for U32SIZE #endif @@ -2448,11 +2448,11 @@ for printing a variable declared as I32 */ #if I32SIZE == IVSIZE -# define I32df IVdf +# define I32df IVdf #elif I32SIZE == INTSIZE -# define I32df "d" +# define I32df "d" #elif I32SIZE == LONGSIZE -# define I32df "ld" +# define I32df "ld" #else # error Cant figure out formatting string for I32SIZE #endif @@ -2470,21 +2470,21 @@ for printing a variable declared as I32 * These are mentioned in perlguts */ #if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) -# define PTRV UV -# define INT2PTR(any,d) (any)(d) +# define PTRV UV +# define INT2PTR(any,d) (any)(d) #elif PTRSIZE == LONGSIZE -# define PTRV unsigned long -# define PTR2ul(p) (unsigned long)(p) +# define PTRV unsigned long +# define PTR2ul(p) (unsigned long)(p) #else -# define PTRV unsigned +# define PTRV unsigned #endif #ifndef INT2PTR -# define INT2PTR(any,d) (any)(PTRV)(d) +# define INT2PTR(any,d) (any)(PTRV)(d) #endif #ifndef PTR2ul -# define PTR2ul(p) INT2PTR(unsigned long,p) +# define PTR2ul(p) INT2PTR(unsigned long,p) #endif /* @@ -2499,7 +2499,7 @@ You probably want to be using L> instead. #define PTR2IV(p) INT2PTR(IV,p) #define PTR2UV(p) INT2PTR(UV,p) #define PTR2NV(p) NUM2PTR(NV,p) -#define PTR2nat(p) (PTRV)(p) /* pointer to integer of PTRSIZE */ +#define PTR2nat(p) (PTRV)(p) /* pointer to integer of PTRSIZE */ /* According to strict ANSI C89 one cannot freely cast between data pointers * and function (code) pointers. There are at least two ways around this. @@ -2510,8 +2510,8 @@ You probably want to be using L> instead. * feasible use is probably temporarily storing function pointers in a data * pointer (such as a void pointer). */ -#define DPTR2FPTR(t,p) ((t)PTR2nat(p)) /* data pointer to function pointer */ -#define FPTR2DPTR(t,p) ((t)PTR2nat(p)) /* function pointer to data pointer */ +#define DPTR2FPTR(t,p) ((t)PTR2nat(p)) /* data pointer to function pointer */ +#define FPTR2DPTR(t,p) ((t)PTR2nat(p)) /* function pointer to data pointer */ #ifdef USE_LONG_DOUBLE # if LONG_DOUBLESIZE == DOUBLESIZE @@ -2525,13 +2525,13 @@ You probably want to be using L> instead. */ #ifndef HAS_LDBL_DIG # if LONG_DOUBLESIZE == 10 -# define LDBL_DIG 18 /* assume IEEE */ +# define LDBL_DIG 18 /* assume IEEE */ # elif LONG_DOUBLESIZE == 12 -# define LDBL_DIG 18 /* gcc? */ +# define LDBL_DIG 18 /* gcc? */ # elif LONG_DOUBLESIZE == 16 -# define LDBL_DIG 33 /* assume IEEE */ +# define LDBL_DIG 33 /* assume IEEE */ # elif LONG_DOUBLESIZE == DOUBLESIZE -# define LDBL_DIG DBL_DIG /* bummer */ +# define LDBL_DIG DBL_DIG /* bummer */ # endif #endif @@ -2566,63 +2566,63 @@ You probably want to be using L> instead. # include # endif # if defined(LDBL_DIG) -# define NV_DIG LDBL_DIG +# define NV_DIG LDBL_DIG # ifdef LDBL_MANT_DIG -# define NV_MANT_DIG LDBL_MANT_DIG +# define NV_MANT_DIG LDBL_MANT_DIG # endif # ifdef LDBL_MIN -# define NV_MIN LDBL_MIN +# define NV_MIN LDBL_MIN # endif # ifdef LDBL_MAX -# define NV_MAX LDBL_MAX +# define NV_MAX LDBL_MAX # endif # ifdef LDBL_MIN_EXP -# define NV_MIN_EXP LDBL_MIN_EXP +# define NV_MIN_EXP LDBL_MIN_EXP # endif # ifdef LDBL_MAX_EXP -# define NV_MAX_EXP LDBL_MAX_EXP +# define NV_MAX_EXP LDBL_MAX_EXP # endif # ifdef LDBL_MIN_10_EXP -# define NV_MIN_10_EXP LDBL_MIN_10_EXP +# define NV_MIN_10_EXP LDBL_MIN_10_EXP # endif # ifdef LDBL_MAX_10_EXP -# define NV_MAX_10_EXP LDBL_MAX_10_EXP +# define NV_MAX_10_EXP LDBL_MAX_10_EXP # endif # ifdef LDBL_EPSILON -# define NV_EPSILON LDBL_EPSILON +# define NV_EPSILON LDBL_EPSILON # endif # ifdef LDBL_MAX -# define NV_MAX LDBL_MAX +# define NV_MAX LDBL_MAX /* Having LDBL_MAX doesn't necessarily mean that we have LDBL_MIN... -Allen */ # elif defined(HUGE_VALL) -# define NV_MAX HUGE_VALL +# define NV_MAX HUGE_VALL # endif # endif # if defined(HAS_SQRTL) -# define Perl_acos acosl -# define Perl_asin asinl -# define Perl_atan atanl -# define Perl_atan2 atan2l -# define Perl_ceil ceill -# define Perl_cos cosl -# define Perl_cosh coshl -# define Perl_exp expl -# define Perl_fabs fabsl -# define Perl_floor floorl -# define Perl_fmod fmodl -# define Perl_log logl -# define Perl_log10 log10l -# define Perl_pow powl -# define Perl_sin sinl -# define Perl_sinh sinhl -# define Perl_sqrt sqrtl -# define Perl_tan tanl -# define Perl_tanh tanhl +# define Perl_acos acosl +# define Perl_asin asinl +# define Perl_atan atanl +# define Perl_atan2 atan2l +# define Perl_ceil ceill +# define Perl_cos cosl +# define Perl_cosh coshl +# define Perl_exp expl +# define Perl_fabs fabsl +# define Perl_floor floorl +# define Perl_fmod fmodl +# define Perl_log logl +# define Perl_log10 log10l +# define Perl_pow powl +# define Perl_sin sinl +# define Perl_sinh sinhl +# define Perl_sqrt sqrtl +# define Perl_tan tanl +# define Perl_tanh tanhl # endif /* e.g. libsunmath doesn't have modfl and frexpl as of mid-March 2000 */ # ifndef Perl_modf # ifdef HAS_MODFL -# define Perl_modf(x,y) modfl(x,y) +# define Perl_modf(x,y) modfl(x,y) /* eg glibc 2.2 series seems to provide modfl on ppc and arm, but has no prototype in */ # ifndef HAS_MODFL_PROTO @@ -2630,142 +2630,142 @@ EXTERN_C long double modfl(long double, long double *); # endif # elif (defined(HAS_TRUNCL) || defined(HAS_AINTL)) && defined(HAS_COPYSIGNL) extern long double Perl_my_modfl(long double x, long double *ip); -# define Perl_modf(x,y) Perl_my_modfl(x,y) +# define Perl_modf(x,y) Perl_my_modfl(x,y) # endif # endif # ifndef Perl_frexp # ifdef HAS_FREXPL -# define Perl_frexp(x,y) frexpl(x,y) +# define Perl_frexp(x,y) frexpl(x,y) # elif defined(HAS_ILOGBL) && defined(HAS_SCALBNL) extern long double Perl_my_frexpl(long double x, int *e); -# define Perl_frexp(x,y) Perl_my_frexpl(x,y) +# define Perl_frexp(x,y) Perl_my_frexpl(x,y) # endif # endif # ifndef Perl_ldexp # ifdef HAS_LDEXPL -# define Perl_ldexp(x, y) ldexpl(x,y) +# define Perl_ldexp(x, y) ldexpl(x,y) # elif defined(HAS_SCALBNL) && FLT_RADIX == 2 -# define Perl_ldexp(x,y) scalbnl(x,y) +# define Perl_ldexp(x,y) scalbnl(x,y) # endif # endif # ifndef Perl_isnan # if defined(HAS_ISNANL) && !(defined(isnan) && defined(HAS_C99)) -# define Perl_isnan(x) isnanl(x) +# define Perl_isnan(x) isnanl(x) # elif defined(__sgi) && defined(__c99) /* XXX Configure test needed */ -# define Perl_isnan(x) isnan(x) +# define Perl_isnan(x) isnan(x) # endif # endif # ifndef Perl_isinf # if defined(HAS_ISINFL) && !(defined(isinf) && defined(HAS_C99)) -# define Perl_isinf(x) isinfl(x) +# define Perl_isinf(x) isinfl(x) # elif defined(__sgi) && defined(__c99) /* XXX Configure test needed */ -# define Perl_isinf(x) isinf(x) +# define Perl_isinf(x) isinf(x) # elif defined(LDBL_MAX) && !defined(NAN_COMPARE_BROKEN) -# define Perl_isinf(x) ((x) > LDBL_MAX || (x) < -LDBL_MAX) +# define Perl_isinf(x) ((x) > LDBL_MAX || (x) < -LDBL_MAX) # endif # endif # ifndef Perl_isfinite -# define Perl_isfinite(x) Perl_isfinitel(x) +# define Perl_isfinite(x) Perl_isfinitel(x) # endif #elif defined(USE_QUADMATH) && defined(I_QUADMATH) # include -# define NV_DIG FLT128_DIG -# define NV_MANT_DIG FLT128_MANT_DIG -# define NV_MIN FLT128_MIN -# define NV_MAX FLT128_MAX -# define NV_MIN_EXP FLT128_MIN_EXP -# define NV_MAX_EXP FLT128_MAX_EXP -# define NV_EPSILON FLT128_EPSILON -# define NV_MIN_10_EXP FLT128_MIN_10_EXP -# define NV_MAX_10_EXP FLT128_MAX_10_EXP -# define Perl_acos acosq -# define Perl_asin asinq -# define Perl_atan atanq -# define Perl_atan2 atan2q -# define Perl_ceil ceilq -# define Perl_cos cosq -# define Perl_cosh coshq -# define Perl_exp expq -# define Perl_fabs fabsq -# define Perl_floor floorq -# define Perl_fmod fmodq -# define Perl_log logq -# define Perl_log10 log10q -# define Perl_signbit signbitq -# define Perl_pow powq -# define Perl_sin sinq -# define Perl_sinh sinhq -# define Perl_sqrt sqrtq -# define Perl_tan tanq -# define Perl_tanh tanhq -# define Perl_modf(x,y) modfq(x,y) -# define Perl_frexp(x,y) frexpq(x,y) -# define Perl_ldexp(x, y) ldexpq(x,y) -# define Perl_isinf(x) isinfq(x) -# define Perl_isnan(x) isnanq(x) -# define Perl_isfinite(x) !(isnanq(x) || isinfq(x)) +# define NV_DIG FLT128_DIG +# define NV_MANT_DIG FLT128_MANT_DIG +# define NV_MIN FLT128_MIN +# define NV_MAX FLT128_MAX +# define NV_MIN_EXP FLT128_MIN_EXP +# define NV_MAX_EXP FLT128_MAX_EXP +# define NV_EPSILON FLT128_EPSILON +# define NV_MIN_10_EXP FLT128_MIN_10_EXP +# define NV_MAX_10_EXP FLT128_MAX_10_EXP +# define Perl_acos acosq +# define Perl_asin asinq +# define Perl_atan atanq +# define Perl_atan2 atan2q +# define Perl_ceil ceilq +# define Perl_cos cosq +# define Perl_cosh coshq +# define Perl_exp expq +# define Perl_fabs fabsq +# define Perl_floor floorq +# define Perl_fmod fmodq +# define Perl_log logq +# define Perl_log10 log10q +# define Perl_signbit signbitq +# define Perl_pow powq +# define Perl_sin sinq +# define Perl_sinh sinhq +# define Perl_sqrt sqrtq +# define Perl_tan tanq +# define Perl_tanh tanhq +# define Perl_modf(x,y) modfq(x,y) +# define Perl_frexp(x,y) frexpq(x,y) +# define Perl_ldexp(x, y) ldexpq(x,y) +# define Perl_isinf(x) isinfq(x) +# define Perl_isnan(x) isnanq(x) +# define Perl_isfinite(x) !(isnanq(x) || isinfq(x)) # define Perl_fp_class(x) \ ((x) == 0.0Q ? 0 : isinfq(x) ? 3 : isnanq(x) ? 4 : PERL_ABS(x) < FLT128_MIN ? 2 : 1) -# define Perl_fp_class_inf(x) (Perl_fp_class(x) == 3) -# define Perl_fp_class_nan(x) (Perl_fp_class(x) == 4) -# define Perl_fp_class_norm(x) (Perl_fp_class(x) == 1) +# define Perl_fp_class_inf(x) (Perl_fp_class(x) == 3) +# define Perl_fp_class_nan(x) (Perl_fp_class(x) == 4) +# define Perl_fp_class_norm(x) (Perl_fp_class(x) == 1) # define Perl_fp_class_denorm(x) (Perl_fp_class(x) == 2) -# define Perl_fp_class_zero(x) (Perl_fp_class(x) == 0) +# define Perl_fp_class_zero(x) (Perl_fp_class(x) == 0) #else -# define NV_DIG DBL_DIG -# define NV_MANT_DIG DBL_MANT_DIG -# define NV_MIN DBL_MIN -# define NV_MAX DBL_MAX -# define NV_MIN_EXP DBL_MIN_EXP -# define NV_MAX_EXP DBL_MAX_EXP -# define NV_MIN_10_EXP DBL_MIN_10_EXP -# define NV_MAX_10_EXP DBL_MAX_10_EXP -# define NV_EPSILON DBL_EPSILON -# define NV_MAX DBL_MAX -# define NV_MIN DBL_MIN +# define NV_DIG DBL_DIG +# define NV_MANT_DIG DBL_MANT_DIG +# define NV_MIN DBL_MIN +# define NV_MAX DBL_MAX +# define NV_MIN_EXP DBL_MIN_EXP +# define NV_MAX_EXP DBL_MAX_EXP +# define NV_MIN_10_EXP DBL_MIN_10_EXP +# define NV_MAX_10_EXP DBL_MAX_10_EXP +# define NV_EPSILON DBL_EPSILON +# define NV_MAX DBL_MAX +# define NV_MIN DBL_MIN /* These math interfaces are C89. */ -# define Perl_acos acos -# define Perl_asin asin -# define Perl_atan atan -# define Perl_atan2 atan2 -# define Perl_ceil ceil -# define Perl_cos cos -# define Perl_cosh cosh -# define Perl_exp exp -# define Perl_fabs fabs -# define Perl_floor floor -# define Perl_fmod fmod -# define Perl_log log -# define Perl_log10 log10 -# define Perl_pow pow -# define Perl_sin sin -# define Perl_sinh sinh -# define Perl_sqrt sqrt -# define Perl_tan tan -# define Perl_tanh tanh - -# define Perl_modf(x,y) modf(x,y) -# define Perl_frexp(x,y) frexp(x,y) -# define Perl_ldexp(x,y) ldexp(x,y) +# define Perl_acos acos +# define Perl_asin asin +# define Perl_atan atan +# define Perl_atan2 atan2 +# define Perl_ceil ceil +# define Perl_cos cos +# define Perl_cosh cosh +# define Perl_exp exp +# define Perl_fabs fabs +# define Perl_floor floor +# define Perl_fmod fmod +# define Perl_log log +# define Perl_log10 log10 +# define Perl_pow pow +# define Perl_sin sin +# define Perl_sinh sinh +# define Perl_sqrt sqrt +# define Perl_tan tan +# define Perl_tanh tanh + +# define Perl_modf(x,y) modf(x,y) +# define Perl_frexp(x,y) frexp(x,y) +# define Perl_ldexp(x,y) ldexp(x,y) # ifndef Perl_isnan # ifdef HAS_ISNAN -# define Perl_isnan(x) isnan(x) +# define Perl_isnan(x) isnan(x) # endif # endif # ifndef Perl_isinf # if defined(HAS_ISINF) -# define Perl_isinf(x) isinf(x) +# define Perl_isinf(x) isinf(x) # elif defined(DBL_MAX) && !defined(NAN_COMPARE_BROKEN) -# define Perl_isinf(x) ((x) > DBL_MAX || (x) < -DBL_MAX) +# define Perl_isinf(x) ((x) > DBL_MAX || (x) < -DBL_MAX) # endif # endif # ifndef Perl_isfinite # ifdef HAS_ISFINITE -# define Perl_isfinite(x) isfinite(x) +# define Perl_isfinite(x) isfinite(x) # elif defined(HAS_FINITE) -# define Perl_isfinite(x) finite(x) +# define Perl_isfinite(x) finite(x) # endif # endif #endif @@ -2812,7 +2812,7 @@ extern long double Perl_my_frexpl(long double x, int *e); # include /* oh, and the isnormal macro has a typo in it! */ # undef isnormal -# define isnormal(x) Perl_fp_class_norm(x) +# define isnormal(x) Perl_fp_class_norm(x) # endif # if defined(FP_INFINITE) && defined(FP_NAN) # define Perl_fp_class(x) fp_classify(x) @@ -2837,8 +2837,8 @@ extern long double Perl_my_frexpl(long double x, int *e); * typedef, not cpp symbols, and Configure doesn't detect that. Define * some symbols also as cpp symbols so we can detect them. */ # if defined(__sun) || defined(__sgi) /* XXX Configure test instead */ -# define FP_PINF FP_PINF -# define FP_QNAN FP_QNAN +# define FP_PINF FP_PINF +# define FP_QNAN FP_QNAN # endif # include # ifdef I_IEEEFP @@ -2872,8 +2872,8 @@ extern long double Perl_my_frexpl(long double x, int *e); # define Perl_fp_class_pinf(x) (Perl_fp_class(x)==FP_PINF) # define Perl_fp_class_nnorm(x) (Perl_fp_class(x)==FP_NNORM) # define Perl_fp_class_pnorm(x) (Perl_fp_class(x)==FP_PNORM) -# define Perl_fp_class_ndenorm(x) (Perl_fp_class(x)==FP_NDENORM) -# define Perl_fp_class_pdenorm(x) (Perl_fp_class(x)==FP_PDENORM) +# define Perl_fp_class_ndenorm(x) (Perl_fp_class(x)==FP_NDENORM) +# define Perl_fp_class_pdenorm(x) (Perl_fp_class(x)==FP_PDENORM) # define Perl_fp_class_nzero(x) (Perl_fp_class(x)==FP_NZERO) # define Perl_fp_class_pzero(x) (Perl_fp_class(x)==FP_PZERO) # else @@ -2890,30 +2890,30 @@ extern long double Perl_my_frexpl(long double x, int *e); # if defined(FP_POS_INF) && defined(FP_QNAN) # ifdef __sgi /* XXX Configure test instead */ # ifdef USE_LONG_DOUBLE -# define Perl_fp_class(x) fp_class_l(x) +# define Perl_fp_class(x) fp_class_l(x) # else -# define Perl_fp_class(x) fp_class_d(x) +# define Perl_fp_class(x) fp_class_d(x) # endif # else # if defined(USE_LONG_DOUBLE) && defined(HAS_FP_CLASSL) -# define Perl_fp_class(x) fp_classl(x) +# define Perl_fp_class(x) fp_classl(x) # else -# define Perl_fp_class(x) fp_class(x) +# define Perl_fp_class(x) fp_class(x) # endif # endif # if defined(FP_POS_INF) && defined(FP_QNAN) -# define Perl_fp_class_snan(x) (Perl_fp_class(x)==FP_SNAN) -# define Perl_fp_class_qnan(x) (Perl_fp_class(x)==FP_QNAN) -# define Perl_fp_class_ninf(x) (Perl_fp_class(x)==FP_NEG_INF) -# define Perl_fp_class_pinf(x) (Perl_fp_class(x)==FP_POS_INF) -# define Perl_fp_class_nnorm(x) (Perl_fp_class(x)==FP_NEG_NORM) -# define Perl_fp_class_pnorm(x) (Perl_fp_class(x)==FP_POS_NORM) +# define Perl_fp_class_snan(x) (Perl_fp_class(x)==FP_SNAN) +# define Perl_fp_class_qnan(x) (Perl_fp_class(x)==FP_QNAN) +# define Perl_fp_class_ninf(x) (Perl_fp_class(x)==FP_NEG_INF) +# define Perl_fp_class_pinf(x) (Perl_fp_class(x)==FP_POS_INF) +# define Perl_fp_class_nnorm(x) (Perl_fp_class(x)==FP_NEG_NORM) +# define Perl_fp_class_pnorm(x) (Perl_fp_class(x)==FP_POS_NORM) # define Perl_fp_class_ndenorm(x) \ (Perl_fp_class(x)==FP_NEG_DENORM) # define Perl_fp_class_pdenorm(x) \ (Perl_fp_class(x)==FP_POS_DENORM) -# define Perl_fp_class_nzero(x) (Perl_fp_class(x)==FP_NEG_ZERO) -# define Perl_fp_class_pzero(x) (Perl_fp_class(x)==FP_POS_ZERO) +# define Perl_fp_class_nzero(x) (Perl_fp_class(x)==FP_NEG_ZERO) +# define Perl_fp_class_pzero(x) (Perl_fp_class(x)==FP_POS_ZERO) # else # undef Perl_fp_class /* Unknown set of defines */ # endif @@ -2925,25 +2925,25 @@ extern long double Perl_my_frexpl(long double x, int *e); # include # if defined(FP_PLUS_NORM) && defined(FP_PLUS_INF) # ifndef _cplusplus -# define Perl_fp_class(x) class(x) +# define Perl_fp_class(x) class(x) # else -# define Perl_fp_class(x) _class(x) +# define Perl_fp_class(x) _class(x) # endif # if defined(FP_PLUS_INF) && defined(FP_NANQ) -# define Perl_fp_class_snan(x) (Perl_fp_class(x)==FP_NANS) -# define Perl_fp_class_qnan(x) (Perl_fp_class(x)==FP_NANQ) -# define Perl_fp_class_ninf(x) (Perl_fp_class(x)==FP_MINUS_INF) -# define Perl_fp_class_pinf(x) (Perl_fp_class(x)==FP_PLUS_INF) +# define Perl_fp_class_snan(x) (Perl_fp_class(x)==FP_NANS) +# define Perl_fp_class_qnan(x) (Perl_fp_class(x)==FP_NANQ) +# define Perl_fp_class_ninf(x) (Perl_fp_class(x)==FP_MINUS_INF) +# define Perl_fp_class_pinf(x) (Perl_fp_class(x)==FP_PLUS_INF) # define Perl_fp_class_nnorm(x) \ (Perl_fp_class(x)==FP_MINUS_NORM) -# define Perl_fp_class_pnorm(x) (Perl_fp_class(x)==FP_PLUS_NORM) +# define Perl_fp_class_pnorm(x) (Perl_fp_class(x)==FP_PLUS_NORM) # define Perl_fp_class_ndenorm(x) \ (Perl_fp_class(x)==FP_MINUS_DENORM) # define Perl_fp_class_pdenorm(x) \ (Perl_fp_class(x)==FP_PLUS_DENORM) # define Perl_fp_class_nzero(x) \ (Perl_fp_class(x)==FP_MINUS_ZERO) -# define Perl_fp_class_pzero(x) (Perl_fp_class(x)==FP_PLUS_ZERO) +# define Perl_fp_class_pzero(x) (Perl_fp_class(x)==FP_PLUS_ZERO) # else # undef Perl_fp_class /* Unknown set of defines */ # endif @@ -2953,29 +2953,29 @@ extern long double Perl_my_frexpl(long double x, int *e); /* Win32: _fpclass(), _isnan(), _finite(). */ #ifdef _MSC_VER # ifndef Perl_isnan -# define Perl_isnan(x) _isnan(x) +# define Perl_isnan(x) _isnan(x) # endif # ifndef Perl_isfinite -# define Perl_isfinite(x) _finite(x) +# define Perl_isfinite(x) _finite(x) # endif # ifndef Perl_fp_class_snan /* No simple way to #define Perl_fp_class because * _fpclass() returns a set of bits. */ -# define Perl_fp_class_snan(x) (_fpclass(x) & _FPCLASS_SNAN) -# define Perl_fp_class_qnan(x) (_fpclass(x) & _FPCLASS_QNAN) -# define Perl_fp_class_nan(x) (_fpclass(x) & (_FPCLASS_SNAN|_FPCLASS_QNAN)) -# define Perl_fp_class_ninf(x) (_fpclass(x) & _FPCLASS_NINF) -# define Perl_fp_class_pinf(x) (_fpclass(x) & _FPCLASS_PINF) -# define Perl_fp_class_inf(x) (_fpclass(x) & (_FPCLASS_NINF|_FPCLASS_PINF)) -# define Perl_fp_class_nnorm(x) (_fpclass(x) & _FPCLASS_NN) -# define Perl_fp_class_pnorm(x) (_fpclass(x) & _FPCLASS_PN) -# define Perl_fp_class_norm(x) (_fpclass(x) & (_FPCLASS_NN|_FPCLASS_PN)) +# define Perl_fp_class_snan(x) (_fpclass(x) & _FPCLASS_SNAN) +# define Perl_fp_class_qnan(x) (_fpclass(x) & _FPCLASS_QNAN) +# define Perl_fp_class_nan(x) (_fpclass(x) & (_FPCLASS_SNAN|_FPCLASS_QNAN)) +# define Perl_fp_class_ninf(x) (_fpclass(x) & _FPCLASS_NINF) +# define Perl_fp_class_pinf(x) (_fpclass(x) & _FPCLASS_PINF) +# define Perl_fp_class_inf(x) (_fpclass(x) & (_FPCLASS_NINF|_FPCLASS_PINF)) +# define Perl_fp_class_nnorm(x) (_fpclass(x) & _FPCLASS_NN) +# define Perl_fp_class_pnorm(x) (_fpclass(x) & _FPCLASS_PN) +# define Perl_fp_class_norm(x) (_fpclass(x) & (_FPCLASS_NN|_FPCLASS_PN)) # define Perl_fp_class_ndenorm(x) (_fpclass(x) & _FPCLASS_ND) # define Perl_fp_class_pdenorm(x) (_fpclass(x) & _FPCLASS_PD) # define Perl_fp_class_denorm(x) (_fpclass(x) & (_FPCLASS_ND|_FPCLASS_PD)) -# define Perl_fp_class_nzero(x) (_fpclass(x) & _FPCLASS_NZ) -# define Perl_fp_class_pzero(x) (_fpclass(x) & _FPCLASS_PZ) -# define Perl_fp_class_zero(x) (_fpclass(x) & (_FPCLASS_NZ|_FPCLASS_PZ)) +# define Perl_fp_class_nzero(x) (_fpclass(x) & _FPCLASS_NZ) +# define Perl_fp_class_pzero(x) (_fpclass(x) & _FPCLASS_PZ) +# define Perl_fp_class_zero(x) (_fpclass(x) & (_FPCLASS_NZ|_FPCLASS_PZ)) # endif #endif @@ -3011,38 +3011,38 @@ extern long double Perl_my_frexpl(long double x, int *e); #ifndef Perl_isnan # ifdef Perl_fp_class_nan -# define Perl_isnan(x) Perl_fp_class_nan(x) +# define Perl_isnan(x) Perl_fp_class_nan(x) # elif defined(HAS_UNORDERED) -# define Perl_isnan(x) unordered((x), 0.0) +# define Perl_isnan(x) unordered((x), 0.0) # else -# define Perl_isnan(x) ((x)!=(x)) +# define Perl_isnan(x) ((x)!=(x)) # endif #endif #ifndef Perl_isinf # ifdef Perl_fp_class_inf -# define Perl_isinf(x) Perl_fp_class_inf(x) +# define Perl_isinf(x) Perl_fp_class_inf(x) # endif #endif #ifndef Perl_isfinite # if defined(HAS_ISFINITE) && !defined(isfinite) -# define Perl_isfinite(x) isfinite((double)(x)) +# define Perl_isfinite(x) isfinite((double)(x)) # elif defined(HAS_FINITE) -# define Perl_isfinite(x) finite((double)(x)) +# define Perl_isfinite(x) finite((double)(x)) # elif defined(Perl_fp_class_finite) -# define Perl_isfinite(x) Perl_fp_class_finite(x) +# define Perl_isfinite(x) Perl_fp_class_finite(x) # else /* For the infinities the multiplication returns nan, for the * nan the multiplication also returns nan, for everything * else (that is, finite) zero should be returned. */ -# define Perl_isfinite(x) (((x) * 0) == 0) +# define Perl_isfinite(x) (((x) * 0) == 0) # endif #endif #ifndef Perl_isinf # if defined(Perl_isfinite) && defined(Perl_isnan) -# define Perl_isinf(x) !(Perl_isfinite(x)||Perl_isnan(x)) +# define Perl_isinf(x) !(Perl_isfinite(x)||Perl_isnan(x)) # endif #endif @@ -3052,15 +3052,15 @@ extern long double Perl_my_frexpl(long double x, int *e); /* If isfinite() is a macro and looks like we have C99, * we assume it's the type-aware C99 isfinite(). */ # if defined(HAS_ISFINITE) && defined(isfinite) && defined(HAS_C99) -# define Perl_isfinitel(x) isfinite(x) +# define Perl_isfinitel(x) isfinite(x) # elif defined(HAS_ISFINITEL) -# define Perl_isfinitel(x) isfinitel(x) +# define Perl_isfinitel(x) isfinitel(x) # elif defined(HAS_FINITEL) -# define Perl_isfinitel(x) finitel(x) +# define Perl_isfinitel(x) finitel(x) # elif defined(HAS_ISINFL) && defined(HAS_ISNANL) -# define Perl_isfinitel(x) !(isinfl(x)||isnanl(x)) +# define Perl_isfinitel(x) !(isinfl(x)||isnanl(x)) # else -# define Perl_isfinitel(x) ((x) * 0 == 0) /* See Perl_isfinite. */ +# define Perl_isfinitel(x) ((x) * 0 == 0) /* See Perl_isfinite. */ # endif #endif @@ -3088,13 +3088,13 @@ extern long double Perl_my_frexpl(long double x, int *e); #endif #ifdef USE_PERL_ATOF -# define Perl_atof(s) Perl_my_atof(aTHX_ s) -# define Perl_atof2(s, n) Perl_my_atof3(aTHX_ (s), &(n), 0) +# define Perl_atof(s) Perl_my_atof(aTHX_ s) +# define Perl_atof2(s, n) Perl_my_atof3(aTHX_ (s), &(n), 0) #else -# define Perl_atof(s) (NV)atof(s) -# define Perl_atof2(s, n) ((n) = atof(s)) +# define Perl_atof(s) (NV)atof(s) +# define Perl_atof2(s, n) ((n) = atof(s)) #endif -#define my_atof2(a,b) my_atof3(a,b,0) +#define my_atof2(a,b) my_atof3(a,b,0) /* =for apidoc AmTR|NV|Atof|NN const char * const s @@ -3104,7 +3104,7 @@ This is a synonym for L>. =cut */ -#define Atof my_atof +#define Atof my_atof /* =for apidoc_section $numeric @@ -3149,32 +3149,32 @@ precision exists, the highest precision one available is used. * ranges will not be included. UCHAR functions normally. - kja */ -#define PERL_UCHAR_MIN ((unsigned char)0) -#define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX) +#define PERL_UCHAR_MIN ((unsigned char)0) +#define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX) #define PERL_USHORT_MIN ((unsigned short)0) #define PERL_USHORT_MAX ((unsigned short)USHRT_MAX) -#define PERL_SHORT_MAX ((short)SHRT_MAX) -#define PERL_SHORT_MIN ((short)SHRT_MIN) +#define PERL_SHORT_MAX ((short)SHRT_MAX) +#define PERL_SHORT_MIN ((short)SHRT_MIN) -#define PERL_UINT_MAX ((unsigned int)UINT_MAX) -#define PERL_UINT_MIN ((unsigned int)0) +#define PERL_UINT_MAX ((unsigned int)UINT_MAX) +#define PERL_UINT_MIN ((unsigned int)0) -#define PERL_INT_MAX ((int)INT_MAX) -#define PERL_INT_MIN ((int)INT_MIN) +#define PERL_INT_MAX ((int)INT_MAX) +#define PERL_INT_MIN ((int)INT_MIN) -#define PERL_ULONG_MAX ((unsigned long)ULONG_MAX) -#define PERL_ULONG_MIN ((unsigned long)0L) +#define PERL_ULONG_MAX ((unsigned long)ULONG_MAX) +#define PERL_ULONG_MIN ((unsigned long)0L) -#define PERL_LONG_MAX ((long)LONG_MAX) -#define PERL_LONG_MIN ((long)LONG_MIN) +#define PERL_LONG_MAX ((long)LONG_MAX) +#define PERL_LONG_MIN ((long)LONG_MIN) #ifdef UV_IS_QUAD -# define PERL_UQUAD_MAX (~(UV)0) -# define PERL_UQUAD_MIN ((UV)0) -# define PERL_QUAD_MAX ((IV) (PERL_UQUAD_MAX >> 1)) -# define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3)) +# define PERL_UQUAD_MAX (~(UV)0) +# define PERL_UQUAD_MIN ((UV)0) +# define PERL_QUAD_MAX ((IV) (PERL_UQUAD_MAX >> 1)) +# define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3)) #endif /* @@ -3241,9 +3241,9 @@ typedef struct interpreter PerlInterpreter; /* SGI's has struct sv */ #if defined(__sgi) -# define STRUCT_SV perl_sv +# define STRUCT_SV perl_sv #else -# define STRUCT_SV sv +# define STRUCT_SV sv #endif typedef struct STRUCT_SV SV; typedef struct av AV; @@ -3309,7 +3309,7 @@ typedef struct padname PADNAME; #if defined(USE_LARGE_FILES) && !defined(NO_64_BIT_RAWIO) # if LSEEKSIZE == 8 && !defined(USE_64_BIT_RAWIO) -# define USE_64_BIT_RAWIO /* implicit */ +# define USE_64_BIT_RAWIO /* implicit */ # endif #endif @@ -3318,92 +3318,92 @@ typedef struct padname PADNAME; * however, because operating systems like to do that themself. */ #ifndef FSEEKSIZE # ifdef HAS_FSEEKO -# define FSEEKSIZE LSEEKSIZE +# define FSEEKSIZE LSEEKSIZE # else -# define FSEEKSIZE LONGSIZE +# define FSEEKSIZE LONGSIZE # endif #endif #if defined(USE_LARGE_FILES) && !defined(NO_64_BIT_STDIO) # if FSEEKSIZE == 8 && !defined(USE_64_BIT_STDIO) -# define USE_64_BIT_STDIO /* implicit */ +# define USE_64_BIT_STDIO /* implicit */ # endif #endif #ifdef USE_64_BIT_RAWIO # ifdef HAS_OFF64_T # undef Off_t -# define Off_t off64_t +# define Off_t off64_t # undef LSEEKSIZE -# define LSEEKSIZE 8 +# define LSEEKSIZE 8 # endif /* Most 64-bit environments have defines like _LARGEFILE_SOURCE that will * trigger defines like the ones below. Some 64-bit environments, * however, do not. Therefore we have to explicitly mix and match. */ # if defined(USE_OPEN64) -# define open open64 +# define open open64 # endif # if defined(USE_LSEEK64) -# define lseek lseek64 +# define lseek lseek64 # else # if defined(USE_LLSEEK) -# define lseek llseek +# define lseek llseek # endif # endif # if defined(USE_STAT64) -# define stat stat64 +# define stat stat64 # endif # if defined(USE_FSTAT64) -# define fstat fstat64 +# define fstat fstat64 # endif # if defined(USE_LSTAT64) -# define lstat lstat64 +# define lstat lstat64 # endif # if defined(USE_FLOCK64) -# define flock flock64 +# define flock flock64 # endif # if defined(USE_LOCKF64) -# define lockf lockf64 +# define lockf lockf64 # endif # if defined(USE_FCNTL64) -# define fcntl fcntl64 +# define fcntl fcntl64 # endif # if defined(USE_TRUNCATE64) -# define truncate truncate64 +# define truncate truncate64 # endif # if defined(USE_FTRUNCATE64) -# define ftruncate ftruncate64 +# define ftruncate ftruncate64 # endif #endif #ifdef USE_64_BIT_STDIO # ifdef HAS_FPOS64_T # undef Fpos_t -# define Fpos_t fpos64_t +# define Fpos_t fpos64_t # endif /* Most 64-bit environments have defines like _LARGEFILE_SOURCE * that will trigger defines like the ones below. Some 64-bit * environments, however, do not. */ # if defined(USE_FOPEN64) -# define fopen fopen64 +# define fopen fopen64 # endif # if defined(USE_FSEEK64) -# define fseek fseek64 /* don't do fseeko here, see perlio.c */ +# define fseek fseek64 /* don't do fseeko here, see perlio.c */ # endif # if defined(USE_FTELL64) -# define ftell ftell64 /* don't do ftello here, see perlio.c */ +# define ftell ftell64 /* don't do ftello here, see perlio.c */ # endif # if defined(USE_FSETPOS64) -# define fsetpos fsetpos64 +# define fsetpos fsetpos64 # endif # if defined(USE_FGETPOS64) -# define fgetpos fgetpos64 +# define fgetpos fgetpos64 # endif # if defined(USE_TMPFILE64) -# define tmpfile tmpfile64 +# define tmpfile tmpfile64 # endif # if defined(USE_FREOPEN64) -# define freopen freopen64 +# define freopen freopen64 # endif #endif @@ -3441,25 +3441,25 @@ typedef struct padname PADNAME; /* NSIG logic from Configure --> */ #ifndef NSIG # ifdef _NSIG -# define NSIG (_NSIG) +# define NSIG (_NSIG) # elif defined(SIGMAX) -# define NSIG (SIGMAX+1) +# define NSIG (SIGMAX+1) # elif defined(SIG_MAX) -# define NSIG (SIG_MAX+1) +# define NSIG (SIG_MAX+1) # elif defined(_SIG_MAX) -# define NSIG (_SIG_MAX+1) +# define NSIG (_SIG_MAX+1) # elif defined(MAXSIG) -# define NSIG (MAXSIG+1) +# define NSIG (MAXSIG+1) # elif defined(MAX_SIG) -# define NSIG (MAX_SIG+1) +# define NSIG (MAX_SIG+1) # elif defined(SIGARRAYSIZE) -# define NSIG SIGARRAYSIZE /* Assume ary[SIGARRAYSIZE] */ +# define NSIG SIGARRAYSIZE /* Assume ary[SIGARRAYSIZE] */ # elif defined(_sys_nsig) -# define NSIG (_sys_nsig) /* Solaris 2.5 */ +# define NSIG (_sys_nsig) /* Solaris 2.5 */ # else /* Default to some arbitrary number that's big enough * to get most of the common signals. */ -# define NSIG 50 +# define NSIG 50 # endif #endif /* <-- NSIG logic from Configure */ @@ -3509,20 +3509,20 @@ typedef struct padname PADNAME; to a comma expression, and the last sub-expression is something that gets calculated, and then they have the gall to warn that a value computed is not used. Hence cast to void. */ -# define PERL_FPU_INIT (void)fpsetmask(0) +# define PERL_FPU_INIT (void)fpsetmask(0) # elif defined(SIGFPE) && defined(SIG_IGN) && !defined(PERL_MICRO) # define PERL_FPU_INIT \ PL_sigfpe_saved = (Sighandler_t) signal(SIGFPE, SIG_IGN) # define PERL_FPU_PRE_EXEC \ { Sigsave_t xfpe; rsignal_save(SIGFPE, PL_sigfpe_saved, &xfpe); -# define PERL_FPU_POST_EXEC rsignal_restore(SIGFPE, &xfpe); } +# define PERL_FPU_POST_EXEC rsignal_restore(SIGFPE, &xfpe); } # else # define PERL_FPU_INIT # endif #endif #ifndef PERL_FPU_PRE_EXEC -# define PERL_FPU_PRE_EXEC { -# define PERL_FPU_POST_EXEC } +# define PERL_FPU_PRE_EXEC { +# define PERL_FPU_POST_EXEC } #endif /* In Tru64 the cc -ieee enables the IEEE math but disables traps. We need @@ -3559,11 +3559,11 @@ typedef struct padname PADNAME; #endif #ifndef PERL_SYS_FPU_INIT -# define PERL_SYS_FPU_INIT NOOP +# define PERL_SYS_FPU_INIT NOOP #endif #ifndef PERL_SYS_INIT3_BODY -# define PERL_SYS_INIT3_BODY(argvp,argcp,envp) PERL_SYS_INIT_BODY(argvp,argcp) +# define PERL_SYS_INIT3_BODY(argvp,argcp,envp) PERL_SYS_INIT_BODY(argvp,argcp) #endif /* @@ -3586,9 +3586,9 @@ any remaining Perl interpreters. =cut */ -#define PERL_SYS_INIT(argc, argv) Perl_sys_init(argc, argv) +#define PERL_SYS_INIT(argc, argv) Perl_sys_init(argc, argv) #define PERL_SYS_INIT3(argc, argv, env) Perl_sys_init3(argc, argv, env) -#define PERL_SYS_TERM() Perl_sys_term() +#define PERL_SYS_TERM() Perl_sys_term() #ifndef PERL_WRITE_MSG_TO_CONSOLE # define PERL_WRITE_MSG_TO_CONSOLE(io, msg, len) PerlIO_write(io, msg, len) @@ -3602,15 +3602,15 @@ any remaining Perl interpreters. * the null byte or not. Later amendments of POSIX, XPG4, the Austin * Group, and the Single UNIX Specification all explicitly include * the null byte in the PATH_MAX. Ditto for _POSIX_PATH_MAX. */ -# define MAXPATHLEN PATH_MAX +# define MAXPATHLEN PATH_MAX # else -# define MAXPATHLEN _POSIX_PATH_MAX +# define MAXPATHLEN _POSIX_PATH_MAX # endif # else -# define MAXPATHLEN (PATH_MAX+1) +# define MAXPATHLEN (PATH_MAX+1) # endif # else -# define MAXPATHLEN 1024 /* Err on the large side. */ +# define MAXPATHLEN 1024 /* Err on the large side. */ # endif #endif @@ -3631,10 +3631,10 @@ any remaining Perl interpreters. (defined(__apple_build_version__) && \ ((__clang_major__ == 6 && __clang_minor__ >= 1) || \ (__clang_major__ >= 7)))) -# define PERL_TSA__(x) __attribute__((x)) +# define PERL_TSA__(x) __attribute__((x)) # define PERL_TSA_ACTIVE #else -# define PERL_TSA__(x) /* No TSA, make TSA attributes no-ops. */ +# define PERL_TSA__(x) /* No TSA, make TSA attributes no-ops. */ # undef PERL_TSA_ACTIVE #endif @@ -3765,7 +3765,7 @@ EXTERN_C int perl_tsa_mutex_unlock(perl_mutex* mutex) #define STATUS_UNIX PL_statusvalue #ifdef VMS -# define STATUS_NATIVE PL_statusvalue_vms +# define STATUS_NATIVE PL_statusvalue_vms /* * vaxc$errno is only guaranteed to be valid if errno == EVMSERR, * otherwise its contents can not be trusted. Unfortunately, @@ -3777,9 +3777,9 @@ EXTERN_C int perl_tsa_mutex_unlock(perl_mutex* mutex) /* Presume this because if VMS changes it, it will require a new set * of APIs for waiting on children for binary compatibility. */ -# define child_offset_bits (8) +# define child_offset_bits (8) # ifndef C_FAC_POSIX -# define C_FAC_POSIX 0x35A000 +# define C_FAC_POSIX 0x35A000 # endif /* STATUS_EXIT - validates and returns a NATIVE exit status code for @@ -3833,9 +3833,9 @@ EXTERN_C int perl_tsa_mutex_unlock(perl_mutex* mutex) } STMT_END # ifdef VMSISH_STATUS -# define STATUS_CURRENT (VMSISH_STATUS ? STATUS_NATIVE : STATUS_UNIX) +# define STATUS_CURRENT (VMSISH_STATUS ? STATUS_NATIVE : STATUS_UNIX) # else -# define STATUS_CURRENT STATUS_UNIX +# define STATUS_CURRENT STATUS_UNIX # endif /* STATUS_UNIX_SET - takes a UNIX/POSIX errno value and attempts to @@ -3948,7 +3948,7 @@ EXTERN_C int perl_tsa_mutex_unlock(perl_mutex* mutex) #elif defined(__amigaos4__) /* A somewhat experimental attempt to simulate posix return code values */ -# define STATUS_NATIVE PL_statusvalue_posix +# define STATUS_NATIVE PL_statusvalue_posix # define STATUS_NATIVE_CHILD_SET(n) \ STMT_START { \ PL_statusvalue_posix = (n); \ @@ -3966,14 +3966,14 @@ EXTERN_C int perl_tsa_mutex_unlock(perl_mutex* mutex) PL_statusvalue &= 0xFFFF; \ } STMT_END # define STATUS_UNIX_EXIT_SET(n) STATUS_UNIX_SET(n) -# define STATUS_EXIT_SET(n) STATUS_UNIX_SET(n) -# define STATUS_CURRENT STATUS_UNIX -# define STATUS_EXIT STATUS_UNIX -# define STATUS_ALL_SUCCESS (PL_statusvalue = 0, PL_statusvalue_posix = 0) -# define STATUS_ALL_FAILURE (PL_statusvalue = 1, PL_statusvalue_posix = 1) +# define STATUS_EXIT_SET(n) STATUS_UNIX_SET(n) +# define STATUS_CURRENT STATUS_UNIX +# define STATUS_EXIT STATUS_UNIX +# define STATUS_ALL_SUCCESS (PL_statusvalue = 0, PL_statusvalue_posix = 0) +# define STATUS_ALL_FAILURE (PL_statusvalue = 1, PL_statusvalue_posix = 1) #else -# define STATUS_NATIVE PL_statusvalue_posix +# define STATUS_NATIVE PL_statusvalue_posix # if defined(WCOREDUMP) # define STATUS_NATIVE_CHILD_SET(n) \ STMT_START { \ @@ -4018,19 +4018,19 @@ EXTERN_C int perl_tsa_mutex_unlock(perl_mutex* mutex) PL_statusvalue &= 0xFFFF; \ } STMT_END # define STATUS_UNIX_EXIT_SET(n) STATUS_UNIX_SET(n) -# define STATUS_EXIT_SET(n) STATUS_UNIX_SET(n) -# define STATUS_CURRENT STATUS_UNIX -# define STATUS_EXIT STATUS_UNIX -# define STATUS_ALL_SUCCESS (PL_statusvalue = 0, PL_statusvalue_posix = 0) -# define STATUS_ALL_FAILURE (PL_statusvalue = 1, PL_statusvalue_posix = 1) +# define STATUS_EXIT_SET(n) STATUS_UNIX_SET(n) +# define STATUS_CURRENT STATUS_UNIX +# define STATUS_EXIT STATUS_UNIX +# define STATUS_ALL_SUCCESS (PL_statusvalue = 0, PL_statusvalue_posix = 0) +# define STATUS_ALL_FAILURE (PL_statusvalue = 1, PL_statusvalue_posix = 1) #endif /* flags in PL_exit_flags for nature of exit() */ -#define PERL_EXIT_EXPECTED 0x01 -#define PERL_EXIT_DESTRUCT_END 0x02 /* Run END in perl_destruct */ -#define PERL_EXIT_WARN 0x04 /* Warn if Perl_my_exit() or +#define PERL_EXIT_EXPECTED 0x01 +#define PERL_EXIT_DESTRUCT_END 0x02 /* Run END in perl_destruct */ +#define PERL_EXIT_WARN 0x04 /* Warn if Perl_my_exit() or Perl_my_failure_exit() called */ -#define PERL_EXIT_ABORT 0x08 /* Call abort() if Perl_my_exit() or +#define PERL_EXIT_ABORT 0x08 /* Call abort() if Perl_my_exit() or Perl_my_failure_exit() called */ #ifndef PERL_CORE @@ -4044,7 +4044,7 @@ EXTERN_C int perl_tsa_mutex_unlock(perl_mutex* mutex) #endif #ifndef PERL_FS_VERSION -# define PERL_FS_VERSION PERL_VERSION_STRING +# define PERL_FS_VERSION PERL_VERSION_STRING #endif /* @@ -4062,16 +4062,16 @@ fflush(NULL) out there, Solaris being the most prominent. #ifndef PERL_FLUSHALL_FOR_CHILD # if defined(USE_PERLIO) || defined(FFLUSH_NULL) -# define PERL_FLUSHALL_FOR_CHILD PerlIO_flush((PerlIO*)NULL) +# define PERL_FLUSHALL_FOR_CHILD PerlIO_flush((PerlIO*)NULL) # elif defined(FFLUSH_ALL) -# define PERL_FLUSHALL_FOR_CHILD my_fflush_all() +# define PERL_FLUSHALL_FOR_CHILD my_fflush_all() # else -# define PERL_FLUSHALL_FOR_CHILD NOOP +# define PERL_FLUSHALL_FOR_CHILD NOOP # endif #endif #ifndef PERL_WAIT_FOR_CHILDREN -# define PERL_WAIT_FOR_CHILDREN NOOP +# define PERL_WAIT_FOR_CHILDREN NOOP #endif /* the traditional thread-unsafe notion of "current interpreter". */ @@ -4083,12 +4083,12 @@ fflush(NULL) out there, Solaris being the most prominent. #endif #ifndef PERL_GET_INTERP -# define PERL_GET_INTERP (PL_curinterp) +# define PERL_GET_INTERP (PL_curinterp) #endif #if defined(MULTIPLICITY) && !defined(PERL_GET_THX) -# define PERL_GET_THX ((PerlInterpreter *)PERL_GET_CONTEXT) -# define PERL_SET_THX(t) PERL_SET_CONTEXT(t) +# define PERL_GET_THX ((PerlInterpreter *)PERL_GET_CONTEXT) +# define PERL_SET_THX(t) PERL_SET_CONTEXT(t) #endif /* @@ -4104,58 +4104,58 @@ fflush(NULL) out there, Solaris being the most prominent. */ #ifndef SVf_ -# define SVf_(n) "-" STRINGIFY(n) "p" +# define SVf_(n) "-" STRINGIFY(n) "p" #endif #ifndef SVf -# define SVf "-p" +# define SVf "-p" #endif #ifndef SVf32 -# define SVf32 SVf_(32) +# define SVf32 SVf_(32) #endif #ifndef SVf256 -# define SVf256 SVf_(256) +# define SVf256 SVf_(256) #endif -#define SVfARG(p) ((void*)(p)) +#define SVfARG(p) ((void*)(p)) /* Render an SV as a quoted and escaped string suitable for an * error message. Only shows the first PERL_QUOTEDPREFIX_LEN * characters, and adds ellipses if the string is too long. */ #ifndef PERL_QUOTEDPREFIX_LEN -# define PERL_QUOTEDPREFIX_LEN 256 +# define PERL_QUOTEDPREFIX_LEN 256 #endif #ifndef SVf_QUOTEDPREFIX -# define SVf_QUOTEDPREFIX "5p" +# define SVf_QUOTEDPREFIX "5p" #endif /* like %s but runs through the quoted prefix logic */ #ifndef PVf_QUOTEDPREFIX -# define PVf_QUOTEDPREFIX "1p" +# define PVf_QUOTEDPREFIX "1p" #endif #ifndef HEKf -# define HEKf "2p" +# define HEKf "2p" #endif #ifndef HEKf_QUOTEDPREFIX -# define HEKf_QUOTEDPREFIX "7p" +# define HEKf_QUOTEDPREFIX "7p" #endif /* Not ideal, but we cannot easily include a number * in an already-numeric format sequence. */ #ifndef HEKf256 -# define HEKf256 "3p" +# define HEKf256 "3p" #endif #ifndef HEKf256_QUOTEDPREFIX # define HEKf256_QUOTEDPREFIX "8p" #endif -#define HEKfARG(p) ((void*)(p)) +#define HEKfARG(p) ((void*)(p)) /* Documented in perlguts * @@ -4163,15 +4163,15 @@ fflush(NULL) out there, Solaris being the most prominent. * They only occur when prefixed by specific other formats. */ #ifndef UTF8f -# define UTF8f "d%" UVuf "%4p" +# define UTF8f "d%" UVuf "%4p" #endif #ifndef UTF8f_QUOTEDPREFIX # define UTF8f_QUOTEDPREFIX "d%" UVuf "%9p" #endif #define UTF8fARG(u,l,p) (int)cBOOL(u), (UV)(l), (void*)(p) -#define PNf UTF8f -#define PNfARG(pn) (int)1, (UV)PadnameLEN(pn), (void *)PadnamePV(pn) +#define PNf UTF8f +#define PNfARG(pn) (int)1, (UV)PadnameLEN(pn), (void *)PadnamePV(pn) #ifdef PERL_CORE @@ -4184,11 +4184,11 @@ fflush(NULL) out there, Solaris being the most prominent. */ # undef UVf #elif !defined(UVf) -# define UVf UVuf +# define UVf UVuf #endif #if !defined(DEBUGGING) && !defined(NDEBUG) -# define NDEBUG 1 +# define NDEBUG 1 #endif #include @@ -4196,15 +4196,15 @@ fflush(NULL) out there, Solaris being the most prominent. appropriate to call return. In either case, include the lint directive. */ #ifdef HASATTRIBUTE_NORETURN -# define NORETURN_FUNCTION_END NOT_REACHED; +# define NORETURN_FUNCTION_END NOT_REACHED; #else -# define NORETURN_FUNCTION_END NOT_REACHED; return 0 +# define NORETURN_FUNCTION_END NOT_REACHED; return 0 #endif #ifdef HAS_BUILTIN_EXPECT -# define EXPECT(expr,val) __builtin_expect(expr,val) +# define EXPECT(expr,val) __builtin_expect(expr,val) #else -# define EXPECT(expr,val) (expr) +# define EXPECT(expr,val) (expr) #endif /* @@ -4222,8 +4222,8 @@ hint to the compiler that this condition is likely to be false. =cut */ -#define LIKELY(cond) EXPECT(cBOOL(cond),TRUE) -#define UNLIKELY(cond) EXPECT(cBOOL(cond),FALSE) +#define LIKELY(cond) EXPECT(cBOOL(cond),TRUE) +#define UNLIKELY(cond) EXPECT(cBOOL(cond),FALSE) #ifdef HAS_BUILTIN_CHOOSE_EXPR /* placeholder */ @@ -4250,7 +4250,7 @@ hint to the compiler that this condition is likely to be false. or a compiler builtin in C++11. But IBM XL C V11 does not support _Static_assert, no matter what says. */ -# define STATIC_ASSERT_DECL(COND) static_assert(COND, #COND) +# define STATIC_ASSERT_DECL(COND) static_assert(COND, #COND) #else /* We use a bit-field instead of an array because gcc accepts 'typedef char x[n]' where n is not a compile-time @@ -4270,7 +4270,7 @@ hint to the compiler that this condition is likely to be false. STMT_START { STATIC_ASSERT_DECL(COND); } STMT_END #ifndef __has_builtin -# define __has_builtin(x) 0 /* not a clang style compiler */ +# define __has_builtin(x) 0 /* not a clang style compiler */ #endif /* @@ -4293,7 +4293,7 @@ MSVC's C<__assume> intrinsic function, see its documents for more details. #endif #ifdef DEBUGGING -# define ASSUME(x) assert(x) +# define ASSUME(x) assert(x) #elif __has_builtin(__builtin_assume) # if defined(__clang__) || defined(__clang) # define ASSUME(x) \ @@ -4301,20 +4301,20 @@ MSVC's C<__assume> intrinsic function, see its documents for more details. __builtin_assume (x) \ CLANG_DIAG_RESTORE # else -# define ASSUME(x) __builtin_assume(x) +# define ASSUME(x) __builtin_assume(x) # endif #elif defined(_MSC_VER) -# define ASSUME(x) __assume(x) +# define ASSUME(x) __assume(x) #elif defined(__ARMCC_VERSION) /* untested */ -# define ASSUME(x) __promise(x) +# define ASSUME(x) __promise(x) #elif defined(HAS_BUILTIN_UNREACHABLE) /* Compilers can take the hint from something being unreachable */ -# define ASSUME(x) ((x) ? (void) 0 : __builtin_unreachable()) +# define ASSUME(x) ((x) ? (void) 0 : __builtin_unreachable()) #else /* Not DEBUGGING, so assert() is a no-op, but a random compiler * might define assert() to its own special optimization token * so pass it through to C lib as a last resort */ -# define ASSUME(x) assert(x) +# define ASSUME(x) assert(x) #endif #ifdef HAS_BUILTIN_UNREACHABLE @@ -4327,7 +4327,7 @@ MSVC's C<__assume> intrinsic function, see its documents for more details. /* These just complain that NOT_REACHED isn't reached */ # define NOT_REACHED #else -# define NOT_REACHED ASSUME(!"UNREACHABLE") +# define NOT_REACHED ASSUME(!"UNREACHABLE") #endif /* Some unistd.h's give a prototype for pause() even though @@ -4335,9 +4335,9 @@ MSVC's C<__assume> intrinsic function, see its documents for more details. below to be rejected by the compiler. Sigh. */ #ifdef HAS_PAUSE -#define Pause pause +#define Pause pause #else -#define Pause() sleep((32767<<16)+32767) +#define Pause() sleep((32767<<16)+32767) #endif #ifndef IOCPARM_LEN @@ -4346,10 +4346,10 @@ MSVC's C<__assume> intrinsic function, see its documents for more details. # define IOCPARM_LEN(x) (((x) >> 16) & IOCPARM_MASK) # elif defined(_IOC_SIZE) && defined(__GLIBC__) /* on Linux systems we're safe; except when we're not [perl #38223] */ -# define IOCPARM_LEN(x) (_IOC_SIZE(x) < 256 ? 256 : _IOC_SIZE(x)) +# define IOCPARM_LEN(x) (_IOC_SIZE(x) < 256 ? 256 : _IOC_SIZE(x)) # else /* otherwise guess at what's safe */ -# define IOCPARM_LEN(x) 256 +# define IOCPARM_LEN(x) 256 # endif #endif @@ -4359,7 +4359,7 @@ MSVC's C<__assume> intrinsic function, see its documents for more details. * mode) to insure that a file is in "binary" mode -- that is, that * no translation of bytes occurs on read or write operations. */ -# define USEMYBINMODE /**/ +# define USEMYBINMODE /**/ # include /* for setmode() prototype */ # define my_binmode(fp, iotype, mode) \ cBOOL(PerlLIO_setmode(fileno(fp), mode) != -1) @@ -4398,7 +4398,7 @@ union any { typedef I32 (*filter_t) (pTHX_ int, SV *, int); -#define FILTER_READ(idx, sv, len) filter_read(idx, sv, len) +#define FILTER_READ(idx, sv, len) filter_read(idx, sv, len) #define FILTER_DATA(idx) \ (PL_parser ? AvARRAY(PL_parser->rsfp_filters)[idx] : NULL) #define FILTER_ISREADER(idx) \ @@ -4426,7 +4426,7 @@ typedef struct crypt_data { /* straight from /usr/include/crypt.h #ifndef PERL_CALLCONV # ifdef __cplusplus -# define PERL_CALLCONV EXTERN_C +# define PERL_CALLCONV EXTERN_C # else # define PERL_CALLCONV # endif @@ -4439,18 +4439,18 @@ typedef struct crypt_data { /* straight from /usr/include/crypt.h builds that dont have a noreturn as a declaration specifier */ #ifndef PERL_STATIC_NO_RET -# define PERL_STATIC_NO_RET STATIC +# define PERL_STATIC_NO_RET STATIC #endif /* PERL_STATIC_INLINE_NO_RET is supposed to be equivalent to PERL_STATIC_INLINE * on builds that dont have a noreturn as a declaration specifier */ #ifndef PERL_STATIC_INLINE_NO_RET -# define PERL_STATIC_INLINE_NO_RET PERL_STATIC_INLINE +# define PERL_STATIC_INLINE_NO_RET PERL_STATIC_INLINE #endif #ifndef PERL_STATIC_FORCE_INLINE -# define PERL_STATIC_FORCE_INLINE PERL_STATIC_INLINE +# define PERL_STATIC_FORCE_INLINE PERL_STATIC_INLINE #endif #ifndef PERL_STATIC_FORCE_INLINE_NO_RET @@ -4483,23 +4483,23 @@ typedef struct crypt_data { /* straight from /usr/include/crypt.h /* macros to define bit-fields in structs. */ #ifndef PERL_BITFIELD8 # ifdef HAS_NON_INT_BITFIELDS -# define PERL_BITFIELD8 U8 +# define PERL_BITFIELD8 U8 # else -# define PERL_BITFIELD8 unsigned +# define PERL_BITFIELD8 unsigned # endif #endif #ifndef PERL_BITFIELD16 # ifdef HAS_NON_INT_BITFIELDS -# define PERL_BITFIELD16 U16 +# define PERL_BITFIELD16 U16 # else -# define PERL_BITFIELD16 unsigned +# define PERL_BITFIELD16 unsigned # endif #endif #ifndef PERL_BITFIELD32 # ifdef HAS_NON_INT_BITFIELDS -# define PERL_BITFIELD32 U32 +# define PERL_BITFIELD32 U32 # else -# define PERL_BITFIELD32 unsigned +# define PERL_BITFIELD32 unsigned # endif #endif @@ -4521,8 +4521,8 @@ typedef struct crypt_data { /* straight from /usr/include/crypt.h #include "utf8.h" /* these would be in doio.h if there was such a file */ -#define my_stat() my_stat_flags(SV_GMAGIC) -#define my_lstat() my_lstat_flags(SV_GMAGIC) +#define my_stat() my_stat_flags(SV_GMAGIC) +#define my_lstat() my_lstat_flags(SV_GMAGIC) /* defined in sv.c, but also used in [ach]v.c */ #undef _XPV_HEAD @@ -4589,10 +4589,10 @@ struct ptr_tbl { /* Big endian system, so ntohl, ntohs, htonl and htons do not need to re-order their values. However, to behave identically to the alternative implementations, they should truncate to the correct size. */ -# define ntohl(x) ((x)&0xFFFFFFFF) -# define htonl(x) ntohl(x) -# define ntohs(x) ((x)&0xFFFF) -# define htons(x) ntohs(x) +# define ntohl(x) ((x)&0xFFFFFFFF) +# define htonl(x) ntohl(x) +# define ntohs(x) ((x)&0xFFFF) +# define htons(x) ntohs(x) # elif BYTEORDER == 0x1234 || BYTEORDER == 0x12345678 /* Note that we can't straight out declare our own htonl and htons because the @@ -4612,10 +4612,10 @@ my_swap16(const U16 x) { return ((x & 0xFF) << 8) | ((x >> 8) & 0xFF); } -# define htonl(x) my_swap32(x) -# define ntohl(x) my_swap32(x) -# define ntohs(x) my_swap16(x) -# define htons(x) my_swap16(x) +# define htonl(x) my_swap32(x) +# define ntohl(x) my_swap32(x) +# define ntohs(x) my_swap16(x) +# define htons(x) my_swap16(x) # else # error "Unsupported byteorder" /* The C pre-processor doesn't let us return the value of BYTEORDER as part of @@ -4639,19 +4639,19 @@ my_swap16(const U16 x) { /* Little endian system, so vtohl, vtohs, htovl and htovs do not need to re-order their values. However, to behave identically to the alternative implementations, they should truncate to the correct size. */ -# define vtohl(x) ((x)&0xFFFFFFFF) -# define vtohs(x) ((x)&0xFFFF) -# define htovl(x) vtohl(x) -# define htovs(x) vtohs(x) +# define vtohl(x) ((x)&0xFFFFFFFF) +# define vtohs(x) ((x)&0xFFFF) +# define htovl(x) vtohl(x) +# define htovs(x) vtohs(x) #elif BYTEORDER == 0x4321 || BYTEORDER == 0x87654321 # define vtohl(x) \ ((((x)&0xFF)<<24) \ +(((x)>>24)&0xFF) \ +(((x)&0x0000FF00)<<8) \ +(((x)&0x00FF0000)>>8) ) -# define vtohs(x) ((((x)&0xFF)<<8) + (((x)>>8)&0xFF)) -# define htovl(x) vtohl(x) -# define htovs(x) vtohs(x) +# define vtohs(x) ((((x)&0xFF)<<8) + (((x)>>8)&0xFF)) +# define htovl(x) vtohl(x) +# define htovs(x) vtohs(x) #else # error "Unsupported byteorder" /* If you have need for current perl on PDP-11 or similar, and can help test @@ -4665,17 +4665,17 @@ my_swap16(const U16 x) { that some broken compiler will want the value cast to I32. [after the shift, as signed >> may not be as secure as unsigned >>] */ -#define I32_MAX_P1 (2.0 * (1 + (((U32)I32_MAX) >> 1))) -#define U32_MAX_P1 (4.0 * (1 + ((U32_MAX) >> 2))) +#define I32_MAX_P1 (2.0 * (1 + (((U32)I32_MAX) >> 1))) +#define U32_MAX_P1 (4.0 * (1 + ((U32_MAX) >> 2))) /* For compilers that can't correctly cast NVs over 0x7FFFFFFF (or 0x7FFFFFFFFFFFFFFF) to an unsigned integer. In the future, sizeof(UV) may be greater than sizeof(IV), so don't assume that half max UV is max IV. */ -#define U32_MAX_P1_HALF (2.0 * (1 + ((U32_MAX) >> 2))) +#define U32_MAX_P1_HALF (2.0 * (1 + ((U32_MAX) >> 2))) -#define UV_MAX_P1 (4.0 * (1 + ((UV_MAX) >> 2))) -#define IV_MAX_P1 (2.0 * (1 + (((UV)IV_MAX) >> 1))) -#define UV_MAX_P1_HALF (2.0 * (1 + ((UV_MAX) >> 2))) +#define UV_MAX_P1 (4.0 * (1 + ((UV_MAX) >> 2))) +#define IV_MAX_P1 (2.0 * (1 + (((UV)IV_MAX) >> 1))) +#define UV_MAX_P1_HALF (2.0 * (1 + ((UV_MAX) >> 2))) /* This may look like unnecessary jumping through hoops, but converting out of range floating point values to integers @@ -4696,10 +4696,10 @@ my_swap16(const U16 x) { =cut */ #ifndef CAST_INLINE -#define I_32(what) (cast_i32((NV)(what))) -#define U_32(what) (cast_ulong((NV)(what))) -#define I_V(what) (cast_iv((NV)(what))) -#define U_V(what) (cast_uv((NV)(what))) +#define I_32(what) (cast_i32((NV)(what))) +#define U_32(what) (cast_ulong((NV)(what))) +#define I_V(what) (cast_iv((NV)(what))) +#define U_V(what) (cast_uv((NV)(what))) #else #define I_32(n) \ ((n) < I32_MAX_P1 ? ((n) < I32_MIN ? I32_MIN : (I32) (n)) \ @@ -4719,9 +4719,9 @@ my_swap16(const U16 x) { : ((n) > 0 ? UV_MAX : 0 /* NaN */))) #endif -#define U_S(what) ((U16)U_32(what)) -#define U_I(what) ((unsigned int)U_32(what)) -#define U_L(what) U_32(what) +#define U_S(what) ((U16)U_32(what)) +#define U_I(what) ((unsigned int)U_32(what)) +#define U_L(what) U_32(what) /* =for apidoc_section $integer @@ -4744,21 +4744,21 @@ platform. It should equal zero. #ifdef HAS_SIGNBIT # ifndef Perl_signbit -# define Perl_signbit signbit +# define Perl_signbit signbit # endif #endif /* These do not care about the fractional part, only about the range. */ -#define NV_WITHIN_IV(nv) (I_V(nv) >= IV_MIN && I_V(nv) <= IV_MAX) -#define NV_WITHIN_UV(nv) ((nv)>=0.0 && U_V(nv) >= UV_MIN && U_V(nv) <= UV_MAX) +#define NV_WITHIN_IV(nv) (I_V(nv) >= IV_MIN && I_V(nv) <= IV_MAX) +#define NV_WITHIN_UV(nv) ((nv)>=0.0 && U_V(nv) >= UV_MIN && U_V(nv) <= UV_MAX) /* Used with UV/IV arguments: */ /* XXXX: need to speed it up */ -#define CLUMP_2UV(iv) ((iv) < 0 ? 0 : (UV)(iv)) -#define CLUMP_2IV(uv) ((uv) > (UV)IV_MAX ? IV_MAX : (IV)(uv)) +#define CLUMP_2UV(iv) ((iv) < 0 ? 0 : (UV)(iv)) +#define CLUMP_2IV(uv) ((uv) > (UV)IV_MAX ? IV_MAX : (IV)(uv)) #ifndef MAXSYSFD -# define MAXSYSFD 2 +# define MAXSYSFD 2 #endif #ifndef __cplusplus @@ -4771,7 +4771,7 @@ Gid_t getegid (void); #endif #ifndef Perl_debug_log -# define Perl_debug_log PerlIO_stderr() +# define Perl_debug_log PerlIO_stderr() #endif #ifndef Perl_error_log @@ -4785,40 +4785,40 @@ Gid_t getegid (void); #endif -#define DEBUG_p_FLAG 0x00000001 /* 1 */ -#define DEBUG_s_FLAG 0x00000002 /* 2 */ -#define DEBUG_l_FLAG 0x00000004 /* 4 */ -#define DEBUG_t_FLAG 0x00000008 /* 8 */ -#define DEBUG_o_FLAG 0x00000010 /* 16 */ -#define DEBUG_c_FLAG 0x00000020 /* 32 */ -#define DEBUG_P_FLAG 0x00000040 /* 64 */ -#define DEBUG_m_FLAG 0x00000080 /* 128 */ -#define DEBUG_f_FLAG 0x00000100 /* 256 */ -#define DEBUG_r_FLAG 0x00000200 /* 512 */ -#define DEBUG_x_FLAG 0x00000400 /* 1024 */ -#define DEBUG_u_FLAG 0x00000800 /* 2048 */ +#define DEBUG_p_FLAG 0x00000001 /* 1 */ +#define DEBUG_s_FLAG 0x00000002 /* 2 */ +#define DEBUG_l_FLAG 0x00000004 /* 4 */ +#define DEBUG_t_FLAG 0x00000008 /* 8 */ +#define DEBUG_o_FLAG 0x00000010 /* 16 */ +#define DEBUG_c_FLAG 0x00000020 /* 32 */ +#define DEBUG_P_FLAG 0x00000040 /* 64 */ +#define DEBUG_m_FLAG 0x00000080 /* 128 */ +#define DEBUG_f_FLAG 0x00000100 /* 256 */ +#define DEBUG_r_FLAG 0x00000200 /* 512 */ +#define DEBUG_x_FLAG 0x00000400 /* 1024 */ +#define DEBUG_u_FLAG 0x00000800 /* 2048 */ /* U is reserved for Unofficial, exploratory hacking */ -#define DEBUG_U_FLAG 0x00001000 /* 4096 */ -#define DEBUG_h_FLAG 0x00002000 /* 8192 */ -#define DEBUG_X_FLAG 0x00004000 /* 16384 */ -#define DEBUG_D_FLAG 0x00008000 /* 32768 */ -#define DEBUG_S_FLAG 0x00010000 /* 65536 */ -#define DEBUG_T_FLAG 0x00020000 /* 131072 */ -#define DEBUG_R_FLAG 0x00040000 /* 262144 */ -#define DEBUG_J_FLAG 0x00080000 /* 524288 */ -#define DEBUG_v_FLAG 0x00100000 /*1048576 */ -#define DEBUG_C_FLAG 0x00200000 /*2097152 */ -#define DEBUG_A_FLAG 0x00400000 /*4194304 */ -#define DEBUG_q_FLAG 0x00800000 /*8388608 */ -#define DEBUG_M_FLAG 0x01000000 /*16777216*/ -#define DEBUG_B_FLAG 0x02000000 /*33554432*/ -#define DEBUG_L_FLAG 0x04000000 /*67108864*/ -#define DEBUG_i_FLAG 0x08000000 /*134217728*/ -#define DEBUG_y_FLAG 0x10000000 /*268435456*/ -#define DEBUG_MASK 0x1FFFEFFF /* mask of all the standard flags */ - -#define DEBUG_DB_RECURSE_FLAG 0x40000000 -#define DEBUG_TOP_FLAG 0x80000000 /* -D was given --> PL_debug +#define DEBUG_U_FLAG 0x00001000 /* 4096 */ +#define DEBUG_h_FLAG 0x00002000 /* 8192 */ +#define DEBUG_X_FLAG 0x00004000 /* 16384 */ +#define DEBUG_D_FLAG 0x00008000 /* 32768 */ +#define DEBUG_S_FLAG 0x00010000 /* 65536 */ +#define DEBUG_T_FLAG 0x00020000 /* 131072 */ +#define DEBUG_R_FLAG 0x00040000 /* 262144 */ +#define DEBUG_J_FLAG 0x00080000 /* 524288 */ +#define DEBUG_v_FLAG 0x00100000 /*1048576 */ +#define DEBUG_C_FLAG 0x00200000 /*2097152 */ +#define DEBUG_A_FLAG 0x00400000 /*4194304 */ +#define DEBUG_q_FLAG 0x00800000 /*8388608 */ +#define DEBUG_M_FLAG 0x01000000 /*16777216*/ +#define DEBUG_B_FLAG 0x02000000 /*33554432*/ +#define DEBUG_L_FLAG 0x04000000 /*67108864*/ +#define DEBUG_i_FLAG 0x08000000 /*134217728*/ +#define DEBUG_y_FLAG 0x10000000 /*268435456*/ +#define DEBUG_MASK 0x1FFFEFFF /* mask of all the standard flags */ + +#define DEBUG_DB_RECURSE_FLAG 0x40000000 +#define DEBUG_TOP_FLAG 0x80000000 /* -D was given --> PL_debug |= FLAG */ /* Both flags have to be set */ @@ -4826,37 +4826,37 @@ Gid_t getegid (void); UNLIKELY((PL_debug & ((flag1)|(flag2))) \ == ((flag1)|(flag2))) -# define DEBUG_p_TEST_ UNLIKELY(PL_debug & DEBUG_p_FLAG) -# define DEBUG_s_TEST_ UNLIKELY(PL_debug & DEBUG_s_FLAG) -# define DEBUG_l_TEST_ UNLIKELY(PL_debug & DEBUG_l_FLAG) -# define DEBUG_t_TEST_ UNLIKELY(PL_debug & DEBUG_t_FLAG) -# define DEBUG_o_TEST_ UNLIKELY(PL_debug & DEBUG_o_FLAG) -# define DEBUG_c_TEST_ UNLIKELY(PL_debug & DEBUG_c_FLAG) -# define DEBUG_P_TEST_ UNLIKELY(PL_debug & DEBUG_P_FLAG) -# define DEBUG_m_TEST_ UNLIKELY(PL_debug & DEBUG_m_FLAG) -# define DEBUG_f_TEST_ UNLIKELY(PL_debug & DEBUG_f_FLAG) -# define DEBUG_r_TEST_ UNLIKELY(PL_debug & DEBUG_r_FLAG) -# define DEBUG_x_TEST_ UNLIKELY(PL_debug & DEBUG_x_FLAG) -# define DEBUG_u_TEST_ UNLIKELY(PL_debug & DEBUG_u_FLAG) -# define DEBUG_U_TEST_ UNLIKELY(PL_debug & DEBUG_U_FLAG) -# define DEBUG_h_TEST_ UNLIKELY(PL_debug & DEBUG_h_FLAG) -# define DEBUG_X_TEST_ UNLIKELY(PL_debug & DEBUG_X_FLAG) -# define DEBUG_D_TEST_ UNLIKELY(PL_debug & DEBUG_D_FLAG) -# define DEBUG_S_TEST_ UNLIKELY(PL_debug & DEBUG_S_FLAG) -# define DEBUG_T_TEST_ UNLIKELY(PL_debug & DEBUG_T_FLAG) -# define DEBUG_R_TEST_ UNLIKELY(PL_debug & DEBUG_R_FLAG) -# define DEBUG_J_TEST_ UNLIKELY(PL_debug & DEBUG_J_FLAG) -# define DEBUG_v_TEST_ UNLIKELY(PL_debug & DEBUG_v_FLAG) -# define DEBUG_C_TEST_ UNLIKELY(PL_debug & DEBUG_C_FLAG) -# define DEBUG_A_TEST_ UNLIKELY(PL_debug & DEBUG_A_FLAG) -# define DEBUG_q_TEST_ UNLIKELY(PL_debug & DEBUG_q_FLAG) -# define DEBUG_M_TEST_ UNLIKELY(PL_debug & DEBUG_M_FLAG) -# define DEBUG_B_TEST_ UNLIKELY(PL_debug & DEBUG_B_FLAG) +# define DEBUG_p_TEST_ UNLIKELY(PL_debug & DEBUG_p_FLAG) +# define DEBUG_s_TEST_ UNLIKELY(PL_debug & DEBUG_s_FLAG) +# define DEBUG_l_TEST_ UNLIKELY(PL_debug & DEBUG_l_FLAG) +# define DEBUG_t_TEST_ UNLIKELY(PL_debug & DEBUG_t_FLAG) +# define DEBUG_o_TEST_ UNLIKELY(PL_debug & DEBUG_o_FLAG) +# define DEBUG_c_TEST_ UNLIKELY(PL_debug & DEBUG_c_FLAG) +# define DEBUG_P_TEST_ UNLIKELY(PL_debug & DEBUG_P_FLAG) +# define DEBUG_m_TEST_ UNLIKELY(PL_debug & DEBUG_m_FLAG) +# define DEBUG_f_TEST_ UNLIKELY(PL_debug & DEBUG_f_FLAG) +# define DEBUG_r_TEST_ UNLIKELY(PL_debug & DEBUG_r_FLAG) +# define DEBUG_x_TEST_ UNLIKELY(PL_debug & DEBUG_x_FLAG) +# define DEBUG_u_TEST_ UNLIKELY(PL_debug & DEBUG_u_FLAG) +# define DEBUG_U_TEST_ UNLIKELY(PL_debug & DEBUG_U_FLAG) +# define DEBUG_h_TEST_ UNLIKELY(PL_debug & DEBUG_h_FLAG) +# define DEBUG_X_TEST_ UNLIKELY(PL_debug & DEBUG_X_FLAG) +# define DEBUG_D_TEST_ UNLIKELY(PL_debug & DEBUG_D_FLAG) +# define DEBUG_S_TEST_ UNLIKELY(PL_debug & DEBUG_S_FLAG) +# define DEBUG_T_TEST_ UNLIKELY(PL_debug & DEBUG_T_FLAG) +# define DEBUG_R_TEST_ UNLIKELY(PL_debug & DEBUG_R_FLAG) +# define DEBUG_J_TEST_ UNLIKELY(PL_debug & DEBUG_J_FLAG) +# define DEBUG_v_TEST_ UNLIKELY(PL_debug & DEBUG_v_FLAG) +# define DEBUG_C_TEST_ UNLIKELY(PL_debug & DEBUG_C_FLAG) +# define DEBUG_A_TEST_ UNLIKELY(PL_debug & DEBUG_A_FLAG) +# define DEBUG_q_TEST_ UNLIKELY(PL_debug & DEBUG_q_FLAG) +# define DEBUG_M_TEST_ UNLIKELY(PL_debug & DEBUG_M_FLAG) +# define DEBUG_B_TEST_ UNLIKELY(PL_debug & DEBUG_B_FLAG) /* Locale initialization comes earlier than PL_debug gets set, * DEBUG_LOCALE_INITIALIZATION_, if defined, will be set early enough */ # ifndef DEBUG_LOCALE_INITIALIZATION_ -# define DEBUG_LOCALE_INITIALIZATION_ 0 +# define DEBUG_LOCALE_INITIALIZATION_ 0 # endif # define DEBUG_L_TEST_ \ ( UNLIKELY(DEBUG_LOCALE_INITIALIZATION_) \ @@ -4864,60 +4864,60 @@ Gid_t getegid (void); # define DEBUG_Lv_TEST_ \ ( UNLIKELY(DEBUG_LOCALE_INITIALIZATION_) \ || UNLIKELY(DEBUG_BOTH_FLAGS_TEST_(DEBUG_L_FLAG, DEBUG_v_FLAG))) -# define DEBUG_i_TEST_ UNLIKELY(PL_debug & DEBUG_i_FLAG) -# define DEBUG_y_TEST_ UNLIKELY(PL_debug & DEBUG_y_FLAG) -# define DEBUG_Xv_TEST_ DEBUG_BOTH_FLAGS_TEST_(DEBUG_X_FLAG, DEBUG_v_FLAG) -# define DEBUG_Uv_TEST_ DEBUG_BOTH_FLAGS_TEST_(DEBUG_U_FLAG, DEBUG_v_FLAG) -# define DEBUG_Pv_TEST_ DEBUG_BOTH_FLAGS_TEST_(DEBUG_P_FLAG, DEBUG_v_FLAG) -# define DEBUG_yv_TEST_ DEBUG_BOTH_FLAGS_TEST_(DEBUG_y_FLAG, DEBUG_v_FLAG) +# define DEBUG_i_TEST_ UNLIKELY(PL_debug & DEBUG_i_FLAG) +# define DEBUG_y_TEST_ UNLIKELY(PL_debug & DEBUG_y_FLAG) +# define DEBUG_Xv_TEST_ DEBUG_BOTH_FLAGS_TEST_(DEBUG_X_FLAG, DEBUG_v_FLAG) +# define DEBUG_Uv_TEST_ DEBUG_BOTH_FLAGS_TEST_(DEBUG_U_FLAG, DEBUG_v_FLAG) +# define DEBUG_Pv_TEST_ DEBUG_BOTH_FLAGS_TEST_(DEBUG_P_FLAG, DEBUG_v_FLAG) +# define DEBUG_yv_TEST_ DEBUG_BOTH_FLAGS_TEST_(DEBUG_y_FLAG, DEBUG_v_FLAG) #ifdef DEBUGGING -# define DEBUG_p_TEST DEBUG_p_TEST_ -# define DEBUG_s_TEST DEBUG_s_TEST_ -# define DEBUG_l_TEST DEBUG_l_TEST_ -# define DEBUG_t_TEST DEBUG_t_TEST_ -# define DEBUG_o_TEST DEBUG_o_TEST_ -# define DEBUG_c_TEST DEBUG_c_TEST_ -# define DEBUG_P_TEST DEBUG_P_TEST_ -# define DEBUG_m_TEST DEBUG_m_TEST_ -# define DEBUG_f_TEST DEBUG_f_TEST_ -# define DEBUG_r_TEST DEBUG_r_TEST_ -# define DEBUG_x_TEST DEBUG_x_TEST_ -# define DEBUG_u_TEST DEBUG_u_TEST_ -# define DEBUG_U_TEST DEBUG_U_TEST_ -# define DEBUG_h_TEST DEBUG_h_TEST_ -# define DEBUG_X_TEST DEBUG_X_TEST_ -# define DEBUG_D_TEST DEBUG_D_TEST_ -# define DEBUG_S_TEST DEBUG_S_TEST_ -# define DEBUG_T_TEST DEBUG_T_TEST_ -# define DEBUG_R_TEST DEBUG_R_TEST_ -# define DEBUG_J_TEST DEBUG_J_TEST_ -# define DEBUG_v_TEST DEBUG_v_TEST_ -# define DEBUG_C_TEST DEBUG_C_TEST_ -# define DEBUG_A_TEST DEBUG_A_TEST_ -# define DEBUG_q_TEST DEBUG_q_TEST_ -# define DEBUG_M_TEST DEBUG_M_TEST_ -# define DEBUG_B_TEST DEBUG_B_TEST_ -# define DEBUG_L_TEST DEBUG_L_TEST_ -# define DEBUG_i_TEST DEBUG_i_TEST_ -# define DEBUG_y_TEST DEBUG_y_TEST_ -# define DEBUG_Xv_TEST DEBUG_Xv_TEST_ -# define DEBUG_Uv_TEST DEBUG_Uv_TEST_ -# define DEBUG_Pv_TEST DEBUG_Pv_TEST_ -# define DEBUG_Lv_TEST DEBUG_Lv_TEST_ -# define DEBUG_yv_TEST DEBUG_yv_TEST_ - -# define PERL_DEB(a) a -# define PERL_DEB2(a,b) a -# define PERL_DEBUG(a) if (PL_debug) a -# define DEBUG_p(a) if (DEBUG_p_TEST) a -# define DEBUG_s(a) if (DEBUG_s_TEST) a -# define DEBUG_l(a) if (DEBUG_l_TEST) a -# define DEBUG_t(a) if (DEBUG_t_TEST) a -# define DEBUG_o(a) if (DEBUG_o_TEST) a -# define DEBUG_c(a) if (DEBUG_c_TEST) a -# define DEBUG_P(a) if (DEBUG_P_TEST) a +# define DEBUG_p_TEST DEBUG_p_TEST_ +# define DEBUG_s_TEST DEBUG_s_TEST_ +# define DEBUG_l_TEST DEBUG_l_TEST_ +# define DEBUG_t_TEST DEBUG_t_TEST_ +# define DEBUG_o_TEST DEBUG_o_TEST_ +# define DEBUG_c_TEST DEBUG_c_TEST_ +# define DEBUG_P_TEST DEBUG_P_TEST_ +# define DEBUG_m_TEST DEBUG_m_TEST_ +# define DEBUG_f_TEST DEBUG_f_TEST_ +# define DEBUG_r_TEST DEBUG_r_TEST_ +# define DEBUG_x_TEST DEBUG_x_TEST_ +# define DEBUG_u_TEST DEBUG_u_TEST_ +# define DEBUG_U_TEST DEBUG_U_TEST_ +# define DEBUG_h_TEST DEBUG_h_TEST_ +# define DEBUG_X_TEST DEBUG_X_TEST_ +# define DEBUG_D_TEST DEBUG_D_TEST_ +# define DEBUG_S_TEST DEBUG_S_TEST_ +# define DEBUG_T_TEST DEBUG_T_TEST_ +# define DEBUG_R_TEST DEBUG_R_TEST_ +# define DEBUG_J_TEST DEBUG_J_TEST_ +# define DEBUG_v_TEST DEBUG_v_TEST_ +# define DEBUG_C_TEST DEBUG_C_TEST_ +# define DEBUG_A_TEST DEBUG_A_TEST_ +# define DEBUG_q_TEST DEBUG_q_TEST_ +# define DEBUG_M_TEST DEBUG_M_TEST_ +# define DEBUG_B_TEST DEBUG_B_TEST_ +# define DEBUG_L_TEST DEBUG_L_TEST_ +# define DEBUG_i_TEST DEBUG_i_TEST_ +# define DEBUG_y_TEST DEBUG_y_TEST_ +# define DEBUG_Xv_TEST DEBUG_Xv_TEST_ +# define DEBUG_Uv_TEST DEBUG_Uv_TEST_ +# define DEBUG_Pv_TEST DEBUG_Pv_TEST_ +# define DEBUG_Lv_TEST DEBUG_Lv_TEST_ +# define DEBUG_yv_TEST DEBUG_yv_TEST_ + +# define PERL_DEB(a) a +# define PERL_DEB2(a,b) a +# define PERL_DEBUG(a) if (PL_debug) a +# define DEBUG_p(a) if (DEBUG_p_TEST) a +# define DEBUG_s(a) if (DEBUG_s_TEST) a +# define DEBUG_l(a) if (DEBUG_l_TEST) a +# define DEBUG_t(a) if (DEBUG_t_TEST) a +# define DEBUG_o(a) if (DEBUG_o_TEST) a +# define DEBUG_c(a) if (DEBUG_c_TEST) a +# define DEBUG_P(a) if (DEBUG_P_TEST) a /* Temporarily turn off memory debugging in case the a does * memory allocation, either directly or indirectly. */ @@ -4965,7 +4965,7 @@ Gid_t getegid (void); } \ } STMT_END -# define DEBUG_f(a) DEBUG__(DEBUG_f_TEST, a) +# define DEBUG_f(a) DEBUG__(DEBUG_f_TEST, a) /* For re_comp.c, re_exec.c, assume -Dr has been specified */ # ifdef PERL_EXT_RE_BUILD @@ -4974,72 +4974,72 @@ Gid_t getegid (void); DEBUG_PRE_STMTS a; DEBUG_POST_STMTS \ } STMT_END; # else -# define DEBUG_r(a) DEBUG__(DEBUG_r_TEST, a) +# define DEBUG_r(a) DEBUG__(DEBUG_r_TEST, a) # endif /* PERL_EXT_RE_BUILD */ -# define DEBUG_x(a) DEBUG__(DEBUG_x_TEST, a) -# define DEBUG_u(a) DEBUG__(DEBUG_u_TEST, a) -# define DEBUG_U(a) DEBUG__(DEBUG_U_TEST, a) -# define DEBUG_X(a) DEBUG__(DEBUG_X_TEST, a) -# define DEBUG_D(a) DEBUG__(DEBUG_D_TEST, a) -# define DEBUG_Xv(a) DEBUG__(DEBUG_Xv_TEST, a) -# define DEBUG_Uv(a) DEBUG__(DEBUG_Uv_TEST, a) -# define DEBUG_Pv(a) DEBUG__(DEBUG_Pv_TEST, a) -# define DEBUG_Lv(a) DEBUG__(DEBUG_Lv_TEST, a) -# define DEBUG_yv(a) DEBUG__(DEBUG_yv_TEST, a) - -# define DEBUG_S(a) DEBUG__(DEBUG_S_TEST, a) -# define DEBUG_T(a) DEBUG__(DEBUG_T_TEST, a) -# define DEBUG_R(a) DEBUG__(DEBUG_R_TEST, a) -# define DEBUG_v(a) DEBUG__(DEBUG_v_TEST, a) -# define DEBUG_C(a) DEBUG__(DEBUG_C_TEST, a) -# define DEBUG_A(a) DEBUG__(DEBUG_A_TEST, a) -# define DEBUG_q(a) DEBUG__(DEBUG_q_TEST, a) -# define DEBUG_M(a) DEBUG__(DEBUG_M_TEST, a) -# define DEBUG_B(a) DEBUG__(DEBUG_B_TEST, a) -# define DEBUG_L(a) DEBUG__(DEBUG_L_TEST, a) -# define DEBUG_i(a) DEBUG__(DEBUG_i_TEST, a) -# define DEBUG_y(a) DEBUG__(DEBUG_y_TEST, a) +# define DEBUG_x(a) DEBUG__(DEBUG_x_TEST, a) +# define DEBUG_u(a) DEBUG__(DEBUG_u_TEST, a) +# define DEBUG_U(a) DEBUG__(DEBUG_U_TEST, a) +# define DEBUG_X(a) DEBUG__(DEBUG_X_TEST, a) +# define DEBUG_D(a) DEBUG__(DEBUG_D_TEST, a) +# define DEBUG_Xv(a) DEBUG__(DEBUG_Xv_TEST, a) +# define DEBUG_Uv(a) DEBUG__(DEBUG_Uv_TEST, a) +# define DEBUG_Pv(a) DEBUG__(DEBUG_Pv_TEST, a) +# define DEBUG_Lv(a) DEBUG__(DEBUG_Lv_TEST, a) +# define DEBUG_yv(a) DEBUG__(DEBUG_yv_TEST, a) + +# define DEBUG_S(a) DEBUG__(DEBUG_S_TEST, a) +# define DEBUG_T(a) DEBUG__(DEBUG_T_TEST, a) +# define DEBUG_R(a) DEBUG__(DEBUG_R_TEST, a) +# define DEBUG_v(a) DEBUG__(DEBUG_v_TEST, a) +# define DEBUG_C(a) DEBUG__(DEBUG_C_TEST, a) +# define DEBUG_A(a) DEBUG__(DEBUG_A_TEST, a) +# define DEBUG_q(a) DEBUG__(DEBUG_q_TEST, a) +# define DEBUG_M(a) DEBUG__(DEBUG_M_TEST, a) +# define DEBUG_B(a) DEBUG__(DEBUG_B_TEST, a) +# define DEBUG_L(a) DEBUG__(DEBUG_L_TEST, a) +# define DEBUG_i(a) DEBUG__(DEBUG_i_TEST, a) +# define DEBUG_y(a) DEBUG__(DEBUG_y_TEST, a) #else /* ! DEBUGGING below */ -# define DEBUG_p_TEST (0) -# define DEBUG_s_TEST (0) -# define DEBUG_l_TEST (0) -# define DEBUG_t_TEST (0) -# define DEBUG_o_TEST (0) -# define DEBUG_c_TEST (0) -# define DEBUG_P_TEST (0) -# define DEBUG_m_TEST (0) -# define DEBUG_f_TEST (0) -# define DEBUG_r_TEST (0) -# define DEBUG_x_TEST (0) -# define DEBUG_u_TEST (0) -# define DEBUG_U_TEST (0) -# define DEBUG_h_TEST (0) -# define DEBUG_X_TEST (0) -# define DEBUG_D_TEST (0) -# define DEBUG_S_TEST (0) -# define DEBUG_T_TEST (0) -# define DEBUG_R_TEST (0) -# define DEBUG_J_TEST (0) -# define DEBUG_v_TEST (0) -# define DEBUG_C_TEST (0) -# define DEBUG_A_TEST (0) -# define DEBUG_q_TEST (0) -# define DEBUG_M_TEST (0) -# define DEBUG_B_TEST (0) -# define DEBUG_L_TEST (0) -# define DEBUG_i_TEST (0) -# define DEBUG_y_TEST (0) -# define DEBUG_Xv_TEST (0) -# define DEBUG_Uv_TEST (0) -# define DEBUG_Pv_TEST (0) -# define DEBUG_Lv_TEST (0) -# define DEBUG_yv_TEST (0) +# define DEBUG_p_TEST (0) +# define DEBUG_s_TEST (0) +# define DEBUG_l_TEST (0) +# define DEBUG_t_TEST (0) +# define DEBUG_o_TEST (0) +# define DEBUG_c_TEST (0) +# define DEBUG_P_TEST (0) +# define DEBUG_m_TEST (0) +# define DEBUG_f_TEST (0) +# define DEBUG_r_TEST (0) +# define DEBUG_x_TEST (0) +# define DEBUG_u_TEST (0) +# define DEBUG_U_TEST (0) +# define DEBUG_h_TEST (0) +# define DEBUG_X_TEST (0) +# define DEBUG_D_TEST (0) +# define DEBUG_S_TEST (0) +# define DEBUG_T_TEST (0) +# define DEBUG_R_TEST (0) +# define DEBUG_J_TEST (0) +# define DEBUG_v_TEST (0) +# define DEBUG_C_TEST (0) +# define DEBUG_A_TEST (0) +# define DEBUG_q_TEST (0) +# define DEBUG_M_TEST (0) +# define DEBUG_B_TEST (0) +# define DEBUG_L_TEST (0) +# define DEBUG_i_TEST (0) +# define DEBUG_y_TEST (0) +# define DEBUG_Xv_TEST (0) +# define DEBUG_Uv_TEST (0) +# define DEBUG_Pv_TEST (0) +# define DEBUG_Lv_TEST (0) +# define DEBUG_yv_TEST (0) # define PERL_DEB(a) -# define PERL_DEB2(a,b) b +# define PERL_DEB2(a,b) b # define PERL_DEBUG(a) # define DEBUG_p(a) # define DEBUG_s(a) @@ -5095,10 +5095,10 @@ Gid_t getegid (void); /* assert() gets defined if DEBUGGING. If no DEBUGGING, * the has not been included. */ #ifndef assert -# define assert(what) Perl_assert(what) +# define assert(what) Perl_assert(what) #endif #ifdef DEBUGGING -# define assert_(what) assert(what), +# define assert_(what) assert(what), #else # define assert_(what) #endif @@ -5114,7 +5114,7 @@ struct ufuncs { * like the following: #ifndef PERL_MG_UFUNC -#define PERL_MG_UFUNC(name,ix,sv) I32 name(IV ix, SV *sv) +#define PERL_MG_UFUNC(name,ix,sv) I32 name(IV ix, SV *sv) #endif static PERL_MG_UFUNC(foo_get, index, val) @@ -5128,7 +5128,7 @@ static PERL_MG_UFUNC(foo_get, index, val) */ #ifndef PERL_MG_UFUNC -#define PERL_MG_UFUNC(name,ix,sv) I32 name(pTHX_ IV ix, SV *sv) +#define PERL_MG_UFUNC(name,ix,sv) I32 name(pTHX_ IV ix, SV *sv) #endif #include @@ -5154,10 +5154,10 @@ char *getlogin (void); /* Fixme on VMS. This needs to be a run-time, not build time options */ /* Also rename() is affected by this */ #ifdef UNLINK_ALL_VERSIONS /* Currently only makes sense for VMS */ -#define UNLINK unlnk +#define UNLINK unlnk I32 unlnk (pTHX_ const char*); #else -#define UNLINK PerlLIO_unlink +#define UNLINK PerlLIO_unlink #endif /* some versions of glibc are missing the setresuid() proto */ @@ -5171,13 +5171,13 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); #ifndef HAS_SETREUID # ifdef HAS_SETRESUID -# define setreuid(r,e) setresuid(r,e,(Uid_t)-1) +# define setreuid(r,e) setresuid(r,e,(Uid_t)-1) # define HAS_SETREUID # endif #endif #ifndef HAS_SETREGID # ifdef HAS_SETRESGID -# define setregid(r,e) setresgid(r,e,(Gid_t)-1) +# define setregid(r,e) setresgid(r,e,(Gid_t)-1) # define HAS_SETREGID # endif #endif @@ -5190,23 +5190,23 @@ typedef struct sigaction Sigsave_t; typedef Sighandler_t Sigsave_t; #endif -#define SCAN_DEF 0 -#define SCAN_TR 1 -#define SCAN_REPL 2 +#define SCAN_DEF 0 +#define SCAN_TR 1 +#define SCAN_REPL 2 #ifdef DEBUGGING # ifndef register # define register # endif -# define RUNOPS_DEFAULT Perl_runops_debug +# define RUNOPS_DEFAULT Perl_runops_debug #else -# define RUNOPS_DEFAULT Perl_runops_standard +# define RUNOPS_DEFAULT Perl_runops_standard #endif #if defined(USE_PERLIO) EXTERN_C void PerlIO_teardown(void); # ifdef USE_ITHREADS -# define PERLIO_INIT MUTEX_INIT(&PL_perlio_mutex) +# define PERLIO_INIT MUTEX_INIT(&PL_perlio_mutex) # define PERLIO_TERM \ STMT_START { \ PerlIO_teardown(); \ @@ -5214,7 +5214,7 @@ EXTERN_C void PerlIO_teardown(void); } STMT_END # else # define PERLIO_INIT -# define PERLIO_TERM PerlIO_teardown() +# define PERLIO_TERM PerlIO_teardown() # endif #else # define PERLIO_INIT @@ -5235,8 +5235,8 @@ EXTERN_C void PerlIO_teardown(void); MUTEX_DESTROY(&tmp); \ } STMT_END # else -# define MALLOC_INIT MUTEX_INIT(&PL_malloc_mutex) -# define MALLOC_TERM MUTEX_DESTROY(&PL_malloc_mutex) +# define MALLOC_INIT MUTEX_INIT(&PL_malloc_mutex) +# define MALLOC_TERM MUTEX_DESTROY(&PL_malloc_mutex) # endif #else # define MALLOC_INIT @@ -5275,7 +5275,7 @@ struct perl_memory_debug_header { %MEM_ALIGNBYTES) % MEM_ALIGNBYTES) #else -# define PERL_MEMORY_DEBUG_HEADER_SIZE 0 +# define PERL_MEMORY_DEBUG_HEADER_SIZE 0 #endif #ifdef PERL_TRACK_MEMPOOL @@ -5303,14 +5303,14 @@ struct perl_memory_debug_header { #endif #ifdef MYMALLOC -# define Perl_safesysmalloc_size(where) Perl_malloced_size(where) +# define Perl_safesysmalloc_size(where) Perl_malloced_size(where) #else # if defined(HAS_MALLOC_SIZE) && !defined(PERL_DEBUG_READONLY_COW) # ifdef PERL_TRACK_MEMPOOL # define Perl_safesysmalloc_size(where) \ (malloc_size(((char *)(where)) - PERL_MEMORY_DEBUG_HEADER_SIZE) - PERL_MEMORY_DEBUG_HEADER_SIZE) # else -# define Perl_safesysmalloc_size(where) malloc_size(where) +# define Perl_safesysmalloc_size(where) malloc_size(where) # endif # endif # ifdef HAS_MALLOC_GOOD_SIZE @@ -5318,11 +5318,11 @@ struct perl_memory_debug_header { # define Perl_malloc_good_size(how_much) \ (malloc_good_size((how_much) + PERL_MEMORY_DEBUG_HEADER_SIZE) - PERL_MEMORY_DEBUG_HEADER_SIZE) # else -# define Perl_malloc_good_size(how_much) malloc_good_size(how_much) +# define Perl_malloc_good_size(how_much) malloc_good_size(how_much) # endif # else /* Having this as the identity operation makes some code simpler. */ -# define Perl_malloc_good_size(how_much) (how_much) +# define Perl_malloc_good_size(how_much) (how_much) # endif #endif @@ -5335,7 +5335,7 @@ typedef void (*despatch_signals_proc_t) (pTHX); #if defined(__DYNAMIC__) && defined(PERL_DARWIN) && defined(PERL_CORE) # include /* for the env array */ -# define environ (*_NSGetEnviron()) +# define environ (*_NSGetEnviron()) #elif defined(USE_ENVIRON_ARRAY) && !defined(environ) /* VMS and some other platforms don't use the environ array */ EXTERN_C char **environ; /* environment variables supplied via exec */ @@ -5443,7 +5443,7 @@ EXTCONST char PL_sh_path[] #ifdef CSH EXTCONST char PL_cshname[] INIT(CSH); -# define PL_cshlen (sizeof(CSH "") - 1) +# define PL_cshlen (sizeof(CSH "") - 1) #endif /* These are baked at compile time into any shared perl @@ -5860,20 +5860,20 @@ current interpreter phase you might do: =cut */ -#define phase_name(phase) (PL_phase_names[phase]) +#define phase_name(phase) (PL_phase_names[phase]) #ifndef PERL_CORE /* Do not use this macro. It only exists for extensions that * rely on PL_dirty instead of using the newer PL_phase, which * provides everything PL_dirty provided, and more. */ -# define PL_dirty cBOOL(PL_phase == PERL_PHASE_DESTRUCT) +# define PL_dirty cBOOL(PL_phase == PERL_PHASE_DESTRUCT) -# define PL_amagic_generation PL_na -# define PL_encoding ((SV *)NULL) +# define PL_amagic_generation PL_na +# define PL_encoding ((SV *)NULL) #endif /* !PERL_CORE */ -#define PL_hints PL_compiling.cop_hints -#define PL_maxo MAXO +#define PL_hints PL_compiling.cop_hints +#define PL_maxo MAXO END_EXTERN_C @@ -5894,7 +5894,7 @@ END_EXTERN_C #endif #endif -#define LEX_NOTPARSING 11 /* borrowed from toke.c */ +#define LEX_NOTPARSING 11 /* borrowed from toke.c */ typedef enum { XOPERATOR, @@ -5911,7 +5911,7 @@ typedef enum { /* update exp_name[] in toke.c if adding to this enum */ } expectation; -#define KEY_sigvar 0xFFFF /* fake keyword representing a signature var */ +#define KEY_sigvar 0xFFFF /* fake keyword representing a signature var */ /* Hints are now stored in a dedicated U32, so the bottom 8 bits are no longer special and there is no need for HINT_PRIVATE_MASK for COPs. @@ -5924,21 +5924,21 @@ typedef enum { categories. It requires going to %^H to find out which are in and which are out. This could be extended for the normal case of a plain HINT_LOCALE, so that %^H would be used for any locale form. */ -#define HINT_INTEGER 0x00000001 /* integer pragma */ -#define HINT_STRICT_REFS 0x00000002 /* strict pragma */ -#define HINT_LOCALE 0x00000004 /* locale pragma */ -#define HINT_BYTES 0x00000008 /* bytes pragma */ -#define HINT_LOCALE_PARTIAL 0x00000010 /* locale, but a subset +#define HINT_INTEGER 0x00000001 /* integer pragma */ +#define HINT_STRICT_REFS 0x00000002 /* strict pragma */ +#define HINT_LOCALE 0x00000004 /* locale pragma */ +#define HINT_BYTES 0x00000008 /* bytes pragma */ +#define HINT_LOCALE_PARTIAL 0x00000010 /* locale, but a subset of categories */ -#define HINT_EXPLICIT_STRICT_REFS 0x00000020 /* strict.pm */ -#define HINT_EXPLICIT_STRICT_SUBS 0x00000040 /* strict.pm */ -#define HINT_EXPLICIT_STRICT_VARS 0x00000080 /* strict.pm */ +#define HINT_EXPLICIT_STRICT_REFS 0x00000020 /* strict.pm */ +#define HINT_EXPLICIT_STRICT_SUBS 0x00000040 /* strict.pm */ +#define HINT_EXPLICIT_STRICT_VARS 0x00000080 /* strict.pm */ #define HINT_BLOCK_SCOPE 0x00000100 -#define HINT_STRICT_SUBS 0x00000200 /* strict pragma */ -#define HINT_STRICT_VARS 0x00000400 /* strict pragma */ -#define HINT_UNI_8_BIT 0x00000800 /* unicode_strings feature */ +#define HINT_STRICT_SUBS 0x00000200 /* strict pragma */ +#define HINT_STRICT_VARS 0x00000400 /* strict pragma */ +#define HINT_UNI_8_BIT 0x00000800 /* unicode_strings feature */ /* The HINT_NEW_* constants are used by the overload pragma */ #define HINT_NEW_INTEGER 0x00001000 @@ -5946,21 +5946,21 @@ typedef enum { #define HINT_NEW_BINARY 0x00004000 #define HINT_NEW_STRING 0x00008000 #define HINT_NEW_RE 0x00010000 -#define HINT_LOCALIZE_HH 0x00020000 /* %^H needs to be copied */ -#define HINT_LEXICAL_IO_IN 0x00040000 /* ${^OPEN} is set for input */ -#define HINT_LEXICAL_IO_OUT 0x00080000 /* ${^OPEN} is set for output */ +#define HINT_LOCALIZE_HH 0x00020000 /* %^H needs to be copied */ +#define HINT_LEXICAL_IO_IN 0x00040000 /* ${^OPEN} is set for input */ +#define HINT_LEXICAL_IO_OUT 0x00080000 /* ${^OPEN} is set for output */ -#define HINT_RE_TAINT 0x00100000 /* re pragma */ -#define HINT_RE_EVAL 0x00200000 /* re pragma */ +#define HINT_RE_TAINT 0x00100000 /* re pragma */ +#define HINT_RE_EVAL 0x00200000 /* re pragma */ -#define HINT_FILETEST_ACCESS 0x00400000 /* filetest pragma */ -#define HINT_UTF8 0x00800000 /* utf8 pragma */ +#define HINT_FILETEST_ACCESS 0x00400000 /* filetest pragma */ +#define HINT_UTF8 0x00800000 /* utf8 pragma */ -#define HINT_NO_AMAGIC 0x01000000 /* overloading pragma */ +#define HINT_NO_AMAGIC 0x01000000 /* overloading pragma */ -#define HINT_RE_FLAGS 0x02000000 /* re '/xism' pragma */ +#define HINT_RE_FLAGS 0x02000000 /* re '/xism' pragma */ -#define HINT_FEATURE_MASK 0x3c000000 /* 4 bits for feature bundles */ +#define HINT_FEATURE_MASK 0x3c000000 /* 4 bits for feature bundles */ /* Note: Used for HINT_M_VMSISH_*, currently defined by vms/vmsish.h: @@ -5973,16 +5973,16 @@ typedef enum { | HINT_STRICT_VARS #ifdef USE_STRICT_BY_DEFAULT -#define HINTS_DEFAULT HINT_ALL_STRICT +#define HINTS_DEFAULT HINT_ALL_STRICT #else -#define HINTS_DEFAULT 0 +#define HINTS_DEFAULT 0 #endif /* flags for PL_sawampersand */ -#define SAWAMPERSAND_LEFT 1 /* saw $` */ -#define SAWAMPERSAND_MIDDLE 2 /* saw $& */ -#define SAWAMPERSAND_RIGHT 4 /* saw $' */ +#define SAWAMPERSAND_LEFT 1 /* saw $` */ +#define SAWAMPERSAND_MIDDLE 2 /* saw $& */ +#define SAWAMPERSAND_RIGHT 4 /* saw $' */ #ifndef PERL_SAWAMPERSAND # define PL_sawampersand \ @@ -5990,20 +5990,20 @@ typedef enum { #endif /* Used for debugvar magic */ -#define DBVARMG_SINGLE 0 -#define DBVARMG_TRACE 1 -#define DBVARMG_SIGNAL 2 -#define DBVARMG_COUNT 3 +#define DBVARMG_SINGLE 0 +#define DBVARMG_TRACE 1 +#define DBVARMG_SIGNAL 2 +#define DBVARMG_COUNT 3 #define PL_DBsingle_iv (PL_DBcontrol[DBVARMG_SINGLE]) #define PL_DBtrace_iv (PL_DBcontrol[DBVARMG_TRACE]) #define PL_DBsignal_iv (PL_DBcontrol[DBVARMG_SIGNAL]) /* Various states of the input record separator SV (rs) */ -#define RsSNARF(sv) (! SvOK(sv)) -#define RsSIMPLE(sv) (SvOK(sv) && (! SvPOK(sv) || SvCUR(sv))) -#define RsPARA(sv) (SvPOK(sv) && ! SvCUR(sv)) -#define RsRECORD(sv) (SvROK(sv) && (SvIV(SvRV(sv)) > 0)) +#define RsSNARF(sv) (! SvOK(sv)) +#define RsSIMPLE(sv) (SvOK(sv) && (! SvPOK(sv) || SvCUR(sv))) +#define RsPARA(sv) (SvPOK(sv) && ! SvCUR(sv)) +#define RsRECORD(sv) (SvROK(sv) && (SvIV(SvRV(sv)) > 0)) /* A struct for keeping various DEBUGGING related stuff, neatly * packed. Currently only scratch variables for constructing @@ -6013,7 +6013,7 @@ struct perl_debug_pad { SV pad[3]; }; -#define PERL_DEBUG_PAD(i) &(PL_debug_pad.pad[i]) +#define PERL_DEBUG_PAD(i) &(PL_debug_pad.pad[i]) #define PERL_DEBUG_PAD_ZERO(i) \ (SvPVX(PERL_DEBUG_PAD(i))[0] = 0, \ (((XPV*) SvANY(PERL_DEBUG_PAD(i)))->xpv_cur = 0), \ @@ -6050,9 +6050,9 @@ typedef void(*Perl_cpeep_t)(pTHX_ OP *, OP *); typedef void(*globhook_t)(pTHX); -#define KEYWORD_PLUGIN_DECLINE 0 -#define KEYWORD_PLUGIN_STMT 1 -#define KEYWORD_PLUGIN_EXPR 2 +#define KEYWORD_PLUGIN_DECLINE 0 +#define KEYWORD_PLUGIN_STMT 1 +#define KEYWORD_PLUGIN_EXPR 2 /* Interpreter exitlist entry */ typedef struct exitlistentry { @@ -6064,12 +6064,12 @@ typedef struct exitlistentry { FAKE_PERSISTENT_SIGNAL_HANDLERS fixes */ /* These have to be before perlvars.h */ #if !defined(HAS_SIGACTION) && defined(VMS) -# define FAKE_PERSISTENT_SIGNAL_HANDLERS +# define FAKE_PERSISTENT_SIGNAL_HANDLERS #endif /* if we're doing kill() with sys$sigprc on VMS, FAKE_DEFAULT_SIGNAL_HANDLERS */ #if defined(KILL_BY_SIGPRC) -# define FAKE_DEFAULT_SIGNAL_HANDLERS +# define FAKE_DEFAULT_SIGNAL_HANDLERS #endif #if !defined(MULTIPLICITY) @@ -6086,16 +6086,16 @@ struct interpreter { */ /* Set up PERLVAR macros for populating structs */ -# define PERLVAR(prefix,var,type) type prefix##var; +# define PERLVAR(prefix,var,type) type prefix##var; /* 'var' is an array of length 'n' */ -# define PERLVARA(prefix,var,n,type) type prefix##var[n]; +# define PERLVARA(prefix,var,n,type) type prefix##var[n]; /* initialize 'var' to init' */ -# define PERLVARI(prefix,var,type,init) type prefix##var; +# define PERLVARI(prefix,var,type,init) type prefix##var; /* like PERLVARI, but make 'var' a const */ -# define PERLVARIC(prefix,var,type,init) type prefix##var; +# define PERLVARIC(prefix,var,type,init) type prefix##var; struct interpreter { # include "intrpvar.h" @@ -6130,8 +6130,8 @@ struct tempsym; /* defined in pp_pack.c */ #undef PERL_CKDEF #undef PERL_PPDEF -#define PERL_CKDEF(s) PERL_CALLCONV OP *s (pTHX_ OP *o); -#define PERL_PPDEF(s) PERL_CALLCONV OP *s (pTHX); +#define PERL_CKDEF(s) PERL_CALLCONV OP *s (pTHX_ OP *o); +#define PERL_PPDEF(s) PERL_CALLCONV OP *s (pTHX); #ifdef MYMALLOC # include "malloc_ctl.h" @@ -6161,19 +6161,19 @@ struct tempsym; /* defined in pp_pack.c */ * interpreters these include variables that would have been their struct-s */ -#define PERLVAR(prefix,var,type) EXT type PL_##var; -#define PERLVARA(prefix,var,n,type) EXT type PL_##var[n]; -#define PERLVARI(prefix,var,type,init) EXT type PL_##var INIT(init); +#define PERLVAR(prefix,var,type) EXT type PL_##var; +#define PERLVARA(prefix,var,n,type) EXT type PL_##var[n]; +#define PERLVARI(prefix,var,type,init) EXT type PL_##var INIT(init); #define PERLVARIC(prefix,var,type,init) EXTCONST type PL_##var INIT(init); #if !defined(MULTIPLICITY) START_EXTERN_C # include "intrpvar.h" END_EXTERN_C -# define PL_sv_yes (PL_sv_immortals[0]) -# define PL_sv_undef (PL_sv_immortals[1]) -# define PL_sv_no (PL_sv_immortals[2]) -# define PL_sv_zero (PL_sv_immortals[3]) +# define PL_sv_yes (PL_sv_immortals[0]) +# define PL_sv_undef (PL_sv_immortals[1]) +# define PL_sv_no (PL_sv_immortals[2]) +# define PL_sv_zero (PL_sv_immortals[3]) #endif #ifdef PERL_CORE @@ -6199,13 +6199,13 @@ END_EXTERN_C #if !defined(MULTIPLICITY) /* Set up PERLVAR macros for populating structs */ -# define PERLVAR(prefix,var,type) type prefix##var; +# define PERLVAR(prefix,var,type) type prefix##var; /* 'var' is an array of length 'n' */ -# define PERLVARA(prefix,var,n,type) type prefix##var[n]; +# define PERLVARA(prefix,var,n,type) type prefix##var[n]; /* initialize 'var' to init' */ -# define PERLVARI(prefix,var,type,init) type prefix##var; +# define PERLVARI(prefix,var,type,init) type prefix##var; /* like PERLVARI, but make 'var' a const */ -# define PERLVARIC(prefix,var,type,init) type prefix##var; +# define PERLVARIC(prefix,var,type,init) type prefix##var; /* this is never instantiated, is it just used for sizeof(struct PerlHandShakeInterpreter) */ @@ -6228,11 +6228,11 @@ EXTCONST runops_proc_t PL_runops_std EXTCONST runops_proc_t PL_runops_dbg INIT(Perl_runops_debug); -#define EXT_MGVTBL EXTCONST MGVTBL +#define EXT_MGVTBL EXTCONST MGVTBL -#define PERL_MAGIC_READONLY_ACCEPTABLE 0x40 -#define PERL_MAGIC_VALUE_MAGIC 0x80 -#define PERL_MAGIC_VTABLE_MASK 0x3F +#define PERL_MAGIC_READONLY_ACCEPTABLE 0x40 +#define PERL_MAGIC_VALUE_MAGIC 0x80 +#define PERL_MAGIC_VTABLE_MASK 0x3F /* can this type of magic be attached to a readonly SV? */ #define PERL_MAGIC_TYPE_READONLY_ACCEPTABLE(t) \ @@ -6305,10 +6305,10 @@ EXTCONST U8 PL_deBruijn_bitpos_tab64[]; #endif /* The constants for using PL_deBruijn_bitpos_tab */ -#define PERL_deBruijnMagic32_ 0x077CB531 -#define PERL_deBruijnShift32_ 27 -#define PERL_deBruijnMagic64_ 0x07EDD5E59A4E28C2 -#define PERL_deBruijnShift64_ 58 +#define PERL_deBruijnMagic32_ 0x077CB531 +#define PERL_deBruijnShift32_ 27 +#define PERL_deBruijnMagic64_ 0x07EDD5E59A4E28C2 +#define PERL_deBruijnShift64_ 58 /* In C99 we could use designated (named field) union * initializers. In C89 we need to initialize the member declared @@ -6317,12 +6317,12 @@ EXTCONST U8 PL_deBruijn_bitpos_tab64[]; * With the U8_NV version you will want to have inner braces, * while with the NV_U8 use just the NV. */ -#define INFNAN_U8_NV_DECL EXTCONST union { U8 u8[NVSIZE]; NV nv; } -#define INFNAN_NV_U8_DECL EXTCONST union { NV nv; U8 u8[NVSIZE]; } +#define INFNAN_U8_NV_DECL EXTCONST union { U8 u8[NVSIZE]; NV nv; } +#define INFNAN_NV_U8_DECL EXTCONST union { NV nv; U8 u8[NVSIZE]; } /* if these never got defined, they need defaults */ #ifndef PERL_SET_CONTEXT -# define PERL_SET_CONTEXT(i) PERL_SET_INTERP(i) +# define PERL_SET_CONTEXT(i) PERL_SET_INTERP(i) #endif #ifdef USE_PERL_SWITCH_LOCALE_CONTEXT @@ -6332,7 +6332,7 @@ EXTCONST U8 PL_deBruijn_bitpos_tab64[]; Perl_switch_locale_context(); \ } STMT_END #else -# define PERL_SET_LOCALE_CONTEXT(i) NOOP +# define PERL_SET_LOCALE_CONTEXT(i) NOOP #endif /* In some Configurations there may be per-thread information that @@ -6344,15 +6344,15 @@ EXTCONST U8 PL_deBruijn_bitpos_tab64[]; #ifndef PERL_GET_CONTEXT -# define PERL_GET_CONTEXT PERL_GET_INTERP +# define PERL_GET_CONTEXT PERL_GET_INTERP #endif #ifndef PERL_GET_THX -# define PERL_GET_THX ((void*)NULL) +# define PERL_GET_THX ((void*)NULL) #endif #ifndef PERL_SET_THX -# define PERL_SET_THX(t) NOOP +# define PERL_SET_THX(t) NOOP #endif #ifndef EBCDIC @@ -6494,18 +6494,18 @@ EXTCONST U8 PL_extended_utf8_dfa_tab[] = { */ # if defined(PERL_CORE) -# define NUM_CLASSES 18 -# define N0 0 -# define N1 ((N0) + NUM_CLASSES) -# define N2 ((N1) + NUM_CLASSES) -# define N3 ((N2) + NUM_CLASSES) -# define N4 ((N3) + NUM_CLASSES) -# define N5 ((N4) + NUM_CLASSES) -# define N6 ((N5) + NUM_CLASSES) -# define N7 ((N6) + NUM_CLASSES) -# define N8 ((N7) + NUM_CLASSES) -# define N9 ((N8) + NUM_CLASSES) -# define N10 ((N9) + NUM_CLASSES) +# define NUM_CLASSES 18 +# define N0 0 +# define N1 ((N0) + NUM_CLASSES) +# define N2 ((N1) + NUM_CLASSES) +# define N3 ((N2) + NUM_CLASSES) +# define N4 ((N3) + NUM_CLASSES) +# define N5 ((N4) + NUM_CLASSES) +# define N6 ((N5) + NUM_CLASSES) +# define N7 ((N6) + NUM_CLASSES) +# define N8 ((N7) + NUM_CLASSES) +# define N9 ((N8) + NUM_CLASSES) +# define N10 ((N9) + NUM_CLASSES) /*Class: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 */ /*N0*/ 0, 1,N1,N2,N3,N4,N5, 1, 1, 1, 1, 1, 1,N6,N7,N8,N9,N10, @@ -6615,19 +6615,19 @@ EXTCONST U8 PL_strict_utf8_dfa_tab[] = { # undef N8 # undef N9 # undef NUM_CLASSES -# define NUM_CLASSES 19 -# define N0 0 -# define N1 ((N0) + NUM_CLASSES) -# define N2 ((N1) + NUM_CLASSES) -# define N3 ((N2) + NUM_CLASSES) -# define N4 ((N3) + NUM_CLASSES) -# define N5 ((N4) + NUM_CLASSES) -# define N6 ((N5) + NUM_CLASSES) -# define N7 ((N6) + NUM_CLASSES) -# define N8 ((N7) + NUM_CLASSES) -# define N9 ((N8) + NUM_CLASSES) -# define N10 ((N9) + NUM_CLASSES) -# define N11 ((N10) + NUM_CLASSES) +# define NUM_CLASSES 19 +# define N0 0 +# define N1 ((N0) + NUM_CLASSES) +# define N2 ((N1) + NUM_CLASSES) +# define N3 ((N2) + NUM_CLASSES) +# define N4 ((N3) + NUM_CLASSES) +# define N5 ((N4) + NUM_CLASSES) +# define N6 ((N5) + NUM_CLASSES) +# define N7 ((N6) + NUM_CLASSES) +# define N8 ((N7) + NUM_CLASSES) +# define N9 ((N8) + NUM_CLASSES) +# define N10 ((N9) + NUM_CLASSES) +# define N11 ((N10) + NUM_CLASSES) /*Class: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 */ /*N0*/ 0, 1, N1, N2, N4, N7, N6, N3, N5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -6700,8 +6700,8 @@ EXTCONST U8 PL_c9_utf8_dfa_tab[] = { # undef N6 # undef N7 # undef NUM_CLASSES -# define NUM_CLASSES 12 -# define N0 0 +# define NUM_CLASSES 12 +# define N0 0 # define N1 ((N0) + NUM_CLASSES) # define N2 ((N1) + NUM_CLASSES) # define N3 ((N2) + NUM_CLASSES) @@ -6756,12 +6756,12 @@ typedef struct am_table_short AMTS; #define AMGfallNO 2 #define AMGfallYES 3 -#define AMTf_AMAGIC 1 +#define AMTf_AMAGIC 1 #define AMT_AMAGIC(amt) ((amt)->flags & AMTf_AMAGIC) #define AMT_AMAGIC_on(amt) ((amt)->flags |= AMTf_AMAGIC) #define AMT_AMAGIC_off(amt) ((amt)->flags &= ~AMTf_AMAGIC) -#define StashHANDLER(stash,meth) gv_handler((stash),CAT2(meth,_amg)) +#define StashHANDLER(stash,meth) gv_handler((stash),CAT2(meth,_amg)) /* * some compilers like to redefine cos et alia as faster (and less @@ -6772,25 +6772,25 @@ typedef struct am_table_short AMTS; #ifdef _FASTMATH # ifdef atan2 -# define F_atan2_amg atan2_amg +# define F_atan2_amg atan2_amg # endif # ifdef cos -# define F_cos_amg cos_amg +# define F_cos_amg cos_amg # endif # ifdef exp -# define F_exp_amg exp_amg +# define F_exp_amg exp_amg # endif # ifdef log -# define F_log_amg log_amg +# define F_log_amg log_amg # endif # ifdef pow -# define F_pow_amg pow_amg +# define F_pow_amg pow_amg # endif # ifdef sin -# define F_sin_amg sin_amg +# define F_sin_amg sin_amg # endif # ifdef sqrt -# define F_sqrt_amg sqrt_amg +# define F_sqrt_amg sqrt_amg # endif #endif /* _FASTMATH */ @@ -6801,22 +6801,22 @@ typedef struct am_table_short AMTS; PERLDBf_NAMEEVAL| PERLDBf_NAMEANON | \ PERLDBf_SAVESRC) /* No _NONAME, _GOTO */ -#define PERLDBf_SUB 0x01 /* Debug sub enter/exit */ -#define PERLDBf_LINE 0x02 /* Keep line # */ -#define PERLDBf_NOOPT 0x04 /* Switch off optimizations */ -#define PERLDBf_INTER 0x08 /* Preserve more data for +#define PERLDBf_SUB 0x01 /* Debug sub enter/exit */ +#define PERLDBf_LINE 0x02 /* Keep line # */ +#define PERLDBf_NOOPT 0x04 /* Switch off optimizations */ +#define PERLDBf_INTER 0x08 /* Preserve more data for later inspections */ -#define PERLDBf_SUBLINE 0x10 /* Keep subr source lines */ -#define PERLDBf_SINGLE 0x20 /* Start with single-step on */ -#define PERLDBf_NONAME 0x40 /* For _SUB: no name of the subr */ -#define PERLDBf_GOTO 0x80 /* Report goto: call DB::goto */ -#define PERLDBf_NAMEEVAL 0x100 /* Informative names for evals */ -#define PERLDBf_NAMEANON 0x200 /* Informative names for anon subs */ -#define PERLDBf_SAVESRC 0x400 /* Save source lines into +#define PERLDBf_SUBLINE 0x10 /* Keep subr source lines */ +#define PERLDBf_SINGLE 0x20 /* Start with single-step on */ +#define PERLDBf_NONAME 0x40 /* For _SUB: no name of the subr */ +#define PERLDBf_GOTO 0x80 /* Report goto: call DB::goto */ +#define PERLDBf_NAMEEVAL 0x100 /* Informative names for evals */ +#define PERLDBf_NAMEANON 0x200 /* Informative names for anon subs */ +#define PERLDBf_SAVESRC 0x400 /* Save source lines into @{"_<$filename"} */ #define PERLDBf_SAVESRC_NOSUBS 0x800 /* Including evals that generate no subroutines */ -#define PERLDBf_SAVESRC_INVALID 0x1000 /* Save source that did not compile */ +#define PERLDBf_SAVESRC_INVALID 0x1000 /* Save source that did not compile */ #define PERLDB_SUB (PL_perldb & PERLDBf_SUB) #define PERLDB_LINE (PL_perldb & PERLDBf_LINE) @@ -6832,26 +6832,26 @@ typedef struct am_table_short AMTS; #define PERLDB_SAVESRC_NOSUBS (PL_perldb & PERLDBf_SAVESRC_NOSUBS) #define PERLDB_SAVESRC_INVALID (PL_perldb & PERLDBf_SAVESRC_INVALID) -#define PERLDB_LINE_OR_SAVESRC (PL_perldb & (PERLDBf_LINE | PERLDBf_SAVESRC)) +#define PERLDB_LINE_OR_SAVESRC (PL_perldb & (PERLDBf_LINE | PERLDBf_SAVESRC)) #ifdef USE_ITHREADS -# define KEYWORD_PLUGIN_MUTEX_INIT MUTEX_INIT(&PL_keyword_plugin_mutex) -# define KEYWORD_PLUGIN_MUTEX_LOCK MUTEX_LOCK(&PL_keyword_plugin_mutex) -# define KEYWORD_PLUGIN_MUTEX_UNLOCK MUTEX_UNLOCK(&PL_keyword_plugin_mutex) -# define KEYWORD_PLUGIN_MUTEX_TERM MUTEX_DESTROY(&PL_keyword_plugin_mutex) -# define USER_PROP_MUTEX_INIT MUTEX_INIT(&PL_user_prop_mutex) -# define USER_PROP_MUTEX_LOCK MUTEX_LOCK(&PL_user_prop_mutex) -# define USER_PROP_MUTEX_UNLOCK MUTEX_UNLOCK(&PL_user_prop_mutex) -# define USER_PROP_MUTEX_TERM MUTEX_DESTROY(&PL_user_prop_mutex) +# define KEYWORD_PLUGIN_MUTEX_INIT MUTEX_INIT(&PL_keyword_plugin_mutex) +# define KEYWORD_PLUGIN_MUTEX_LOCK MUTEX_LOCK(&PL_keyword_plugin_mutex) +# define KEYWORD_PLUGIN_MUTEX_UNLOCK MUTEX_UNLOCK(&PL_keyword_plugin_mutex) +# define KEYWORD_PLUGIN_MUTEX_TERM MUTEX_DESTROY(&PL_keyword_plugin_mutex) +# define USER_PROP_MUTEX_INIT MUTEX_INIT(&PL_user_prop_mutex) +# define USER_PROP_MUTEX_LOCK MUTEX_LOCK(&PL_user_prop_mutex) +# define USER_PROP_MUTEX_UNLOCK MUTEX_UNLOCK(&PL_user_prop_mutex) +# define USER_PROP_MUTEX_TERM MUTEX_DESTROY(&PL_user_prop_mutex) #else -# define KEYWORD_PLUGIN_MUTEX_INIT NOOP -# define KEYWORD_PLUGIN_MUTEX_LOCK NOOP -# define KEYWORD_PLUGIN_MUTEX_UNLOCK NOOP -# define KEYWORD_PLUGIN_MUTEX_TERM NOOP -# define USER_PROP_MUTEX_INIT NOOP -# define USER_PROP_MUTEX_LOCK NOOP -# define USER_PROP_MUTEX_UNLOCK NOOP -# define USER_PROP_MUTEX_TERM NOOP +# define KEYWORD_PLUGIN_MUTEX_INIT NOOP +# define KEYWORD_PLUGIN_MUTEX_LOCK NOOP +# define KEYWORD_PLUGIN_MUTEX_UNLOCK NOOP +# define KEYWORD_PLUGIN_MUTEX_TERM NOOP +# define USER_PROP_MUTEX_INIT NOOP +# define USER_PROP_MUTEX_LOCK NOOP +# define USER_PROP_MUTEX_UNLOCK NOOP +# define USER_PROP_MUTEX_TERM NOOP #endif #ifdef USE_LOCALE /* These locale things are all subject to change */ @@ -6866,7 +6866,7 @@ typedef struct am_table_short AMTS; # define IN_SOME_LOCALE_FORM_RUNTIME \ cBOOL(CopHINTS_get(PL_curcop) & (HINT_LOCALE|HINT_LOCALE_PARTIAL)) -# define IN_LOCALE_COMPILETIME cBOOL(PL_hints & HINT_LOCALE) +# define IN_LOCALE_COMPILETIME cBOOL(PL_hints & HINT_LOCALE) # define IN_SOME_LOCALE_FORM_COMPILETIME \ cBOOL(PL_hints & (HINT_LOCALE|HINT_LOCALE_PARTIAL)) @@ -6897,8 +6897,8 @@ the plain locale pragma without a parameter (S>) is in effect. (IN_PERL_COMPILETIME ? IN_SOME_LOCALE_FORM_COMPILETIME \ : IN_SOME_LOCALE_FORM_RUNTIME) -# define IN_LC_ALL_COMPILETIME IN_LOCALE_COMPILETIME -# define IN_LC_ALL_RUNTIME IN_LOCALE_RUNTIME +# define IN_LC_ALL_COMPILETIME IN_LOCALE_COMPILETIME +# define IN_LC_ALL_RUNTIME IN_LOCALE_RUNTIME # define IN_LC_PARTIAL_COMPILETIME cBOOL(PL_hints & HINT_LOCALE_PARTIAL) # define IN_LC_PARTIAL_RUNTIME \ @@ -6962,30 +6962,30 @@ the plain locale pragma without a parameter (S>) is in effect. # endif /* PERL_CORE or PERL_IN_XSUB_RE */ #else /* No locale usage */ -# define IN_LOCALE_RUNTIME 0 -# define IN_SOME_LOCALE_FORM_RUNTIME 0 -# define IN_LOCALE_COMPILETIME 0 -# define IN_SOME_LOCALE_FORM_COMPILETIME 0 -# define IN_LOCALE 0 -# define IN_SOME_LOCALE_FORM 0 -# define IN_LC_ALL_COMPILETIME 0 -# define IN_LC_ALL_RUNTIME 0 -# define IN_LC_PARTIAL_COMPILETIME 0 -# define IN_LC_PARTIAL_RUNTIME 0 -# define IN_LC_COMPILETIME(category) 0 -# define IN_LC_RUNTIME(category) 0 -# define IN_LC(category) 0 +# define IN_LOCALE_RUNTIME 0 +# define IN_SOME_LOCALE_FORM_RUNTIME 0 +# define IN_LOCALE_COMPILETIME 0 +# define IN_SOME_LOCALE_FORM_COMPILETIME 0 +# define IN_LOCALE 0 +# define IN_SOME_LOCALE_FORM 0 +# define IN_LC_ALL_COMPILETIME 0 +# define IN_LC_ALL_RUNTIME 0 +# define IN_LC_PARTIAL_COMPILETIME 0 +# define IN_LC_PARTIAL_RUNTIME 0 +# define IN_LC_COMPILETIME(category) 0 +# define IN_LC_RUNTIME(category) 0 +# define IN_LC(category) 0 # define CHECK_AND_WARN_PROBLEMATIC_LOCALE_ # define _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(s, send) # define _CHECK_AND_OUTPUT_WIDE_LOCALE_CP_MSG(c) #endif -#define locale_panic_(m) Perl_locale_panic((m), __FILE__, __LINE__, errno) +#define locale_panic_(m) Perl_locale_panic((m), __FILE__, __LINE__, errno) /* Locale/thread synchronization macros. */ #if ! defined(USE_LOCALE) || ! defined(USE_LOCALE_THREADS) -# define LOCALE_LOCK_(cond) NOOP -# define LOCALE_UNLOCK_ NOOP +# define LOCALE_LOCK_(cond) NOOP +# define LOCALE_UNLOCK_ NOOP # define LOCALE_INIT # define LOCALE_TERM @@ -7056,17 +7056,17 @@ the plain locale pragma without a parameter (S>) is in effect. /* By definition, a thread-unsafe locale means * we need a critical section. */ -# define SETLOCALE_LOCK LOCALE_LOCK_(0) -# define SETLOCALE_UNLOCK LOCALE_UNLOCK_ +# define SETLOCALE_LOCK LOCALE_LOCK_(0) +# define SETLOCALE_UNLOCK LOCALE_UNLOCK_ # ifdef USE_LOCALE_NUMERIC # define LC_NUMERIC_LOCK(cond_to_panic_if_already_locked) \ LOCALE_LOCK_(cond_to_panic_if_already_locked) -# define LC_NUMERIC_UNLOCK LOCALE_UNLOCK_ +# define LC_NUMERIC_UNLOCK LOCALE_UNLOCK_ # endif # endif # ifndef USE_POSIX_2008_LOCALE -# define LOCALE_TERM_POSIX_2008_ NOOP +# define LOCALE_TERM_POSIX_2008_ NOOP # else /* We have a locale object holding the 'C' locale for Posix 2008 */ # define LOCALE_TERM_POSIX_2008_ \ @@ -7081,7 +7081,7 @@ the plain locale pragma without a parameter (S>) is in effect. } STMT_END # endif -# define LOCALE_INIT MUTEX_INIT(&PL_locale_mutex) +# define LOCALE_INIT MUTEX_INIT(&PL_locale_mutex) # define LOCALE_TERM \ STMT_START { \ LOCALE_TERM_POSIX_2008_; \ @@ -7108,8 +7108,8 @@ the plain locale pragma without a parameter (S>) is in effect. * 'global write', to indicate the caller wants to be able to access memory * that isn't thread specific, either to write to itself, or to prevent * anyone else from writing. */ -#define gwLOCALE_LOCK LOCALE_LOCK_(0) -#define gwLOCALE_UNLOCK LOCALE_UNLOCK_ +#define gwLOCALE_LOCK LOCALE_LOCK_(0) +#define gwLOCALE_UNLOCK LOCALE_UNLOCK_ /* setlocale() generally returns in a global static buffer, but * not on Windows when operating in thread-safe mode */ @@ -7125,8 +7125,8 @@ the plain locale pragma without a parameter (S>) is in effect. gwLOCALE_UNLOCK; \ } STMT_END #else -# define POSIX_SETLOCALE_LOCK gwLOCALE_LOCK -# define POSIX_SETLOCALE_UNLOCK gwLOCALE_UNLOCK +# define POSIX_SETLOCALE_LOCK gwLOCALE_LOCK +# define POSIX_SETLOCALE_UNLOCK gwLOCALE_UNLOCK #endif /* Similar to gwLOCALE_LOCK, there are functions that require both the locale @@ -7146,8 +7146,8 @@ the plain locale pragma without a parameter (S>) is in effect. # define gwENVr_LOCALEr_UNLOCK \ STMT_START { ENV_READ_UNLOCK; SETLOCALE_UNLOCK; } STMT_END #else -# define gwENVr_LOCALEr_LOCK ENV_LOCK -# define gwENVr_LOCALEr_UNLOCK ENV_UNLOCK +# define gwENVr_LOCALEr_LOCK ENV_LOCK +# define gwENVr_LOCALEr_UNLOCK ENV_UNLOCK #endif /* Now that we have defined gwENVr_LOCALEr_LOCK, we can finish @@ -7155,8 +7155,8 @@ the plain locale pragma without a parameter (S>) is in effect. * on a thread-safe system so that we could use that fact to * calculate what gwENVr_LOCALEr_LOCK should be */ #ifndef SETLOCALE_LOCK -# define SETLOCALE_LOCK NOOP -# define SETLOCALE_UNLOCK NOOP +# define SETLOCALE_LOCK NOOP +# define SETLOCALE_UNLOCK NOOP #endif @@ -7166,40 +7166,40 @@ the plain locale pragma without a parameter (S>) is in effect. * be an exclusive lock. By defining it here with this name, we can, * for the most part, hide this detail from the rest of the code */ /* Currently, the read lock is an exclusive lock */ -#define LOCALE_READ_LOCK SETLOCALE_LOCK -#define LOCALE_READ_UNLOCK SETLOCALE_UNLOCK +#define LOCALE_READ_LOCK SETLOCALE_LOCK +#define LOCALE_READ_UNLOCK SETLOCALE_UNLOCK #ifndef LC_NUMERIC_LOCK -# define LC_NUMERIC_LOCK(cond) NOOP -# define LC_NUMERIC_UNLOCK NOOP +# define LC_NUMERIC_LOCK(cond) NOOP +# define LC_NUMERIC_UNLOCK NOOP #endif /* These non-reentrant versions use global space */ -# define MBLEN_LOCK_ gwLOCALE_LOCK -# define MBLEN_UNLOCK_ gwLOCALE_UNLOCK +# define MBLEN_LOCK_ gwLOCALE_LOCK +# define MBLEN_UNLOCK_ gwLOCALE_UNLOCK -# define MBTOWC_LOCK_ gwLOCALE_LOCK -# define MBTOWC_UNLOCK_ gwLOCALE_UNLOCK +# define MBTOWC_LOCK_ gwLOCALE_LOCK +# define MBTOWC_UNLOCK_ gwLOCALE_UNLOCK -# define WCTOMB_LOCK_ gwLOCALE_LOCK -# define WCTOMB_UNLOCK_ gwLOCALE_UNLOCK +# define WCTOMB_LOCK_ gwLOCALE_LOCK +# define WCTOMB_UNLOCK_ gwLOCALE_UNLOCK /* Whereas the reentrant versions don't (assuming they are called * with a per-thread buffer; some have the capability of being called * with a NULL parameter, which defeats the reentrancy) */ -# define MBRLEN_LOCK_ NOOP -# define MBRLEN_UNLOCK_ NOOP -# define MBRTOWC_LOCK_ NOOP -# define MBRTOWC_UNLOCK_ NOOP -# define WCRTOMB_LOCK_ NOOP -# define WCRTOMB_UNLOCK_ NOOP +# define MBRLEN_LOCK_ NOOP +# define MBRLEN_UNLOCK_ NOOP +# define MBRTOWC_LOCK_ NOOP +# define MBRTOWC_UNLOCK_ NOOP +# define WCRTOMB_LOCK_ NOOP +# define WCRTOMB_UNLOCK_ NOOP -# define LC_COLLATE_LOCK SETLOCALE_LOCK -# define LC_COLLATE_UNLOCK SETLOCALE_UNLOCK +# define LC_COLLATE_LOCK SETLOCALE_LOCK +# define LC_COLLATE_UNLOCK SETLOCALE_UNLOCK -# define STRFTIME_LOCK ENV_LOCK -# define STRFTIME_UNLOCK ENV_UNLOCK +# define STRFTIME_LOCK ENV_LOCK +# define STRFTIME_UNLOCK ENV_UNLOCK #ifdef USE_LOCALE_NUMERIC @@ -7357,7 +7357,7 @@ cannot have changed since the precalculation. * khw believes the reason for the variables instead of the bits in a * single word is to avoid having to have masking instructions. */ -# define NOT_IN_NUMERIC_STANDARD_ (! PL_numeric_standard) +# define NOT_IN_NUMERIC_STANDARD_ (! PL_numeric_standard) /* We can lock the category to stay in the C locale, making * requests to the contrary be noops, in the dynamic scope @@ -7490,8 +7490,8 @@ cannot have changed since the precalculation. # define SET_NUMERIC_STANDARD() # define SET_NUMERIC_UNDERLYING() -# define IS_NUMERIC_RADIX(a, b) (0) -# define DECLARATION_FOR_LC_NUMERIC_MANIPULATION dNOOP +# define IS_NUMERIC_RADIX(a, b) (0) +# define DECLARATION_FOR_LC_NUMERIC_MANIPULATION dNOOP # define STORE_LC_NUMERIC_SET_STANDARD() # define STORE_LC_NUMERIC_FORCE_TO_UNDERLYING() # define STORE_LC_NUMERIC_SET_TO_NEEDED_IN(in_lc_numeric) @@ -7507,12 +7507,12 @@ cannot have changed since the precalculation. #endif /* !USE_LOCALE_NUMERIC */ #ifdef USE_LOCALE_THREADS -# define ENV_LOCK PERL_WRITE_LOCK(&PL_env_mutex) -# define ENV_UNLOCK PERL_WRITE_UNLOCK(&PL_env_mutex) -# define ENV_READ_LOCK PERL_READ_LOCK(&PL_env_mutex) -# define ENV_READ_UNLOCK PERL_READ_UNLOCK(&PL_env_mutex) -# define ENV_INIT PERL_RW_MUTEX_INIT(&PL_env_mutex) -# define ENV_TERM PERL_RW_MUTEX_DESTROY(&PL_env_mutex) +# define ENV_LOCK PERL_WRITE_LOCK(&PL_env_mutex) +# define ENV_UNLOCK PERL_WRITE_UNLOCK(&PL_env_mutex) +# define ENV_READ_LOCK PERL_READ_LOCK(&PL_env_mutex) +# define ENV_READ_UNLOCK PERL_READ_UNLOCK(&PL_env_mutex) +# define ENV_INIT PERL_RW_MUTEX_INIT(&PL_env_mutex) +# define ENV_TERM PERL_RW_MUTEX_DESTROY(&PL_env_mutex) /* On platforms where the static buffer contained in getenv() is per-thread * rather than process-wide, another thread executing a getenv() at the @@ -7520,23 +7520,23 @@ cannot have changed since the precalculation. * away and unlocked the mutex. On such platforms (which is most), we can * have many readers of the environment at the same time. */ # ifdef GETENV_PRESERVES_OTHER_THREAD -# define GETENV_LOCK ENV_READ_LOCK -# define GETENV_UNLOCK ENV_READ_UNLOCK +# define GETENV_LOCK ENV_READ_LOCK +# define GETENV_UNLOCK ENV_READ_UNLOCK # else /* If, on the other hand, another thread could zap our getenv() return, * we need to keep them from executing until we are done */ -# define GETENV_LOCK ENV_LOCK -# define GETENV_UNLOCK ENV_UNLOCK +# define GETENV_LOCK ENV_LOCK +# define GETENV_UNLOCK ENV_UNLOCK # endif #else -# define ENV_LOCK NOOP -# define ENV_UNLOCK NOOP -# define ENV_READ_LOCK NOOP -# define ENV_READ_UNLOCK NOOP -# define ENV_INIT NOOP -# define ENV_TERM NOOP -# define GETENV_LOCK NOOP -# define GETENV_UNLOCK NOOP +# define ENV_LOCK NOOP +# define ENV_UNLOCK NOOP +# define ENV_READ_LOCK NOOP +# define ENV_READ_UNLOCK NOOP +# define ENV_INIT NOOP +# define ENV_TERM NOOP +# define GETENV_LOCK NOOP +# define GETENV_UNLOCK NOOP #endif /* Some critical sections need to lock both the locale and the environment from @@ -7560,30 +7560,30 @@ cannot have changed since the precalculation. * available on the platform which don't require write locking. */ #ifdef PERL_REENTR_USING_ASCTIME_R -# define ASCTIME_LOCK ENVr_LOCALEr_LOCK -# define ASCTIME_UNLOCK ENVr_LOCALEr_UNLOCK +# define ASCTIME_LOCK ENVr_LOCALEr_LOCK +# define ASCTIME_UNLOCK ENVr_LOCALEr_UNLOCK #else -# define ASCTIME_LOCK gwENVr_LOCALEr_LOCK -# define ASCTIME_UNLOCK gwENVr_LOCALEr_UNLOCK +# define ASCTIME_LOCK gwENVr_LOCALEr_LOCK +# define ASCTIME_UNLOCK gwENVr_LOCALEr_UNLOCK #endif -#define CTIME_LOCK gwENVr_LOCALEr_LOCK -#define CTIME_UNLOCK gwENVr_LOCALEr_UNLOCK +#define CTIME_LOCK gwENVr_LOCALEr_LOCK +#define CTIME_UNLOCK gwENVr_LOCALEr_UNLOCK #ifdef PERL_REENTR_USING_GMTIME_R -# define GMTIME_LOCK ENVr_LOCALEr_LOCK -# define GMTIME_UNLOCK ENVr_LOCALEr_UNLOCK +# define GMTIME_LOCK ENVr_LOCALEr_LOCK +# define GMTIME_UNLOCK ENVr_LOCALEr_UNLOCK #else -# define GMTIME_LOCK gwENVr_LOCALEr_LOCK -# define GMTIME_UNLOCK gwENVr_LOCALEr_UNLOCK +# define GMTIME_LOCK gwENVr_LOCALEr_LOCK +# define GMTIME_UNLOCK gwENVr_LOCALEr_UNLOCK #endif -#define LOCALTIME_LOCK gwENVr_LOCALEr_LOCK -#define LOCALTIME_UNLOCK gwENVr_LOCALEr_UNLOCK -#define MKTIME_LOCK gwENVr_LOCALEr_LOCK -#define MKTIME_UNLOCK gwENVr_LOCALEr_UNLOCK -#define TZSET_LOCK gwENVr_LOCALEr_LOCK -#define TZSET_UNLOCK gwENVr_LOCALEr_UNLOCK +#define LOCALTIME_LOCK gwENVr_LOCALEr_LOCK +#define LOCALTIME_UNLOCK gwENVr_LOCALEr_UNLOCK +#define MKTIME_LOCK gwENVr_LOCALEr_LOCK +#define MKTIME_UNLOCK gwENVr_LOCALEr_UNLOCK +#define TZSET_LOCK gwENVr_LOCALEr_LOCK +#define TZSET_UNLOCK gwENVr_LOCALEr_UNLOCK /* Similiarly, these functions need a constant environment and/or locale. * And some have a buffer that is shared with another thread executing the @@ -7595,99 +7595,99 @@ cannot have changed since the precalculation. * But, create a different macro name just to indicate the ones that don't * actually depend on the environment, but are using its mutex for want of * a better one */ -#define gwLOCALEr_LOCK gwENVr_LOCALEr_LOCK -#define gwLOCALEr_UNLOCK gwENVr_LOCALEr_UNLOCK +#define gwLOCALEr_LOCK gwENVr_LOCALEr_LOCK +#define gwLOCALEr_UNLOCK gwENVr_LOCALEr_UNLOCK #ifdef PERL_REENTR_USING_GETHOSTBYADDR_R -# define GETHOSTBYADDR_LOCK ENVr_LOCALEr_LOCK -# define GETHOSTBYADDR_UNLOCK ENVr_LOCALEr_UNLOCK +# define GETHOSTBYADDR_LOCK ENVr_LOCALEr_LOCK +# define GETHOSTBYADDR_UNLOCK ENVr_LOCALEr_UNLOCK #else -# define GETHOSTBYADDR_LOCK gwENVr_LOCALEr_LOCK -# define GETHOSTBYADDR_UNLOCK gwENVr_LOCALEr_UNLOCK +# define GETHOSTBYADDR_LOCK gwENVr_LOCALEr_LOCK +# define GETHOSTBYADDR_UNLOCK gwENVr_LOCALEr_UNLOCK #endif #ifdef PERL_REENTR_USING_GETHOSTBYNAME_R -# define GETHOSTBYNAME_LOCK ENVr_LOCALEr_LOCK -# define GETHOSTBYNAME_UNLOCK ENVr_LOCALEr_UNLOCK +# define GETHOSTBYNAME_LOCK ENVr_LOCALEr_LOCK +# define GETHOSTBYNAME_UNLOCK ENVr_LOCALEr_UNLOCK #else -# define GETHOSTBYNAME_LOCK gwENVr_LOCALEr_LOCK -# define GETHOSTBYNAME_UNLOCK gwENVr_LOCALEr_UNLOCK +# define GETHOSTBYNAME_LOCK gwENVr_LOCALEr_LOCK +# define GETHOSTBYNAME_UNLOCK gwENVr_LOCALEr_UNLOCK #endif #ifdef PERL_REENTR_USING_GETNETBYADDR_R -# define GETNETBYADDR_LOCK LOCALE_READ_LOCK -# define GETNETBYADDR_UNLOCK LOCALE_READ_UNLOCK +# define GETNETBYADDR_LOCK LOCALE_READ_LOCK +# define GETNETBYADDR_UNLOCK LOCALE_READ_UNLOCK #else -# define GETNETBYADDR_LOCK gwLOCALEr_LOCK -# define GETNETBYADDR_UNLOCK gwLOCALEr_UNLOCK +# define GETNETBYADDR_LOCK gwLOCALEr_LOCK +# define GETNETBYADDR_UNLOCK gwLOCALEr_UNLOCK #endif #ifdef PERL_REENTR_USING_GETNETBYNAME_R -# define GETNETBYNAME_LOCK LOCALE_READ_LOCK -# define GETNETBYNAME_UNLOCK LOCALE_READ_UNLOCK +# define GETNETBYNAME_LOCK LOCALE_READ_LOCK +# define GETNETBYNAME_UNLOCK LOCALE_READ_UNLOCK #else -# define GETNETBYNAME_LOCK gwLOCALEr_LOCK -# define GETNETBYNAME_UNLOCK gwLOCALEr_UNLOCK +# define GETNETBYNAME_LOCK gwLOCALEr_LOCK +# define GETNETBYNAME_UNLOCK gwLOCALEr_UNLOCK #endif #ifdef PERL_REENTR_USING_GETPROTOBYNAME_R -# define GETPROTOBYNAME_LOCK LOCALE_READ_LOCK -# define GETPROTOBYNAME_UNLOCK LOCALE_READ_UNLOCK +# define GETPROTOBYNAME_LOCK LOCALE_READ_LOCK +# define GETPROTOBYNAME_UNLOCK LOCALE_READ_UNLOCK #else -# define GETPROTOBYNAME_LOCK gwLOCALEr_LOCK -# define GETPROTOBYNAME_UNLOCK gwLOCALEr_UNLOCK +# define GETPROTOBYNAME_LOCK gwLOCALEr_LOCK +# define GETPROTOBYNAME_UNLOCK gwLOCALEr_UNLOCK #endif #ifdef PERL_REENTR_USING_GETPROTOBYNUMBER_R -# define GETPROTOBYNUMBER_LOCK LOCALE_READ_LOCK -# define GETPROTOBYNUMBER_UNLOCK LOCALE_READ_UNLOCK +# define GETPROTOBYNUMBER_LOCK LOCALE_READ_LOCK +# define GETPROTOBYNUMBER_UNLOCK LOCALE_READ_UNLOCK #else -# define GETPROTOBYNUMBER_LOCK gwLOCALEr_LOCK -# define GETPROTOBYNUMBER_UNLOCK gwLOCALEr_UNLOCK +# define GETPROTOBYNUMBER_LOCK gwLOCALEr_LOCK +# define GETPROTOBYNUMBER_UNLOCK gwLOCALEr_UNLOCK #endif #ifdef PERL_REENTR_USING_GETPROTOENT_R -# define GETPROTOENT_LOCK LOCALE_READ_LOCK -# define GETPROTOENT_UNLOCK LOCALE_READ_UNLOCK +# define GETPROTOENT_LOCK LOCALE_READ_LOCK +# define GETPROTOENT_UNLOCK LOCALE_READ_UNLOCK #else -# define GETPROTOENT_LOCK gwLOCALEr_LOCK -# define GETPROTOENT_UNLOCK gwLOCALEr_UNLOCK +# define GETPROTOENT_LOCK gwLOCALEr_LOCK +# define GETPROTOENT_UNLOCK gwLOCALEr_UNLOCK #endif #ifdef PERL_REENTR_USING_GETPWNAM_R -# define GETPWNAM_LOCK LOCALE_READ_LOCK -# define GETPWNAM_UNLOCK LOCALE_READ_UNLOCK +# define GETPWNAM_LOCK LOCALE_READ_LOCK +# define GETPWNAM_UNLOCK LOCALE_READ_UNLOCK #else -# define GETPWNAM_LOCK gwLOCALEr_LOCK -# define GETPWNAM_UNLOCK gwLOCALEr_UNLOCK +# define GETPWNAM_LOCK gwLOCALEr_LOCK +# define GETPWNAM_UNLOCK gwLOCALEr_UNLOCK #endif #ifdef PERL_REENTR_USING_GETPWUID_R -# define GETPWUID_LOCK LOCALE_READ_LOCK -# define GETPWUID_UNLOCK LOCALE_READ_UNLOCK +# define GETPWUID_LOCK LOCALE_READ_LOCK +# define GETPWUID_UNLOCK LOCALE_READ_UNLOCK #else -# define GETPWUID_LOCK gwLOCALEr_LOCK -# define GETPWUID_UNLOCK gwLOCALEr_UNLOCK +# define GETPWUID_LOCK gwLOCALEr_LOCK +# define GETPWUID_UNLOCK gwLOCALEr_UNLOCK #endif #ifdef PERL_REENTR_USING_GETSERVBYNAME_R -# define GETSERVBYNAME_LOCK LOCALE_READ_LOCK -# define GETSERVBYNAME_UNLOCK LOCALE_READ_UNLOCK +# define GETSERVBYNAME_LOCK LOCALE_READ_LOCK +# define GETSERVBYNAME_UNLOCK LOCALE_READ_UNLOCK #else -# define GETSERVBYNAME_LOCK gwLOCALEr_LOCK -# define GETSERVBYNAME_UNLOCK gwLOCALEr_UNLOCK +# define GETSERVBYNAME_LOCK gwLOCALEr_LOCK +# define GETSERVBYNAME_UNLOCK gwLOCALEr_UNLOCK #endif #ifdef PERL_REENTR_USING_GETSERVBYPORT_R -# define GETSERVBYPORT_LOCK LOCALE_READ_LOCK -# define GETSERVBYPORT_UNLOCK LOCALE_READ_UNLOCK +# define GETSERVBYPORT_LOCK LOCALE_READ_LOCK +# define GETSERVBYPORT_UNLOCK LOCALE_READ_UNLOCK #else -# define GETSERVBYPORT_LOCK gwLOCALEr_LOCK -# define GETSERVBYPORT_UNLOCK gwLOCALEr_UNLOCK +# define GETSERVBYPORT_LOCK gwLOCALEr_LOCK +# define GETSERVBYPORT_UNLOCK gwLOCALEr_UNLOCK #endif #ifdef PERL_REENTR_USING_GETSERVENT_R -# define GETSERVENT_LOCK LOCALE_READ_LOCK -# define GETSERVENT_UNLOCK LOCALE_READ_UNLOCK +# define GETSERVENT_LOCK LOCALE_READ_LOCK +# define GETSERVENT_UNLOCK LOCALE_READ_UNLOCK #else -# define GETSERVENT_LOCK gwLOCALEr_LOCK -# define GETSERVENT_UNLOCK gwLOCALEr_UNLOCK +# define GETSERVENT_LOCK gwLOCALEr_LOCK +# define GETSERVENT_UNLOCK gwLOCALEr_UNLOCK #endif #ifdef PERL_REENTR_USING_GETSPNAM_R -# define GETSPNAM_LOCK LOCALE_READ_LOCK -# define GETSPNAM_UNLOCK LOCALE_READ_UNLOCK +# define GETSPNAM_LOCK LOCALE_READ_LOCK +# define GETSPNAM_UNLOCK LOCALE_READ_UNLOCK #else -# define GETSPNAM_LOCK gwLOCALEr_LOCK -# define GETSPNAM_UNLOCK gwLOCALEr_UNLOCK +# define GETSPNAM_LOCK gwLOCALEr_LOCK +# define GETSPNAM_UNLOCK gwLOCALEr_UNLOCK #endif #define STRFMON_LOCK LC_MONETARY_LOCK @@ -7742,33 +7742,33 @@ to C or C instead of C. =cut */ -#define Strtod my_strtod +#define Strtod my_strtod #if defined(HAS_STRTOD) \ || defined(USE_QUADMATH) \ || (defined(HAS_STRTOLD) && defined(HAS_LONG_DOUBLE) \ && defined(USE_LONG_DOUBLE)) -# define Perl_strtod Strtod +# define Perl_strtod Strtod #endif #if !defined(Strtol) && defined(USE_64_BIT_INT) && defined(IV_IS_QUAD) && \ (QUADKIND == QUAD_IS_LONG_LONG || QUADKIND == QUAD_IS___INT64) # ifdef __hpux -# define strtoll __strtoll /* secret handshake */ +# define strtoll __strtoll /* secret handshake */ # endif # if defined(WIN64) && defined(_MSC_VER) -# define strtoll _strtoi64 /* secret handshake */ +# define strtoll _strtoi64 /* secret handshake */ # endif # if !defined(Strtol) && defined(HAS_STRTOLL) -# define Strtol strtoll +# define Strtol strtoll # endif # if !defined(Strtol) && defined(HAS_STRTOQ) -# define Strtol strtoq +# define Strtol strtoq # endif /* is there atoq() anywhere? */ #endif #if !defined(Strtol) && defined(HAS_STRTOL) -# define Strtol strtol +# define Strtol strtol #endif #ifndef Atol /* It would be more fashionable to use Strtol() to define @@ -7777,39 +7777,39 @@ to C or C instead of C. # if defined(USE_64_BIT_INT) && defined(IV_IS_QUAD) && defined(HAS_ATOLL) && \ (QUADKIND == QUAD_IS_LONG_LONG || QUADKIND == QUAD_IS___INT64) # ifdef WIN64 -# define atoll _atoi64 /* secret handshake */ +# define atoll _atoi64 /* secret handshake */ # endif -# define Atol atoll +# define Atol atoll # else -# define Atol atol +# define Atol atol # endif #endif #if !defined(Strtoul) && defined(USE_64_BIT_INT) && defined(UV_IS_QUAD) && \ (QUADKIND == QUAD_IS_LONG_LONG || QUADKIND == QUAD_IS___INT64) # ifdef __hpux -# define strtoull __strtoull /* secret handshake */ +# define strtoull __strtoull /* secret handshake */ # endif # if defined(WIN64) && defined(_MSC_VER) -# define strtoull _strtoui64 /* secret handshake */ +# define strtoull _strtoui64 /* secret handshake */ # endif # if !defined(Strtoul) && defined(HAS_STRTOULL) -# define Strtoul strtoull +# define Strtoul strtoull # endif # if !defined(Strtoul) && defined(HAS_STRTOUQ) -# define Strtoul strtouq +# define Strtoul strtouq # endif /* is there atouq() anywhere? */ #endif #if !defined(Strtoul) && defined(HAS_STRTOUL) -# define Strtoul strtoul +# define Strtoul strtoul #endif #if !defined(Strtoul) && defined(HAS_STRTOL) /* Last resort. */ # define Strtoul(s, e, b) \ strchr((s), '-') ? ULONG_MAX : (unsigned long)strtol((s), (e), (b)) #endif #ifndef Atoul -# define Atoul(s) Strtoul(s, NULL, 10) +# define Atoul(s) Strtoul(s, NULL, 10) #endif #define grok_bin(s,lp,fp,rp) \ @@ -7821,11 +7821,11 @@ to C or C instead of C. grok_bin_oct_hex(s, lp, fp, rp, 4, CC_XDIGIT_, 'x') #ifndef PERL_SCRIPT_MODE -#define PERL_SCRIPT_MODE "r" +#define PERL_SCRIPT_MODE "r" #endif /* not used. Kept as a NOOP for backcompat */ -#define PERL_STACK_OVERFLOW_CHECK() NOOP +#define PERL_STACK_OVERFLOW_CHECK() NOOP /* * Some nonpreemptive operating systems find it convenient to check @@ -7850,7 +7850,7 @@ to C or C instead of C. * case, PERL_ALLOC_CHECK frees the pointer and sets it to NULL. */ #ifndef PERL_ALLOC_CHECK -#define PERL_ALLOC_CHECK(p) NOOP +#define PERL_ALLOC_CHECK(p) NOOP #endif #ifdef HAS_SEM @@ -7871,9 +7871,9 @@ to C or C instead of C. unsigned short *array; char __dummy[5]; }; -# define semun gccbug_semun +# define semun gccbug_semun # endif -# define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun) +# define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun) # elif defined(USE_SEMCTL_SEMID_DS) # ifdef EXTRA_F_IN_SEMUN_BUF # define Semctl(id, num, cmd, semun) \ @@ -7909,8 +7909,8 @@ to C or C instead of C. /* START_MY_CXT must appear in all extensions that define a my_cxt_t structure, * right after the definition (i.e. at file scope). The non-threads case * below uses it to declare the data as static. */ -# define START_MY_CXT static int my_cxt_index = -1; -# define MY_CXT_INDEX my_cxt_index +# define START_MY_CXT static int my_cxt_index = -1; +# define MY_CXT_INDEX my_cxt_index # define MY_CXT_INIT_ARG &my_cxt_index /* Creates and zeroes the per-interpreter data. (We allocate my_cxtp in a Perl @@ -7942,26 +7942,26 @@ to C or C instead of C. /* This macro must be used to access members of the * my_cxt_t structure. e.g. MY_CXT.some_data */ -# define MY_CXT (*my_cxtp) +# define MY_CXT (*my_cxtp) /* Judicious use of these macros can reduce the number of times * dMY_CXT is used. Use is similar to pTHX, aTHX etc. */ -# define pMY_CXT my_cxt_t *my_cxtp -# define pMY_CXT_ pMY_CXT, -# define _pMY_CXT ,pMY_CXT -# define aMY_CXT my_cxtp -# define aMY_CXT_ aMY_CXT, -# define _aMY_CXT ,aMY_CXT +# define pMY_CXT my_cxt_t *my_cxtp +# define pMY_CXT_ pMY_CXT, +# define _pMY_CXT ,pMY_CXT +# define aMY_CXT my_cxtp +# define aMY_CXT_ aMY_CXT, +# define _aMY_CXT ,aMY_CXT #else /* MULTIPLICITY */ -# define START_MY_CXT static my_cxt_t my_cxt; -# define dMY_CXT dNOOP +# define START_MY_CXT static my_cxt_t my_cxt; +# define dMY_CXT dNOOP # define dMY_CXT_INTERP(my_perl) dNOOP -# define MY_CXT_INIT NOOP -# define MY_CXT_CLONE NOOP -# define MY_CXT my_cxt +# define MY_CXT_INIT NOOP +# define MY_CXT_CLONE NOOP +# define MY_CXT my_cxt -# define pMY_CXT void +# define pMY_CXT void # define pMY_CXT_ # define _pMY_CXT # define aMY_CXT @@ -7999,11 +7999,11 @@ EXTERN_C int flock(int fd, int op); #endif #ifndef O_BINARY -# define O_BINARY 0 +# define O_BINARY 0 #endif #ifndef O_TEXT -# define O_TEXT 0 +# define O_TEXT 0 #endif #if O_TEXT != O_BINARY @@ -8019,7 +8019,7 @@ EXTERN_C int flock(int fd, int op); # undef PERLIO_USING_CRLF # else /* If you really are DOSish. */ -# define PERLIO_USING_CRLF 1 +# define PERLIO_USING_CRLF 1 # endif #endif @@ -8028,18 +8028,18 @@ EXTERN_C int flock(int fd, int op); #endif #ifndef EXEC_ARGV_CAST -#define EXEC_ARGV_CAST(x) (char **)x +#define EXEC_ARGV_CAST(x) (char **)x #endif -#define IS_NUMBER_IN_UV 0x01 /* number within UV range (maybe +#define IS_NUMBER_IN_UV 0x01 /* number within UV range (maybe not int). value returned in pointed- to UV */ #define IS_NUMBER_GREATER_THAN_UV_MAX 0x02 /* pointed to UV undefined */ -#define IS_NUMBER_NOT_INT 0x04 /* saw . or E notation or infnan */ -#define IS_NUMBER_NEG 0x08 /* leading minus sign */ -#define IS_NUMBER_INFINITY 0x10 /* this is big */ -#define IS_NUMBER_NAN 0x20 /* this is not */ -#define IS_NUMBER_TRAILING 0x40 /* number has trailing trash */ +#define IS_NUMBER_NOT_INT 0x04 /* saw . or E notation or infnan */ +#define IS_NUMBER_NEG 0x08 /* leading minus sign */ +#define IS_NUMBER_INFINITY 0x10 /* this is big */ +#define IS_NUMBER_NAN 0x20 /* this is not */ +#define IS_NUMBER_TRAILING 0x40 /* number has trailing trash */ /* =for apidoc_section $numeric @@ -8050,22 +8050,22 @@ A synonym for L =cut */ -#define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send) +#define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send) /* Number scan flags. All are used for input, * the ones used for output are so marked */ -#define PERL_SCAN_ALLOW_UNDERSCORES 0x01 /* grok_??? accept _ in numbers */ -#define PERL_SCAN_DISALLOW_PREFIX 0x02 /* grok_??? reject 0x in hex etc */ +#define PERL_SCAN_ALLOW_UNDERSCORES 0x01 /* grok_??? accept _ in numbers */ +#define PERL_SCAN_DISALLOW_PREFIX 0x02 /* grok_??? reject 0x in hex etc */ /* grok_??? input: ignored; output: found overflow */ -#define PERL_SCAN_GREATER_THAN_UV_MAX 0x04 +#define PERL_SCAN_GREATER_THAN_UV_MAX 0x04 /* grok_??? don't warn about illegal digits. To preserve * total backcompat, this isn't set on output if one is * found. Instead, see PERL_SCAN_NOTIFY_ILLDIGIT. */ -#define PERL_SCAN_SILENT_ILLDIGIT 0x08 +#define PERL_SCAN_SILENT_ILLDIGIT 0x08 -#define PERL_SCAN_TRAILING 0x10 /* grok_number_flags() allow +#define PERL_SCAN_TRAILING 0x10 /* grok_number_flags() allow trailing and set IS_NUMBER_TRAILING */ @@ -8077,10 +8077,10 @@ A synonym for L /* If this is set on input, and no illegal digit is found, * it will be cleared on output; otherwise unchanged */ -# define PERL_SCAN_NOTIFY_ILLDIGIT 0x40 +# define PERL_SCAN_NOTIFY_ILLDIGIT 0x40 /* Don't warn on overflow; output flag still set */ -# define PERL_SCAN_SILENT_OVERFLOW 0x80 +# define PERL_SCAN_SILENT_OVERFLOW 0x80 /* Forbid a leading underscore, which the other one doesn't */ # define PERL_SCAN_ALLOW_MEDIAL_UNDERSCORES (0x100|PERL_SCAN_ALLOW_UNDERSCORES) @@ -8090,40 +8090,40 @@ A synonym for L /* to let user control profiling */ #ifdef PERL_GPROF_CONTROL extern void moncontrol(int); -#define PERL_GPROF_MONCONTROL(x) moncontrol(x) +#define PERL_GPROF_MONCONTROL(x) moncontrol(x) #else #define PERL_GPROF_MONCONTROL(x) #endif /* ISO 6429 NEL - C1 control NExt Line */ /* See https://www.unicode.org/unicode/reports/tr13/ */ -#define NEXT_LINE_CHAR NEXT_LINE_NATIVE +#define NEXT_LINE_CHAR NEXT_LINE_NATIVE #ifndef PIPESOCK_MODE # define PIPESOCK_MODE #endif #ifndef SOCKET_OPEN_MODE -# define SOCKET_OPEN_MODE PIPESOCK_MODE +# define SOCKET_OPEN_MODE PIPESOCK_MODE #endif #ifndef PIPE_OPEN_MODE -# define PIPE_OPEN_MODE PIPESOCK_MODE +# define PIPE_OPEN_MODE PIPESOCK_MODE #endif -#define PERL_MAGIC_UTF8_CACHESIZE 2 +#define PERL_MAGIC_UTF8_CACHESIZE 2 #ifdef PERL_CORE -#define PERL_UNICODE_STDIN_FLAG 0x0001 -#define PERL_UNICODE_STDOUT_FLAG 0x0002 -#define PERL_UNICODE_STDERR_FLAG 0x0004 -#define PERL_UNICODE_IN_FLAG 0x0008 -#define PERL_UNICODE_OUT_FLAG 0x0010 -#define PERL_UNICODE_ARGV_FLAG 0x0020 -#define PERL_UNICODE_LOCALE_FLAG 0x0040 -#define PERL_UNICODE_WIDESYSCALLS_FLAG 0x0080 /* for Sarathy */ -#define PERL_UNICODE_UTF8CACHEASSERT_FLAG 0x0100 +#define PERL_UNICODE_STDIN_FLAG 0x0001 +#define PERL_UNICODE_STDOUT_FLAG 0x0002 +#define PERL_UNICODE_STDERR_FLAG 0x0004 +#define PERL_UNICODE_IN_FLAG 0x0008 +#define PERL_UNICODE_OUT_FLAG 0x0010 +#define PERL_UNICODE_ARGV_FLAG 0x0020 +#define PERL_UNICODE_LOCALE_FLAG 0x0040 +#define PERL_UNICODE_WIDESYSCALLS_FLAG 0x0080 /* for Sarathy */ +#define PERL_UNICODE_UTF8CACHEASSERT_FLAG 0x0100 #define PERL_UNICODE_STD_FLAG \ (PERL_UNICODE_STDIN_FLAG | \ @@ -8139,19 +8139,19 @@ extern void moncontrol(int); PERL_UNICODE_INOUT_FLAG | \ PERL_UNICODE_LOCALE_FLAG) -#define PERL_UNICODE_ALL_FLAGS 0x01ff +#define PERL_UNICODE_ALL_FLAGS 0x01ff -#define PERL_UNICODE_STDIN 'I' -#define PERL_UNICODE_STDOUT 'O' -#define PERL_UNICODE_STDERR 'E' -#define PERL_UNICODE_STD 'S' -#define PERL_UNICODE_IN 'i' -#define PERL_UNICODE_OUT 'o' -#define PERL_UNICODE_INOUT 'D' -#define PERL_UNICODE_ARGV 'A' -#define PERL_UNICODE_LOCALE 'L' -#define PERL_UNICODE_WIDESYSCALLS 'W' -#define PERL_UNICODE_UTF8CACHEASSERT 'a' +#define PERL_UNICODE_STDIN 'I' +#define PERL_UNICODE_STDOUT 'O' +#define PERL_UNICODE_STDERR 'E' +#define PERL_UNICODE_STD 'S' +#define PERL_UNICODE_IN 'i' +#define PERL_UNICODE_OUT 'o' +#define PERL_UNICODE_INOUT 'D' +#define PERL_UNICODE_ARGV 'A' +#define PERL_UNICODE_LOCALE 'L' +#define PERL_UNICODE_WIDESYSCALLS 'W' +#define PERL_UNICODE_UTF8CACHEASSERT 'a' #endif @@ -8164,7 +8164,7 @@ and L. =cut */ -#define PERL_SIGNALS_UNSAFE_FLAG 0x0001 +#define PERL_SIGNALS_UNSAFE_FLAG 0x0001 /* =for apidoc_section $numeric @@ -8180,7 +8180,7 @@ beware that this evaluates its argument twice, so no C. =cut */ -#define PERL_ABS(x) ((x) < 0 ? -(x) : (x)) +#define PERL_ABS(x) ((x) < 0 ? -(x) : (x)) #if defined(__DECC) && defined(__osf__) #pragma message disable (mainparm) /* Perl uses the envp in main(). */ @@ -8189,12 +8189,12 @@ beware that this evaluates its argument twice, so no C. #define do_open(g, n, l, a, rm, rp, sf) \ do_openn(g, n, l, a, rm, rp, sf, (SV **) NULL, 0) #ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION -# define do_exec(cmd) do_exec3(cmd,0,0) +# define do_exec(cmd) do_exec3(cmd,0,0) #endif #ifdef OS2 -# define do_aexec Perl_do_aexec +# define do_aexec Perl_do_aexec #else -# define do_aexec(really, mark,sp) do_aexec5(really, mark, sp, 0, 0) +# define do_aexec(really, mark,sp) do_aexec5(really, mark, sp, 0, 0) #endif @@ -8225,8 +8225,8 @@ Allows one ending \0 * the flags from _pretty are passed straight through to _escape. */ -#define PERL_PV_ESCAPE_QUOTE 0x000001 -#define PERL_PV_PRETTY_QUOTE PERL_PV_ESCAPE_QUOTE +#define PERL_PV_ESCAPE_QUOTE 0x000001 +#define PERL_PV_PRETTY_QUOTE PERL_PV_ESCAPE_QUOTE #define PERL_PV_PRETTY_ELLIPSES 0x000002 #define PERL_PV_PRETTY_LTGT 0x000004 @@ -8240,18 +8240,18 @@ Allows one ending \0 #define PERL_PV_ESCAPE_ALL 0x001000 #define PERL_PV_ESCAPE_NOBACKSLASH 0x002000 #define PERL_PV_ESCAPE_NOCLEAR 0x004000 -#define PERL_PV_PRETTY_NOCLEAR PERL_PV_ESCAPE_NOCLEAR -#define PERL_PV_ESCAPE_RE 0x008000 +#define PERL_PV_PRETTY_NOCLEAR PERL_PV_ESCAPE_NOCLEAR +#define PERL_PV_ESCAPE_RE 0x008000 /* Escape PV with hex, except leave NULs as octal: */ -#define PERL_PV_ESCAPE_DWIM 0x010000 +#define PERL_PV_ESCAPE_DWIM 0x010000 /* Escape PV with all hex, including NUL. */ -#define PERL_PV_ESCAPE_DWIM_ALL_HEX 0x020000 +#define PERL_PV_ESCAPE_DWIM_ALL_HEX 0x020000 /* Do not escape word characters, alters meaning of other flags */ -#define PERL_PV_ESCAPE_NON_WC 0x040000 -#define PERL_PV_ESCAPE_TRUNC_MIDDLE 0x080000 +#define PERL_PV_ESCAPE_NON_WC 0x040000 +#define PERL_PV_ESCAPE_TRUNC_MIDDLE 0x080000 #define PERL_PV_PRETTY_QUOTEDPREFIX \ ( \ @@ -8264,7 +8264,7 @@ Allows one ending \0 /* used by pv_display in dump.c */ -#define PERL_PV_PRETTY_DUMP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE +#define PERL_PV_PRETTY_DUMP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE #define PERL_PV_PRETTY_REGPROP \ PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE|PERL_PV_ESCAPE_NONASCII @@ -8592,10 +8592,10 @@ END_EXTERN_C * NV_INF/NV_NAN might not be a compile-time constant, in which case it * cannot be used to initialize PL_inf/PL_nan above. */ #ifndef NV_INF -# define NV_INF PL_inf.nv +# define NV_INF PL_inf.nv #endif #ifndef NV_NAN -# define NV_NAN PL_nan.nv +# define NV_NAN PL_nan.nv #endif /* NaNs (not-a-numbers) can carry payload bits, in addition to @@ -8700,53 +8700,53 @@ END_EXTERN_C * NVMANTBITS works for normal floats. */ /* We do not want to include the quiet/signaling bit. */ -#define NV_NAN_BITS (NVMANTBITS - 1) +#define NV_NAN_BITS (NVMANTBITS - 1) #if defined(USE_LONG_DOUBLE) && NVSIZE > DOUBLESIZE # if LONG_DOUBLEKIND == LONG_DOUBLE_IS_IEEE_754_128_BIT_LITTLE_ENDIAN -# define NV_NAN_QS_BYTE_OFFSET 13 +# define NV_NAN_QS_BYTE_OFFSET 13 # elif LONG_DOUBLEKIND == LONG_DOUBLE_IS_IEEE_754_128_BIT_BIG_ENDIAN -# define NV_NAN_QS_BYTE_OFFSET 2 +# define NV_NAN_QS_BYTE_OFFSET 2 # elif LONG_DOUBLEKIND == LONG_DOUBLE_IS_X86_80_BIT_LITTLE_ENDIAN -# define NV_NAN_QS_BYTE_OFFSET 7 +# define NV_NAN_QS_BYTE_OFFSET 7 # elif LONG_DOUBLEKIND == LONG_DOUBLE_IS_X86_80_BIT_BIG_ENDIAN -# define NV_NAN_QS_BYTE_OFFSET 2 +# define NV_NAN_QS_BYTE_OFFSET 2 # elif LONG_DOUBLEKIND == LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_LE -# define NV_NAN_QS_BYTE_OFFSET 13 +# define NV_NAN_QS_BYTE_OFFSET 13 # elif LONG_DOUBLEKIND == LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_BE -# define NV_NAN_QS_BYTE_OFFSET 1 +# define NV_NAN_QS_BYTE_OFFSET 1 # elif LONG_DOUBLEKIND == LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_BE -# define NV_NAN_QS_BYTE_OFFSET 9 +# define NV_NAN_QS_BYTE_OFFSET 9 # elif LONG_DOUBLEKIND == LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_LE -# define NV_NAN_QS_BYTE_OFFSET 6 +# define NV_NAN_QS_BYTE_OFFSET 6 # else # error "Unexpected long double format" # endif #else # ifdef USE_QUADMATH # ifdef NV_LITTLE_ENDIAN -# define NV_NAN_QS_BYTE_OFFSET 13 +# define NV_NAN_QS_BYTE_OFFSET 13 # elif defined(NV_BIG_ENDIAN) -# define NV_NAN_QS_BYTE_OFFSET 2 +# define NV_NAN_QS_BYTE_OFFSET 2 # else # error "Unexpected quadmath format" # endif # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_32_BIT_LITTLE_ENDIAN -# define NV_NAN_QS_BYTE_OFFSET 2 +# define NV_NAN_QS_BYTE_OFFSET 2 # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_32_BIT_BIG_ENDIAN -# define NV_NAN_QS_BYTE_OFFSET 1 +# define NV_NAN_QS_BYTE_OFFSET 1 # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_64_BIT_LITTLE_ENDIAN -# define NV_NAN_QS_BYTE_OFFSET 6 +# define NV_NAN_QS_BYTE_OFFSET 6 # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_64_BIT_BIG_ENDIAN -# define NV_NAN_QS_BYTE_OFFSET 1 +# define NV_NAN_QS_BYTE_OFFSET 1 # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_128_BIT_LITTLE_ENDIAN -# define NV_NAN_QS_BYTE_OFFSET 13 +# define NV_NAN_QS_BYTE_OFFSET 13 # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_128_BIT_BIG_ENDIAN -# define NV_NAN_QS_BYTE_OFFSET 2 +# define NV_NAN_QS_BYTE_OFFSET 2 # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_64_BIT_MIXED_ENDIAN_LE_BE -# define NV_NAN_QS_BYTE_OFFSET 2 /* bytes 4 5 6 7 0 1 2 3 (MSB 7) */ +# define NV_NAN_QS_BYTE_OFFSET 2 /* bytes 4 5 6 7 0 1 2 3 (MSB 7) */ # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_64_BIT_MIXED_ENDIAN_BE_LE -# define NV_NAN_QS_BYTE_OFFSET 5 /* bytes 3 2 1 0 7 6 5 4 (MSB 7) */ +# define NV_NAN_QS_BYTE_OFFSET 5 /* bytes 3 2 1 0 7 6 5 4 (MSB 7) */ # else /* For example the VAX formats should never get * here because they do not have NaN. */ @@ -8754,23 +8754,23 @@ END_EXTERN_C # endif #endif /* NV_NAN_QS_BYTE is the byte to test for the quiet/signaling */ -#define NV_NAN_QS_BYTE(nvp) (((U8*)(nvp))[NV_NAN_QS_BYTE_OFFSET]) +#define NV_NAN_QS_BYTE(nvp) (((U8*)(nvp))[NV_NAN_QS_BYTE_OFFSET]) /* NV_NAN_QS_BIT is the bit to test in the NV_NAN_QS_BYTE_OFFSET * for the quiet/signaling */ #if defined(USE_LONG_DOUBLE) && \ (LONG_DOUBLEKIND == LONG_DOUBLE_IS_X86_80_BIT_LITTLE_ENDIAN || \ LONG_DOUBLEKIND == LONG_DOUBLE_IS_X86_80_BIT_BIG_ENDIAN) -# define NV_NAN_QS_BIT_SHIFT 6 /* 0x40 */ +# define NV_NAN_QS_BIT_SHIFT 6 /* 0x40 */ #elif defined(USE_LONG_DOUBLE) && \ (LONG_DOUBLEKIND == LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_LE || \ LONG_DOUBLEKIND == LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_BE || \ LONG_DOUBLEKIND == LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_BE || \ LONG_DOUBLEKIND == LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_LE) -# define NV_NAN_QS_BIT_SHIFT 3 /* 0x08, but not via NV_NAN_BITS */ +# define NV_NAN_QS_BIT_SHIFT 3 /* 0x08, but not via NV_NAN_BITS */ #else -# define NV_NAN_QS_BIT_SHIFT ((NV_NAN_BITS) % 8) /* usually 3, or 0x08 */ +# define NV_NAN_QS_BIT_SHIFT ((NV_NAN_BITS) % 8) /* usually 3, or 0x08 */ #endif -#define NV_NAN_QS_BIT (1 << (NV_NAN_QS_BIT_SHIFT)) +#define NV_NAN_QS_BIT (1 << (NV_NAN_QS_BIT_SHIFT)) /* NV_NAN_QS_BIT_OFFSET is the bit offset from the beginning of a NV (bytes * ordered big-endianly) for the quiet/signaling bit for the quiet/signaling */ #define NV_NAN_QS_BIT_OFFSET \ @@ -8780,8 +8780,8 @@ END_EXTERN_C * true if the NV_NAN_QS_BIT being on indicates signaling NaN. */ #define NV_NAN_QS_QUIET \ ((NV_NAN_QS_BYTE(PL_nan.u8) & NV_NAN_QS_BIT) == NV_NAN_QS_BIT) -#define NV_NAN_QS_SIGNALING (!(NV_NAN_QS_QUIET)) -#define NV_NAN_QS_TEST(nvp) (NV_NAN_QS_BYTE(nvp) & NV_NAN_QS_BIT) +#define NV_NAN_QS_SIGNALING (!(NV_NAN_QS_QUIET)) +#define NV_NAN_QS_TEST(nvp) (NV_NAN_QS_BYTE(nvp) & NV_NAN_QS_BIT) /* NV_NAN_IS_QUIET() returns true if the NV behind nvp is a NaN, whether * it is a quiet NaN, NV_NAN_IS_SIGNALING() if a signaling NaN. Note * however that these do not check whether the nvp is a NaN. */ @@ -8797,7 +8797,7 @@ END_EXTERN_C (NV_NAN_QS_QUIET ? \ (NV_NAN_QS_BYTE(nvp) &= ~NV_NAN_QS_BIT) : \ (NV_NAN_QS_BYTE(nvp) |= NV_NAN_QS_BIT)) -#define NV_NAN_QS_XOR(nvp) (NV_NAN_QS_BYTE(nvp) ^= NV_NAN_QS_BIT) +#define NV_NAN_QS_XOR(nvp) (NV_NAN_QS_BYTE(nvp) ^= NV_NAN_QS_BIT) /* NV_NAN_PAYLOAD_MASK: masking the nan payload bits. * @@ -8836,11 +8836,11 @@ END_EXTERN_C #if defined(USE_LONG_DOUBLE) && NVSIZE > DOUBLESIZE # if LONG_DOUBLEKIND == LONG_DOUBLE_IS_IEEE_754_128_BIT_LITTLE_ENDIAN -# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_128_LE -# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_128_LE +# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_128_LE +# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_128_LE # elif LONG_DOUBLEKIND == LONG_DOUBLE_IS_IEEE_754_128_BIT_BIG_ENDIAN -# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_128_BE -# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_128_BE +# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_128_BE +# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_128_BE # elif LONG_DOUBLEKIND == LONG_DOUBLE_IS_X86_80_BIT_LITTLE_ENDIAN # if LONG_DOUBLESIZE == 10 # define NV_NAN_PAYLOAD_MASK \ @@ -8915,38 +8915,38 @@ END_EXTERN_C #else # ifdef USE_QUADMATH /* quadmath is not long double */ # ifdef NV_LITTLE_ENDIAN -# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_128_LE -# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_128_LE +# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_128_LE +# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_128_LE # elif defined(NV_BIG_ENDIAN) -# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_128_BE -# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_128_BE +# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_128_BE +# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_128_BE # else # error "Unexpected quadmath format" # endif # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_32_BIT_LITTLE_ENDIAN -# define NV_NAN_PAYLOAD_MASK 0xff, 0xff, 0x07, 0x00 -# define NV_NAN_PAYLOAD_PERM 0x0, 0x1, 0x2, 0xFF +# define NV_NAN_PAYLOAD_MASK 0xff, 0xff, 0x07, 0x00 +# define NV_NAN_PAYLOAD_PERM 0x0, 0x1, 0x2, 0xFF # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_32_BIT_BIG_ENDIAN -# define NV_NAN_PAYLOAD_MASK 0x00, 0x07, 0xff, 0xff -# define NV_NAN_PAYLOAD_PERM 0xFF, 0x2, 0x1, 0x0 +# define NV_NAN_PAYLOAD_MASK 0x00, 0x07, 0xff, 0xff +# define NV_NAN_PAYLOAD_PERM 0xFF, 0x2, 0x1, 0x0 # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_64_BIT_LITTLE_ENDIAN -# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_64_LE -# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_64_LE +# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_64_LE +# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_64_LE # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_64_BIT_BIG_ENDIAN -# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_64_BE -# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_64_BE +# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_64_BE +# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_64_BE # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_128_BIT_LITTLE_ENDIAN -# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_128_LE -# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_128_LE +# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_128_LE +# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_128_LE # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_128_BIT_BIG_ENDIAN -# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_128_BE -# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_128_BE +# define NV_NAN_PAYLOAD_MASK NV_NAN_PAYLOAD_MASK_IEEE_754_128_BE +# define NV_NAN_PAYLOAD_PERM NV_NAN_PAYLOAD_PERM_IEEE_754_128_BE # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_64_BIT_MIXED_ENDIAN_LE_BE -# define NV_NAN_PAYLOAD_MASK 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0xff, 0xff -# define NV_NAN_PAYLOAD_PERM 0x4, 0x5, 0x6, 0xFF, 0x0, 0x1, 0x2, 0x3 +# define NV_NAN_PAYLOAD_MASK 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0xff, 0xff +# define NV_NAN_PAYLOAD_PERM 0x4, 0x5, 0x6, 0xFF, 0x0, 0x1, 0x2, 0x3 # elif DOUBLEKIND == DOUBLE_IS_IEEE_754_64_BIT_MIXED_ENDIAN_BE_LE -# define NV_NAN_PAYLOAD_MASK 0xff, 0xff, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff -# define NV_NAN_PAYLOAD_PERM 0x3, 0x2, 0x1, 0x0, 0xFF, 0x6, 0x5, 0x4 +# define NV_NAN_PAYLOAD_MASK 0xff, 0xff, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff +# define NV_NAN_PAYLOAD_PERM 0x3, 0x2, 0x1, 0x0, 0xFF, 0x6, 0x5, 0x4 # else # error "Unexpected double format" # endif @@ -8958,7 +8958,7 @@ END_EXTERN_C * allows consistent behavior from code that calls srand() with * no arguments, either explicitly or implicitly. */ -#define PERL_SRAND_OVERRIDE_NEXT() PERL_XORSHIFT32_A(PL_srand_override_next); +#define PERL_SRAND_OVERRIDE_NEXT() PERL_XORSHIFT32_A(PL_srand_override_next); #define PERL_SRAND_OVERRIDE_NEXT_INIT() \ STMT_START { \ @@ -8992,10 +8992,10 @@ END_EXTERN_C * is unusual, so it unlikely we need a very large number here. */ #ifndef PERL_MAX_NESTED_EVAL_BEGIN_BLOCKS_DEFAULT -#define PERL_MAX_NESTED_EVAL_BEGIN_BLOCKS_DEFAULT 1000 +#define PERL_MAX_NESTED_EVAL_BEGIN_BLOCKS_DEFAULT 1000 #endif /* ${^MAX_NESTED_EVAL_BEGIN_BLOCKS} */ -#define PERL_VAR_MAX_NESTED_EVAL_BEGIN_BLOCKS "\015AX_NESTED_EVAL_BEGIN_BLOCKS" +#define PERL_VAR_MAX_NESTED_EVAL_BEGIN_BLOCKS "\015AX_NESTED_EVAL_BEGIN_BLOCKS" /* Defines like this make it easier to do porting/diag.t. They are * no- ops that return their argument which can be used to hint to @@ -9015,10 +9015,10 @@ END_EXTERN_C #define PERL_DIAG_WARN_SYNTAX(x) PERL_DIAG_STR_(x) #define PERL_DIAG_DIE_SYNTAX(x) PERL_DIAG_STR_(x) -#define PERL_STOP_PARSING_AFTER_N_ERRORS 10 +#define PERL_STOP_PARSING_AFTER_N_ERRORS 10 -#define PERL_PARSE_IS_SYNTAX_ERROR_FLAG 128 -#define PERL_PARSE_IS_SYNTAX_ERROR(f) ((f) & PERL_PARSE_IS_SYNTAX_ERROR_FLAG) +#define PERL_PARSE_IS_SYNTAX_ERROR_FLAG 128 +#define PERL_PARSE_IS_SYNTAX_ERROR(f) ((f) & PERL_PARSE_IS_SYNTAX_ERROR_FLAG) #define PERL_PARSE_ERROR_COUNT(f) \ ((f) & (PERL_PARSE_IS_SYNTAX_ERROR_FLAG-1)) diff --git a/perl_inc_macro.h b/perl_inc_macro.h index b8722d006ce8..3117faa8f881 100644 --- a/perl_inc_macro.h +++ b/perl_inc_macro.h @@ -20,7 +20,7 @@ #ifndef DEFINE_INC_MACROS /* protect against multiple inclusions */ -#define DEFINE_INC_MACROS 1 +#define DEFINE_INC_MACROS 1 #ifdef APPLLIB_EXP # define INCPUSH_APPLLIB_EXP \ @@ -79,7 +79,7 @@ /* used by INCPUSH_PRIVLIB_EXP */ #ifndef PRIVLIB_EXP -# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" +# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" #endif #if defined(WIN32) @@ -100,7 +100,7 @@ /* submacros for INCPUSH_PERL5LIB */ -#define _INCPUSH_PERL5LIB_IF if (perl5lib && *perl5lib != '\0') +#define _INCPUSH_PERL5LIB_IF if (perl5lib && *perl5lib != '\0') #ifndef VMS # define _INCPUSH_PERL5LIB_ADD \ @@ -122,7 +122,7 @@ #endif /* this macro is special and use submacros from above */ -#define INCPUSH_PERL5LIB if (!TAINTING_get) { _INCPUSH_PERL5LIB_ADD } +#define INCPUSH_PERL5LIB if (!TAINTING_get) { _INCPUSH_PERL5LIB_ADD } /* Use the ~-expanded versions of APPLLIB (undocumented), SITELIB and VENDORLIB for older versions diff --git a/perl_langinfo.h b/perl_langinfo.h index 0e3e6018ac5f..a74c46e86460 100644 --- a/perl_langinfo.h +++ b/perl_langinfo.h @@ -2,7 +2,7 @@ * work on systems that don't have that. */ #ifndef PERL_LANGINFO_H -#define PERL_LANGINFO_H 1 +#define PERL_LANGINFO_H 1 #include "config.h" @@ -16,175 +16,175 @@ /* If foo doesn't exist define it to a negative number. */ #ifndef CODESET -# define CODESET -1 +# define CODESET -1 #endif #ifndef D_T_FMT -# define D_T_FMT -2 +# define D_T_FMT -2 #endif #ifndef D_FMT -# define D_FMT -3 +# define D_FMT -3 #endif #ifndef T_FMT -# define T_FMT -4 +# define T_FMT -4 #endif #ifndef T_FMT_AMPM -# define T_FMT_AMPM -5 +# define T_FMT_AMPM -5 #endif #ifndef AM_STR -# define AM_STR -6 +# define AM_STR -6 #endif #ifndef PM_STR -# define PM_STR -7 +# define PM_STR -7 #endif #ifndef DAY_1 -# define DAY_1 -8 +# define DAY_1 -8 #endif #ifndef DAY_2 -# define DAY_2 -9 +# define DAY_2 -9 #endif #ifndef DAY_3 -# define DAY_3 -10 +# define DAY_3 -10 #endif #ifndef DAY_4 -# define DAY_4 -11 +# define DAY_4 -11 #endif #ifndef DAY_5 -# define DAY_5 -12 +# define DAY_5 -12 #endif #ifndef DAY_6 -# define DAY_6 -13 +# define DAY_6 -13 #endif #ifndef DAY_7 -# define DAY_7 -14 +# define DAY_7 -14 #endif #ifndef ABDAY_1 -# define ABDAY_1 -15 +# define ABDAY_1 -15 #endif #ifndef ABDAY_2 -# define ABDAY_2 -16 +# define ABDAY_2 -16 #endif #ifndef ABDAY_3 -# define ABDAY_3 -17 +# define ABDAY_3 -17 #endif #ifndef ABDAY_4 -# define ABDAY_4 -18 +# define ABDAY_4 -18 #endif #ifndef ABDAY_5 -# define ABDAY_5 -19 +# define ABDAY_5 -19 #endif #ifndef ABDAY_6 -# define ABDAY_6 -20 +# define ABDAY_6 -20 #endif #ifndef ABDAY_7 -# define ABDAY_7 -21 +# define ABDAY_7 -21 #endif #ifndef MON_1 -# define MON_1 -22 +# define MON_1 -22 #endif #ifndef MON_2 -# define MON_2 -23 +# define MON_2 -23 #endif #ifndef MON_3 -# define MON_3 -24 +# define MON_3 -24 #endif #ifndef MON_4 -# define MON_4 -25 +# define MON_4 -25 #endif #ifndef MON_5 -# define MON_5 -26 +# define MON_5 -26 #endif #ifndef MON_6 -# define MON_6 -27 +# define MON_6 -27 #endif #ifndef MON_7 -# define MON_7 -28 +# define MON_7 -28 #endif #ifndef MON_8 -# define MON_8 -29 +# define MON_8 -29 #endif #ifndef MON_9 -# define MON_9 -30 +# define MON_9 -30 #endif #ifndef MON_10 -# define MON_10 -31 +# define MON_10 -31 #endif #ifndef MON_11 -# define MON_11 -32 +# define MON_11 -32 #endif #ifndef MON_12 -# define MON_12 -33 +# define MON_12 -33 #endif #ifndef ABMON_1 -# define ABMON_1 -34 +# define ABMON_1 -34 #endif #ifndef ABMON_2 -# define ABMON_2 -35 +# define ABMON_2 -35 #endif #ifndef ABMON_3 -# define ABMON_3 -36 +# define ABMON_3 -36 #endif #ifndef ABMON_4 -# define ABMON_4 -37 +# define ABMON_4 -37 #endif #ifndef ABMON_5 -# define ABMON_5 -38 +# define ABMON_5 -38 #endif #ifndef ABMON_6 -# define ABMON_6 -39 +# define ABMON_6 -39 #endif #ifndef ABMON_7 -# define ABMON_7 -40 +# define ABMON_7 -40 #endif #ifndef ABMON_8 -# define ABMON_8 -41 +# define ABMON_8 -41 #endif #ifndef ABMON_9 -# define ABMON_9 -42 +# define ABMON_9 -42 #endif #ifndef ABMON_10 -# define ABMON_10 -43 +# define ABMON_10 -43 #endif #ifndef ABMON_11 -# define ABMON_11 -44 +# define ABMON_11 -44 #endif #ifndef ABMON_12 -# define ABMON_12 -45 +# define ABMON_12 -45 #endif #ifndef ERA -# define ERA -46 +# define ERA -46 #endif #ifndef ERA_D_FMT -# define ERA_D_FMT -47 +# define ERA_D_FMT -47 #endif #ifndef ERA_D_T_FMT -# define ERA_D_T_FMT -48 +# define ERA_D_T_FMT -48 #endif #ifndef ERA_T_FMT -# define ERA_T_FMT -49 +# define ERA_T_FMT -49 #endif #ifndef ALT_DIGITS -# define ALT_DIGITS -50 +# define ALT_DIGITS -50 #endif #ifndef RADIXCHAR -# define RADIXCHAR -51 +# define RADIXCHAR -51 #endif #ifndef THOUSEP -# define THOUSEP -52 +# define THOUSEP -52 #endif #ifndef YESEXPR -# define YESEXPR -53 +# define YESEXPR -53 #endif #ifndef YESSTR -# define YESSTR -54 +# define YESSTR -54 #endif #ifndef NOEXPR -# define NOEXPR -55 +# define NOEXPR -55 #endif #ifndef NOSTR -# define NOSTR -56 +# define NOSTR -56 #endif #ifndef CRNCYSTR -# define CRNCYSTR -57 +# define CRNCYSTR -57 #endif #endif diff --git a/perlio.h b/perlio.h index c7f57ff09ace..afa3228f5302 100644 --- a/perlio.h +++ b/perlio.h @@ -40,11 +40,11 @@ #include #if defined(USE_64_BIT_STDIO) && defined(HAS_FTELLO) && !defined(USE_FTELL64) -#define ftell ftello +#define ftell ftello #endif #if defined(USE_64_BIT_STDIO) && defined(HAS_FSEEKO) && !defined(USE_FSEEK64) -#define fseek fseeko +#define fseek fseeko #endif /* BS2000 includes are sometimes a bit non standard :-( */ @@ -59,8 +59,8 @@ typedef struct _PerlIO PerlIOl; typedef struct _PerlIO_funcs PerlIO_funcs; typedef PerlIOl *PerlIO; -#define PerlIO PerlIO -#define PERLIO_LAYERS 1 +#define PerlIO PerlIO +#define PERLIO_LAYERS 1 /* =for apidoc_section $io @@ -73,8 +73,8 @@ Cast the pointer C to be of type S>. =cut */ -#define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs -#define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs) +#define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs +#define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs) PERL_CALLCONV void PerlIO_define_layer(pTHX_ PerlIO_funcs *tab); PERL_CALLCONV PerlIO_funcs *PerlIO_find_layer(pTHX_ const char *name, @@ -102,11 +102,11 @@ PERL_CALLCONV void PerlIO_clone(pTHX_ PerlInterpreter *proto, some non UNIX ports which still use "native" stdio features. */ # ifndef PERLIO_NOT_STDIO -# define PERLIO_NOT_STDIO 1 +# define PERLIO_NOT_STDIO 1 # endif #else # ifndef PERLIO_NOT_STDIO -# define PERLIO_NOT_STDIO 0 +# define PERLIO_NOT_STDIO 0 # endif #endif @@ -134,44 +134,44 @@ PERL_CALLCONV void PerlIO_clone(pTHX_ PerlInterpreter *proto, /* ----------- fill in things that have not got #define'd ---------- */ #ifndef Fpos_t -#define Fpos_t Off_t +#define Fpos_t Off_t #endif #ifndef EOF -#define EOF (-1) +#define EOF (-1) #endif /* This is to catch case with no stdio */ #ifndef BUFSIZ -#define BUFSIZ 1024 +#define BUFSIZ 1024 #endif /* The default buffer size for the perlio buffering layer */ #ifndef PERLIOBUF_DEFAULT_BUFSIZ -#define PERLIOBUF_DEFAULT_BUFSIZ (BUFSIZ > 8192 ? BUFSIZ : 8192) +#define PERLIOBUF_DEFAULT_BUFSIZ (BUFSIZ > 8192 ? BUFSIZ : 8192) #endif #ifndef SEEK_SET -#define SEEK_SET 0 +#define SEEK_SET 0 #endif #ifndef SEEK_CUR -#define SEEK_CUR 1 +#define SEEK_CUR 1 #endif #ifndef SEEK_END -#define SEEK_END 2 +#define SEEK_END 2 #endif -#define PERLIO_DUP_CLONE 1 -#define PERLIO_DUP_FD 2 +#define PERLIO_DUP_CLONE 1 +#define PERLIO_DUP_FD 2 /* --------------------- Now prototypes for functions --------------- */ START_EXTERN_C #ifndef __attribute__format__ # ifdef HASATTRIBUTE_FORMAT -# define __attribute__format__(x,y,z) __attribute__((format(x,y,z))) +# define __attribute__format__(x,y,z) __attribute__((format(x,y,z))) # else # define __attribute__format__(x,y,z) # endif diff --git a/perliol.h b/perliol.h index d94465217416..dc8fe9711a74 100644 --- a/perliol.h +++ b/perliol.h @@ -53,14 +53,14 @@ struct _PerlIO_funcs { /*---------------------------------------------------------------------------*/ /* Kind values */ -#define PERLIO_K_RAW 0x00000001 -#define PERLIO_K_BUFFERED 0x00000002 -#define PERLIO_K_CANCRLF 0x00000004 -#define PERLIO_K_FASTGETS 0x00000008 -#define PERLIO_K_DUMMY 0x00000010 -#define PERLIO_K_UTF8 0x00008000 -#define PERLIO_K_DESTRUCT 0x00010000 -#define PERLIO_K_MULTIARG 0x00020000 +#define PERLIO_K_RAW 0x00000001 +#define PERLIO_K_BUFFERED 0x00000002 +#define PERLIO_K_CANCRLF 0x00000004 +#define PERLIO_K_FASTGETS 0x00000008 +#define PERLIO_K_DUMMY 0x00000010 +#define PERLIO_K_UTF8 0x00008000 +#define PERLIO_K_DESTRUCT 0x00010000 +#define PERLIO_K_MULTIARG 0x00020000 /*---------------------------------------------------------------------------*/ struct _PerlIO { @@ -81,29 +81,29 @@ struct _PerlIO { /*---------------------------------------------------------------------------*/ /* Flag values */ -#define PERLIO_F_EOF 0x00000100 -#define PERLIO_F_CANWRITE 0x00000200 -#define PERLIO_F_CANREAD 0x00000400 -#define PERLIO_F_ERROR 0x00000800 -#define PERLIO_F_TRUNCATE 0x00001000 -#define PERLIO_F_APPEND 0x00002000 -#define PERLIO_F_CRLF 0x00004000 -#define PERLIO_F_UTF8 0x00008000 -#define PERLIO_F_UNBUF 0x00010000 -#define PERLIO_F_WRBUF 0x00020000 -#define PERLIO_F_RDBUF 0x00040000 -#define PERLIO_F_LINEBUF 0x00080000 -#define PERLIO_F_TEMP 0x00100000 -#define PERLIO_F_OPEN 0x00200000 -#define PERLIO_F_FASTGETS 0x00400000 -#define PERLIO_F_TTY 0x00800000 -#define PERLIO_F_NOTREG 0x01000000 -#define PERLIO_F_CLEARED 0x02000000 /* layer cleared but not freed */ +#define PERLIO_F_EOF 0x00000100 +#define PERLIO_F_CANWRITE 0x00000200 +#define PERLIO_F_CANREAD 0x00000400 +#define PERLIO_F_ERROR 0x00000800 +#define PERLIO_F_TRUNCATE 0x00001000 +#define PERLIO_F_APPEND 0x00002000 +#define PERLIO_F_CRLF 0x00004000 +#define PERLIO_F_UTF8 0x00008000 +#define PERLIO_F_UNBUF 0x00010000 +#define PERLIO_F_WRBUF 0x00020000 +#define PERLIO_F_RDBUF 0x00040000 +#define PERLIO_F_LINEBUF 0x00080000 +#define PERLIO_F_TEMP 0x00100000 +#define PERLIO_F_OPEN 0x00200000 +#define PERLIO_F_FASTGETS 0x00400000 +#define PERLIO_F_TTY 0x00800000 +#define PERLIO_F_NOTREG 0x01000000 +#define PERLIO_F_CLEARED 0x02000000 /* layer cleared but not freed */ -#define PerlIOBase(f) (*(f)) +#define PerlIOBase(f) (*(f)) #define PerlIOSelf(f,type) ((type *)PerlIOBase(f)) -#define PerlIONext(f) (&(PerlIOBase(f)->next)) -#define PerlIOValid(f) ((f) && *(f)) +#define PerlIONext(f) (&(PerlIOBase(f)->next)) +#define PerlIOValid(f) ((f) && *(f)) /*---------------------------------------------------------------------------*/ EXTCONST PerlIO_funcs PerlIO_unix; @@ -116,12 +116,12 @@ EXTCONST PerlIO_funcs PerlIO_raw; EXTCONST PerlIO_funcs PerlIO_pending; PERL_CALLCONV PerlIO *PerlIO_allocate(pTHX); PERL_CALLCONV SV *PerlIO_arg_fetch(PerlIO_list_t *av, IV n); -#define PerlIOArg PerlIO_arg_fetch(layers,n) +#define PerlIOArg PerlIO_arg_fetch(layers,n) #ifdef PERLIO_USING_CRLF -#define PERLIO_STDTEXT "t" +#define PERLIO_STDTEXT "t" #else -#define PERLIO_STDTEXT "" +#define PERLIO_STDTEXT "" #endif /*---------------------------------------------------------------------------*/ diff --git a/perlvars.h b/perlvars.h index 00bed3e3544d..6d643f153c4a 100644 --- a/perlvars.h +++ b/perlvars.h @@ -264,7 +264,7 @@ PERLVARA(G, hash_state_w, PERL_HASH_STATE_WORDS, PVT__PERL_HASH_WORD_TYPE) \ /* perl.c and hv.h */ #endif #if defined(PERL_USE_SINGLE_CHAR_HASH_CACHE) -#define PERL_SINGLE_CHAR_HASH_CACHE_ELEMS ((1+256) * sizeof(U32)) +#define PERL_SINGLE_CHAR_HASH_CACHE_ELEMS ((1+256) * sizeof(U32)) PERLVARA(G, hash_chars, PERL_SINGLE_CHAR_HASH_CACHE_ELEMS, unsigned char) \ /* perl.c and hv.h */ #endif diff --git a/pp.h b/pp.h index 1c59668fb37f..dfd7027ecb03 100644 --- a/pp.h +++ b/pp.h @@ -9,7 +9,7 @@ * License or the Artistic License, as specified in the README file. */ -#define PP(s) OP * Perl_##s(pTHX) +#define PP(s) OP * Perl_##s(pTHX) /* =for apidoc_section $stack @@ -52,8 +52,8 @@ Refetch the stack pointer. Used after a callback. See L. =cut */ #undef SP /* Solaris 2.7 i386 has this in /usr/include/sys/reg.h */ -#define SP sp -#define MARK mark +#define SP sp +#define MARK mark /* =for apidoc Amn;||TARG @@ -64,7 +64,7 @@ a return value for the OP, but some use it for other purposes. =cut */ -#define TARG targ +#define TARG targ #define PUSHMARK(p) \ STMT_START { \ @@ -78,8 +78,8 @@ a return value for the OP, but some use it for other purposes. PL_markstack_ptr, (IV)*mark_stack_entry))); \ } STMT_END -#define TOPMARK Perl_TOPMARK(aTHX) -#define POPMARK Perl_POPMARK(aTHX) +#define TOPMARK Perl_TOPMARK(aTHX) +#define POPMARK Perl_POPMARK(aTHX) #define INCMARK \ STMT_START { \ @@ -101,9 +101,9 @@ a return value for the OP, but some use it for other purposes. #define GETTARGETSTACKED \ targ = (PL_op->op_flags & OPf_STACKED ? POPs : PAD_SV(PL_op->op_targ)) -#define dTARGETSTACKED SV * GETTARGETSTACKED +#define dTARGETSTACKED SV * GETTARGETSTACKED -#define GETTARGET targ = PAD_SV(PL_op->op_targ) +#define GETTARGET targ = PAD_SV(PL_op->op_targ) /* =for apidoc Amn;||dTARGET @@ -111,16 +111,16 @@ Declare that this function uses C, and initializes it =cut */ -#define dTARGET SV * GETTARGET +#define dTARGET SV * GETTARGET #define GETATARGET \ targ = (PL_op->op_flags & OPf_STACKED ? sp[-1] : PAD_SV(PL_op->op_targ)) -#define dATARGET SV * GETATARGET +#define dATARGET SV * GETATARGET -#define dTARG SV *targ +#define dTARG SV *targ -#define NORMAL PL_op->op_next -#define DIE return Perl_die +#define NORMAL PL_op->op_next +#define DIE return Perl_die /* =for apidoc Amn;||PUTBACK @@ -342,7 +342,7 @@ Does not use C. See also C>, C> and C>. PL_curstackinfo->si_stack_hwm = extend_hwm_set_ix; \ } STMT_END #else -# define EXTEND_HWM_SET(p, n) NOOP +# define EXTEND_HWM_SET(p, n) NOOP #endif /* _EXTEND_SAFE_N(n): private helper macro for EXTEND(). Tests whether @@ -355,7 +355,7 @@ Does not use C. See also C>, C> and C>. (sizeof(n) > sizeof(SSize_t) && ((SSize_t)(n) != (n)) ? -1 : (n)) #ifdef STRESS_REALLOC -# define EXTEND_SKIP(p, n) EXTEND_HWM_SET(p, n) +# define EXTEND_SKIP(p, n) EXTEND_HWM_SET(p, n) # define EXTEND(p,n) \ STMT_START { \ @@ -595,11 +595,11 @@ Does not use C. See also C>, C> and C>. (void)Perl_tmps_grow_p(aTHX_ eMiX); \ } STMT_END -#define AMGf_noright 1 -#define AMGf_noleft 2 -#define AMGf_assign 4 /* op supports mutator variant, +#define AMGf_noright 1 +#define AMGf_noleft 2 +#define AMGf_assign 4 /* op supports mutator variant, e.g. $x += 1 */ -#define AMGf_unary 8 +#define AMGf_unary 8 #define AMGf_numeric 0x10 /* for Perl_try_amagic_bin */ #define AMGf_want_list 0x40 @@ -682,14 +682,14 @@ Does not use C. See also C>, C> and C>. /* 2019: no longer used in core */ -#define opASSIGN (PL_op->op_flags & OPf_STACKED) +#define opASSIGN (PL_op->op_flags & OPf_STACKED) /* =for apidoc mnU||LVRET True if this op will be the return value of an lvalue subroutine =cut */ -#define LVRET ((PL_op->op_private & OPpMAYBE_LVSUB) && is_lvalue_sub()) +#define LVRET ((PL_op->op_private & OPpMAYBE_LVSUB) && is_lvalue_sub()) #define SvCANEXISTDELETE(sv) \ (!SvRMAGICAL(sv) \ @@ -705,9 +705,9 @@ True if this op will be the return value of an lvalue subroutine /* These are just for Perl_tied_method(), which is not part of the public API. Use 0x04 rather than the next available bit, to help the compiler if the architecture can generate more efficient instructions. */ -# define TIED_METHOD_MORTALIZE_NOT_NEEDED 0x04 -# define TIED_METHOD_ARGUMENTS_ON_STACK 0x08 -# define TIED_METHOD_SAY 0x10 +# define TIED_METHOD_MORTALIZE_NOT_NEEDED 0x04 +# define TIED_METHOD_ARGUMENTS_ON_STACK 0x08 +# define TIED_METHOD_SAY 0x10 /* Used in various places that need to dereference a glob or globref */ # define MAYBE_DEREF_GV_flags(sv,phlags) \ @@ -720,11 +720,11 @@ True if this op will be the return value of an lvalue subroutine ? (GV *)SvRV(sv) \ : NULL \ ) -# define MAYBE_DEREF_GV(sv) MAYBE_DEREF_GV_flags(sv,SV_GMAGIC) +# define MAYBE_DEREF_GV(sv) MAYBE_DEREF_GV_flags(sv,SV_GMAGIC) # define MAYBE_DEREF_GV_nomg(sv) MAYBE_DEREF_GV_flags(sv,0) -# define FIND_RUNCV_padid_eq 1 -# define FIND_RUNCV_level_eq 2 +# define FIND_RUNCV_padid_eq 1 +# define FIND_RUNCV_level_eq 2 #endif diff --git a/regcomp.h b/regcomp.h index 6187dbd91769..393c286b6931 100644 --- a/regcomp.h +++ b/regcomp.h @@ -17,13 +17,13 @@ #include "regcharclass.h" /* Convert branch sequences to more efficient trie ops? */ -#define PERL_ENABLE_TRIE_OPTIMISATION 1 +#define PERL_ENABLE_TRIE_OPTIMISATION 1 /* Be really aggressive about optimising patterns with trie sequences? */ -#define PERL_ENABLE_EXTENDED_TRIE_OPTIMISATION 1 +#define PERL_ENABLE_EXTENDED_TRIE_OPTIMISATION 1 /* Should the optimiser take positive assertions into account? */ -#define PERL_ENABLE_POSITIVE_ASSERTION_STUDY 0 +#define PERL_ENABLE_POSITIVE_ASSERTION_STUDY 0 /* Not for production use: */ #define PERL_ENABLE_EXPERIMENTAL_REGEX_OPTIMISATIONS 0 @@ -82,9 +82,9 @@ typedef struct regexp_internal { regnode program[1]; /* Unwarranted chumminess with compiler. */ } regexp_internal; -#define RXi_SET(x,y) (x)->pprivate = (void*)(y) -#define RXi_GET(x) ((regexp_internal *)((x)->pprivate)) -#define RXi_GET_DECL(r,ri) regexp_internal *ri = RXi_GET(r) +#define RXi_SET(x,y) (x)->pprivate = (void*)(y) +#define RXi_GET(x) ((regexp_internal *)((x)->pprivate)) +#define RXi_GET_DECL(r,ri) regexp_internal *ri = RXi_GET(r) #define RXi_GET_DECL_NULL(r,ri) regexp_internal *ri = (r) ? RXi_GET(r) : NULL /* * Flags stored in regexp->intflags These are used only @@ -92,26 +92,26 @@ typedef struct regexp_internal { * * See regexp.h for flags used externally to the regexp engine */ -#define RXp_INTFLAGS(rx) ((rx)->intflags) -#define RX_INTFLAGS(prog) RXp_INTFLAGS(ReANY(prog)) +#define RXp_INTFLAGS(rx) ((rx)->intflags) +#define RX_INTFLAGS(prog) RXp_INTFLAGS(ReANY(prog)) -#define PREGf_SKIP 0x00000001 -#define PREGf_IMPLICIT 0x00000002 /* Converted .* to ^.* */ -#define PREGf_NAUGHTY 0x00000004 /* how exponential is +#define PREGf_SKIP 0x00000001 +#define PREGf_IMPLICIT 0x00000002 /* Converted .* to ^.* */ +#define PREGf_NAUGHTY 0x00000004 /* how exponential is this pattern? */ -#define PREGf_VERBARG_SEEN 0x00000008 -#define PREGf_CUTGROUP_SEEN 0x00000010 -#define PREGf_USE_RE_EVAL 0x00000020 /* compiled with "use re 'eval'" */ +#define PREGf_VERBARG_SEEN 0x00000008 +#define PREGf_CUTGROUP_SEEN 0x00000010 +#define PREGf_USE_RE_EVAL 0x00000020 /* compiled with "use re 'eval'" */ /* these used to be extflags, but are now intflags */ -#define PREGf_NOSCAN 0x00000040 +#define PREGf_NOSCAN 0x00000040 /* spare */ -#define PREGf_GPOS_SEEN 0x00000100 -#define PREGf_GPOS_FLOAT 0x00000200 +#define PREGf_GPOS_SEEN 0x00000100 +#define PREGf_GPOS_FLOAT 0x00000200 -#define PREGf_ANCH_MBOL 0x00000400 -#define PREGf_ANCH_SBOL 0x00000800 -#define PREGf_ANCH_GPOS 0x00001000 -#define PREGf_RECURSE_SEEN 0x00002000 +#define PREGf_ANCH_MBOL 0x00000400 +#define PREGf_ANCH_SBOL 0x00000800 +#define PREGf_ANCH_GPOS 0x00001000 +#define PREGf_RECURSE_SEEN 0x00002000 #define PREGf_ANCH \ ( PREGf_ANCH_SBOL | PREGf_ANCH_GPOS | PREGf_ANCH_MBOL ) @@ -240,7 +240,7 @@ struct regnode_bbm { U8 bitmap[REGNODE_BBM_BITMAP_LEN]; }; -#define ANYOF_BITMAP_SIZE (NUM_ANYOF_CODE_POINTS / CHARBITS) +#define ANYOF_BITMAP_SIZE (NUM_ANYOF_CODE_POINTS / CHARBITS) /* Note that these form structs which are supersets of the next smaller one, * by appending fields. Alignment problems can occur if one of those @@ -327,37 +327,37 @@ struct regnode_ssc { */ #if SHORTSIZE > 2 # ifndef REG_INFTY -# define REG_INFTY nBIT_UMAX(16) +# define REG_INFTY nBIT_UMAX(16) # endif #endif #ifndef REG_INFTY -# define REG_INFTY U16_MAX +# define REG_INFTY U16_MAX #endif -#define ARG_VALUE(arg) (arg) -#define ARG__SET(arg,val) ((arg) = (val)) +#define ARG_VALUE(arg) (arg) +#define ARG__SET(arg,val) ((arg) = (val)) #undef ARG #undef ARG1 #undef ARG2 -#define ARG(p) ARG_VALUE(ARG_LOC(p)) -#define ARGp(p) ARGp_VALUE_inline(p) -#define ARG1(p) ARG_VALUE(ARG1_LOC(p)) -#define ARG2(p) ARG_VALUE(ARG2_LOC(p)) -#define ARG2L(p) ARG_VALUE(ARG2L_LOC(p)) +#define ARG(p) ARG_VALUE(ARG_LOC(p)) +#define ARGp(p) ARGp_VALUE_inline(p) +#define ARG1(p) ARG_VALUE(ARG1_LOC(p)) +#define ARG2(p) ARG_VALUE(ARG2_LOC(p)) +#define ARG2L(p) ARG_VALUE(ARG2L_LOC(p)) -#define ARG_SET(p, val) ARG__SET(ARG_LOC(p), (val)) -#define ARG1_SET(p, val) ARG__SET(ARG1_LOC(p), (val)) -#define ARG2_SET(p, val) ARG__SET(ARG2_LOC(p), (val)) -#define ARG2L_SET(p, val) ARG__SET(ARG2L_LOC(p), (val)) -#define ARGp_SET(p, val) ARGp_SET_inline((p),(val)) +#define ARG_SET(p, val) ARG__SET(ARG_LOC(p), (val)) +#define ARG1_SET(p, val) ARG__SET(ARG1_LOC(p), (val)) +#define ARG2_SET(p, val) ARG__SET(ARG2_LOC(p), (val)) +#define ARG2L_SET(p, val) ARG__SET(ARG2L_LOC(p), (val)) +#define ARGp_SET(p, val) ARGp_SET_inline((p),(val)) #undef NEXT_OFF #undef NODE_ALIGN -#define NEXT_OFF(p) ((p)->next_off) +#define NEXT_OFF(p) ((p)->next_off) #define NODE_ALIGN(node) /* the following define was set to 0xde in 075abff3 as part of some linting * logic. I have set it to 0 as otherwise in every place where we /might/ @@ -367,13 +367,13 @@ struct regnode_ssc { * SBOL for /^/ sets the flags to 0 explicitly. -- Yves */ #define NODE_ALIGN_FILL(node) ((node)->flags = 0) -#define SIZE_ALIGN NODE_ALIGN +#define SIZE_ALIGN NODE_ALIGN #undef OP #undef OPERAND #undef STRING -#define OP(p) ((p)->type) +#define OP(p) ((p)->type) #define FLAGS(p) \ ((p)->flags) /* Caution: Doesn't apply to all regnode types. For \ some, it's the character set of the regnode */ @@ -383,7 +383,7 @@ struct regnode_ssc { #define STRINGs(p) \ (__ASSERT_(OP(p) != LEXACT && OP(p) != LEXACT_REQ8) \ ((struct regnode_string *)p)->string) -#define OPERANDs(p) STRINGs(p) +#define OPERANDs(p) STRINGs(p) /* Long strings. Currently limited to length 18 bits, which handles a 262000 * byte string. The limiting factor is the 16 bit 'next_off' field, which @@ -403,7 +403,7 @@ struct regnode_ssc { #define STRINGl(p) \ (__ASSERT_(OP(p) == LEXACT || OP(p) == LEXACT_REQ8) \ (((struct regnode_lstring *)p)->string)) -#define OPERANDl(p) STRINGl(p) +#define OPERANDl(p) STRINGl(p) #define STR_LEN(p) \ ((OP(p) == LEXACT || OP(p) == LEXACT_REQ8) \ @@ -411,11 +411,11 @@ struct regnode_ssc { #define STRING(p) \ ((OP(p) == LEXACT || OP(p) == LEXACT_REQ8) \ ? STRINGl(p) : STRINGs(p)) -#define OPERAND(p) STRING(p) +#define OPERAND(p) STRING(p) /* The number of (smallest) regnode equivalents that a string of length l bytes * occupies - Used by the REGNODE_AFTER() macros and functions. */ -#define STR_SZ(l) (((l) + sizeof(regnode) - 1) / sizeof(regnode)) +#define STR_SZ(l) (((l) + sizeof(regnode) - 1) / sizeof(regnode)) #define setSTR_LEN(p,v) \ STMT_START{ \ @@ -426,22 +426,22 @@ struct regnode_ssc { } STMT_END #define ANYOFR_BASE_BITS 20 -#define ANYOFRbase(p) (ARG(p) & nBIT_MASK(ANYOFR_BASE_BITS)) -#define ANYOFRdelta(p) (ARG(p) >> ANYOFR_BASE_BITS) +#define ANYOFRbase(p) (ARG(p) & nBIT_MASK(ANYOFR_BASE_BITS)) +#define ANYOFRdelta(p) (ARG(p) >> ANYOFR_BASE_BITS) #undef NODE_ALIGN #undef ARG_LOC #define NODE_ALIGN(node) -#define ARG_LOC(p) (((struct regnode_1 *)p)->arg1) -#define ARGp_BYTES_LOC(p) (((struct regnode_p *)p)->arg1_sv_ptr_bytes) -#define ARG1_LOC(p) (((struct regnode_2 *)p)->arg1) -#define ARG2_LOC(p) (((struct regnode_2 *)p)->arg2) -#define ARG2L_LOC(p) (((struct regnode_2L *)p)->arg2) +#define ARG_LOC(p) (((struct regnode_1 *)p)->arg1) +#define ARGp_BYTES_LOC(p) (((struct regnode_p *)p)->arg1_sv_ptr_bytes) +#define ARG1_LOC(p) (((struct regnode_2 *)p)->arg1) +#define ARG2_LOC(p) (((struct regnode_2 *)p)->arg2) +#define ARG2L_LOC(p) (((struct regnode_2L *)p)->arg2) /* These should no longer be used directly in most cases. * Please use the REGNODE_AFTER() macros instead. */ -#define NODE_STEP_REGNODE 1 /* sizeof(regnode)/sizeof(regnode) */ +#define NODE_STEP_REGNODE 1 /* sizeof(regnode)/sizeof(regnode) */ #define EXTRA_STEP_2ARGS EXTRA_SIZE(struct regnode_2) /* Core macros for computing "the regnode after this one". See also @@ -508,7 +508,7 @@ struct regnode_ssc { * correct result regardless of its argument. The other options only produce * correct results under specific constraints. */ -#define REGNODE_AFTER_PLUS(p,extra) \ +#define REGNODE_AFTER_PLUS(p,extra) \ ((p) + NODE_STEP_REGNODE + (extra)) /* under DEBUGGING we check that all REGNODE_AFTER optimized macros * did the same thing that Perl_regnode_after() would have done. @@ -532,11 +532,11 @@ struct regnode_ssc { /* find the regnode after this p by using OP(p) to find the regnode type of p */ -#define REGNODE_AFTER_varies(p) regnode_after(p,TRUE) +#define REGNODE_AFTER_varies(p) regnode_after(p,TRUE) /* find the regnode after this p by using OP(p) to find the regnode type of p */ -#define REGNODE_AFTER(p) regnode_after(p,FALSE) +#define REGNODE_AFTER(p) regnode_after(p,FALSE) /* REGNODE_BEFORE() is trickier to deal with in terms of validation, @@ -545,10 +545,10 @@ struct regnode_ssc { * then validate that the type of regnode we landed on is actually one * regnode large. In theory if things go wrong the opcode should be * illegal or say the item should be larger than it is, etc. */ -#define REGNODE_BEFORE_BASE(p) ((p) - NODE_STEP_REGNODE) -#define REGNODE_BEFORE_BASE_DEBUG(p) \ +#define REGNODE_BEFORE_BASE(p) ((p) - NODE_STEP_REGNODE) +#define REGNODE_BEFORE_BASE_DEBUG(p) \ (assert_(check_regnode_after(REGNODE_BEFORE_BASE(p),0)) REGNODE_BEFORE_BASE(p)) -#define REGNODE_BEFORE(p) REGNODE_BEFORE_BASE_DEBUG(p) +#define REGNODE_BEFORE(p) REGNODE_BEFORE_BASE_DEBUG(p) #define FILL_NODE(offset, op) \ STMT_START { \ @@ -598,7 +598,7 @@ ARGp_SET_inline(struct regnode *node, SV *ptr) { memcpy(ARGp_BYTES_LOC(node), &ptr, sizeof(ptr)); } -#define REG_MAGIC 0234 +#define REG_MAGIC 0234 /* An ANYOF node matches a single code point based on specified criteria. * It now comes in several styles, but originally it was just a 256 element @@ -615,7 +615,7 @@ ARGp_SET_inline(struct regnode *node, SV *ptr) { * nothing outside it matching), no inversion list is needed nor included, * and the argument to the ANYOF node is set to the following: */ -#define ANYOF_MATCHES_ALL_OUTSIDE_BITMAP_VALUE U32_MAX +#define ANYOF_MATCHES_ALL_OUTSIDE_BITMAP_VALUE U32_MAX #define ANYOF_MATCHES_ALL_OUTSIDE_BITMAP(node) \ (ARG(node) == ANYOF_MATCHES_ALL_OUTSIDE_BITMAP_VALUE) @@ -628,7 +628,7 @@ ARGp_SET_inline(struct regnode *node, SV *ptr) { #define ANYOF_ONLY_HAS_BITMAP(node) \ ((ARG(node) & ANYOF_ONLY_HAS_BITMAP_MASK) == ANYOF_ONLY_HAS_BITMAP_MASK) -#define ANYOF_HAS_AUX(node) (! ANYOF_ONLY_HAS_BITMAP(node)) +#define ANYOF_HAS_AUX(node) (! ANYOF_ONLY_HAS_BITMAP(node)) /* There are also ANYOFM nodes, used when the bit patterns representing the * matched code points happen to be such that they can be checked by ANDing @@ -738,27 +738,27 @@ ARGp_SET_inline(struct regnode *node, SV *ptr) { /* If this is set, the result of the match should be complemented. regexec.c * is expecting this to be in the low bit. Never in an SSC */ -#define ANYOF_INVERT 0x01 +#define ANYOF_INVERT 0x01 /* For the SSC node only, which cannot be inverted, so is shared with * that bit. This is used only during regex compilation. */ -#define SSC_MATCHES_EMPTY_STRING ANYOF_INVERT +#define SSC_MATCHES_EMPTY_STRING ANYOF_INVERT /* Set if this is a regnode_charclass_posixl vs a regnode_charclass. This * is used for runtime \d, \w, [:posix:], ..., which are used only in locale * and the optimizer's synthetic start class. Non-locale \d, etc are resolved * at compile-time. Only set under /l; can be in SSC */ -#define ANYOF_MATCHES_POSIXL 0x02 +#define ANYOF_MATCHES_POSIXL 0x02 /* The fold is calculated and stored in the bitmap where possible at * compile time. However under locale, the actual folding varies * depending on what the locale is at the time of execution, so it has to * be deferred until then. Only set under /l; never in an SSC */ -#define ANYOFL_FOLD 0x04 +#define ANYOFL_FOLD 0x04 /* Warn if the runtime locale isn't a UTF-8 one (and * the generated node assumes a UTF-8 locale. */ -#define ANYOFL_UTF8_LOCALE_REQD 0x08 +#define ANYOFL_UTF8_LOCALE_REQD 0x08 /* Spare: Be sure to change ANYOF_FLAGS_ALL if this gets used 0x10 */ @@ -786,7 +786,7 @@ ARGp_SET_inline(struct regnode *node, SV *ptr) { * Note that an ANYOFL node may contain both a user-defined property, and * folds not always valid. The important thing is that there is an AV to * look at. */ -#define ANYOF_HAS_EXTRA_RUNTIME_MATCHES 0x40 +#define ANYOF_HAS_EXTRA_RUNTIME_MATCHES 0x40 /* Shared bit: Under /d it means the ANYOFD node matches all non-ASCII * Latin1 characters when the target string is not in utf8. When not under @@ -796,9 +796,9 @@ ARGp_SET_inline(struct regnode *node, SV *ptr) { * node only has this bit set if what is meant is the warning. The names * are to make sure that you are cautioned about its shared nature */ #define ANYOFD_NON_UTF8_MATCHES_ALL_NON_ASCII__shared 0x80 -#define ANYOF_WARN_SUPER__shared 0x80 +#define ANYOF_WARN_SUPER__shared 0x80 -#define ANYOF_FLAGS_ALL ((U8) ~(0x10|0x20)) +#define ANYOF_FLAGS_ALL ((U8) ~(0x10|0x20)) #define ANYOF_LOCALE_FLAGS \ ( ANYOFL_FOLD \ @@ -808,53 +808,53 @@ ARGp_SET_inline(struct regnode *node, SV *ptr) { /* These are the flags that apply to both regular ANYOF nodes and synthetic * start class nodes during construction of the SSC. During finalization * of the SSC, other of the flags may get added to it */ -#define ANYOF_COMMON_FLAGS 0 +#define ANYOF_COMMON_FLAGS 0 /* Character classes for node->classflags of ANYOF */ /* Should be synchronized with a table in regprop() */ /* 2n should be the normal one, paired with its complement at 2n+1 */ -#define ANYOF_ALPHA ((CC_ALPHA_) * 2) -#define ANYOF_NALPHA ((ANYOF_ALPHA) + 1) -#define ANYOF_ALPHANUMERIC ((CC_ALPHANUMERIC_) * 2) /* [[:alnum:]] +#define ANYOF_ALPHA ((CC_ALPHA_) * 2) +#define ANYOF_NALPHA ((ANYOF_ALPHA) + 1) +#define ANYOF_ALPHANUMERIC ((CC_ALPHANUMERIC_) * 2) /* [[:alnum:]] isalnum(3), utf8::IsAlnum */ -#define ANYOF_NALPHANUMERIC ((ANYOF_ALPHANUMERIC) + 1) -#define ANYOF_ASCII ((CC_ASCII_) * 2) -#define ANYOF_NASCII ((ANYOF_ASCII) + 1) -#define ANYOF_BLANK ((CC_BLANK_) * 2) /* GNU extension: space and tab: +#define ANYOF_NALPHANUMERIC ((ANYOF_ALPHANUMERIC) + 1) +#define ANYOF_ASCII ((CC_ASCII_) * 2) +#define ANYOF_NASCII ((ANYOF_ASCII) + 1) +#define ANYOF_BLANK ((CC_BLANK_) * 2) /* GNU extension: space and tab: non-vertical space */ -#define ANYOF_NBLANK ((ANYOF_BLANK) + 1) -#define ANYOF_CASED ((CC_CASED_) * 2) /* Pseudo class for [:lower:] +#define ANYOF_NBLANK ((ANYOF_BLANK) + 1) +#define ANYOF_CASED ((CC_CASED_) * 2) /* Pseudo class for [:lower:] or [:upper:] under /i */ -#define ANYOF_NCASED ((ANYOF_CASED) + 1) -#define ANYOF_CNTRL ((CC_CNTRL_) * 2) -#define ANYOF_NCNTRL ((ANYOF_CNTRL) + 1) -#define ANYOF_DIGIT ((CC_DIGIT_) * 2) /* \d */ -#define ANYOF_NDIGIT ((ANYOF_DIGIT) + 1) -#define ANYOF_GRAPH ((CC_GRAPH_) * 2) -#define ANYOF_NGRAPH ((ANYOF_GRAPH) + 1) -#define ANYOF_LOWER ((CC_LOWER_) * 2) -#define ANYOF_NLOWER ((ANYOF_LOWER) + 1) -#define ANYOF_PRINT ((CC_PRINT_) * 2) -#define ANYOF_NPRINT ((ANYOF_PRINT) + 1) -#define ANYOF_PUNCT ((CC_PUNCT_) * 2) -#define ANYOF_NPUNCT ((ANYOF_PUNCT) + 1) -#define ANYOF_SPACE ((CC_SPACE_) * 2) /* \s */ -#define ANYOF_NSPACE ((ANYOF_SPACE) + 1) -#define ANYOF_UPPER ((CC_UPPER_) * 2) -#define ANYOF_NUPPER ((ANYOF_UPPER) + 1) -#define ANYOF_WORDCHAR ((CC_WORDCHAR_) * 2) /* \w, PL_utf8_alnum, utf8::IsWord, +#define ANYOF_NCASED ((ANYOF_CASED) + 1) +#define ANYOF_CNTRL ((CC_CNTRL_) * 2) +#define ANYOF_NCNTRL ((ANYOF_CNTRL) + 1) +#define ANYOF_DIGIT ((CC_DIGIT_) * 2) /* \d */ +#define ANYOF_NDIGIT ((ANYOF_DIGIT) + 1) +#define ANYOF_GRAPH ((CC_GRAPH_) * 2) +#define ANYOF_NGRAPH ((ANYOF_GRAPH) + 1) +#define ANYOF_LOWER ((CC_LOWER_) * 2) +#define ANYOF_NLOWER ((ANYOF_LOWER) + 1) +#define ANYOF_PRINT ((CC_PRINT_) * 2) +#define ANYOF_NPRINT ((ANYOF_PRINT) + 1) +#define ANYOF_PUNCT ((CC_PUNCT_) * 2) +#define ANYOF_NPUNCT ((ANYOF_PUNCT) + 1) +#define ANYOF_SPACE ((CC_SPACE_) * 2) /* \s */ +#define ANYOF_NSPACE ((ANYOF_SPACE) + 1) +#define ANYOF_UPPER ((CC_UPPER_) * 2) +#define ANYOF_NUPPER ((ANYOF_UPPER) + 1) +#define ANYOF_WORDCHAR ((CC_WORDCHAR_) * 2) /* \w, PL_utf8_alnum, utf8::IsWord, ALNUM */ -#define ANYOF_NWORDCHAR ((ANYOF_WORDCHAR) + 1) -#define ANYOF_XDIGIT ((CC_XDIGIT_) * 2) -#define ANYOF_NXDIGIT ((ANYOF_XDIGIT) + 1) +#define ANYOF_NWORDCHAR ((ANYOF_WORDCHAR) + 1) +#define ANYOF_XDIGIT ((CC_XDIGIT_) * 2) +#define ANYOF_NXDIGIT ((ANYOF_XDIGIT) + 1) /* pseudo classes below this, not stored in the class bitmap, but used as flags during compilation of char classes */ -#define ANYOF_VERTWS ((CC_VERTSPACE_) * 2) -#define ANYOF_NVERTWS ((ANYOF_VERTWS)+1) +#define ANYOF_VERTWS ((CC_VERTSPACE_) * 2) +#define ANYOF_NVERTWS ((ANYOF_VERTWS)+1) /* It is best if this is the last one, as all above it are stored * as bits in a bitmap, and it isn't part of that bitmap */ @@ -862,53 +862,53 @@ ARGp_SET_inline(struct regnode *node, SV *ptr) { # error Problem with handy.h HIGHEST_REGCOMP_DOT_H_SYNC_ #define #endif -#define ANYOF_POSIXL_MAX (ANYOF_VERTWS) /* So upper loop limit is written: '< +#define ANYOF_POSIXL_MAX (ANYOF_VERTWS) /* So upper loop limit is written: '< * ANYOF_MAX' Hence doesn't include * VERTWS, as that is a pseudo class */ -#define ANYOF_MAX ANYOF_POSIXL_MAX +#define ANYOF_MAX ANYOF_POSIXL_MAX #if (ANYOF_POSIXL_MAX > 32) /* Must fit in 32-bit word */ # error Problem with handy.h CC_foo_ #defines #endif -#define ANYOF_HORIZWS ((ANYOF_POSIXL_MAX)+2) /* = (ANYOF_NVERTWS + 1) */ -#define ANYOF_NHORIZWS ((ANYOF_POSIXL_MAX)+3) +#define ANYOF_HORIZWS ((ANYOF_POSIXL_MAX)+2) /* = (ANYOF_NVERTWS + 1) */ +#define ANYOF_NHORIZWS ((ANYOF_POSIXL_MAX)+3) -#define ANYOF_UNIPROP ((ANYOF_POSIXL_MAX)+4) /* Used to indicate a Unicode +#define ANYOF_UNIPROP ((ANYOF_POSIXL_MAX)+4) /* Used to indicate a Unicode property: \p{} or \P{} */ /* Backward source code compatibility. */ -#define ANYOF_ALNUML ANYOF_ALNUM -#define ANYOF_NALNUML ANYOF_NALNUM -#define ANYOF_SPACEL ANYOF_SPACE -#define ANYOF_NSPACEL ANYOF_NSPACE -#define ANYOF_ALNUM ANYOF_WORDCHAR -#define ANYOF_NALNUM ANYOF_NWORDCHAR +#define ANYOF_ALNUML ANYOF_ALNUM +#define ANYOF_NALNUML ANYOF_NALNUM +#define ANYOF_SPACEL ANYOF_SPACE +#define ANYOF_NSPACEL ANYOF_NSPACE +#define ANYOF_ALNUM ANYOF_WORDCHAR +#define ANYOF_NALNUM ANYOF_NWORDCHAR /* Utility macros for the bitmap and classes of ANYOF */ -#define BITMAP_BYTE(p, c) (( (U8*) (p)) [ ( ( (UV) (c)) >> 3) ] ) -#define BITMAP_BIT(c) (1U << ((c) & 7)) -#define BITMAP_TEST(p, c) (BITMAP_BYTE(p, c) & BITMAP_BIT((U8)(c))) +#define BITMAP_BYTE(p, c) (( (U8*) (p)) [ ( ( (UV) (c)) >> 3) ] ) +#define BITMAP_BIT(c) (1U << ((c) & 7)) +#define BITMAP_TEST(p, c) (BITMAP_BYTE(p, c) & BITMAP_BIT((U8)(c))) -#define ANYOF_FLAGS(p) ((p)->flags) +#define ANYOF_FLAGS(p) ((p)->flags) -#define ANYOF_BIT(c) BITMAP_BIT(c) +#define ANYOF_BIT(c) BITMAP_BIT(c) -#define ANYOF_POSIXL_BITMAP(p) (((regnode_charclass_posixl*) (p))->classflags) +#define ANYOF_POSIXL_BITMAP(p) (((regnode_charclass_posixl*) (p))->classflags) -#define POSIXL_SET(field, c) ((field) |= (1U << (c))) -#define ANYOF_POSIXL_SET(p, c) POSIXL_SET(ANYOF_POSIXL_BITMAP(p), (c)) +#define POSIXL_SET(field, c) ((field) |= (1U << (c))) +#define ANYOF_POSIXL_SET(p, c) POSIXL_SET(ANYOF_POSIXL_BITMAP(p), (c)) -#define POSIXL_CLEAR(field, c) ((field) &= ~ (1U <<(c))) -#define ANYOF_POSIXL_CLEAR(p, c) POSIXL_CLEAR(ANYOF_POSIXL_BITMAP(p), (c)) +#define POSIXL_CLEAR(field, c) ((field) &= ~ (1U <<(c))) +#define ANYOF_POSIXL_CLEAR(p, c) POSIXL_CLEAR(ANYOF_POSIXL_BITMAP(p), (c)) -#define POSIXL_TEST(field, c) ((field) & (1U << (c))) -#define ANYOF_POSIXL_TEST(p, c) POSIXL_TEST(ANYOF_POSIXL_BITMAP(p), (c)) +#define POSIXL_TEST(field, c) ((field) & (1U << (c))) +#define ANYOF_POSIXL_TEST(p, c) POSIXL_TEST(ANYOF_POSIXL_BITMAP(p), (c)) -#define POSIXL_ZERO(field) STMT_START { (field) = 0; } STMT_END -#define ANYOF_POSIXL_ZERO(ret) POSIXL_ZERO(ANYOF_POSIXL_BITMAP(ret)) +#define POSIXL_ZERO(field) STMT_START { (field) = 0; } STMT_END +#define ANYOF_POSIXL_ZERO(ret) POSIXL_ZERO(ANYOF_POSIXL_BITMAP(ret)) #define ANYOF_POSIXL_SET_TO_BITMAP(p, bits) \ STMT_START { ANYOF_POSIXL_BITMAP(p) = (bits); } STMT_END @@ -919,7 +919,7 @@ ARGp_SET_inline(struct regnode *node, SV *ptr) { STMT_START { \ ANYOF_POSIXL_BITMAP(ret) = nBIT_MASK(ANYOF_POSIXL_MAX); \ } STMT_END -#define ANYOF_CLASS_SETALL(ret) ANYOF_POSIXL_SETALL(ret) +#define ANYOF_CLASS_SETALL(ret) ANYOF_POSIXL_SETALL(ret) #define ANYOF_POSIXL_TEST_ANY_SET(p) \ ((ANYOF_FLAGS(p) & ANYOF_MATCHES_POSIXL) && ANYOF_POSIXL_BITMAP(p)) @@ -947,11 +947,11 @@ ARGp_SET_inline(struct regnode *node, SV *ptr) { #define ANYOF_BITMAP_ZERO(ret) \ Zero(((regnode_charclass*)(ret))->bitmap, ANYOF_BITMAP_SIZE, char) -#define ANYOF_BITMAP(p) ((regnode_charclass*)(p))->bitmap -#define ANYOF_BITMAP_BYTE(p, c) BITMAP_BYTE(ANYOF_BITMAP(p), c) -#define ANYOF_BITMAP_SET(p, c) (ANYOF_BITMAP_BYTE(p, c) |= ANYOF_BIT(c)) -#define ANYOF_BITMAP_CLEAR(p,c) (ANYOF_BITMAP_BYTE(p, c) &= ~ANYOF_BIT(c)) -#define ANYOF_BITMAP_TEST(p, c) cBOOL(ANYOF_BITMAP_BYTE(p, c) & ANYOF_BIT(c)) +#define ANYOF_BITMAP(p) ((regnode_charclass*)(p))->bitmap +#define ANYOF_BITMAP_BYTE(p, c) BITMAP_BYTE(ANYOF_BITMAP(p), c) +#define ANYOF_BITMAP_SET(p, c) (ANYOF_BITMAP_BYTE(p, c) |= ANYOF_BIT(c)) +#define ANYOF_BITMAP_CLEAR(p,c) (ANYOF_BITMAP_BYTE(p, c) &= ~ANYOF_BIT(c)) +#define ANYOF_BITMAP_TEST(p, c) cBOOL(ANYOF_BITMAP_BYTE(p, c) & ANYOF_BIT(c)) #define ANYOF_BITMAP_SETALL(p) \ memset (ANYOF_BITMAP(p), 255, ANYOF_BITMAP_SIZE) @@ -962,29 +962,29 @@ ARGp_SET_inline(struct regnode *node, SV *ptr) { * Utility definitions. */ #ifndef CHARMASK -# define UCHARAT(p) ((int)*(const U8*)(p)) +# define UCHARAT(p) ((int)*(const U8*)(p)) #else -# define UCHARAT(p) ((int)*(p)&CHARMASK) +# define UCHARAT(p) ((int)*(p)&CHARMASK) #endif /* Number of regnode equivalents that 'guy' occupies * beyond the size of the smallest regnode. */ -#define EXTRA_SIZE(guy) ((sizeof(guy)-1)/sizeof(struct regnode)) +#define EXTRA_SIZE(guy) ((sizeof(guy)-1)/sizeof(struct regnode)) -#define REG_ZERO_LEN_SEEN 0x00000001 -#define REG_LOOKBEHIND_SEEN 0x00000002 +#define REG_ZERO_LEN_SEEN 0x00000001 +#define REG_LOOKBEHIND_SEEN 0x00000002 /* add a short form alias to keep the line length police happy */ -#define REG_LB_SEEN REG_LOOKBEHIND_SEEN -#define REG_GPOS_SEEN 0x00000004 +#define REG_LB_SEEN REG_LOOKBEHIND_SEEN +#define REG_GPOS_SEEN 0x00000004 /* spare */ -#define REG_RECURSE_SEEN 0x00000020 -#define REG_TOP_LEVEL_BRANCHES_SEEN 0x00000040 -#define REG_VERBARG_SEEN 0x00000080 -#define REG_CUTGROUP_SEEN 0x00000100 -#define REG_RUN_ON_COMMENT_SEEN 0x00000200 -#define REG_UNFOLDED_MULTI_SEEN 0x00000400 +#define REG_RECURSE_SEEN 0x00000020 +#define REG_TOP_LEVEL_BRANCHES_SEEN 0x00000040 +#define REG_VERBARG_SEEN 0x00000080 +#define REG_CUTGROUP_SEEN 0x00000100 +#define REG_RUN_ON_COMMENT_SEEN 0x00000200 +#define REG_UNFOLDED_MULTI_SEEN 0x00000400 /* spare */ -#define REG_UNBOUNDED_QUANTIFIER_SEEN 0x00001000 +#define REG_UNBOUNDED_QUANTIFIER_SEEN 0x00001000 START_EXTERN_C @@ -1044,22 +1044,22 @@ struct reg_data { /* Code in S_to_utf8_substr() and S_to_byte_substr() in regexec.c accesses anchored* and float* via array indexes 0 and 1. */ -#define anchored_substr substrs->data[0].substr -#define anchored_utf8 substrs->data[0].utf8_substr -#define anchored_offset substrs->data[0].min_offset -#define anchored_end_shift substrs->data[0].end_shift - -#define float_substr substrs->data[1].substr -#define float_utf8 substrs->data[1].utf8_substr -#define float_min_offset substrs->data[1].min_offset -#define float_max_offset substrs->data[1].max_offset -#define float_end_shift substrs->data[1].end_shift - -#define check_substr substrs->data[2].substr -#define check_utf8 substrs->data[2].utf8_substr -#define check_offset_min substrs->data[2].min_offset -#define check_offset_max substrs->data[2].max_offset -#define check_end_shift substrs->data[2].end_shift +#define anchored_substr substrs->data[0].substr +#define anchored_utf8 substrs->data[0].utf8_substr +#define anchored_offset substrs->data[0].min_offset +#define anchored_end_shift substrs->data[0].end_shift + +#define float_substr substrs->data[1].substr +#define float_utf8 substrs->data[1].utf8_substr +#define float_min_offset substrs->data[1].min_offset +#define float_max_offset substrs->data[1].max_offset +#define float_end_shift substrs->data[1].end_shift + +#define check_substr substrs->data[2].substr +#define check_utf8 substrs->data[2].utf8_substr +#define check_offset_min substrs->data[2].min_offset +#define check_offset_max substrs->data[2].max_offset +#define check_end_shift substrs->data[2].end_shift #define RX_ANCHORED_SUBSTR(rx) (ReANY(rx)->anchored_substr) #define RX_ANCHORED_UTF8(rx) (ReANY(rx)->anchored_utf8) @@ -1153,7 +1153,7 @@ struct _reg_trie_data { #endif */ -#define TRIE_WORDS_OFFSET 2 +#define TRIE_WORDS_OFFSET 2 typedef struct _reg_trie_data reg_trie_data; @@ -1177,29 +1177,29 @@ typedef struct _reg_ac_data reg_ac_data; #define TRIE_BITMAP_CLEAR(p,c) (TRIE_BITMAP_BYTE(p, c) &= ~ANYOF_BIT((U8)c)) #define TRIE_BITMAP_TEST(p, c) (TRIE_BITMAP_BYTE(p, c) & ANYOF_BIT((U8)c)) -#define IS_ANYOF_TRIE(op) ((op)==TRIEC || (op)==AHOCORASICKC) -#define IS_TRIE_AC(op) ((op)>=AHOCORASICK) +#define IS_ANYOF_TRIE(op) ((op)==TRIEC || (op)==AHOCORASICKC) +#define IS_TRIE_AC(op) ((op)>=AHOCORASICK) /* these defines assume uniquecharcount is the correct variable, and state may be evaluated twice */ -#define TRIE_NODENUM(state) (((state)-1)/(trie->uniquecharcount)+1) +#define TRIE_NODENUM(state) (((state)-1)/(trie->uniquecharcount)+1) #define SAFE_TRIE_NODENUM(state) \ ((state) ? (((state)-1)/(trie->uniquecharcount)+1) : (state)) #define TRIE_NODEIDX(state) \ ((state) ? (((state)-1)*(trie->uniquecharcount)+1) : (state)) #ifdef DEBUGGING -#define TRIE_CHARCOUNT(trie) ((trie)->charcount) +#define TRIE_CHARCOUNT(trie) ((trie)->charcount) #else -#define TRIE_CHARCOUNT(trie) (trie_charcount) +#define TRIE_CHARCOUNT(trie) (trie_charcount) #endif -#define RE_TRIE_MAXBUF_INIT 65536 +#define RE_TRIE_MAXBUF_INIT 65536 #define RE_TRIE_MAXBUF_NAME "\022E_TRIE_MAXBUF" -#define RE_DEBUG_FLAGS "\022E_DEBUG_FLAGS" +#define RE_DEBUG_FLAGS "\022E_DEBUG_FLAGS" -#define RE_COMPILE_RECURSION_INIT 1000 -#define RE_COMPILE_RECURSION_LIMIT "\022E_COMPILE_RECURSION_LIMIT" +#define RE_COMPILE_RECURSION_INIT 1000 +#define RE_COMPILE_RECURSION_LIMIT "\022E_COMPILE_RECURSION_LIMIT" /* @@ -1231,33 +1231,33 @@ changes to re.pm, especially to the documentation. /* Compile */ -#define RE_DEBUG_COMPILE_MASK 0x0000FF -#define RE_DEBUG_COMPILE_PARSE 0x000001 -#define RE_DEBUG_COMPILE_OPTIMISE 0x000002 -#define RE_DEBUG_COMPILE_TRIE 0x000004 -#define RE_DEBUG_COMPILE_DUMP 0x000008 -#define RE_DEBUG_COMPILE_FLAGS 0x000010 -#define RE_DEBUG_COMPILE_TEST 0x000020 +#define RE_DEBUG_COMPILE_MASK 0x0000FF +#define RE_DEBUG_COMPILE_PARSE 0x000001 +#define RE_DEBUG_COMPILE_OPTIMISE 0x000002 +#define RE_DEBUG_COMPILE_TRIE 0x000004 +#define RE_DEBUG_COMPILE_DUMP 0x000008 +#define RE_DEBUG_COMPILE_FLAGS 0x000010 +#define RE_DEBUG_COMPILE_TEST 0x000020 /* Execute */ -#define RE_DEBUG_EXECUTE_MASK 0x00FF00 -#define RE_DEBUG_EXECUTE_INTUIT 0x000100 -#define RE_DEBUG_EXECUTE_MATCH 0x000200 -#define RE_DEBUG_EXECUTE_TRIE 0x000400 +#define RE_DEBUG_EXECUTE_MASK 0x00FF00 +#define RE_DEBUG_EXECUTE_INTUIT 0x000100 +#define RE_DEBUG_EXECUTE_MATCH 0x000200 +#define RE_DEBUG_EXECUTE_TRIE 0x000400 /* Extra */ -#define RE_DEBUG_EXTRA_MASK 0x3FF0000 -#define RE_DEBUG_EXTRA_TRIE 0x0010000 -#define RE_DEBUG_EXTRA_STATE 0x0080000 -#define RE_DEBUG_EXTRA_OPTIMISE 0x0100000 -#define RE_DEBUG_EXTRA_BUFFERS 0x0400000 -#define RE_DEBUG_EXTRA_GPOS 0x0800000 +#define RE_DEBUG_EXTRA_MASK 0x3FF0000 +#define RE_DEBUG_EXTRA_TRIE 0x0010000 +#define RE_DEBUG_EXTRA_STATE 0x0080000 +#define RE_DEBUG_EXTRA_OPTIMISE 0x0100000 +#define RE_DEBUG_EXTRA_BUFFERS 0x0400000 +#define RE_DEBUG_EXTRA_GPOS 0x0800000 #define RE_DEBUG_EXTRA_DUMP_PRE_OPTIMIZE 0x1000000 -#define RE_DEBUG_EXTRA_WILDCARD 0x2000000 +#define RE_DEBUG_EXTRA_WILDCARD 0x2000000 /* combined */ -#define RE_DEBUG_EXTRA_STACK 0x0280000 +#define RE_DEBUG_EXTRA_STACK 0x0280000 -#define RE_DEBUG_FLAG(x) (re_debug_flags & (x)) +#define RE_DEBUG_FLAG(x) (re_debug_flags & (x)) /* Compile */ #define DEBUG_COMPILE_r(x) \ DEBUG_r( \ @@ -1390,22 +1390,22 @@ changes to re.pm, especially to the documentation. ((isuni) ? PERL_PV_ESCAPE_UNI : 0)) \ ) -#define RE_SV_DUMPLEN(ItEm) (SvCUR(ItEm) - (SvTAIL(ItEm)!=0)) -#define RE_SV_TAIL(ItEm) (SvTAIL(ItEm) ? "$" : "") +#define RE_SV_DUMPLEN(ItEm) (SvCUR(ItEm) - (SvTAIL(ItEm)!=0)) +#define RE_SV_TAIL(ItEm) (SvTAIL(ItEm) ? "$" : "") #else /* if not DEBUGGING */ -#define DECLARE_AND_GET_RE_DEBUG_FLAGS dNOOP -#define RE_PV_COLOR_DECL(rpv,rlen,isuni,dsv,pv,l,m,c1,c2) dNOOP +#define DECLARE_AND_GET_RE_DEBUG_FLAGS dNOOP +#define RE_PV_COLOR_DECL(rpv,rlen,isuni,dsv,pv,l,m,c1,c2) dNOOP #define RE_SV_ESCAPE(rpv,isuni,dsv,sv,m) -#define RE_PV_QUOTED_DECL(rpv,isuni,dsv,pv,l,m) dNOOP +#define RE_PV_QUOTED_DECL(rpv,isuni,dsv,pv,l,m) dNOOP #define RE_SV_DUMPLEN(ItEm) #define RE_SV_TAIL(ItEm) -#define isDEBUG_WILDCARD 0 +#define isDEBUG_WILDCARD 0 #endif /* DEBUG RELATED DEFINES */ -#define FIRST_NON_ASCII_DECIMAL_DIGIT 0x660 /* ARABIC_INDIC_DIGIT_ZERO */ +#define FIRST_NON_ASCII_DECIMAL_DIGIT 0x660 /* ARABIC_INDIC_DIGIT_ZERO */ typedef enum { TRADITIONAL_BOUND = CC_WORDCHAR_, @@ -1431,11 +1431,11 @@ typedef enum { * For motivation of this design, see commit message in * 3146c00a633e9cbed741e10146662fbcedfdb8d3 */ #ifdef EBCDIC -# define MAX_ANYOF_HRx_BYTE 0xF4 +# define MAX_ANYOF_HRx_BYTE 0xF4 #else -# define MAX_ANYOF_HRx_BYTE 0xEF +# define MAX_ANYOF_HRx_BYTE 0xEF #endif -#define LOWEST_ANYOF_HRx_BYTE(b) (((b) >> 2) + 0xC0) +#define LOWEST_ANYOF_HRx_BYTE(b) (((b) >> 2) + 0xC0) #define HIGHEST_ANYOF_HRx_BYTE(b) \ (LOWEST_ANYOF_HRx_BYTE(b) \ + ((MAX_ANYOF_HRx_BYTE - LOWEST_ANYOF_HRx_BYTE(b)) >> ((b) & 3))) @@ -1447,11 +1447,11 @@ typedef enum { get_re_gclass_aux_data(a,b,c,d,e,f) #endif -#define REGNODE_TYPE(node) (PL_regnode_info[(node)].type) -#define REGNODE_OFF_BY_ARG(node) (PL_regnode_info[(node)].off_by_arg) -#define REGNODE_ARG_LEN(node) (PL_regnode_info[(node)].arg_len) -#define REGNODE_ARG_LEN_VARIES(node) (PL_regnode_info[(node)].arg_len_varies) -#define REGNODE_NAME(node) (PL_regnode_name[(node)]) +#define REGNODE_TYPE(node) (PL_regnode_info[(node)].type) +#define REGNODE_OFF_BY_ARG(node) (PL_regnode_info[(node)].off_by_arg) +#define REGNODE_ARG_LEN(node) (PL_regnode_info[(node)].arg_len) +#define REGNODE_ARG_LEN_VARIES(node) (PL_regnode_info[(node)].arg_len_varies) +#define REGNODE_NAME(node) (PL_regnode_name[(node)]) #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) #include "reginline.h" diff --git a/regexp.h b/regexp.h index 64da5e4b9153..30bae0d68876 100644 --- a/regexp.h +++ b/regexp.h @@ -57,7 +57,7 @@ struct reg_substr_data { }; # ifdef PERL_ANY_COW -# define SV_SAVED_COPY SV *saved_copy; /* If non-NULL, SV which is +# define SV_SAVED_COPY SV *saved_copy; /* If non-NULL, SV which is COW from original */ # else # define SV_SAVED_COPY @@ -179,7 +179,7 @@ typedef struct regexp { } regexp; -# define RXp_PAREN_NAMES(rx) ((rx)->paren_names) +# define RXp_PAREN_NAMES(rx) ((rx)->paren_names) /* used for high speed searches */ typedef struct re_scream_pos_data_s @@ -231,12 +231,12 @@ typedef struct regexp_engine { paren name. >= 1 is reserved for actual numbered captures, i.e. $1, $2 etc. */ -# define RX_BUFF_IDX_CARET_PREMATCH -5 /* ${^PREMATCH} */ -# define RX_BUFF_IDX_CARET_POSTMATCH -4 /* ${^POSTMATCH} */ -# define RX_BUFF_IDX_CARET_FULLMATCH -3 /* ${^MATCH} */ -# define RX_BUFF_IDX_PREMATCH -2 /* $` */ -# define RX_BUFF_IDX_POSTMATCH -1 /* $' */ -# define RX_BUFF_IDX_FULLMATCH 0 /* $& */ +# define RX_BUFF_IDX_CARET_PREMATCH -5 /* ${^PREMATCH} */ +# define RX_BUFF_IDX_CARET_POSTMATCH -4 /* ${^POSTMATCH} */ +# define RX_BUFF_IDX_CARET_FULLMATCH -3 /* ${^MATCH} */ +# define RX_BUFF_IDX_PREMATCH -2 /* $` */ +# define RX_BUFF_IDX_POSTMATCH -1 /* $' */ +# define RX_BUFF_IDX_FULLMATCH 0 /* $& */ /* Flags that are passed to the named_buff and named_buff_iter @@ -246,23 +246,23 @@ typedef struct regexp_engine { */ /* The Tie::Hash::NamedCapture operation this is part of, if any */ -# define RXapif_FETCH 0x0001 -# define RXapif_STORE 0x0002 -# define RXapif_DELETE 0x0004 -# define RXapif_CLEAR 0x0008 -# define RXapif_EXISTS 0x0010 -# define RXapif_SCALAR 0x0020 -# define RXapif_FIRSTKEY 0x0040 -# define RXapif_NEXTKEY 0x0080 +# define RXapif_FETCH 0x0001 +# define RXapif_STORE 0x0002 +# define RXapif_DELETE 0x0004 +# define RXapif_CLEAR 0x0008 +# define RXapif_EXISTS 0x0010 +# define RXapif_SCALAR 0x0020 +# define RXapif_FIRSTKEY 0x0040 +# define RXapif_NEXTKEY 0x0080 /* Whether %+ or %- is being operated on */ -# define RXapif_ONE 0x0100 /* %+ */ -# define RXapif_ALL 0x0200 /* %- */ +# define RXapif_ONE 0x0100 /* %+ */ +# define RXapif_ALL 0x0200 /* %- */ /* Whether this is being called from a re:: function */ -# define RXapif_REGNAME 0x0400 -# define RXapif_REGNAMES 0x0800 -# define RXapif_REGNAMES_COUNT 0x1000 +# define RXapif_REGNAME 0x0400 +# define RXapif_REGNAMES 0x0800 +# define RXapif_REGNAMES_COUNT 0x1000 /* =for apidoc Am|REGEXP *|SvRX|SV *sv @@ -290,8 +290,8 @@ SvRX instead and check for NULL. =cut */ -# define SvRX(sv) (Perl_get_re_arg(aTHX_ sv)) -# define SvRXOK(sv) cBOOL(Perl_get_re_arg(aTHX_ sv)) +# define SvRX(sv) (Perl_get_re_arg(aTHX_ sv)) +# define SvRXOK(sv) cBOOL(Perl_get_re_arg(aTHX_ sv)) /* Flags stored in regexp->extflags These are used by code external to the @@ -335,39 +335,39 @@ SvRX instead and check for NULL. * for compatibility reasons with Regexp::Common which highjacked (?k:...) * for its own uses. So 'k' is out as well. */ -# define DEFAULT_PAT_MOD '^' /* Short for all the default modifiers */ -# define EXEC_PAT_MOD 'e' -# define KEEPCOPY_PAT_MOD 'p' -# define NOCAPTURE_PAT_MOD 'n' -# define ONCE_PAT_MOD 'o' -# define GLOBAL_PAT_MOD 'g' -# define CONTINUE_PAT_MOD 'c' -# define MULTILINE_PAT_MOD 'm' -# define SINGLE_PAT_MOD 's' -# define IGNORE_PAT_MOD 'i' -# define XTENDED_PAT_MOD 'x' -# define NONDESTRUCT_PAT_MOD 'r' -# define LOCALE_PAT_MOD 'l' -# define UNICODE_PAT_MOD 'u' -# define DEPENDS_PAT_MOD 'd' +# define DEFAULT_PAT_MOD '^' /* Short for all the default modifiers */ +# define EXEC_PAT_MOD 'e' +# define KEEPCOPY_PAT_MOD 'p' +# define NOCAPTURE_PAT_MOD 'n' +# define ONCE_PAT_MOD 'o' +# define GLOBAL_PAT_MOD 'g' +# define CONTINUE_PAT_MOD 'c' +# define MULTILINE_PAT_MOD 'm' +# define SINGLE_PAT_MOD 's' +# define IGNORE_PAT_MOD 'i' +# define XTENDED_PAT_MOD 'x' +# define NONDESTRUCT_PAT_MOD 'r' +# define LOCALE_PAT_MOD 'l' +# define UNICODE_PAT_MOD 'u' +# define DEPENDS_PAT_MOD 'd' # define ASCII_RESTRICT_PAT_MOD 'a' -# define ONCE_PAT_MODS "o" -# define KEEPCOPY_PAT_MODS "p" -# define NOCAPTURE_PAT_MODS "n" -# define EXEC_PAT_MODS "e" -# define LOOP_PAT_MODS "gc" -# define NONDESTRUCT_PAT_MODS "r" -# define LOCALE_PAT_MODS "l" -# define UNICODE_PAT_MODS "u" -# define DEPENDS_PAT_MODS "d" +# define ONCE_PAT_MODS "o" +# define KEEPCOPY_PAT_MODS "p" +# define NOCAPTURE_PAT_MODS "n" +# define EXEC_PAT_MODS "e" +# define LOOP_PAT_MODS "gc" +# define NONDESTRUCT_PAT_MODS "r" +# define LOCALE_PAT_MODS "l" +# define UNICODE_PAT_MODS "u" +# define DEPENDS_PAT_MODS "d" # define ASCII_RESTRICT_PAT_MODS "a" # define ASCII_MORE_RESTRICT_PAT_MODS "aa" /* This string is expected by regcomp.c to be ordered so that * the first character is the flag in bit RXf_PMf_STD_PMMOD_SHIFT * of extflags; the next character is bit +1, etc. */ -# define STD_PAT_MODS "msixxn" +# define STD_PAT_MODS "msixxn" # define CHARSET_PAT_MODS \ ASCII_RESTRICT_PAT_MODS DEPENDS_PAT_MODS LOCALE_PAT_MODS UNICODE_PAT_MODS @@ -376,11 +376,11 @@ SvRX instead and check for NULL. * universal.c to be ordered so that the first character * is the flag in bit RXf_PMf_STD_PMMOD_SHIFT of * extflags; the next character is in bit +1, etc. */ -# define INT_PAT_MODS STD_PAT_MODS KEEPCOPY_PAT_MODS +# define INT_PAT_MODS STD_PAT_MODS KEEPCOPY_PAT_MODS -# define EXT_PAT_MODS ONCE_PAT_MODS KEEPCOPY_PAT_MODS NOCAPTURE_PAT_MODS -# define QR_PAT_MODS STD_PAT_MODS EXT_PAT_MODS CHARSET_PAT_MODS -# define M_PAT_MODS QR_PAT_MODS LOOP_PAT_MODS +# define EXT_PAT_MODS ONCE_PAT_MODS KEEPCOPY_PAT_MODS NOCAPTURE_PAT_MODS +# define QR_PAT_MODS STD_PAT_MODS EXT_PAT_MODS CHARSET_PAT_MODS +# define M_PAT_MODS QR_PAT_MODS LOOP_PAT_MODS # define S_PAT_MODS \ M_PAT_MODS EXEC_PAT_MODS NONDESTRUCT_PAT_MODS @@ -393,7 +393,7 @@ SvRX instead and check for NULL. Set in Perl_pmruntime for a split. Will be used by regex engines to check whether they should set RXf_SKIPWHITE */ -# define RXf_SPLIT RXf_PMf_SPLIT +# define RXf_SPLIT RXf_PMf_SPLIT /* Currently the regex flags occupy a single 32-bit word. Not all bits are * currently used. The lower bits are shared with their corresponding PMf @@ -429,44 +429,44 @@ SvRX instead and check for NULL. * For the regexp bits, PL_reg_extflags_name[] in regnodes.h has a comment * giving which bits are used/unused */ -# define RXf_BASE_SHIFT (_RXf_PMf_SHIFT_NEXT + 2) +# define RXf_BASE_SHIFT (_RXf_PMf_SHIFT_NEXT + 2) /* What we have seen */ -# define RXf_NO_INPLACE_SUBST (1U<<(RXf_BASE_SHIFT+2)) -# define RXf_EVAL_SEEN (1U<<(RXf_BASE_SHIFT+3)) +# define RXf_NO_INPLACE_SUBST (1U<<(RXf_BASE_SHIFT+2)) +# define RXf_EVAL_SEEN (1U<<(RXf_BASE_SHIFT+3)) /* Special */ -# define RXf_UNBOUNDED_QUANTIFIER_SEEN (1U<<(RXf_BASE_SHIFT+4)) -# define RXf_CHECK_ALL (1U<<(RXf_BASE_SHIFT+5)) +# define RXf_UNBOUNDED_QUANTIFIER_SEEN (1U<<(RXf_BASE_SHIFT+4)) +# define RXf_CHECK_ALL (1U<<(RXf_BASE_SHIFT+5)) /* UTF8 related */ -# define RXf_MATCH_UTF8 (1U<<(RXf_BASE_SHIFT+6)) /* $1 etc are utf8 */ +# define RXf_MATCH_UTF8 (1U<<(RXf_BASE_SHIFT+6)) /* $1 etc are utf8 */ /* Intuit related */ -# define RXf_USE_INTUIT_NOML (1U<<(RXf_BASE_SHIFT+7)) -# define RXf_USE_INTUIT_ML (1U<<(RXf_BASE_SHIFT+8)) -# define RXf_INTUIT_TAIL (1U<<(RXf_BASE_SHIFT+9)) -# define RXf_USE_INTUIT (RXf_USE_INTUIT_NOML|RXf_USE_INTUIT_ML) +# define RXf_USE_INTUIT_NOML (1U<<(RXf_BASE_SHIFT+7)) +# define RXf_USE_INTUIT_ML (1U<<(RXf_BASE_SHIFT+8)) +# define RXf_INTUIT_TAIL (1U<<(RXf_BASE_SHIFT+9)) +# define RXf_USE_INTUIT (RXf_USE_INTUIT_NOML|RXf_USE_INTUIT_ML) /* Do we have some sort of anchor? */ -# define RXf_IS_ANCHORED (1U<<(RXf_BASE_SHIFT+10)) +# define RXf_IS_ANCHORED (1U<<(RXf_BASE_SHIFT+10)) /* Copy and tainted info */ -# define RXf_COPY_DONE (1U<<(RXf_BASE_SHIFT+11)) +# define RXf_COPY_DONE (1U<<(RXf_BASE_SHIFT+11)) /* post-execution: $1 et al are tainted */ -# define RXf_TAINTED_SEEN (1U<<(RXf_BASE_SHIFT+12)) +# define RXf_TAINTED_SEEN (1U<<(RXf_BASE_SHIFT+12)) /* this pattern was tainted during compilation */ -# define RXf_TAINTED (1U<<(RXf_BASE_SHIFT+13)) +# define RXf_TAINTED (1U<<(RXf_BASE_SHIFT+13)) /* Flags indicating special patterns */ -# define RXf_START_ONLY (1U<<(RXf_BASE_SHIFT+14)) /* Pattern is /^/ */ -# define RXf_SKIPWHITE (1U<<(RXf_BASE_SHIFT+15)) /* Pattern is +# define RXf_START_ONLY (1U<<(RXf_BASE_SHIFT+14)) /* Pattern is /^/ */ +# define RXf_SKIPWHITE (1U<<(RXf_BASE_SHIFT+15)) /* Pattern is for a */ /* split " " */ -# define RXf_WHITE (1U<<(RXf_BASE_SHIFT+16)) /* Pattern is +# define RXf_WHITE (1U<<(RXf_BASE_SHIFT+16)) /* Pattern is /\s+/ */ -# define RXf_NULL (1U<<(RXf_BASE_SHIFT+17)) /* Pattern is // */ +# define RXf_NULL (1U<<(RXf_BASE_SHIFT+17)) /* Pattern is // */ /* See comments at the beginning of these defines about adding bits. The * highest bit position should be used, so that if RXf_BASE_SHIFT gets @@ -482,19 +482,19 @@ SvRX instead and check for NULL. */ # ifdef NO_TAINT_SUPPORT -# define RX_ISTAINTED(rx_sv) 0 -# define RXp_ISTAINTED(prog) 0 -# define RX_TAINT_on(rx_sv) NOOP -# define RXp_MATCH_TAINTED(prog) 0 -# define RX_MATCH_TAINTED(rx_sv) 0 -# define RXp_MATCH_TAINTED_on(prog) NOOP -# define RX_MATCH_TAINTED_on(rx_sv) NOOP -# define RXp_MATCH_TAINTED_off(prog) NOOP -# define RX_MATCH_TAINTED_off(rx_sv) NOOP +# define RX_ISTAINTED(rx_sv) 0 +# define RXp_ISTAINTED(prog) 0 +# define RX_TAINT_on(rx_sv) NOOP +# define RXp_MATCH_TAINTED(prog) 0 +# define RX_MATCH_TAINTED(rx_sv) 0 +# define RXp_MATCH_TAINTED_on(prog) NOOP +# define RX_MATCH_TAINTED_on(rx_sv) NOOP +# define RXp_MATCH_TAINTED_off(prog) NOOP +# define RX_MATCH_TAINTED_off(rx_sv) NOOP # else -# define RX_ISTAINTED(rx_sv) (RX_EXTFLAGS(rx_sv) & RXf_TAINTED) -# define RXp_ISTAINTED(prog) (RXp_EXTFLAGS(prog) & RXf_TAINTED) -# define RX_TAINT_on(rx_sv) (RX_EXTFLAGS(rx_sv) |= RXf_TAINTED) +# define RX_ISTAINTED(rx_sv) (RX_EXTFLAGS(rx_sv) & RXf_TAINTED) +# define RXp_ISTAINTED(prog) (RXp_EXTFLAGS(prog) & RXf_TAINTED) +# define RX_TAINT_on(rx_sv) (RX_EXTFLAGS(rx_sv) |= RXf_TAINTED) # define RXp_MATCH_TAINTED(prog) \ (RXp_EXTFLAGS(prog) & RXf_TAINTED_SEEN) # define RX_MATCH_TAINTED(rx_sv) \ @@ -517,19 +517,19 @@ SvRX instead and check for NULL. ? RX_MATCH_TAINTED_on(rx_sv) \ : RX_MATCH_TAINTED_off(rx_sv)) -# define RXp_MATCH_COPIED(prog) (RXp_EXTFLAGS(prog) & RXf_COPY_DONE) -# define RX_MATCH_COPIED(rx_sv) (RX_EXTFLAGS(rx_sv) & RXf_COPY_DONE) -# define RXp_MATCH_COPIED_on(prog) (RXp_EXTFLAGS(prog) |= RXf_COPY_DONE) -# define RX_MATCH_COPIED_on(rx_sv) (RX_EXTFLAGS(rx_sv) |= RXf_COPY_DONE) -# define RXp_MATCH_COPIED_off(prog) (RXp_EXTFLAGS(prog) &= ~RXf_COPY_DONE) -# define RX_MATCH_COPIED_off(rx_sv) (RX_EXTFLAGS(rx_sv) &= ~RXf_COPY_DONE) +# define RXp_MATCH_COPIED(prog) (RXp_EXTFLAGS(prog) & RXf_COPY_DONE) +# define RX_MATCH_COPIED(rx_sv) (RX_EXTFLAGS(rx_sv) & RXf_COPY_DONE) +# define RXp_MATCH_COPIED_on(prog) (RXp_EXTFLAGS(prog) |= RXf_COPY_DONE) +# define RX_MATCH_COPIED_on(rx_sv) (RX_EXTFLAGS(rx_sv) |= RXf_COPY_DONE) +# define RXp_MATCH_COPIED_off(prog) (RXp_EXTFLAGS(prog) &= ~RXf_COPY_DONE) +# define RX_MATCH_COPIED_off(rx_sv) (RX_EXTFLAGS(rx_sv) &= ~RXf_COPY_DONE) # define RX_MATCH_COPIED_set(rx_sv,t) \ ((t) \ ? RX_MATCH_COPIED_on(rx_sv) \ : RX_MATCH_COPIED_off(rx_sv)) -# define RXp_EXTFLAGS(rx) ((rx)->extflags) -# define RXp_COMPFLAGS(rx) ((rx)->compflags) +# define RXp_EXTFLAGS(rx) ((rx)->extflags) +# define RXp_COMPFLAGS(rx) ((rx)->compflags) /* For source compatibility. We used to store these explicitly. */ # define RX_PRECOMP(rx_sv) \ @@ -545,40 +545,40 @@ SvRX instead and check for NULL. (RX_WRAPLEN(rx_sv) \ - ReANY(rx_sv)->pre_prefix - 1) -# define RX_WRAPPED(rx_sv) SvPVX(rx_sv) -# define RX_WRAPPED_const(rx_sv) SvPVX_const(rx_sv) -# define RX_WRAPLEN(rx_sv) SvCUR(rx_sv) -# define RX_CHECK_SUBSTR(rx_sv) (ReANY(rx_sv)->check_substr) -# define RX_REFCNT(rx_sv) SvREFCNT(rx_sv) -# define RX_EXTFLAGS(rx_sv) RXp_EXTFLAGS(ReANY(rx_sv)) -# define RX_COMPFLAGS(rx_sv) RXp_COMPFLAGS(ReANY(rx_sv)) -# define RXp_ENGINE(prog) ((prog)->engine) -# define RX_ENGINE(rx_sv) (RXp_ENGINE(ReANY(rx_sv))) -# define RXp_SUBBEG(prog) (prog->subbeg) -# define RX_SUBBEG(rx_sv) (RXp_SUBBEG(ReANY(rx_sv))) -# define RXp_SUBOFFSET(prog) (prog->suboffset) -# define RX_SUBOFFSET(rx_sv) (RXp_SUBOFFSET(ReANY(rx_sv))) -# define RX_SUBCOFFSET(rx_sv) (ReANY(rx_sv)->subcoffset) -# define RXp_OFFS(prog) (prog->offs) -# define RX_OFFS(rx_sv) (RXp_OFFS(ReANY(rx_sv))) -# define RXp_NPARENS(prog) (prog->nparens) -# define RX_NPARENS(rx_sv) (RXp_NPARENS(ReANY(rx_sv))) -# define RX_SUBLEN(rx_sv) (ReANY(rx_sv)->sublen) -# define RXp_MINLEN(prog) (prog->minlen) -# define RX_MINLEN(rx_sv) (RXp_MINLEN(ReANY(rx_sv))) -# define RXp_MINLENRET(prog) (prog->minlenret) -# define RX_MINLENRET(rx_sv) (RXp_MINLENRET(ReANY(rx_sv))) -# define RXp_GOFS(prog) (prog->gofs) -# define RX_GOFS(rx_sv) (RXp_GOFS(ReANY(rx_sv))) -# define RX_LASTPAREN(rx_sv) (ReANY(rx_sv)->lastparen) -# define RX_LASTCLOSEPAREN(rx_sv) (ReANY(rx_sv)->lastcloseparen) -# define RXp_SAVED_COPY(prog) (prog->saved_copy) -# define RX_SAVED_COPY(rx_sv) (RXp_SAVED_COPY(ReANY(rx_sv))) +# define RX_WRAPPED(rx_sv) SvPVX(rx_sv) +# define RX_WRAPPED_const(rx_sv) SvPVX_const(rx_sv) +# define RX_WRAPLEN(rx_sv) SvCUR(rx_sv) +# define RX_CHECK_SUBSTR(rx_sv) (ReANY(rx_sv)->check_substr) +# define RX_REFCNT(rx_sv) SvREFCNT(rx_sv) +# define RX_EXTFLAGS(rx_sv) RXp_EXTFLAGS(ReANY(rx_sv)) +# define RX_COMPFLAGS(rx_sv) RXp_COMPFLAGS(ReANY(rx_sv)) +# define RXp_ENGINE(prog) ((prog)->engine) +# define RX_ENGINE(rx_sv) (RXp_ENGINE(ReANY(rx_sv))) +# define RXp_SUBBEG(prog) (prog->subbeg) +# define RX_SUBBEG(rx_sv) (RXp_SUBBEG(ReANY(rx_sv))) +# define RXp_SUBOFFSET(prog) (prog->suboffset) +# define RX_SUBOFFSET(rx_sv) (RXp_SUBOFFSET(ReANY(rx_sv))) +# define RX_SUBCOFFSET(rx_sv) (ReANY(rx_sv)->subcoffset) +# define RXp_OFFS(prog) (prog->offs) +# define RX_OFFS(rx_sv) (RXp_OFFS(ReANY(rx_sv))) +# define RXp_NPARENS(prog) (prog->nparens) +# define RX_NPARENS(rx_sv) (RXp_NPARENS(ReANY(rx_sv))) +# define RX_SUBLEN(rx_sv) (ReANY(rx_sv)->sublen) +# define RXp_MINLEN(prog) (prog->minlen) +# define RX_MINLEN(rx_sv) (RXp_MINLEN(ReANY(rx_sv))) +# define RXp_MINLENRET(prog) (prog->minlenret) +# define RX_MINLENRET(rx_sv) (RXp_MINLENRET(ReANY(rx_sv))) +# define RXp_GOFS(prog) (prog->gofs) +# define RX_GOFS(rx_sv) (RXp_GOFS(ReANY(rx_sv))) +# define RX_LASTPAREN(rx_sv) (ReANY(rx_sv)->lastparen) +# define RX_LASTCLOSEPAREN(rx_sv) (ReANY(rx_sv)->lastcloseparen) +# define RXp_SAVED_COPY(prog) (prog->saved_copy) +# define RX_SAVED_COPY(rx_sv) (RXp_SAVED_COPY(ReANY(rx_sv))) /* last match was zero-length */ # define RXp_ZERO_LEN(prog) \ (RXp_OFFS(prog)[0].start + (SSize_t)RXp_GOFS(prog) \ == RXp_OFFS(prog)[0].end) -# define RX_ZERO_LEN(rx_sv) (RXp_ZERO_LEN(ReANY(rx_sv))) +# define RX_ZERO_LEN(rx_sv) (RXp_ZERO_LEN(ReANY(rx_sv))) #endif /* PLUGGABLE_RE_EXTENSION */ @@ -605,39 +605,39 @@ SvRX instead and check for NULL. } \ } STMT_END #endif -#define RX_MATCH_COPY_FREE(rx_sv) RXp_MATCH_COPY_FREE(ReANY(rx_sv)) - -#define RXp_MATCH_UTF8(prog) (RXp_EXTFLAGS(prog) & RXf_MATCH_UTF8) -#define RX_MATCH_UTF8(rx_sv) (RX_EXTFLAGS(rx_sv) & RXf_MATCH_UTF8) -#define RXp_MATCH_UTF8_on(prog) (RXp_EXTFLAGS(prog) |= RXf_MATCH_UTF8) -#define RX_MATCH_UTF8_on(rx_sv) (RXp_MATCH_UTF8_on(ReANY(rx_sv))) -#define RXp_MATCH_UTF8_off(prog) (RXp_EXTFLAGS(prog) &= ~RXf_MATCH_UTF8) -#define RX_MATCH_UTF8_off(rx_sv) (RXp_MATCH_UTF8_off(ReANY(rx_sv)) +#define RX_MATCH_COPY_FREE(rx_sv) RXp_MATCH_COPY_FREE(ReANY(rx_sv)) + +#define RXp_MATCH_UTF8(prog) (RXp_EXTFLAGS(prog) & RXf_MATCH_UTF8) +#define RX_MATCH_UTF8(rx_sv) (RX_EXTFLAGS(rx_sv) & RXf_MATCH_UTF8) +#define RXp_MATCH_UTF8_on(prog) (RXp_EXTFLAGS(prog) |= RXf_MATCH_UTF8) +#define RX_MATCH_UTF8_on(rx_sv) (RXp_MATCH_UTF8_on(ReANY(rx_sv))) +#define RXp_MATCH_UTF8_off(prog) (RXp_EXTFLAGS(prog) &= ~RXf_MATCH_UTF8) +#define RX_MATCH_UTF8_off(rx_sv) (RXp_MATCH_UTF8_off(ReANY(rx_sv)) #define RXp_MATCH_UTF8_set(prog, t) \ ((t) \ ? RXp_MATCH_UTF8_on(prog) \ : RXp_MATCH_UTF8_off(prog)) -#define RX_MATCH_UTF8_set(rx_sv, t) (RXp_MATCH_UTF8_set(ReANY(rx_sv), t)) +#define RX_MATCH_UTF8_set(rx_sv, t) (RXp_MATCH_UTF8_set(ReANY(rx_sv), t)) /* Whether the pattern stored at RX_WRAPPED is in UTF-8 */ -#define RX_UTF8(rx_sv) SvUTF8(rx_sv) +#define RX_UTF8(rx_sv) SvUTF8(rx_sv) /* bits in flags arg of Perl_regexec_flags() */ -#define REXEC_COPY_STR 0x01 /* Need to copy the string for captures. */ -#define REXEC_CHECKED 0x02 /* re_intuit_start() already called. */ -#define REXEC_SCREAM 0x04 /* currently unused. */ -#define REXEC_IGNOREPOS 0x08 /* use stringarg, not pos(), for \G match */ -#define REXEC_NOT_FIRST 0x10 /* This is another iteration of //g: +#define REXEC_COPY_STR 0x01 /* Need to copy the string for captures. */ +#define REXEC_CHECKED 0x02 /* re_intuit_start() already called. */ +#define REXEC_SCREAM 0x04 /* currently unused. */ +#define REXEC_IGNOREPOS 0x08 /* use stringarg, not pos(), for \G match */ +#define REXEC_NOT_FIRST 0x10 /* This is another iteration of //g: no need to copy string again */ /* under REXEC_COPY_STR, it's ok for the engine (modulo PL_sawamperand etc) to skip copying: ... */ -#define REXEC_COPY_SKIP_PRE 0x20 /* ...the $` part of the string, or */ -#define REXEC_COPY_SKIP_POST 0x40 /* ...the $' part of the string */ -#define REXEC_FAIL_ON_UNDERFLOW 0x80 /* fail the match if $& would start before +#define REXEC_COPY_SKIP_PRE 0x20 /* ...the $` part of the string, or */ +#define REXEC_COPY_SKIP_POST 0x40 /* ...the $' part of the string */ +#define REXEC_FAIL_ON_UNDERFLOW 0x80 /* fail the match if $& would start before the start pos (so s/.\G// would fail on second iteration */ @@ -657,21 +657,21 @@ SvRX instead and check for NULL. SvREFCNT_dec(_rerefcnt_dec); \ }) #else -# define ReREFCNT_dec(re) SvREFCNT_dec(re) -# define ReREFCNT_inc(re) ((REGEXP *) SvREFCNT_inc(re)) +# define ReREFCNT_dec(re) SvREFCNT_dec(re) +# define ReREFCNT_inc(re) ((REGEXP *) SvREFCNT_inc(re)) #endif -#define ReANY(re) Perl_ReANY((const REGEXP *)(re)) +#define ReANY(re) Perl_ReANY((const REGEXP *)(re)) /* FIXME for plugins. */ -#define FBMcf_TAIL_DOLLAR 1 -#define FBMcf_TAIL_DOLLARM 2 -#define FBMcf_TAIL_Z 4 -#define FBMcf_TAIL_z 8 +#define FBMcf_TAIL_DOLLAR 1 +#define FBMcf_TAIL_DOLLARM 2 +#define FBMcf_TAIL_Z 4 +#define FBMcf_TAIL_z 8 #define FBMcf_TAIL \ (FBMcf_TAIL_DOLLAR|FBMcf_TAIL_DOLLARM|FBMcf_TAIL_Z|FBMcf_TAIL_z) -#define FBMrf_MULTILINE 1 +#define FBMrf_MULTILINE 1 struct regmatch_state; struct regmatch_slab; @@ -744,7 +744,7 @@ typedef struct { /* structures for holding and saving the state maintained by regmatch() */ #ifndef MAX_RECURSE_EVAL_NOCHANGE_DEPTH -# define MAX_RECURSE_EVAL_NOCHANGE_DEPTH 10 +# define MAX_RECURSE_EVAL_NOCHANGE_DEPTH 10 #endif /* The +1 is because everything matches itself, which isn't included in @@ -752,7 +752,7 @@ typedef struct { * is unlikely to change. An assertion should fail in regexec.c if it is too * low. It is needed for certain edge cases involving multi-character folds * when the first component also participates in a fold individually. */ -#define MAX_MATCHES (MAX_FOLD_FROMS + 1 + 2) +#define MAX_MATCHES (MAX_FOLD_FROMS + 1 + 2) struct next_matchable_info { U8 first_byte_mask; diff --git a/sbox32_hash.h b/sbox32_hash.h index 1a417f3bdc6b..a60d4d5d0602 100644 --- a/sbox32_hash.h +++ b/sbox32_hash.h @@ -1,5 +1,5 @@ #ifndef DEBUG_SBOX32_HASH -#define DEBUG_SBOX32_HASH 0 +#define DEBUG_SBOX32_HASH 0 #include "zaphod32_hash.h" @@ -7,18 +7,18 @@ #include #define SBOX32_WARN6(pat,v0,v1,v2,v3,v4,v5) \ printf(pat, v0, v1, v2, v3, v4, v5) -#define SBOX32_WARN5(pat,v0,v1,v2,v3,v4) printf(pat, v0, v1, v2, v3, v4) -#define SBOX32_WARN4(pat,v0,v1,v2,v3) printf(pat, v0, v1, v2, v3) -#define SBOX32_WARN3(pat,v0,v1,v2) printf(pat, v0, v1, v2) -#define SBOX32_WARN2(pat,v0,v1) printf(pat, v0, v1) -#define NOTE3(pat,v0,v1,v2) printf(pat, v0, v1, v2) +#define SBOX32_WARN5(pat,v0,v1,v2,v3,v4) printf(pat, v0, v1, v2, v3, v4) +#define SBOX32_WARN4(pat,v0,v1,v2,v3) printf(pat, v0, v1, v2, v3) +#define SBOX32_WARN3(pat,v0,v1,v2) printf(pat, v0, v1, v2) +#define SBOX32_WARN2(pat,v0,v1) printf(pat, v0, v1) +#define NOTE3(pat,v0,v1,v2) printf(pat, v0, v1, v2) #elif DEBUG_SBOX32_HASH == 2 #define SBOX32_WARN6(pat,v0,v1,v2,v3,v4,v5) #define SBOX32_WARN5(pat,v0,v1,v2,v3,v4) #define SBOX32_WARN4(pat,v0,v1,v2,v3) #define SBOX32_WARN3(pat,v0,v1,v2) #define SBOX32_WARN2(pat,v0,v1) -#define NOTE3(pat,v0,v1,v2) printf(pat, v0, v1, v2) +#define NOTE3(pat,v0,v1,v2) printf(pat, v0, v1, v2) #else #define SBOX32_WARN6(pat,v0,v1,v2,v3,v4,v5) #define SBOX32_WARN5(pat,v0,v1,v2,v3,v4) @@ -31,57 +31,57 @@ #ifndef PERL_SEEN_HV_FUNC_H_ #if !defined(U32) #include -#define U32 uint32_t +#define U32 uint32_t #endif #if !defined(U8) -#define U8 unsigned char +#define U8 unsigned char #endif #if !defined(U16) -#define U16 uint16_t +#define U16 uint16_t #endif #ifndef STRLEN -#define STRLEN int +#define STRLEN int #endif #endif #ifndef SBOX32_STATIC_INLINE #ifdef PERL_STATIC_INLINE -#define SBOX32_STATIC_INLINE PERL_STATIC_INLINE +#define SBOX32_STATIC_INLINE PERL_STATIC_INLINE #else -#define SBOX32_STATIC_INLINE static inline +#define SBOX32_STATIC_INLINE static inline #endif #endif #ifndef STMT_START -#define STMT_START do -#define STMT_END while(0) +#define STMT_START do +#define STMT_END while(0) #endif /* Find best way to ROTL32/ROTL64 */ #ifndef ROTL32 #if defined(_MSC_VER) #include /* Microsoft put _rotl declaration in here */ -#define ROTL32(x,r) _rotl(x,r) -#define ROTR32(x,r) _rotr(x,r) +#define ROTL32(x,r) _rotl(x,r) +#define ROTR32(x,r) _rotr(x,r) #else /* gcc recognises this code and generates a rotate instruction for CPUs with one */ -#define ROTL32(x,r) (((U32)(x) << (r)) | ((U32)(x) >> (32 - (r)))) -#define ROTR32(x,r) (((U32)(x) << (32 - (r))) | ((U32)(x) >> (r))) +#define ROTL32(x,r) (((U32)(x) << (r)) | ((U32)(x) >> (32 - (r)))) +#define ROTR32(x,r) (((U32)(x) << (32 - (r))) | ((U32)(x) >> (r))) #endif #endif #ifndef SBOX32_MAX_LEN -#define SBOX32_MAX_LEN 256 +#define SBOX32_MAX_LEN 256 #endif #ifndef SBOX32_STATE_WORDS -#define SBOX32_STATE_WORDS (1 + (SBOX32_MAX_LEN * 256)) -#define SBOX32_STATE_BYTES (SBOX32_STATE_WORDS * sizeof(U32)) -#define SBOX32_STATE_BITS (SBOX32_STATE_BYTES * 8) +#define SBOX32_STATE_WORDS (1 + (SBOX32_MAX_LEN * 256)) +#define SBOX32_STATE_BYTES (SBOX32_STATE_WORDS * sizeof(U32)) +#define SBOX32_STATE_BITS (SBOX32_STATE_BYTES * 8) #endif #define SBOX32_MIX4(v0,v1,v2,v3,text) \ @@ -114,1284 +114,1284 @@ #if SBOX32_MAX_LEN > 256 #error "SBOX32_MAX_LEN is set too high!" #elif SBOX32_MAX_LEN == 256 -#define case_256_SBOX32(hash,state,key) _SBOX32_CASE(256,hash,state,key) +#define case_256_SBOX32(hash,state,key) _SBOX32_CASE(256,hash,state,key) #else -#define case_256_SBOX32(hash,state,key) /**/ +#define case_256_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 255 -#define case_255_SBOX32(hash,state,key) _SBOX32_CASE(255,hash,state,key) +#define case_255_SBOX32(hash,state,key) _SBOX32_CASE(255,hash,state,key) #else -#define case_255_SBOX32(hash,state,key) /**/ +#define case_255_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 254 -#define case_254_SBOX32(hash,state,key) _SBOX32_CASE(254,hash,state,key) +#define case_254_SBOX32(hash,state,key) _SBOX32_CASE(254,hash,state,key) #else -#define case_254_SBOX32(hash,state,key) /**/ +#define case_254_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 253 -#define case_253_SBOX32(hash,state,key) _SBOX32_CASE(253,hash,state,key) +#define case_253_SBOX32(hash,state,key) _SBOX32_CASE(253,hash,state,key) #else -#define case_253_SBOX32(hash,state,key) /**/ +#define case_253_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 252 -#define case_252_SBOX32(hash,state,key) _SBOX32_CASE(252,hash,state,key) +#define case_252_SBOX32(hash,state,key) _SBOX32_CASE(252,hash,state,key) #else -#define case_252_SBOX32(hash,state,key) /**/ +#define case_252_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 251 -#define case_251_SBOX32(hash,state,key) _SBOX32_CASE(251,hash,state,key) +#define case_251_SBOX32(hash,state,key) _SBOX32_CASE(251,hash,state,key) #else -#define case_251_SBOX32(hash,state,key) /**/ +#define case_251_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 250 -#define case_250_SBOX32(hash,state,key) _SBOX32_CASE(250,hash,state,key) +#define case_250_SBOX32(hash,state,key) _SBOX32_CASE(250,hash,state,key) #else -#define case_250_SBOX32(hash,state,key) /**/ +#define case_250_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 249 -#define case_249_SBOX32(hash,state,key) _SBOX32_CASE(249,hash,state,key) +#define case_249_SBOX32(hash,state,key) _SBOX32_CASE(249,hash,state,key) #else -#define case_249_SBOX32(hash,state,key) /**/ +#define case_249_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 248 -#define case_248_SBOX32(hash,state,key) _SBOX32_CASE(248,hash,state,key) +#define case_248_SBOX32(hash,state,key) _SBOX32_CASE(248,hash,state,key) #else -#define case_248_SBOX32(hash,state,key) /**/ +#define case_248_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 247 -#define case_247_SBOX32(hash,state,key) _SBOX32_CASE(247,hash,state,key) +#define case_247_SBOX32(hash,state,key) _SBOX32_CASE(247,hash,state,key) #else -#define case_247_SBOX32(hash,state,key) /**/ +#define case_247_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 246 -#define case_246_SBOX32(hash,state,key) _SBOX32_CASE(246,hash,state,key) +#define case_246_SBOX32(hash,state,key) _SBOX32_CASE(246,hash,state,key) #else -#define case_246_SBOX32(hash,state,key) /**/ +#define case_246_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 245 -#define case_245_SBOX32(hash,state,key) _SBOX32_CASE(245,hash,state,key) +#define case_245_SBOX32(hash,state,key) _SBOX32_CASE(245,hash,state,key) #else -#define case_245_SBOX32(hash,state,key) /**/ +#define case_245_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 244 -#define case_244_SBOX32(hash,state,key) _SBOX32_CASE(244,hash,state,key) +#define case_244_SBOX32(hash,state,key) _SBOX32_CASE(244,hash,state,key) #else -#define case_244_SBOX32(hash,state,key) /**/ +#define case_244_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 243 -#define case_243_SBOX32(hash,state,key) _SBOX32_CASE(243,hash,state,key) +#define case_243_SBOX32(hash,state,key) _SBOX32_CASE(243,hash,state,key) #else -#define case_243_SBOX32(hash,state,key) /**/ +#define case_243_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 242 -#define case_242_SBOX32(hash,state,key) _SBOX32_CASE(242,hash,state,key) +#define case_242_SBOX32(hash,state,key) _SBOX32_CASE(242,hash,state,key) #else -#define case_242_SBOX32(hash,state,key) /**/ +#define case_242_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 241 -#define case_241_SBOX32(hash,state,key) _SBOX32_CASE(241,hash,state,key) +#define case_241_SBOX32(hash,state,key) _SBOX32_CASE(241,hash,state,key) #else -#define case_241_SBOX32(hash,state,key) /**/ +#define case_241_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 240 -#define case_240_SBOX32(hash,state,key) _SBOX32_CASE(240,hash,state,key) +#define case_240_SBOX32(hash,state,key) _SBOX32_CASE(240,hash,state,key) #else -#define case_240_SBOX32(hash,state,key) /**/ +#define case_240_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 239 -#define case_239_SBOX32(hash,state,key) _SBOX32_CASE(239,hash,state,key) +#define case_239_SBOX32(hash,state,key) _SBOX32_CASE(239,hash,state,key) #else -#define case_239_SBOX32(hash,state,key) /**/ +#define case_239_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 238 -#define case_238_SBOX32(hash,state,key) _SBOX32_CASE(238,hash,state,key) +#define case_238_SBOX32(hash,state,key) _SBOX32_CASE(238,hash,state,key) #else -#define case_238_SBOX32(hash,state,key) /**/ +#define case_238_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 237 -#define case_237_SBOX32(hash,state,key) _SBOX32_CASE(237,hash,state,key) +#define case_237_SBOX32(hash,state,key) _SBOX32_CASE(237,hash,state,key) #else -#define case_237_SBOX32(hash,state,key) /**/ +#define case_237_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 236 -#define case_236_SBOX32(hash,state,key) _SBOX32_CASE(236,hash,state,key) +#define case_236_SBOX32(hash,state,key) _SBOX32_CASE(236,hash,state,key) #else -#define case_236_SBOX32(hash,state,key) /**/ +#define case_236_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 235 -#define case_235_SBOX32(hash,state,key) _SBOX32_CASE(235,hash,state,key) +#define case_235_SBOX32(hash,state,key) _SBOX32_CASE(235,hash,state,key) #else -#define case_235_SBOX32(hash,state,key) /**/ +#define case_235_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 234 -#define case_234_SBOX32(hash,state,key) _SBOX32_CASE(234,hash,state,key) +#define case_234_SBOX32(hash,state,key) _SBOX32_CASE(234,hash,state,key) #else -#define case_234_SBOX32(hash,state,key) /**/ +#define case_234_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 233 -#define case_233_SBOX32(hash,state,key) _SBOX32_CASE(233,hash,state,key) +#define case_233_SBOX32(hash,state,key) _SBOX32_CASE(233,hash,state,key) #else -#define case_233_SBOX32(hash,state,key) /**/ +#define case_233_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 232 -#define case_232_SBOX32(hash,state,key) _SBOX32_CASE(232,hash,state,key) +#define case_232_SBOX32(hash,state,key) _SBOX32_CASE(232,hash,state,key) #else -#define case_232_SBOX32(hash,state,key) /**/ +#define case_232_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 231 -#define case_231_SBOX32(hash,state,key) _SBOX32_CASE(231,hash,state,key) +#define case_231_SBOX32(hash,state,key) _SBOX32_CASE(231,hash,state,key) #else -#define case_231_SBOX32(hash,state,key) /**/ +#define case_231_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 230 -#define case_230_SBOX32(hash,state,key) _SBOX32_CASE(230,hash,state,key) +#define case_230_SBOX32(hash,state,key) _SBOX32_CASE(230,hash,state,key) #else -#define case_230_SBOX32(hash,state,key) /**/ +#define case_230_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 229 -#define case_229_SBOX32(hash,state,key) _SBOX32_CASE(229,hash,state,key) +#define case_229_SBOX32(hash,state,key) _SBOX32_CASE(229,hash,state,key) #else -#define case_229_SBOX32(hash,state,key) /**/ +#define case_229_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 228 -#define case_228_SBOX32(hash,state,key) _SBOX32_CASE(228,hash,state,key) +#define case_228_SBOX32(hash,state,key) _SBOX32_CASE(228,hash,state,key) #else -#define case_228_SBOX32(hash,state,key) /**/ +#define case_228_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 227 -#define case_227_SBOX32(hash,state,key) _SBOX32_CASE(227,hash,state,key) +#define case_227_SBOX32(hash,state,key) _SBOX32_CASE(227,hash,state,key) #else -#define case_227_SBOX32(hash,state,key) /**/ +#define case_227_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 226 -#define case_226_SBOX32(hash,state,key) _SBOX32_CASE(226,hash,state,key) +#define case_226_SBOX32(hash,state,key) _SBOX32_CASE(226,hash,state,key) #else -#define case_226_SBOX32(hash,state,key) /**/ +#define case_226_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 225 -#define case_225_SBOX32(hash,state,key) _SBOX32_CASE(225,hash,state,key) +#define case_225_SBOX32(hash,state,key) _SBOX32_CASE(225,hash,state,key) #else -#define case_225_SBOX32(hash,state,key) /**/ +#define case_225_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 224 -#define case_224_SBOX32(hash,state,key) _SBOX32_CASE(224,hash,state,key) +#define case_224_SBOX32(hash,state,key) _SBOX32_CASE(224,hash,state,key) #else -#define case_224_SBOX32(hash,state,key) /**/ +#define case_224_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 223 -#define case_223_SBOX32(hash,state,key) _SBOX32_CASE(223,hash,state,key) +#define case_223_SBOX32(hash,state,key) _SBOX32_CASE(223,hash,state,key) #else -#define case_223_SBOX32(hash,state,key) /**/ +#define case_223_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 222 -#define case_222_SBOX32(hash,state,key) _SBOX32_CASE(222,hash,state,key) +#define case_222_SBOX32(hash,state,key) _SBOX32_CASE(222,hash,state,key) #else -#define case_222_SBOX32(hash,state,key) /**/ +#define case_222_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 221 -#define case_221_SBOX32(hash,state,key) _SBOX32_CASE(221,hash,state,key) +#define case_221_SBOX32(hash,state,key) _SBOX32_CASE(221,hash,state,key) #else -#define case_221_SBOX32(hash,state,key) /**/ +#define case_221_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 220 -#define case_220_SBOX32(hash,state,key) _SBOX32_CASE(220,hash,state,key) +#define case_220_SBOX32(hash,state,key) _SBOX32_CASE(220,hash,state,key) #else -#define case_220_SBOX32(hash,state,key) /**/ +#define case_220_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 219 -#define case_219_SBOX32(hash,state,key) _SBOX32_CASE(219,hash,state,key) +#define case_219_SBOX32(hash,state,key) _SBOX32_CASE(219,hash,state,key) #else -#define case_219_SBOX32(hash,state,key) /**/ +#define case_219_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 218 -#define case_218_SBOX32(hash,state,key) _SBOX32_CASE(218,hash,state,key) +#define case_218_SBOX32(hash,state,key) _SBOX32_CASE(218,hash,state,key) #else -#define case_218_SBOX32(hash,state,key) /**/ +#define case_218_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 217 -#define case_217_SBOX32(hash,state,key) _SBOX32_CASE(217,hash,state,key) +#define case_217_SBOX32(hash,state,key) _SBOX32_CASE(217,hash,state,key) #else -#define case_217_SBOX32(hash,state,key) /**/ +#define case_217_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 216 -#define case_216_SBOX32(hash,state,key) _SBOX32_CASE(216,hash,state,key) +#define case_216_SBOX32(hash,state,key) _SBOX32_CASE(216,hash,state,key) #else -#define case_216_SBOX32(hash,state,key) /**/ +#define case_216_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 215 -#define case_215_SBOX32(hash,state,key) _SBOX32_CASE(215,hash,state,key) +#define case_215_SBOX32(hash,state,key) _SBOX32_CASE(215,hash,state,key) #else -#define case_215_SBOX32(hash,state,key) /**/ +#define case_215_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 214 -#define case_214_SBOX32(hash,state,key) _SBOX32_CASE(214,hash,state,key) +#define case_214_SBOX32(hash,state,key) _SBOX32_CASE(214,hash,state,key) #else -#define case_214_SBOX32(hash,state,key) /**/ +#define case_214_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 213 -#define case_213_SBOX32(hash,state,key) _SBOX32_CASE(213,hash,state,key) +#define case_213_SBOX32(hash,state,key) _SBOX32_CASE(213,hash,state,key) #else -#define case_213_SBOX32(hash,state,key) /**/ +#define case_213_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 212 -#define case_212_SBOX32(hash,state,key) _SBOX32_CASE(212,hash,state,key) +#define case_212_SBOX32(hash,state,key) _SBOX32_CASE(212,hash,state,key) #else -#define case_212_SBOX32(hash,state,key) /**/ +#define case_212_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 211 -#define case_211_SBOX32(hash,state,key) _SBOX32_CASE(211,hash,state,key) +#define case_211_SBOX32(hash,state,key) _SBOX32_CASE(211,hash,state,key) #else -#define case_211_SBOX32(hash,state,key) /**/ +#define case_211_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 210 -#define case_210_SBOX32(hash,state,key) _SBOX32_CASE(210,hash,state,key) +#define case_210_SBOX32(hash,state,key) _SBOX32_CASE(210,hash,state,key) #else -#define case_210_SBOX32(hash,state,key) /**/ +#define case_210_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 209 -#define case_209_SBOX32(hash,state,key) _SBOX32_CASE(209,hash,state,key) +#define case_209_SBOX32(hash,state,key) _SBOX32_CASE(209,hash,state,key) #else -#define case_209_SBOX32(hash,state,key) /**/ +#define case_209_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 208 -#define case_208_SBOX32(hash,state,key) _SBOX32_CASE(208,hash,state,key) +#define case_208_SBOX32(hash,state,key) _SBOX32_CASE(208,hash,state,key) #else -#define case_208_SBOX32(hash,state,key) /**/ +#define case_208_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 207 -#define case_207_SBOX32(hash,state,key) _SBOX32_CASE(207,hash,state,key) +#define case_207_SBOX32(hash,state,key) _SBOX32_CASE(207,hash,state,key) #else -#define case_207_SBOX32(hash,state,key) /**/ +#define case_207_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 206 -#define case_206_SBOX32(hash,state,key) _SBOX32_CASE(206,hash,state,key) +#define case_206_SBOX32(hash,state,key) _SBOX32_CASE(206,hash,state,key) #else -#define case_206_SBOX32(hash,state,key) /**/ +#define case_206_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 205 -#define case_205_SBOX32(hash,state,key) _SBOX32_CASE(205,hash,state,key) +#define case_205_SBOX32(hash,state,key) _SBOX32_CASE(205,hash,state,key) #else -#define case_205_SBOX32(hash,state,key) /**/ +#define case_205_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 204 -#define case_204_SBOX32(hash,state,key) _SBOX32_CASE(204,hash,state,key) +#define case_204_SBOX32(hash,state,key) _SBOX32_CASE(204,hash,state,key) #else -#define case_204_SBOX32(hash,state,key) /**/ +#define case_204_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 203 -#define case_203_SBOX32(hash,state,key) _SBOX32_CASE(203,hash,state,key) +#define case_203_SBOX32(hash,state,key) _SBOX32_CASE(203,hash,state,key) #else -#define case_203_SBOX32(hash,state,key) /**/ +#define case_203_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 202 -#define case_202_SBOX32(hash,state,key) _SBOX32_CASE(202,hash,state,key) +#define case_202_SBOX32(hash,state,key) _SBOX32_CASE(202,hash,state,key) #else -#define case_202_SBOX32(hash,state,key) /**/ +#define case_202_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 201 -#define case_201_SBOX32(hash,state,key) _SBOX32_CASE(201,hash,state,key) +#define case_201_SBOX32(hash,state,key) _SBOX32_CASE(201,hash,state,key) #else -#define case_201_SBOX32(hash,state,key) /**/ +#define case_201_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 200 -#define case_200_SBOX32(hash,state,key) _SBOX32_CASE(200,hash,state,key) +#define case_200_SBOX32(hash,state,key) _SBOX32_CASE(200,hash,state,key) #else -#define case_200_SBOX32(hash,state,key) /**/ +#define case_200_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 199 -#define case_199_SBOX32(hash,state,key) _SBOX32_CASE(199,hash,state,key) +#define case_199_SBOX32(hash,state,key) _SBOX32_CASE(199,hash,state,key) #else -#define case_199_SBOX32(hash,state,key) /**/ +#define case_199_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 198 -#define case_198_SBOX32(hash,state,key) _SBOX32_CASE(198,hash,state,key) +#define case_198_SBOX32(hash,state,key) _SBOX32_CASE(198,hash,state,key) #else -#define case_198_SBOX32(hash,state,key) /**/ +#define case_198_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 197 -#define case_197_SBOX32(hash,state,key) _SBOX32_CASE(197,hash,state,key) +#define case_197_SBOX32(hash,state,key) _SBOX32_CASE(197,hash,state,key) #else -#define case_197_SBOX32(hash,state,key) /**/ +#define case_197_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 196 -#define case_196_SBOX32(hash,state,key) _SBOX32_CASE(196,hash,state,key) +#define case_196_SBOX32(hash,state,key) _SBOX32_CASE(196,hash,state,key) #else -#define case_196_SBOX32(hash,state,key) /**/ +#define case_196_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 195 -#define case_195_SBOX32(hash,state,key) _SBOX32_CASE(195,hash,state,key) +#define case_195_SBOX32(hash,state,key) _SBOX32_CASE(195,hash,state,key) #else -#define case_195_SBOX32(hash,state,key) /**/ +#define case_195_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 194 -#define case_194_SBOX32(hash,state,key) _SBOX32_CASE(194,hash,state,key) +#define case_194_SBOX32(hash,state,key) _SBOX32_CASE(194,hash,state,key) #else -#define case_194_SBOX32(hash,state,key) /**/ +#define case_194_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 193 -#define case_193_SBOX32(hash,state,key) _SBOX32_CASE(193,hash,state,key) +#define case_193_SBOX32(hash,state,key) _SBOX32_CASE(193,hash,state,key) #else -#define case_193_SBOX32(hash,state,key) /**/ +#define case_193_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 192 -#define case_192_SBOX32(hash,state,key) _SBOX32_CASE(192,hash,state,key) +#define case_192_SBOX32(hash,state,key) _SBOX32_CASE(192,hash,state,key) #else -#define case_192_SBOX32(hash,state,key) /**/ +#define case_192_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 191 -#define case_191_SBOX32(hash,state,key) _SBOX32_CASE(191,hash,state,key) +#define case_191_SBOX32(hash,state,key) _SBOX32_CASE(191,hash,state,key) #else -#define case_191_SBOX32(hash,state,key) /**/ +#define case_191_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 190 -#define case_190_SBOX32(hash,state,key) _SBOX32_CASE(190,hash,state,key) +#define case_190_SBOX32(hash,state,key) _SBOX32_CASE(190,hash,state,key) #else -#define case_190_SBOX32(hash,state,key) /**/ +#define case_190_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 189 -#define case_189_SBOX32(hash,state,key) _SBOX32_CASE(189,hash,state,key) +#define case_189_SBOX32(hash,state,key) _SBOX32_CASE(189,hash,state,key) #else -#define case_189_SBOX32(hash,state,key) /**/ +#define case_189_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 188 -#define case_188_SBOX32(hash,state,key) _SBOX32_CASE(188,hash,state,key) +#define case_188_SBOX32(hash,state,key) _SBOX32_CASE(188,hash,state,key) #else -#define case_188_SBOX32(hash,state,key) /**/ +#define case_188_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 187 -#define case_187_SBOX32(hash,state,key) _SBOX32_CASE(187,hash,state,key) +#define case_187_SBOX32(hash,state,key) _SBOX32_CASE(187,hash,state,key) #else -#define case_187_SBOX32(hash,state,key) /**/ +#define case_187_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 186 -#define case_186_SBOX32(hash,state,key) _SBOX32_CASE(186,hash,state,key) +#define case_186_SBOX32(hash,state,key) _SBOX32_CASE(186,hash,state,key) #else -#define case_186_SBOX32(hash,state,key) /**/ +#define case_186_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 185 -#define case_185_SBOX32(hash,state,key) _SBOX32_CASE(185,hash,state,key) +#define case_185_SBOX32(hash,state,key) _SBOX32_CASE(185,hash,state,key) #else -#define case_185_SBOX32(hash,state,key) /**/ +#define case_185_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 184 -#define case_184_SBOX32(hash,state,key) _SBOX32_CASE(184,hash,state,key) +#define case_184_SBOX32(hash,state,key) _SBOX32_CASE(184,hash,state,key) #else -#define case_184_SBOX32(hash,state,key) /**/ +#define case_184_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 183 -#define case_183_SBOX32(hash,state,key) _SBOX32_CASE(183,hash,state,key) +#define case_183_SBOX32(hash,state,key) _SBOX32_CASE(183,hash,state,key) #else -#define case_183_SBOX32(hash,state,key) /**/ +#define case_183_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 182 -#define case_182_SBOX32(hash,state,key) _SBOX32_CASE(182,hash,state,key) +#define case_182_SBOX32(hash,state,key) _SBOX32_CASE(182,hash,state,key) #else -#define case_182_SBOX32(hash,state,key) /**/ +#define case_182_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 181 -#define case_181_SBOX32(hash,state,key) _SBOX32_CASE(181,hash,state,key) +#define case_181_SBOX32(hash,state,key) _SBOX32_CASE(181,hash,state,key) #else -#define case_181_SBOX32(hash,state,key) /**/ +#define case_181_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 180 -#define case_180_SBOX32(hash,state,key) _SBOX32_CASE(180,hash,state,key) +#define case_180_SBOX32(hash,state,key) _SBOX32_CASE(180,hash,state,key) #else -#define case_180_SBOX32(hash,state,key) /**/ +#define case_180_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 179 -#define case_179_SBOX32(hash,state,key) _SBOX32_CASE(179,hash,state,key) +#define case_179_SBOX32(hash,state,key) _SBOX32_CASE(179,hash,state,key) #else -#define case_179_SBOX32(hash,state,key) /**/ +#define case_179_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 178 -#define case_178_SBOX32(hash,state,key) _SBOX32_CASE(178,hash,state,key) +#define case_178_SBOX32(hash,state,key) _SBOX32_CASE(178,hash,state,key) #else -#define case_178_SBOX32(hash,state,key) /**/ +#define case_178_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 177 -#define case_177_SBOX32(hash,state,key) _SBOX32_CASE(177,hash,state,key) +#define case_177_SBOX32(hash,state,key) _SBOX32_CASE(177,hash,state,key) #else -#define case_177_SBOX32(hash,state,key) /**/ +#define case_177_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 176 -#define case_176_SBOX32(hash,state,key) _SBOX32_CASE(176,hash,state,key) +#define case_176_SBOX32(hash,state,key) _SBOX32_CASE(176,hash,state,key) #else -#define case_176_SBOX32(hash,state,key) /**/ +#define case_176_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 175 -#define case_175_SBOX32(hash,state,key) _SBOX32_CASE(175,hash,state,key) +#define case_175_SBOX32(hash,state,key) _SBOX32_CASE(175,hash,state,key) #else -#define case_175_SBOX32(hash,state,key) /**/ +#define case_175_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 174 -#define case_174_SBOX32(hash,state,key) _SBOX32_CASE(174,hash,state,key) +#define case_174_SBOX32(hash,state,key) _SBOX32_CASE(174,hash,state,key) #else -#define case_174_SBOX32(hash,state,key) /**/ +#define case_174_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 173 -#define case_173_SBOX32(hash,state,key) _SBOX32_CASE(173,hash,state,key) +#define case_173_SBOX32(hash,state,key) _SBOX32_CASE(173,hash,state,key) #else -#define case_173_SBOX32(hash,state,key) /**/ +#define case_173_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 172 -#define case_172_SBOX32(hash,state,key) _SBOX32_CASE(172,hash,state,key) +#define case_172_SBOX32(hash,state,key) _SBOX32_CASE(172,hash,state,key) #else -#define case_172_SBOX32(hash,state,key) /**/ +#define case_172_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 171 -#define case_171_SBOX32(hash,state,key) _SBOX32_CASE(171,hash,state,key) +#define case_171_SBOX32(hash,state,key) _SBOX32_CASE(171,hash,state,key) #else -#define case_171_SBOX32(hash,state,key) /**/ +#define case_171_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 170 -#define case_170_SBOX32(hash,state,key) _SBOX32_CASE(170,hash,state,key) +#define case_170_SBOX32(hash,state,key) _SBOX32_CASE(170,hash,state,key) #else -#define case_170_SBOX32(hash,state,key) /**/ +#define case_170_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 169 -#define case_169_SBOX32(hash,state,key) _SBOX32_CASE(169,hash,state,key) +#define case_169_SBOX32(hash,state,key) _SBOX32_CASE(169,hash,state,key) #else -#define case_169_SBOX32(hash,state,key) /**/ +#define case_169_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 168 -#define case_168_SBOX32(hash,state,key) _SBOX32_CASE(168,hash,state,key) +#define case_168_SBOX32(hash,state,key) _SBOX32_CASE(168,hash,state,key) #else -#define case_168_SBOX32(hash,state,key) /**/ +#define case_168_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 167 -#define case_167_SBOX32(hash,state,key) _SBOX32_CASE(167,hash,state,key) +#define case_167_SBOX32(hash,state,key) _SBOX32_CASE(167,hash,state,key) #else -#define case_167_SBOX32(hash,state,key) /**/ +#define case_167_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 166 -#define case_166_SBOX32(hash,state,key) _SBOX32_CASE(166,hash,state,key) +#define case_166_SBOX32(hash,state,key) _SBOX32_CASE(166,hash,state,key) #else -#define case_166_SBOX32(hash,state,key) /**/ +#define case_166_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 165 -#define case_165_SBOX32(hash,state,key) _SBOX32_CASE(165,hash,state,key) +#define case_165_SBOX32(hash,state,key) _SBOX32_CASE(165,hash,state,key) #else -#define case_165_SBOX32(hash,state,key) /**/ +#define case_165_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 164 -#define case_164_SBOX32(hash,state,key) _SBOX32_CASE(164,hash,state,key) +#define case_164_SBOX32(hash,state,key) _SBOX32_CASE(164,hash,state,key) #else -#define case_164_SBOX32(hash,state,key) /**/ +#define case_164_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 163 -#define case_163_SBOX32(hash,state,key) _SBOX32_CASE(163,hash,state,key) +#define case_163_SBOX32(hash,state,key) _SBOX32_CASE(163,hash,state,key) #else -#define case_163_SBOX32(hash,state,key) /**/ +#define case_163_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 162 -#define case_162_SBOX32(hash,state,key) _SBOX32_CASE(162,hash,state,key) +#define case_162_SBOX32(hash,state,key) _SBOX32_CASE(162,hash,state,key) #else -#define case_162_SBOX32(hash,state,key) /**/ +#define case_162_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 161 -#define case_161_SBOX32(hash,state,key) _SBOX32_CASE(161,hash,state,key) +#define case_161_SBOX32(hash,state,key) _SBOX32_CASE(161,hash,state,key) #else -#define case_161_SBOX32(hash,state,key) /**/ +#define case_161_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 160 -#define case_160_SBOX32(hash,state,key) _SBOX32_CASE(160,hash,state,key) +#define case_160_SBOX32(hash,state,key) _SBOX32_CASE(160,hash,state,key) #else -#define case_160_SBOX32(hash,state,key) /**/ +#define case_160_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 159 -#define case_159_SBOX32(hash,state,key) _SBOX32_CASE(159,hash,state,key) +#define case_159_SBOX32(hash,state,key) _SBOX32_CASE(159,hash,state,key) #else -#define case_159_SBOX32(hash,state,key) /**/ +#define case_159_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 158 -#define case_158_SBOX32(hash,state,key) _SBOX32_CASE(158,hash,state,key) +#define case_158_SBOX32(hash,state,key) _SBOX32_CASE(158,hash,state,key) #else -#define case_158_SBOX32(hash,state,key) /**/ +#define case_158_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 157 -#define case_157_SBOX32(hash,state,key) _SBOX32_CASE(157,hash,state,key) +#define case_157_SBOX32(hash,state,key) _SBOX32_CASE(157,hash,state,key) #else -#define case_157_SBOX32(hash,state,key) /**/ +#define case_157_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 156 -#define case_156_SBOX32(hash,state,key) _SBOX32_CASE(156,hash,state,key) +#define case_156_SBOX32(hash,state,key) _SBOX32_CASE(156,hash,state,key) #else -#define case_156_SBOX32(hash,state,key) /**/ +#define case_156_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 155 -#define case_155_SBOX32(hash,state,key) _SBOX32_CASE(155,hash,state,key) +#define case_155_SBOX32(hash,state,key) _SBOX32_CASE(155,hash,state,key) #else -#define case_155_SBOX32(hash,state,key) /**/ +#define case_155_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 154 -#define case_154_SBOX32(hash,state,key) _SBOX32_CASE(154,hash,state,key) +#define case_154_SBOX32(hash,state,key) _SBOX32_CASE(154,hash,state,key) #else -#define case_154_SBOX32(hash,state,key) /**/ +#define case_154_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 153 -#define case_153_SBOX32(hash,state,key) _SBOX32_CASE(153,hash,state,key) +#define case_153_SBOX32(hash,state,key) _SBOX32_CASE(153,hash,state,key) #else -#define case_153_SBOX32(hash,state,key) /**/ +#define case_153_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 152 -#define case_152_SBOX32(hash,state,key) _SBOX32_CASE(152,hash,state,key) +#define case_152_SBOX32(hash,state,key) _SBOX32_CASE(152,hash,state,key) #else -#define case_152_SBOX32(hash,state,key) /**/ +#define case_152_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 151 -#define case_151_SBOX32(hash,state,key) _SBOX32_CASE(151,hash,state,key) +#define case_151_SBOX32(hash,state,key) _SBOX32_CASE(151,hash,state,key) #else -#define case_151_SBOX32(hash,state,key) /**/ +#define case_151_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 150 -#define case_150_SBOX32(hash,state,key) _SBOX32_CASE(150,hash,state,key) +#define case_150_SBOX32(hash,state,key) _SBOX32_CASE(150,hash,state,key) #else -#define case_150_SBOX32(hash,state,key) /**/ +#define case_150_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 149 -#define case_149_SBOX32(hash,state,key) _SBOX32_CASE(149,hash,state,key) +#define case_149_SBOX32(hash,state,key) _SBOX32_CASE(149,hash,state,key) #else -#define case_149_SBOX32(hash,state,key) /**/ +#define case_149_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 148 -#define case_148_SBOX32(hash,state,key) _SBOX32_CASE(148,hash,state,key) +#define case_148_SBOX32(hash,state,key) _SBOX32_CASE(148,hash,state,key) #else -#define case_148_SBOX32(hash,state,key) /**/ +#define case_148_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 147 -#define case_147_SBOX32(hash,state,key) _SBOX32_CASE(147,hash,state,key) +#define case_147_SBOX32(hash,state,key) _SBOX32_CASE(147,hash,state,key) #else -#define case_147_SBOX32(hash,state,key) /**/ +#define case_147_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 146 -#define case_146_SBOX32(hash,state,key) _SBOX32_CASE(146,hash,state,key) +#define case_146_SBOX32(hash,state,key) _SBOX32_CASE(146,hash,state,key) #else -#define case_146_SBOX32(hash,state,key) /**/ +#define case_146_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 145 -#define case_145_SBOX32(hash,state,key) _SBOX32_CASE(145,hash,state,key) +#define case_145_SBOX32(hash,state,key) _SBOX32_CASE(145,hash,state,key) #else -#define case_145_SBOX32(hash,state,key) /**/ +#define case_145_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 144 -#define case_144_SBOX32(hash,state,key) _SBOX32_CASE(144,hash,state,key) +#define case_144_SBOX32(hash,state,key) _SBOX32_CASE(144,hash,state,key) #else -#define case_144_SBOX32(hash,state,key) /**/ +#define case_144_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 143 -#define case_143_SBOX32(hash,state,key) _SBOX32_CASE(143,hash,state,key) +#define case_143_SBOX32(hash,state,key) _SBOX32_CASE(143,hash,state,key) #else -#define case_143_SBOX32(hash,state,key) /**/ +#define case_143_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 142 -#define case_142_SBOX32(hash,state,key) _SBOX32_CASE(142,hash,state,key) +#define case_142_SBOX32(hash,state,key) _SBOX32_CASE(142,hash,state,key) #else -#define case_142_SBOX32(hash,state,key) /**/ +#define case_142_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 141 -#define case_141_SBOX32(hash,state,key) _SBOX32_CASE(141,hash,state,key) +#define case_141_SBOX32(hash,state,key) _SBOX32_CASE(141,hash,state,key) #else -#define case_141_SBOX32(hash,state,key) /**/ +#define case_141_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 140 -#define case_140_SBOX32(hash,state,key) _SBOX32_CASE(140,hash,state,key) +#define case_140_SBOX32(hash,state,key) _SBOX32_CASE(140,hash,state,key) #else -#define case_140_SBOX32(hash,state,key) /**/ +#define case_140_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 139 -#define case_139_SBOX32(hash,state,key) _SBOX32_CASE(139,hash,state,key) +#define case_139_SBOX32(hash,state,key) _SBOX32_CASE(139,hash,state,key) #else -#define case_139_SBOX32(hash,state,key) /**/ +#define case_139_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 138 -#define case_138_SBOX32(hash,state,key) _SBOX32_CASE(138,hash,state,key) +#define case_138_SBOX32(hash,state,key) _SBOX32_CASE(138,hash,state,key) #else -#define case_138_SBOX32(hash,state,key) /**/ +#define case_138_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 137 -#define case_137_SBOX32(hash,state,key) _SBOX32_CASE(137,hash,state,key) +#define case_137_SBOX32(hash,state,key) _SBOX32_CASE(137,hash,state,key) #else -#define case_137_SBOX32(hash,state,key) /**/ +#define case_137_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 136 -#define case_136_SBOX32(hash,state,key) _SBOX32_CASE(136,hash,state,key) +#define case_136_SBOX32(hash,state,key) _SBOX32_CASE(136,hash,state,key) #else -#define case_136_SBOX32(hash,state,key) /**/ +#define case_136_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 135 -#define case_135_SBOX32(hash,state,key) _SBOX32_CASE(135,hash,state,key) +#define case_135_SBOX32(hash,state,key) _SBOX32_CASE(135,hash,state,key) #else -#define case_135_SBOX32(hash,state,key) /**/ +#define case_135_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 134 -#define case_134_SBOX32(hash,state,key) _SBOX32_CASE(134,hash,state,key) +#define case_134_SBOX32(hash,state,key) _SBOX32_CASE(134,hash,state,key) #else -#define case_134_SBOX32(hash,state,key) /**/ +#define case_134_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 133 -#define case_133_SBOX32(hash,state,key) _SBOX32_CASE(133,hash,state,key) +#define case_133_SBOX32(hash,state,key) _SBOX32_CASE(133,hash,state,key) #else -#define case_133_SBOX32(hash,state,key) /**/ +#define case_133_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 132 -#define case_132_SBOX32(hash,state,key) _SBOX32_CASE(132,hash,state,key) +#define case_132_SBOX32(hash,state,key) _SBOX32_CASE(132,hash,state,key) #else -#define case_132_SBOX32(hash,state,key) /**/ +#define case_132_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 131 -#define case_131_SBOX32(hash,state,key) _SBOX32_CASE(131,hash,state,key) +#define case_131_SBOX32(hash,state,key) _SBOX32_CASE(131,hash,state,key) #else -#define case_131_SBOX32(hash,state,key) /**/ +#define case_131_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 130 -#define case_130_SBOX32(hash,state,key) _SBOX32_CASE(130,hash,state,key) +#define case_130_SBOX32(hash,state,key) _SBOX32_CASE(130,hash,state,key) #else -#define case_130_SBOX32(hash,state,key) /**/ +#define case_130_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 129 -#define case_129_SBOX32(hash,state,key) _SBOX32_CASE(129,hash,state,key) +#define case_129_SBOX32(hash,state,key) _SBOX32_CASE(129,hash,state,key) #else -#define case_129_SBOX32(hash,state,key) /**/ +#define case_129_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 128 -#define case_128_SBOX32(hash,state,key) _SBOX32_CASE(128,hash,state,key) +#define case_128_SBOX32(hash,state,key) _SBOX32_CASE(128,hash,state,key) #else -#define case_128_SBOX32(hash,state,key) /**/ +#define case_128_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 127 -#define case_127_SBOX32(hash,state,key) _SBOX32_CASE(127,hash,state,key) +#define case_127_SBOX32(hash,state,key) _SBOX32_CASE(127,hash,state,key) #else -#define case_127_SBOX32(hash,state,key) /**/ +#define case_127_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 126 -#define case_126_SBOX32(hash,state,key) _SBOX32_CASE(126,hash,state,key) +#define case_126_SBOX32(hash,state,key) _SBOX32_CASE(126,hash,state,key) #else -#define case_126_SBOX32(hash,state,key) /**/ +#define case_126_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 125 -#define case_125_SBOX32(hash,state,key) _SBOX32_CASE(125,hash,state,key) +#define case_125_SBOX32(hash,state,key) _SBOX32_CASE(125,hash,state,key) #else -#define case_125_SBOX32(hash,state,key) /**/ +#define case_125_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 124 -#define case_124_SBOX32(hash,state,key) _SBOX32_CASE(124,hash,state,key) +#define case_124_SBOX32(hash,state,key) _SBOX32_CASE(124,hash,state,key) #else -#define case_124_SBOX32(hash,state,key) /**/ +#define case_124_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 123 -#define case_123_SBOX32(hash,state,key) _SBOX32_CASE(123,hash,state,key) +#define case_123_SBOX32(hash,state,key) _SBOX32_CASE(123,hash,state,key) #else -#define case_123_SBOX32(hash,state,key) /**/ +#define case_123_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 122 -#define case_122_SBOX32(hash,state,key) _SBOX32_CASE(122,hash,state,key) +#define case_122_SBOX32(hash,state,key) _SBOX32_CASE(122,hash,state,key) #else -#define case_122_SBOX32(hash,state,key) /**/ +#define case_122_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 121 -#define case_121_SBOX32(hash,state,key) _SBOX32_CASE(121,hash,state,key) +#define case_121_SBOX32(hash,state,key) _SBOX32_CASE(121,hash,state,key) #else -#define case_121_SBOX32(hash,state,key) /**/ +#define case_121_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 120 -#define case_120_SBOX32(hash,state,key) _SBOX32_CASE(120,hash,state,key) +#define case_120_SBOX32(hash,state,key) _SBOX32_CASE(120,hash,state,key) #else -#define case_120_SBOX32(hash,state,key) /**/ +#define case_120_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 119 -#define case_119_SBOX32(hash,state,key) _SBOX32_CASE(119,hash,state,key) +#define case_119_SBOX32(hash,state,key) _SBOX32_CASE(119,hash,state,key) #else -#define case_119_SBOX32(hash,state,key) /**/ +#define case_119_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 118 -#define case_118_SBOX32(hash,state,key) _SBOX32_CASE(118,hash,state,key) +#define case_118_SBOX32(hash,state,key) _SBOX32_CASE(118,hash,state,key) #else -#define case_118_SBOX32(hash,state,key) /**/ +#define case_118_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 117 -#define case_117_SBOX32(hash,state,key) _SBOX32_CASE(117,hash,state,key) +#define case_117_SBOX32(hash,state,key) _SBOX32_CASE(117,hash,state,key) #else -#define case_117_SBOX32(hash,state,key) /**/ +#define case_117_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 116 -#define case_116_SBOX32(hash,state,key) _SBOX32_CASE(116,hash,state,key) +#define case_116_SBOX32(hash,state,key) _SBOX32_CASE(116,hash,state,key) #else -#define case_116_SBOX32(hash,state,key) /**/ +#define case_116_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 115 -#define case_115_SBOX32(hash,state,key) _SBOX32_CASE(115,hash,state,key) +#define case_115_SBOX32(hash,state,key) _SBOX32_CASE(115,hash,state,key) #else -#define case_115_SBOX32(hash,state,key) /**/ +#define case_115_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 114 -#define case_114_SBOX32(hash,state,key) _SBOX32_CASE(114,hash,state,key) +#define case_114_SBOX32(hash,state,key) _SBOX32_CASE(114,hash,state,key) #else -#define case_114_SBOX32(hash,state,key) /**/ +#define case_114_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 113 -#define case_113_SBOX32(hash,state,key) _SBOX32_CASE(113,hash,state,key) +#define case_113_SBOX32(hash,state,key) _SBOX32_CASE(113,hash,state,key) #else -#define case_113_SBOX32(hash,state,key) /**/ +#define case_113_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 112 -#define case_112_SBOX32(hash,state,key) _SBOX32_CASE(112,hash,state,key) +#define case_112_SBOX32(hash,state,key) _SBOX32_CASE(112,hash,state,key) #else -#define case_112_SBOX32(hash,state,key) /**/ +#define case_112_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 111 -#define case_111_SBOX32(hash,state,key) _SBOX32_CASE(111,hash,state,key) +#define case_111_SBOX32(hash,state,key) _SBOX32_CASE(111,hash,state,key) #else -#define case_111_SBOX32(hash,state,key) /**/ +#define case_111_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 110 -#define case_110_SBOX32(hash,state,key) _SBOX32_CASE(110,hash,state,key) +#define case_110_SBOX32(hash,state,key) _SBOX32_CASE(110,hash,state,key) #else -#define case_110_SBOX32(hash,state,key) /**/ +#define case_110_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 109 -#define case_109_SBOX32(hash,state,key) _SBOX32_CASE(109,hash,state,key) +#define case_109_SBOX32(hash,state,key) _SBOX32_CASE(109,hash,state,key) #else -#define case_109_SBOX32(hash,state,key) /**/ +#define case_109_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 108 -#define case_108_SBOX32(hash,state,key) _SBOX32_CASE(108,hash,state,key) +#define case_108_SBOX32(hash,state,key) _SBOX32_CASE(108,hash,state,key) #else -#define case_108_SBOX32(hash,state,key) /**/ +#define case_108_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 107 -#define case_107_SBOX32(hash,state,key) _SBOX32_CASE(107,hash,state,key) +#define case_107_SBOX32(hash,state,key) _SBOX32_CASE(107,hash,state,key) #else -#define case_107_SBOX32(hash,state,key) /**/ +#define case_107_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 106 -#define case_106_SBOX32(hash,state,key) _SBOX32_CASE(106,hash,state,key) +#define case_106_SBOX32(hash,state,key) _SBOX32_CASE(106,hash,state,key) #else -#define case_106_SBOX32(hash,state,key) /**/ +#define case_106_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 105 -#define case_105_SBOX32(hash,state,key) _SBOX32_CASE(105,hash,state,key) +#define case_105_SBOX32(hash,state,key) _SBOX32_CASE(105,hash,state,key) #else -#define case_105_SBOX32(hash,state,key) /**/ +#define case_105_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 104 -#define case_104_SBOX32(hash,state,key) _SBOX32_CASE(104,hash,state,key) +#define case_104_SBOX32(hash,state,key) _SBOX32_CASE(104,hash,state,key) #else -#define case_104_SBOX32(hash,state,key) /**/ +#define case_104_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 103 -#define case_103_SBOX32(hash,state,key) _SBOX32_CASE(103,hash,state,key) +#define case_103_SBOX32(hash,state,key) _SBOX32_CASE(103,hash,state,key) #else -#define case_103_SBOX32(hash,state,key) /**/ +#define case_103_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 102 -#define case_102_SBOX32(hash,state,key) _SBOX32_CASE(102,hash,state,key) +#define case_102_SBOX32(hash,state,key) _SBOX32_CASE(102,hash,state,key) #else -#define case_102_SBOX32(hash,state,key) /**/ +#define case_102_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 101 -#define case_101_SBOX32(hash,state,key) _SBOX32_CASE(101,hash,state,key) +#define case_101_SBOX32(hash,state,key) _SBOX32_CASE(101,hash,state,key) #else -#define case_101_SBOX32(hash,state,key) /**/ +#define case_101_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 100 -#define case_100_SBOX32(hash,state,key) _SBOX32_CASE(100,hash,state,key) +#define case_100_SBOX32(hash,state,key) _SBOX32_CASE(100,hash,state,key) #else -#define case_100_SBOX32(hash,state,key) /**/ +#define case_100_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 99 -#define case_99_SBOX32(hash,state,key) _SBOX32_CASE(99,hash,state,key) +#define case_99_SBOX32(hash,state,key) _SBOX32_CASE(99,hash,state,key) #else -#define case_99_SBOX32(hash,state,key) /**/ +#define case_99_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 98 -#define case_98_SBOX32(hash,state,key) _SBOX32_CASE(98,hash,state,key) +#define case_98_SBOX32(hash,state,key) _SBOX32_CASE(98,hash,state,key) #else -#define case_98_SBOX32(hash,state,key) /**/ +#define case_98_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 97 -#define case_97_SBOX32(hash,state,key) _SBOX32_CASE(97,hash,state,key) +#define case_97_SBOX32(hash,state,key) _SBOX32_CASE(97,hash,state,key) #else -#define case_97_SBOX32(hash,state,key) /**/ +#define case_97_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 96 -#define case_96_SBOX32(hash,state,key) _SBOX32_CASE(96,hash,state,key) +#define case_96_SBOX32(hash,state,key) _SBOX32_CASE(96,hash,state,key) #else -#define case_96_SBOX32(hash,state,key) /**/ +#define case_96_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 95 -#define case_95_SBOX32(hash,state,key) _SBOX32_CASE(95,hash,state,key) +#define case_95_SBOX32(hash,state,key) _SBOX32_CASE(95,hash,state,key) #else -#define case_95_SBOX32(hash,state,key) /**/ +#define case_95_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 94 -#define case_94_SBOX32(hash,state,key) _SBOX32_CASE(94,hash,state,key) +#define case_94_SBOX32(hash,state,key) _SBOX32_CASE(94,hash,state,key) #else -#define case_94_SBOX32(hash,state,key) /**/ +#define case_94_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 93 -#define case_93_SBOX32(hash,state,key) _SBOX32_CASE(93,hash,state,key) +#define case_93_SBOX32(hash,state,key) _SBOX32_CASE(93,hash,state,key) #else -#define case_93_SBOX32(hash,state,key) /**/ +#define case_93_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 92 -#define case_92_SBOX32(hash,state,key) _SBOX32_CASE(92,hash,state,key) +#define case_92_SBOX32(hash,state,key) _SBOX32_CASE(92,hash,state,key) #else -#define case_92_SBOX32(hash,state,key) /**/ +#define case_92_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 91 -#define case_91_SBOX32(hash,state,key) _SBOX32_CASE(91,hash,state,key) +#define case_91_SBOX32(hash,state,key) _SBOX32_CASE(91,hash,state,key) #else -#define case_91_SBOX32(hash,state,key) /**/ +#define case_91_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 90 -#define case_90_SBOX32(hash,state,key) _SBOX32_CASE(90,hash,state,key) +#define case_90_SBOX32(hash,state,key) _SBOX32_CASE(90,hash,state,key) #else -#define case_90_SBOX32(hash,state,key) /**/ +#define case_90_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 89 -#define case_89_SBOX32(hash,state,key) _SBOX32_CASE(89,hash,state,key) +#define case_89_SBOX32(hash,state,key) _SBOX32_CASE(89,hash,state,key) #else -#define case_89_SBOX32(hash,state,key) /**/ +#define case_89_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 88 -#define case_88_SBOX32(hash,state,key) _SBOX32_CASE(88,hash,state,key) +#define case_88_SBOX32(hash,state,key) _SBOX32_CASE(88,hash,state,key) #else -#define case_88_SBOX32(hash,state,key) /**/ +#define case_88_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 87 -#define case_87_SBOX32(hash,state,key) _SBOX32_CASE(87,hash,state,key) +#define case_87_SBOX32(hash,state,key) _SBOX32_CASE(87,hash,state,key) #else -#define case_87_SBOX32(hash,state,key) /**/ +#define case_87_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 86 -#define case_86_SBOX32(hash,state,key) _SBOX32_CASE(86,hash,state,key) +#define case_86_SBOX32(hash,state,key) _SBOX32_CASE(86,hash,state,key) #else -#define case_86_SBOX32(hash,state,key) /**/ +#define case_86_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 85 -#define case_85_SBOX32(hash,state,key) _SBOX32_CASE(85,hash,state,key) +#define case_85_SBOX32(hash,state,key) _SBOX32_CASE(85,hash,state,key) #else -#define case_85_SBOX32(hash,state,key) /**/ +#define case_85_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 84 -#define case_84_SBOX32(hash,state,key) _SBOX32_CASE(84,hash,state,key) +#define case_84_SBOX32(hash,state,key) _SBOX32_CASE(84,hash,state,key) #else -#define case_84_SBOX32(hash,state,key) /**/ +#define case_84_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 83 -#define case_83_SBOX32(hash,state,key) _SBOX32_CASE(83,hash,state,key) +#define case_83_SBOX32(hash,state,key) _SBOX32_CASE(83,hash,state,key) #else -#define case_83_SBOX32(hash,state,key) /**/ +#define case_83_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 82 -#define case_82_SBOX32(hash,state,key) _SBOX32_CASE(82,hash,state,key) +#define case_82_SBOX32(hash,state,key) _SBOX32_CASE(82,hash,state,key) #else -#define case_82_SBOX32(hash,state,key) /**/ +#define case_82_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 81 -#define case_81_SBOX32(hash,state,key) _SBOX32_CASE(81,hash,state,key) +#define case_81_SBOX32(hash,state,key) _SBOX32_CASE(81,hash,state,key) #else -#define case_81_SBOX32(hash,state,key) /**/ +#define case_81_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 80 -#define case_80_SBOX32(hash,state,key) _SBOX32_CASE(80,hash,state,key) +#define case_80_SBOX32(hash,state,key) _SBOX32_CASE(80,hash,state,key) #else -#define case_80_SBOX32(hash,state,key) /**/ +#define case_80_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 79 -#define case_79_SBOX32(hash,state,key) _SBOX32_CASE(79,hash,state,key) +#define case_79_SBOX32(hash,state,key) _SBOX32_CASE(79,hash,state,key) #else -#define case_79_SBOX32(hash,state,key) /**/ +#define case_79_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 78 -#define case_78_SBOX32(hash,state,key) _SBOX32_CASE(78,hash,state,key) +#define case_78_SBOX32(hash,state,key) _SBOX32_CASE(78,hash,state,key) #else -#define case_78_SBOX32(hash,state,key) /**/ +#define case_78_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 77 -#define case_77_SBOX32(hash,state,key) _SBOX32_CASE(77,hash,state,key) +#define case_77_SBOX32(hash,state,key) _SBOX32_CASE(77,hash,state,key) #else -#define case_77_SBOX32(hash,state,key) /**/ +#define case_77_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 76 -#define case_76_SBOX32(hash,state,key) _SBOX32_CASE(76,hash,state,key) +#define case_76_SBOX32(hash,state,key) _SBOX32_CASE(76,hash,state,key) #else -#define case_76_SBOX32(hash,state,key) /**/ +#define case_76_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 75 -#define case_75_SBOX32(hash,state,key) _SBOX32_CASE(75,hash,state,key) +#define case_75_SBOX32(hash,state,key) _SBOX32_CASE(75,hash,state,key) #else -#define case_75_SBOX32(hash,state,key) /**/ +#define case_75_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 74 -#define case_74_SBOX32(hash,state,key) _SBOX32_CASE(74,hash,state,key) +#define case_74_SBOX32(hash,state,key) _SBOX32_CASE(74,hash,state,key) #else -#define case_74_SBOX32(hash,state,key) /**/ +#define case_74_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 73 -#define case_73_SBOX32(hash,state,key) _SBOX32_CASE(73,hash,state,key) +#define case_73_SBOX32(hash,state,key) _SBOX32_CASE(73,hash,state,key) #else -#define case_73_SBOX32(hash,state,key) /**/ +#define case_73_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 72 -#define case_72_SBOX32(hash,state,key) _SBOX32_CASE(72,hash,state,key) +#define case_72_SBOX32(hash,state,key) _SBOX32_CASE(72,hash,state,key) #else -#define case_72_SBOX32(hash,state,key) /**/ +#define case_72_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 71 -#define case_71_SBOX32(hash,state,key) _SBOX32_CASE(71,hash,state,key) +#define case_71_SBOX32(hash,state,key) _SBOX32_CASE(71,hash,state,key) #else -#define case_71_SBOX32(hash,state,key) /**/ +#define case_71_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 70 -#define case_70_SBOX32(hash,state,key) _SBOX32_CASE(70,hash,state,key) +#define case_70_SBOX32(hash,state,key) _SBOX32_CASE(70,hash,state,key) #else -#define case_70_SBOX32(hash,state,key) /**/ +#define case_70_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 69 -#define case_69_SBOX32(hash,state,key) _SBOX32_CASE(69,hash,state,key) +#define case_69_SBOX32(hash,state,key) _SBOX32_CASE(69,hash,state,key) #else -#define case_69_SBOX32(hash,state,key) /**/ +#define case_69_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 68 -#define case_68_SBOX32(hash,state,key) _SBOX32_CASE(68,hash,state,key) +#define case_68_SBOX32(hash,state,key) _SBOX32_CASE(68,hash,state,key) #else -#define case_68_SBOX32(hash,state,key) /**/ +#define case_68_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 67 -#define case_67_SBOX32(hash,state,key) _SBOX32_CASE(67,hash,state,key) +#define case_67_SBOX32(hash,state,key) _SBOX32_CASE(67,hash,state,key) #else -#define case_67_SBOX32(hash,state,key) /**/ +#define case_67_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 66 -#define case_66_SBOX32(hash,state,key) _SBOX32_CASE(66,hash,state,key) +#define case_66_SBOX32(hash,state,key) _SBOX32_CASE(66,hash,state,key) #else -#define case_66_SBOX32(hash,state,key) /**/ +#define case_66_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 65 -#define case_65_SBOX32(hash,state,key) _SBOX32_CASE(65,hash,state,key) +#define case_65_SBOX32(hash,state,key) _SBOX32_CASE(65,hash,state,key) #else -#define case_65_SBOX32(hash,state,key) /**/ +#define case_65_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 64 -#define case_64_SBOX32(hash,state,key) _SBOX32_CASE(64,hash,state,key) +#define case_64_SBOX32(hash,state,key) _SBOX32_CASE(64,hash,state,key) #else -#define case_64_SBOX32(hash,state,key) /**/ +#define case_64_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 63 -#define case_63_SBOX32(hash,state,key) _SBOX32_CASE(63,hash,state,key) +#define case_63_SBOX32(hash,state,key) _SBOX32_CASE(63,hash,state,key) #else -#define case_63_SBOX32(hash,state,key) /**/ +#define case_63_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 62 -#define case_62_SBOX32(hash,state,key) _SBOX32_CASE(62,hash,state,key) +#define case_62_SBOX32(hash,state,key) _SBOX32_CASE(62,hash,state,key) #else -#define case_62_SBOX32(hash,state,key) /**/ +#define case_62_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 61 -#define case_61_SBOX32(hash,state,key) _SBOX32_CASE(61,hash,state,key) +#define case_61_SBOX32(hash,state,key) _SBOX32_CASE(61,hash,state,key) #else -#define case_61_SBOX32(hash,state,key) /**/ +#define case_61_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 60 -#define case_60_SBOX32(hash,state,key) _SBOX32_CASE(60,hash,state,key) +#define case_60_SBOX32(hash,state,key) _SBOX32_CASE(60,hash,state,key) #else -#define case_60_SBOX32(hash,state,key) /**/ +#define case_60_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 59 -#define case_59_SBOX32(hash,state,key) _SBOX32_CASE(59,hash,state,key) +#define case_59_SBOX32(hash,state,key) _SBOX32_CASE(59,hash,state,key) #else -#define case_59_SBOX32(hash,state,key) /**/ +#define case_59_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 58 -#define case_58_SBOX32(hash,state,key) _SBOX32_CASE(58,hash,state,key) +#define case_58_SBOX32(hash,state,key) _SBOX32_CASE(58,hash,state,key) #else -#define case_58_SBOX32(hash,state,key) /**/ +#define case_58_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 57 -#define case_57_SBOX32(hash,state,key) _SBOX32_CASE(57,hash,state,key) +#define case_57_SBOX32(hash,state,key) _SBOX32_CASE(57,hash,state,key) #else -#define case_57_SBOX32(hash,state,key) /**/ +#define case_57_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 56 -#define case_56_SBOX32(hash,state,key) _SBOX32_CASE(56,hash,state,key) +#define case_56_SBOX32(hash,state,key) _SBOX32_CASE(56,hash,state,key) #else -#define case_56_SBOX32(hash,state,key) /**/ +#define case_56_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 55 -#define case_55_SBOX32(hash,state,key) _SBOX32_CASE(55,hash,state,key) +#define case_55_SBOX32(hash,state,key) _SBOX32_CASE(55,hash,state,key) #else -#define case_55_SBOX32(hash,state,key) /**/ +#define case_55_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 54 -#define case_54_SBOX32(hash,state,key) _SBOX32_CASE(54,hash,state,key) +#define case_54_SBOX32(hash,state,key) _SBOX32_CASE(54,hash,state,key) #else -#define case_54_SBOX32(hash,state,key) /**/ +#define case_54_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 53 -#define case_53_SBOX32(hash,state,key) _SBOX32_CASE(53,hash,state,key) +#define case_53_SBOX32(hash,state,key) _SBOX32_CASE(53,hash,state,key) #else -#define case_53_SBOX32(hash,state,key) /**/ +#define case_53_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 52 -#define case_52_SBOX32(hash,state,key) _SBOX32_CASE(52,hash,state,key) +#define case_52_SBOX32(hash,state,key) _SBOX32_CASE(52,hash,state,key) #else -#define case_52_SBOX32(hash,state,key) /**/ +#define case_52_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 51 -#define case_51_SBOX32(hash,state,key) _SBOX32_CASE(51,hash,state,key) +#define case_51_SBOX32(hash,state,key) _SBOX32_CASE(51,hash,state,key) #else -#define case_51_SBOX32(hash,state,key) /**/ +#define case_51_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 50 -#define case_50_SBOX32(hash,state,key) _SBOX32_CASE(50,hash,state,key) +#define case_50_SBOX32(hash,state,key) _SBOX32_CASE(50,hash,state,key) #else -#define case_50_SBOX32(hash,state,key) /**/ +#define case_50_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 49 -#define case_49_SBOX32(hash,state,key) _SBOX32_CASE(49,hash,state,key) +#define case_49_SBOX32(hash,state,key) _SBOX32_CASE(49,hash,state,key) #else -#define case_49_SBOX32(hash,state,key) /**/ +#define case_49_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 48 -#define case_48_SBOX32(hash,state,key) _SBOX32_CASE(48,hash,state,key) +#define case_48_SBOX32(hash,state,key) _SBOX32_CASE(48,hash,state,key) #else -#define case_48_SBOX32(hash,state,key) /**/ +#define case_48_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 47 -#define case_47_SBOX32(hash,state,key) _SBOX32_CASE(47,hash,state,key) +#define case_47_SBOX32(hash,state,key) _SBOX32_CASE(47,hash,state,key) #else -#define case_47_SBOX32(hash,state,key) /**/ +#define case_47_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 46 -#define case_46_SBOX32(hash,state,key) _SBOX32_CASE(46,hash,state,key) +#define case_46_SBOX32(hash,state,key) _SBOX32_CASE(46,hash,state,key) #else -#define case_46_SBOX32(hash,state,key) /**/ +#define case_46_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 45 -#define case_45_SBOX32(hash,state,key) _SBOX32_CASE(45,hash,state,key) +#define case_45_SBOX32(hash,state,key) _SBOX32_CASE(45,hash,state,key) #else -#define case_45_SBOX32(hash,state,key) /**/ +#define case_45_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 44 -#define case_44_SBOX32(hash,state,key) _SBOX32_CASE(44,hash,state,key) +#define case_44_SBOX32(hash,state,key) _SBOX32_CASE(44,hash,state,key) #else -#define case_44_SBOX32(hash,state,key) /**/ +#define case_44_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 43 -#define case_43_SBOX32(hash,state,key) _SBOX32_CASE(43,hash,state,key) +#define case_43_SBOX32(hash,state,key) _SBOX32_CASE(43,hash,state,key) #else -#define case_43_SBOX32(hash,state,key) /**/ +#define case_43_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 42 -#define case_42_SBOX32(hash,state,key) _SBOX32_CASE(42,hash,state,key) +#define case_42_SBOX32(hash,state,key) _SBOX32_CASE(42,hash,state,key) #else -#define case_42_SBOX32(hash,state,key) /**/ +#define case_42_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 41 -#define case_41_SBOX32(hash,state,key) _SBOX32_CASE(41,hash,state,key) +#define case_41_SBOX32(hash,state,key) _SBOX32_CASE(41,hash,state,key) #else -#define case_41_SBOX32(hash,state,key) /**/ +#define case_41_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 40 -#define case_40_SBOX32(hash,state,key) _SBOX32_CASE(40,hash,state,key) +#define case_40_SBOX32(hash,state,key) _SBOX32_CASE(40,hash,state,key) #else -#define case_40_SBOX32(hash,state,key) /**/ +#define case_40_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 39 -#define case_39_SBOX32(hash,state,key) _SBOX32_CASE(39,hash,state,key) +#define case_39_SBOX32(hash,state,key) _SBOX32_CASE(39,hash,state,key) #else -#define case_39_SBOX32(hash,state,key) /**/ +#define case_39_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 38 -#define case_38_SBOX32(hash,state,key) _SBOX32_CASE(38,hash,state,key) +#define case_38_SBOX32(hash,state,key) _SBOX32_CASE(38,hash,state,key) #else -#define case_38_SBOX32(hash,state,key) /**/ +#define case_38_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 37 -#define case_37_SBOX32(hash,state,key) _SBOX32_CASE(37,hash,state,key) +#define case_37_SBOX32(hash,state,key) _SBOX32_CASE(37,hash,state,key) #else -#define case_37_SBOX32(hash,state,key) /**/ +#define case_37_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 36 -#define case_36_SBOX32(hash,state,key) _SBOX32_CASE(36,hash,state,key) +#define case_36_SBOX32(hash,state,key) _SBOX32_CASE(36,hash,state,key) #else -#define case_36_SBOX32(hash,state,key) /**/ +#define case_36_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 35 -#define case_35_SBOX32(hash,state,key) _SBOX32_CASE(35,hash,state,key) +#define case_35_SBOX32(hash,state,key) _SBOX32_CASE(35,hash,state,key) #else -#define case_35_SBOX32(hash,state,key) /**/ +#define case_35_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 34 -#define case_34_SBOX32(hash,state,key) _SBOX32_CASE(34,hash,state,key) +#define case_34_SBOX32(hash,state,key) _SBOX32_CASE(34,hash,state,key) #else -#define case_34_SBOX32(hash,state,key) /**/ +#define case_34_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 33 -#define case_33_SBOX32(hash,state,key) _SBOX32_CASE(33,hash,state,key) +#define case_33_SBOX32(hash,state,key) _SBOX32_CASE(33,hash,state,key) #else -#define case_33_SBOX32(hash,state,key) /**/ +#define case_33_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 32 -#define case_32_SBOX32(hash,state,key) _SBOX32_CASE(32,hash,state,key) +#define case_32_SBOX32(hash,state,key) _SBOX32_CASE(32,hash,state,key) #else -#define case_32_SBOX32(hash,state,key) /**/ +#define case_32_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 31 -#define case_31_SBOX32(hash,state,key) _SBOX32_CASE(31,hash,state,key) +#define case_31_SBOX32(hash,state,key) _SBOX32_CASE(31,hash,state,key) #else -#define case_31_SBOX32(hash,state,key) /**/ +#define case_31_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 30 -#define case_30_SBOX32(hash,state,key) _SBOX32_CASE(30,hash,state,key) +#define case_30_SBOX32(hash,state,key) _SBOX32_CASE(30,hash,state,key) #else -#define case_30_SBOX32(hash,state,key) /**/ +#define case_30_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 29 -#define case_29_SBOX32(hash,state,key) _SBOX32_CASE(29,hash,state,key) +#define case_29_SBOX32(hash,state,key) _SBOX32_CASE(29,hash,state,key) #else -#define case_29_SBOX32(hash,state,key) /**/ +#define case_29_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 28 -#define case_28_SBOX32(hash,state,key) _SBOX32_CASE(28,hash,state,key) +#define case_28_SBOX32(hash,state,key) _SBOX32_CASE(28,hash,state,key) #else -#define case_28_SBOX32(hash,state,key) /**/ +#define case_28_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 27 -#define case_27_SBOX32(hash,state,key) _SBOX32_CASE(27,hash,state,key) +#define case_27_SBOX32(hash,state,key) _SBOX32_CASE(27,hash,state,key) #else -#define case_27_SBOX32(hash,state,key) /**/ +#define case_27_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 26 -#define case_26_SBOX32(hash,state,key) _SBOX32_CASE(26,hash,state,key) +#define case_26_SBOX32(hash,state,key) _SBOX32_CASE(26,hash,state,key) #else -#define case_26_SBOX32(hash,state,key) /**/ +#define case_26_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 25 -#define case_25_SBOX32(hash,state,key) _SBOX32_CASE(25,hash,state,key) +#define case_25_SBOX32(hash,state,key) _SBOX32_CASE(25,hash,state,key) #else -#define case_25_SBOX32(hash,state,key) /**/ +#define case_25_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 24 -#define case_24_SBOX32(hash,state,key) _SBOX32_CASE(24,hash,state,key) +#define case_24_SBOX32(hash,state,key) _SBOX32_CASE(24,hash,state,key) #else -#define case_24_SBOX32(hash,state,key) /**/ +#define case_24_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 23 -#define case_23_SBOX32(hash,state,key) _SBOX32_CASE(23,hash,state,key) +#define case_23_SBOX32(hash,state,key) _SBOX32_CASE(23,hash,state,key) #else -#define case_23_SBOX32(hash,state,key) /**/ +#define case_23_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 22 -#define case_22_SBOX32(hash,state,key) _SBOX32_CASE(22,hash,state,key) +#define case_22_SBOX32(hash,state,key) _SBOX32_CASE(22,hash,state,key) #else -#define case_22_SBOX32(hash,state,key) /**/ +#define case_22_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 21 -#define case_21_SBOX32(hash,state,key) _SBOX32_CASE(21,hash,state,key) +#define case_21_SBOX32(hash,state,key) _SBOX32_CASE(21,hash,state,key) #else -#define case_21_SBOX32(hash,state,key) /**/ +#define case_21_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 20 -#define case_20_SBOX32(hash,state,key) _SBOX32_CASE(20,hash,state,key) +#define case_20_SBOX32(hash,state,key) _SBOX32_CASE(20,hash,state,key) #else -#define case_20_SBOX32(hash,state,key) /**/ +#define case_20_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 19 -#define case_19_SBOX32(hash,state,key) _SBOX32_CASE(19,hash,state,key) +#define case_19_SBOX32(hash,state,key) _SBOX32_CASE(19,hash,state,key) #else -#define case_19_SBOX32(hash,state,key) /**/ +#define case_19_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 18 -#define case_18_SBOX32(hash,state,key) _SBOX32_CASE(18,hash,state,key) +#define case_18_SBOX32(hash,state,key) _SBOX32_CASE(18,hash,state,key) #else -#define case_18_SBOX32(hash,state,key) /**/ +#define case_18_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 17 -#define case_17_SBOX32(hash,state,key) _SBOX32_CASE(17,hash,state,key) +#define case_17_SBOX32(hash,state,key) _SBOX32_CASE(17,hash,state,key) #else -#define case_17_SBOX32(hash,state,key) /**/ +#define case_17_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 16 -#define case_16_SBOX32(hash,state,key) _SBOX32_CASE(16,hash,state,key) +#define case_16_SBOX32(hash,state,key) _SBOX32_CASE(16,hash,state,key) #else -#define case_16_SBOX32(hash,state,key) /**/ +#define case_16_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 15 -#define case_15_SBOX32(hash,state,key) _SBOX32_CASE(15,hash,state,key) +#define case_15_SBOX32(hash,state,key) _SBOX32_CASE(15,hash,state,key) #else -#define case_15_SBOX32(hash,state,key) /**/ +#define case_15_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 14 -#define case_14_SBOX32(hash,state,key) _SBOX32_CASE(14,hash,state,key) +#define case_14_SBOX32(hash,state,key) _SBOX32_CASE(14,hash,state,key) #else -#define case_14_SBOX32(hash,state,key) /**/ +#define case_14_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 13 -#define case_13_SBOX32(hash,state,key) _SBOX32_CASE(13,hash,state,key) +#define case_13_SBOX32(hash,state,key) _SBOX32_CASE(13,hash,state,key) #else -#define case_13_SBOX32(hash,state,key) /**/ +#define case_13_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 12 -#define case_12_SBOX32(hash,state,key) _SBOX32_CASE(12,hash,state,key) +#define case_12_SBOX32(hash,state,key) _SBOX32_CASE(12,hash,state,key) #else -#define case_12_SBOX32(hash,state,key) /**/ +#define case_12_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 11 -#define case_11_SBOX32(hash,state,key) _SBOX32_CASE(11,hash,state,key) +#define case_11_SBOX32(hash,state,key) _SBOX32_CASE(11,hash,state,key) #else -#define case_11_SBOX32(hash,state,key) /**/ +#define case_11_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 10 -#define case_10_SBOX32(hash,state,key) _SBOX32_CASE(10,hash,state,key) +#define case_10_SBOX32(hash,state,key) _SBOX32_CASE(10,hash,state,key) #else -#define case_10_SBOX32(hash,state,key) /**/ +#define case_10_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 9 -#define case_9_SBOX32(hash,state,key) _SBOX32_CASE(9,hash,state,key) +#define case_9_SBOX32(hash,state,key) _SBOX32_CASE(9,hash,state,key) #else -#define case_9_SBOX32(hash,state,key) /**/ +#define case_9_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 8 -#define case_8_SBOX32(hash,state,key) _SBOX32_CASE(8,hash,state,key) +#define case_8_SBOX32(hash,state,key) _SBOX32_CASE(8,hash,state,key) #else -#define case_8_SBOX32(hash,state,key) /**/ +#define case_8_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 7 -#define case_7_SBOX32(hash,state,key) _SBOX32_CASE(7,hash,state,key) +#define case_7_SBOX32(hash,state,key) _SBOX32_CASE(7,hash,state,key) #else -#define case_7_SBOX32(hash,state,key) /**/ +#define case_7_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 6 -#define case_6_SBOX32(hash,state,key) _SBOX32_CASE(6,hash,state,key) +#define case_6_SBOX32(hash,state,key) _SBOX32_CASE(6,hash,state,key) #else -#define case_6_SBOX32(hash,state,key) /**/ +#define case_6_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 5 -#define case_5_SBOX32(hash,state,key) _SBOX32_CASE(5,hash,state,key) +#define case_5_SBOX32(hash,state,key) _SBOX32_CASE(5,hash,state,key) #else -#define case_5_SBOX32(hash,state,key) /**/ +#define case_5_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 4 -#define case_4_SBOX32(hash,state,key) _SBOX32_CASE(4,hash,state,key) +#define case_4_SBOX32(hash,state,key) _SBOX32_CASE(4,hash,state,key) #else -#define case_4_SBOX32(hash,state,key) /**/ +#define case_4_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 3 -#define case_3_SBOX32(hash,state,key) _SBOX32_CASE(3,hash,state,key) +#define case_3_SBOX32(hash,state,key) _SBOX32_CASE(3,hash,state,key) #else -#define case_3_SBOX32(hash,state,key) /**/ +#define case_3_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 2 -#define case_2_SBOX32(hash,state,key) _SBOX32_CASE(2,hash,state,key) +#define case_2_SBOX32(hash,state,key) _SBOX32_CASE(2,hash,state,key) #else -#define case_2_SBOX32(hash,state,key) /**/ +#define case_2_SBOX32(hash,state,key) /**/ #endif #if SBOX32_MAX_LEN >= 1 -#define case_1_SBOX32(hash,state,key) _SBOX32_CASE(1,hash,state,key) +#define case_1_SBOX32(hash,state,key) _SBOX32_CASE(1,hash,state,key) #else -#define case_1_SBOX32(hash,state,key) /**/ +#define case_1_SBOX32(hash,state,key) /**/ #endif #define XORSHIFT128_set(r,x,y,z,w,t) \ @@ -1402,7 +1402,7 @@ } STMT_END #ifndef SBOX32_CHURN_ROUNDS -#define SBOX32_CHURN_ROUNDS 128 +#define SBOX32_CHURN_ROUNDS 128 #endif #define _SBOX32_CASE(len,hash,state,key) \ diff --git a/scope.h b/scope.h index 7a8aed9f3842..a58ac7177e82 100644 --- a/scope.h +++ b/scope.h @@ -10,14 +10,14 @@ #include "scope_types.h" -#define SAVEf_SETMAGIC 1 -#define SAVEf_KEEPOLDELEM 2 +#define SAVEf_SETMAGIC 1 +#define SAVEf_KEEPOLDELEM 2 -#define SAVE_TIGHT_SHIFT 6 -#define SAVE_MASK 0x3F +#define SAVE_TIGHT_SHIFT 6 +#define SAVE_MASK 0x3F -#define save_aelem(av,idx,sptr) save_aelem_flags(av,idx,sptr,SAVEf_SETMAGIC) -#define save_helem(hv,key,sptr) save_helem_flags(hv,key,sptr,SAVEf_SETMAGIC) +#define save_aelem(av,idx,sptr) save_aelem_flags(av,idx,sptr,SAVEf_SETMAGIC) +#define save_helem(hv,key,sptr) save_helem_flags(hv,key,sptr,SAVEf_SETMAGIC) #ifndef SCOPE_SAVES_SIGNAL_MASK #define SCOPE_SAVES_SIGNAL_MASK 0 @@ -25,20 +25,20 @@ /* the maximum number of entries that might * be pushed using the SS_ADD* macros */ -#define SS_MAXPUSH 4 +#define SS_MAXPUSH 4 #define SSCHECK(need) \ if (UNLIKELY(PL_savestack_ix + (I32)(need) > PL_savestack_max)) savestack_grow() #define SSGROW(need) \ if (UNLIKELY(PL_savestack_ix + (I32)(need) > PL_savestack_max)) savestack_grow_cnt(need) -#define SSPUSHINT(i) (PL_savestack[PL_savestack_ix++].any_i32 = (I32)(i)) -#define SSPUSHLONG(i) (PL_savestack[PL_savestack_ix++].any_long = (long)(i)) -#define SSPUSHBOOL(p) (PL_savestack[PL_savestack_ix++].any_bool = (p)) -#define SSPUSHIV(i) (PL_savestack[PL_savestack_ix++].any_iv = (IV)(i)) -#define SSPUSHUV(u) (PL_savestack[PL_savestack_ix++].any_uv = (UV)(u)) -#define SSPUSHPTR(p) (PL_savestack[PL_savestack_ix++].any_ptr = (void*)(p)) -#define SSPUSHDPTR(p) (PL_savestack[PL_savestack_ix++].any_dptr = (p)) -#define SSPUSHDXPTR(p) (PL_savestack[PL_savestack_ix++].any_dxptr = (p)) +#define SSPUSHINT(i) (PL_savestack[PL_savestack_ix++].any_i32 = (I32)(i)) +#define SSPUSHLONG(i) (PL_savestack[PL_savestack_ix++].any_long = (long)(i)) +#define SSPUSHBOOL(p) (PL_savestack[PL_savestack_ix++].any_bool = (p)) +#define SSPUSHIV(i) (PL_savestack[PL_savestack_ix++].any_iv = (IV)(i)) +#define SSPUSHUV(u) (PL_savestack[PL_savestack_ix++].any_uv = (UV)(u)) +#define SSPUSHPTR(p) (PL_savestack[PL_savestack_ix++].any_ptr = (void*)(p)) +#define SSPUSHDPTR(p) (PL_savestack[PL_savestack_ix++].any_dptr = (p)) +#define SSPUSHDXPTR(p) (PL_savestack[PL_savestack_ix++].any_dxptr = (p)) /* SS_ADD*: newer, faster versions of the above. Don't mix the two sets * of macros. These are fast because they save reduce accesses to the PL_ @@ -66,23 +66,23 @@ if (UNLIKELY(ix > PL_savestack_max)) savestack_grow(); \ assert(PL_savestack_ix <= PL_savestack_max); -#define SS_ADD_INT(i) ((ssp++)->any_i32 = (I32)(i)) -#define SS_ADD_LONG(i) ((ssp++)->any_long = (long)(i)) -#define SS_ADD_BOOL(p) ((ssp++)->any_bool = (p)) -#define SS_ADD_IV(i) ((ssp++)->any_iv = (IV)(i)) -#define SS_ADD_UV(u) ((ssp++)->any_uv = (UV)(u)) -#define SS_ADD_PTR(p) ((ssp++)->any_ptr = (void*)(p)) -#define SS_ADD_DPTR(p) ((ssp++)->any_dptr = (p)) -#define SS_ADD_DXPTR(p) ((ssp++)->any_dxptr = (p)) - -#define SSPOPINT (PL_savestack[--PL_savestack_ix].any_i32) -#define SSPOPLONG (PL_savestack[--PL_savestack_ix].any_long) -#define SSPOPBOOL (PL_savestack[--PL_savestack_ix].any_bool) -#define SSPOPIV (PL_savestack[--PL_savestack_ix].any_iv) -#define SSPOPUV (PL_savestack[--PL_savestack_ix].any_uv) -#define SSPOPPTR (PL_savestack[--PL_savestack_ix].any_ptr) -#define SSPOPDPTR (PL_savestack[--PL_savestack_ix].any_dptr) -#define SSPOPDXPTR (PL_savestack[--PL_savestack_ix].any_dxptr) +#define SS_ADD_INT(i) ((ssp++)->any_i32 = (I32)(i)) +#define SS_ADD_LONG(i) ((ssp++)->any_long = (long)(i)) +#define SS_ADD_BOOL(p) ((ssp++)->any_bool = (p)) +#define SS_ADD_IV(i) ((ssp++)->any_iv = (IV)(i)) +#define SS_ADD_UV(u) ((ssp++)->any_uv = (UV)(u)) +#define SS_ADD_PTR(p) ((ssp++)->any_ptr = (void*)(p)) +#define SS_ADD_DPTR(p) ((ssp++)->any_dptr = (p)) +#define SS_ADD_DXPTR(p) ((ssp++)->any_dxptr = (p)) + +#define SSPOPINT (PL_savestack[--PL_savestack_ix].any_i32) +#define SSPOPLONG (PL_savestack[--PL_savestack_ix].any_long) +#define SSPOPBOOL (PL_savestack[--PL_savestack_ix].any_bool) +#define SSPOPIV (PL_savestack[--PL_savestack_ix].any_iv) +#define SSPOPUV (PL_savestack[--PL_savestack_ix].any_uv) +#define SSPOPPTR (PL_savestack[--PL_savestack_ix].any_ptr) +#define SSPOPDPTR (PL_savestack[--PL_savestack_ix].any_dptr) +#define SSPOPDXPTR (PL_savestack[--PL_savestack_ix].any_dxptr) /* @@ -115,9 +115,9 @@ the scope has the given name. C must be a literal string. =cut */ -#define SAVETMPS Perl_savetmps(aTHX) +#define SAVETMPS Perl_savetmps(aTHX) -#define FREETMPS if (PL_tmps_ix > PL_tmps_floor) free_tmps() +#define FREETMPS if (PL_tmps_ix > PL_tmps_floor) free_tmps() #ifdef DEBUGGING #define ENTER \ @@ -150,8 +150,8 @@ the scope has the given name. C must be a literal string. pop_scope(); \ } STMT_END #else -#define ENTER push_scope() -#define LEAVE pop_scope() +#define ENTER push_scope() +#define LEAVE pop_scope() #define ENTER_with_name(name) ENTER #define LEAVE_with_name(name) LEAVE #endif @@ -160,30 +160,30 @@ the scope has the given name. C must be a literal string. if (PL_savestack_ix > old) leave_scope(old); \ } STMT_END -#define SAVEI8(i) save_I8((I8*)&(i)) -#define SAVEI16(i) save_I16((I16*)&(i)) -#define SAVEI32(i) save_I32((I32*)&(i)) -#define SAVEINT(i) save_int((int*)&(i)) -#define SAVEIV(i) save_iv((IV*)&(i)) -#define SAVELONG(l) save_long((long*)&(l)) -#define SAVESTRLEN(l) Perl_save_strlen(aTHX_ (STRLEN*)&(l)) -#define SAVEBOOL(b) save_bool(&(b)) -#define SAVESPTR(s) save_sptr((SV**)&(s)) -#define SAVEPPTR(s) save_pptr((char**)&(s)) -#define SAVEVPTR(s) save_vptr((void*)&(s)) -#define SAVEPADSVANDMORTALIZE(s) save_padsv_and_mortalize(s) -#define SAVEFREESV(s) save_freesv(MUTABLE_SV(s)) -#define SAVEFREEPADNAME(s) save_pushptr((void *)(s), SAVEt_FREEPADNAME) -#define SAVEMORTALIZESV(s) save_mortalizesv(MUTABLE_SV(s)) -#define SAVEFREEOP(o) save_freeop((OP*)(o)) -#define SAVEFREEPV(p) save_freepv((char*)(p)) -#define SAVECLEARSV(sv) save_clearsv((SV**)&(sv)) -#define SAVEGENERICSV(s) save_generic_svref((SV**)&(s)) -#define SAVEGENERICPV(s) save_generic_pvref((char**)&(s)) -#define SAVERCPVFREE(s) save_rcpv_free((char**)&(s)) -#define SAVESHAREDPV(s) save_shared_pvref((char**)&(s)) +#define SAVEI8(i) save_I8((I8*)&(i)) +#define SAVEI16(i) save_I16((I16*)&(i)) +#define SAVEI32(i) save_I32((I32*)&(i)) +#define SAVEINT(i) save_int((int*)&(i)) +#define SAVEIV(i) save_iv((IV*)&(i)) +#define SAVELONG(l) save_long((long*)&(l)) +#define SAVESTRLEN(l) Perl_save_strlen(aTHX_ (STRLEN*)&(l)) +#define SAVEBOOL(b) save_bool(&(b)) +#define SAVESPTR(s) save_sptr((SV**)&(s)) +#define SAVEPPTR(s) save_pptr((char**)&(s)) +#define SAVEVPTR(s) save_vptr((void*)&(s)) +#define SAVEPADSVANDMORTALIZE(s) save_padsv_and_mortalize(s) +#define SAVEFREESV(s) save_freesv(MUTABLE_SV(s)) +#define SAVEFREEPADNAME(s) save_pushptr((void *)(s), SAVEt_FREEPADNAME) +#define SAVEMORTALIZESV(s) save_mortalizesv(MUTABLE_SV(s)) +#define SAVEFREEOP(o) save_freeop((OP*)(o)) +#define SAVEFREEPV(p) save_freepv((char*)(p)) +#define SAVECLEARSV(sv) save_clearsv((SV**)&(sv)) +#define SAVEGENERICSV(s) save_generic_svref((SV**)&(s)) +#define SAVEGENERICPV(s) save_generic_pvref((char**)&(s)) +#define SAVERCPVFREE(s) save_rcpv_free((char**)&(s)) +#define SAVESHAREDPV(s) save_shared_pvref((char**)&(s)) #define SAVESETSVFLAGS(sv,mask,val) save_set_svflags(sv,mask,val) -#define SAVEFREECOPHH(h) save_pushptr((void *)(h), SAVEt_FREECOPHH) +#define SAVEFREECOPHH(h) save_pushptr((void *)(h), SAVEt_FREECOPHH) #define SAVEDELETE(h,k,l) \ save_delete(MUTABLE_HV(h), (char*)(k), (I32)(l)) @@ -205,11 +205,11 @@ the scope has the given name. C must be a literal string. SS_ADD_END(2); \ } STMT_END -#define SAVEOP() save_op() +#define SAVEOP() save_op() -#define SAVEHINTS() save_hints() +#define SAVEHINTS() save_hints() -#define SAVECOMPPAD() save_pushptr(MUTABLE_SV(PL_comppad), SAVEt_COMPPAD) +#define SAVECOMPPAD() save_pushptr(MUTABLE_SV(PL_comppad), SAVEt_COMPPAD) #define SAVESWITCHSTACK(f,t) \ STMT_START { \ @@ -226,17 +226,17 @@ the scope has the given name. C must be a literal string. save_pushptr(PL_curcop->cop_warnings, SAVEt_CURCOP_WARNINGS) -#define SAVEPARSER(p) save_pushptr((p), SAVEt_PARSER) +#define SAVEPARSER(p) save_pushptr((p), SAVEt_PARSER) #ifdef USE_ITHREADS -# define SAVECOPSTASH_FREE(c) SAVEIV((c)->cop_stashoff) -# define SAVECOPFILE_x(c) SAVEPPTR((c)->cop_file) +# define SAVECOPSTASH_FREE(c) SAVEIV((c)->cop_stashoff) +# define SAVECOPFILE_x(c) SAVEPPTR((c)->cop_file) # define SAVECOPFILE(c) \ STMT_START { \ SAVECOPFILE_x(c); \ CopFILE_debug((c),"SAVECOPFILE",0); \ } STMT_END -# define SAVECOPFILE_FREE_x(c) SAVERCPVFREE((c)->cop_file) +# define SAVECOPFILE_FREE_x(c) SAVERCPVFREE((c)->cop_file) # define SAVECOPFILE_FREE(c) \ STMT_START { \ SAVECOPFILE_FREE_x(c); \ @@ -244,12 +244,12 @@ the scope has the given name. C must be a literal string. } STMT_END #else # /* XXX not refcounted */ -# define SAVECOPSTASH_FREE(c) SAVESPTR(CopSTASH(c)) -# define SAVECOPFILE(c) SAVESPTR(CopFILEGV(c)) -# define SAVECOPFILE_FREE(c) SAVEGENERICSV(CopFILEGV(c)) +# define SAVECOPSTASH_FREE(c) SAVESPTR(CopSTASH(c)) +# define SAVECOPFILE(c) SAVESPTR(CopFILEGV(c)) +# define SAVECOPFILE_FREE(c) SAVEGENERICSV(CopFILEGV(c)) #endif -#define SAVECOPLINE(c) SAVEI32(CopLINE(c)) +#define SAVECOPLINE(c) SAVEI32(CopLINE(c)) /* =for apidoc_section $stack @@ -283,20 +283,20 @@ C casts it to a pointer of that C. =cut */ -#define SSNEW(size) Perl_save_alloc(aTHX_ (size), 0) -#define SSNEWt(n,t) SSNEW((n)*sizeof(t)) +#define SSNEW(size) Perl_save_alloc(aTHX_ (size), 0) +#define SSNEWt(n,t) SSNEW((n)*sizeof(t)) #define SSNEWa(size,align) \ Perl_save_alloc(aTHX_ (size), \ (I32)(align - ((size_t)((caddr_t)&PL_savestack[PL_savestack_ix]) % align)) % align) -#define SSNEWat(n,t,align) SSNEWa((n)*sizeof(t), align) +#define SSNEWat(n,t,align) SSNEWa((n)*sizeof(t), align) #define SSPTR(off,type) \ (assert(sizeof(off) == sizeof(SSize_t)), (type) ((char*)PL_savestack + off)) #define SSPTRt(off,type) \ (assert(sizeof(off) == sizeof(SSize_t)), (type*) ((char*)PL_savestack + off)) -#define save_freesv(op) save_pushptr((void *)(op), SAVEt_FREESV) -#define save_mortalizesv(op) save_pushptr((void *)(op), SAVEt_MORTALIZESV) +#define save_freesv(op) save_pushptr((void *)(op), SAVEt_FREESV) +#define save_mortalizesv(op) save_pushptr((void *)(op), SAVEt_MORTALIZESV) # define save_freeop(op) \ STMT_START { \ @@ -305,7 +305,7 @@ C casts it to a pointer of that C. _o->op_savefree = 1; \ save_pushptr((void *)(_o), SAVEt_FREEOP); \ } STMT_END -#define save_freepv(pv) save_pushptr((void *)(pv), SAVEt_FREEPV) +#define save_freepv(pv) save_pushptr((void *)(pv), SAVEt_FREEPV) /* =for apidoc_section $callback @@ -316,7 +316,7 @@ Implements C. =cut */ -#define save_op() save_pushptr((void *)(PL_op), SAVEt_OP) +#define save_op() save_pushptr((void *)(PL_op), SAVEt_OP) /* * ex: set ts=8 sts=4 sw=4 et: diff --git a/sv.h b/sv.h index 891a72421ac4..219eb915329f 100644 --- a/sv.h +++ b/sv.h @@ -163,14 +163,14 @@ typedef enum { * The bits that match 0xe0 are CURRENTLY UNUSED The bits above that are * for flags, like SVf_IOK */ -#define SVt_MASK 0x1f /* smallest bitmask that covers all types */ +#define SVt_MASK 0x1f /* smallest bitmask that covers all types */ #ifndef PERL_CORE /* Fast Boyer Moore tables are now stored in magic attached to PVMGs */ -# define SVt_PVBM SVt_PVMG +# define SVt_PVBM SVt_PVMG /* Anything wanting to create a reference from clean should ensure that it has a scalar of type SVt_IV now: */ -# define SVt_RV SVt_IV +# define SVt_RV SVt_IV #endif /* The array of arena roots for SV bodies is indexed by SvTYPE. SVt_NULL @@ -178,17 +178,17 @@ typedef enum { * doesn't, so that arena root is used for HVs with struct xpvhv_aux. */ #if defined(PERL_IN_HV_C) || defined(PERL_IN_XS_APITEST) -# define HE_ARENA_ROOT_IX SVt_NULL +# define HE_ARENA_ROOT_IX SVt_NULL #endif #if defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C) -# define HVAUX_ARENA_ROOT_IX SVt_IV +# define HVAUX_ARENA_ROOT_IX SVt_IV #endif #ifdef PERL_IN_SV_C -# define SVt_FIRST SVt_NULL /* the type of SV that new_SV() +# define SVt_FIRST SVt_NULL /* the type of SV that new_SV() in sv.c returns */ #endif -#define PERL_ARENA_ROOTS_SIZE (SVt_LAST) +#define PERL_ARENA_ROOTS_SIZE (SVt_LAST) /* typedefs to eliminate some typing */ typedef struct he HE; @@ -203,7 +203,7 @@ typedef struct hek HEK; U32 sv_flags /* what we are */ #if NVSIZE <= IVSIZE -# define _NV_BODYLESS_UNION NV svu_nv; +# define _NV_BODYLESS_UNION NV svu_nv; #else # define _NV_BODYLESS_UNION #endif @@ -341,14 +341,14 @@ the upgrade if necessary. See C>. =cut */ -#define SvANY(sv) (sv)->sv_any -#define SvFLAGS(sv) (sv)->sv_flags -#define SvREFCNT(sv) (sv)->sv_refcnt +#define SvANY(sv) (sv)->sv_any +#define SvFLAGS(sv) (sv)->sv_flags +#define SvREFCNT(sv) (sv)->sv_refcnt -#define SvREFCNT_inc(sv) Perl_SvREFCNT_inc(MUTABLE_SV(sv)) -#define SvREFCNT_inc_simple(sv) SvREFCNT_inc(sv) -#define SvREFCNT_inc_NN(sv) Perl_SvREFCNT_inc_NN(MUTABLE_SV(sv)) -#define SvREFCNT_inc_void(sv) Perl_SvREFCNT_inc_void(MUTABLE_SV(sv)) +#define SvREFCNT_inc(sv) Perl_SvREFCNT_inc(MUTABLE_SV(sv)) +#define SvREFCNT_inc_simple(sv) SvREFCNT_inc(sv) +#define SvREFCNT_inc_NN(sv) Perl_SvREFCNT_inc_NN(MUTABLE_SV(sv)) +#define SvREFCNT_inc_void(sv) Perl_SvREFCNT_inc_void(MUTABLE_SV(sv)) /* These guys don't need the curly blocks */ #define SvREFCNT_inc_simple_void(sv) \ @@ -358,14 +358,14 @@ the upgrade if necessary. See C>. SvREFCNT(sv_)++; \ } STMT_END -#define SvREFCNT_inc_simple_NN(sv) (++(SvREFCNT(sv)),MUTABLE_SV(sv)) -#define SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT(MUTABLE_SV(sv))) +#define SvREFCNT_inc_simple_NN(sv) (++(SvREFCNT(sv)),MUTABLE_SV(sv)) +#define SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT(MUTABLE_SV(sv))) #define SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT(MUTABLE_SV(sv))) -#define SvREFCNT_dec(sv) Perl_SvREFCNT_dec(aTHX_ MUTABLE_SV(sv)) -#define SvREFCNT_dec_NN(sv) Perl_SvREFCNT_dec_NN(aTHX_ MUTABLE_SV(sv)) +#define SvREFCNT_dec(sv) Perl_SvREFCNT_dec(aTHX_ MUTABLE_SV(sv)) +#define SvREFCNT_dec_NN(sv) Perl_SvREFCNT_dec_NN(aTHX_ MUTABLE_SV(sv)) -#define SVTYPEMASK 0xff +#define SVTYPEMASK 0xff #define SvTYPE(sv) ((svtype)((sv)->sv_flags & SVTYPEMASK)) /* Sadly there are some parts of the core that have pointers to @@ -378,17 +378,17 @@ the upgrade if necessary. See C>. #define SvUPGRADE(sv, mt) \ ((void)(SvTYPE(sv) >= (mt) || (sv_upgrade(sv, mt),1))) -#define SVf_IOK 0x00000100 /* has valid public integer value */ -#define SVf_NOK 0x00000200 /* has valid public numeric value */ -#define SVf_POK 0x00000400 /* has valid public pointer value */ -#define SVf_ROK 0x00000800 /* has a valid reference pointer */ - -#define SVp_IOK 0x00001000 /* has valid non-public integer value */ -#define SVp_NOK 0x00002000 /* has valid non-public numeric value */ -#define SVp_POK 0x00004000 /* has valid non-public pointer value */ -#define SVp_SCREAM 0x00008000 /* currently unused on plain scalars */ -#define SVphv_CLONEABLE SVp_SCREAM /* PVHV (stashes) clone its objects */ -#define SVpgv_GP SVp_SCREAM /* GV has a valid GP */ +#define SVf_IOK 0x00000100 /* has valid public integer value */ +#define SVf_NOK 0x00000200 /* has valid public numeric value */ +#define SVf_POK 0x00000400 /* has valid public pointer value */ +#define SVf_ROK 0x00000800 /* has a valid reference pointer */ + +#define SVp_IOK 0x00001000 /* has valid non-public integer value */ +#define SVp_NOK 0x00002000 /* has valid non-public numeric value */ +#define SVp_POK 0x00004000 /* has valid non-public pointer value */ +#define SVp_SCREAM 0x00008000 /* currently unused on plain scalars */ +#define SVphv_CLONEABLE SVp_SCREAM /* PVHV (stashes) clone its objects */ +#define SVpgv_GP SVp_SCREAM /* GV has a valid GP */ #define SVprv_PCS_IMPORTED SVp_SCREAM /* RV is a proxy for a constant subroutine in another package. Set the GvIMPORTED_CV_on() if it needs @@ -439,7 +439,7 @@ the upgrade if necessary. See C>. (SVf_IOK|SVf_NOK|SVf_POK|SVf_ROK| \ SVp_IOK|SVp_NOK|SVp_POK|SVpgv_GP) -#define PRIVSHIFT 4 /* (SVp_?OK >> PRIVSHIFT) == SVf_?OK */ +#define PRIVSHIFT 4 /* (SVp_?OK >> PRIVSHIFT) == SVf_?OK */ /* SVf_AMAGIC means that the stash *may* have overload methods. * It's set each time a function is compiled into a stash, and is @@ -469,7 +469,7 @@ the upgrade if necessary. See C>. /* scalar SVs with SVp_POK */ -#define SVppv_STATIC 0x40000000 /* PV is pointer to static const; +#define SVppv_STATIC 0x40000000 /* PV is pointer to static const; must be set with SVf_IsCOW */ /* PVAV */ #define SVpav_REAL 0x40000000 /* free old entries */ @@ -495,7 +495,7 @@ the upgrade if necessary. See C>. struct regexp* xpvlenu_rx; /* regex when SV body is XPVLV */ \ } xpv_len_u -#define xpv_len xpv_len_u.xpvlenu_len +#define xpv_len xpv_len_u.xpvlenu_len union _xnvu { NV xnv_nv; /* numeric value, if any */ @@ -526,14 +526,14 @@ struct xpviv { union _xivu xiv_u; }; -#define xiv_iv xiv_u.xivu_iv +#define xiv_iv xiv_u.xivu_iv struct xpvuv { _XPV_HEAD; union _xivu xuv_u; }; -#define xuv_uv xuv_u.xivu_uv +#define xuv_uv xuv_u.xivu_uv struct xpvnv { _XPV_HEAD; @@ -564,7 +564,7 @@ struct xpvlv { len 4 = out of range (vec) */ }; -#define xlv_targoff xlv_targoff_u.xlvu_targoff +#define xlv_targoff xlv_targoff_u.xlvu_targoff struct xpvinvlist { _XPV_HEAD; @@ -658,13 +658,13 @@ struct xpvio { #define xio_dirp xio_dirpu.xiou_dirp #define xio_any xio_dirpu.xiou_any -#define IOf_ARGV 1 /* this fp iterates over ARGV */ -#define IOf_START 2 /* check for null ARGV and substitute '-' */ -#define IOf_FLUSH 4 /* this fp wants a flush after write op */ -#define IOf_DIDTOP 8 /* just did top of form */ -#define IOf_UNTAINT 16 /* consider this fp (and its data) "safe" */ -#define IOf_NOLINE 32 /* slurped a pseudo-line from empty file */ -#define IOf_FAKE_DIRP 64 /* xio_dirp is fake (source filters kludge) +#define IOf_ARGV 1 /* this fp iterates over ARGV */ +#define IOf_START 2 /* check for null ARGV and substitute '-' */ +#define IOf_FLUSH 4 /* this fp wants a flush after write op */ +#define IOf_DIDTOP 8 /* just did top of form */ +#define IOf_UNTAINT 16 /* consider this fp (and its data) "safe" */ +#define IOf_NOLINE 32 /* slurped a pseudo-line from empty file */ +#define IOf_FAKE_DIRP 64 /* xio_dirp is fake (source filters kludge) Also, when this is set, SvPVX() is valid */ /* The following macros define implementation-independent @@ -920,16 +920,16 @@ Set the size of the string buffer for the SV. See C>. =cut */ -#define SvNIOK(sv) (SvFLAGS(sv) & (SVf_IOK|SVf_NOK)) -#define SvNIOKp(sv) (SvFLAGS(sv) & (SVp_IOK|SVp_NOK)) +#define SvNIOK(sv) (SvFLAGS(sv) & (SVf_IOK|SVf_NOK)) +#define SvNIOKp(sv) (SvFLAGS(sv) & (SVp_IOK|SVp_NOK)) #define SvNIOK_off(sv) \ (SvFLAGS(sv) &= ~(SVf_IOK|SVf_NOK| \ SVp_IOK|SVp_NOK|SVf_IVisUV)) -#define assert_not_ROK(sv) assert_(!SvROK(sv) || !SvRV(sv)) -#define assert_not_glob(sv) assert_(!isGV_with_GP(sv)) +#define assert_not_ROK(sv) assert_(!SvROK(sv) || !SvRV(sv)) +#define assert_not_glob(sv) assert_(!isGV_with_GP(sv)) -#define SvOK(sv) (SvFLAGS(sv) & SVf_OK) +#define SvOK(sv) (SvFLAGS(sv) & SVf_OK) #define SvOK_off(sv) \ (assert_not_ROK(sv) assert_not_glob(sv) \ SvFLAGS(sv) &= ~(SVf_OK| \ @@ -941,23 +941,23 @@ Set the size of the string buffer for the SV. See C>. SVf_UTF8), \ SvOOK_off(sv)) -#define SvOKp(sv) (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) -#define SvIOKp(sv) (SvFLAGS(sv) & SVp_IOK) +#define SvOKp(sv) (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) +#define SvIOKp(sv) (SvFLAGS(sv) & SVp_IOK) #define SvIOKp_on(sv) \ (assert_not_glob(sv) \ SvFLAGS(sv) |= SVp_IOK) -#define SvNOKp(sv) (SvFLAGS(sv) & SVp_NOK) -#define SvNOKp_on(sv) (assert_not_glob(sv) SvFLAGS(sv) |= SVp_NOK) -#define SvPOKp(sv) (SvFLAGS(sv) & SVp_POK) +#define SvNOKp(sv) (SvFLAGS(sv) & SVp_NOK) +#define SvNOKp_on(sv) (assert_not_glob(sv) SvFLAGS(sv) |= SVp_NOK) +#define SvPOKp(sv) (SvFLAGS(sv) & SVp_POK) #define SvPOKp_on(sv) \ (assert_not_ROK(sv) assert_not_glob(sv) \ SvFLAGS(sv) |= SVp_POK) -#define SvIOK(sv) (SvFLAGS(sv) & SVf_IOK) +#define SvIOK(sv) (SvFLAGS(sv) & SVf_IOK) #define SvIOK_on(sv) \ (assert_not_glob(sv) \ SvFLAGS(sv) |= (SVf_IOK|SVp_IOK)) -#define SvIOK_off(sv) (SvFLAGS(sv) &= ~(SVf_IOK|SVp_IOK|SVf_IVisUV)) +#define SvIOK_off(sv) (SvFLAGS(sv) &= ~(SVf_IOK|SVp_IOK|SVf_IVisUV)) #define SvIOK_only(sv) \ (SvOK_off(sv), \ SvFLAGS(sv) |= (SVf_IOK|SVp_IOK)) @@ -968,7 +968,7 @@ Set the size of the string buffer for the SV. See C>. #define SvIOK_UV(sv) \ ((SvFLAGS(sv) & (SVf_IOK|SVf_IVisUV)) \ == (SVf_IOK|SVf_IVisUV)) -#define SvUOK(sv) SvIOK_UV(sv) +#define SvUOK(sv) SvIOK_UV(sv) #define SvIOK_notUV(sv) \ ((SvFLAGS(sv) & (SVf_IOK|SVf_IVisUV)) \ == SVf_IOK) @@ -981,7 +981,7 @@ Set the size of the string buffer for the SV. See C>. #define SvIandPOK_off(sv) \ (SvFLAGS(sv) &= ~(SVf_IOK|SVp_IOK|SVf_IVisUV|SVf_POK|SVp_POK)) -#define SvBoolFlagsOK(sv) SvIandPOK(sv) +#define SvBoolFlagsOK(sv) SvIandPOK(sv) #define BOOL_INTERNALS_sv_isbool(sv) \ (SvIsCOW_static(sv) && \ @@ -993,15 +993,15 @@ Set the size of the string buffer for the SV. See C>. (SvIsCOW_static(sv) && \ (SvPVX_const(sv) == PL_No)) -#define SvIsUV(sv) (SvFLAGS(sv) & SVf_IVisUV) -#define SvIsUV_on(sv) (SvFLAGS(sv) |= SVf_IVisUV) -#define SvIsUV_off(sv) (SvFLAGS(sv) &= ~SVf_IVisUV) +#define SvIsUV(sv) (SvFLAGS(sv) & SVf_IVisUV) +#define SvIsUV_on(sv) (SvFLAGS(sv) |= SVf_IVisUV) +#define SvIsUV_off(sv) (SvFLAGS(sv) &= ~SVf_IVisUV) -#define SvNOK(sv) (SvFLAGS(sv) & SVf_NOK) +#define SvNOK(sv) (SvFLAGS(sv) & SVf_NOK) #define SvNOK_on(sv) \ (assert_not_glob(sv) \ SvFLAGS(sv) |= (SVf_NOK|SVp_NOK)) -#define SvNOK_off(sv) (SvFLAGS(sv) &= ~(SVf_NOK|SVp_NOK)) +#define SvNOK_off(sv) (SvFLAGS(sv) &= ~(SVf_NOK|SVp_NOK)) #define SvNOK_only(sv) \ (SvOK_off(sv), \ SvFLAGS(sv) |= (SVf_NOK|SVp_NOK)) @@ -1033,15 +1033,15 @@ the UTF-8 status as it was. /* Ensure the return value of this macro does not clash with the GV_ADD* flags in gv.h: */ -#define SvUTF8(sv) (SvFLAGS(sv) & SVf_UTF8) -#define SvUTF8_on(sv) (SvFLAGS(sv) |= (SVf_UTF8)) -#define SvUTF8_off(sv) (SvFLAGS(sv) &= ~(SVf_UTF8)) +#define SvUTF8(sv) (SvFLAGS(sv) & SVf_UTF8) +#define SvUTF8_on(sv) (SvFLAGS(sv) |= (SVf_UTF8)) +#define SvUTF8_off(sv) (SvFLAGS(sv) &= ~(SVf_UTF8)) -#define SvPOK(sv) (SvFLAGS(sv) & SVf_POK) +#define SvPOK(sv) (SvFLAGS(sv) & SVf_POK) #define SvPOK_on(sv) \ (assert_not_ROK(sv) assert_not_glob(sv) \ SvFLAGS(sv) |= (SVf_POK|SVp_POK)) -#define SvPOK_off(sv) (SvFLAGS(sv) &= ~(SVf_POK|SVp_POK)) +#define SvPOK_off(sv) (SvFLAGS(sv) &= ~(SVf_POK|SVp_POK)) #define SvPOK_only(sv) \ (assert_not_ROK(sv) assert_not_glob(sv) \ SvFLAGS(sv) &= ~(SVf_OK| \ @@ -1067,8 +1067,8 @@ Returns the vstring magic, or NULL if none (SvMAGICAL(sv) \ ? mg_find(sv,PERL_MAGIC_vstring) : NULL) -#define SvOOK(sv) (SvFLAGS(sv) & SVf_OOK) -#define SvOOK_on(sv) (SvFLAGS(sv) |= SVf_OOK) +#define SvOOK(sv) (SvFLAGS(sv) & SVf_OOK) +#define SvOOK_on(sv) (SvFLAGS(sv) |= SVf_OOK) /* @@ -1079,31 +1079,31 @@ Remove any string offset. =cut */ -#define SvOOK_off(sv) ((void)(SvOOK(sv) && (sv_backoff(sv),0))) +#define SvOOK_off(sv) ((void)(SvOOK(sv) && (sv_backoff(sv),0))) -#define SvFAKE(sv) (SvFLAGS(sv) & SVf_FAKE) -#define SvFAKE_on(sv) (SvFLAGS(sv) |= SVf_FAKE) -#define SvFAKE_off(sv) (SvFLAGS(sv) &= ~SVf_FAKE) +#define SvFAKE(sv) (SvFLAGS(sv) & SVf_FAKE) +#define SvFAKE_on(sv) (SvFLAGS(sv) |= SVf_FAKE) +#define SvFAKE_off(sv) (SvFLAGS(sv) &= ~SVf_FAKE) -#define SvROK(sv) (SvFLAGS(sv) & SVf_ROK) -#define SvROK_on(sv) (SvFLAGS(sv) |= SVf_ROK) -#define SvROK_off(sv) (SvFLAGS(sv) &= ~(SVf_ROK)) +#define SvROK(sv) (SvFLAGS(sv) & SVf_ROK) +#define SvROK_on(sv) (SvFLAGS(sv) |= SVf_ROK) +#define SvROK_off(sv) (SvFLAGS(sv) &= ~(SVf_ROK)) -#define SvMAGICAL(sv) (SvFLAGS(sv) & (SVs_GMG|SVs_SMG|SVs_RMG)) -#define SvMAGICAL_on(sv) (SvFLAGS(sv) |= (SVs_GMG|SVs_SMG|SVs_RMG)) -#define SvMAGICAL_off(sv) (SvFLAGS(sv) &= ~(SVs_GMG|SVs_SMG|SVs_RMG)) +#define SvMAGICAL(sv) (SvFLAGS(sv) & (SVs_GMG|SVs_SMG|SVs_RMG)) +#define SvMAGICAL_on(sv) (SvFLAGS(sv) |= (SVs_GMG|SVs_SMG|SVs_RMG)) +#define SvMAGICAL_off(sv) (SvFLAGS(sv) &= ~(SVs_GMG|SVs_SMG|SVs_RMG)) -#define SvGMAGICAL(sv) (SvFLAGS(sv) & SVs_GMG) -#define SvGMAGICAL_on(sv) (SvFLAGS(sv) |= SVs_GMG) -#define SvGMAGICAL_off(sv) (SvFLAGS(sv) &= ~SVs_GMG) +#define SvGMAGICAL(sv) (SvFLAGS(sv) & SVs_GMG) +#define SvGMAGICAL_on(sv) (SvFLAGS(sv) |= SVs_GMG) +#define SvGMAGICAL_off(sv) (SvFLAGS(sv) &= ~SVs_GMG) -#define SvSMAGICAL(sv) (SvFLAGS(sv) & SVs_SMG) -#define SvSMAGICAL_on(sv) (SvFLAGS(sv) |= SVs_SMG) -#define SvSMAGICAL_off(sv) (SvFLAGS(sv) &= ~SVs_SMG) +#define SvSMAGICAL(sv) (SvFLAGS(sv) & SVs_SMG) +#define SvSMAGICAL_on(sv) (SvFLAGS(sv) |= SVs_SMG) +#define SvSMAGICAL_off(sv) (SvFLAGS(sv) &= ~SVs_SMG) -#define SvRMAGICAL(sv) (SvFLAGS(sv) & SVs_RMG) -#define SvRMAGICAL_on(sv) (SvFLAGS(sv) |= SVs_RMG) -#define SvRMAGICAL_off(sv) (SvFLAGS(sv) &= ~SVs_RMG) +#define SvRMAGICAL(sv) (SvFLAGS(sv) & SVs_RMG) +#define SvRMAGICAL_on(sv) (SvFLAGS(sv) |= SVs_RMG) +#define SvRMAGICAL_off(sv) (SvFLAGS(sv) &= ~SVs_RMG) /* =for apidoc Am|bool|SvAMAGIC|SV * sv @@ -1119,18 +1119,18 @@ Returns a boolean as to whether C has overloading HvAMAGIC(SvSTASH(SvRV(sv)))) /* To be used on the stashes themselves: */ -#define HvAMAGIC(hv) (SvFLAGS(hv) & SVf_AMAGIC) -#define HvAMAGIC_on(hv) (SvFLAGS(hv) |= SVf_AMAGIC) -#define HvAMAGIC_off(hv) (SvFLAGS(hv) &=~ SVf_AMAGIC) +#define HvAMAGIC(hv) (SvFLAGS(hv) & SVf_AMAGIC) +#define HvAMAGIC_on(hv) (SvFLAGS(hv) |= SVf_AMAGIC) +#define HvAMAGIC_off(hv) (SvFLAGS(hv) &=~ SVf_AMAGIC) /* "nog" means "doesn't have get magic" */ -#define SvPOK_nog(sv) ((SvFLAGS(sv) & (SVf_POK|SVs_GMG)) == SVf_POK) -#define SvIOK_nog(sv) ((SvFLAGS(sv) & (SVf_IOK|SVs_GMG)) == SVf_IOK) +#define SvPOK_nog(sv) ((SvFLAGS(sv) & (SVf_POK|SVs_GMG)) == SVf_POK) +#define SvIOK_nog(sv) ((SvFLAGS(sv) & (SVf_IOK|SVs_GMG)) == SVf_IOK) #define SvUOK_nog(sv) \ ((SvFLAGS(sv) & (SVf_IOK|SVf_IVisUV|SVs_GMG)) == (SVf_IOK|SVf_IVisUV)) -#define SvNOK_nog(sv) ((SvFLAGS(sv) & (SVf_NOK|SVs_GMG)) == SVf_NOK) -#define SvNIOK_nog(sv) (SvNIOK(sv) && !(SvFLAGS(sv) & SVs_GMG)) +#define SvNOK_nog(sv) ((SvFLAGS(sv) & (SVf_NOK|SVs_GMG)) == SVf_NOK) +#define SvNIOK_nog(sv) (SvNIOK(sv) && !(SvFLAGS(sv) & SVs_GMG)) #define SvPOK_nogthink(sv) \ ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST|SVs_GMG)) == SVf_POK) @@ -1169,7 +1169,7 @@ PL_sv_no), or is a regular SV whose last assignment stored a copy of one. =cut */ -#define SvIsBOOL(sv) Perl_sv_isbool(aTHX_ sv) +#define SvIsBOOL(sv) Perl_sv_isbool(aTHX_ sv) /* =for apidoc Am|U32|SvGAMAGIC|SV* sv @@ -1183,7 +1183,7 @@ is true then the scalar's value cannot change unless written to. =cut */ -#define SvGAMAGIC(sv) (SvGMAGICAL(sv) || SvAMAGIC(sv)) +#define SvGAMAGIC(sv) (SvGMAGICAL(sv) || SvAMAGIC(sv)) #define Gv_AMG(stash) \ (HvNAME(stash) && Gv_AMupdate(stash,FALSE) \ @@ -1193,14 +1193,14 @@ is true then the scalar's value cannot change unless written to. #define SvWEAKREF(sv) \ ((SvFLAGS(sv) & (SVf_ROK|SVprv_WEAKREF)) \ == (SVf_ROK|SVprv_WEAKREF)) -#define SvWEAKREF_on(sv) (SvFLAGS(sv) |= (SVf_ROK|SVprv_WEAKREF)) -#define SvWEAKREF_off(sv) (SvFLAGS(sv) &= ~(SVf_ROK|SVprv_WEAKREF)) +#define SvWEAKREF_on(sv) (SvFLAGS(sv) |= (SVf_ROK|SVprv_WEAKREF)) +#define SvWEAKREF_off(sv) (SvFLAGS(sv) &= ~(SVf_ROK|SVprv_WEAKREF)) #define SvPCS_IMPORTED(sv) \ ((SvFLAGS(sv) & (SVf_ROK|SVprv_PCS_IMPORTED)) \ == (SVf_ROK|SVprv_PCS_IMPORTED)) -#define SvPCS_IMPORTED_on(sv) (SvFLAGS(sv) |= (SVf_ROK|SVprv_PCS_IMPORTED)) -#define SvPCS_IMPORTED_off(sv) (SvFLAGS(sv) &= ~(SVf_ROK|SVprv_PCS_IMPORTED)) +#define SvPCS_IMPORTED_on(sv) (SvFLAGS(sv) |= (SVf_ROK|SVprv_PCS_IMPORTED)) +#define SvPCS_IMPORTED_off(sv) (SvFLAGS(sv) &= ~(SVf_ROK|SVprv_PCS_IMPORTED)) /* =for apidoc m|U32|SvTHINKFIRST|SV *sv @@ -1227,29 +1227,29 @@ C does nothing. =cut */ -#define SvTHINKFIRST(sv) (SvFLAGS(sv) & SVf_THINKFIRST) +#define SvTHINKFIRST(sv) (SvFLAGS(sv) & SVf_THINKFIRST) -#define SVs_PADMY 0 -#define SvPADMY(sv) !(SvFLAGS(sv) & SVs_PADTMP) +#define SVs_PADMY 0 +#define SvPADMY(sv) !(SvFLAGS(sv) & SVs_PADTMP) #ifndef PERL_CORE -# define SvPADMY_on(sv) SvPADTMP_off(sv) +# define SvPADMY_on(sv) SvPADTMP_off(sv) #endif -#define SvPADTMP(sv) (SvFLAGS(sv) & (SVs_PADTMP)) -#define SvPADSTALE(sv) (SvFLAGS(sv) & (SVs_PADSTALE)) +#define SvPADTMP(sv) (SvFLAGS(sv) & (SVs_PADTMP)) +#define SvPADSTALE(sv) (SvFLAGS(sv) & (SVs_PADSTALE)) -#define SvPADTMP_on(sv) (SvFLAGS(sv) |= SVs_PADTMP) -#define SvPADTMP_off(sv) (SvFLAGS(sv) &= ~SVs_PADTMP) -#define SvPADSTALE_on(sv) Perl_SvPADSTALE_on(MUTABLE_SV(sv)) -#define SvPADSTALE_off(sv) Perl_SvPADSTALE_off(MUTABLE_SV(sv)) +#define SvPADTMP_on(sv) (SvFLAGS(sv) |= SVs_PADTMP) +#define SvPADTMP_off(sv) (SvFLAGS(sv) &= ~SVs_PADTMP) +#define SvPADSTALE_on(sv) Perl_SvPADSTALE_on(MUTABLE_SV(sv)) +#define SvPADSTALE_off(sv) Perl_SvPADSTALE_off(MUTABLE_SV(sv)) -#define SvTEMP(sv) (SvFLAGS(sv) & SVs_TEMP) -#define SvTEMP_on(sv) (SvFLAGS(sv) |= SVs_TEMP) -#define SvTEMP_off(sv) (SvFLAGS(sv) &= ~SVs_TEMP) +#define SvTEMP(sv) (SvFLAGS(sv) & SVs_TEMP) +#define SvTEMP_on(sv) (SvFLAGS(sv) |= SVs_TEMP) +#define SvTEMP_off(sv) (SvFLAGS(sv) &= ~SVs_TEMP) -#define SvOBJECT(sv) (SvFLAGS(sv) & SVs_OBJECT) -#define SvOBJECT_on(sv) (SvFLAGS(sv) |= SVs_OBJECT) -#define SvOBJECT_off(sv) (SvFLAGS(sv) &= ~SVs_OBJECT) +#define SvOBJECT(sv) (SvFLAGS(sv) & SVs_OBJECT) +#define SvOBJECT_on(sv) (SvFLAGS(sv) |= SVs_OBJECT) +#define SvOBJECT_off(sv) (SvFLAGS(sv) &= ~SVs_OBJECT) /* =for apidoc Am|U32|SvREADONLY|SV* sv @@ -1267,22 +1267,22 @@ object type. Exposed to perl code via Internals::SvREADONLY(). =cut */ -#define SvREADONLY(sv) (SvFLAGS(sv) & (SVf_READONLY|SVf_PROTECT)) +#define SvREADONLY(sv) (SvFLAGS(sv) & (SVf_READONLY|SVf_PROTECT)) #ifdef PERL_CORE -# define SvREADONLY_on(sv) (SvFLAGS(sv) |= (SVf_READONLY|SVf_PROTECT)) -# define SvREADONLY_off(sv) (SvFLAGS(sv) &=~(SVf_READONLY|SVf_PROTECT)) +# define SvREADONLY_on(sv) (SvFLAGS(sv) |= (SVf_READONLY|SVf_PROTECT)) +# define SvREADONLY_off(sv) (SvFLAGS(sv) &=~(SVf_READONLY|SVf_PROTECT)) #else -# define SvREADONLY_on(sv) (SvFLAGS(sv) |= SVf_READONLY) -# define SvREADONLY_off(sv) (SvFLAGS(sv) &= ~SVf_READONLY) +# define SvREADONLY_on(sv) (SvFLAGS(sv) |= SVf_READONLY) +# define SvREADONLY_off(sv) (SvFLAGS(sv) &= ~SVf_READONLY) #endif #define SvSCREAM(sv) \ ((SvFLAGS(sv) & (SVp_SCREAM|SVp_POK)) == (SVp_SCREAM|SVp_POK)) -#define SvSCREAM_on(sv) (SvFLAGS(sv) |= SVp_SCREAM) -#define SvSCREAM_off(sv) (SvFLAGS(sv) &= ~SVp_SCREAM) +#define SvSCREAM_on(sv) (SvFLAGS(sv) |= SVp_SCREAM) +#define SvSCREAM_off(sv) (SvFLAGS(sv) &= ~SVp_SCREAM) #ifndef PERL_CORE -# define SvCOMPILED(sv) 0 +# define SvCOMPILED(sv) 0 # define SvCOMPILED_on(sv) # define SvCOMPILED_off(sv) #endif @@ -1298,7 +1298,7 @@ object type. Exposed to perl code via Internals::SvREADONLY(). ((XPVNV*)SvANY(_svtail))->xnv_u.xnv_bm_tail; \ }) #else -# define SvTAIL(_svtail) (((XPVNV*)SvANY(_svtail))->xnv_u.xnv_bm_tail) +# define SvTAIL(_svtail) (((XPVNV*)SvANY(_svtail))->xnv_u.xnv_bm_tail) #endif /* Does the SV have a Boyer-Moore table attached as magic? 'VALID' @@ -1312,25 +1312,25 @@ object type. Exposed to perl code via Internals::SvREADONLY(). || mg_find(_svvalid, PERL_MAGIC_bm)) \ ) -#define SvRVx(sv) SvRV(sv) +#define SvRVx(sv) SvRV(sv) #ifdef PERL_DEBUG_COW /* Need -0.0 for SvNVX to preserve IEEE FP "negative zero" because +0.0 + -0.0 => +0.0 but -0.0 + -0.0 => -0.0 */ -# define SvIVX(sv) (0 + ((XPVIV*) SvANY(sv))->xiv_iv) -# define SvUVX(sv) (0 + ((XPVUV*) SvANY(sv))->xuv_uv) -# define SvNVX(sv) (-0.0 + ((XPVNV*) SvANY(sv))->xnv_u.xnv_nv) -# define SvRV(sv) (0 + (sv)->sv_u.svu_rv) -# define SvRV_const(sv) (0 + (sv)->sv_u.svu_rv) +# define SvIVX(sv) (0 + ((XPVIV*) SvANY(sv))->xiv_iv) +# define SvUVX(sv) (0 + ((XPVUV*) SvANY(sv))->xuv_uv) +# define SvNVX(sv) (-0.0 + ((XPVNV*) SvANY(sv))->xnv_u.xnv_nv) +# define SvRV(sv) (0 + (sv)->sv_u.svu_rv) +# define SvRV_const(sv) (0 + (sv)->sv_u.svu_rv) /* Don't test the core XS code yet. */ # if defined (PERL_CORE) && PERL_DEBUG_COW > 1 -# define SvPVX(sv) (0 + (assert_(!SvREADONLY(sv)) (sv)->sv_u.svu_pv)) +# define SvPVX(sv) (0 + (assert_(!SvREADONLY(sv)) (sv)->sv_u.svu_pv)) # else -# define SvPVX(sv) SvPVX_mutable(sv) +# define SvPVX(sv) SvPVX_mutable(sv) # endif -# define SvCUR(sv) (0 + ((XPV*) SvANY(sv))->xpv_cur) -# define SvLEN(sv) (0 + ((XPV*) SvANY(sv))->xpv_len) -# define SvEND(sv) ((sv)->sv_u.svu_pv + ((XPV*)SvANY(sv))->xpv_cur) +# define SvCUR(sv) (0 + ((XPV*) SvANY(sv))->xpv_cur) +# define SvLEN(sv) (0 + ((XPV*) SvANY(sv))->xpv_len) +# define SvEND(sv) ((sv)->sv_u.svu_pv + ((XPV*)SvANY(sv))->xpv_cur) # define SvMAGIC(sv) \ (0 + *(assert_(SvTYPE(sv) >= SVt_PVMG) &((XPVMG*) SvANY(sv))->xmg_u.xmg_magic)) @@ -1338,11 +1338,11 @@ object type. Exposed to perl code via Internals::SvREADONLY(). (0 + *(assert_(SvTYPE(sv) >= SVt_PVMG) &((XPVMG*) SvANY(sv))->xmg_stash)) #else /* Below is not PERL_DEBUG_COW */ # ifdef PERL_CORE -# define SvLEN(sv) (0 + ((XPV*) SvANY(sv))->xpv_len) +# define SvLEN(sv) (0 + ((XPV*) SvANY(sv))->xpv_len) # else -# define SvLEN(sv) ((XPV*) SvANY(sv))->xpv_len +# define SvLEN(sv) ((XPV*) SvANY(sv))->xpv_len # endif -# define SvEND(sv) ((sv)->sv_u.svu_pv + ((XPV*)SvANY(sv))->xpv_cur) +# define SvEND(sv) ((sv)->sv_u.svu_pv + ((XPV*)SvANY(sv))->xpv_cur) # if defined (DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS) /* These get expanded inside other macros that already use a variable _sv */ @@ -1418,36 +1418,36 @@ object type. Exposed to perl code via Internals::SvREADONLY(). &(((XPVMG*) MUTABLE_PTR(SvANY(_svstash)))->xmg_stash); \ })) # else /* Below is not DEBUGGING or can't use brace groups */ -# define SvPVX(sv) ((sv)->sv_u.svu_pv) -# define SvCUR(sv) ((XPV*) SvANY(sv))->xpv_cur -# define SvIVX(sv) ((XPVIV*) SvANY(sv))->xiv_iv -# define SvUVX(sv) ((XPVUV*) SvANY(sv))->xuv_uv -# define SvNVX(sv) ((XPVNV*) SvANY(sv))->xnv_u.xnv_nv -# define SvRV(sv) ((sv)->sv_u.svu_rv) -# define SvRV_const(sv) (0 + (sv)->sv_u.svu_rv) -# define SvMAGIC(sv) ((XPVMG*) SvANY(sv))->xmg_u.xmg_magic -# define SvSTASH(sv) ((XPVMG*) SvANY(sv))->xmg_stash +# define SvPVX(sv) ((sv)->sv_u.svu_pv) +# define SvCUR(sv) ((XPV*) SvANY(sv))->xpv_cur +# define SvIVX(sv) ((XPVIV*) SvANY(sv))->xiv_iv +# define SvUVX(sv) ((XPVUV*) SvANY(sv))->xuv_uv +# define SvNVX(sv) ((XPVNV*) SvANY(sv))->xnv_u.xnv_nv +# define SvRV(sv) ((sv)->sv_u.svu_rv) +# define SvRV_const(sv) (0 + (sv)->sv_u.svu_rv) +# define SvMAGIC(sv) ((XPVMG*) SvANY(sv))->xmg_u.xmg_magic +# define SvSTASH(sv) ((XPVMG*) SvANY(sv))->xmg_stash # endif #endif #ifndef PERL_POISON /* Given that these two are new, there can't be any existing code * using them as LVALUEs, so prevent that from happening */ -# define SvPVX_mutable(sv) ((char *)((sv)->sv_u.svu_pv)) -# define SvPVX_const(sv) ((const char*)((sv)->sv_u.svu_pv)) +# define SvPVX_mutable(sv) ((char *)((sv)->sv_u.svu_pv)) +# define SvPVX_const(sv) ((const char*)((sv)->sv_u.svu_pv)) #else /* Except for the poison code, which uses & to scribble over the pointer after free() is called. */ -# define SvPVX_mutable(sv) ((sv)->sv_u.svu_pv) -# define SvPVX_const(sv) ((const char*)((sv)->sv_u.svu_pv)) +# define SvPVX_mutable(sv) ((sv)->sv_u.svu_pv) +# define SvPVX_const(sv) ((const char*)((sv)->sv_u.svu_pv)) #endif -#define SvIVXx(sv) SvIVX(sv) -#define SvUVXx(sv) SvUVX(sv) -#define SvNVXx(sv) SvNVX(sv) -#define SvPVXx(sv) SvPVX(sv) -#define SvLENx(sv) SvLEN(sv) -#define SvENDx(sv) ((PL_Sv = (sv)), SvEND(PL_Sv)) +#define SvIVXx(sv) SvIVX(sv) +#define SvUVXx(sv) SvUVX(sv) +#define SvNVXx(sv) SvNVX(sv) +#define SvPVXx(sv) SvPVX(sv) +#define SvLENx(sv) SvLEN(sv) +#define SvENDx(sv) ((PL_Sv = (sv)), SvEND(PL_Sv)) /* Ask a scalar nicely to try to become an IV, if possible. @@ -1607,7 +1607,7 @@ state, so should only be used as part of a larger operation #endif #ifndef PERL_CORE -# define BmFLAGS(sv) (SvTAIL(sv) ? FBMcf_TAIL : 0) +# define BmFLAGS(sv) (SvTAIL(sv) ? FBMcf_TAIL : 0) #endif #if defined (DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS) @@ -1619,13 +1619,13 @@ state, so should only be used as part of a larger operation &(((XPVIV*) SvANY(_bmuseful))->xiv_u.xivu_iv); \ })) #else -# define BmUSEFUL(sv) ((XPVIV*) SvANY(sv))->xiv_u.xivu_iv +# define BmUSEFUL(sv) ((XPVIV*) SvANY(sv))->xiv_u.xivu_iv #endif #ifndef PERL_CORE -# define BmRARE(sv) 0 -# define BmPREVIOUS(sv) 0 +# define BmRARE(sv) 0 +# define BmPREVIOUS(sv) 0 #endif #define FmLINES(sv) ((XPVIV*) SvANY(sv))->xiv_iv @@ -1637,8 +1637,8 @@ state, so should only be used as part of a larger operation #define LvTARGLEN(sv) ((XPVLV*) SvANY(sv))->xlv_targlen #define LvFLAGS(sv) ((XPVLV*) SvANY(sv))->xlv_flags -#define LVf_NEG_OFF 0x1 -#define LVf_NEG_LEN 0x2 +#define LVf_NEG_OFF 0x1 +#define LVf_NEG_LEN 0x2 #define LVf_OUT_OF_RANGE 0x4 #define IoIFP(sv) (sv)->sv_u.svu_fp @@ -1659,16 +1659,16 @@ state, so should only be used as part of a larger operation #define IoFLAGS(sv) ((XPVIO*) SvANY(sv))->xio_flags /* IoTYPE(sv) is a single character telling the type of I/O connection. */ -#define IoTYPE_RDONLY '<' -#define IoTYPE_WRONLY '>' -#define IoTYPE_RDWR '+' -#define IoTYPE_APPEND 'a' -#define IoTYPE_PIPE '|' -#define IoTYPE_STD '-' /* stdin or stdout */ -#define IoTYPE_SOCKET 's' -#define IoTYPE_CLOSED ' ' -#define IoTYPE_IMPLICIT 'I' /* stdin or stdout or stderr */ -#define IoTYPE_NUMERIC '#' /* fdopen */ +#define IoTYPE_RDONLY '<' +#define IoTYPE_WRONLY '>' +#define IoTYPE_RDWR '+' +#define IoTYPE_APPEND 'a' +#define IoTYPE_PIPE '|' +#define IoTYPE_STD '-' /* stdin or stdout */ +#define IoTYPE_SOCKET 's' +#define IoTYPE_CLOSED ' ' +#define IoTYPE_IMPLICIT 'I' /* stdin or stdout or stderr */ +#define IoTYPE_NUMERIC '#' /* fdopen */ /* =for apidoc_section $tainting @@ -1696,12 +1696,12 @@ attention to precisely which outputs are influenced by which inputs. =cut */ -#define sv_taint(sv) sv_magic((sv), NULL, PERL_MAGIC_taint, NULL, 0) +#define sv_taint(sv) sv_magic((sv), NULL, PERL_MAGIC_taint, NULL, 0) #ifdef NO_TAINT_SUPPORT -# define SvTAINTED(sv) 0 +# define SvTAINTED(sv) 0 #else -# define SvTAINTED(sv) (SvMAGICAL(sv) && sv_tainted(sv)) +# define SvTAINTED(sv) (SvMAGICAL(sv) && sv_tainted(sv)) #endif #define SvTAINTED_on(sv) \ STMT_START{ if(UNLIKELY(TAINTING_get)){sv_taint(sv);} }STMT_END @@ -1954,7 +1954,7 @@ END_EXTERN_C Perl_SvPV_helper(aTHX_ sv, NULL, SV_GMAGIC, SvPVnormal_type_, \ Perl_sv_2pv_flags, FALSE, 0) -#define SvPV_nolen_const(sv) SvPV_flags_const_nolen(sv, SV_GMAGIC) +#define SvPV_nolen_const(sv) SvPV_flags_const_nolen(sv, SV_GMAGIC) #define SvPV(sv, len) SvPV_flags(sv, len, SV_GMAGIC) #define SvPV_const(sv, len) SvPV_flags_const(sv, len, SV_GMAGIC) @@ -2028,45 +2028,45 @@ END_EXTERN_C /* define FOOx(): Before FOO(x) was inlined, these * were idempotent versions of FOO(). */ -#define SvPVx_force(sv, len) sv_pvn_force(sv, &len) -#define SvPVutf8x_force(sv, len) sv_pvutf8n_force(sv, &len) -#define SvPVbytex_force(sv, len) sv_pvbyten_force(sv, &len) +#define SvPVx_force(sv, len) sv_pvn_force(sv, &len) +#define SvPVutf8x_force(sv, len) sv_pvutf8n_force(sv, &len) +#define SvPVbytex_force(sv, len) sv_pvbyten_force(sv, &len) -#define SvTRUEx(sv) SvTRUE(sv) -#define SvTRUEx_nomg(sv) SvTRUE_nomg(sv) -#define SvTRUE_nomg_NN(sv) SvTRUE_common(sv, TRUE) +#define SvTRUEx(sv) SvTRUE(sv) +#define SvTRUEx_nomg(sv) SvTRUE_nomg(sv) +#define SvTRUE_nomg_NN(sv) SvTRUE_common(sv, TRUE) -# define SvIVx(sv) SvIV(sv) -# define SvUVx(sv) SvUV(sv) -# define SvNVx(sv) SvNV(sv) +# define SvIVx(sv) SvIV(sv) +# define SvUVx(sv) SvUV(sv) +# define SvNVx(sv) SvNV(sv) #if defined(PERL_USE_GCC_BRACE_GROUPS) -# define SvPVx(sv, len) ({SV *_sv = (sv); SvPV(_sv, len); }) -# define SvPVx_const(sv, len) ({SV *_sv = (sv); SvPV_const(_sv, len); }) -# define SvPVx_nolen(sv) ({SV *_sv = (sv); SvPV_nolen(_sv); }) -# define SvPVx_nolen_const(sv) ({SV *_sv = (sv); SvPV_nolen_const(_sv); }) -# define SvPVutf8x(sv, len) ({SV *_sv = (sv); SvPVutf8(_sv, len); }) -# define SvPVbytex(sv, len) ({SV *_sv = (sv); SvPVbyte(_sv, len); }) -# define SvPVbytex_nolen(sv) ({SV *_sv = (sv); SvPVbyte_nolen(_sv); }) +# define SvPVx(sv, len) ({SV *_sv = (sv); SvPV(_sv, len); }) +# define SvPVx_const(sv, len) ({SV *_sv = (sv); SvPV_const(_sv, len); }) +# define SvPVx_nolen(sv) ({SV *_sv = (sv); SvPV_nolen(_sv); }) +# define SvPVx_nolen_const(sv) ({SV *_sv = (sv); SvPV_nolen_const(_sv); }) +# define SvPVutf8x(sv, len) ({SV *_sv = (sv); SvPVutf8(_sv, len); }) +# define SvPVbytex(sv, len) ({SV *_sv = (sv); SvPVbyte(_sv, len); }) +# define SvPVbytex_nolen(sv) ({SV *_sv = (sv); SvPVbyte_nolen(_sv); }) #else /* __GNUC__ */ /* These inlined macros use globals, which will require a thread * declaration in user code, so we avoid them under threads */ -# define SvPVx(sv, len) ((PL_Sv = (sv)), SvPV(PL_Sv, len)) -# define SvPVx_const(sv, len) ((PL_Sv = (sv)), SvPV_const(PL_Sv, len)) -# define SvPVx_nolen(sv) ((PL_Sv = (sv)), SvPV_nolen(PL_Sv)) -# define SvPVx_nolen_const(sv) ((PL_Sv = (sv)), SvPV_nolen_const(PL_Sv)) -# define SvPVutf8x(sv, len) ((PL_Sv = (sv)), SvPVutf8(PL_Sv, len)) -# define SvPVbytex(sv, len) ((PL_Sv = (sv)), SvPVbyte(PL_Sv, len)) -# define SvPVbytex_nolen(sv) ((PL_Sv = (sv)), SvPVbyte_nolen(PL_Sv)) +# define SvPVx(sv, len) ((PL_Sv = (sv)), SvPV(PL_Sv, len)) +# define SvPVx_const(sv, len) ((PL_Sv = (sv)), SvPV_const(PL_Sv, len)) +# define SvPVx_nolen(sv) ((PL_Sv = (sv)), SvPV_nolen(PL_Sv)) +# define SvPVx_nolen_const(sv) ((PL_Sv = (sv)), SvPV_nolen_const(PL_Sv)) +# define SvPVutf8x(sv, len) ((PL_Sv = (sv)), SvPVutf8(PL_Sv, len)) +# define SvPVbytex(sv, len) ((PL_Sv = (sv)), SvPVbyte(PL_Sv, len)) +# define SvPVbytex_nolen(sv) ((PL_Sv = (sv)), SvPVbyte_nolen(PL_Sv)) #endif /* __GNU__ */ -#define SvIsCOW(sv) (SvFLAGS(sv) & SVf_IsCOW) -#define SvIsCOW_on(sv) (SvFLAGS(sv) |= SVf_IsCOW) -#define SvIsCOW_off(sv) (SvFLAGS(sv) &= ~(SVf_IsCOW|SVppv_STATIC)) +#define SvIsCOW(sv) (SvFLAGS(sv) & SVf_IsCOW) +#define SvIsCOW_on(sv) (SvFLAGS(sv) |= SVf_IsCOW) +#define SvIsCOW_off(sv) (SvFLAGS(sv) &= ~(SVf_IsCOW|SVppv_STATIC)) #define SvIsCOW_shared_hash(sv) \ ((SvFLAGS(sv) & (SVf_IsCOW|SVppv_STATIC)) == (SVf_IsCOW) && SvLEN(sv) == 0) #define SvIsCOW_static(sv) \ @@ -2080,10 +2080,10 @@ Returns the hash for C created by C>. =cut */ -#define SvSHARED_HASH(sv) (0 + SvSHARED_HEK_FROM_PV(SvPVX_const(sv))->hek_hash) +#define SvSHARED_HASH(sv) (0 + SvSHARED_HEK_FROM_PV(SvPVX_const(sv))->hek_hash) /* flag values for sv_*_flags functions */ -#define SV_UTF8_NO_ENCODING 0 /* No longer used */ +#define SV_UTF8_NO_ENCODING 0 /* No longer used */ /* =for apidoc AmnhD||SV_UTF8_NO_ENCODING @@ -2091,28 +2091,28 @@ Returns the hash for C created by C>. =cut */ -#define SV_IMMEDIATE_UNREF 1 -#define SV_GMAGIC 2 -#define SV_COW_DROP_PV 4 -#define SV_NOSTEAL 16 -#define SV_CONST_RETURN 32 -#define SV_MUTABLE_RETURN 64 -#define SV_SMAGIC 128 -#define SV_HAS_TRAILING_NUL 256 -#define SV_COW_SHARED_HASH_KEYS 512 +#define SV_IMMEDIATE_UNREF 1 +#define SV_GMAGIC 2 +#define SV_COW_DROP_PV 4 +#define SV_NOSTEAL 16 +#define SV_CONST_RETURN 32 +#define SV_MUTABLE_RETURN 64 +#define SV_SMAGIC 128 +#define SV_HAS_TRAILING_NUL 256 +#define SV_COW_SHARED_HASH_KEYS 512 /* This one is only enabled for PERL_OLD_COPY_ON_WRITE */ /* XXX This flag actually enabled for any COW. But it appears not to do anything. Can we just remove it? Or will it serve some future purpose. */ -#define SV_COW_OTHER_PVS 1024 +#define SV_COW_OTHER_PVS 1024 /* Make sv_2pv_flags return NULL if something is undefined. */ -#define SV_UNDEF_RETURNS_NULL 2048 +#define SV_UNDEF_RETURNS_NULL 2048 /* Tell sv_utf8_upgrade() to not check to see if an upgrade * is really needed. This is used when the caller has * already determined it is, and avoids redundant work */ -#define SV_FORCE_UTF8_UPGRADE 4096 +#define SV_FORCE_UTF8_UPGRADE 4096 /* if (after resolving magic etc), the SV is found to be overloaded, * don't call the overload magic, just return as-is */ -#define SV_SKIP_OVERLOAD 8192 +#define SV_SKIP_OVERLOAD 8192 #define SV_CATBYTES 16384 #define SV_CATUTF8 32768 @@ -2126,14 +2126,14 @@ Returns the hash for C created by C>. #endif #ifndef SV_DO_COW_SVSETSV -# define SV_DO_COW_SVSETSV 0 +# define SV_DO_COW_SVSETSV 0 #endif -#define sv_unref(sv) sv_unref_flags(sv, 0) -#define sv_force_normal(sv) sv_force_normal_flags(sv, 0) -#define sv_usepvn(sv, p, l) sv_usepvn_flags(sv, p, l, 0) -#define sv_usepvn_mg(sv, p, l) sv_usepvn_flags(sv, p, l, SV_SMAGIC) +#define sv_unref(sv) sv_unref_flags(sv, 0) +#define sv_force_normal(sv) sv_force_normal_flags(sv, 0) +#define sv_usepvn(sv, p, l) sv_usepvn_flags(sv, p, l, 0) +#define sv_usepvn_mg(sv, p, l) sv_usepvn_flags(sv, p, l, SV_SMAGIC) /* =for apidoc Am|void|SV_CHECK_THINKFIRST_COW_DROP|SV * sv @@ -2158,14 +2158,14 @@ any other encumbrances that would be problematic when changing C. : (SvFLAGS(sv) & CAN_COW_MASK) == CAN_COW_FLAGS \ && SvCUR(sv)+1 < SvLEN(sv)) /* Note: To allow 256 COW "copies", a refcnt of 0 means 1. */ -# define CowREFCNT(sv) (*(U8 *)(SvPVX(sv)+SvLEN(sv)-1)) -# define SV_COW_REFCNT_MAX nBIT_UMAX(sizeof(U8) * CHARBITS) +# define CowREFCNT(sv) (*(U8 *)(SvPVX(sv)+SvLEN(sv)-1)) +# define SV_COW_REFCNT_MAX nBIT_UMAX(sizeof(U8) * CHARBITS) # define CAN_COW_MASK \ (SVf_POK|SVf_ROK|SVp_POK|SVf_FAKE| \ SVf_OOK|SVf_BREAK|SVf_READONLY|SVf_PROTECT) #endif -#define CAN_COW_FLAGS (SVp_POK|SVf_POK) +#define CAN_COW_FLAGS (SVp_POK|SVf_POK) /* =for apidoc Am|void|SV_CHECK_THINKFIRST|SV * sv @@ -2187,51 +2187,51 @@ write that would be immediately written again. /* all these 'functions' are now just macros */ -#define sv_pv(sv) SvPV_nolen(sv) -#define sv_pvutf8(sv) SvPVutf8_nolen(sv) -#define sv_pvbyte(sv) SvPVbyte_nolen(sv) +#define sv_pv(sv) SvPV_nolen(sv) +#define sv_pvutf8(sv) SvPVutf8_nolen(sv) +#define sv_pvbyte(sv) SvPVbyte_nolen(sv) -#define sv_pvn_force_nomg(sv, lp) sv_pvn_force_flags(sv, lp, 0) +#define sv_pvn_force_nomg(sv, lp) sv_pvn_force_flags(sv, lp, 0) #define sv_utf8_upgrade_flags(sv, flags) \ sv_utf8_upgrade_flags_grow(sv, flags, 0) -#define sv_utf8_upgrade_nomg(sv) sv_utf8_upgrade_flags(sv, 0) +#define sv_utf8_upgrade_nomg(sv) sv_utf8_upgrade_flags(sv, 0) #define sv_utf8_downgrade(sv, fail_ok) \ sv_utf8_downgrade_flags(sv, fail_ok, SV_GMAGIC) #define sv_utf8_downgrade_nomg(sv, fail_ok) \ sv_utf8_downgrade_flags(sv, fail_ok, 0) #define sv_catpvn_nomg(dsv, sstr, slen) sv_catpvn_flags(dsv, sstr, slen, 0) -#define sv_catpv_nomg(dsv, sstr) sv_catpv_flags(dsv, sstr, 0) +#define sv_catpv_nomg(dsv, sstr) sv_catpv_flags(dsv, sstr, 0) #define sv_setsv(dsv, ssv) \ sv_setsv_flags(dsv, ssv, SV_GMAGIC|SV_DO_COW_SVSETSV) -#define sv_setsv_nomg(dsv, ssv) sv_setsv_flags(dsv, ssv, SV_DO_COW_SVSETSV) -#define sv_catsv(dsv, ssv) sv_catsv_flags(dsv, ssv, SV_GMAGIC) -#define sv_catsv_nomg(dsv, ssv) sv_catsv_flags(dsv, ssv, 0) -#define sv_catsv_mg(dsv, ssv) sv_catsv_flags(dsv, ssv, SV_GMAGIC|SV_SMAGIC) -#define sv_catpvn(dsv, sstr, slen) sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC) +#define sv_setsv_nomg(dsv, ssv) sv_setsv_flags(dsv, ssv, SV_DO_COW_SVSETSV) +#define sv_catsv(dsv, ssv) sv_catsv_flags(dsv, ssv, SV_GMAGIC) +#define sv_catsv_nomg(dsv, ssv) sv_catsv_flags(dsv, ssv, 0) +#define sv_catsv_mg(dsv, ssv) sv_catsv_flags(dsv, ssv, SV_GMAGIC|SV_SMAGIC) +#define sv_catpvn(dsv, sstr, slen) sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC) #define sv_catpvn_mg(dsv, sstr, slen) \ sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC|SV_SMAGIC); -#define sv_copypv(dsv, ssv) sv_copypv_flags(dsv, ssv, SV_GMAGIC) -#define sv_copypv_nomg(dsv, ssv) sv_copypv_flags(dsv, ssv, 0) -#define sv_2pv(sv, lp) sv_2pv_flags(sv, lp, SV_GMAGIC) -#define sv_2pv_nolen(sv) sv_2pv(sv, 0) -#define sv_2pvbyte(sv, lp) sv_2pvbyte_flags(sv, lp, SV_GMAGIC) -#define sv_2pvbyte_nolen(sv) sv_2pvbyte(sv, 0) -#define sv_2pvutf8(sv, lp) sv_2pvutf8_flags(sv, lp, SV_GMAGIC) -#define sv_2pvutf8_nolen(sv) sv_2pvutf8(sv, 0) -#define sv_2pv_nomg(sv, lp) sv_2pv_flags(sv, lp, 0) -#define sv_pvn_force(sv, lp) sv_pvn_force_flags(sv, lp, SV_GMAGIC) -#define sv_utf8_upgrade(sv) sv_utf8_upgrade_flags(sv, SV_GMAGIC) -#define sv_2iv(sv) sv_2iv_flags(sv, SV_GMAGIC) -#define sv_2uv(sv) sv_2uv_flags(sv, SV_GMAGIC) -#define sv_2nv(sv) sv_2nv_flags(sv, SV_GMAGIC) -#define sv_eq(sv1, sv2) sv_eq_flags(sv1, sv2, SV_GMAGIC) -#define sv_cmp(sv1, sv2) sv_cmp_flags(sv1, sv2, SV_GMAGIC) -#define sv_cmp_locale(sv1, sv2) sv_cmp_locale_flags(sv1, sv2, SV_GMAGIC) -#define sv_numeq(sv1, sv2) sv_numeq_flags(sv1, sv2, SV_GMAGIC) -#define sv_streq(sv1, sv2) sv_streq_flags(sv1, sv2, SV_GMAGIC) -#define sv_collxfrm(sv, nxp) sv_collxfrm_flags(sv, nxp, SV_GMAGIC) -#define sv_2bool(sv) sv_2bool_flags(sv, SV_GMAGIC) -#define sv_2bool_nomg(sv) sv_2bool_flags(sv, 0) +#define sv_copypv(dsv, ssv) sv_copypv_flags(dsv, ssv, SV_GMAGIC) +#define sv_copypv_nomg(dsv, ssv) sv_copypv_flags(dsv, ssv, 0) +#define sv_2pv(sv, lp) sv_2pv_flags(sv, lp, SV_GMAGIC) +#define sv_2pv_nolen(sv) sv_2pv(sv, 0) +#define sv_2pvbyte(sv, lp) sv_2pvbyte_flags(sv, lp, SV_GMAGIC) +#define sv_2pvbyte_nolen(sv) sv_2pvbyte(sv, 0) +#define sv_2pvutf8(sv, lp) sv_2pvutf8_flags(sv, lp, SV_GMAGIC) +#define sv_2pvutf8_nolen(sv) sv_2pvutf8(sv, 0) +#define sv_2pv_nomg(sv, lp) sv_2pv_flags(sv, lp, 0) +#define sv_pvn_force(sv, lp) sv_pvn_force_flags(sv, lp, SV_GMAGIC) +#define sv_utf8_upgrade(sv) sv_utf8_upgrade_flags(sv, SV_GMAGIC) +#define sv_2iv(sv) sv_2iv_flags(sv, SV_GMAGIC) +#define sv_2uv(sv) sv_2uv_flags(sv, SV_GMAGIC) +#define sv_2nv(sv) sv_2nv_flags(sv, SV_GMAGIC) +#define sv_eq(sv1, sv2) sv_eq_flags(sv1, sv2, SV_GMAGIC) +#define sv_cmp(sv1, sv2) sv_cmp_flags(sv1, sv2, SV_GMAGIC) +#define sv_cmp_locale(sv1, sv2) sv_cmp_locale_flags(sv1, sv2, SV_GMAGIC) +#define sv_numeq(sv1, sv2) sv_numeq_flags(sv1, sv2, SV_GMAGIC) +#define sv_streq(sv1, sv2) sv_streq_flags(sv1, sv2, SV_GMAGIC) +#define sv_collxfrm(sv, nxp) sv_collxfrm_flags(sv, nxp, SV_GMAGIC) +#define sv_2bool(sv) sv_2bool_flags(sv, SV_GMAGIC) +#define sv_2bool_nomg(sv) sv_2bool_flags(sv, 0) #define sv_insert(bigstr, offset, len, little, littlelen) \ Perl_sv_insert_flags(aTHX_ (bigstr),(offset), (len), (little), \ (littlelen), SV_GMAGIC) @@ -2275,7 +2275,7 @@ The reference count for the original SV is incremented. =cut */ -#define newRV_inc(sv) newRV(sv) +#define newRV_inc(sv) newRV(sv) /* the following macros update any magic values this C is associated with */ @@ -2342,12 +2342,12 @@ already have a PV buffer allocated, but no SvTHINKFIRST. =cut */ -#define SvPVCLEAR(sv) sv_setpv_bufsize(sv,0,0) -#define SvPVCLEAR_FRESH(sv) sv_setpv_freshbuf(sv) -#define SvSHARE(sv) PL_sharehook(aTHX_ sv) -#define SvLOCK(sv) PL_lockhook(aTHX_ sv) -#define SvUNLOCK(sv) PL_unlockhook(aTHX_ sv) -#define SvDESTROYABLE(sv) PL_destroyhook(aTHX_ sv) +#define SvPVCLEAR(sv) sv_setpv_bufsize(sv,0,0) +#define SvPVCLEAR_FRESH(sv) sv_setpv_freshbuf(sv) +#define SvSHARE(sv) PL_sharehook(aTHX_ sv) +#define SvLOCK(sv) PL_lockhook(aTHX_ sv) +#define SvUNLOCK(sv) PL_unlockhook(aTHX_ sv) +#define SvDESTROYABLE(sv) PL_destroyhook(aTHX_ sv) #define SvSETMAGIC(x) \ STMT_START { if (UNLIKELY(SvSMAGICAL(x))) mg_set(x); } STMT_END @@ -2387,9 +2387,9 @@ already have a PV buffer allocated, but no SvTHINKFIRST. #if !defined(SKIP_DEBUGGING) -#define SvPEEK(sv) sv_peek(sv) +#define SvPEEK(sv) sv_peek(sv) #else -#define SvPEEK(sv) "" +#define SvPEEK(sv) "" #endif /* Is this a per-interpreter immortal SV (rather than global)? These should @@ -2397,10 +2397,10 @@ already have a PV buffer allocated, but no SvTHINKFIRST. * or adjacent elements of PL_sv_immortals[] otherwise. The unsigned * (Size_t) cast avoids the need for a second < 0 condition. */ -#define SvIMMORTAL_INTERP(sv) ((Size_t)((sv) - &PL_sv_yes) < 4) +#define SvIMMORTAL_INTERP(sv) ((Size_t)((sv) - &PL_sv_yes) < 4) /* Does this immortal have a true value? Currently only PL_sv_yes does. */ -#define SvIMMORTAL_TRUE(sv) ((sv) == &PL_sv_yes) +#define SvIMMORTAL_TRUE(sv) ((sv) == &PL_sv_yes) /* the SvREADONLY() test is to quickly reject most SVs */ #define SvIMMORTAL(sv) \ @@ -2409,9 +2409,9 @@ already have a PV buffer allocated, but no SvTHINKFIRST. #ifdef DEBUGGING /* exercise the immortal resurrection code in sv_free2() */ -# define SvREFCNT_IMMORTAL 1000 +# define SvREFCNT_IMMORTAL 1000 #else -# define SvREFCNT_IMMORTAL ((~(U32)0)/2) +# define SvREFCNT_IMMORTAL ((~(U32)0)/2) #endif /* @@ -2424,7 +2424,7 @@ See also C> and C>. =cut */ -#define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no) +#define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no) /* =for apidoc Am|void|sv_setbool|SV *sv|bool b @@ -2439,10 +2439,10 @@ They differ only in that C handles =cut */ -#define sv_setbool(sv, b) sv_setsv(sv, boolSV(b)) -#define sv_setbool_mg(sv, b) sv_setsv_mg(sv, boolSV(b)) +#define sv_setbool(sv, b) sv_setsv(sv, boolSV(b)) +#define sv_setbool_mg(sv, b) sv_setsv_mg(sv, boolSV(b)) -#define isGV(sv) (SvTYPE(sv) == SVt_PVGV) +#define isGV(sv) (SvTYPE(sv) == SVt_PVGV) /* If I give every macro argument a different name, then there won't be bugs where nested macros get confused. Been there, done that. */ /* @@ -2488,16 +2488,16 @@ a GV with a pointer to a GP (glob pointer). # define SvGROW(sv,len) \ (SvIsCOW(sv) || SvLEN(sv) < (len) ? sv_grow(sv,len) : SvPVX(sv)) #else -# define SvGROW(sv,len) (SvLEN(sv) < (len) ? sv_grow(sv,len) : SvPVX(sv)) +# define SvGROW(sv,len) (SvLEN(sv) < (len) ? sv_grow(sv,len) : SvPVX(sv)) #endif #define SvGROW_mutable(sv,len) \ (SvLEN(sv) < (len) ? sv_grow(sv,len) : SvPVX_mutable(sv)) -#define Sv_Grow sv_grow +#define Sv_Grow sv_grow -#define CLONEf_COPY_STACKS 1 +#define CLONEf_COPY_STACKS 1 #define CLONEf_KEEP_PTR_TABLE 2 -#define CLONEf_CLONE_HOST 4 -#define CLONEf_JOIN_IN 8 +#define CLONEf_CLONE_HOST 4 +#define CLONEf_JOIN_IN 8 struct clone_params { AV* stashes; @@ -2509,8 +2509,8 @@ struct clone_params { /* SV_NOSTEAL prevents TEMP buffers being, well, stolen, and saves games with SvTEMP_off and SvTEMP_on round a call to sv_setsv. */ -#define newSVsv(sv) newSVsv_flags((sv), SV_GMAGIC|SV_NOSTEAL) -#define newSVsv_nomg(sv) newSVsv_flags((sv), SV_NOSTEAL) +#define newSVsv(sv) newSVsv_flags((sv), SV_GMAGIC|SV_NOSTEAL) +#define newSVsv_nomg(sv) newSVsv_flags((sv), SV_NOSTEAL) /* =for apidoc Am|SV*|newSVpvn_utf8|const char* s|STRLEN len|U32 utf8 @@ -2532,7 +2532,7 @@ Creates a new SV containing the pad name. =cut */ -#define newSVpadname(pn) newSVpvn_utf8(PadnamePV(pn), PadnameLEN(pn), TRUE) +#define newSVpadname(pn) newSVpvn_utf8(PadnamePV(pn), PadnameLEN(pn), TRUE) /* =for apidoc Am|void|SvOOK_offset|SV*sv|STRLEN len @@ -2598,7 +2598,7 @@ Create a new IO, setting the reference count to 1. =cut */ -#define newIO() MUTABLE_IO(newSV_type(SVt_PVIO)) +#define newIO() MUTABLE_IO(newSV_type(SVt_PVIO)) #if defined(PERL_CORE) || defined(PERL_EXT) @@ -2607,49 +2607,49 @@ Create a new IO, setting the reference count to 1. ? PL_sv_consts[SV_CONST_##name] \ : (PL_sv_consts[SV_CONST_##name] = newSVpv_share(#name, 0)) -# define SV_CONST_TIESCALAR 0 -# define SV_CONST_TIEARRAY 1 -# define SV_CONST_TIEHASH 2 -# define SV_CONST_TIEHANDLE 3 - -# define SV_CONST_FETCH 4 -# define SV_CONST_FETCHSIZE 5 -# define SV_CONST_STORE 6 -# define SV_CONST_STORESIZE 7 -# define SV_CONST_EXISTS 8 - -# define SV_CONST_PUSH 9 -# define SV_CONST_POP 10 -# define SV_CONST_SHIFT 11 -# define SV_CONST_UNSHIFT 12 -# define SV_CONST_SPLICE 13 -# define SV_CONST_EXTEND 14 - -# define SV_CONST_FIRSTKEY 15 -# define SV_CONST_NEXTKEY 16 -# define SV_CONST_SCALAR 17 - -# define SV_CONST_OPEN 18 -# define SV_CONST_WRITE 19 -# define SV_CONST_PRINT 20 -# define SV_CONST_PRINTF 21 -# define SV_CONST_READ 22 -# define SV_CONST_READLINE 23 -# define SV_CONST_GETC 24 -# define SV_CONST_SEEK 25 -# define SV_CONST_TELL 26 -# define SV_CONST_EOF 27 -# define SV_CONST_BINMODE 28 -# define SV_CONST_FILENO 29 -# define SV_CONST_CLOSE 30 - -# define SV_CONST_DELETE 31 -# define SV_CONST_CLEAR 32 -# define SV_CONST_UNTIE 33 -# define SV_CONST_DESTROY 34 +# define SV_CONST_TIESCALAR 0 +# define SV_CONST_TIEARRAY 1 +# define SV_CONST_TIEHASH 2 +# define SV_CONST_TIEHANDLE 3 + +# define SV_CONST_FETCH 4 +# define SV_CONST_FETCHSIZE 5 +# define SV_CONST_STORE 6 +# define SV_CONST_STORESIZE 7 +# define SV_CONST_EXISTS 8 + +# define SV_CONST_PUSH 9 +# define SV_CONST_POP 10 +# define SV_CONST_SHIFT 11 +# define SV_CONST_UNSHIFT 12 +# define SV_CONST_SPLICE 13 +# define SV_CONST_EXTEND 14 + +# define SV_CONST_FIRSTKEY 15 +# define SV_CONST_NEXTKEY 16 +# define SV_CONST_SCALAR 17 + +# define SV_CONST_OPEN 18 +# define SV_CONST_WRITE 19 +# define SV_CONST_PRINT 20 +# define SV_CONST_PRINTF 21 +# define SV_CONST_READ 22 +# define SV_CONST_READLINE 23 +# define SV_CONST_GETC 24 +# define SV_CONST_SEEK 25 +# define SV_CONST_TELL 26 +# define SV_CONST_EOF 27 +# define SV_CONST_BINMODE 28 +# define SV_CONST_FILENO 29 +# define SV_CONST_CLOSE 30 + +# define SV_CONST_DELETE 31 +# define SV_CONST_CLEAR 32 +# define SV_CONST_UNTIE 33 +# define SV_CONST_DESTROY 34 #endif -#define SV_CONSTS_COUNT 35 +#define SV_CONSTS_COUNT 35 /* * Bodyless IVs and NVs! diff --git a/sv_inline.h b/sv_inline.h index e806e5775bac..db00cbb04889 100644 --- a/sv_inline.h +++ b/sv_inline.h @@ -24,15 +24,15 @@ /* The old value was hard coded at 1008. (4096-16) seems to be a bit faster, at least on FreeBSD. YMMV, so experiment. */ #ifndef PERL_ARENA_SIZE -#define PERL_ARENA_SIZE 4080 +#define PERL_ARENA_SIZE 4080 #endif /* All other pre-existing definitions and functions that were * moved into this file originally came from sv.c. */ #ifdef PERL_POISON -# define SvARENA_CHAIN(sv) ((sv)->sv_u.svu_rv) -# define SvARENA_CHAIN_SET(sv,val) (sv)->sv_u.svu_rv = MUTABLE_SV((val)) +# define SvARENA_CHAIN(sv) ((sv)->sv_u.svu_rv) +# define SvARENA_CHAIN_SET(sv,val) (sv)->sv_u.svu_rv = MUTABLE_SV((val)) /* Whilst I'd love to do this, it seems that things like to check on unreferenced scalars # define POISON_SV_HEAD(sv) PoisonNew(sv, 1, struct STRUCT_SV) @@ -41,8 +41,8 @@ PoisonNew(&SvANY(sv), 1, void *), \ PoisonNew(&SvREFCNT(sv), 1, U32) #else -# define SvARENA_CHAIN(sv) SvANY(sv) -# define SvARENA_CHAIN_SET(sv,val) SvANY(sv) = (void *)(val) +# define SvARENA_CHAIN(sv) SvANY(sv) +# define SvARENA_CHAIN_SET(sv,val) SvANY(sv) = (void *)(val) # define POISON_SV_HEAD(sv) #endif @@ -52,8 +52,8 @@ # define MEM_LOG_DEL_SV(sv, file, line, func) \ Perl_mem_log_del_sv(sv, file, line, func) #else -# define MEM_LOG_NEW_SV(sv, file, line, func) NOOP -# define MEM_LOG_DEL_SV(sv, file, line, func) NOOP +# define MEM_LOG_NEW_SV(sv, file, line, func) NOOP +# define MEM_LOG_DEL_SV(sv, file, line, func) NOOP #endif #define uproot_SV(p) \ @@ -102,7 +102,7 @@ S_new_SV(pTHX_ const char *file, int line, const char *func) return sv; } -# define new_SV(p) (p)=S_new_SV(aTHX_ __FILE__, __LINE__, FUNCTION__) +# define new_SV(p) (p)=S_new_SV(aTHX_ __FILE__, __LINE__, FUNCTION__) #else # define new_SV(p) \ @@ -133,7 +133,7 @@ struct body_details { U32 arena_size; /* Size of arena to allocate */ }; -#define ALIGNED_TYPE_NAME(name) name##_aligned +#define ALIGNED_TYPE_NAME(name) name##_aligned #define ALIGNED_TYPE(name) \ typedef union { \ name align_me; \ @@ -151,18 +151,18 @@ ALIGNED_TYPE(XPVCV); ALIGNED_TYPE(XPVFM); ALIGNED_TYPE(XPVIO); -#define HADNV FALSE -#define NONV TRUE +#define HADNV FALSE +#define NONV TRUE #ifdef PURIFY /* With -DPURFIY we allocate everything directly, and don't use arenas. This seems a rather elegant way to simplify some of the code below. */ -#define HASARENA FALSE +#define HASARENA FALSE #else -#define HASARENA TRUE +#define HASARENA TRUE #endif -#define NOARENA FALSE +#define NOARENA FALSE /* Size the arenas to exactly fit a given number of bodies. A count of 0 fits the max number bodies into a PERL_ARENA_SIZE.block, @@ -288,20 +288,20 @@ static const struct body_details bodies_by_type[] = { #ifdef PURIFY #if !(NVSIZE <= IVSIZE) -# define new_XNV() safemalloc(sizeof(XPVNV)) +# define new_XNV() safemalloc(sizeof(XPVNV)) #endif -#define new_XPVNV() safemalloc(sizeof(XPVNV)) -#define new_XPVMG() safemalloc(sizeof(XPVMG)) +#define new_XPVNV() safemalloc(sizeof(XPVNV)) +#define new_XPVMG() safemalloc(sizeof(XPVMG)) -#define del_body_by_type(p, type) safefree(p) +#define del_body_by_type(p, type) safefree(p) #else /* !PURIFY */ #if !(NVSIZE <= IVSIZE) -# define new_XNV() new_body_allocated(SVt_NV) +# define new_XNV() new_body_allocated(SVt_NV) #endif -#define new_XPVNV() new_body_allocated(SVt_PVNV) -#define new_XPVMG() new_body_allocated(SVt_PVMG) +#define new_XPVNV() new_body_allocated(SVt_PVNV) +#define new_XPVMG() new_body_allocated(SVt_PVMG) #define del_body_by_type(p, type) \ del_body(p + bodies_by_type[(type)].offset, \ diff --git a/thread.h b/thread.h index cdaa7db656b9..25fc173dab9e 100644 --- a/thread.h +++ b/thread.h @@ -27,49 +27,49 @@ } \ } STMT_END -# define PERL_GET_CONTEXT Perl_get_context() -# define PERL_SET_CONTEXT(t) Perl_set_context((void*)t) +# define PERL_GET_CONTEXT Perl_get_context() +# define PERL_SET_CONTEXT(t) Perl_set_context((void*)t) # define PTHREAD_GETSPECIFIC_INT # ifdef OEMVS -# define pthread_addr_t void * -# define pthread_create(t,a,s,d) pthread_create(t,&(a),s,d) -# define pthread_keycreate pthread_key_create +# define pthread_addr_t void * +# define pthread_create(t,a,s,d) pthread_create(t,&(a),s,d) +# define pthread_keycreate pthread_key_create # endif # ifdef VMS -# define pthread_attr_init(a) pthread_attr_create(a) +# define pthread_attr_init(a) pthread_attr_create(a) # define PTHREAD_ATTR_SETDETACHSTATE(a,s) pthread_setdetach_np(a,s) -# define PTHREAD_CREATE(t,a,s,d) pthread_create(t,a,s,d) +# define PTHREAD_CREATE(t,a,s,d) pthread_create(t,a,s,d) # define pthread_key_create(k,d) \ pthread_keycreate(k,(pthread_destructor_t)(d)) -# define pthread_mutexattr_init(a) pthread_mutexattr_create(a) -# define pthread_mutexattr_settype(a,t) pthread_mutexattr_setkind_np(a,t) +# define pthread_mutexattr_init(a) pthread_mutexattr_create(a) +# define pthread_mutexattr_settype(a,t) pthread_mutexattr_setkind_np(a,t) # endif # if defined(__hpux) && defined(__ux_version) && __ux_version <= 1020 -# define pthread_attr_init(a) pthread_attr_create(a) +# define pthread_attr_init(a) pthread_attr_create(a) /* XXX pthread_setdetach_np() missing in DCE threads on HP-UX 10.20 */ -# define PTHREAD_ATTR_SETDETACHSTATE(a,s) (0) -# define PTHREAD_CREATE(t,a,s,d) pthread_create(t,a,s,d) +# define PTHREAD_ATTR_SETDETACHSTATE(a,s) (0) +# define PTHREAD_CREATE(t,a,s,d) pthread_create(t,a,s,d) # define pthread_key_create(k,d) \ pthread_keycreate(k,(pthread_destructor_t)(d)) -# define pthread_mutexattr_init(a) pthread_mutexattr_create(a) -# define pthread_mutexattr_settype(a,t) pthread_mutexattr_setkind_np(a,t) +# define pthread_mutexattr_init(a) pthread_mutexattr_create(a) +# define pthread_mutexattr_settype(a,t) pthread_mutexattr_setkind_np(a,t) # endif # if defined(OEMVS) # define PTHREAD_ATTR_SETDETACHSTATE(a,s) \ pthread_attr_setdetachstate(a,&(s)) -# define YIELD pthread_yield(NULL) +# define YIELD pthread_yield(NULL) # endif # endif # if !defined(__hpux) || !defined(__ux_version) || __ux_version > 1020 -# define pthread_mutexattr_default NULL -# define pthread_condattr_default NULL +# define pthread_mutexattr_default NULL +# define pthread_condattr_default NULL # endif #endif #ifndef PTHREAD_CREATE /* You are not supposed to pass NULL as the 2nd arg of PTHREAD_CREATE(). */ -# define PTHREAD_CREATE(t,a,s,d) pthread_create(t,&(a),s,d) +# define PTHREAD_CREATE(t,a,s,d) pthread_create(t,&(a),s,d) #endif #ifndef PTHREAD_ATTR_SETDETACHSTATE @@ -78,18 +78,18 @@ #ifndef PTHREAD_CREATE_JOINABLE # ifdef OLD_PTHREAD_CREATE_JOINABLE -# define PTHREAD_CREATE_JOINABLE OLD_PTHREAD_CREATE_JOINABLE +# define PTHREAD_CREATE_JOINABLE OLD_PTHREAD_CREATE_JOINABLE # else -# define PTHREAD_CREATE_JOINABLE 0 /* Panic? No, guess. */ +# define PTHREAD_CREATE_JOINABLE 0 /* Panic? No, guess. */ # endif #endif #ifdef __VMS /* Default is 1024 on VAX, 8192 otherwise */ # ifdef __ia64 -# define THREAD_CREATE_NEEDS_STACK (48*1024) +# define THREAD_CREATE_NEEDS_STACK (48*1024) # else -# define THREAD_CREATE_NEEDS_STACK (32*1024) +# define THREAD_CREATE_NEEDS_STACK (32*1024) # endif #endif @@ -110,8 +110,8 @@ } \ } STMT_END -#define MUTEX_LOCK(m) mutex_lock(*m) -#define MUTEX_UNLOCK(m) mutex_unlock(*m) +#define MUTEX_LOCK(m) mutex_lock(*m) +#define MUTEX_UNLOCK(m) mutex_unlock(*m) #define MUTEX_DESTROY(m) \ STMT_START { \ mutex_free(*m); \ @@ -130,40 +130,40 @@ } \ } STMT_END -#define COND_SIGNAL(c) condition_signal(*c) -#define COND_BROADCAST(c) condition_broadcast(*c) -#define COND_WAIT(c, m) condition_wait(*c, *m) +#define COND_SIGNAL(c) condition_signal(*c) +#define COND_BROADCAST(c) condition_broadcast(*c) +#define COND_WAIT(c, m) condition_wait(*c, *m) #define COND_DESTROY(c) \ STMT_START { \ condition_free(*c); \ *c = 0; \ } STMT_END -#define THREAD_RET_TYPE any_t +#define THREAD_RET_TYPE any_t -#define DETACH(t) cthread_detach(t->self) -#define JOIN(t, avp) (*(avp) = MUTABLE_AV(cthread_join(t->self))) +#define DETACH(t) cthread_detach(t->self) +#define JOIN(t, avp) (*(avp) = MUTABLE_AV(cthread_join(t->self))) -#define PERL_SET_CONTEXT(t) cthread_set_data(cthread_self(), t) -#define PERL_GET_CONTEXT cthread_data(cthread_self()) +#define PERL_SET_CONTEXT(t) cthread_set_data(cthread_self(), t) +#define PERL_GET_CONTEXT cthread_data(cthread_self()) -#define INIT_THREADS cthread_init() -#define YIELD cthread_yield() -#define ALLOC_THREAD_KEY NOOP -#define FREE_THREAD_KEY NOOP -#define SET_THREAD_SELF(thr) (thr->self = cthread_self()) +#define INIT_THREADS cthread_init() +#define YIELD cthread_yield() +#define ALLOC_THREAD_KEY NOOP +#define FREE_THREAD_KEY NOOP +#define SET_THREAD_SELF(thr) (thr->self = cthread_self()) #endif /* I_MACH_CTHREADS */ #ifndef YIELD # ifdef SCHED_YIELD -# define YIELD SCHED_YIELD +# define YIELD SCHED_YIELD # elif defined(HAS_SCHED_YIELD) -# define YIELD sched_yield() +# define YIELD sched_yield() # elif defined(HAS_PTHREAD_YIELD) /* pthread_yield(NULL) platforms are expected to * have #defined YIELD for themselves. */ -# define YIELD pthread_yield() +# define YIELD pthread_yield() # endif #endif @@ -194,10 +194,10 @@ # endif # ifdef PERL_TSA_ACTIVE -# define perl_pthread_mutex_lock(m) perl_tsa_mutex_lock(m) +# define perl_pthread_mutex_lock(m) perl_tsa_mutex_lock(m) # define perl_pthread_mutex_unlock(m) perl_tsa_mutex_unlock(m) # else -# define perl_pthread_mutex_lock(m) pthread_mutex_lock(m) +# define perl_pthread_mutex_lock(m) pthread_mutex_lock(m) # define perl_pthread_mutex_unlock(m) pthread_mutex_unlock(m) # endif @@ -378,9 +378,9 @@ #endif #ifdef HAS_PTHREAD_UNCHECKED_GETSPECIFIC_NP -# define PTHREAD_GETSPECIFIC(key) pthread_unchecked_getspecific_np(key) +# define PTHREAD_GETSPECIFIC(key) pthread_unchecked_getspecific_np(key) #else -# define PTHREAD_GETSPECIFIC(key) pthread_getspecific(key) +# define PTHREAD_GETSPECIFIC(key) pthread_getspecific(key) #endif #if defined(PERL_THREAD_LOCAL) && !defined(PERL_GET_CONTEXT) && !defined(PERL_SET_CONTEXT) && !defined(__cplusplus) @@ -396,7 +396,7 @@ # define PERL_USE_THREAD_LOCAL extern PERL_THREAD_LOCAL void *PL_current_context; -# define PERL_GET_CONTEXT PL_current_context +# define PERL_GET_CONTEXT PL_current_context /* We must also call pthread_setspecific() always, as C++ code has * to read it with pthreads (the #else side just below) */ @@ -415,7 +415,7 @@ extern PERL_THREAD_LOCAL void *PL_current_context; /* else fall back to pthreads */ # ifndef PERL_GET_CONTEXT -# define PERL_GET_CONTEXT PTHREAD_GETSPECIFIC(PL_thr_key) +# define PERL_GET_CONTEXT PTHREAD_GETSPECIFIC(PL_thr_key) # endif /* For C++ extensions built on a system where the C compiler provides thread @@ -425,13 +425,13 @@ extern PERL_THREAD_LOCAL void *PL_current_context; * thread local storage. PERL_SET_CONTEXT is not called that often. */ # ifndef PERL_SET_CONTEXT -# define PERL_SET_CONTEXT(t) Perl_set_context((void*)t) +# define PERL_SET_CONTEXT(t) Perl_set_context((void*)t) # endif /* PERL_SET_CONTEXT */ #endif /* PERL_THREAD_LOCAL */ #ifndef INIT_THREADS # ifdef NEED_PTHREAD_INIT -# define INIT_THREADS pthread_init() +# define INIT_THREADS pthread_init() # endif #endif @@ -463,82 +463,82 @@ extern PERL_THREAD_LOCAL void *PL_current_context; #endif #ifndef THREAD_RET_TYPE -# define THREAD_RET_TYPE void * +# define THREAD_RET_TYPE void * #endif /* THREAD_RET */ -# define LOCK_DOLLARZERO_MUTEX MUTEX_LOCK(&PL_dollarzero_mutex) -# define UNLOCK_DOLLARZERO_MUTEX MUTEX_UNLOCK(&PL_dollarzero_mutex) +# define LOCK_DOLLARZERO_MUTEX MUTEX_LOCK(&PL_dollarzero_mutex) +# define UNLOCK_DOLLARZERO_MUTEX MUTEX_UNLOCK(&PL_dollarzero_mutex) #endif /* USE_ITHREADS */ #ifndef MUTEX_LOCK -# define MUTEX_LOCK(m) NOOP +# define MUTEX_LOCK(m) NOOP #endif #ifndef MUTEX_UNLOCK -# define MUTEX_UNLOCK(m) NOOP +# define MUTEX_UNLOCK(m) NOOP #endif #ifndef MUTEX_INIT -# define MUTEX_INIT(m) NOOP +# define MUTEX_INIT(m) NOOP #endif #ifndef MUTEX_DESTROY -# define MUTEX_DESTROY(m) NOOP +# define MUTEX_DESTROY(m) NOOP #endif #ifndef COND_INIT -# define COND_INIT(c) NOOP +# define COND_INIT(c) NOOP #endif #ifndef COND_SIGNAL -# define COND_SIGNAL(c) NOOP +# define COND_SIGNAL(c) NOOP #endif #ifndef COND_BROADCAST -# define COND_BROADCAST(c) NOOP +# define COND_BROADCAST(c) NOOP #endif #ifndef COND_WAIT -# define COND_WAIT(c, m) NOOP +# define COND_WAIT(c, m) NOOP #endif #ifndef COND_DESTROY -# define COND_DESTROY(c) NOOP +# define COND_DESTROY(c) NOOP #endif #ifndef PERL_READ_LOCK -# define PERL_READ_LOCK NOOP -# define PERL_READ_UNLOCK NOOP -# define PERL_WRITE_LOCK NOOP -# define PERL_WRITE_UNLOCK NOOP -# define PERL_RW_MUTEX_INIT NOOP -# define PERL_RW_MUTEX_DESTROY NOOP +# define PERL_READ_LOCK NOOP +# define PERL_READ_UNLOCK NOOP +# define PERL_WRITE_LOCK NOOP +# define PERL_WRITE_UNLOCK NOOP +# define PERL_RW_MUTEX_INIT NOOP +# define PERL_RW_MUTEX_DESTROY NOOP #endif #ifndef LOCK_DOLLARZERO_MUTEX -# define LOCK_DOLLARZERO_MUTEX NOOP +# define LOCK_DOLLARZERO_MUTEX NOOP #endif #ifndef UNLOCK_DOLLARZERO_MUTEX -# define UNLOCK_DOLLARZERO_MUTEX NOOP +# define UNLOCK_DOLLARZERO_MUTEX NOOP #endif /* THR, SET_THR, and dTHR are there for compatibility with old versions */ #ifndef THR -# define THR PERL_GET_THX +# define THR PERL_GET_THX #endif #ifndef SET_THR -# define SET_THR(t) PERL_SET_THX(t) +# define SET_THR(t) PERL_SET_THX(t) #endif #ifndef dTHR -# define dTHR dNOOP +# define dTHR dNOOP #endif #ifndef INIT_THREADS -# define INIT_THREADS NOOP +# define INIT_THREADS NOOP #endif /* diff --git a/time64.h b/time64.h index 8064ae7cf1a9..aeb4fe897a11 100644 --- a/time64.h +++ b/time64.h @@ -35,9 +35,9 @@ struct TM64 { /* Decide which tm struct to use */ #ifdef USE_TM64 -#define TM TM64 +#define TM TM64 #else -#define TM tm +#define TM tm #endif diff --git a/unixish.h b/unixish.h index 13dbaef92fc8..000adde9ba48 100644 --- a/unixish.h +++ b/unixish.h @@ -19,24 +19,24 @@ /* HAS_IOCTL: This symbol, if defined, indicates that the ioctl() * routine is available to set I/O characteristics */ -#define HAS_IOCTL /**/ +#define HAS_IOCTL /**/ /* HAS_UTIME: This symbol, if defined, indicates that the routine utime() * is available to update the access and modification times of files. */ -#define HAS_UTIME /**/ +#define HAS_UTIME /**/ /* HAS_GROUP This symbol, if defined, indicates that the getgrnam() * and getgrgid() routines are available to get group entries. The * getgrent() has a separate definition, HAS_GETGRENT. */ -#define HAS_GROUP /**/ +#define HAS_GROUP /**/ /* HAS_PASSWD This symbol, if defined, indicates that the getpwnam() * and getpwuid() routines are available to get password entries. * The getpwent() has a separate definition, HAS_GETPWENT. */ -#define HAS_PASSWD /**/ +#define HAS_PASSWD /**/ #define HAS_KILL #define HAS_WAIT @@ -54,7 +54,7 @@ * returned by stat(). It's usually just struct stat. It may be necessary to * include and to get any typedef'ed information. */ -#define Stat_t struct stat +#define Stat_t struct stat /* USE_STAT_RDEV: This symbol is defined if this system * has a stat structure declaring st_rdev @@ -93,12 +93,12 @@ # include #ifndef SIGABRT -# define SIGABRT SIGILL +# define SIGABRT SIGILL #endif #ifndef SIGILL -# define SIGILL 6 /* blech */ +# define SIGILL 6 /* blech */ #endif -#define ABORT() kill(PerlProc_getpid(),SIGABRT); +#define ABORT() kill(PerlProc_getpid(),SIGABRT); /* * fwrite1() should be a routine with the same calling sequence as @@ -106,21 +106,21 @@ * stream (unlike fwrite() itself, which on some systems outputs several * distinct records if the number_of_items parameter is >1). */ -#define fwrite1 fwrite +#define fwrite1 fwrite -#define Stat(fname,bufptr) stat((fname),(bufptr)) +#define Stat(fname,bufptr) stat((fname),(bufptr)) #ifdef __amigaos4__ int afstat(int fd, struct stat *statb); -# define Fstat(fd,bufptr) afstat((fd),(bufptr)) +# define Fstat(fd,bufptr) afstat((fd),(bufptr)) #endif #ifndef Fstat -# define Fstat(fd,bufptr) fstat((fd),(bufptr)) +# define Fstat(fd,bufptr) fstat((fd),(bufptr)) #endif -#define Fflush(fp) fflush(fp) -#define Mkdir(path,mode) mkdir((path),(mode)) +#define Fflush(fp) fflush(fp) +#define Mkdir(path,mode) mkdir((path),(mode)) #if defined(__amigaos4__) # define PLATFORM_SYS_TERM_ amigaos4_dispose_fork_array() @@ -154,9 +154,9 @@ int afstat(int fd, struct stat *statb); PLATFORM_SYS_TERM_; #endif -#define BIT_BUCKET "/dev/null" +#define BIT_BUCKET "/dev/null" -#define dXSUB_SYS dNOOP +#define dXSUB_SYS dNOOP #ifndef NO_ENVIRON_ARRAY #define USE_ENVIRON_ARRAY diff --git a/utf8.h b/utf8.h index d8e0d42a482f..7413e384e5c0 100644 --- a/utf8.h +++ b/utf8.h @@ -31,7 +31,7 @@ */ #ifndef PERL_UTF8_H_ /* Guard against recursive inclusion */ -#define PERL_UTF8_H_ 1 +#define PERL_UTF8_H_ 1 /* =for apidoc Ay||utf8ness_t @@ -113,18 +113,18 @@ typedef enum { /* Use UTF-8 as the default script encoding? Turning this on will break scripts * having non-UTF-8 binary data (such as Latin-1) in string literals. */ #ifdef USE_UTF8_SCRIPTS -# define USE_UTF8_IN_NAMES (!IN_BYTES) +# define USE_UTF8_IN_NAMES (!IN_BYTES) #else -# define USE_UTF8_IN_NAMES (PL_hints & HINT_UTF8) +# define USE_UTF8_IN_NAMES (PL_hints & HINT_UTF8) #endif #include "regcharclass.h" #include "unicode_constants.h" /* For to_utf8_fold_flags, q.v. */ -#define FOLD_FLAGS_LOCALE 0x1 -#define FOLD_FLAGS_FULL 0x2 -#define FOLD_FLAGS_NOMIX_ASCII 0x4 +#define FOLD_FLAGS_LOCALE 0x1 +#define FOLD_FLAGS_FULL 0x2 +#define FOLD_FLAGS_NOMIX_ASCII 0x4 /* =for apidoc is_ascii_string @@ -168,16 +168,16 @@ indicates under what conditions the string is invariant. #define utf8_to_utf16_reversed(p, d, bytelen, newlen) \ utf8_to_utf16_base(p, d, bytelen, newlen, 1, 0) -#define to_uni_fold(c, p, lenp) _to_uni_fold_flags(c, p, lenp, FOLD_FLAGS_FULL) +#define to_uni_fold(c, p, lenp) _to_uni_fold_flags(c, p, lenp, FOLD_FLAGS_FULL) #define foldEQ_utf8(s1, pe1, l1, u1, s2, pe2, l2, u2) \ foldEQ_utf8_flags(s1, pe1, l1, u1, s2, pe2, l2, u2, 0) -#define FOLDEQ_UTF8_NOMIX_ASCII (1 << 0) -#define FOLDEQ_LOCALE (1 << 1) -#define FOLDEQ_S1_ALREADY_FOLDED (1 << 2) -#define FOLDEQ_S2_ALREADY_FOLDED (1 << 3) -#define FOLDEQ_S1_FOLDS_SANE (1 << 4) -#define FOLDEQ_S2_FOLDS_SANE (1 << 5) +#define FOLDEQ_UTF8_NOMIX_ASCII (1 << 0) +#define FOLDEQ_LOCALE (1 << 1) +#define FOLDEQ_S1_ALREADY_FOLDED (1 << 2) +#define FOLDEQ_S2_ALREADY_FOLDED (1 << 3) +#define FOLDEQ_S1_FOLDS_SANE (1 << 4) +#define FOLDEQ_S2_FOLDS_SANE (1 << 5) /* This will be described more fully below, but it turns out that the * fundamental difference between UTF-8 and UTF-EBCDIC is that the former has @@ -186,10 +186,10 @@ indicates under what conditions the string is invariant. * * It is helpful to know the EBCDIC value on ASCII platforms, mainly to avoid * some #ifdef's */ -#define UTF_EBCDIC_CONTINUATION_BYTE_INFO_BITS 5 +#define UTF_EBCDIC_CONTINUATION_BYTE_INFO_BITS 5 /* See explanation below at 'UTF8_MAXBYTES' */ -#define ASCII_PLATFORM_UTF8_MAXBYTES 13 +#define ASCII_PLATFORM_UTF8_MAXBYTES 13 #ifdef EBCDIC @@ -276,8 +276,8 @@ input, adding no time nor space requirements to the implementation. =cut */ -#define NATIVE_TO_LATIN1(ch) (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) (ch))) -#define LATIN1_TO_NATIVE(ch) (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) (ch))) +#define NATIVE_TO_LATIN1(ch) (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) (ch))) +#define LATIN1_TO_NATIVE(ch) (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) (ch))) /* I8 is an intermediate version of UTF-8 used only in UTF-EBCDIC. We thus * consider it to be identical to UTF-8 on ASCII platforms. Strictly speaking @@ -285,11 +285,11 @@ input, adding no time nor space requirements to the implementation. * because they are 8-bit encodings that serve the same purpose in Perl, and * rarely do we need to distinguish them. The term "NATIVE_UTF8" applies to * whichever one is applicable on the current platform */ -#define NATIVE_UTF8_TO_I8(ch) (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) (ch))) -#define I8_TO_NATIVE_UTF8(ch) (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) (ch))) +#define NATIVE_UTF8_TO_I8(ch) (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) (ch))) +#define I8_TO_NATIVE_UTF8(ch) (__ASSERT_(FITS_IN_8_BITS(ch)) ((U8) (ch))) -#define UNI_TO_NATIVE(ch) ((UV) ASSERT_NOT_PTR(ch)) -#define NATIVE_TO_UNI(ch) ((UV) ASSERT_NOT_PTR(ch)) +#define UNI_TO_NATIVE(ch) ((UV) ASSERT_NOT_PTR(ch)) +#define NATIVE_TO_UNI(ch) ((UV) ASSERT_NOT_PTR(ch)) /* @@ -347,11 +347,11 @@ are in the character. */ * UTF-8 encoded sequence contributes to the specification of the * code point. In the bit maps above, you see that the first 2 * bits are a constant '10', leaving 6 of real information */ -# define UTF_CONTINUATION_BYTE_INFO_BITS 6 +# define UTF_CONTINUATION_BYTE_INFO_BITS 6 /* ^? is defined to be DEL on ASCII systems. See * the definition of toCTRL() for more */ -# define QUESTION_MARK_CTRL DEL_NATIVE +# define QUESTION_MARK_CTRL DEL_NATIVE #endif /* EBCDIC vs ASCII */ @@ -364,7 +364,7 @@ are in the character. */ /* Since the significant bits in a continuation byte are stored in * the least-significant positions, we often find ourselves shifting * by that amount. This is a clearer name in such situations */ -#define UTF_ACCUMULATION_SHIFT UTF_CONTINUATION_BYTE_INFO_BITS +#define UTF_ACCUMULATION_SHIFT UTF_CONTINUATION_BYTE_INFO_BITS /* 2**info_bits - 1. This masks out all but the bits that * carry real information in a continuation byte. This @@ -384,7 +384,7 @@ are in the character. */ #define UTF_CONTINUATION_MARK (UTF_IS_CONTINUATION_MASK & 0xB0) /* This value is clearer in some contexts */ -#define UTF_MIN_CONTINUATION_BYTE UTF_CONTINUATION_MARK +#define UTF_MIN_CONTINUATION_BYTE UTF_CONTINUATION_MARK /* Is the byte 'c' part of a multi-byte UTF8-8 encoded * sequence, and not the first byte thereof? */ @@ -409,7 +409,7 @@ C is Unicode if above 255; otherwise is platform-native. =cut */ -#define UVCHR_IS_INVARIANT(cp) (OFFUNI_IS_INVARIANT(NATIVE_TO_UNI(cp))) +#define UVCHR_IS_INVARIANT(cp) (OFFUNI_IS_INVARIANT(NATIVE_TO_UNI(cp))) /* This defines the 1-bits that are to be in the first byte of a multi-byte * UTF-8 encoded character that mark it as a start byte and give the number @@ -421,7 +421,7 @@ C is Unicode if above 255; otherwise is platform-native. * This is not to be used on a single-byte character. As in many places in * perl, U8 must be 8 bits */ -#define UTF_START_MARK(len) ((U8) ~(0xFF >> (len))) +#define UTF_START_MARK(len) ((U8) ~(0xFF >> (len))) /* Masks out the initial one bits in a start byte, leaving the following 0 bit * and the real data bits. 'len' is the number of bytes in the multi-byte @@ -433,7 +433,7 @@ C is Unicode if above 255; otherwise is platform-native. * byte; and all the real data bits will be returned: len = 1 => 0b0111_1111 * This isn't true on EBCDIC platforms, where some len=1 bytes are of the form * 0b101x_xxxx, so this can't be used there on single-byte characters. */ -#define UTF_START_MASK(len) (0xFF >> (len)) +#define UTF_START_MASK(len) (0xFF >> (len)) /* @@ -543,15 +543,15 @@ code point if less than 255; a Unicode code point otherwise. =cut */ -#define UVCHR_SKIP(uv) OFFUNISKIP(NATIVE_TO_UNI(uv)) +#define UVCHR_SKIP(uv) OFFUNISKIP(NATIVE_TO_UNI(uv)) -#define NATIVE_SKIP(uv) UVCHR_SKIP(uv) /* Old terminology */ +#define NATIVE_SKIP(uv) UVCHR_SKIP(uv) /* Old terminology */ /* Most code which says UNISKIP is really thinking in terms of native * code points (0-255) plus all those beyond. This is an imprecise * term, but having it means existing code continues to work. For * precision, use UVCHR_SKIP, NATIVE_SKIP, or OFFUNISKIP */ -#define UNISKIP(uv) UVCHR_SKIP(uv) +#define UNISKIP(uv) UVCHR_SKIP(uv) /* Compute the start byte for a given code point. This requires the log2 of * the code point, which is hard to compute at compile time, which this @@ -592,7 +592,7 @@ code point if less than 255; a Unicode code point otherwise. & ((uv) >> ((((bits) / UTF_CONTINUATION_BYTE_INFO_BITS) - 1) \ * UTF_CONTINUATION_BYTE_INFO_BITS)))) -#define UTF_MIN_START_BYTE UTF_START_BYTE(UTF_MIN_CONTINUATION_BYTE, 8) +#define UTF_MIN_START_BYTE UTF_START_BYTE(UTF_MIN_CONTINUATION_BYTE, 8) /* Is the byte 'c' the first byte of a multi-byte UTF8-8 encoded * sequence? This excludes invariants (they are single-byte). It also @@ -607,10 +607,10 @@ code point if less than 255; a Unicode code point otherwise. # define UTF8_IS_START(c) \ (UTF8_IS_START_base(c) && (c) != I8_TO_NATIVE_UTF8(0xE0)) #else -# define UTF8_IS_START(c) UTF8_IS_START_base(c) +# define UTF8_IS_START(c) UTF8_IS_START_base(c) #endif -#define UTF_MIN_ABOVE_LATIN1_BYTE UTF_START_BYTE(0x100, 9) +#define UTF_MIN_ABOVE_LATIN1_BYTE UTF_START_BYTE(0x100, 9) /* Is the UTF8-encoded byte 'c' the first byte of a sequence * of bytes that represent a code point > 255? */ @@ -634,7 +634,7 @@ code point if less than 255; a Unicode code point otherwise. * Squeezing out the bits that don't contribute to the value, these evaluate * to: 1_1111 xx_xxxx in UTF-8, and 1_1111 y_yyyy in UTF-EBCDIC I8. or, the * maximum value of an unsigned with (5 + info_bit_count) bits */ -#define MAX_UTF8_TWO_BYTE nBIT_UMAX(5 + UTF_CONTINUATION_BYTE_INFO_BITS) +#define MAX_UTF8_TWO_BYTE nBIT_UMAX(5 + UTF_CONTINUATION_BYTE_INFO_BITS) /* The largest code point representable by two UTF-8 * bytes on any platform that Perl runs on. */ @@ -670,15 +670,15 @@ can uppercase/lowercase/titlecase/fold into. /* In domain restricted to ASCII, these may make more sense * to the reader than the ones with Latin1 in the name */ -#define NATIVE_TO_ASCII(ch) NATIVE_TO_LATIN1(ch) -#define ASCII_TO_NATIVE(ch) LATIN1_TO_NATIVE(ch) +#define NATIVE_TO_ASCII(ch) NATIVE_TO_LATIN1(ch) +#define ASCII_TO_NATIVE(ch) LATIN1_TO_NATIVE(ch) /* More or less misleadingly-named defines, retained for back compat */ -#define NATIVE_TO_UTF(ch) NATIVE_UTF8_TO_I8(ch) -#define NATIVE_TO_I8(ch) NATIVE_UTF8_TO_I8(ch) -#define UTF_TO_NATIVE(ch) I8_TO_NATIVE_UTF8(ch) -#define I8_TO_NATIVE(ch) I8_TO_NATIVE_UTF8(ch) -#define NATIVE8_TO_UNI(ch) NATIVE_TO_LATIN1(ch) +#define NATIVE_TO_UTF(ch) NATIVE_UTF8_TO_I8(ch) +#define NATIVE_TO_I8(ch) NATIVE_UTF8_TO_I8(ch) +#define UTF_TO_NATIVE(ch) I8_TO_NATIVE_UTF8(ch) +#define I8_TO_NATIVE(ch) I8_TO_NATIVE_UTF8(ch) +#define NATIVE8_TO_UNI(ch) NATIVE_TO_LATIN1(ch) /* Adds a UTF8 continuation byte 'new' of information to a running total code * point 'old' of all the continuation bytes so far. This is designed to be @@ -699,7 +699,7 @@ can uppercase/lowercase/titlecase/fold into. && UTF8_IS_CONTINUATION(*((s)+1))) /* Longer, but more accurate name */ -#define UTF8_IS_ABOVE_LATIN1_START(c) UTF8_IS_ABOVE_LATIN1(c) +#define UTF8_IS_ABOVE_LATIN1_START(c) UTF8_IS_ABOVE_LATIN1(c) /* Convert a UTF-8 variant Latin1 character to a native code point * value. Needs just one iteration of accumulate. Should be used only @@ -755,7 +755,7 @@ the chance of accessing beyond the end of the input buffer. =cut */ -#define UTF8SKIP(s) PL_utf8skip[*(const U8*)(ASSERT_IS_PTR(s))] +#define UTF8SKIP(s) PL_utf8skip[*(const U8*)(ASSERT_IS_PTR(s))] /* =for apidoc Am|STRLEN|UTF8_SKIP|char* s @@ -764,7 +764,7 @@ This is a synonym for C> =cut */ -#define UTF8_SKIP(s) UTF8SKIP(s) +#define UTF8_SKIP(s) UTF8SKIP(s) /* =for apidoc Am|STRLEN|UTF8_CHK_SKIP|char* s @@ -806,7 +806,7 @@ returns beyond C. On DEBUGGING builds, it asserts that S= e>>. /* Most code that says 'UNI_' really means the native * value for code points up through 255 */ -#define UNI_IS_INVARIANT(cp) UVCHR_IS_INVARIANT(cp) +#define UNI_IS_INVARIANT(cp) UVCHR_IS_INVARIANT(cp) /* =for apidoc Am|bool|UTF8_IS_INVARIANT|char c @@ -827,11 +827,11 @@ that it returns TRUE in each for the exact same set of bit patterns. It is valid on a subset of what UVCHR_IS_INVARIANT is valid on, so can just use that; and the compiler should optimize out anything extraneous given the implementation of the latter. */ -#define UTF8_IS_INVARIANT(c) UVCHR_IS_INVARIANT(ASSERT_NOT_PTR(c)) +#define UTF8_IS_INVARIANT(c) UVCHR_IS_INVARIANT(ASSERT_NOT_PTR(c)) /* Like the above, but its name implies a non-UTF8 input, which as the * comments above show, doesn't matter as to its implementation */ -#define NATIVE_BYTE_IS_INVARIANT(c) UVCHR_IS_INVARIANT(c) +#define NATIVE_BYTE_IS_INVARIANT(c) UVCHR_IS_INVARIANT(c) /* Misleadingly named: is the UTF8-encoded byte 'c' part of a variant * sequence in UTF-8? This is the inverse of UTF8_IS_INVARIANT. */ @@ -888,7 +888,7 @@ implementation of the latter. */ /* This is illegal in any well-formed UTF-8 in both EBCDIC * and ASCII as it is only in overlongs. */ -#define ILLEGAL_UTF8_BYTE I8_TO_NATIVE_UTF8(0xC1) +#define ILLEGAL_UTF8_BYTE I8_TO_NATIVE_UTF8(0xC1) /* * 'UTF' is whether or not p is encoded in UTF8. The names 'foo_lazy_if' @@ -907,12 +907,12 @@ implementation of the latter. */ : isWORDCHAR_utf8_safe((U8 *) p, (U8 *) e)) #define isALNUM_lazy_if_safe(p, e, UTF) isWORDCHAR_lazy_if_safe(p, e, UTF) -#define UTF8_MAXLEN UTF8_MAXBYTES +#define UTF8_MAXLEN UTF8_MAXBYTES /* A Unicode character can fold to up to 3 characters */ -#define UTF8_MAX_FOLD_CHAR_EXPAND 3 +#define UTF8_MAX_FOLD_CHAR_EXPAND 3 -#define IN_BYTES UNLIKELY(CopHINTS_get(PL_curcop) & HINT_BYTES) +#define IN_BYTES UNLIKELY(CopHINTS_get(PL_curcop) & HINT_BYTES) /* @@ -925,7 +925,7 @@ case any call to string overloading updates the internal UTF-8 encoding flag. =cut */ -#define DO_UTF8(sv) (SvUTF8(sv) && !IN_BYTES) +#define DO_UTF8(sv) (SvUTF8(sv) && !IN_BYTES) /* Should all strings be treated as Unicode, and not just UTF-8 * encoded ones? Is so within 'feature unicode_strings' or @@ -938,8 +938,8 @@ case any call to string overloading updates the internal UTF-8 encoding flag. && _is_in_locale_category(FALSE, -1))) \ && (! IN_BYTES)) -#define UNICODE_SURROGATE_FIRST 0xD800 -#define UNICODE_SURROGATE_LAST 0xDFFF +#define UNICODE_SURROGATE_FIRST 0xD800 +#define UNICODE_SURROGATE_LAST 0xDFFF /* =for apidoc Am|bool|UNICODE_IS_SURROGATE|const UV uv @@ -961,7 +961,7 @@ bytes starting at C comprise the code point's representation. #define UNICODE_IS_SURROGATE(uv) \ UNLIKELY(inRANGE(uv, UNICODE_SURROGATE_FIRST, \ UNICODE_SURROGATE_LAST)) -#define UTF8_IS_SURROGATE(s, e) is_SURROGATE_utf8_safe(s, e) +#define UTF8_IS_SURROGATE(s, e) is_SURROGATE_utf8_safe(s, e) /* @@ -984,7 +984,7 @@ comprise the code point's representation. =cut */ -#define UNICODE_REPLACEMENT 0xFFFD +#define UNICODE_REPLACEMENT 0xFFFD #define UNICODE_IS_REPLACEMENT(uv) UNLIKELY((UV) (uv) == UNICODE_REPLACEMENT) #define UTF8_IS_REPLACEMENT(s, send) \ UNLIKELY( \ @@ -993,7 +993,7 @@ comprise the code point's representation. sizeof(REPLACEMENT_CHARACTER_UTF8) - 1)) /* Max legal code point according to Unicode */ -#define PERL_UNICODE_MAX 0x10FFFF +#define PERL_UNICODE_MAX 0x10FFFF /* @@ -1005,7 +1005,7 @@ the maximum legal Unicode code point of U+10FFFF. =cut */ -#define UNICODE_IS_SUPER(uv) UNLIKELY((UV) (uv) > PERL_UNICODE_MAX) +#define UNICODE_IS_SUPER(uv) UNLIKELY((UV) (uv) > PERL_UNICODE_MAX) /* =for apidoc Am|bool|UTF8_IS_SUPER|const U8 *s|const U8 *e @@ -1080,7 +1080,7 @@ bytes starting at C comprise the code point's representation. =cut */ -#define UTF8_IS_NONCHAR(s, e) is_NONCHAR_utf8_safe(s,e) +#define UTF8_IS_NONCHAR(s, e) is_NONCHAR_utf8_safe(s,e) /* This is now machine generated, and the 'given' * clause is no longer applicable */ @@ -1121,47 +1121,47 @@ bytes starting at C comprise the code point's representation. (UTF8SKIP(s) > 6 + ONE_IF_EBCDIC_ZERO_IF_NOT) /* Largest code point we accept from external sources */ -#define MAX_LEGAL_CP ((UV)IV_MAX) +#define MAX_LEGAL_CP ((UV)IV_MAX) -#define UTF8_ALLOW_EMPTY 0x0001 /* Allow a zero length +#define UTF8_ALLOW_EMPTY 0x0001 /* Allow a zero length string */ -#define UTF8_GOT_EMPTY UTF8_ALLOW_EMPTY +#define UTF8_GOT_EMPTY UTF8_ALLOW_EMPTY /* Allow first byte to be a continuation byte */ -#define UTF8_ALLOW_CONTINUATION 0x0002 -#define UTF8_GOT_CONTINUATION UTF8_ALLOW_CONTINUATION +#define UTF8_ALLOW_CONTINUATION 0x0002 +#define UTF8_GOT_CONTINUATION UTF8_ALLOW_CONTINUATION /* Unexpected non-continuation byte */ #define UTF8_ALLOW_NON_CONTINUATION 0x0004 -#define UTF8_GOT_NON_CONTINUATION UTF8_ALLOW_NON_CONTINUATION +#define UTF8_GOT_NON_CONTINUATION UTF8_ALLOW_NON_CONTINUATION /* expecting more bytes than were available in the string */ -#define UTF8_ALLOW_SHORT 0x0008 -#define UTF8_GOT_SHORT UTF8_ALLOW_SHORT +#define UTF8_ALLOW_SHORT 0x0008 +#define UTF8_GOT_SHORT UTF8_ALLOW_SHORT /* Overlong sequence; i.e., the code point can be specified in fewer * bytes. First one will convert the overlong to the REPLACEMENT * CHARACTER; second will return what the overlong evaluates to */ -#define UTF8_ALLOW_LONG 0x0010 -#define UTF8_ALLOW_LONG_AND_ITS_VALUE (UTF8_ALLOW_LONG|0x0020) -#define UTF8_GOT_LONG UTF8_ALLOW_LONG +#define UTF8_ALLOW_LONG 0x0010 +#define UTF8_ALLOW_LONG_AND_ITS_VALUE (UTF8_ALLOW_LONG|0x0020) +#define UTF8_GOT_LONG UTF8_ALLOW_LONG -#define UTF8_ALLOW_OVERFLOW 0x0080 -#define UTF8_GOT_OVERFLOW UTF8_ALLOW_OVERFLOW +#define UTF8_ALLOW_OVERFLOW 0x0080 +#define UTF8_GOT_OVERFLOW UTF8_ALLOW_OVERFLOW -#define UTF8_DISALLOW_SURROGATE 0x0100 /* Unicode surrogates */ -#define UTF8_GOT_SURROGATE UTF8_DISALLOW_SURROGATE -#define UTF8_WARN_SURROGATE 0x0200 +#define UTF8_DISALLOW_SURROGATE 0x0100 /* Unicode surrogates */ +#define UTF8_GOT_SURROGATE UTF8_DISALLOW_SURROGATE +#define UTF8_WARN_SURROGATE 0x0200 /* Unicode non-character code points */ -#define UTF8_DISALLOW_NONCHAR 0x0400 -#define UTF8_GOT_NONCHAR UTF8_DISALLOW_NONCHAR -#define UTF8_WARN_NONCHAR 0x0800 +#define UTF8_DISALLOW_NONCHAR 0x0400 +#define UTF8_GOT_NONCHAR UTF8_DISALLOW_NONCHAR +#define UTF8_WARN_NONCHAR 0x0800 /* Super-set of Unicode: code points above the legal max */ -#define UTF8_DISALLOW_SUPER 0x1000 -#define UTF8_GOT_SUPER UTF8_DISALLOW_SUPER -#define UTF8_WARN_SUPER 0x2000 +#define UTF8_DISALLOW_SUPER 0x1000 +#define UTF8_GOT_SUPER UTF8_DISALLOW_SUPER +#define UTF8_WARN_SUPER 0x2000 /* The original UTF-8 standard did not define UTF-8 with start bytes of * 0xFE or 0xFF, though UTF-EBCDIC did. This allowed both versions to @@ -1172,32 +1172,32 @@ bytes starting at C comprise the code point's representation. * both platforms. But these are Perl extensions, and not likely to be * interchangeable with other languages. Note that on ASCII platforms, * FE overflows a signed 32-bit word, and FF an unsigned one. */ -#define UTF8_DISALLOW_PERL_EXTENDED 0x4000 -#define UTF8_GOT_PERL_EXTENDED UTF8_DISALLOW_PERL_EXTENDED -#define UTF8_WARN_PERL_EXTENDED 0x8000 +#define UTF8_DISALLOW_PERL_EXTENDED 0x4000 +#define UTF8_GOT_PERL_EXTENDED UTF8_DISALLOW_PERL_EXTENDED +#define UTF8_WARN_PERL_EXTENDED 0x8000 /* For back compat, these old names are misleading * for overlongs and UTF_EBCDIC. */ -#define UTF8_DISALLOW_ABOVE_31_BIT UTF8_DISALLOW_PERL_EXTENDED -#define UTF8_GOT_ABOVE_31_BIT UTF8_GOT_PERL_EXTENDED -#define UTF8_WARN_ABOVE_31_BIT UTF8_WARN_PERL_EXTENDED -#define UTF8_DISALLOW_FE_FF UTF8_DISALLOW_PERL_EXTENDED -#define UTF8_WARN_FE_FF UTF8_WARN_PERL_EXTENDED +#define UTF8_DISALLOW_ABOVE_31_BIT UTF8_DISALLOW_PERL_EXTENDED +#define UTF8_GOT_ABOVE_31_BIT UTF8_GOT_PERL_EXTENDED +#define UTF8_WARN_ABOVE_31_BIT UTF8_WARN_PERL_EXTENDED +#define UTF8_DISALLOW_FE_FF UTF8_DISALLOW_PERL_EXTENDED +#define UTF8_WARN_FE_FF UTF8_WARN_PERL_EXTENDED -#define UTF8_CHECK_ONLY 0x10000 -#define _UTF8_NO_CONFIDENCE_IN_CURLEN 0x20000 /* Internal core use only */ +#define UTF8_CHECK_ONLY 0x10000 +#define _UTF8_NO_CONFIDENCE_IN_CURLEN 0x20000 /* Internal core use only */ /* For backwards source compatibility. They do nothing, as the default * now includes what they used to mean. The first one's meaning was to * allow the just the single non-character 0xFFFF */ -#define UTF8_ALLOW_FFFF 0 -#define UTF8_ALLOW_FE_FF 0 -#define UTF8_ALLOW_SURROGATE 0 +#define UTF8_ALLOW_FFFF 0 +#define UTF8_ALLOW_FE_FF 0 +#define UTF8_ALLOW_SURROGATE 0 /* C9 refers to Unicode Corrigendum #9: allows but discourages non-chars */ #define UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE \ (UTF8_DISALLOW_SUPER|UTF8_DISALLOW_SURROGATE) -#define UTF8_WARN_ILLEGAL_C9_INTERCHANGE (UTF8_WARN_SUPER|UTF8_WARN_SURROGATE) +#define UTF8_WARN_ILLEGAL_C9_INTERCHANGE (UTF8_WARN_SUPER|UTF8_WARN_SURROGATE) #define UTF8_DISALLOW_ILLEGAL_INTERCHANGE \ (UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE|UTF8_DISALLOW_NONCHAR) @@ -1217,23 +1217,23 @@ bytes starting at C comprise the code point's representation. /* Accept any Perl-extended UTF-8 that evaluates to any UV on the * platform, but not any malformed. This is the default. */ -#define UTF8_ALLOW_ANYUV 0 -#define UTF8_ALLOW_DEFAULT UTF8_ALLOW_ANYUV - -#define UNICODE_WARN_SURROGATE 0x0001 /* UTF-16 surrogates */ -#define UNICODE_WARN_NONCHAR 0x0002 /* Non-char code points */ -#define UNICODE_WARN_SUPER 0x0004 /* Above 0x10FFFF */ -#define UNICODE_WARN_PERL_EXTENDED 0x0008 /* Above 0x7FFF_FFFF */ -#define UNICODE_WARN_ABOVE_31_BIT UNICODE_WARN_PERL_EXTENDED -#define UNICODE_DISALLOW_SURROGATE 0x0010 -#define UNICODE_DISALLOW_NONCHAR 0x0020 -#define UNICODE_DISALLOW_SUPER 0x0040 +#define UTF8_ALLOW_ANYUV 0 +#define UTF8_ALLOW_DEFAULT UTF8_ALLOW_ANYUV + +#define UNICODE_WARN_SURROGATE 0x0001 /* UTF-16 surrogates */ +#define UNICODE_WARN_NONCHAR 0x0002 /* Non-char code points */ +#define UNICODE_WARN_SUPER 0x0004 /* Above 0x10FFFF */ +#define UNICODE_WARN_PERL_EXTENDED 0x0008 /* Above 0x7FFF_FFFF */ +#define UNICODE_WARN_ABOVE_31_BIT UNICODE_WARN_PERL_EXTENDED +#define UNICODE_DISALLOW_SURROGATE 0x0010 +#define UNICODE_DISALLOW_NONCHAR 0x0020 +#define UNICODE_DISALLOW_SUPER 0x0040 #define UNICODE_DISALLOW_PERL_EXTENDED 0x0080 #ifdef PERL_CORE -# define UNICODE_ALLOW_ABOVE_IV_MAX 0x0100 +# define UNICODE_ALLOW_ABOVE_IV_MAX 0x0100 #endif -#define UNICODE_DISALLOW_ABOVE_31_BIT UNICODE_DISALLOW_PERL_EXTENDED +#define UNICODE_DISALLOW_ABOVE_31_BIT UNICODE_DISALLOW_PERL_EXTENDED #define UNICODE_GOT_SURROGATE UNICODE_DISALLOW_SURROGATE #define UNICODE_GOT_NONCHAR UNICODE_DISALLOW_NONCHAR @@ -1250,16 +1250,16 @@ bytes starting at C comprise the code point's representation. (UNICODE_DISALLOW_ILLEGAL_C9_INTERCHANGE|UNICODE_DISALLOW_NONCHAR) /* For backward source compatibility, as are now the default */ -#define UNICODE_ALLOW_SURROGATE 0 -#define UNICODE_ALLOW_SUPER 0 -#define UNICODE_ALLOW_ANY 0 +#define UNICODE_ALLOW_SURROGATE 0 +#define UNICODE_ALLOW_SUPER 0 +#define UNICODE_ALLOW_ANY 0 -#define UNICODE_BYTE_ORDER_MARK 0xFEFF +#define UNICODE_BYTE_ORDER_MARK 0xFEFF #define UNICODE_IS_BYTE_ORDER_MARK(uv) \ UNLIKELY((UV) (uv) \ == UNICODE_BYTE_ORDER_MARK) -#define LATIN_SMALL_LETTER_SHARP_S LATIN_SMALL_LETTER_SHARP_S_NATIVE +#define LATIN_SMALL_LETTER_SHARP_S LATIN_SMALL_LETTER_SHARP_S_NATIVE #define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS \ LATIN_SMALL_LETTER_Y_WITH_DIAERESIS_NATIVE #define MICRO_SIGN MICRO_SIGN_NATIVE @@ -1276,19 +1276,19 @@ bytes starting at C comprise the code point's representation. #define LATIN_CAPITAL_LETTER_Y_WITH_DIAERESIS 0x0178 /* Also is title case */ #ifdef LATIN_CAPITAL_LETTER_SHARP_S_UTF8 -# define LATIN_CAPITAL_LETTER_SHARP_S 0x1E9E +# define LATIN_CAPITAL_LETTER_SHARP_S 0x1E9E #endif -#define LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE 0x130 -#define LATIN_SMALL_LETTER_DOTLESS_I 0x131 +#define LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE 0x130 +#define LATIN_SMALL_LETTER_DOTLESS_I 0x131 #define LATIN_SMALL_LETTER_LONG_S 0x017F #define LATIN_SMALL_LIGATURE_LONG_S_T 0xFB05 #define LATIN_SMALL_LIGATURE_ST 0xFB06 #define KELVIN_SIGN 0x212A #define ANGSTROM_SIGN 0x212B -#define UNI_DISPLAY_ISPRINT 0x0001 -#define UNI_DISPLAY_BACKSLASH 0x0002 -#define UNI_DISPLAY_BACKSPACE 0x0004 /* Allow \b when also +#define UNI_DISPLAY_ISPRINT 0x0001 +#define UNI_DISPLAY_BACKSLASH 0x0002 +#define UNI_DISPLAY_BACKSPACE 0x0004 /* Allow \b when also UNI_DISPLAY_BACKSLASH */ #define UNI_DISPLAY_QQ \ (UNI_DISPLAY_ISPRINT \ @@ -1296,10 +1296,10 @@ bytes starting at C comprise the code point's representation. |UNI_DISPLAY_BACKSPACE) /* Character classes could also allow \b, but not patterns in general */ -#define UNI_DISPLAY_REGEX (UNI_DISPLAY_ISPRINT|UNI_DISPLAY_BACKSLASH) +#define UNI_DISPLAY_REGEX (UNI_DISPLAY_ISPRINT|UNI_DISPLAY_BACKSLASH) /* Should be removed; maybe deprecated, but not used in CPAN */ -#define SHARP_S_SKIP 2 +#define SHARP_S_SKIP 2 #define is_utf8_char_buf(buf, buf_end) isUTF8_CHAR(buf, buf_end) #define bytes_from_utf8(s, lenp, is_utf8p) \ @@ -1307,7 +1307,7 @@ bytes starting at C comprise the code point's representation. /* Do not use; should be deprecated. Use isUTF8_CHAR() instead; * this is retained solely for backwards compatibility */ -#define IS_UTF8_CHAR(p, n) (isUTF8_CHAR(p, (p) + (n)) == n) +#define IS_UTF8_CHAR(p, n) (isUTF8_CHAR(p, (p) + (n)) == n) #endif /* PERL_UTF8_H_ */ diff --git a/utfebcdic.h b/utfebcdic.h index b1bf511b0333..e5152d96f1d1 100644 --- a/utfebcdic.h +++ b/utfebcdic.h @@ -197,11 +197,11 @@ possible to UTF-8-encode a single code point in different ways, but that is explicitly forbidden, and the shortest possible encoding should always be used (and that is what Perl does). */ -#define UTF_CONTINUATION_BYTE_INFO_BITS UTF_EBCDIC_CONTINUATION_BYTE_INFO_BITS +#define UTF_CONTINUATION_BYTE_INFO_BITS UTF_EBCDIC_CONTINUATION_BYTE_INFO_BITS /* ^? is defined to be APC on EBCDIC systems, as specified in Unicode * Technical Report #16. See the definition of toCTRL() for more */ -#define QUESTION_MARK_CTRL LATIN1_TO_NATIVE(0x9F) +#define QUESTION_MARK_CTRL LATIN1_TO_NATIVE(0x9F) /* * ex: set ts=8 sts=4 sw=4 et: diff --git a/util.h b/util.h index daece86f6795..52f20f932a5c 100644 --- a/util.h +++ b/util.h @@ -28,7 +28,7 @@ (*(f) == '/' \ || ((f)[0] && (f)[1] == ':')) /* drive name */ #else /* NOT DOSISH */ -# define PERL_FILE_IS_ABSOLUTE(f) (*(f) == '/') +# define PERL_FILE_IS_ABSOLUTE(f) (*(f) == '/') #endif /* @@ -48,8 +48,8 @@ This is a synonym for S> =cut */ -#define ibcmp(s1, s2, len) cBOOL(! foldEQ(s1, s2, len)) -#define ibcmp_locale(s1, s2, len) cBOOL(! foldEQ_locale(s1, s2, len)) +#define ibcmp(s1, s2, len) cBOOL(! foldEQ(s1, s2, len)) +#define ibcmp_locale(s1, s2, len) cBOOL(! foldEQ_locale(s1, s2, len)) #define ibcmp_utf8(s1, pe1, l1, u1, s2, pe2, l2, u2) \ cBOOL(! foldEQ_utf8(s1, pe1, l1, u1, s2, pe2, l2, u2)) @@ -78,15 +78,15 @@ typedef struct PERL_DRAND48_T perl_drand48_t; #endif -#define PL_RANDOM_STATE_TYPE perl_drand48_t +#define PL_RANDOM_STATE_TYPE perl_drand48_t -#define Perl_drand48_init(seed) (Perl_drand48_init_r(&PL_random_state, (seed))) -#define Perl_drand48() (Perl_drand48_r(&PL_random_state)) +#define Perl_drand48_init(seed) (Perl_drand48_init_r(&PL_random_state, (seed))) +#define Perl_drand48() (Perl_drand48_r(&PL_random_state)) #ifdef PERL_CORE /* uses a different source of randomness to avoid * interfering with the results of rand() */ -#define Perl_internal_drand48() (Perl_drand48_r(&PL_internal_random_state)) +#define Perl_internal_drand48() (Perl_drand48_r(&PL_internal_random_state)) #endif #ifdef USE_C_BACKTRACE @@ -160,7 +160,7 @@ typedef struct { * these strings, and the lengths of these strings. */ } Perl_c_backtrace; -#define Perl_free_c_backtrace(bt) Safefree(bt) +#define Perl_free_c_backtrace(bt) Safefree(bt) #endif /* USE_C_BACKTRACE */ @@ -174,34 +174,34 @@ typedef struct { are user selectable. These spare bits allow for additional features for the varargs stuff or ABI compat test flags in the future. */ -#define HSm_APIVERLEN 0x0000001F /* perl version string won't +#define HSm_APIVERLEN 0x0000001F /* perl version string won't be more than 31 chars */ -#define HS_APIVERLEN_MAX HSm_APIVERLEN -#define HSm_XSVERLEN 0x0000FF00 /* if 0, not present, dont check, +#define HS_APIVERLEN_MAX HSm_APIVERLEN +#define HSm_XSVERLEN 0x0000FF00 /* if 0, not present, dont check, die if over 255 */ -#define HS_XSVERLEN_MAX 0xFF +#define HS_XSVERLEN_MAX 0xFF /* uses var file to set default filename for newXS_deffile to use for CvFILE */ -#define HSf_SETXSUBFN 0x00000020 -#define HSf_POPMARK 0x00000040 /* popmark mode or you must +#define HSf_SETXSUBFN 0x00000020 +#define HSf_POPMARK 0x00000040 /* popmark mode or you must supply ax and items */ -#define HSf_IMP_CXT 0x00000080 /* ABI, threaded, MULTIPLICITY, pTHX_ present */ -#define HSm_INTRPSIZE 0xFFFF0000 /* ABI, interp struct size */ +#define HSf_IMP_CXT 0x00000080 /* ABI, threaded, MULTIPLICITY, pTHX_ present */ +#define HSm_INTRPSIZE 0xFFFF0000 /* ABI, interp struct size */ /* A mask of bits in the key which must always match between a XS mod and interp. Also if all ABI bits in a key are true, skip all ABI checks, it is very the unlikely interp size will all 1 bits */ /* Maybe HSm_APIVERLEN one day if Perl_xs_apiversion_bootcheck is changed to a memcmp */ -#define HSm_KEY_MATCH (HSm_INTRPSIZE|HSf_IMP_CXT) -#define HSf_NOCHK HSm_KEY_MATCH /* if all ABI bits are 1 in +#define HSm_KEY_MATCH (HSm_INTRPSIZE|HSf_IMP_CXT) +#define HSf_NOCHK HSm_KEY_MATCH /* if all ABI bits are 1 in the key, dont chk */ -#define HS_GETINTERPSIZE(key) ((key) >> 16) +#define HS_GETINTERPSIZE(key) ((key) >> 16) /* if in the future "" and NULL must be separated, XSVERLEN would be 0 means arg not present, 1 is empty string/null byte */ /* (((key) & 0x0000FF00) >> 8) is less efficient on Visual C */ -#define HS_GETXSVERLEN(key) ((U8) ((key) >> 8)) -#define HS_GETAPIVERLEN(key) ((key) & HSm_APIVERLEN) +#define HS_GETXSVERLEN(key) ((U8) ((key) >> 8)) +#define HS_GETAPIVERLEN(key) ((key) & HSm_APIVERLEN) /* internal to util.h macro to create a packed handshake key, all args must be constants */ @@ -228,12 +228,12 @@ typedef struct { # define HS_KEY(setxsubfn, popmark, apiver, xsver) \ HS_KEYp(sizeof(PerlInterpreter), TRUE, setxsubfn, popmark, \ sizeof("" apiver "")-1, sizeof("" xsver "")-1) -# define HS_CXT aTHX +# define HS_CXT aTHX #else # define HS_KEY(setxsubfn, popmark, apiver, xsver) \ HS_KEYp(sizeof(struct PerlHandShakeInterpreter), FALSE, setxsubfn, popmark, \ sizeof("" apiver "")-1, sizeof("" xsver "")-1) -# define HS_CXT cv +# define HS_CXT cv #endif /* @@ -255,7 +255,7 @@ returning NULL if not found. The terminating NUL bytes are not compared. (char *) memmem((big), (bigend) - (big), \ (little), (lend) - (little))) #else -# define ninstr(a,b,c,d) Perl_ninstr(a,b,c,d) +# define ninstr(a,b,c,d) Perl_ninstr(a,b,c,d) #endif #ifdef __Lynx__ @@ -266,19 +266,19 @@ int mkstemp(char*); #ifdef PERL_CORE # if defined(VMS) /* only useful for calls to our mkostemp() emulation */ -# define O_VMS_DELETEONCLOSE 0x40000000 +# define O_VMS_DELETEONCLOSE 0x40000000 # ifdef HAS_MKOSTEMP # error 134221 will need a new solution for VMS # endif # else -# define O_VMS_DELETEONCLOSE 0 +# define O_VMS_DELETEONCLOSE 0 # endif #endif #if defined(HAS_MKOSTEMP) && defined(PERL_CORE) # define Perl_my_mkostemp(templte, flags) mkostemp(templte, flags) #endif #if defined(HAS_MKSTEMP) && defined(PERL_CORE) -# define Perl_my_mkstemp(templte) mkstemp(templte) +# define Perl_my_mkstemp(templte) mkstemp(templte) #endif #endif /* PERL_UTIL_H_ */ diff --git a/vutil.h b/vutil.h index 19f7877d69ed..d534991991b4 100644 --- a/vutil.h +++ b/vutil.h @@ -11,7 +11,7 @@ */ #if PERL_VERSION_LT(5,15,4) -# define ISA_VERSION_OBJ(v) (sv_isobject(v) && sv_derived_from(v,"version")) +# define ISA_VERSION_OBJ(v) (sv_isobject(v) && sv_derived_from(v,"version")) #else # define ISA_VERSION_OBJ(v) \ (sv_isobject(v) && sv_derived_from_pvn(v,"version",7,0)) @@ -19,7 +19,7 @@ #if PERL_VERSION_GE(5,9,0) && !defined(PERL_CORE) -# define VUTIL_REPLACE_CORE 1 +# define VUTIL_REPLACE_CORE 1 static const char * Perl_scan_version2(pTHX_ const char *s, SV *rv, bool qv); static SV * Perl_new_version2(pTHX_ SV *ver); @@ -32,14 +32,14 @@ static SV * Perl_vstringify2(pTHX_ SV *vs); static int Perl_vcmp2(pTHX_ SV *lsv, SV *rsv); static const char * Perl_prescan_version2(pTHX_ const char *s, bool strict, const char** errstr, bool *sqv, int *ssaw_decimal, int *swidth, bool *salpha); -# define SCAN_VERSION(a,b,c) Perl_scan_version2(aTHX_ a,b,c) -# define NEW_VERSION(a) Perl_new_version2(aTHX_ a) -# define UPG_VERSION(a,b) Perl_upg_version2(aTHX_ a, b) -# define VSTRINGIFY(a) Perl_vstringify2(aTHX_ a) -# define VVERIFY(a) Perl_vverify2(aTHX_ a) -# define VNUMIFY(a) Perl_vnumify2(aTHX_ a) -# define VNORMAL(a) Perl_vnormal2(aTHX_ a) -# define VCMP(a,b) Perl_vcmp2(aTHX_ a,b) +# define SCAN_VERSION(a,b,c) Perl_scan_version2(aTHX_ a,b,c) +# define NEW_VERSION(a) Perl_new_version2(aTHX_ a) +# define UPG_VERSION(a,b) Perl_upg_version2(aTHX_ a, b) +# define VSTRINGIFY(a) Perl_vstringify2(aTHX_ a) +# define VVERIFY(a) Perl_vverify2(aTHX_ a) +# define VNUMIFY(a) Perl_vnumify2(aTHX_ a) +# define VNORMAL(a) Perl_vnormal2(aTHX_ a) +# define VCMP(a,b) Perl_vcmp2(aTHX_ a,b) # define PRESCAN_VERSION(a,b,c,d,e,f,g) \ Perl_prescan_version2(aTHX_ a,b,c,d,e,f,g) # undef is_LAX_VERSION @@ -61,14 +61,14 @@ SV * Perl_vstringify(pTHX_ SV *vs); int Perl_vcmp(pTHX_ SV *lsv, SV *rsv); const char * Perl_prescan_version(pTHX_ const char *s, bool strict, const char** errstr, bool *sqv, int *ssaw_decimal, int *swidth, bool *salpha); -# define SCAN_VERSION(a,b,c) Perl_scan_version(aTHX_ a,b,c) -# define NEW_VERSION(a) Perl_new_version(aTHX_ a) -# define UPG_VERSION(a,b) Perl_upg_version(aTHX_ a, b) -# define VSTRINGIFY(a) Perl_vstringify(aTHX_ a) -# define VVERIFY(a) Perl_vverify(aTHX_ a) -# define VNUMIFY(a) Perl_vnumify(aTHX_ a) -# define VNORMAL(a) Perl_vnormal(aTHX_ a) -# define VCMP(a,b) Perl_vcmp(aTHX_ a,b) +# define SCAN_VERSION(a,b,c) Perl_scan_version(aTHX_ a,b,c) +# define NEW_VERSION(a) Perl_new_version(aTHX_ a) +# define UPG_VERSION(a,b) Perl_upg_version(aTHX_ a, b) +# define VSTRINGIFY(a) Perl_vstringify(aTHX_ a) +# define VVERIFY(a) Perl_vverify(aTHX_ a) +# define VNUMIFY(a) Perl_vnumify(aTHX_ a) +# define VNORMAL(a) Perl_vnormal(aTHX_ a) +# define VCMP(a,b) Perl_vcmp(aTHX_ a,b) # define PRESCAN_VERSION(a,b,c,d,e,f,g) \ Perl_prescan_version(aTHX_ a,b,c,d,e,f,g) diff --git a/zaphod32_hash.h b/zaphod32_hash.h index 06fef77c1901..a105d295d095 100644 --- a/zaphod32_hash.h +++ b/zaphod32_hash.h @@ -1,22 +1,22 @@ #ifndef DEBUG_ZAPHOD32_HASH -#define DEBUG_ZAPHOD32_HASH 0 +#define DEBUG_ZAPHOD32_HASH 0 #if DEBUG_ZAPHOD32_HASH == 1 #include #define ZAPHOD32_WARN6(pat,v0,v1,v2,v3,v4,v5) \ printf(pat, v0, v1, v2, v3, v4, v5) -#define ZAPHOD32_WARN5(pat,v0,v1,v2,v3,v4) printf(pat, v0, v1, v2, v3, v4) -#define ZAPHOD32_WARN4(pat,v0,v1,v2,v3) printf(pat, v0, v1, v2, v3) -#define ZAPHOD32_WARN3(pat,v0,v1,v2) printf(pat, v0, v1, v2) -#define ZAPHOD32_WARN2(pat,v0,v1) printf(pat, v0, v1) -#define NOTE3(pat,v0,v1,v2) printf(pat, v0, v1, v2) +#define ZAPHOD32_WARN5(pat,v0,v1,v2,v3,v4) printf(pat, v0, v1, v2, v3, v4) +#define ZAPHOD32_WARN4(pat,v0,v1,v2,v3) printf(pat, v0, v1, v2, v3) +#define ZAPHOD32_WARN3(pat,v0,v1,v2) printf(pat, v0, v1, v2) +#define ZAPHOD32_WARN2(pat,v0,v1) printf(pat, v0, v1) +#define NOTE3(pat,v0,v1,v2) printf(pat, v0, v1, v2) #elif DEBUG_ZAPHOD32_HASH == 2 #define ZAPHOD32_WARN6(pat,v0,v1,v2,v3,v4,v5) #define ZAPHOD32_WARN5(pat,v0,v1,v2,v3,v4) #define ZAPHOD32_WARN4(pat,v0,v1,v2,v3) #define ZAPHOD32_WARN3(pat,v0,v1,v2) #define ZAPHOD32_WARN2(pat,v0,v1) -#define NOTE3(pat,v0,v1,v2) printf(pat, v0, v1, v2) +#define NOTE3(pat,v0,v1,v2) printf(pat, v0, v1, v2) #else #define ZAPHOD32_WARN6(pat,v0,v1,v2,v3,v4,v5) #define ZAPHOD32_WARN5(pat,v0,v1,v2,v3,v4) @@ -30,50 +30,50 @@ #ifndef ROTL32 #if defined(_MSC_VER) #include /* Microsoft put _rotl declaration in here */ -#define ROTL32(x,r) _rotl(x,r) -#define ROTR32(x,r) _rotr(x,r) +#define ROTL32(x,r) _rotl(x,r) +#define ROTR32(x,r) _rotr(x,r) #else /* gcc recognises this code and generates a rotate instruction for CPUs with one */ -#define ROTL32(x,r) (((U32)(x) << (r)) | ((U32)(x) >> (32 - (r)))) -#define ROTR32(x,r) (((U32)(x) << (32 - (r))) | ((U32)(x) >> (r))) +#define ROTL32(x,r) (((U32)(x) << (r)) | ((U32)(x) >> (32 - (r)))) +#define ROTR32(x,r) (((U32)(x) << (32 - (r))) | ((U32)(x) >> (r))) #endif #endif #ifndef PERL_SEEN_HV_FUNC_H_ #if !defined(U64) #include -#define U64 uint64_t +#define U64 uint64_t #endif #if !defined(U32) -#define U32 uint32_t +#define U32 uint32_t #endif #if !defined(U8) -#define U8 unsigned char +#define U8 unsigned char #endif #if !defined(U16) -#define U16 uint16_t +#define U16 uint16_t #endif #ifndef STRLEN -#define STRLEN int +#define STRLEN int #endif #endif #ifndef ZAPHOD32_STATIC_INLINE #ifdef PERL_STATIC_INLINE -#define ZAPHOD32_STATIC_INLINE PERL_STATIC_INLINE +#define ZAPHOD32_STATIC_INLINE PERL_STATIC_INLINE #else -#define ZAPHOD32_STATIC_INLINE static inline +#define ZAPHOD32_STATIC_INLINE static inline #endif #endif #ifndef STMT_START -#define STMT_START do -#define STMT_END while(0) +#define STMT_START do +#define STMT_END while(0) #endif /* This is two marsaglia xor-shift permutes, with a prime-multiple