summaryrefslogtreecommitdiffstats
path: root/usr.bin/printf
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Remove redundat extern declarationcracauer2000-04-201-1/+2
|
* Document truncation of strings when a NUL character is reached in a formatchris2000-01-191-0/+6
| | | | | | | string. PR: 15929 Submitted by: Daniel Hagan <dhagan@cs.vt.edu>
* Correct some hard sentence breaks. Only those surrounding the previoussheldonh1999-09-141-2/+2
| | | | | | | | 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
* Improve shell documentation:sheldonh1999-09-081-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-121-0/+1
| | | | | | | | | | | | | | | | | 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
* Fixed warnx format errors in printf and csh, and snprintf format errorsbde1998-12-071-7/+11
| | | | | | in sh, by using separate macros for the 1, 2 and 3-arg calls to warnx. (The 3-arg warnx macro in sh/bltin/bltin.h used to require bogus dummy args.)
* Back out revision 1.10. It broke the build of sh, which compilesjdp1997-11-181-4/+5
| | | | this file with warnx() defined as a macro.
* Fix: too many arguments for format string in 4 calls to warnx().jdp1997-11-181-5/+4
|
* #include <unistd.h> for getopt(3) call.steve1997-08-071-0/+1
|
* Correct Synopsys section.charnier1997-08-041-3/+3
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-291-1/+1
| | | | posix standard on the topic.
* -Wall cleaning.steve1996-12-141-2/+2
|
* Remove annoying -Wall warning.steve1996-10-061-1/+1
|
* When used as a shell builtin, this program decoded a subset of argumentspeter1996-10-011-4/+9
| | | | | | | | | | | known to printf(3) and then used printf() to format it... The only problem what the #define printf out1fmt. The code was behaving differently when run as a shell builtin since out1fmt() isn't printf(3). Simple hack. Print to a buffer and fputs (also #defined for sh) the result. This should fix the printf builtin problem in PR#1673, rather than leaving the call commented out. (printf.o was being statically linked in anyway, we might as well use it)
* Correctly match the format flags and their descriptions.mpp1996-04-091-1/+1
| | | | Submitted by: Dave Glowacki <dglo@ssec.wisc.edu>
* Move out some of the shell builtin bogosity from printf's source tojoerg1995-12-101-14/+1
| | | | sh's builtin/bltin.h.
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
|
* Make the syntax checks for the format string more strict. The stringjoerg1995-05-071-12/+19
| | | | | | "%8*s" is no longer considered to be a valid format description. This closes PR bin/386.
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-273-0/+687
OpenPOWER on IntegriCloud