summaryrefslogtreecommitdiffstats
path: root/usr.bin/printf (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Usually, -width Fl (which is 10n) is too wide and hence ugly.schwarze2020-01-161-3/+3
| | | | Change several instances, most of them to the usual -width Ds.
* document octal escape format in %b arguments;schwarze2019-08-021-3/+22
| | | | | omission reported by Andras Farkas <deepbluemistake at gmail dot com>; OK deraadt@ jmc@, and Andras Farkas also checked the patch
* Fix incorrect character escape.bentley2019-06-021-3/+3
| | | | From Stephen Gregoratto; thanks!
* remove the Ic macro from EXAMPLES, and use a much more standard literal;jmc2018-03-131-15/+10
| | | | while there, kill some Tn
* Fix two documentation bugs:schwarze2016-11-181-5/+10
| | | | | | | 1. Specifying a precision for the %s format character limits the number of bytes printed, not the number of characters. 2. Document the intentional POSIX violation of ignoring the locale. Feedback and OK jmc@, bentley@.
* Delete useless call to setlocale(3).schwarze2016-11-181-13/+9
| | | | | | | | | | | | While the C library function printf(3) is used here and is locale-dependent, the printf(1) utility does not use the locale dependent parts %lc and %ls. While POSIX requires LC_NUMERIC support, we intentionally don't implement that in printf(3). In summary, no functional change. While here, sort headers and use the usual __dead usage() idiom. Based on a patch from Jan Stary <hans at stare dot cz>. OK bentley@
* fix signed char extension bugs. from fade@cock.li. ok guenther.tedu2016-07-271-4/+4
| | | | | | As a personal remark, I'll add that it's not necessary to cast a value to a function's return type. The compiler is happy to do that for you. But such casts can hide warnings and bugs.
* Change all tame callers to namechange to pledge(2).deraadt2015-10-091-3/+3
|
* obvious tame "stdio". For those not keeping score, this is anotherderaadt2015-10-061-1/+5
| | | | | program which has had string mismanagement bugs before, probably of the exploitable fashion.. if used in the wrong kind of script..
* Reduce usage of predefined strings in manpages.bentley2015-02-281-4/+4
| | | | | | | | | | | Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@
* document the special \c escape sequence that can only be used with %b;schwarze2014-10-221-4/+13
| | | | | | | | gap found by guenther@ following a question asked by Frank Brodbeck <fab at split dash brain dot de>; while here, sort escape sequences, this part of the patch from Frank Brodbeck; ok guenther@
* don't use plural "arguments" in SYNOPSIS, since "..." makes itjmc2014-05-252-10/+8
| | | | | redundant; tweak the rest of the page to stop using both forms, and tweak usage(), which was wrong anyway, to match this;
* Use errc/warnc to simplify code.guenther2014-05-201-2/+2
| | | | | | Also, in 'ftp', always put the error message last, after the hostname/ipaddr. ok jsing@ krw@ millert@
* - document two escape sequences as extensions in STANDARDSjmc2014-05-131-8/+5
| | | | | | | | - document undefined behaviour for unlisted formats in combination with `#'; guenther helped me organise this into a saner piece of text ok guenther
* Handle passing zero to a variable fieldwidth or precision.guenther2014-04-181-6/+9
| | | | ok deraadt@
* isxdigit() needs unsigned char cast for this specific argumentderaadt2013-11-201-2/+2
| | | | ok ratchov
* Warn and stop processing if the format string ends with an backslash.guenther2011-06-181-1/+6
| | | | From Andres Perera (andres.p at zoho.com), ok otto@, millert@
* more EXIT STATUS bits; from Daniel Dickmanjmc2010-10-211-5/+3
|
* add an EXIT STATUS section for /usr/bin;jmc2010-09-031-3/+3
|
* dispense with some wacky escape sequences;jmc2010-03-261-4/+4
|
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-12/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* remove BUILTIN/SHELL cruft that used to be needed for sh, which ismartynas2009-07-191-30/+2
| | | | gone; and killed in csh w. rev. 1.7. ok millert@
* be more careful with parsing format string. we can't do multiplemartynas2009-07-171-11/+23
| | | | | | | widths or precisions. fixes crash reported by Maksymilian Arciemowicz, where printf(3) took more args from stack than printf(1) passed it. behavior consistent with linucses and ieee 1003.1-2001. ok millert@, otto@
* bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a fewjmc2009-02-081-3/+3
| | | | updates to follow;
* - describe how printf(1) and printf(3) %e, %E, %g, %G, %a, %A behavemartynas2008-09-151-2/+38
| | | | | when the argument is infinity/not-a-number ok millert@, jmc@
* describe %a/%A. from freebsdmartynas2008-09-141-4/+17
| | | | tweaks/ok millert@, jmc@
* - add descriptions for %F, and infinity/not-a-number from printf(3)martynas2008-09-081-4/+17
| | | | - add missing %e to the format list
* enable support for %a, %A, %F. ok theomartynas2008-09-081-2/+5
|
* printf(1) does not take any options but still needs to ignore the "--"millert2008-06-191-2/+8
| | | | (end of options) flag. OK deraadt@ espie@
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* - use a consistent text for STANDARDSjmc2007-05-301-4/+5
| | | | - note which options are extensions to POSIX
* zap unused variables, ok beck@pedro2004-05-311-3/+2
|
* Don't not use getopt() in printf(1) since it causes formats beginningmillert2003-06-231-15/+4
| | | | | with a '-' to be interpreted as flags. Noticed by Alan Barrett. There is really no reason for this to be a builtin in csh...
* mostly ansi cleanup; pval okderaadt2003-06-101-23/+15
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-032-13/+5
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* snprintfderaadt2003-03-301-3/+3
|
* small typos;jmc2003-03-181-2/+2
| | | | ok miod@
* use $ or # before commands in examplesderaadt2002-11-141-3/+3
|
* We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.millert2002-02-191-21/+2
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-14/+14
|
* kill more registersmpech2001-11-191-6/+6
| | | | millert@ ok
* It's not that I mind split infinitives. I just like to save'em for whenpjanzen2001-02-171-3/+3
| | | | they're really needed.
* repair same static buf oflow in printf(1) and printf(1) internal inside csh(1)deraadt2000-12-221-5/+29
|
* Put the fmt strings CAVEATS section into userland printf(1) man page, too;aaron2000-10-191-1/+12
| | | | it applies here as well.
* Fix some formatting problems I missed before.aaron2000-03-231-2/+2
|
* Various cleanups and standardization.aaron2000-03-101-26/+33
|
* Add HISTORY sections; from FreeBSD.aaron2000-03-061-4/+10
|
* Add a couple of useful examples.aaron2000-01-221-1/+10
|
* - remove trailing white spaceaaron1999-06-051-9/+9
| | | | | | | - remove arguments from .Os macros - remove arguments from .Nm macros, where appropriate - some more Dq/Sq/Ql insanity - still lots to do in the usr.bin tree... :/
* cleanup; also note that ``0'' flag is ignored when used with a precisionaaron1998-11-301-21/+43
| | | | specifier and any of the d, i, o, u, or x (X) formats, as per gcc warnings