|
Re: printf \xNNN: msg#00098gnu.core-utils.bugs
Jim Meyering <jim@xxxxxxxxxxxx> writes: > I was surprised to see that according to POSIX, > > http://www.opengroup.org/onlinepubs/007904975/utilities/printf.html > > printf does not recognize hexadecimal constants: Yes, and that's why my POSIX-related patch of yesterday <http://mail.gnu.org/archive/html/bug-coreutils/2003-03/msg00094.html> changed "*p == 'x'" to "!posixly_correct && (*p == 'x')". (Hmm, sorry about the redundant parentheses. :-) > Hexadecimal character constants as defined in the ISO C standard are not > recognized in the format operand because there is no consistent way to > detect the end of the constant. Yes, that's a problem. > The current implementation is consistent (at least in this respect) > with the one in bash's built-in printf command, so I think it's best > to leave it the way it is, at least for the upcoming coreutils-5.0. > What do you think? There are good arguments both ways. I can certainly understand your leaving it the way that it is. However, I would document the incompatibility with C. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: bug: printf overruns an argument: 00098, Jim Meyering |
|---|---|
| Next by Date: | PATCH: (yet another) internationalisation fix: 00098, Martin Quinson |
| Previous by Thread: | Re: printf \xNNNi: 00098, Jim Meyering |
| Next by Thread: | PATCH: (yet another) internationalisation fix: 00098, Martin Quinson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | Mail Home | sitemap | FAQ | advertise |