[win32] foo() -> PerlGroup_foo() patch from ActiveState
[p5sagit/p5-mst-13.2.git] / perly.c.diff
index dae42d3..e13b04b 100644 (file)
@@ -78,7 +78,7 @@ Index: perly.c
   #define YYERRCODE 256
   short yylhs[] = {                                        -1,
 ***************
-*** 1296,1306 ****
+*** 1348,1358 ****
   int yyerrflag;
   int yychar;
 - short *yyssp;
@@ -88,12 +88,24 @@ Index: perly.c
 - short yyss[YYSTACKSIZE];
 - YYSTYPE yyvs[YYSTACKSIZE];
 - #define yystacksize YYSTACKSIZE
-  #line 602 "perly.y"
+  #line 632 "perly.y"
    /* PROGRAM */
---- 1231,1236 ----
+--- 1283,1288 ----
 ***************
-*** 1309,1320 ****
---- 1239,1295 ----
+*** 1361,1372 ****
+  #define YYACCEPT goto yyaccept
+  #define YYERROR goto yyerrlab
+  int
+! yyparse()
+  {
+      register int yym, yyn, yystate;
+  #if YYDEBUG
+      register char *yys;
+      extern char *getenv();
+  
+      if (yys = getenv("YYDEBUG"))
+      {
+--- 1291,1348 ----
   #define YYACCEPT goto yyaccept
   #define YYERROR goto yyerrlab
 + 
@@ -109,8 +121,7 @@ Index: perly.c
 + };
 + 
 + void
-+ yydestruct(ptr)
-+ void* ptr;
++ yydestruct(void *ptr)
 + {
 +     struct ysv* ysave = (struct ysv*)ptr;
 +     if (ysave->yyss) Safefree(ysave->yyss);
@@ -125,7 +136,7 @@ Index: perly.c
 + }
 + 
   int
-  yyparse()
+! yyparse(void)
   {
       register int yym, yyn, yystate;
 +     register short *yyssp;
@@ -136,8 +147,10 @@ Index: perly.c
 +     int retval = 0;
   #if YYDEBUG
       register char *yys;
++ #ifndef __cplusplus
       extern char *getenv();
 + #endif
++ #endif
 + 
 +     struct ysv *ysave = (struct ysv*)safemalloc(sizeof(struct ysv));
 +     SAVEDESTRUCTOR(yydestruct, ysave);
@@ -152,8 +165,8 @@ Index: perly.c
       if (yys = getenv("YYDEBUG"))
       {
 ***************
-*** 1329,1332 ****
---- 1304,1315 ----
+*** 1381,1384 ****
+--- 1357,1368 ----
       yychar = (-1);
   
 +     /*
@@ -167,20 +180,20 @@ Index: perly.c
       yyssp = yyss;
       yyvsp = yyvs;
 ***************
-*** 1344,1348 ****
+*** 1396,1400 ****
               if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
               if (!yys) yys = "illegal-symbol";
 !             printf("yydebug: state %d, reading %d (%s)\n", yystate,
                       yychar, yys);
           }
---- 1327,1331 ----
+--- 1380,1384 ----
               if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
               if (!yys) yys = "illegal-symbol";
 !             fprintf(stderr, "yydebug: state %d, reading %d (%s)\n", yystate,
                       yychar, yys);
           }
 ***************
-*** 1354,1363 ****
+*** 1406,1415 ****
   #if YYDEBUG
           if (yydebug)
 !             printf("yydebug: state %d, shifting to state %d\n",
@@ -191,7 +204,7 @@ Index: perly.c
 !             goto yyoverflow;
           }
           *++yyssp = yystate = yytable[yyn];
---- 1337,1360 ----
+--- 1390,1413 ----
   #if YYDEBUG
           if (yydebug)
 !             fprintf(stderr, "yydebug: state %d, shifting to state %d\n",
@@ -217,7 +230,7 @@ Index: perly.c
           }
           *++yyssp = yystate = yytable[yyn];
 ***************
-*** 1395,1404 ****
+*** 1447,1456 ****
   #if YYDEBUG
                   if (yydebug)
 !                     printf("yydebug: state %d, error recovery shifting\
@@ -228,7 +241,7 @@ Index: perly.c
 !                     goto yyoverflow;
                   }
                   *++yyssp = yystate = yytable[yyn];
---- 1392,1416 ----
+--- 1445,1469 ----
   #if YYDEBUG
                   if (yydebug)
 !                     fprintf(stderr,
@@ -255,14 +268,14 @@ Index: perly.c
                   }
                   *++yyssp = yystate = yytable[yyn];
 ***************
-*** 1410,1415 ****
+*** 1462,1467 ****
   #if YYDEBUG
                   if (yydebug)
 !                     printf("yydebug: error recovery discarding state %d\n",
 !                             *yyssp);
   #endif
                   if (yyssp <= yyss) goto yyabort;
---- 1422,1428 ----
+--- 1475,1481 ----
   #if YYDEBUG
                   if (yydebug)
 !                     fprintf(stderr,
@@ -271,14 +284,14 @@ Index: perly.c
   #endif
                   if (yyssp <= yyss) goto yyabort;
 ***************
-*** 1428,1433 ****
+*** 1480,1485 ****
               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
---- 1441,1447 ----
+--- 1494,1500 ----
               if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
               if (!yys) yys = "illegal-symbol";
 !             fprintf(stderr,
@@ -287,27 +300,27 @@ Index: perly.c
           }
   #endif
 ***************
-*** 1438,1442 ****
+*** 1490,1494 ****
   #if YYDEBUG
       if (yydebug)
 !         printf("yydebug: state %d, reducing by rule %d (%s)\n",
                   yystate, yyn, yyrule[yyn]);
   #endif
---- 1452,1456 ----
+--- 1505,1509 ----
   #if YYDEBUG
       if (yydebug)
 !         fprintf(stderr, "yydebug: state %d, reducing by rule %d (%s)\n",
                   yystate, yyn, yyrule[yyn]);
   #endif
 ***************
-*** 2185,2190 ****
+*** 2279,2284 ****
   #if YYDEBUG
           if (yydebug)
 !             printf("yydebug: after reduction, shifting from state 0 to\
 !  state %d\n", YYFINAL);
   #endif
           yystate = YYFINAL;
---- 2199,2205 ----
+--- 2294,2300 ----
   #if YYDEBUG
           if (yydebug)
 !             fprintf(stderr,
@@ -316,20 +329,20 @@ Index: perly.c
   #endif
           yystate = YYFINAL;
 ***************
-*** 2200,2204 ****
+*** 2294,2298 ****
                   if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
                   if (!yys) yys = "illegal-symbol";
 !                 printf("yydebug: state %d, reading %d (%s)\n",
                           YYFINAL, yychar, yys);
               }
---- 2215,2219 ----
+--- 2310,2314 ----
                   if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
                   if (!yys) yys = "illegal-symbol";
 !                 fprintf(stderr, "yydebug: state %d, reading %d (%s)\n",
                           YYFINAL, yychar, yys);
               }
 ***************
-*** 2215,2224 ****
+*** 2309,2318 ****
   #if YYDEBUG
       if (yydebug)
 !         printf("yydebug: after reduction, shifting from state %d \
@@ -340,7 +353,7 @@ Index: perly.c
 !         goto yyoverflow;
       }
       *++yyssp = yystate;
---- 2230,2254 ----
+--- 2325,2349 ----
   #if YYDEBUG
       if (yydebug)
 !         fprintf(stderr,
@@ -367,7 +380,7 @@ Index: perly.c
       }
       *++yyssp = yystate;
 ***************
-*** 2226,2233 ****
+*** 2320,2327 ****
       goto yyloop;
   yyoverflow:
 !     yyerror("yacc stack overflow");
@@ -376,7 +389,7 @@ Index: perly.c
   yyaccept:
 !     return (0);
   }
---- 2256,2263 ----
+--- 2351,2358 ----
       goto yyloop;
   yyoverflow:
 !     yyerror("Out of memory for yacc stack");