diff options
Diffstat (limited to 'contrib/perl5/perly_c.diff')
-rw-r--r-- | contrib/perl5/perly_c.diff | 104 |
1 files changed, 56 insertions, 48 deletions
diff --git a/contrib/perl5/perly_c.diff b/contrib/perl5/perly_c.diff index aa0555b..5107901 100644 --- a/contrib/perl5/perly_c.diff +++ b/contrib/perl5/perly_c.diff @@ -1,23 +1,12 @@ -*** perly.c.orig Tue Jul 28 15:02:41 1998 ---- perly.c Tue Jul 28 15:14:54 1998 +*** perly.c.old Wed Jan 06 20:03:41 1999 +--- perly.c Wed Jan 06 18:51:20 1999 *************** -*** 7,11 **** ---- 7,19 ---- +*** 7,86 **** #include "perl.h" -+ #ifdef PERL_OBJECT static void -+ Dep(CPerlObj *pPerl) -+ { -+ pPerl->deprecate("\"do\" to call subroutines"); -+ } -+ #define dep() Dep(this) -+ #else -+ static void dep(void) { -*************** -*** 12,86 **** deprecate("\"do\" to call subroutines"); } @@ -93,7 +82,20 @@ - #define ARROW 314 #define YYERRCODE 256 short yylhs[] = { -1, ---- 20,26 ---- +--- 7,26 ---- + #include "perl.h" + ++ #ifdef PERL_OBJECT + static void ++ Dep(CPerlObj *pPerl) ++ { ++ pPerl->deprecate("\"do\" to call subroutines"); ++ } ++ #define dep() Dep(this) ++ #else ++ static void + dep(void) + { deprecate("\"do\" to call subroutines"); } + #endif @@ -102,12 +104,20 @@ #define YYERRCODE 256 short yylhs[] = { -1, *************** +*** 1337,1340 **** +--- 1277,1281 ---- + #endif + #endif ++ #ifndef PERL_OBJECT + int yydebug; + int yynerrs; +*************** *** 1345,1365 **** YYSTYPE yyval; YYSTYPE yylval; -- short yyss[YYSTACKSIZE]; -- YYSTYPE yyvs[YYSTACKSIZE]; -- #define yystacksize YYSTACKSIZE +! short yyss[YYSTACKSIZE]; +! YYSTYPE yyvs[YYSTACKSIZE]; +! #define yystacksize YYSTACKSIZE #line 643 "perly.y" /* PROGRAM */ ! #line 1353 "y.tab.c" @@ -124,9 +134,10 @@ if (yys = getenv("YYDEBUG")) { ---- 1285,1349 ---- +--- 1286,1351 ---- YYSTYPE yyval; YYSTYPE yylval; +! #endif #line 643 "perly.y" /* PROGRAM */ ! #line 1353 "perly.c" @@ -176,7 +187,7 @@ extern char *getenv(); + #endif + #endif - ++ + struct ysv *ysave; + New(73, ysave, 1, struct ysv); + SAVEDESTRUCTOR(yydestruct, ysave); @@ -186,13 +197,13 @@ + ysave->oldyychar = yychar; + ysave->oldyyval = yyval; + ysave->oldyylval = yylval; -+ + + #if YYDEBUG if (yys = getenv("YYDEBUG")) { *************** *** 1374,1377 **** ---- 1358,1371 ---- +--- 1360,1373 ---- yychar = (-1); + /* @@ -214,33 +225,30 @@ ! printf("yydebug: state %d, reading %d (%s)\n", yystate, yychar, yys); } ---- 1383,1387 ---- +--- 1385,1389 ---- 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 **** +*** 1399,1408 **** #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 ---- +--- 1395,1418 ---- + #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) { ! /* @@ -251,9 +259,9 @@ ! 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; @@ -272,7 +280,7 @@ ! goto yyoverflow; } *++yyssp = yystate = yytable[yyn]; ---- 1448,1472 ---- +--- 1450,1474 ---- #if YYDEBUG if (yydebug) ! PerlIO_printf(Perl_debug_log, @@ -288,9 +296,9 @@ ! 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; @@ -306,7 +314,7 @@ ! *yyssp); #endif if (yyssp <= yyss) goto yyabort; ---- 1478,1484 ---- +--- 1480,1486 ---- #if YYDEBUG if (yydebug) ! PerlIO_printf(Perl_debug_log, @@ -322,7 +330,7 @@ ! yystate, yychar, yys); } #endif ---- 1497,1503 ---- +--- 1499,1505 ---- if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; ! PerlIO_printf(Perl_debug_log, @@ -337,7 +345,7 @@ ! printf("yydebug: state %d, reducing by rule %d (%s)\n", yystate, yyn, yyrule[yyn]); #endif ---- 1508,1512 ---- +--- 1510,1514 ---- #if YYDEBUG if (yydebug) ! PerlIO_printf(Perl_debug_log, "yydebug: state %d, reducing by rule %d (%s)\n", @@ -350,7 +358,7 @@ ! #line 2270 "y.tab.c" } yyssp -= yym; ---- 2292,2296 ---- +--- 2294,2298 ---- { yyval.opval = yyvsp[0].opval; } break; ! #line 2270 "perly.c" @@ -364,7 +372,7 @@ ! state %d\n", YYFINAL); #endif yystate = YYFINAL; ---- 2302,2308 ---- +--- 2304,2310 ---- #if YYDEBUG if (yydebug) ! PerlIO_printf(Perl_debug_log, @@ -379,7 +387,7 @@ ! printf("yydebug: state %d, reading %d (%s)\n", YYFINAL, yychar, yys); } ---- 2318,2322 ---- +--- 2320,2324 ---- if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; ! PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n", @@ -397,7 +405,7 @@ ! goto yyoverflow; } *++yyssp = yystate; ---- 2333,2357 ---- +--- 2335,2359 ---- #if YYDEBUG if (yydebug) ! PerlIO_printf(Perl_debug_log, @@ -414,9 +422,9 @@ ! 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; @@ -433,7 +441,7 @@ yyaccept: ! return (0); } ---- 2359,2366 ---- +--- 2361,2368 ---- goto yyloop; yyoverflow: ! yyerror("Out of memory for yacc stack"); |