This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Resource compiler problems (was RE: Why is cygwin.dll?)



I have modified the lex/yacc files from the rcl source distribution in
order to compile the API Bible examples and some other resources files.

Changes for rccparse.l:
- Suffix L accepted at end of decimal value
- {  and } can replace BEGIN and END

diff output:

38c38
< NUMBER      [0-9]*|0(x|X)[(0-9)|(a-f)|(A-F)]*L{0,1}
---
> NUMBER      [0-9]*L{0,1}|0(x|X)[(0-9)|(a-f)|(A-F)]*L{0,1}
83a84,86
> \{/{NOCHAR}		return BEG;
> \}/{NOCHAR}		return END;
> 


Changes for rccparse.y:
- Dialog item CONTROL syntax
- Dialog item ICON    syntax

diff output

58a59
> 
590,614c591,592
<                     DLGITEMTEMPLATE *ctrl = &$$.res.bin.control;
<                     $$.res.typeID[0] = (WCHAR) -1;
<                     $$.res.typeID[1] = CTL_BUTTON;
<                     ansi2uni($$.res.nameID, $2.string);
<                     ctrl->id = $3.value;
<                     ctrl->x = $5.value;
<                     ctrl->y = $7.value;
<                     ctrl->cx = $9.value;
<                     ctrl->cy = $11.value;
<                     ctrl->style = $14.value;
<                     ctrl->dwExtendedStyle = $16.value;
<                 }
<              | CONTROL QUOTEDSTRING ',' numexpr ',' numexpr ',' numexpr ',' numexpr ',' numexpr ',' numexpr '\n'
<                 {
<                     DLGITEMTEMPLATE *ctrl = &$$.res.bin.control;
<                     $$.res.typeID[0] = (WCHAR) -1;
<                     $$.res.typeID[1] = CTL_BUTTON;
<                     ansi2uni($$.res.nameID, $2.string);
<                     ctrl->id = $3.value;
<                     ctrl->x = $5.value;
<                     ctrl->y = $7.value;
<                     ctrl->cx = $9.value;
<                     ctrl->cy = $11.value;
<                     ctrl->style = $14.value;
<                     ctrl->dwExtendedStyle = 0;
---
>                     CONTROLWITHTITLE(&$$, $2.string, $4.value, $10.value, $12.value, $14.value, $16.value,
> 										$6.value, $8.value, 0);
616c594
<              | CONTROL QUOTEDSTRING ',' numexpr ',' numexpr ',' numexpr ',' numexpr ',' numexpr '\n'
---
>              | CONTROL QUOTEDSTRING ',' numexpr ',' QUOTEDSTRING ',' numexpr ',' numexpr ',' numexpr ',' numexpr ',' numexpr '\n'
618,620c596,597
<                     DLGITEMTEMPLATE *ctrl = &$$.res.bin.control;
<                     $$.res.typeID[0] = (WCHAR) -1;
<                     $$.res.typeID[1] = CTL_BUTTON;
---
>                     DLGITEMTEMPLATE *ctrl = &$$.res.bin.control;                    
>                     ansi2uni($$.res.typeID, $6.string);
622,627c599,604
<                     ctrl->id = $3.value;
<                     ctrl->x = $5.value;
<                     ctrl->y = $7.value;
<                     ctrl->cx = $9.value;
<                     ctrl->cy = $11.value;
<                     ctrl->style = 0;
---
>                     ctrl->id = $4.value;
>                     ctrl->x = $10.value;
>                     ctrl->y = $12.value;
>                     ctrl->cx = $14.value;
>                     ctrl->cy = $16.value;
>                     ctrl->style = $8.value;
705c682
<              | ICON STRING ',' numexpr ',' numexpr ',' numexpr ',' numexpr ',' numexpr ',' numexpr ',' numexpr '\n'
---
>              | ICON STRING ',' numexpr ',' numexpr ',' numexpr ',' numexpr '\n'
707,708c684,685
<                     CONTROLWITHTITLE(&$$, $2.string, $4.value, $6.value, $8.value, $10.value, $12.value,
< 										CTL_STATIC, SS_ICON, $16.value);
---
>                     CONTROLWITHTITLE(&$$, $2.string, $4.value, $6.value, $8.value, 0, 0,
> 										CTL_STATIC, $10.value, 0);
710c687
<              | ICON STRING ',' numexpr ',' numexpr ',' numexpr ',' numexpr ',' numexpr ',' numexpr '\n'
---
>              | ICON STRING ',' numexpr ',' numexpr ',' numexpr '\n'
712,717c689
<                     CONTROLWITHTITLE(&$$, $2.string, $4.value, $6.value, $8.value, $10.value, $12.value,
< 										CTL_STATIC, SS_ICON, 0);
<                 }
<              | ICON STRING ',' numexpr ',' numexpr ',' numexpr ',' numexpr ',' numexpr '\n'
<                 {
<                     CONTROLWITHTITLE(&$$, $2.string, $4.value, $6.value, $8.value, $10.value, $12.value,
---
>                     CONTROLWITHTITLE(&$$, $2.string, $4.value, $6.value, $8.value, 0, 0,


All the stuff is compiled under mingwin32 and linked against crtdll 
(not cygwin). It is necessary to make the corrections of Windows32API-0.1.2
described in the html page "Gotchas and Surprises" of mingwin32 .

Remark 1. The API Bible uses a "generic icon" whose the format is not recognized
by the cvtres program, nor by the MS Image Editor. I had to replace it by
another before running rcl... 

Remark 2. I have also tried the lrc editor from Jacob Navia which runs OK.
One can load it from http://www.remcomp.com/lcc-win32 .

			jl Hamel
			hamel@republique.saclay.cea.fr




-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]