On Wed, Jun 3, 2009 at 9:28 AM, Alexandre Julliard <[email protected]> wrote: > > Tijnema <[email protected]> writes: > > > Hello all, > > > > I was just checking around some old bugs and found 786 still opened. I've > > written a patch for it, but I want to know if I'm anywhere close to get it > > in. > > That would be a good way to handle quoted strings, but that's not what > Windows does. It doesn't really handle them, the quotes are simply > copied through. You can probably even put quotes in the middle of the > name. The behavior of the RC parser can be quite mysterious at times. >
Thanks, didn't notice that one. I've checked it with the rc from visual studio 2008 and you're right, it's really mysterious(just like the rest of windows). Single and double quotes are just copied, but only if they are in pairs. Though, there can be a single quote within two double quotes, and the other way around. I've attached a patch for this behaviour, is it ready to send to wine-patches? Matijn Woudt
From 6064f93f1d0479efa5da627045c693dde8d69f8c Mon Sep 17 00:00:00 2001 From: Matijn Woudt <[email protected]> Date: Wed, 3 Jun 2009 12:42:21 +0200 Subject: wrc: Add support for nameID with single and double quotes. --- tools/wrc/parser.l | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l index bddc309..be73068 100644 --- a/tools/wrc/parser.l +++ b/tools/wrc/parser.l @@ -404,7 +404,7 @@ static unsigned long xstrtoul(const char *nptr, char **endptr, int base) * and *only* in a filename. In this case, the second * rule will be reduced because it is longer. */ -[A-Za-z_0-9.]+ { +(([']["A-Za-z_0-9.]+['])|(["]['A-Za-z_0-9.]+["])|([A-Za-z_0-9.]+))+ { struct keyword *tok = iskeyword(yytext); if(tok) -- 1.6.0.4
