History log of /src/usr.bin/split/split.c |
Revision | | Date | Author | Comments |
1.33 |
| 09-Feb-2024 |
andvar | fix spelling mistakes, mainly in comments and log messages.
|
1.32 |
| 14-Feb-2023 |
jschauma | consistently use EXIT_FAILURE / EXIT_SUCCESS instead of 1 / 0
|
1.31 |
| 14-Feb-2023 |
jschauma | sort getopts string
|
1.30 |
| 12-Feb-2023 |
jschauma | sort option blocks; no functional change
|
1.29 |
| 30-Jan-2023 |
jschauma | auto-extend suffix length if required
If the input cannot be split into the number of files resulting from the default suffix length, automatically extend the suffix length rather than bailing out with 'too many files'.
Suffixes are extended such that the resulting files continue to sort lexically and "cat *" would reproduce the input. For example, splitting a 1M lines file into (default) 1000 lines per file would yield files named 'xaa', 'xab', ..., 'xyy', 'xyz', 'xzaaa', 'xzaab', ..., 'xzanl'.
If '-a' is specified, the suffix length is not auto-extended.
This behavior matches GNU sort(1) since around version 8.16.
|
1.28 |
| 27-Jan-2023 |
jschauma | whitespace / comment pedantry
|
1.27 |
| 10-Jan-2017 |
christos | needs <sys/stat.h>
|
1.26 |
| 16-Sep-2011 |
joerg | branches: 1.26.24; Use __dead
|
1.25 |
| 13-Apr-2009 |
lukem | Appease -Wsign-compare
|
1.24 |
| 21-Jul-2008 |
lukem | branches: 1.24.6; Remove the \n and tabs from the __COPYRIGHT() strings. Tweak to use a consistent format.
|
1.23 |
| 15-Dec-2007 |
perry | branches: 1.23.6; convert __attribute__s to applicable cdefs.h macros
|
1.22 |
| 31-May-2007 |
jschauma | branches: 1.22.4; Add a new command-line option "-n chunk_count", that splits the input file into chunk_count smaller files. Each file will be size/chunk_count bytes large, with whatever spillover there is ending up in the chunk_counth file.
|
1.21 |
| 05-Jan-2004 |
jmmv | Homogenize usage messages: make the 'usage' word all lowercase, as this seems to be the most common practice in our tree.
|
1.20 |
| 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
|
1.19 |
| 10-Jul-2003 |
bjh21 | Remove the NAME_MAX check. While well-intentioned (and required by POSIX), the implementation was horribly broken when <name> contained slashes, and a correct one will probably be quite different.
|
1.18 |
| 10-Jul-2003 |
bjh21 | Remove the hack that varied the first character of the output filename if a base name wasn't specified. It's not really necessary now that we've got -a, it's ugly, and POSIX doesn't permit it.
Suggested on tech-userlevel a couple of weeks ago to a deafening silence.
|
1.17 |
| 29-Jun-2003 |
bjh21 | Clean up the mechanism used for opening output files. Rather than freopening stdout onto each file in turn, then writing through fileno(stdout), use open() and close() like any sensible program. This saves a lot of system calls, removes a dependency on the particular behaviour of BSD freopen(), and allows us to detect and report errors from close().
|
1.16 |
| 26-Jun-2003 |
bjh21 | Simplify the handling of ifd by initialising it to the default (STDIN_FILENO), and only overriding that if the user specifies a different input file.
|
1.15 |
| 26-Jun-2003 |
bjh21 | Remove support for treating "-" as an option rather than an operand. The practical consequence of this is that "-" is treated the same as a file name, and can't have options specified after it. This is consistent with other utilities and with POSIX.
|
1.14 |
| 26-Jun-2003 |
bjh21 | Delint. This largely involves using size_t and off_t appropriately rather that throwing around unsigned long long. There are a few LINTED comments where I'm sure overflow can never occur, and with these lint gives this a clean bill of health.
|
1.13 |
| 24-Jun-2003 |
bjh21 | Light KNF and comment tidying.
|
1.12 |
| 24-Jun-2003 |
bjh21 | Use pathconf() to get the value of {NAME_MAX} for the current directory, rather than relying on the #defined one (which is wrong on NetBSD). Dynamically allocate the filename buffer to fit.
|
1.11 |
| 10-Jun-2003 |
bjh21 | From FreeBSD: Allow "-" to be specified as an operand as well as an option. SUSV3 requires something like "split -- -" to work. Document the "-" operand.
|
1.10 |
| 10-Jun-2003 |
bjh21 | Add support for the -a option, which should fix standards/11226. Code from <hiramatu@boreas.dti.ne.jp>, with improvements from me. Manual page updates from FreeBSD.
|
1.9 |
| 20-Mar-2003 |
christos | PR/20818: Martin Husemann: Split does not handle >= 2G files.
|
1.8 |
| 02-Nov-1999 |
lukem | revert previous
|
1.7 |
| 02-Nov-1999 |
lukem | remove superfluous '-' in getopt string
|
1.6 |
| 19-Oct-1997 |
lukem | branches: 1.6.6; WARNSify, fix .Nm usage, getopt returns -1 not EOF
|
1.5 |
| 31-Aug-1995 |
jtc | Sync with 4.4lite2
|
1.4 |
| 21-Dec-1994 |
jtc | Merged with 4.4lite. Changed to conform to NetBSD's new RCS Id convention.
|
1.3 |
| 06-Apr-1994 |
cgd | don't core if -b is given no argument. bug pointed out by nate williams, fix by me.
|
1.2 |
| 01-Aug-1993 |
mycroft | Add RCS identifiers.
|
1.1 |
| 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.3 |
| 31-Aug-1995 |
jtc | imported from 44lite2
|
1.1.1.2 |
| 21-Dec-1994 |
jtc | imported from 44lite
|
1.1.1.1 |
| 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.6.6.1 |
| 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.22.4.1 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.23.6.1 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.24.6.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
|
1.26.24.1 |
| 20-Mar-2017 |
pgoyette | Sync with HEAD
|