Commit Graph

63 Commits

Author SHA1 Message Date
christos ff53269704 fix some error handling. 2015-06-16 22:54:10 +00:00
snj fc99b6a4d6 Change some standard exit status text to ".Ex -std"
From Eitan Adler in PR bin/47790.
2014-04-13 01:45:34 +00:00
christos b294e9655c WARNS=6 2013-07-16 17:48:22 +00:00
christos 5353040f23 document non-literal format strings 2011-08-16 10:35:03 +00:00
christos ca5bce8901 support grouping format. 2011-03-15 23:11:49 +00:00
joerg 57e0101802 \\*(Pm -> \*(Pm 2010-04-05 21:24:14 +00:00
christos a49ff4deac Avoid segv on "printf '%*********s' 666", from Maksymilian Arciemowicz 2009-10-13 19:28:31 +00:00
lukem c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
joerg 31ea1ec643 Use semantic markup 2009-03-11 13:57:11 +00:00
dholland 0a268c3ebf Fix description of %b format. PR 39111 from Paul Goyette. 2008-09-01 09:20:41 +00:00
lukem 98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
apb 76807ad91e Add a note about the stupid behaviour of "%c" format. 2008-05-06 12:01:35 +00:00
christos 56fd57d26f detect more errors from printf/malloc. 2008-03-28 18:05:39 +00:00
dsl a2a01de947 Remember to consume input bytes when processing '\0nnn' for %b formats 2005-03-22 23:55:46 +00:00
christos 175795754a WARNS=3, and remove comment about WFORMAT issues. 2004-10-30 19:28:35 +00:00
christos a7e7123b05 - KNF, WARNS=3, pass lint.
- Simplify octal parsing code.
2004-10-30 19:28:10 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
dsl 630ca1a3e3 Revert previous. 'None' means that the "Utility Syntax Guidlines" apply. 2003-06-25 12:56:59 +00:00
dsl 0ac8c637fd Remove getopt() loop, IEEE 1003.1 doesn't say that printf(1) should conform
to the "Utility Syntax Guidlines".
Fixes PR 21970.
2003-06-25 09:54:15 +00:00
wiz abe0b8ad64 Use .Aq instead of \*[Lt]...\*[Gt]; sort SEE ALSO; add some more commas;
new sentence, new line; fix some mdoc nits.
2003-04-28 09:38:19 +00:00
augustss 86be450da2 Add missing comma. 2003-04-28 09:26:34 +00:00
dsl a5f7364038 Fix the output of NUL bytes within %b formats.
(Approved by Christos)
2003-02-24 14:42:27 +00:00
christos c02b3bbdf4 Fixes from David Laight:
- ansification
- format of output of jobs command (etc)
- job identiers %+, %- etc
- $? and $(...)
- correct quoting of output of set, export -p and readonly -p
- differentiation between nornal and 'posix special' builtins
- correct behaviour (posix) for errors on builtins and special builtins
- builtin printf and kill
- set -o debug (if compiled with DEBUG)
- cd src obj (as ksh - too useful to do without)
- unset -e name, remove non-readonly variable from export list.
  (so I could unset -e PS1 before running the test shell...)
2002-11-24 22:35:38 +00:00
grant be8ae688ae New sentence, new line. 2002-09-30 11:08:56 +00:00
tron 5456dc6136 Complete declaration of progprintf() to fix build problem in csh(1). 2002-06-14 11:32:15 +00:00
wiz 085ddec445 Remove #ifdef __STDC__. De-__P() and ANSIfy. Fix a prototype mismatch
uncovered by this.
2002-06-14 01:12:15 +00:00
wiz 6fbcffc530 WARNS=2 2002-06-14 01:10:36 +00:00
ross 2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +00:00
wiz b28000888d Punctuation nits. 2001-12-08 19:10:43 +00:00
wiz aded0d2cce Whitespace cleanup. 2001-12-01 16:43:07 +00:00
kleink dd849fecca Change to use {u,}intmax_t internally (was: (unsigned) long). 2001-05-05 17:29:39 +00:00
jhawk 404ef082e4 Xr printf(9) 2001-04-03 13:59:22 +00:00
is 135600f947 More format string cleanup by sommerfeld. 2000-10-11 14:46:00 +00:00
kleink 4918722a89 For commands and utilities, use EXIT STATUS rather than RETURN VALUES or
DIAGNOSTICS as appropriate (and documented in mdoc(7)).
2000-09-04 07:35:15 +00:00
christos 76f0fa8f60 brace pollution, and char -> unsigned char 1998-12-19 20:21:44 +00:00
wsanchez af4e69540c include unistd 1998-10-14 00:56:00 +00:00
garbled b94d51892e \e generates an escape character but is not listed in the manpage. Fixed. 1998-08-22 14:54:48 +00:00
perry c10fb822b5 add <unistd.h> to fix compiler warning 1998-02-03 03:10:15 +00:00
lukem 54bdc1acab remove WARNS?=1, cleanup .Nm usage 1997-11-08 09:34:23 +00:00
lukem 2f07741322 s/index/strchr 1997-10-19 22:57:05 +00:00
mrg 09366313d3 "merge" lite-2. our printf is already kinda different...minor changes only. 1997-10-18 15:38:01 +00:00
christos abc99479ba Fix compiler warnings. 1997-07-04 21:25:16 +00:00
mouse 650ee578da alternate -> alternative, per PR 2643 1997-03-08 14:13:54 +00:00
cgd 8d3057754a lint and KNF changes. (mostly casting returns to void to quiet lint.) 1997-01-14 19:20:09 +00:00
tls 9d225a1783 RCS ID police 1997-01-09 20:18:21 +00:00
jtc 89c36052b7 Changed floating point output format to be exactly the same (use same
text and macros) as those in the printf(3) manpage.
This fixes PR #1194, albeit differently.
1995-07-07 23:00:13 +00:00
jtc e9e6fca8b9 The descriptions of the o and u formatting options were reversed (PR #785). 1995-02-15 15:32:27 +00:00
jtc 5d5d116e4a Simplify conversion of "quoted" numeric arguments. 1994-02-03 01:10:49 +00:00
jtc 14f244e88f Code to check if conversion (by strtol(), strtoul(), or strtod()) was
identical, so I moved it into its own function.
1994-02-03 00:35:18 +00:00
jtc 3c10d8e071 Add and use getulong() to handle %u, %o, %x & %X formatting directives.
It was using getlong(), which caused values larger than LONG_MAX to be
truncated to LONG_MAX.
As recommended by 1003.2, print warning messages when argument cannot be
converted to value or is out of range.
1994-02-03 00:16:11 +00:00