More de-cut-and-pastos.
[p5sagit/p5-mst-13.2.git] / perly_c.diff
index aa0555b..11664b4 100644 (file)
@@ -1,38 +1,51 @@
-*** perly.c.orig       Tue Jul 28 15:02:41 1998
---- perly.c    Tue Jul 28 15:14:54 1998
+*** perly.c.orig       Tue Oct 27 12:59:58 1998
+--- perly.c    Tue Oct 27 13:00:18 1998
 ***************
-*** 7,11 ****
---- 7,19 ----
+*** 7,10 ****
+--- 7,27 ----
   #include "perl.h"
   
++ #define yydebug          PL_yydebug
++ #define yynerrs          PL_yynerrs
++ #define yyerrflag   PL_yyerrflag
++ #define yychar           PL_yychar
++ #define yyssp            PL_yyssp
++ #define yyvsp            PL_yyvsp
++ #define yyval            PL_yyval
++ #define yylval           PL_yylval
++ 
 + #ifdef PERL_OBJECT
-  static void
++ static void
 + Dep(CPerlObj *pPerl)
 + {
 +     pPerl->deprecate("\"do\" to call subroutines");
 + }
 + #define dep() Dep(this)
 + #else
-+ static void
+  static void
   dep(void)
-  {
 ***************
-*** 12,86 ****
+*** 12,91 ****
       deprecate("\"do\" to call subroutines");
   }
   
   #line 30 "perly.y"
-- #ifndef OEMVS
-- #line 33 "perly.y"
+- /* I sense a Big Blue pattern here... */
+- #if !defined(OEMVS) && !defined(__OPEN_VM) && !defined(POSIX_BC)
+- #line 34 "perly.y"
 - typedef union {
 -     I32      ival;
 -     char *pval;
 -     OP *opval;
 -     GV *gvval;
 - } YYSTYPE;
