History log of /src/usr.bin/diff/diffreg_new.c (Results 1 – 19 of 19)
Revision Date Author Comments
# d5404462 18-Feb-2026 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Drop unnecessary casts, fix none algo

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


# 55f160fb 05-Feb-2026 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Print an error message on I/O error

If an error occurs while atomizing either file, immediately print an
error message using the error code returned by the atomizer, and set
the error bit in t

diff: Print an error message on I/O error

If an error occurs while atomizing either file, immediately print an
error message using the error code returned by the atomizer, and set
the error bit in the exit status.

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

show more ...


# a689bfa4 05-Feb-2026 Dag-Erling Smørgrav <des@FreeBSD.org>

libdiff: Simplify truncation detection

* Adjust the comment to reflect the fact that SIGBUS can occur not only
if the file is truncated, but also if an I/O error occurs while paging
in any part

libdiff: Simplify truncation detection

* Adjust the comment to reflect the fact that SIGBUS can occur not only
if the file is truncated, but also if an I/O error occurs while paging
in any part of it.

* Instead of setting a flag, just return EIO.

* Adjust the unit test accordingly.

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

show more ...


# 4d73b07d 02-Feb-2026 Baptiste Daroussin <bapt@FreeBSD.org>

diff: fix support for -l with new diff algorithm

MFC After: 3 days
Reviewed by: des
Differential Revision: https://reviews.freebsd.org/D55052


# 893839b1 23-Dec-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Fix device case.

We already fell back to Stone for FIFOs, but we actually need to fall
back to Stone for everything except regular files, because libdiff's
atomizer needs to know the size of i

diff: Fix device case.

We already fell back to Stone for FIFOs, but we actually need to fall
back to Stone for everything except regular files, because libdiff's
atomizer needs to know the size of its input in advance, and neither
FIFOs nor devices can be trusted to report their size.

MFC after: 1 week
Reported by: mav
Reviewed by: mav, allanjude
Differential Revision: https://reviews.freebsd.org/D48181

show more ...


# 4e859e67 02-Oct-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

libdiff: Implement diff coloring.

This patch got accidentally left out when libdiff was imported. The
rest of the code (command-line option etc.) was present, just not the
part that actually prints

libdiff: Implement diff coloring.

This patch got accidentally left out when libdiff was imported. The
rest of the code (command-line option etc.) was present, just not the
part that actually prints ANSI color codes.

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

show more ...


# b780b650 20-May-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Warn if the atomizer detected truncation.

Sponsored by: Klara, Inc.
Reviewed by: allanjude, markj
Differential Revision: https://reviews.freebsd.org/D45219


# eea5f8d4 03-May-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Sort headers.

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


# d9a9f23d 27-Mar-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Integrate libdiff from OpenBSD GoT.

This adds support for two new diff algorithms, Myers diff and Patience
diff.

These algorithms perform a different form of search compared to the
classic St

diff: Integrate libdiff from OpenBSD GoT.

This adds support for two new diff algorithms, Myers diff and Patience
diff.

These algorithms perform a different form of search compared to the
classic Stone algorithm and support escapes when worst case scenarios
are encountered.

Add the -A flag to allow selection of the algorithm, but default to
using the new Myers diff implementation.

The libdiff implementation currently only supports a subset of input and
output options supported by diff. When these options are used, but the
algorithm is not selected, automatically fallback to the classic Stone
algorithm until support for these modes can be added.

Based on work originally done by thj@ with contributions from kevans@.

Sponsored by: Klara, Inc.
Reviewed by: thj
Differential Revision: https://reviews.freebsd.org/D44302

show more ...


# 893839b1 23-Dec-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Fix device case.

We already fell back to Stone for FIFOs, but we actually need to fall
back to Stone for everything except regular files, because libdiff's
atomizer needs to know the size of i

diff: Fix device case.

We already fell back to Stone for FIFOs, but we actually need to fall
back to Stone for everything except regular files, because libdiff's
atomizer needs to know the size of its input in advance, and neither
FIFOs nor devices can be trusted to report their size.

