History log of /freebsd-10-stable/usr.bin/split/split.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 250882 21-May-2013 eadler

Avoid signed overflow in error handling code.

Reviewed by: cperciva, bjk


# 250432 10-May-2013 eadler

Implement 'split -d' which allows a numeric suffix instead of an
alphabetic one.

PR: bin/116209
Submitted by: Marcin Gryszkalis <mg@fork.pl> (adapted from)
Reviewed by: will
MFC after: 1 week


# 229905 10-Jan-2012 eadler

Fix warning when compiling with gcc46:
error: variable 'defname' set but not use

Approved by: dim
MFC after: 3 day


# 227183 06-Nov-2011 ed

Add missing static keywords to split(1)


# 216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# 177256 16-Mar-2008 das

Add a -n option to split(1) to split files into N chunks rather than
having to specify the right number of bytes.

Obtained from: NetBSD
Submitted by: Jan Schaumann <jschauma@netmeister.org>
PR: 113175


# 161172 10-Aug-2006 keramida

Add support for splitting at gigabyte boundaries. [1]

Also make both lowercase and uppercase suffix letters work
as byte-count suffixes, i.e. the following two commands are
equivalent now:

% split -b 4m foo
% split -b 4M foo

Submitted by: Roman Divacky [1]
Lots of help by: cperciva
Reviewed by: cperciva
MFC after: 1 week


# 161106 08-Aug-2006 keramida

Update usage & SYNOPSIS and clarify that input files are not removed.
Sort getopt option handling of -p too, while here.

The changes are adapted from a patch by Ruslan Ermilov, posted as
followup to docs/33852.

PR: docs/33852
Submitted by: Gary W. Swearingen <swear@blarg.net>
MFC after: 1 week


# 149616 30-Aug-2005 tjr

Remove undocumented historic support for treating "-" as an option
instead of a file operand; this is not compatible with POSIX.


# 149345 21-Aug-2005 tjr

Remove the hack that varied the first character of the output file name
if none was specified on the command line. This is not permitted by
POSIX, and no longer needed now that we have the -a option.

PR: 85099
Submitted by: Toby Peterson (Apple Computer)


# 131978 11-Jul-2004 tjr

Respect locale settings from the environment.


# 100024 15-Jul-2002 tjr

Support larger files (at least 64-bit offsets) by using off_t instead of
int to store offsets.


# 98253 15-Jun-2002 jmallett

Remove <sys/types> where we use <sys/param> already.

protoize.


# 97334 27-May-2002 tjr

Allow "-" to be specified as an operand as well as an option.
SUSV3 requires something like "split -- -" to work. Document the "-" operand.


# 97332 27-May-2002 tjr

Avoid overflowing `fname' if the file name prefix given on the command
line is too long.

Obtained from: OpenBSD


# 92922 21-Mar-2002 imp

remove __P


# 90048 01-Feb-2002 mike

Add -a option (SUSv3) to split(1).

Submitted by: Tim J. Robbins <tim@robbins.dropbear.id.au>
MFC after: 1 month


# 87765 12-Dec-2001 markm

WARNS=2 fixes, use __FBSDID, remove GCC-specific flags.


# 68887 18-Nov-2000 jwd

Add/fix the ability to split a file larger than 2 gigabytes.

Added $FreeBSD tag (in the way the already present sccsid is
done). I've been told the rcsid stuff may be of dubious value
so I'm curious to know if folks (still) use it.

Submitted by: Brad Chisholm <blc@bsdwins.com>


# 43625 04-Feb-1999 archie

Print usage via fprintf(stderr, ..) instead of errx() to avoid progname prefix.
Submitted by: Philippe Charnier <charnier@xp11.frmug.org>


# 43513 01-Feb-1999 archie

Add new option '-p pattern' for splitting files based on matching lines in
the file with a regular expression. Useful for e.g. 'cvs diff' output.
Also compile cleanly with -Wall and fix a few style bugs.
PR: bin/9405


# 28071 11-Aug-1997 charnier

Cosmetic in err() string.


# 24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 9427 07-Jul-1995 rgrimes

This fixes 'split -l NNN foo'. As it stands split will
complain about an 'illegal line count' becuase it's looking
at the wrong end pointer (ep) to detect any extra characters
after the NNN.

Submitted by: Rich Murphey <rich@freebsd.org>

This should probably get pulled into 2.0.6 and 2.1.0


# 1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.


# 1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources