summaryrefslogtreecommitdiffstats
path: root/usr.bin/col/col.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Change all tame callers to namechange to pledge(2).deraadt2015-10-091-3/+3
|
* col can be locked down with tame "stdio", in case it is fed nasty input,deraadt2015-10-051-1/+4
| | | | | | or if it has bugs. The previous commits by schwarze indicate the latter case was very true until recently... ok doug
* For half and reverse line feeds, recognize SUSv2-style escape-digitschwarze2015-05-091-8/+20
| | | | | | | | | | | | sequences in the input stream in addition to traditional BSD-style escape-control-char sequences because traditional tools, for example Heirloom roff, produce SUSv2-style sequences. Switch the encoding of forward half line feeds in the output of -f back to SUSv2 style because that's likely to work with more tools than the non-standard traditional BSD-style sequence. Fully document these choices. Issues originally reported by bapt at FreeBSD. OK millert@ jmc@, and bapt@ also more or less agrees with the direction.
* Avoid scattering octal escapes all over the place,schwarze2015-05-081-5/+5
| | | | | | use the definitions given at the top of the file. No functional change. From bapt at FreeBSD.
* Fix about ten integer overflows and underflows and a handful of logicschwarze2015-05-081-48/+66
| | | | | | errors in line number handling. Detailed explanations were sent to tech@ on October 18, 2014. OK doug@, and bapt at FreeBSD says he likes the direction
* Correctly encode half line feed in the output stream for -f;schwarze2014-10-171-2/+2
| | | | | | | | | | | | | this patch only changes two bits, note that '\011' != '9' == '\071'. Bug introduced by the original author, Michael Rendell, and committed by Keith Bostic on May 22, 1990 (CSRG SCCS rev. 5.1). The following operating systems are affected: 4.3BSD Reno, BSD Net/2, 4.4BSD, 4.4BSD Lite1, 4.4BSD Lite2, and all versions of 386BSD, NetBSD, OpenBSD, FreeBSD, DragonFly, Debian GNU/Linux (package bsdmainutils) and probably many others. "that's a fun one" millert@, "nice find" deraadt@
* 1) Fix a segfault triggered by an input line containing two consecutiveschwarze2014-10-161-17/+19
| | | | | | | | | | backspace characters beyond column MAX_SHRT, overflowing c_column. 2) Fix imcomplete initialization of the final element of the *count array by adding a missing pair of parentheses. 3) For code clarity and extra safety, change all variables dealing with column numbers from int to size_t such that they cannot overflow. Found while reviewing the patch from deraadt@'s reallocarray() rampage. Feedback and OK millert@.
* use the reallocarray idiom; ok ingoderaadt2014-10-081-13/+13
|
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-14/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* use strtonum; ok millert@jdixon2007-05-011-7/+8
|
* mostly ansi cleanup; pval okderaadt2003-06-101-19/+11
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-031-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-10/+10
|
* Sync usage() output with man page; mpech@prosoft.org.lvaaron2000-11-211-4/+3
|
* use err(3)mickey1997-07-251-12/+3
|
* (foo *)NULL -> NULL + err msg for realloc failurekstailey1997-06-171-4/+4
|
* getopt(3) returns -1 when out of args, not EOF, whee!millert1997-01-151-3/+3
|
* rcsidderaadt1996-06-261-1/+2
|
* initial import of NetBSD treederaadt1995-10-181-0/+545