-- #line 41 "perly.y"
-- #endif /* OEMVS */
-- #line 27 "y.tab.c"
+- #line 42 "perly.y"
+- #endif /* !OEMVS && !__OPEN_VM && !POSIX_BC */
+- 
+- #ifdef USE_PURE_BISON
+- #define YYLEX_PARAM (&yychar)
+- #endif
+- #line 32 "y.tab.c"
 - #define WORD 257
 - #define METHOD 258
 - #define FUNCMETH 259
 - #define ARROW 314
   #define YYERRCODE 256
   short yylhs[] = {                                        -1,
---- 20,26 ----
+--- 29,35 ----
       deprecate("\"do\" to call subroutines");
   }
 + #endif
   #define YYERRCODE 256
   short yylhs[] = {                                        -1,
 ***************
-*** 1345,1365 ****
-  YYSTYPE yyval;
-  YYSTYPE yylval;
+*** 1342,1370 ****
+  #endif
+  #endif
+- int yydebug;
+- int yynerrs;
+- int yyerrflag;
+- int yychar;
+- short *yyssp;
+- YYSTYPE *yyvsp;
+- YYSTYPE yyval;
+- YYSTYPE yylval;
 - short yyss[YYSTACKSIZE];
 - YYSTYPE yyvs[YYSTACKSIZE];
 - #define yystacksize YYSTACKSIZE
-  #line 643 "perly.y"
+  #line 648 "perly.y"
    /* PROGRAM */
-! #line 1353 "y.tab.c"
+! #line 1358 "y.tab.c"
   #define YYABORT goto yyabort
   #define YYACCEPT goto yyaccept
   #define YYERROR goto yyerrlab
   
       if (yys = getenv("YYDEBUG"))
       {
---- 1285,1349 ----
-  YYSTYPE yyval;
-  YYSTYPE yylval;
-  #line 643 "perly.y"
+--- 1286,1350 ----
+  #endif
+  #endif
+  #line 648 "perly.y"
    /* PROGRAM */
-! #line 1353 "perly.c"
+! #line 1358 "perly.c"
   #define YYABORT goto yyabort
   #define YYACCEPT goto yyaccept
   #define YYERROR goto yyerrlab
       extern char *getenv();
 + #endif
 + #endif
-  
++ 
 +     struct ysv *ysave;
 +     New(73, ysave, 1, struct ysv);
 +     SAVEDESTRUCTOR(yydestruct, ysave);
 +     ysave->oldyychar = yychar;
 +     ysave->oldyyval  = yyval;
 +     ysave->oldyylval = yylval;
-+ 
+  
 + #if YYDEBUG
       if (yys = getenv("YYDEBUG"))
       {
 ***************
-*** 1374,1377 ****
---- 1358,1371 ----
+*** 1379,1382 ****
+--- 1359,1372 ----
       yychar = (-1);
   
 +     /*
       yyssp = yyss;
       yyvsp = yyvs;
 ***************
-*** 1389,1393 ****
-              if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-              if (!yys) yys = "illegal-symbol";
-!             printf("yydebug: state %d, reading %d (%s)\n", yystate,
-                      yychar, yys);
-          }
---- 1383,1387 ----
-              if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-              if (!yys) yys = "illegal-symbol";
-!             PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n", yystate,
-                      yychar, yys);
-          }
-***************
-*** 1399,1403 ****
+*** 1404,1413 ****
   #if YYDEBUG
           if (yydebug)
 !             printf("yydebug: state %d, shifting to state %d\n",
                       yystate, yytable[yyn]);
   #endif
---- 1393,1397 ----
-  #if YYDEBUG
-          if (yydebug)
-!             PerlIO_printf(Perl_debug_log, "yydebug: state %d, shifting to state %d\n",
-                      yystate, yytable[yyn]);
-  #endif
-***************
-*** 1404,1408 ****
           if (yyssp >= yyss + yystacksize - 1)
           {
 !             goto yyoverflow;
           }
           *++yyssp = yystate = yytable[yyn];
---- 1398,1416 ----
+--- 1394,1417 ----
+  #if YYDEBUG
+          if (yydebug)
+!             PerlIO_printf(Perl_debug_log, "yydebug: state %d, shifting to state %d\n",
+                      yystate, yytable[yyn]);
+  #endif
           if (yyssp >= yyss + yystacksize - 1)
           {
 !          /*
 !          int yypv_index = (yyvsp - yyvs);
 !          yystacksize += YYSTACKSIZE;
 !          ysave->yyvs = yyvs =
-!              (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
+!              (YYSTYPE*)PerlMem_realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
 !          ysave->yyss = yyss =
-!              (short*)realloc((char*)yyss,yystacksize * sizeof(short));
+!              (short*)PerlMem_realloc((char*)yyss,yystacksize * sizeof(short));
 !          if (!yyvs || !yyss)
 !              goto yyoverflow;
 !          yyssp = yyss + yyps_index;
           }
           *++yyssp = yystate = yytable[yyn];
 ***************
-*** 1440,1449 ****
+*** 1445,1454 ****
   #if YYDEBUG
                   if (yydebug)
 !                     printf("yydebug: state %d, error recovery shifting\
 !                     goto yyoverflow;
                   }
                   *++yyssp = yystate = yytable[yyn];
---- 1448,1472 ----
+--- 1449,1473 ----
   #if YYDEBUG
                   if (yydebug)
 !                     PerlIO_printf(Perl_debug_log,
 !                  int yyps_index = (yyssp - yyss);
 !                  int yypv_index = (yyvsp - yyvs);
 !                  yystacksize += YYSTACKSIZE;
-!                  ysave->yyvs = yyvs = (YYSTYPE*)realloc((char*)yyvs,
+!                  ysave->yyvs = yyvs = (YYSTYPE*)PerlMem_realloc((char*)yyvs,
 !                      yystacksize * sizeof(YYSTYPE));
-!                  ysave->yyss = yyss = (short*)realloc((char*)yyss,
+!                  ysave->yyss = yyss = (short*)PerlMem_realloc((char*)yyss,
 !                      yystacksize * sizeof(short));
 !                  if (!yyvs || !yyss)
 !                      goto yyoverflow;
                   }
                   *++yyssp = yystate = yytable[yyn];
 ***************
-*** 1455,1460 ****
+*** 1460,1465 ****
   #if YYDEBUG
                   if (yydebug)
 !                     printf("yydebug: error recovery discarding state %d\n",
 !                             *yyssp);
   #endif
                   if (yyssp <= yyss) goto yyabort;
---- 1478,1484 ----
+--- 1479,1485 ----
   #if YYDEBUG
                   if (yydebug)
 !                     PerlIO_printf(Perl_debug_log,
   #endif
                   if (yyssp <= yyss) goto yyabort;
 ***************
-*** 1473,1478 ****
+*** 1478,1483 ****
               if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
               if (!yys) yys = "illegal-symbol";
 !             printf("yydebug: state %d, error recovery discards token %d (%s)\n",
 !                     yystate, yychar, yys);
           }
   #endif
---- 1497,1503 ----
+--- 1498,1504 ----
               if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
               if (!yys) yys = "illegal-symbol";
 !             PerlIO_printf(Perl_debug_log,
           }
   #endif
 ***************
-*** 1483,1487 ****
+*** 1488,1492 ****
   #if YYDEBUG
       if (yydebug)
 !         printf("yydebug: state %d, reducing by rule %d (%s)\n",
                   yystate, yyn, yyrule[yyn]);
   #endif
---- 1508,1512 ----
+--- 1509,1513 ----
   #if YYDEBUG
       if (yydebug)
 !         PerlIO_printf(Perl_debug_log, "yydebug: state %d, reducing by rule %d (%s)\n",
                   yystate, yyn, yyrule[yyn]);
   #endif
 ***************
-*** 2267,2271 ****
+*** 2272,2276 ****
   { yyval.opval = yyvsp[0].opval; }
   break;
-! #line 2270 "y.tab.c"
+! #line 2275 "y.tab.c"
       }
       yyssp -= yym;
---- 2292,2296 ----
+--- 2293,2297 ----
   { yyval.opval = yyvsp[0].opval; }
   break;
-! #line 2270 "perly.c"
+! #line 2275 "perly.c"
       }
       yyssp -= yym;
 ***************
-*** 2277,2282 ****
+*** 2282,2287 ****
   #if YYDEBUG
           if (yydebug)
 !             printf("yydebug: after reduction, shifting from state 0 to\
 !  state %d\n", YYFINAL);
   #endif
           yystate = YYFINAL;
---- 2302,2308 ----
+--- 2303,2309 ----
   #if YYDEBUG
           if (yydebug)
 !             PerlIO_printf(Perl_debug_log,
   #endif
           yystate = YYFINAL;
 ***************
-*** 2292,2296 ****
+*** 2297,2301 ****
                   if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
                   if (!yys) yys = "illegal-symbol";
 !                 printf("yydebug: state %d, reading %d (%s)\n",
                           YYFINAL, yychar, yys);
               }
---- 2318,2322 ----
+--- 2319,2323 ----
                   if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
                   if (!yys) yys = "illegal-symbol";
 !                 PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n",
                           YYFINAL, yychar, yys);
               }
 ***************
-*** 2307,2316 ****
+*** 2312,2321 ****
   #if YYDEBUG
       if (yydebug)
 !         printf("yydebug: after reduction, shifting from state %d \
 !         goto yyoverflow;
       }
       *++yyssp = yystate;
---- 2333,2357 ----
+--- 2334,2358 ----
   #if YYDEBUG
       if (yydebug)
 !         PerlIO_printf(Perl_debug_log,
 !      int yypv_index = (yyvsp - yyvs);
 !      yystacksize += YYSTACKSIZE;
 !      ysave->yyvs = yyvs =
-!          (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
+!          (YYSTYPE*)PerlMem_realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
 !      ysave->yyss = yyss =
-!          (short*)realloc((char*)yyss,yystacksize * sizeof(short));
+!          (short*)PerlMem_realloc((char*)yyss,yystacksize * sizeof(short));
 !      if (!yyvs || !yyss)
 !          goto yyoverflow;
 !      yyssp = yyss + yyps_index;
       }
       *++yyssp = yystate;
 ***************
-*** 2318,2325 ****
+*** 2323,2330 ****
       goto yyloop;
   yyoverflow:
 !     yyerror("yacc stack overflow");
   yyaccept:
 !     return (0);
   }
---- 2359,2366 ----
+--- 2360,2367 ----
       goto yyloop;
   yyoverflow:
 !     yyerror("Out of memory for yacc stack");