printf(1): don't use getopt, second take
authorSimon Schubert <corecode@dragonflybsd.org>
Thu, 20 Aug 2009 18:21:26 +0000 (20:21 +0200)
committerSimon Schubert <corecode@dragonflybsd.org>
Thu, 20 Aug 2009 18:26:36 +0000 (20:26 +0200)
commit48c719803a04b9995a2fd9e4312f051296046b00
tree4c3f4040d9109991b399a95574deafa73e25134a
parentd557216fb547c13bfc5427231709ef29494c5f38
printf(1): don't use getopt, second take

printf must not use getopt, since any passed string is
valid, also strings starting with -, i.e.
printf -f%s oo
has to print "-foo" and not error out with
"illegal option".

However, if printf is passed "--" as an argument separator, we have to
discard it and may not print it.
usr.bin/printf/printf.c