diff options
author | sheldonh <sheldonh@FreeBSD.org> | 2000-01-06 15:37:37 +0000 |
---|---|---|
committer | sheldonh <sheldonh@FreeBSD.org> | 2000-01-06 15:37:37 +0000 |
commit | 00f970ec4339333aefd8c0022e7e1dfaa4e2e2ff (patch) | |
tree | bfa82e53256cc6f4185c5177f81551007d7d24ba /usr.bin/jot/jot.1 | |
parent | faa605e6a5eceac422c8b6064e166e34b85d48a3 (diff) | |
download | FreeBSD-src-00f970ec4339333aefd8c0022e7e1dfaa4e2e2ff.zip FreeBSD-src-00f970ec4339333aefd8c0022e7e1dfaa4e2e2ff.tar.gz |
Back out rev 1.11, about which bde had concerns, and instead implement
appropriate bounds-checking and typecasts based on our knowledge of
the desired conversion format specifier.
Simplify diagnostics and take care to print the correct conversion
format specifier when %l is involved.
Diffstat (limited to 'usr.bin/jot/jot.1')
-rw-r--r-- | usr.bin/jot/jot.1 | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/usr.bin/jot/jot.1 b/usr.bin/jot/jot.1 index d8419c7..68fc42e 100644 --- a/usr.bin/jot/jot.1 +++ b/usr.bin/jot/jot.1 @@ -183,18 +183,16 @@ from column 10 and ending in column 132, use .Pp and to print all lines 80 characters or longer, .Dl grep `jot -s \&"\&" -b \&. 80` -.Pp -.Sh SEE ALSO -.Xr ed 1 , -.Xr expand 1 , -.Xr rs 1 , -.Xr yes 1 , -.Xr printf 3 , -.Xr random 3 -.Sh BUGS -Conversion format specifiers for +.Sh DIAGNOSTICS +The +.Nm +utility exits 0 on success, and >0 if an error occurs. +The following diagnostic messages deserve special explanation: +.Bl -diag +.It "illegal or unsupported format '%s'" +The requested conversion format specifier for .Xr printf 3 -are limited to those of the form +was not of the form .Dl %[#][ ][{+,-}][0-9]*[.[0-9]*]? where .Dq ? @@ -202,6 +200,17 @@ must be one of .Dl [l]{d,i,o,u,x} or .Dl {c,e,f,g,D,E,G,O,U,X} -.Pp -No bounds-checking is performed on numeric values, so arithmetic overflow -will cause a fatal error. +.It "range error in conversion" +A value to be printed fell outside the range of the data type +associated with the requested output format. +.It "too many conversions" +More than one conversion format specifier has been supplied, +but only one is allowed. +.El +.Sh SEE ALSO +.Xr ed 1 , +.Xr expand 1 , +.Xr rs 1 , +.Xr yes 1 , +.Xr printf 3 , +.Xr random 3 |