Age | Commit message (Collapse) | Author |
|
FIFOs shall be skipped. Other types of files may be skipped too
(this is implementation-dependent). In directory mode, just skip
anything that is not a regular file or directory. OK tedu@
|
|
|
|
|
|
"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
|
|
was overzealous in this case). Fix tested by Hugo Villeneuve and myself.
|
|
- note (again) that output options are mutually exclusive
from Andy Isaacson (PR 3479)
|
|
|
|
- remove "mutually exclusive" clause
- -c produces 15 *'s, not a dozen
- add -a to uage()
- sync usage() with SYNOPSIS
ok tedu@
|
|
|
|
|
|
noticed by itojun@, ok deraadt@
|
|
ok otto@
|
|
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.
|
|
|
|
ok jmc@
|
|
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.
|
|
that will confuse ed(1).
POSIX says "one way to fix this bug is to output two periods whenever a lone
period is needed, then terminate the append command with a period, and then
use the substitute command to convert the two periods into one period."
This is exactly what I have done.
|
|
were not printed when the output format was -e (ed) since this
prevented the output from being used as an ed script.
However, POSIX specifies that this message shall always be printed
regardless of the output format (this is also what GNU diff does).
Also do the same with the "Common subdirectory" message which
POSIX lists as optional.
|
|
|
|
|
|
-l support was added.
|
|
|
|
one is a file and the other is a directory in -r mode (cosmetic).
|
|
|
|
unpGet rid of ugly hack in readhash() that appears to be there for
machines with a 16 bit word size. Also replace (HALFLONG - 1) with
a new define, HASHMASK since it really is a mask.
None of this results in any actual change in behavior.
|
|
emacs users!). In most cases this just means checking for EOF in
addition to '\n'. However, we need to tread carefully in readhash().
There we return 0 on EOF iff it is the first char in a "line".
Additionally, if the -b or -w flags were specified and the last
character in one file was '\n' but the other file is missing '\n',
pretend that we didn't see the newline in the one file. This is
consistent with GNU diff. For the non-{b,w} case, print
"\ No newline at end of file" when we see EOF before a newline in
one file where the other file has one. Again, this is for consistency
with GNU diff and patch(1) in -current knows how to interpret this
message.
OK tedu@ and otto@
|
|
|
|
it so we don't have to worry about cleanup. This means the quit()
signal handler and error/errorx can go away too.
Move splice() out of diffreg() and into diff.c where it belongs
since we don't want to be calling splice() for a directory diff.
Add a check for mismatched paths (one file, one dir) in diffreg.c.
deraadt@ OK
|
|
mode (like GNU diff).
|
|
|
|
o Fix a double free in the temmp file case
|
|
|
|
from dir1).
|