When L is omitted, double precision is used, so printf(1) gives
reproducable results. When L is specified, long double precision is
used, which may improve precision, depending on the machine.
possible to print the thousands separator in the locale setups that
have one, by something like this:
$ env -i LC_NUMERIC=en_US.ISO8859-1 ./printf "%'0.2f\n" 12345
12,345.00
Reviewed by: das
being reported by /usr/bin/printf.
This bug has been around for 22 months... either nobody uses printf
with floating-point values, or people are forgetting to check their
return codes.
Approved by: rwatson (mentor)
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.
Reviewed by: md5
Exit with nonzero status if a conversion failed.
Play nice if used as a shell builtin (currently disabled).
Submitted by: bde (partially)
Approved by: mike
processing them.
- \c escape to immediately stop output (similar to echo's \c)
- \0NNN should be allowed for octal character escapes (instead of just \NNN)
- %b conversion, which is like %s but interprets \n \t etc. inside the
string is missing.
And I may not be any poet, but in lieu of an in-tree regression test:
ref5% ./printf '%s%b%b%c%s%d\n' 'PR' '\0072' '\t' '3' '56' 0x10
PR: 35616
Submitted by: tjr
MFC after: 1 week
of the recent WARNS commits. The idea is:
1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.
used so often that it's worth keeping it as a builtin.
Now that all the printf invocations from within the system startup
scripts, we can safely remove it.
Urged by: sheldonh :)
No MFC is planned so far because it may break compatibility and
violate POLA.
commit and those which cause ugly nroff output have been fixed, since
the purpose of the style guideline which they contravene is to reduce
the sizes of deltas.
Reported by: bde
* Consistently misspell built-in as builtin.
* Add a builtin(1) manpage and create builtin(1) MLINKS for all shell
builtin commands for which no standalone utility exists. These MLINKS
replace those that were created for csh(1).
* Add appropriate xrefs for builtin(1) to the csh(1) and sh(1) manpages,
as well as to the manpages of standalone utilities which are supported
as shell builtin commands in at least one of the shells. In such
manpages, explain that similar functionality may be provided as a
shell builtin command.
* Improve sh(1)'s description of the cd builtin command. Csh(1) already
describes it adequately. Replace the cd(1) manpage with a builtin(1)
MLINKS link.
* Clean up some mdoc problems: use Xr instead of literal "foo(n)"; use
Ic instead of Xr for shell builtin commands.
* Undo English contractions.
Reviewed by: mpp, rgrimes