Commit Graph

24 Commits

Author SHA1 Message Date
mike
27f3da3573 Don't depend on pollution in <limits.h> for the definition of
<stdint.h> macros.
2002-07-05 15:58:27 +00:00
obrien
bc61fc95d8 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
jmallett
04a334b0ce Remove local prototype for main(). 2002-06-15 11:28:09 +00:00
jmallett
fe733a8c21 Protoize. Remove un-needed cast to char in switch of getopt(3)'s return value.
FBSDID.
2002-06-15 11:26:25 +00:00
imp
74d826c7a6 remove __P 2002-03-22 01:22:50 +00:00
wollman
e68b7c9ebf Actually, arc4random() returns a uint32_t, not an int. Use the correct
constant, just in case uint32_t turns into a `short' ten years from now.
If this is MFC'd it will be necessary to hard-code the constant since
-stable doesn't have UINT32_MAX.
2001-11-08 22:01:35 +00:00
gallatin
243eea3da8 fix jot -r on 64-bit platforms by teaching it that arc4random outputs
an int, not a long

Submitted by: Paul Herman <pherman@frenchfries.net>
PR#: alpha/31859
2001-11-08 20:49:24 +00:00
dd
6c001393ec Replace the cast I removed in rev. 1.16 with a slightly less evil one
(well, at least one that gcc doesn't complain about).  This fixes -r,
which rev. 1.16 broke.

Submitted by:	bde
2001-05-29 23:35:18 +00:00
dd
0c7673b25e Silence warnings and compile with WARNS=2 on i386 and alpha. 2001-05-28 00:55:50 +00:00
dd
dda28cb6eb Miscellaneous cleanups; sync to OpenBSD as much as feasible.
Noteworthy changes include:
 * Use getopt(3).
 * Fix overflows in -b and -w options.
 * Use strlcpy(3) and snprintf(3) in favor of strcpy(3) and
   sprintf(3), respectively.  Also check return values of the former
   two.
 * Fix lots of other gratuitous differences with OpenBSD.

Obtained from:	OpenBSD
2001-05-27 21:08:19 +00:00
kris
805d9e79e2 Don't call printf with no format string. 2000-07-10 06:02:13 +00:00
sheldonh
00f970ec43 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.
2000-01-06 15:37:37 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
sheldonh
52eee06a54 Don't dump core for a known, documented bug.
PR:	12611
Reviewed by:	markm
1999-07-22 17:33:11 +00:00
sheldonh
a2b1df94ad Improve printf(3) conversion specifier parsing so that silly formats
aren't allowed and the right casts can be used for printf() statements.

Document the conversion specifier limitations and the fact that
arithmetic overflow causes a fatal error.

PR:	12611
Reported by:	Frode Vatvedt Fjeld <frodef@acm.org>
Reviewed by:	bde
1999-07-22 17:11:59 +00:00
kris
e3601a838c Correct an error in a manpage example, add -Wall -W to Makefile (no
warnings given) and modify source to use arc4random() instead of random().

Reviewed by:	ache
1999-05-13 12:18:24 +00:00
charnier
b5becb6266 Mdoc'ify man page. 1997-11-03 07:45:33 +00:00
charnier
922557a4f6 Use err(3) instead of local redefinition. Add usage(). 1997-07-15 09:59:30 +00:00
ache
66946f9305 Remove srandomdev fallback code 1997-06-14 00:27:03 +00:00
ache
f673899804 Use srandomdev() now
Fix error with begin variable calculation
1997-03-30 23:13:59 +00:00
ache
25a7568187 Fix srandom arg type according to Lite2 1997-03-11 14:06:52 +00:00
ache
f30aec925d Add ^ getpid() to make more random results for subsequent calling.
Add proper type casting to random calls

Should go into 2.2
1997-03-08 11:40:15 +00:00
joerg
33a7b7910e >Number: 917
>Category:       bin
>Synopsis:       -s option in jot is broken
1995-12-29 12:18:46 +00:00
rgrimes
f9ab90d9d6 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00