Add Perl_ck_warner(), which combines Perl_ckwarn() and Perl_warner().
[p5sagit/p5-mst-13.2.git] / numeric.c
index 8d6bc97..2b4d68d 100644 (file)
--- a/numeric.c
+++ b/numeric.c
@@ -9,8 +9,10 @@
  */
 
 /*
- * "That only makes eleven (plus one mislaid) and not fourteen, unless
- * wizards count differently to other people."
+ * "That only makes eleven (plus one mislaid) and not fourteen,
+ *  unless wizards count differently to other people."  --Beorn
+ *
+ *     [p.115 of _The Hobbit_: "Queer Lodgings"]
  */
 
 /*
@@ -197,9 +199,9 @@ Perl_grok_bin(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
                ++s;
                 goto redo;
            }
-        if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT) && ckWARN(WARN_DIGIT))
-            Perl_warner(aTHX_ packWARN(WARN_DIGIT),
-                        "Illegal binary digit '%c' ignored", *s);
+        if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
+            Perl_ck_warner(aTHX_ packWARN(WARN_DIGIT),
+                          "Illegal binary digit '%c' ignored", *s);
         break;
     }
     
@@ -208,9 +210,8 @@ Perl_grok_bin(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
        || (!overflowed && value > 0xffffffff  )
 #endif
        ) {
-       if (ckWARN(WARN_PORTABLE))
-           Perl_warner(aTHX_ packWARN(WARN_PORTABLE),
-                       "Binary number > 0b11111111111111111111111111111111 non-portable");
+       Perl_ck_warner(aTHX_ packWARN(WARN_PORTABLE),
+                      "Binary number > 0b11111111111111111111111111111111 non-portable");
     }
     *len_p = s - start;
     if (!overflowed) {
@@ -316,8 +317,8 @@ Perl_grok_hex(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
                ++s;
                 goto redo;
            }
-        if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT) && ckWARN(WARN_DIGIT))
-            Perl_warner(aTHX_ packWARN(WARN_DIGIT),
+        if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
+            Perl_ck_warner(aTHX_ packWARN(WARN_DIGIT),
                         "Illegal hexadecimal digit '%c' ignored", *s);
         break;
     }
@@ -327,9 +328,8 @@ Perl_grok_hex(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
        || (!overflowed && value > 0xffffffff  )
 #endif
        ) {
-       if (ckWARN(WARN_PORTABLE))
-           Perl_warner(aTHX_ packWARN(WARN_PORTABLE),
-                       "Hexadecimal number > 0xffffffff non-portable");
+       Perl_ck_warner(aTHX_ packWARN(WARN_PORTABLE),
+                      "Hexadecimal number > 0xffffffff non-portable");
     }
     *len_p = s - start;
     if (!overflowed) {
@@ -422,9 +422,9 @@ Perl_grok_oct(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
          * as soon as non-octal characters are seen, complain only if
          * someone seems to want to use the digits eight and nine). */
         if (digit == 8 || digit == 9) {
-            if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT) && ckWARN(WARN_DIGIT))
-                Perl_warner(aTHX_ packWARN(WARN_DIGIT),
-                            "Illegal octal digit '%c' ignored", *s);
+            if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
+                Perl_ck_warner(aTHX_ packWARN(WARN_DIGIT),
+                              "Illegal octal digit '%c' ignored", *s);
         }
         break;
     }
@@ -434,9 +434,8 @@ Perl_grok_oct(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
        || (!overflowed && value > 0xffffffff  )
 #endif
        ) {
-       if (ckWARN(WARN_PORTABLE))
-           Perl_warner(aTHX_ packWARN(WARN_PORTABLE),
-                       "Octal number > 037777777777 non-portable");
+       Perl_ck_warner(aTHX_ packWARN(WARN_PORTABLE),
+                      "Octal number > 037777777777 non-portable");
     }
     *len_p = s - start;
     if (!overflowed) {