freebsd-src/usr.bin/printf
Xin LI 02a4a3f56c IEEE Std 1003.1-2008, Section 1.4, Utility Description Defaults says
that when the options section is listed as "None", utility shall
recognize "--" as a first argument to be discarded.

This implementation is largely based on OpenBSD implementation but
we do slightly differently:

a) We skip argv[0] as the first step;
b) We test whether the next argument is "--" and ignore it.

With this change one will get:

%printf
usage: printf format [arguments ...]
%printf -v
-v%printf -- -v
-v%
%printf --
usage: printf format [arguments ...]

Which matches the behavior observed on a Debian system but different
from the Illumos change.
2010-12-14 01:16:56 +00:00
..
Makefile Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
printf.1 Remove the advertising clause from UCB copyrighted files in usr.bin. This 2010-12-11 08:32:16 +00:00
printf.c IEEE Std 1003.1-2008, Section 1.4, Utility Description Defaults says 2010-12-14 01:16:56 +00:00