Commit Graph

6 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
4e859e67dd 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
2024-10-02 17:55:06 +02:00
Dag-Erling Smørgrav
974ea6b297 libdiff: Detect and recover from file truncation.
If a memory-mapped file is truncated before we get to the end, the
atomizer may catch SIGBUS.  Detect that, reduce the input length to
what we were actually able to read, and set a flag so the caller can
take further action (e.g. warn the user and / or start over).

Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D45217
2024-05-20 15:26:33 +02:00
Dag-Erling Smørgrav
b95e96028e libdiff: More type issues.
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D45080
2024-05-03 18:32:41 +02:00
Dag-Erling Smørgrav
0549218b43 libdiff: Fix type issues.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude, markj
Differential Revision:	https://reviews.freebsd.org/D45077
2024-05-03 17:03:50 +02:00
Dag-Erling Smørgrav
5fbe8912d6 libdiff: Improve function prototype detection.
- Recognize ObjC methods.
- Start searching within the leading context.

Sponsored by:	Klara, Inc.
Reviewed by:	thj
Differential Revision:	https://reviews.freebsd.org/D44301
2024-03-27 11:03:29 +01:00
Dag-Erling Smørgrav
59c8e88e72 Add 'contrib/libdiff/' from commit '9eb461aa4b61ab47855b2cee9e5b626a76888b5e'
git-subtree-dir: contrib/libdiff
git-subtree-mainline: f6d489f402
git-subtree-split: 9eb461aa4b

Reviewed by:	imp
Sponsored by:	Klara, Inc.
2024-03-11 14:48:08 +01:00