Commit Graph

28 Commits

Author SHA1 Message Date
ed
7d71ef84d7 Add missing static keywords to rs(1) 2011-11-06 08:16:35 +00:00
jh
5f186188c6 Document the input line length limit.
Submitted by:	Dominic Fandrey (original version)
2011-02-25 19:10:19 +00:00
jh
d8708af484 - Use LINE_MAX from limits.h as the maximum line length instead of
BUFSIZ. Use LINE_MAX * 2 as the buffer size (BSIZE).
- Error out if we encounter a line longer than LINE_MAX. The previous
  behavior was to silently split long lines and produce corrupted
  output.

PR:		bin/151384
2011-02-07 18:10:18 +00:00
jh
c19aa41514 Handle EOF when skipping lines. 2011-02-07 18:05:56 +00:00
joel
29af67e52c Remove the advertising clause from UCB copyrighted files in usr.bin. This
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
2010-12-11 08:32:16 +00:00
cperciva
55239b4ba7 Setting a variable to the same value twice doesn't actually make it
more likely to have the right value.  Remove superfluous assignments.

Found by:	LLVM/Clang Static Checker
2008-08-04 06:39:52 +00:00
cperciva
731fe330c9 Document that jot(1), rs(1), and lam(1) first appeared in 4.2BSD.
MFC after:	1 month
2006-10-20 04:31:01 +00:00
robert
848d150573 - Set negative row or column argument values to zero.
Negative values would produce undefined behaviour including
   a possible segmentation fault.
 - Explicitly initialize the global row and column variables
   to zero.

PR:		bin/80348
2005-04-28 12:37:15 +00:00
tjr
2ba123c4be Document incorrect handling of multibyte characters. 2004-07-30 00:10:52 +00:00
tjr
62ca3fc301 Avoid passing negative values to isdigit() on machines with signed chars. 2004-07-15 10:26:38 +00:00
charnier
5f2eefe79b Add section number to .Xr 2003-06-08 13:58:08 +00:00
tjr
a98a42559d Contrary to what the comments said, rs -H did not recycle storage, it just
kept writing past the end of the buffer. Correct the code so that it
actually does recycle storage.
2002-06-07 07:08:06 +00:00
markm
f7a5378f71 Use __FBSDID, ANSIfy functions, fix const string. 2002-04-28 11:00:34 +00:00
charnier
ad8a79e6a5 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
imp
1698cb216e remove __P 2002-03-22 01:33:25 +00:00
ru
80467e19fa Do not overrun entry array when printing output tables.
Cleanup storage allocation for entries.

Obtained from:	NetBSD
2001-09-10 15:09:12 +00:00
ru
ca7cfbacf3 Fixed SIGFPE (divide by zero) if column's width exceeds display width (-w).
Obtained from:	OpenBSD
2001-09-10 11:56:07 +00:00
ru
4f02a00407 Fixed the -z option handling:
-Wuninitialized if used without -t.

PR:		bin/30467

Null pointer dereference if used with -t.

Maximum column width computation was wrong.
2001-09-10 11:43:40 +00:00
dd
911ca14c87 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
ru
6ab0b23323 Prepare for mdoc(7)NG. 2000-12-27 16:52:31 +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
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +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
jb
7f92b62ee3 Add #include <string.h> to get prototypes. 1998-02-20 04:48:37 +00:00
charnier
c1ea49e6b1 Use err(3). Add usage(). Rewrote man page in mdoc format. 1997-08-07 06:42:37 +00:00
joerg
abf2e4ca00 The rs(1) command dumps core with the -s option (SIGSEGV)
(Fix a rangecheck condition.)

Closes PR # bin/1244: rs(1) dumps core with -s
1996-05-26 18:26:55 +00:00
rgrimes
f9ab90d9d6 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00