tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: printf and -m
On Sat, Aug 22, 2015 at 04:28:32AM +0100, Roy Marples wrote:
> >I also think we should deprecate %m in syslog, but I don't see how
> >it's possible to do so in practice.
>
> Could you expand on the rationale for this please?
It is a wart. It's a magic special case; it uses a global variable
under the table; it doesn't accomplish anything that can't be done
clearly and explicitly with strerror(3).
> reduces code size
You could make up all manner of other magic special cases to insert in
printf to reduce code size. How about printf("%H") to print "hello
world"? How about adding an option to cat to sort the input data
before numbering the lines?
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index