aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/printf
Commit message (Collapse)AuthorAgeFilesLines
* Prefer {u,}intmax_t over the deprecated {u_,}quad_t.Stefan Farfeleder2005-08-051-17/+18
| | | | Notes: svn path=/head/; revision=148721
* Markup and wording fixes.Ruslan Ermilov2005-06-141-1/+1
| | | | | | | Approved by: re (blanket) Notes: svn path=/head/; revision=147370
* Sync program's usage() with manpage's SYNOPSIS.Ruslan Ermilov2005-05-211-1/+1
| | | | Notes: svn path=/head/; revision=146466
* Update the bugs section, null characters in the format string are now handled.Stefan Farfeleder2005-04-141-6/+4
| | | | Notes: svn path=/head/; revision=145084
* Handle null characters in the format string. A \0 in the argument passed to %bStefan Farfeleder2005-04-141-7/+13
| | | | | | | still results in trucation but this is be much harder to fix. Notes: svn path=/head/; revision=145078
* No reason to write \a and \v as octal escape sequences.Stefan Farfeleder2005-04-141-2/+2
| | | | Notes: svn path=/head/; revision=145074
* Printf(1) is WARNS 6 clean.Stefan Farfeleder2005-04-141-0/+1
| | | | Notes: svn path=/head/; revision=145063
* - Move parts of the long main() function into a new function doformat().Stefan Farfeleder2005-04-141-152/+159
| | | | | | | - Rewrite the loop in main() to be more understandable. Notes: svn path=/head/; revision=145061
* Assign 0.0 to the variable passed to getfloating() if the argument is missing.Stefan Farfeleder2005-04-131-1/+3
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=145027
* Replace buggy for-loops to skip certain character with strspn(). If *fmt wasStefan Farfeleder2005-04-111-3/+3
| | | | | | | | | | '\0' (eg in the invocation 'printf %'), the for-loop would miss the terminating null character. MFC after: 1 week Notes: svn path=/head/; revision=144902
* Support the L modifier for floating-point values as an extension.David Schultz2005-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. Notes: svn path=/head/; revision=143906
* Added the EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-171-1/+1
| | | | Notes: svn path=/head/; revision=140368
* Allow %' to be used as a format flag by printf(1). This makes itGiorgos Keramidas2004-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 Notes: svn path=/head/; revision=135751
* Fix a markup nit and a misplaced full stop in previous.Tim J. Robbins2004-07-031-2/+2
| | | | | | | Noticed by: ru Notes: svn path=/head/; revision=131519
* Document missing multibyte character support in utilities specifiedTim J. Robbins2004-07-031-1/+6
| | | | | | | by POSIX. Notes: svn path=/head/; revision=131511
* Deal with double whitespace.Ruslan Ermilov2004-07-031-4/+4
| | | | Notes: svn path=/head/; revision=131507
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-7/+14
| | | | Notes: svn path=/head/; revision=131491
* s/latter/former/David Schultz2004-06-051-1/+1
| | | | Notes: svn path=/head/; revision=130117
* - Document the %a, %A, and %F format specifiers.David Schultz2004-06-051-3/+31
| | | | | | | | - Document the way infinity and NaN are printed. - Un-document the non-existent %w specifier. Notes: svn path=/head/; revision=130116
* Enable support for the %a, %A, and %F format specifiers.David Schultz2004-06-051-1/+4
| | | | Notes: svn path=/head/; revision=130115
* Make it possible for the %[eEfgG] formats to not result in an errorColin Percival2004-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) Notes: svn path=/head/; revision=126729
* ANSIify function definitions.David Malone2002-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 Notes: svn path=/head/; revision=102944
* Kill excessive whitespace between macro arguments.Giorgos Keramidas2002-07-151-5/+5
| | | | Notes: svn path=/head/; revision=100045
* Fix duplicate % in %b format introduced in rev 1.22.Tim J. Robbins2002-06-191-5/+6
| | | | Notes: svn path=/head/; revision=98426
* Let printf(1) tell the difference between zero width/precision andTim J. Robbins2002-06-191-7/+9
| | | | | | | | | | | unspecified width/precision. PR: 39116 Submitted by: Egil Brendsdal <egilb@ife.no> MFC after: 1 week Notes: svn path=/head/; revision=98424
* Allow format strings containing "%%" to be reused.Tim J. Robbins2002-06-191-2/+2
| | | | | | | | | PR: 39116 Submitted by: Egil Brendsdal <egilb@ife.no> MFC after: 1 week Notes: svn path=/head/; revision=98420
* Allow `%' to be written out with an octal escape (\45 or \045).Tim J. Robbins2002-06-191-1/+5
| | | | | | | | | PR: 39116 Submitted by: Egil Brendsdal <egilb@ife.no> MFC after: 1 week Notes: svn path=/head/; revision=98419
* Typo: characer -> characterGiorgos Keramidas2002-05-311-1/+1
| | | | Notes: svn path=/head/; revision=97643
* mdoc(7) police: lint.Ruslan Ermilov2002-05-301-10/+8
| | | | Notes: svn path=/head/; revision=97541
* Handle numbers larger than QUAD_MAX for unsigned conversions correctly.Tim J. Robbins2002-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 Notes: svn path=/head/; revision=95409
* - printf shouldn't bail out if a conversion fails, it should just keepJuli Mallett2002-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 Notes: svn path=/head/; revision=95300
* Use `The .Nm utility'Philippe Charnier2002-04-201-2/+3
| | | | Notes: svn path=/head/; revision=95124
* remove __PWarner Losh2002-03-221-9/+9
| | | | Notes: svn path=/head/; revision=92921
* Remove leaf node WARNS?=2 (that mainly I added). This shouldMark Murray2002-02-081-1/+0
| | | | | | | help the GCC3 transition and CURRENT in general. Notes: svn path=/head/; revision=90415
* Replace reference to ANSI C draft with standard.Ruslan Ermilov2002-01-161-4/+1
| | | | | | | PR: docs/30731 Notes: svn path=/head/; revision=89426
* Style improvements recommended by Bruce as a follow up to someDavid Malone2001-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. Notes: svn path=/head/; revision=87628
* Warns cleanups.David Malone2001-12-032-5/+7
| | | | Notes: svn path=/head/; revision=87298
* The RETURN VALUES section is not appropriate for section 1 manualDima Dorfman2001-11-231-3/+2
| | | | | | | | pages; rename it to DIAGNOSTICS. Also use the .Ex macro while I'm here. Notes: svn path=/head/; revision=86824
* Remove the printf builtin command from sh(1), which command is notAkinori MUSHA2001-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. Notes: svn path=/head/; revision=86692
* Remove whitespace at EOL.Dima Dorfman2001-07-151-3/+3
| | | | Notes: svn path=/head/; revision=79755
* mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).Ruslan Ermilov2001-07-061-2/+2
| | | | Notes: svn path=/head/; revision=79366
* mdoc(7) police: mark LC_NUMERIC with .Dv.Ruslan Ermilov2001-02-101-1/+2
| | | | Notes: svn path=/head/; revision=72313
* Localize it (LC_NUMERIC)Andrey A. Chernov2001-02-102-0/+10
| | | | Notes: svn path=/head/; revision=72304
* Fix printf(1) for cases where a long string with no format specifiers isBen Smithurst2000-12-211-4/+16
| | | | | | | | | followed by a %d (probably others too) format specifier. Reviewed by: audit Notes: svn path=/head/; revision=70256
* Prepare for mdoc(7)NG.Ruslan Ermilov2000-12-191-2/+5
| | | | Notes: svn path=/head/; revision=70197
* When we have both a rcsid and sccsid, ifdef 0 the sccsid. ThisWarner Losh2000-09-041-0/+2
| | | | | | | | appears to be the standard FreeBSD way to do this. style(9) is silent about this, however. Notes: svn path=/head/; revision=65429
* Revert to 1.8. I misread the sentence and its context.Chris Costello2000-07-211-2/+1
| | | | Notes: svn path=/head/; revision=63734
* Properly document %.0f behavior.Chris Costello2000-07-211-1/+2
| | | | Notes: svn path=/head/; revision=63733
* Extend to deal with 64 bit numeric arguments.Stefan Eßer2000-07-101-14/+17
| | | | Notes: svn path=/head/; revision=62928
* Remove redundat extern declarationMartin Cracauer2000-04-201-1/+2
| | | | Notes: svn path=/head/; revision=59435