summaryrefslogtreecommitdiff
path: root/usr.bin/cut/cut.c
AgeCommit message (Collapse)Author
2015-12-02UTF-8 support: Implement -c and -nIngo Schwarze
and let -d accept a multibyte delimiter character. While here, simplify the code by switching from fgetln(3) to getline(3) and from hand-crafted string parsing to strstr(3) and strchr(3). OK tedu@ czarkoff@ zhuk@.
2015-11-03Blank line after pledge().mmcc
2015-10-09Change all tame callers to namechange to pledge(2).Theo de Raadt
2015-10-05This can use tame "stdio rpath" from the top. If we are only working onTheo de Raadt
stdin, an additional tame "stdio" is easy. same diff from sthen
2015-08-18do not cast malloc() return if stdlib.h is includedTheo de Raadt
2014-02-02style nit-picking on previous commit: keep apart declaration fromIgor Sobrado
initialization; use a variable name consistent with the rest of our tree.
2014-02-01improve POSIX compliance by continuing to process the remaining fileIgor Sobrado
operands after not finding an input file. from the IEEE Std 1003.1-2008 (``POSIX.1'') rationale: "Unlike other utilities, some historical implementations of cut exit after not finding an input file, rather than continuing to process the remaining file operands. This behavior is prohibited by this volume of POSIX.1-2008, where only the exit status is affected by this problem." joint work with jmc@, who identified the compliance issue, and millert@ ok millert@, jmc@
2013-11-23obvious unsigned casts for ctypeTheo de Raadt
2010-01-23It's wrong to complain about illegal -c arguments when findingIngo Schwarze
illegal -b arguments, so fix the error messages; patch from Laurent Ghigonis <ooookiwi at gmail dot com> on tech@. While here, improve the manual, too: * arguments need not be in increasing order * CAVEAT: -b and -c do the same right now feedback and ok jmc@
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
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
2008-06-27sort flags; align usage output.Igor Sobrado
ok jmc@
2007-03-15simplify synopsis/usage() and sort options;Jason McIntyre
from Igor Sobrado
2003-06-10mostly ansi cleanup; pval okTheo de Raadt
2003-06-03Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-11-19kill more registersMike Pechkin
millert@ ok
2000-06-04Handle the case where the last line of input does not contain a newline; issueAaron Campbell
reported by marc@snafu.org. The main thing here is we use fgetln() instead of fgets(), also giving us the advantage of being able to handle lines of unlimited length. Some -Wall and other fixes from millert@ as well.
1998-11-28use strsep() instead of strtok(), in particular to avoid an infinite loopAaron Campbell
1997-11-05sync usage to man pageTheo de Raadt
1997-09-12Kill extra newline in err()/warn().Todd C. Miller
1997-01-15getopt(3) returns -1 when out of args, not EOF, whee!Todd C. Miller
1996-06-26rcsidTheo de Raadt
1995-10-18initial import of NetBSD treeTheo de Raadt