MFC after: 1 week
Reported by: mav
Reviewed by: mav, allanjude
Differential Revision: https://reviews.freebsd.org/D48181

show more ...


# 4e859e67 02-Oct-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

libdiff: Implement diff coloring.

This patch got accidentally left out when libdiff was imported. The
rest of the code (command-line option etc.) was present, just not the
part that actually prints

libdiff: Implement diff coloring.

This patch got accidentally left out when libdiff was imported. The
rest of the code (command-line option etc.) was present, just not the
part that actually prints ANSI color codes.

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

show more ...


# b780b650 20-May-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Warn if the atomizer detected truncation.

Sponsored by: Klara, Inc.
Reviewed by: allanjude, markj
Differential Revision: https://reviews.freebsd.org/D45219


# eea5f8d4 03-May-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Sort headers.

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


# d9a9f23d 27-Mar-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Integrate libdiff from OpenBSD GoT.

This adds support for two new diff algorithms, Myers diff and Patience
diff.

These algorithms perform a different form of search compared to the
classic St

diff: Integrate libdiff from OpenBSD GoT.

This adds support for two new diff algorithms, Myers diff and Patience
diff.

These algorithms perform a different form of search compared to the
classic Stone algorithm and support escapes when worst case scenarios
are encountered.

Add the -A flag to allow selection of the algorithm, but default to
using the new Myers diff implementation.

The libdiff implementation currently only supports a subset of input and
output options supported by diff. When these options are used, but the
algorithm is not selected, automatically fallback to the classic Stone
algorithm until support for these modes can be added.

Based on work originally done by thj@ with contributions from kevans@.

Sponsored by: Klara, Inc.
Reviewed by: thj
Differential Revision: https://reviews.freebsd.org/D44302

show more ...


# 893839b1 23-Dec-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Fix device case.

We already fell back to Stone for FIFOs, but we actually need to fall
back to Stone for everything except regular files, because libdiff's
atomizer needs to know the size of i

diff: Fix device case.

We already fell back to Stone for FIFOs, but we actually need to fall
back to Stone for everything except regular files, because libdiff's
atomizer needs to know the size of its input in advance, and neither
FIFOs nor devices can be trusted to report their size.

MFC after: 1 week
Reported by: mav
Reviewed by: mav, allanjude
Differential Revision: https://reviews.freebsd.org/D48181

show more ...


# 4e859e67 02-Oct-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

libdiff: Implement diff coloring.

This patch got accidentally left out when libdiff was imported. The
rest of the code (command-line option etc.) was present, just not the
part that actually prints

libdiff: Implement diff coloring.

This patch got accidentally left out when libdiff was imported. The
rest of the code (command-line option etc.) was present, just not the
part that actually prints ANSI color codes.

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

show more ...


# b780b650 20-May-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Warn if the atomizer detected truncation.

Sponsored by: Klara, Inc.
Reviewed by: allanjude, markj
Differential Revision: https://reviews.freebsd.org/D45219


# eea5f8d4 03-May-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Sort headers.

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


# d9a9f23d 27-Mar-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

diff: Integrate libdiff from OpenBSD GoT.

This adds support for two new diff algorithms, Myers diff and Patience
diff.

These algorithms perform a different form of search compared to the
classic St

diff: Integrate libdiff from OpenBSD GoT.

This adds support for two new diff algorithms, Myers diff and Patience
diff.

These algorithms perform a different form of search compared to the
classic Stone algorithm and support escapes when worst case scenarios
are encountered.

Add the -A flag to allow selection of the algorithm, but default to
using the new Myers diff implementation.

The libdiff implementation currently only supports a subset of input and
output options supported by diff. When these options are used, but the
algorithm is not selected, automatically fallback to the classic Stone
algorithm until support for these modes can be added.

Based on work originally done by thj@ with contributions from kevans@.

Sponsored by: Klara, Inc.
Reviewed by: thj
Differential Revision: https://reviews.freebsd.org/D44302

show more ...