public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] windres (ungarbled): (10) The digits A-F are interpreted as 0-5  (Bernd Herd)
@ 2002-03-19 15:31 Gunnar Degnbol
  2002-04-09  8:38 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Gunnar Degnbol @ 2002-03-19 15:31 UTC (permalink / raw)
  To: binutils

This was posted by Bernd Herd in february as part of a large 
patch bundling several fixes: 
http://sources.redhat.com/ml/binutils/2002-02/msg00021.html

ChangeLog:

2002-03-19 Bernd Herd <info@herdsoft.com>

	* rclex.l: "\xhex" encoding in strings corrected

escapex.rc:

101 DIALOG DISCARDABLE  0, 0, 186, 95
BEGIN
    LTEXT "\xB0",-1,23,46,28,8
END

Before patch:

$ /bin/windres -i escapex.rc
LANGUAGE 0, 0

101 DIALOG MOVEABLE DISCARDABLE 0, 0, 186, 95
STYLE 0x80880000
BEGIN
  LTEXT "\020", 65535, 23, 46, 28, 8, 0x50020000
END

After patch:

$ /usr/local/bin/windres -i escapex.rc
LANGUAGE 9, 1

101 DIALOG MOVEABLE DISCARDABLE 0, 0, 186, 95
STYLE 0x80880000
BEGIN
  LTEXT "\260", 65535, 23, 46, 28, 8, 0x50020000
END

escapex.patch
--- binutils/rclex.l	Sun Mar 17 14:53:32 2002
+++ binutils.new/rclex.l	Sun Mar 17 14:53:37 2002
@@ -394,9 +394,9 @@
 		  if (*t >= '0' && *t <= '9')
 		    ch = (ch << 4) | (*t - '0');
 		  else if (*t >= 'a' && *t <= 'f')
-		    ch = (ch << 4) | (*t - 'a');
+		    ch = (ch << 4) | (*t - 'a' + 10);
 		  else if (*t >= 'A' && *t <= 'F')
-		    ch = (ch << 4) | (*t - 'A');
+		    ch = (ch << 4) | (*t - 'A' + 10);
 		  else
 		    break;
 		  ++t;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] windres (ungarbled): (10) The digits A-F are interpreted as 0-5  (Bernd Herd)
  2002-03-19 15:31 [PATCH] windres (ungarbled): (10) The digits A-F are interpreted as 0-5 (Bernd Herd) Gunnar Degnbol
@ 2002-04-09  8:38 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2002-04-09  8:38 UTC (permalink / raw)
  To: gunnar; +Cc: binutils

Hi Gunnar Degnbol,

: 2002-03-19 Bernd Herd <info@herdsoft.com>
: 
: 	* rclex.l: "\xhex" encoding in strings corrected

Approved and applied.

Note - I also generated a testcase from your submitted example
program.

Cheers
	Nick

2002-04-09  Nick Clifton  <nickc@cambridge.redhat.com>

	* binutils-all/windres/escapex.rc: New test case for hex constants
	in strings.
	* binutils-all/windres/escapex.rsd: Expected output

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-09 15:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-19 15:31 [PATCH] windres (ungarbled): (10) The digits A-F are interpreted as 0-5 (Bernd Herd) Gunnar Degnbol
2002-04-09  8:38 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).