Wrc patch
Francois Gouget
fgouget at free.fr
Fri Jun 1 13:53:30 CDT 2001
On Tue, 29 May 2001 kenon at go2.pl wrote:
> Hi,
> Opps. I sent this patch to wine-devel. Sorry for this ( This was bug in
> my .muttrc file) . Ok I resend it to wine-patches.
>
> 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
Many thanks for the patch. Also it's nice to see that my call for
volunteers did not get lost into oblivion :-)
I tested the patch and there was just one problem left. On files
preprocessed by MS's tool, the wrc preprocessor performed the following
transformation:
#line 1 "ctlmacro.rc"
into
# 0 "ctlmacro.rc"
Which then caused wrc to fail.
So I removed the '-1' of the line number and now it works (I
checked and we report the right line for errors).
Changelog:
* tools/wrc/ppy.y
Fix the conversion of MS style '#line' directives to gcc style
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
If it stinks, it's chemistry. If it moves, it's biology.
If it does not work, It's computer science.
-------------- next part --------------
Index: tools/wrc/ppy.y
===================================================================
RCS file: /home/cvs/wine/wine/tools/wrc/ppy.y,v
retrieving revision 1.4
diff -u -r1.4 ppy.y
--- tools/wrc/ppy.y 2001/05/29 20:51:26 1.4
+++ tools/wrc/ppy.y 2001/06/01 18:30:54
@@ -252,7 +252,7 @@
| tMACRO res_arg allmargs tMACROEND opt_mtexts tNL {
add_macro($1, macro_args, nmacro_args, $5);
}
- | tLINE tSINT tDQSTRING tNL { fprintf(ppout, "# %d %s\n", $2 - 1, $3); free($3); }
+ | tLINE tSINT tDQSTRING tNL { fprintf(ppout, "# %d %s\n", $2 , $3); free($3); }
| 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); }
@@ -261,7 +261,7 @@
| 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); }
+ { 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); }
More information about the wine-patches
mailing list