X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=warning.h;h=dde254d942a7b4caed9036effc17827c60b575ea;hb=181ea953f5037d8eebef8af5f5ba67f9ff02a565;hp=235c075518014d45f465688dc254da22f7b75922;hpb=599cee73f2261c5e09cde7ceba3f9a896989e117;p=p5sagit%2Fp5-mst-13.2.git diff --git a/warning.h b/warning.h index 235c075..dde254d 100644 --- a/warning.h +++ b/warning.h @@ -19,78 +19,78 @@ /* Part of the logic below assumes that WARN_NONE is NULL */ #define ckDEAD(x) \ - (curcop->cop_warnings != WARN_ALL && \ - curcop->cop_warnings != WARN_NONE && \ - IsSet(SvPVX(curcop->cop_warnings), 2*x+1)) + (PL_curcop->cop_warnings != WARN_ALL && \ + PL_curcop->cop_warnings != WARN_NONE && \ + IsSet(SvPVX(PL_curcop->cop_warnings), 2*x+1)) #define ckWARN(x) \ - ( (curcop->cop_warnings && \ - (curcop->cop_warnings == WARN_ALL || \ - IsSet(SvPVX(curcop->cop_warnings), 2*x) ) ) \ + ( (PL_curcop->cop_warnings && \ + (PL_curcop->cop_warnings == WARN_ALL || \ + IsSet(SvPVX(PL_curcop->cop_warnings), 2*x) ) ) \ || (PL_dowarn & G_WARN_ON) ) #define ckWARN2(x,y) \ - ( (curcop->cop_warnings && \ - (curcop->cop_warnings == WARN_ALL || \ - IsSet(SvPVX(curcop->cop_warnings), 2*x) || \ - IsSet(SvPVX(curcop->cop_warnings), 2*y) ) ) \ + ( (PL_curcop->cop_warnings && \ + (PL_curcop->cop_warnings == WARN_ALL || \ + IsSet(SvPVX(PL_curcop->cop_warnings), 2*x) || \ + IsSet(SvPVX(PL_curcop->cop_warnings), 2*y) ) ) \ || (PL_dowarn & G_WARN_ON) ) #else -#define ckDEAD(x) \ - (curcop->cop_warnings != WARN_ALL && \ - curcop->cop_warnings != WARN_NONE && \ - SvPVX(curcop->cop_warnings)[Off(2*x+1)] & Bit(2*x+1) ) +#define ckDEAD(x) \ + (PL_curcop->cop_warnings != WARN_ALL && \ + PL_curcop->cop_warnings != WARN_NONE && \ + SvPVX(PL_curcop->cop_warnings)[Off(2*x+1)] & Bit(2*x+1) ) -#define ckWARN(x) \ +#define ckWARN(x) \ ( (PL_dowarn & G_WARN_ON) || ( (PL_dowarn & G_WARN_DISABLE) && \ - curcop->cop_warnings && \ - ( curcop->cop_warnings == WARN_ALL || \ - SvPVX(curcop->cop_warnings)[Off(2*x)] & Bit(2*x) ) ) ) + PL_curcop->cop_warnings && \ + ( PL_curcop->cop_warnings == WARN_ALL || \ + SvPVX(PL_curcop->cop_warnings)[Off(2*x)] & Bit(2*x) ) ) ) -#define ckWARN2(x,y) \ +#define ckWARN2(x,y) \ ( (PL_dowarn & G_WARN_ON) || ( (PL_dowarn & G_WARN_DISABLE) && \ - curcop->cop_warnings && \ - ( curcop->cop_warnings == WARN_ALL || \ - SvPVX(curcop->cop_warnings)[Off(2*x)] & Bit(2*x) || \ - SvPVX(curcop->cop_warnings)[Off(2*y)] & Bit(2*y) ) ) ) + PL_curcop->cop_warnings && \ + ( PL_curcop->cop_warnings == WARN_ALL || \ + SvPVX(PL_curcop->cop_warnings)[Off(2*x)] & Bit(2*x) || \ + SvPVX(PL_curcop->cop_warnings)[Off(2*y)] & Bit(2*y) ) ) ) #endif #define WARN_NONE NULL -#define WARN_ALL (&sv_yes) - -#define WARN_REDEFINE 0 -#define WARN_VOID 1 -#define WARN_UNSAFE 2 -#define WARN_TAINT 3 -#define WARN_SUBSTR 4 -#define WARN_CLOSURE 5 -#define WARN_UNTIE 6 -#define WARN_SIGNAL 7 -#define WARN_UTF8 8 -#define WARN_NUMERIC 9 -#define WARN_DEFAULT 10 -#define WARN_ONCE 11 +#define WARN_ALL (&PL_sv_yes) + +#define WARN_DEFAULT 0 +#define WARN_IO 1 +#define WARN_CLOSED 2 +#define WARN_EXEC 3 +#define WARN_NEWLINE 4 +#define WARN_PIPE 5 +#define WARN_UNOPENED 6 +#define WARN_MISC 7 +#define WARN_NUMERIC 8 +#define WARN_ONCE 9 +#define WARN_RECURSION 10 +#define WARN_REDEFINE 11 #define WARN_SYNTAX 12 -#define WARN_RESERVED 13 +#define WARN_AMBIGUOUS 13 #define WARN_DEPRECATED 14 -#define WARN_SEMICOLON 15 -#define WARN_PRINTF 16 -#define WARN_OCTAL 17 -#define WARN_AMBIGUOUS 18 -#define WARN_PARENTHESIS 19 -#define WARN_PRECEDENCE 20 -#define WARN_IO 21 -#define WARN_NEWLINE 22 -#define WARN_CLOSED 23 -#define WARN_EXEC 24 -#define WARN_UNOPENED 25 -#define WARN_PIPE 26 -#define WARN_UNINITIALIZED 27 -#define WARN_RECURSION 28 -#define WARN_MISC 29 +#define WARN_OCTAL 15 +#define WARN_PARENTHESIS 16 +#define WARN_PRECEDENCE 17 +#define WARN_PRINTF 18 +#define WARN_RESERVED 19 +#define WARN_SEMICOLON 20 +#define WARN_UNINITIALIZED 21 +#define WARN_UNSAFE 22 +#define WARN_CLOSURE 23 +#define WARN_SIGNAL 24 +#define WARN_SUBSTR 25 +#define WARN_TAINT 26 +#define WARN_UNTIE 27 +#define WARN_UTF8 28 +#define WARN_VOID 29 #define WARNsize 8 #define WARN_ALLstring "\125\125\125\125\125\125\125\125"