| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
the same meaning in our diff ed-context.
As a bonus, our ed-diff output can be processed by GNU patch now, too.
okay millert@
|
|
|
|
| |
Based on a diff from and OK deraadt@
|
| |
|
|
|
|
|
|
|
| |
This loses a "new size is 0" failure case. Probably not relevant;
and since we develop this in OpenBSD, we'll catch that before someone
else imports this...
ok millert
|
| |
|
|
|
|
|
|
|
|
|
| |
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
|
|
|
|
|
|
| |
with a newline. Issue reported by guenther@.
ok guenther@
|
|
|
|
|
|
|
| |
checking for embedded NULs, as was done for grep(1) some time ago.
Avoids problems with e.g. latin1-encoded files being treated as binary, since
isprint() uses only ASCII by default and diff(1) doesn't call setlocale().
prodded by and ok bluhm
|
|
|
|
| |
appending the file portion. OK krw@ matthew@
|
|
|
|
| |
ok ray
|
|
|
|
| |
OK nicm
|
|
|
|
| |
OK millert
|
|
|
|
|
|
|
|
| |
always to stdout. A large number of differences are due to this.
This diff reduces many more differences between diff and cvs/rcs.
Personally I think it's kinda ugly. =(
"Looks fine" millert
|
|
|
|
| |
OK millert
|
|
|
|
|
|
| |
Handle case when only one stream failed.
OK otto, millert
|
|
|
|
|
|
|
|
|
|
| |
even though diff(1) will exit(3) soon after this mkstemp(3) failure,
even though this cannot really leak anything,
close the file descriptor as soon as it is not used any more
to make correctness of the code more obvious.
patch from Igor Zinovik <zinovik dot igor at gmail dot com> on tech@
"looks nice" deraadt@
|
|
|
|
|
|
|
| |
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms
|
|
|
|
|
|
|
|
|
|
|
| |
1. Mostly variable/function renaming, SIZE_T_MAX->SIZE_MAX, and
spacing.
2. One strchr -> strncspn.
3. diff had a weird thing where it set file[12] = ofile[12] but
never updated file or ofile, then if file and ofile were different
it freed it. I removed it.
OK millert
|
|
|
|
| |
OK millert
|
|
|
|
| |
ok pyr@, ray@, millert@, moritz@, chl@
|
|
|
|
|
|
|
|
| |
- Move function prototypes before variables.
No binary change.
OK otto and millert.
|
|
|
|
|
|
|
|
|
| |
1. Replace all the e*alloc functions with the x*alloc versions.
2. Whitespace syncs according to style.
3. Remove the __inline stuff.
4. Remove the min/max functions, using the MAX/MIN macros instead.
OK millert@
|
|
|
|
|
|
|
|
|
|
|
| |
public:/protected:/private: at the start of line.
This lets the -p scanner just take note of the section and keep
looking for the actual class definition.
Also increase function name bufsize so it shows most of these pesky C++
decls...
okay otto@
|
|
|
|
| |
okay millert@
|
|
|
|
|
|
| |
"ignore" processing has finished. This way we only print the header
for files that have diffs. The new behavior matches GNU diff (which
is where the -I flag comes from). OK otto@ espie@
|
|
|
|
|
| |
avoid having to check for encoding errors returned by snprintf().
From Ray Lai; ok millert@ jaredy@
|
|
|
|
| |
lines and ignore them all. With and ok jaredy@
|
| |
|
|
|
|
| |
like GNU diff does. Adapted from a diff by YAMAMOTO Takashi
|
|
|
|
|
| |
portability. Spotted by YAMAMOTO Takashi.
ok millert@
|
| |
|
|
|
|
| |
then doing sizeof(cand). silly kids
|
|
|
|
|
| |
Jared Yanovich, with twists from millert@ and me. Testing by brad@,
sturm@ and pval@. ok millert@
|
|
|
|
|
|
|
| |
into a single hunk. This makes diff produce the same diff as gdiff
in more cases. Found by brad@ and sturm@ using the ports tree.
ok millert@
|
|
|
|
| |
"works here" millert@ ok miod@ deraadt@
|
| |
|
|
|
|
| |
fails. Fixes "diff -i" exit value. Problem found by Claudio Jeker.
|
|
|
|
|
|
| |
for edit scripts. Instead, print it to stderr. This matches the
GNU diff behavior and fixes a problem with RCS and files with no
trailing newline. tedu@ OK
|
|
|
|
| |
millert@ otto@ ok
|
| |
|
|
|
|
|
|
|
|
| |
newcand() (this is what blows up the memory usage so badly). Instead
of counting how many times we go through the loop, count how many
times we called newcand(). I renamed loopcount -> numtries since
it is no longer the number of loop runs. This fixes espie@'s regression.
tedu@ OK
|
|
|
|
|
|
| |
memory allocation. Initial version by me, cleanup by millert@.
ok millert@
|
|
|
|
|
|
|
|
| |
hash function was apparently optimized for 16 bit processors and
generates quite some collisions.
- Fix another case of excessive reallocing.
ok millert@
|
|
|
|
|
|
| |
o after copying to a temp file, lseek() to the beginning so the
inline cmp routine works.
Fixes an exit code issue when comparing against stdin.
|
| |
|
|
|
|
|
| |
when diffreg() is called multiple times (i.e. in directory mode).
Fixes a hang I saw doing "diff -r" of two large directory trees.
|
|
|
|
|
|
|
|
|
| |
producing suboptimal diffs for large file containing lots of changes.
Switch heuristic off with -d/--minimal (GNU compatible). Some hints
from millert@.
- Improve performance by reducing the number of realloc(3) calls.
ok millert@ tedu@
|
| |
|
| |
|
|
|
|
|
|
| |
printed a header that turned the output into an actual script that
called ed(1) to make the changes. This conflicts with POSIX so the
header has been removed and the standard diff header is used instead.
|