Wrc patch
kenon at go2.pl
kenon at go2.pl
Sun May 27 19:54:36 CDT 2001
Hi,
This patch is an answer for "Call for volunteers".
I hope it fixes : "wrc fails on preprocessed files"
#115: http://wine.codeweavers.com/bugzilla/show_bug.cgi?id=115
Maciek
Changelog
* tools/wrc/ppy.y
Maciek Kaliszewski <kenon at go2.pl>
Added better GCC-style #line directive handling.
--
-------------- next part --------------
--- tools/wrc/ppy.y_or Mon May 28 01:40:07 2001
+++ tools/wrc/ppy.y Mon May 28 02:28:29 2001
@@ -150,7 +150,7 @@
%type <cval> pp_expr
%type <marg> emargs margs
%type <mtext> opt_mtexts mtexts mtext
-%type <sint> nums allmargs
+%type <sint> allmargs
%type <cptr> opt_text text
/*
@@ -253,7 +253,15 @@
add_macro($1, macro_args, nmacro_args, $5);
}
| tLINE tSINT tDQSTRING tNL { fprintf(ppout, "# %d %s\n", $2 - 1, $3); free($3); }
- | tGCCLINE tDQSTRING nums tNL { fprintf(ppout, "# %d %s\n", $3 - 1, $2); free($2); }
+ | tGCCLINE tSINT tDQSTRING tNL { fprintf(ppout, "# %d %s\n", $2 , $3); free($3); }
+ | tGCCLINE tSINT tDQSTRING tSINT tNL
+ { fprintf(ppout, "# %d %s %d\n", $2, $3, $4); free($3); }
+ | tGCCLINE tSINT tDQSTRING tSINT tSINT tNL
+ { fprintf(ppout, "# %d %s %d %d\n", $2 ,$3, $4, $5); free($3); }
+ | tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tNL
+ { fprintf(ppout, "# %d %s %d %d %d\n", $2 ,$3 ,$4 ,$5, $6); free($3); }
+ | tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tSINT tNL
+ { fprintf(ppout, "# %d %s %d %d %d %d \n", $2 ,$3 ,$4 ,$5, $6, $7); free($3); }
| tGCCLINE tNL /* The null-token */
| tERROR opt_text tNL { pperror("#error directive: '%s'", $2); if($2) free($2); }
| tWARNING opt_text tNL { ppwarning("#warning directive: '%s'", $2); if($2) free($2); }
@@ -275,10 +283,6 @@
;
res_arg : /* Empty */ { macro_args = NULL; nmacro_args = 0; }
- ;
-
-nums : tSINT { $$ = $1; }
- | nums tSINT /* Ignore */
;
allmargs: /* Empty */ { $$ = 0; macro_args = NULL; nmacro_args = 0; }
More information about the wine-devel
mailing list