From: hamel AT republique DOT saclay DOT cea DOT fr (jl Hamel) Subject: Re: Resource compiler problems (was RE: Why is cygwin.dll?) 6 Feb 1997 09:09:22 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199702061417.PAA13916.cygnus.gnu-win32@republique.saclay.cea.fr> Original-To: colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp Original-Cc: gnu-win32 AT cygnus DOT com X-Sun-Charset: US-ASCII Original-Sender: owner-gnu-win32 AT cygnus DOT com 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 AT republique DOT saclay DOT cea DOT fr - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".