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.
On Fri, Jun 24, 2011 at 17:16, Dan Kegel dank@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) ;)
Frédéric
2011/6/24 Frédéric Delanoy frederic.delanoy@gmail.com:
On Fri, Jun 24, 2011 at 17:16, Dan Kegel dank@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