aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/cut.c
AgeCommit message (Collapse)Author
2021-06-22Add support for -d $'\n' (cut by line!) and posix -nb (wraps to start of -c)Rob Landley
2021-06-21Switch to FLAG() macros and forbid -f -F at the same time.Rob Landley
2021-05-15Convert utf8towc from wchar_t to unsigned (to match wctoutf8).Rob Landley
The maximum unicode code point is 0x10ffff which is 21 bits.
2019-10-26cut: re-enable crunch_str on cut -CJarno Mäkipää
Reason: unicolumns() does not print combining characters correctly Combining characters follow the character which they modify. https://www.cl.cam.ac.uk/~mgk25/unicode.html#comb xterm renders cut test1.txt -C -1 now correctly
2018-12-04Clean up some --help formatting.Elliott Hughes
Be consistent about upper versus lower case. (Upper seems to have the majority, so I went with that, though I'm happy to provide the opposite patch as long as we're consistent!) Be consistent about using \t. (Though saving a few bytes seems like it might be better done in the code that generates help.h rather than directly in the source, since tabs make careful ASCII art layout hard enough that we regularly have things misaligned.) Remove trailing periods (most of which seem to have been added by me). Always use the US "human readable" rather than my British "human-readable", and be more consistent about declaring whether we're showing multiples of 1000 or 1024. Just say "verbose" rather than adding a useless "mode" or "output".
2018-08-31Convert option style.Rob Landley
2018-06-14Fix cut -DF as awk replacement by not matching delimiterless lines with -DRob Landley
2018-06-14Change do_lines() semantics to end with a callback(0,0) to indicate EOF,Rob Landley
adjusting existing users.
2017-10-31Fix cut -s and -f when delimiter not found (posix says print whole line).Rob Landley
2017-10-25Make -c work with unicode chars, and first stab at -C measuring columns.Rob Landley
2017-10-10Complete rewrite of cut. Handle multipe ranges, add -DFO options, startRob Landley
of utf8 support (not finished yet)... Adds new loopfiles_lines() wrapper to lib.c that calls do_lines from loopfiles.
2017-05-26Be more consistent about periods in help text.Elliott Hughes
2016-08-04Make xopen() skip stdin/stdout/stderr, add xopen_stdio() if you want stdout,Rob Landley
add xopenro() that takes one argument and understands "-" means stdin, and switch over lots of users.
2016-01-05Add error_msg_raw() and friends, replace error_msg("%s", s) uses, enable formatRob Landley
checking, and fix up format checking complaints. Added out(type, value) function to stat to avoid a zillion printf typecasts.
2015-05-31Move the magic list of commands needing cleanup from toys/pending/READMERob Landley
to greppable TODO annotations in the individual files. (grep -riw TODO)
2015-04-04To ensure that toybox can be installed alongside busybox withoutPaul Barker
confusing update-alternatives, the paths of the links installed by toybox should match those installed by busybox. This is accomplished by changing the flags of a few tools within toybox.
2015-03-01Fix several printf_format warnings.Rob Landley
2014-09-18Reorder functions to get rid of unnecessary prototypes, and move a global ↵Rob Landley
into GLOBALS.
2014-09-17Cleanup pass on cut, more to do.Rob Landley
Cut predates the "pending" directory, so was checked in as-is. Ashwini Sharma's recent static analysis fixes touched this file, but there's a lot more to do than the static analyzer found.
2014-06-02Help text should have a blank line after usage: lines, and a couple other ↵Rob Landley
whitespace tweaks.
2013-11-30Fix cut.Rob Landley
Some commands went in before "pending", and thus need cleanup but are enabled in defconfig. The fact cut used a function out of lib/pending.c is a hint it might be in this category...
2013-09-10First pass of cut cleanup, and make test script slightly happier with the ↵Rob Landley
concept of 80 character lines.
2013-01-02Have error_msg() and friends set TT.exitval to 1 if it's still 0, clean out ↵Rob Landley
other places that were setting it that no longer need to.
2012-11-20Commit 698 adding cut should ahve included the actual cut.c file. (Oops.)Rob Landley