summaryrefslogtreecommitdiffstats
path: root/usr.bin/printf
Commit message (Collapse)AuthorAgeFilesLines
* POSIX says that octal escapes have the format \ddd in the format string,das2008-08-021-1/+2
| | | | | | | | | but \0ddd in a %b argument, with a length restriction of 3 octal digits in either case. This seems silly, but it needs to be right so it's possible to write an octal escape followed by an ordinary digit. Solaris printf(1) and GNU printf(1) also behave this way. Example: "printf '\0752'" now produces "=2" instead of garbage.
* Prefer {u,}intmax_t over the deprecated {u_,}quad_t.stefanf2005-08-051-17/+18
|
* Markup and wording fixes.ru2005-06-141-1/+1
| | | | Approved by: re (blanket)
* Sync program's usage() with manpage's SYNOPSIS.ru2005-05-211-1/+1
|
* Update the bugs section, null characters in the format string are now handled.stefanf2005-04-141-6/+4
|
* Handle null characters in the format string. A \0 in the argument passed to %bstefanf2005-04-141-7/+13
| | | | still results in trucation but this is be much harder to fix.
* No reason to write \a and \v as octal escape sequences.stefanf2005-04-141-2/+2
|
* Printf(1) is WARNS 6 clean.stefanf2005-04-141-0/+1
|
* - Move parts of the long main() function into a new function doformat().stefanf2005-04-141-153/+160
| | | | - Rewrite the loop in main() to be more understandable.
* Assign 0.0 to the variable passed to getfloating() if the argument is missing.stefanf2005-04-131-1/+3
| | | | MFC after: 1 week
* Replace buggy for-loops to skip certain character with strspn(). If *fmt wasstefanf2005-04-111-3/+3
| | | | | | | '\0' (eg in the invocation 'printf %'), the for-loop would miss the terminating null character. MFC after: 1 week
* Support the L modifier for floating-point values as an extension.das2005-03-212-6/+44
| | | | | | 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.
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+1
|
* Allow %' to be used as a format flag by printf(1). This makes itkeramida2004-09-241-1/+1
| | | | | | | | | | 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
* Fix a markup nit and a misplaced full stop in previous.tjr2004-07-031-2/+2
| | | | Noticed by: ru
* Document missing multibyte character support in utilities specifiedtjr2004-07-031-1/+6
| | | | by POSIX.
* Deal with double whitespace.ru2004-07-031-4/+4
|
* Mechanically kill hard sentence breaks.ru2004-07-021-7/+14
|
* s/latter/former/das2004-06-051-1/+1
|
* - Document the %a, %A, and %F format specifiers.das2004-06-051-3/+31
| | | | | - Document the way infinity and NaN are printed. - Un-document the non-existent %w specifier.
* Enable support for the %a, %A, and %F format specifiers.das2004-06-051-1/+4
|
* Make it possible for the %[eEfgG] formats to not result in an errorcperciva2004-03-071-1/+1
| | | | | | | | | | 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)
* ANSIify function definitions.dwmalone2002-09-041-25/+14
| | | | | | | | | 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
* Kill excessive whitespace between macro arguments.keramida2002-07-151-5/+5
|
* Fix duplicate % in %b format introduced in rev 1.22.tjr2002-06-191-5/+6
|
* Let printf(1) tell the difference between zero width/precision andtjr2002-06-191-7/+9
| | | | | | | | unspecified width/precision. PR: 39116 Submitted by: Egil Brendsdal <egilb@ife.no> MFC after: 1 week
* Allow format strings containing "%%" to be reused.tjr2002-06-191-2/+2
| | | | | | PR: 39116 Submitted by: Egil Brendsdal <egilb@ife.no> MFC after: 1 week
* Allow `%' to be written out with an octal escape (\45 or \045).tjr2002-06-191-1/+5
| | | | | | PR: 39116 Submitted by: Egil Brendsdal <egilb@ife.no> MFC after: 1 week
* Typo: characer -> characterkeramida2002-05-311-1/+1
|
* mdoc(7) police: lint.ru2002-05-301-10/+8
|
* Handle numbers larger than QUAD_MAX for unsigned conversions correctly.tjr2002-04-251-50/+96
| | | | | | | | 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
* - printf shouldn't bail out if a conversion fails, it should just keepjmallett2002-04-232-42/+93
| | | | | | | | | | | | | | | 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
* Use `The .Nm utility'charnier2002-04-201-2/+3
|
* remove __Pimp2002-03-221-9/+9
|
* Remove leaf node WARNS?=2 (that mainly I added). This shouldmarkm2002-02-081-1/+0
| | | | help the GCC3 transition and CURRENT in general.
* Replace reference to ANSI C draft with standard.ru2002-01-161-4/+1
| | | | PR: docs/30731
* Style improvements recommended by Bruce as a follow up to somedwmalone2001-12-101-1/+1
| | | | | | | | 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.
* Warns cleanups.dwmalone2001-12-032-5/+7
|
* The RETURN VALUES section is not appropriate for section 1 manualdd2001-11-231-3/+2
| | | | | pages; rename it to DIAGNOSTICS. Also use the .Ex macro while I'm here.
* Remove the printf builtin command from sh(1), which command is notknu2001-11-201-10/+0
| | | | | | | | | | | | 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.
* Remove whitespace at EOL.dd2001-07-151-3/+3
|
* mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).ru2001-07-061-2/+2
|
* mdoc(7) police: mark LC_NUMERIC with .Dv.ru2001-02-101-1/+2
|
* Localize it (LC_NUMERIC)ache2001-02-102-0/+10
|
* Fix printf(1) for cases where a long string with no format specifiers isben2000-12-211-4/+16
| | | | | | followed by a %d (probably others too) format specifier. Reviewed by: audit
* Prepare for mdoc(7)NG.ru2000-12-191-2/+5
|
* When we have both a rcsid and sccsid, ifdef 0 the sccsid. Thisimp2000-09-041-0/+2
| | | | | appears to be the standard FreeBSD way to do this. style(9) is silent about this, however.
* Revert to 1.8. I misread the sentence and its context.chris2000-07-211-2/+1
|
* Properly document %.0f behavior.chris2000-07-211-1/+2
|
* Extend to deal with 64 bit numeric arguments.se2000-07-101-14/+17
|
OpenPOWER on IntegriCloud