History log of /freebsd-10.1-release/usr.bin/printf/printf.1
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 233648 29-Mar-2012 eadler

Remove trailing whitespace per mdoc lint warning

Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days


# 222421 28-May-2011 jilles

printf(1): Document that %c and precision for %b/%s use bytes, not chars.

This means these features do not work as expected with multibyte characters.

This perhaps less than ideal behaviour matches printf(3) and is specified by
POSIX.


# 222418 28-May-2011 jilles

printf: Allow multibyte characters for '<char> form, avoid negative codes.

Examples:
LC_ALL=en_US.UTF-8 printf '%d\n' $(printf \'\\303\\244)
LC_ALL=en_US.ISO8859-1 printf '%d\n' $(printf \'\\344)
Both of these should print 228.

Like some other shells, incomplete or invalid multibyte characters yield the
value of the first byte without a warning.

Note that there is no general way to go back from the character code to the
character.


# 221026 25-Apr-2011 jilles

printf(1): Move non-bugs from the BUGS section to a new section CAVEATS.


# 221013 25-Apr-2011 jilles

printf(1): Mention effect of '#' modifier on other conversions.


# 216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# 215520 19-Nov-2010 jilles

sh: Add printf builtin.

This was removed in 2001 but I think it is appropriate to add it back:
* I do not want to encourage people to write fragile and non-portable echo
commands by making printf much slower than echo.
* Recent versions of Autoconf use it a lot.
* Almost no software still wants to support systems that do not have
printf(1) at all.
* In many other shells printf is already a builtin.

Side effect: printf is now always the builtin version (which behaves
identically to /usr/bin/printf) and cannot be overridden via PATH (except
via the undocumented %builtin mechanism).

Code size increases about 5K on i386. Embedded folks might want to replace
/usr/bin/printf with a hard link to /usr/bin/alias.


# 212374 09-Sep-2010 obrien

Note bug in trying to printf(1) things like: '-%s\n' "foo"


# 212244 05-Sep-2010 jilles

printf(1): Clarify that \OOO produces a byte, different %b escape sequences.

Octal escape sequences are expanded to bytes, not characters, and multiple
are required for a multibyte character.

The valid escape sequences in %b strings are slightly different from the
escape sequences in the format string.


# 147370 14-Jun-2005 ru

Markup and wording fixes.

Approved by: re (blanket)


# 145084 14-Apr-2005 stefanf

Update the bugs section, null characters in the format string are now handled.


# 143906 21-Mar-2005 das

Support the L modifier for floating-point values as an extension.
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.


# 140368 17-Jan-2005 ru

Added the EXIT STATUS section where appropriate.


# 131519 03-Jul-2004 tjr

Fix a markup nit and a misplaced full stop in previous.

Noticed by: ru


# 131511 02-Jul-2004 tjr

Document missing multibyte character support in utilities specified
by POSIX.


# 131507 02-Jul-2004 ru

Deal with double whitespace.


# 131491 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


# 130117 05-Jun-2004 das

s/latter/former/


# 130116 05-Jun-2004 das

- Document the %a, %A, and %F format specifiers.
- Document the way infinity and NaN are printed.
- Un-document the non-existent %w specifier.


# 100045 15-Jul-2002 keramida

Kill excessive whitespace between macro arguments.


# 97643 30-May-2002 keramida

Typo: characer -> character


# 97541 30-May-2002 ru

mdoc(7) police: lint.


# 95300 23-Apr-2002 jmallett

- printf shouldn't bail out if a conversion fails, it should just keep
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


# 95124 20-Apr-2002 charnier

Use `The .Nm utility'


# 89426 16-Jan-2002 ru

Replace reference to ANSI C draft with standard.

PR: docs/30731


# 86824 23-Nov-2001 dd

The RETURN VALUES section is not appropriate for section 1 manual
pages; rename it to DIAGNOSTICS. Also use the .Ex macro while I'm
here.


# 86693 20-Nov-2001 knu

(null commit to correct the previous log message)

Now that all the printf invocations from within the system startup
scripts *have been replaced with equivalent handmade functions*, we
can safely remove it.

Please steal the technique from src/etc/MAKEDEV when you want to use
printf(1) functionality from within the system rc scripts.


# 86692 20-Nov-2001 knu

Remove the printf builtin command from sh(1), which command is not
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.


# 79755 15-Jul-2001 dd

Remove whitespace at EOL.


# 79366 06-Jul-2001 ru

mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).


# 72313 10-Feb-2001 ru

mdoc(7) police: mark LC_NUMERIC with .Dv.


# 72304 10-Feb-2001 ache

Localize it (LC_NUMERIC)


# 70197 19-Dec-2000 ru

Prepare for mdoc(7)NG.


# 63734 21-Jul-2000 chris

Revert to 1.8. I misread the sentence and its context.


# 63733 21-Jul-2000 chris

Properly document %.0f behavior.


# 56264 19-Jan-2000 chris

Document truncation of strings when a NUL character is reached in a format
string.

PR: 15929
Submitted by: Daniel Hagan <dhagan@cs.vt.edu>


# 51275 14-Sep-1999 sheldonh

Correct some hard sentence breaks. Only those surrounding the previous
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


# 51090 08-Sep-1999 sheldonh

Improve shell documentation:

* 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


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 48792 12-Jul-1999 nik

Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

.\" $Id$
.\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by: bde


# 27887 04-Aug-1997 charnier

Correct Synopsys section.


# 15163 09-Apr-1996 mpp

Correctly match the format flags and their descriptions.

Submitted by: Dave Glowacki <dglo@ssec.wisc.edu>


# 1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.


# 1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources