This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Patch to windres: Remove non-VIRTKEY warning for ALT
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: binutils <binutils at sources dot redhat dot com>
- Cc: infidel at users dot sourceforge dot net
- Date: Wed, 14 Aug 2002 20:09:04 +1000 (EST)
- Subject: 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!