summaryrefslogtreecommitdiff
path: root/usr.bin/split/split.c
AgeCommit message (Collapse)Author
2017-01-10needs <sys/stat.h>christos
2011-09-16Use __deadjoerg
2009-04-13Appease -Wsign-comparelukem
2008-07-21Remove the \n and tabs from the __COPYRIGHT() strings.lukem
Tweak to use a consistent format.
2007-12-15convert __attribute__s to applicable cdefs.h macrosperry
2007-05-31Add a new command-line option "-n chunk_count", that splits the inputjschauma
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.
2004-01-05Homogenize usage messages: make the 'usage' word all lowercase, as this seemsjmmv
to be the most common practice in our tree.
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-07-10Remove the NAME_MAX check. While well-intentioned (and required by POSIX),bjh21
the implementation was horribly broken when <name> contained slashes, and a correct one will probably be quite different.
2003-07-10Remove the hack that varied the first character of the output filename ifbjh21
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.
2003-06-29Clean up the mechanism used for opening output files. Rather than freopeningbjh21
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().
2003-06-26Simplify the handling of ifd by initialising it to the defaultbjh21
(STDIN_FILENO), and only overriding that if the user specifies a different input file.
2003-06-26Remove support for treating "-" as an option rather than an operand. Thebjh21
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.
2003-06-26Delint. This largely involves using size_t and off_t appropriately ratherbjh21
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.
2003-06-24Light KNF and comment tidying.bjh21
2003-06-24Use pathconf() to get the value of {NAME_MAX} for the current directory,bjh21
rather than relying on the #defined one (which is wrong on NetBSD). Dynamically allocate the filename buffer to fit.
2003-06-10From FreeBSD:bjh21
Allow "-" to be specified as an operand as well as an option. SUSV3 requires something like "split -- -" to work. Document the "-" operand.
2003-06-10Add support for the -a option, which should fix standards/11226.bjh21
Code from <hiramatu@boreas.dti.ne.jp>, with improvements from me. Manual page updates from FreeBSD.
2003-03-20PR/20818: Martin Husemann: Split does not handle >= 2G files.christos
1999-11-02revert previouslukem
1999-11-02remove superfluous '-' in getopt stringlukem
1997-10-19WARNSify, fix .Nm usage, getopt returns -1 not EOFlukem
1995-08-31Sync with 4.4lite2jtc
1994-12-21Merged with 4.4lite.jtc
Changed to conform to NetBSD's new RCS Id convention.
1994-04-06don't core if -b is given no argument. bug pointed out by nate williams,cgd
fix by me.
1993-08-01Add RCS identifiers.mycroft
1993-03-21initial import of 386bsd-0.1 sourcescgd