On Thu, Apr 19, 2012 at 1:04 PM, ольга крыжановская <[email protected]> wrote: > Here's one of Roland's old proposals: > > RFE: Extend ksh93's printf %q to accept a modifier which defines the > quoting mode. Supported modes should be: > > %(kshliteral)q same as existing %q > %(shliteral)q quote string with '\' (including spaces) that a POSIX > shell (and even the old bourne shell) can accept it > %(xml)q convert string into an xml literal (same as %H) > %(egrep)q convert string into a literal accepted plainly by egrep > (e.g. things like '[', ']', '(', ')' etc. are quoted) > %(grep)q convert string into a literal accepted plainly by grep (e.g. > things like '[', ']', etc. are quoted) > %(agrep)q, %(xgrep)q convert string into a literal accepted plainly by > grep -X/-A (e.g. things like '[', ']', '(', ')' etc. are quoted) > %(urlencode)q convert string into a literal accepted plainly as URL > (e.g. space gets encoded as '+', '!' as '%21', '*' as '%2A' etc.) > The modifers scheme will allow future extensions easily. > > Comments welcome, I can try to make the patches if David and Glenn > like the idea.
David, FYI: The C99 extensions for decimal floating point specify the new printf formats %Hf, %Df and %DDf for decimal floating point datatypes _Decimal32, _Decimal64 and _Decimal64 (these will become mandatory for the next C standard, including printf %Hf, %Df and %DDf formats). If AST wants to remain POSIX conform ant then %H for HTML has to be depreciated in favor of a different %<letter>. My preference would be the %(html)q proposal. Irek _______________________________________________ ast-developers mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-developers
