<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/split, branch releng/13.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F13.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F13.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2024-05-06T06:04:43Z</updated>
<entry>
<title>Tighten boundary check in split(1) to prevent a potential buffer overflow.</title>
<updated>2024-05-06T06:04:43Z</updated>
<author>
<name>Shawn Bayern</name>
<email>sbayern@law.fsu.edu</email>
</author>
<published>2024-05-03T07:46:18Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6290fc5eeffc2cb145c1715d9b2a1ccf996660b6'/>
<id>urn:sha1:6290fc5eeffc2cb145c1715d9b2a1ccf996660b6</id>
<content type='text'>
(cherry picked from commit 95032b58a1ad0fde57518f17805ca721bb4563ad)
</content>
</entry>
<entry>
<title>split: Further option parsing improvements.</title>
<updated>2023-10-05T15:55:30Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2023-09-28T16:29:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=db95aeb922c9ca20d0914a6ee449064e6d507fe8'/>
<id>urn:sha1:db95aeb922c9ca20d0914a6ee449064e6d507fe8</id>
<content type='text'>
* Whenever possible, use strtonum() to parse numeric arguments.
* Improve usefulness and consistency of error messages.
* While here, fix some type and style issues.

Sponsored by:	Klara, Inc.
Reviewed by:	christos, kevans
Differential Revision:	https://reviews.freebsd.org/D42010

(cherry picked from commit d7399551b02861b910b15c7b7a78a2835644aa45)

split: Improve GNU compatibility.

* Like GNU split, turn autoextend back on if given -a0.
* Add a test case that verifies that -a&lt;non-zero&gt; turns autoextend off.
* Add a test case that verifies that -a0 turns autoextend back on.

Sponsored by:	Klara, Inc.
Reviewed by:	christos, kevans
Differential Revision:	https://reviews.freebsd.org/D42011

(cherry picked from commit d9d69a6f6fc1f8d80df9ce6493e8ab9388781615)
</content>
</entry>
<entry>
<title>split: Add missing test cases.</title>
<updated>2023-09-14T14:59:52Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2023-09-06T03:28:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e035e58097ae6e7fbdf4934c65752baf3f6ab7d3'/>
<id>urn:sha1:e035e58097ae6e7fbdf4934c65752baf3f6ab7d3</id>
<content type='text'>
This adds test cases for c4f7198f47c1 and ac17fc816e67.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D41755

(cherry picked from commit cbea5eddb1b6ae2a101beacf00bf165517f4f2b1)

split: Code cleanup.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D41756

(cherry picked from commit 851bf856d1a7ad5427ea9c22639ab6f6c4a3f503)

split: Fix linecount parsing.

The “undocumented kludge” which unfortunately can't be dropped for backward compatibility reasons was prone to segfaulting and would improperly allow a new linecount when one was already set.  Fix these issues and add regression tests.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D41757

(cherry picked from commit 117c54a78ccd214c236806721f21da750e512d3e)
</content>
</entry>
<entry>
<title>Mark usage function as __dead2 in programs where it does not return</title>
<updated>2023-09-14T14:59:52Z</updated>
<author>
<name>Alfonso Gregory</name>
<email>gfunni234@gmail.com</email>
</author>
<published>2023-07-07T16:39:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9dcbb9e681d70bbe6bab093ddea60bd8687f2c4c'/>
<id>urn:sha1:9dcbb9e681d70bbe6bab093ddea60bd8687f2c4c</id>
<content type='text'>
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735

(cherry picked from commit cccdaf507eee8fb34494b4624eb85bb951e323c8)
</content>
</entry>
<entry>
<title>split(1): auto-extend suffix length if required</title>
<updated>2023-09-14T14:59:52Z</updated>
<author>
<name>Jan Schaumann</name>
<email>jschauma@netmeister.org</email>
</author>
<published>2023-05-30T12:55:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=31ced5c14337a68a2e6bfde06d6f4cd9a465f218'/>
<id>urn:sha1:31ced5c14337a68a2e6bfde06d6f4cd9a465f218</id>
<content type='text'>
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.

Reviewed by:	christos
Approved by:	kevans
Different Revision:	https://reviews.freebsd.org/D38279

(cherry picked from commit c4f7198f47c15eece849d06e8fdd1fb46ed43bba)

split(1): add '-c' to continue creating files

Currently, split(1) will clobber any existing output files:

$ split file; ls
xaa xab xac xad
$ split second-file; ls
xaa xab xac xad xae xaf

This patch adds a flag "-c" (mnemonic "create, don't overwrite" or
"continue where you left off"):

$ split file; ls
xaa xab xac xad
$ split -c second-file; ls
xaa xab xac xad xae xaf xag xah xai xaj

Reviewed by:	christos
Approved by:	kevans
Different Revision:	https://reviews.freebsd.org/D38553

(cherry picked from commit ac17fc816e67a4e5e2e481b5001577a8d589f8b6)
</content>
</entry>
<entry>
<title>split: Update synopsis and usage; fix examples</title>
<updated>2023-09-14T14:59:52Z</updated>
<author>
<name>Mateusz Piotrowski</name>
<email>0mp@FreeBSD.org</email>
</author>
<published>2023-04-14T11:50:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a721afaf85437708ae45a5b3baaa6915f0f1aba0'/>
<id>urn:sha1:a721afaf85437708ae45a5b3baaa6915f0f1aba0</id>
<content type='text'>
- Mark -d as an optional flag
- Add a prompt to one of the examples for consistency
- Add -d to the usage message

Sponsored by:	Klara Inc.

(cherry picked from commit fb499259997c0bfd724b7b67578035cd977ef60f)
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line nroff pattern</title>
<updated>2023-08-23T17:43:32Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:32:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=24115b70d6d614ed7ac5cfc4f51fa9d6cfe8b1b2'/>
<id>urn:sha1:24115b70d6d614ed7ac5cfc4f51fa9d6cfe8b1b2</id>
<content type='text'>
Remove /^\.\\"\s*\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b2c76c41be32)
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-23T17:43:30Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:32:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=023fc80ee38a117fa65b2ccb2abf8bdc7dbd6fd9'/>
<id>urn:sha1:023fc80ee38a117fa65b2ccb2abf8bdc7dbd6fd9</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit d0b2dbfa0ecf)
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-23T17:43:26Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3d497e17ebd33fe0f58d773e35ab994d750258d6'/>
<id>urn:sha1:3d497e17ebd33fe0f58d773e35ab994d750258d6</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in main:
(cherry picked from commit 1d386b48a555)
</content>
</entry>
<entry>
<title>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
<updated>2023-07-25T15:13:49Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-05-10T15:40:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=caa41f641755c935b036e17440a3b49329c904ed'/>
<id>urn:sha1:caa41f641755c935b036e17440a3b49329c904ed</id>
<content type='text'>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix

(cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
</content>
</entry>
</feed>
