BSD/OS (bsdi) hints update by Timur I. Bakeyev and Todd C. Miller,
[p5sagit/p5-mst-13.2.git] / perly.y
diff --git a/perly.y b/perly.y
index 93e5f77..5170b36 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -1,6 +1,6 @@
 /*    perly.y
  *
- *    Copyright (c) 1991-1997, Larry Wall
+ *    Copyright (c) 1991-2000, Larry Wall
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -39,22 +39,7 @@ struct ysv {
     YYSTYPE oldyylval;
 };
 
-static void yydestruct(void *ptr);
-
-static void
-yydestruct(void *ptr)
-{
-    struct ysv* ysave = (struct ysv*)ptr;
-    if (ysave->yyss) Safefree(ysave->yyss);
-    if (ysave->yyvs) Safefree(ysave->yyvs);
-    yydebug    = ysave->oldyydebug;
-    yynerrs    = ysave->oldyynerrs;
-    yyerrflag  = ysave->oldyyerrflag;
-    yychar     = ysave->oldyychar;
-    yyval      = ysave->oldyyval;
-    yylval     = ysave->oldyylval;
-    Safefree(ysave);
-}
+static void yydestruct(pTHXo_ void *ptr);
 
 %}
 
@@ -352,7 +337,7 @@ startformsub:       /* NULL */      /* start a format subroutine scope */
 
 subname        :       WORD    { STRLEN n_a; char *name = SvPV(((SVOP*)$1)->op_sv,n_a);
                          if (strEQ(name, "BEGIN") || strEQ(name, "END")
-                             || strEQ(name, "INIT"))
+                             || strEQ(name, "INIT") || strEQ(name, "CHECK"))
                              CvSPECIAL_on(PL_compcv);
                          $$ = $1; }
        ;