Commit Graph

20 Commits

Author SHA1 Message Date
Kevin Lo
18463c7749 Remove bogus cast. 2015-03-31 15:03:58 +00:00
Ed Schouten
316b87cb40 Add missing static keywords to column(1) 2011-11-06 08:14:34 +00:00
Joel Dahl
da52b4caaf 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
Ruslan Ermilov
090782f5d5 Fix the fix in rev. 1.15 so that we jump to the next column
instead of always skipping it.

MFC after:	3 days
2006-12-15 17:47:25 +00:00
Ian Dowse
6508a1ecdc Add missing parentheses to fix a segmentation fault that is easily
reproducable with `jot -s " " 400 1 | column -t'. The bug was present
in the the original CSRG 'column -t' added in 1989.
2006-09-19 22:11:43 +00:00
David Malone
59643a2120 The change to make column use roundup(x, TAB) rounded things to the
current tab, however the code it replaced wanted to round to the
next TAB. Consequently things like this:

	( echo 1 ; echo 2 ) | column

cause column to loop indefinitely. This patch is slightly different
from the one Gary submitted, but is closer to the original code.

Submitted by:	Gary Cody <gary@lyranthe.org>
MFC after:	1 week
2006-02-13 22:09:26 +00:00
Juli Mallett
e2816c1489 Take a swing at using roundup(). 2005-01-25 01:35:02 +00:00
Tim J. Robbins
5480f12049 Add support for multibyte characters. 2004-07-29 13:22:56 +00:00
Tim J. Robbins
de3b3c0e74 Avoid passing negative values to isspace() on machines with signed chars. 2004-07-15 09:23:04 +00:00
David Malone
823ab23f39 ANSify function definitions to avoid a warning. 2002-07-28 15:25:15 +00:00
Warner Losh
f1bb2cd2aa remove __P 2002-03-22 01:22:50 +00:00
David Malone
9f5b04e925 Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.
2001-12-10 21:13:08 +00:00
Mark Murray
9240706953 Use __FBSDID(). 2001-12-02 23:52:47 +00:00
Mark Murray
bcdc82df70 WARNS=2 fixup. 2001-12-02 13:18:59 +00:00
David E. O'Brien
d54a8ce707 Remove the misnamed `emalloc' and replace its uses with calloc (along
with error checking) which it effectively was.  (malloc+memset)
2001-07-24 14:13:34 +00:00
David Malone
983e044ad8 Round up before checking if the width is smaller than the widest
column, otherwise we may divide by zero later.

PR:		26283
Reviewed by:	roam
2001-04-03 18:03:29 +00:00
Archie Cobbs
fa146c5335 Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]). 1998-12-06 22:58:23 +00:00
Philippe Charnier
3b5ec5aa63 Add missing -s flag in usage string. 1997-06-30 06:37:15 +00:00
Warner Losh
1c8af87873 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
Peter Wemm
0da30e9aa7 Import some parts of CSRG 4.4BSD-Lite2 usr.bin sources to fix tree build. 1997-03-11 13:08:12 +00:00