Commit Graph

63 Commits

Author SHA1 Message Date
fernape
bd0833e31e split(1): Add EXAMPLES section
Add EXAMPLES covering -d, -n and -p
Include small explanation about the size of the chunks for the -n option

Approved by:	0mp
Differential Revision:	https://reviews.freebsd.org/D25198
2020-06-18 15:14:10 +00:00
kan
5f030f05b6 Revert r352953: Convert pnmatch to single element array in regexec calls
Requested by: cem
2019-10-02 16:08:01 +00:00
kan
bf9e96343b Convert pnmatch to single element array in regexec calls
The regexec function is declared as taking an array of regmatch_t
elements, and passing in the pointer to singleton element, while
correct, triggers a Coverity warning. Convert the singleton into
an array of one to silence the warning.

Reported by:	Coverity
Coverity CID:	1009732, 1009733
MFC after:	2 weeks
2019-10-02 06:15:30 +00:00
pfg
872b698bd4 General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
bdrewery
a598c4b809 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
imp
7e6cabd06e Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
sjg
008d7c831f Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
sjg
75a137820d dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
sjg
65145fa4c8 Merge sync of head 2015-05-27 01:19:58 +00:00
bapt
8d6c7a49a6 Convert to usr.bin/ to LIBADD
Reduce overlinking
2014-11-25 14:29:10 +00:00
sjg
5860f0d106 Updated dependencies 2014-05-16 14:09:51 +00:00
sjg
1a7e48acf1 Updated dependencies 2014-05-10 05:16:28 +00:00
sjg
a3e7613c6a New/updated dependencies 2014-05-05 18:31:00 +00:00
sjg
5e568154a0 Merge head 2014-04-28 07:50:45 +00:00
eadler
c6b475170c Add missed DPADD
Reported by:	swildner@DragonflyBSD.org
2013-11-09 09:05:50 +00:00
eadler
c56ee6b0c2 Change manual string conversion to expand_number
Reviewed by:	adrian
2013-11-09 08:57:21 +00:00
sjg
62bb106222 Merge from head 2013-09-05 20:18:59 +00:00
eadler
b6bdb6d2f3 Avoid signed overflow in error handling code.
Reviewed by:	cperciva, bjk
2013-05-21 19:56:03 +00:00
eadler
d81843f847 Bump .Dd for recent content change.
Reported by:	delphij
2013-05-10 12:49:16 +00:00
eadler
926f1ce0ab 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
2013-05-10 04:23:03 +00:00
sjg
6d37b86f2b Updated dependencies 2013-03-11 17:21:52 +00:00
sjg
0ee5295509 Updated dependencies 2013-02-16 01:23:54 +00:00
marcel
9dd41e3647 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
eadler
26ae1ef872 Fix warning when compiling with gcc46:
error: variable 'defname' set but not use

Approved by:	dim
MFC after:	3 day
2012-01-10 02:55:43 +00:00
ed
0d6f43e2bd Add missing static keywords to split(1) 2011-11-06 08:17:11 +00:00
joel
29af67e52c 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
2010-12-11 08:32:16 +00:00
gavin
abf267cb5b Correct spelling mistake, int -> into
MFC after:	3 days
2010-09-02 21:29:50 +00:00
trhodes
855f844ab0 When "-b" is specified, one could easily create "smaller" files
that are much larger than expected (given the default size).
Change "smaller files" to "split files" which is more in line
with what "-b" actually does.

PR:		119329
Submitted by:	Julian Stacey <jhs@berklix.org>
2009-01-24 05:32:11 +00:00
das
b406d6e2a3 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
2008-03-16 15:15:32 +00:00
ru
33e34aeeb5 Markup fixes. 2006-09-29 15:20:48 +00:00
keramida
cd184a0ca1 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
2006-08-10 10:41:47 +00:00
keramida
7d23f1583e 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
2006-08-08 21:25:22 +00:00
ru
4de1ee30af -mdoc sweep. 2005-11-18 10:36:29 +00:00
tjr
c39045c496 Include option-argument names in the list in the DESCRIPTION section.
Remove a non-bug from the BUGS section.
2005-08-30 12:48:28 +00:00
tjr
71ef4ac3b5 Remove undocumented historic support for treating "-" as an option
instead of a file operand; this is not compatible with POSIX.
2005-08-30 12:32:18 +00:00
tjr
4241897974 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)
2005-08-21 06:35:02 +00:00
ru
6cc4b6c220 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
tjr
f41e48677c Fix document year.
Noticed by:	simon
2004-07-11 15:04:16 +00:00
tjr
466d5d5279 Add fairly standard ENVIRONMENT and DIAGNOSTICS sections. 2004-07-11 14:47:32 +00:00
tjr
53407e8087 Respect locale settings from the environment. 2004-07-11 14:44:23 +00:00
tjr
3635de5b6e Support larger files (at least 64-bit offsets) by using off_t instead of
int to store offsets.
2002-07-15 05:31:55 +00:00
jmallett
c492727786 Remove <sys/types> where we use <sys/param> already.
protoize.
2002-06-15 11:03:28 +00:00
tjr
287490dff8 Sort sections. 2002-06-03 14:42:28 +00:00
tjr
1a15fcee23 Correct HISTORY section - split(1) appeared at least as early as V3. 2002-06-03 14:41:32 +00:00
ru
7cc3531206 mdoc(7) police: use .Fl to denote stdin. 2002-05-30 06:07:29 +00:00
tjr
c73112a6c7 Claim conformance to IEEE Std 1003.1-2001.
See also csplit(1).
2002-05-27 06:08:14 +00:00
tjr
fd517aac90 Allow "-" to be specified as an operand as well as an option.
SUSV3 requires something like "split -- -" to work. Document the "-" operand.
2002-05-27 05:27:10 +00:00
tjr
89c62e14bd Avoid overflowing `fname' if the file name prefix given on the command
line is too long.

Obtained from:	OpenBSD
2002-05-27 04:59:46 +00:00
imp
0b20191705 remove __P 2002-03-22 01:42:45 +00:00
mike
c48bdad502 Add -a option (SUSv3) to split(1).
Submitted by:	Tim J. Robbins <tim@robbins.dropbear.id.au>
MFC after:	1 month
2002-02-01 06:55:18 +00:00