summaryrefslogtreecommitdiffstats
path: root/usr.bin/jot
Commit message (Collapse)AuthorAgeFilesLines
* Remove superfluous paragraph macro.joel2012-03-251-1/+0
|
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-112-8/+0
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* Fix stuttering sequences and reverse rangesbrian2010-06-022-9/+96
| | | | | PR: 123635 Submitted by: Ulrich Spörlein, uqs at spoerlein dot net
* Add a reference to newly added seq(1) command.delphij2010-02-201-1/+2
| | | | | Submitted by: jilles MFC after: 3 months
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-131-0/+1
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-111-1/+0
| | | | Tested with: make universe
* Fix some uninitialise variables.brian2009-07-081-4/+4
| | | | | | | PR: 136383 Submitted by: Ulrich Spoerlein - uqs at spoerlein dot net Approved by: re (kib) MFC after: 3 weeks
* Use explicit braces to avoid ambiguous else.delphij2006-12-091-1/+2
|
* Prevent buffer overflow when forcibly terminating an escape character.dds2006-12-031-1/+3
| | | | | | | | | | Obtained from: OpenBSD Note: In the case of a full buffer the OpenBSD implementation will leave in the format string an invalid escape sequence. This appears to be harmless with our C library, but according to C99 this can cause undefined behavior. MFC after: 2 weeks
* Correct handling of format strings with escaped % specifications.dds2006-12-031-2/+5
| | | | | | | | | | Note: It would be nice to be able to implement getformat() using fmtcheck(3), but fmtcheck does not distinguish between signed and unsigned types, a facility jot needs to perform range checks on its output. Submitted by: Per Kristian Hove MFC after: 2 weeks
* Style facelift.dds2006-11-061-57/+73
| | | | | | | | | - Reduce the number of global variables - Make global objects static - Use bool consistently - Sort getopt arguments and their processing - Add function comments - Change notlast != 0 into !last
* Use a more sensible default of 1 or -1 when only the start anddds2006-11-062-2/+9
| | | | | | | | end values are specified. PR: bin/68981 Submitted by: Stefan `Sec` Zehl MFC after: 2 weeks
* Do What I Mean when the user asks for random integers or characters.dds2006-11-062-8/+50
| | | | | | | | | | | | | | Up to now jot would fail to generate the last character in the range or skew the integer distribution in a way that would generate the numbers in the range's limits with half the probability of the rest. This modification fixes the program, rather than documenting the strange behavior, as suggested in docs/54879. Also, correctly specify the range of random(3). PR: docs/54879 MFC after: 2 weeks
* Avoid negative array indices: an empty string can also be useddds2006-11-062-2/+3
| | | | to specify a default value.
* See also arc4randomdds2006-11-061-0/+1
| | | | | PR: docs/54879 MFC after: 2 weeks
* Restore jot's ability to use a seed for producing a deterministicdds2006-11-062-7/+18
| | | | | | | | | sequence of random numbers. This functionality was lost in revision 1.9 when the random number generator was switched to arc4random. PR: docs/54879 MFC after: 2 weeks
* Replace obscure aliases through pointers with plain variables.dds2006-11-061-11/+8
| | | | MFC after: 2 weeks
* Merge code in common cases.dds2006-11-061-29/+6
| | | | | Verified by: New regression tests in tools/regression/usr.bin/jot MFC after: 2 weeks
* Replace opaque numeric bit flag values with #defined identifiers.dds2006-11-061-29/+38
| | | | | | | While there, add some missing FALLTHROUGH comments. Verified with: cmp(1) on the executable MFC after: 2 weeks
* Document that jot(1), rs(1), and lam(1) first appeared in 4.2BSD.cperciva2006-10-201-0/+5
| | | | MFC after: 1 month
* Sort sections.ru2005-01-181-2/+2
|
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+2
|
* Avoid passing negative values to <ctype.h> functions on machines withtjr2004-07-161-3/+3
| | | | signed chars.
* Mechanically kill hard sentence breaks.ru2004-07-021-2/+2
|
* Fix jot so that 'jot -r -w %d 1 1 4' never prints 4. Previously, itdas2003-08-011-1/+1
| | | | | | | | | | 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>
* Don't depend on pollution in <limits.h> for the definition ofmike2002-07-051-0/+1
| | | | <stdint.h> macros.
* mdoc(7) police: added missing markup bits, lowercased argument names.ru2002-07-031-5/+7
|
* Consistently use FBSDIDobrien2002-06-301-1/+0
|
* Remove local prototype for main().jmallett2002-06-151-1/+0
|
* Protoize. Remove un-needed cast to char in switch of getopt(3)'s return value.jmallett2002-06-151-14/+10
| | | | FBSDID.
* Use `The .Nm utility'charnier2002-04-201-2/+3
|
* remove __Pimp2002-03-221-5/+5
|
* Remove leaf node WARNS?=2 (that mainly I added). This shouldmarkm2002-02-081-1/+0
| | | | help the GCC3 transition and CURRENT in general.
* Actually, arc4random() returns a uint32_t, not an int. Use the correctwollman2001-11-081-1/+1
| | | | | | 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.
* fix jot -r on 64-bit platforms by teaching it that arc4random outputsgallatin2001-11-081-1/+1
| | | | | | | an int, not a long Submitted by: Paul Herman <pherman@frenchfries.net> PR#: alpha/31859
* mdoc(7) police: utilize the new .Ex macro.ru2001-08-151-3/+1
|
* Remove whitespace at EOL.dd2001-07-151-1/+1
|
* Replace the cast I removed in rev. 1.16 with a slightly less evil onedd2001-05-291-1/+1
| | | | | | | (well, at least one that gcc doesn't complain about). This fixes -r, which rev. 1.16 broke. Submitted by: bde
* Silence warnings and compile with WARNS=2 on i386 and alpha.dd2001-05-282-12/+12
|
* Miscellaneous cleanups; sync to OpenBSD as much as feasible.dd2001-05-271-81/+68
| | | | | | | | | | | | 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
* Prepare for mdoc(7)NG.ru2000-12-191-1/+1
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-1/+1
|
* Don't call printf with no format string.kris2000-07-101-1/+1
|
* Back out rev 1.11, about which bde had concerns, and instead implementsheldonh2000-01-062-66/+72
| | | | | | | | 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.
* $Id$ -> $FreeBSD$peter1999-08-282-2/+2
|
* Don't dump core for a known, documented bug.sheldonh1999-07-221-1/+21
| | | | | PR: 12611 Reviewed by: markm
* Improve printf(3) conversion specifier parsing so that silly formatssheldonh1999-07-222-19/+97
| | | | | | | | | | | 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
* Add $Id$, to make it simpler for members of the translation teams tonik1999-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
* Correct an error in a manpage example, add -Wall -W to Makefile (nokris1999-05-133-8/+6
| | | | | | warnings given) and modify source to use arc4random() instead of random(). Reviewed by: ache
* Random data is no longer based on the time of day, rather the randomsteve1998-01-241-3/+4
| | | | | | | number device. Also clearly state that sequential data is the default. PR: 5553 Submitted by: Jonathan Hanna <pangolin@rogers.wave.ca>
OpenPOWER on IntegriCloud