Re: [dev] [surf] [PATCH] Fixed SETPROP() macro behaviour in config.def.h to handle escapes correctly.

2013-03-21 Thread Alexander Sedov
Let's face it: xargs default behaviour is not well-defined. It would probably work with xprop output, where quotes are escaped, but it's better not to risk. Also, we probably want to keep occasional spaces on their places. I believe that xargs implementation that doesn't implement -0 is unheard of.

Re: [dev] [surf] [PATCH] Fixed SETPROP() macro behaviour in config.def.h to handle escapes correctly.

2013-03-21 Thread Nick
On Thu, Mar 21, 2013 at 06:12:30PM +0100, Joseph BOUDOU wrote: > xargs -0 isn't POSIX neither. But anywhere with xargs installed probably has xargs -0 functionality (is there even an alternative implementation?) Other implementations of echo are more likely, so conservatism makes sense there.

Re: [dev] [surf] [PATCH] Fixed SETPROP() macro behaviour in config.def.h to handle escapes correctly.

2013-03-21 Thread Christoph Lohmann
Greetings. On Thu, 21 Mar 2013 18:11:00 +0100 Alexander Sedov wrote: > xprop prints information in format PROPERTY(STRING) = "escaped string", > which causes problem with repeated Ctrl-F: any non-ascii turns into > \ooo\ooo, this later turns into \\ooo\\ooo, and so on. To de-escape > string, pri

Re: [dev] [surf] [PATCH] Fixed SETPROP() macro behaviour in config.def.h to handle escapes correctly.

2013-03-21 Thread Joseph BOUDOU
xargs -0 isn't POSIX neither. -- Joseph BOUDOU

[dev] [surf] [PATCH] Fixed SETPROP() macro behaviour in config.def.h to handle escapes correctly.

2013-03-21 Thread Alexander Sedov
xprop prints information in format PROPERTY(STRING) = "escaped string", which causes problem with repeated Ctrl-F: any non-ascii turns into \ooo\ooo, this later turns into \\ooo\\ooo, and so on. To de-escape string, printf(1) is used, getting information from xargs -0; without -0 xargs will try to

Re: [dev] [surf] [PATCH] Fixed SETPROP() macro behaviour in config.def.h to handle escapes correctly.

2013-03-21 Thread Alexander Sedov
2013/3/21 Nick : > On Thu, Mar 21, 2013 at 07:26:23PM +0400, Alexander Sedov wrote: > Can this be done with printf? ISTR echo -en isn't posix, whereas > printf is well defined. You make a point.

Re: [dev] [surf] [PATCH] Fixed SETPROP() macro behaviour in config.def.h to handle escapes correctly.

2013-03-21 Thread Nick
On Thu, Mar 21, 2013 at 07:26:23PM +0400, Alexander Sedov wrote: > xprop prints information in format PROPERTY(STRING) = "escaped string", > which causes problem with repeated Ctrl-F: any non-ascii turns into > \ooo\ooo, this later turns into \\ooo\\ooo, and so on. To de-escape > string, echo -en i

[dev] [surf] [PATCH] Fixed SETPROP() macro behaviour in config.def.h to handle escapes correctly.

2013-03-21 Thread Alexander Sedov
xprop prints information in format PROPERTY(STRING) = "escaped string", which causes problem with repeated Ctrl-F: any non-ascii turns into \ooo\ooo, this later turns into \\ooo\\ooo, and so on. To de-escape string, echo -en is used, getting information from xargs -0; without -0 xargs will try to h