home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl560.zip / warnings.h < prev    next >
Text File  |  2000-03-18  |  4KB  |  118 lines

  1. /* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
  2.    This file is built by warnings.pl
  3.    Any changes made here will be lost!
  4. */
  5.  
  6.  
  7. #define Off(x)            ((x) / 8)
  8. #define Bit(x)            (1 << ((x) % 8))
  9. #define IsSet(a, x)        ((a)[Off(x)] & Bit(x))
  10.  
  11.  
  12. #define G_WARN_OFF        0     /* $^W == 0 */
  13. #define G_WARN_ON        1    /* -w flag and $^W != 0 */
  14. #define G_WARN_ALL_ON        2    /* -W flag */
  15. #define G_WARN_ALL_OFF        4    /* -X flag */
  16. #define G_WARN_ONCE        8    /* set if 'once' ever enabled */
  17. #define G_WARN_ALL_MASK        (G_WARN_ALL_ON|G_WARN_ALL_OFF)
  18.  
  19. #define pWARN_STD        Nullsv
  20. #define pWARN_ALL        (Nullsv+1)    /* use warnings 'all' */
  21. #define pWARN_NONE        (Nullsv+2)    /* no  warnings 'all' */
  22.  
  23. #define specialWARN(x)        ((x) == pWARN_STD || (x) == pWARN_ALL ||    \
  24.                  (x) == pWARN_NONE)
  25.  
  26. #define ckDEAD(x)                            \
  27.        ( ! specialWARN(PL_curcop->cop_warnings) &&            \
  28.         IsSet(SvPVX(PL_curcop->cop_warnings), 2*x+1))
  29.  
  30. #define ckWARN(x)                            \
  31.     ( (PL_curcop->cop_warnings != pWARN_STD &&            \
  32.        PL_curcop->cop_warnings != pWARN_NONE &&            \
  33.           (PL_curcop->cop_warnings == pWARN_ALL ||            \
  34.            IsSet(SvPVX(PL_curcop->cop_warnings), 2*x) ) )        \
  35.       || (PL_curcop->cop_warnings == pWARN_STD && PL_dowarn & G_WARN_ON) )
  36.  
  37. #define ckWARN2(x,y)                            \
  38.       ( (PL_curcop->cop_warnings != pWARN_STD  &&            \
  39.          PL_curcop->cop_warnings != pWARN_NONE &&            \
  40.           (PL_curcop->cop_warnings == pWARN_ALL ||            \
  41.             IsSet(SvPVX(PL_curcop->cop_warnings), 2*x)  ||        \
  42.             IsSet(SvPVX(PL_curcop->cop_warnings), 2*y) ) )         \
  43.         ||    (PL_curcop->cop_warnings == pWARN_STD && PL_dowarn & G_WARN_ON) )
  44.  
  45. #define ckWARN_d(x)                            \
  46.       (PL_curcop->cop_warnings == pWARN_STD ||            \
  47.        PL_curcop->cop_warnings == pWARN_ALL ||            \
  48.          (PL_curcop->cop_warnings != pWARN_NONE &&            \
  49.           IsSet(SvPVX(PL_curcop->cop_warnings), 2*x) ) )
  50.  
  51. #define ckWARN2_d(x,y)                            \
  52.       (PL_curcop->cop_warnings == pWARN_STD ||            \
  53.        PL_curcop->cop_warnings == pWARN_ALL ||            \
  54.          (PL_curcop->cop_warnings != pWARN_NONE &&            \
  55.             (IsSet(SvPVX(PL_curcop->cop_warnings), 2*x)  ||        \
  56.              IsSet(SvPVX(PL_curcop->cop_warnings), 2*y) ) ) )
  57.  
  58.  
  59. #define isLEXWARN_on     (PL_curcop->cop_warnings != pWARN_STD)
  60. #define isLEXWARN_off    (PL_curcop->cop_warnings == pWARN_STD)
  61. #define isWARN_ONCE    (PL_dowarn & (G_WARN_ON|G_WARN_ONCE))
  62. #define isWARN_on(c,x)    (IsSet(SvPVX(c), 2*(x)))
  63.  
  64. #define WARN_ALL        0
  65. #define WARN_CHMOD        1
  66. #define WARN_CLOSURE        2
  67. #define WARN_EXITING        3
  68. #define WARN_GLOB        4
  69. #define WARN_IO            5
  70. #define WARN_CLOSED        6
  71. #define WARN_EXEC        7
  72. #define WARN_NEWLINE        8
  73. #define WARN_PIPE        9
  74. #define WARN_UNOPENED        10
  75. #define WARN_MISC        11
  76. #define WARN_NUMERIC        12
  77. #define WARN_ONCE        13
  78. #define WARN_OVERFLOW        14
  79. #define WARN_PACK        15
  80. #define WARN_PORTABLE        16
  81. #define WARN_RECURSION        17
  82. #define WARN_REDEFINE        18
  83. #define WARN_REGEXP        19
  84. #define WARN_SEVERE        20
  85. #define WARN_DEBUGGING        21
  86. #define WARN_INPLACE        22
  87. #define WARN_INTERNAL        23
  88. #define WARN_MALLOC        24
  89. #define WARN_SIGNAL        25
  90. #define WARN_SUBSTR        26
  91. #define WARN_SYNTAX        27
  92. #define WARN_AMBIGUOUS        28
  93. #define WARN_BAREWORD        29
  94. #define WARN_DEPRECATED        30
  95. #define WARN_DIGIT        31
  96. #define WARN_PARENTHESIS    32
  97. #define WARN_PRECEDENCE        33
  98. #define WARN_PRINTF        34
  99. #define WARN_PROTOTYPE        35
  100. #define WARN_QW            36
  101. #define WARN_RESERVED        37
  102. #define WARN_SEMICOLON        38
  103. #define WARN_TAINT        39
  104. #define WARN_UMASK        40
  105. #define WARN_UNINITIALIZED    41
  106. #define WARN_UNPACK        42
  107. #define WARN_UNTIE        43
  108. #define WARN_UTF8        44
  109. #define WARN_VOID        45
  110. #define WARN_Y2K        46
  111.  
  112. #define WARNsize        12
  113. #define WARN_ALLstring        "\125\125\125\125\125\125\125\125\125\125\125\125"
  114. #define WARN_NONEstring        "\0\0\0\0\0\0\0\0\0\0\0\0"
  115.  
  116. /* end of file warnings.h */
  117.  
  118.