multiline strings in .rc files (was: Implementation of "start.exe", take 3)

Dan Kegel dank at kegel.com
Sat Jan 18 18:10:35 CST 2003


davep wrote:
>>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tools/rc_
>>490l.asp says that \ is a simple line-continuation character.  Thus \ at
>>the end of a line in the .rc file should not insert a newline
>>in the resource, I think.  And it looks like our resource compiler
>>is violating this.
> 
>>After squinting at our source, I came up with a one-line patch
>>to fix our resource compiler (attached).
>>If that looks good, I can do a patch that fixes up all our .rc files
>>that expected backslash to behave in a nonstandard way.
> 
> 
> Right. I can't find reference in the documentation on Borland's way of 
> handling this, and in any case BC5 is long obsolete. Patching Wine's 
> resource compiler to work the way Win32 developers would expect looks like 
> the Right Thing.

OK.  I improved my patch to handle L"strings", and
made it eat whitespace at the beginning of
continued lines (that's what msvc6's rc does).
Also update wcmd's rc file to match; none of the
others looked like they desperately needed changing.

To see the effect, blow away all your .res files
before rebuilding, else make might not know to run wrc again.

Patch submitted to wine-patches (filename backslash-2.patch).
- Dan

-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045




More information about the wine-devel mailing list