[1/3] cmd/tests: Use plain strings instead of char arrays for keywords

Dan Kegel dank at kegel.com
Fri Jun 24 12:11:14 CDT 2011

2011/6/24 Frédéric Delanoy <frederic.delanoy at gmail.com>:
> On Fri, Jun 24, 2011 at 17:16, Dan Kegel <dank at kegel.com> wrote:
>> Frédéric Delanoy wrote:
>> -    static const char escaped_space[] = {'@','s','p','a','c','e','@','\0'};
>> +    static const char *escaped_space = "@space@";
>> I'm not sure it's worth the effort, since eventually we want
>> cmd to use unicode internally, at which point we'll have
>> to go back to using arrays.
> Well it seems you changed your mind since you were the one suggesting
> this (on IRC) ;)

I think we discussed it in email.  I was wondering about it:

> The current code is a bit ugly.  If you're going to add a
> nice is_todo_wine_line() helper, it might make sense
> to do a cleanup patch that cleans up the @keyword@
> recognition in general first.  (Why the verbose array
> declaration instead of a "constant"?  etc.)
>Nah, looking at the code, it was so that sizeof() would not include
>the trailing NUL.

and it's true, I didn't mention the wchar issue then.  Sorry.
- Dan

More information about the wine-devel mailing list