aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/printf
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Document truncation of strings when a NUL character is reached in a formatChris Costello2000-01-191-0/+6
| | | | | | | | | | string. PR: 15929 Submitted by: Daniel Hagan <dhagan@cs.vt.edu> Notes: svn path=/head/; revision=56264
* Correct some hard sentence breaks. Only those surrounding the previousSheldon Hearn1999-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 Notes: svn path=/head/; revision=51275
* Improve shell documentation:Sheldon Hearn1999-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 Notes: svn path=/head/; revision=51090
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Add $Id$, to make it simpler for members of the translation teams toNik Clayton1999-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 Notes: svn path=/head/; revision=48792
* Fixed warnx format errors in printf and csh, and snprintf format errorsBruce Evans1998-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.) Notes: svn path=/head/; revision=41582
* Back out revision 1.10. It broke the build of sh, which compilesJohn Polstra1997-11-181-4/+5
| | | | | | | this file with warnx() defined as a macro. Notes: svn path=/head/; revision=31277
* Fix: too many arguments for format string in 4 calls to warnx().John Polstra1997-11-181-5/+4
| | | | Notes: svn path=/head/; revision=31224
* #include <unistd.h> for getopt(3) call.Steve Price1997-08-071-0/+1
| | | | Notes: svn path=/head/; revision=27966
* Correct Synopsys section.Philippe Charnier1997-08-041-3/+3
| | | | Notes: svn path=/head/; revision=27887
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-291-1/+1
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24360
* -Wall cleaning.Steve Price1996-12-141-2/+2
| | | | Notes: svn path=/head/; revision=20409
* Remove annoying -Wall warning.Steve Price1996-10-061-1/+1
| | | | Notes: svn path=/head/; revision=18732
* When used as a shell builtin, this program decoded a subset of argumentsPeter Wemm1996-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) Notes: svn path=/head/; revision=18613
* Correctly match the format flags and their descriptions.Mike Pritchard1996-04-091-1/+1
| | | | | | | Submitted by: Dave Glowacki <dglo@ssec.wisc.edu> Notes: svn path=/head/; revision=15163
* Move out some of the shell builtin bogosity from printf's source toJoerg Wunsch1995-12-101-14/+1
| | | | | | | sh's builtin/bltin.h. Notes: svn path=/head/; revision=12730
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-2/+2
| | | | Notes: svn path=/head/; revision=8874
* Make the syntax checks for the format string more strict. The stringJoerg Wunsch1995-05-071-12/+19
| | | | | | | | | "%8*s" is no longer considered to be a valid format description. This closes PR bin/386. Notes: svn path=/head/; revision=8323
* BSD 4.4 Lite Usr.bin SourcesRodney W. Grimes1994-05-273-0/+687
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590