Commit Graph

36 Commits

Author SHA1 Message Date
tjr
512d638b01 Avoid passing negative values to <ctype.h> functions on machines with
signed chars.
2004-07-16 05:10:46 +00:00
ru
fb1d8b3724 Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
das
cff48d6f3f Fix jot so that 'jot -r -w %d 1 1 4' never prints 4. Previously, it
would print it with probability 1/2**32.  It seems that the correct
behavior is to print 4 with probability 1/4, but I'd like to avoid
breaking POLA until all the range inconsistencies in jot can be fixed
in one pass.  See PR for details.

PR:		54878
Submitted by:	David Brinegar <jot.3.brinegar@spamgourmet.com>
2003-08-01 16:23:24 +00:00
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
ru
352eaf673d mdoc(7) police: added missing markup bits, lowercased argument names. 2002-07-03 12:24:11 +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
charnier
ad8a79e6a5 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
imp
74d826c7a6 remove __P 2002-03-22 01:22:50 +00:00
markm
ae2558974f Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.
2002-02-08 22:31:43 +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
ru
bde8ec1b70 mdoc(7) police: utilize the new .Ex macro. 2001-08-15 09:09:47 +00:00
dd
911ca14c87 Remove whitespace at EOL. 2001-07-15 08:06:20 +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
ru
e6cfc0711d Prepare for mdoc(7)NG. 2000-12-19 16:00:12 +00:00
ru
0d1334ca0c mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +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
nik
6578739ddb Add $Id$, to make it simpler for members of the translation teams to
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
1999-07-12 20:24:20 +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
steve
f00117c92b Random data is no longer based on the time of day, rather the random
number device.  Also clearly state that sequential data is the default.

PR:		5553
Submitted by:	Jonathan Hanna <pangolin@rogers.wave.ca>
1998-01-24 03:32:33 +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