History log of /freebsd-current/usr.bin/csplit/csplit.c
Revision Date Author Comments
# 5e3934b1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

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


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

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.

No functional change intended.


# 48b64419 08-May-2017 Conrad Meyer <cem@FreeBSD.org>

csplit(1): Fix extraneous output in edge case

When the input to csplit contains fewer lines than the number of matches
specified, extra output was mistakenly included in some output files.

Fix the bug and add a simple ATF regression test.

PR: 219024
Submitted by: J.R. Oldroyd <fbsd at opal.com>


# daa379c5 02-May-2017 Jilles Tjoelker <jilles@FreeBSD.org>

csplit: Fix check of fputs() return value, making csplit work again.

As of r295638, fputs() returns the number of bytes written (if not more than
INT_MAX). This broke csplit completely, since csplit assumed only success
only for the return value 0.

PR: 213510
Submitted by: J.R. Oldroyd
MFC after: 1 week
Relnotes: yes


# a651f2bc 10-May-2016 Baptiste Daroussin <bapt@FreeBSD.org>

Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

Obtained from: NetBSD


# b168c3c8 06-Nov-2011 Ed Schouten <ed@FreeBSD.org>

Add missing static keywords to csplit(1)


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 2fa2fea1 22-Mar-2004 Tim J. Robbins <tjr@FreeBSD.org>

Use fseeko() to properly support large files.


# 23e7704b 22-Mar-2004 Tim J. Robbins <tjr@FreeBSD.org>

Use errc().


# 8015edee 28-Jul-2002 David Malone <dwmalone@FreeBSD.org>

The return value of snprintf should be always nonnegative, so it should
be safe to cast it to a size_t before comparing it to a sizeof().


# 5b3df62e 25-Jul-2002 Tim J. Robbins <tjr@FreeBSD.org>

Use sigaction(2) instead of signal(3) to avoid the signal handler being
re-entered.


# e12c2e18 28-Jun-2002 Tim J. Robbins <tjr@FreeBSD.org>

Avoid truncating filenames with snprintf().


# 9bd2f93a 06-Jun-2002 Tim J. Robbins <tjr@FreeBSD.org>

Respect LC_CTYPE and LC_COLLATE environment variables, mainly for their
effects on regular expressions. The libc regex code does not handle
equivalence classes well (for example), but we do our best.


# 248602a1 15-May-2002 Tim J. Robbins <tjr@FreeBSD.org>

Handle the case where a negative offset in a regular expression match
is larger than the number of lines in the overflow file.


# bc025955 15-May-2002 Tim J. Robbins <tjr@FreeBSD.org>

Correct synopsis and usage(): pattern arguments are not optional.


# ea9e961c 02-May-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add the csplit(1) utility, which splits files based on context, as specified
by SUSv3.

PR: 36191
Reviewed by: mike