This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch to windres: Remove non-VIRTKEY warning for ALT


This resource script

virtkey_warn.rc=========================================

0x20 ACCELERATORS
BEGIN
"x", 0x2222, SHIFT
"y", 0x3333, CONTROL
"z", 0x4444, ALT
END

=========================================================

Produces the following warnings with windres (but still writes output)

virtkey_warn.rc:5: inappropriate modifiers for non-VIRTKEY
virtkey_warn.rc:6: inappropriate modifiers for non-VIRTKEY
virtkey_warn.rc:7: inappropriate modifiers for non-VIRTKEY

With  resource compiler shipped with MS PSDK, warnings are raised by SHIFT and
CONTROL but not by ALT

virtkey_warn.rc (5): warning RC4203 : SHIFT or CONTROL used without VIRTKEY
virtkey_warn.rc (6): warning RC4203 : SHIFT or CONTROL used without VIRTKEY

The attached patch makes windres warning conformant to native resource
compiler.

Tested with mingw32.  Objdumps of .res  files produced by windres
from virtkey_warn.rc are identical to MS rc.exe generated file before and
after patch.

2002-08-14  Luke Dunstan  <infidel@users.sourceforge.net>

	*rcparse.y (acc_entry): Don't warn about ALT use with
	non-VIRTKEY.

Index: rcparse.y
===================================================================
RCS file: /cvs/src/src/binutils/rcparse.y,v
retrieving revision 1.15
diff -u -p -r1.15 rcparse.y
--- rcparse.y	5 May 2002 23:19:32 -0000	1.15
+++ rcparse.y	14 Aug 2002 08:07:22 -0000
@@ -219,7 +219,7 @@ acc_entry:
 	    $$.id = $2;
 	    $$.flags |= $4;
 	    if (($$.flags & ACC_VIRTKEY) == 0
-		&& ($$.flags & (ACC_SHIFT | ACC_CONTROL | ACC_ALT)) != 0)
+		&& ($$.flags & (ACC_SHIFT | ACC_CONTROL)) != 0)
 	      rcparse_warning (_("inappropriate modifiers for non-VIRTKEY"));
 	  }
 	;

http://digital.yahoo.com.au - Yahoo! Digital How To
- Get the best out of your PC!


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