| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
one is a file and the other is a directory in -r mode (cosmetic).
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o -N is implemented
o -X is implemented
o -x is implemented
o diff.c has been rewritten and GNU long options are now supported
o diffdir.c has been rewritten
+ no longer does fork + exec of /usr/bin/diff
+ can be called recursively (and will be for -r)
o diff.h
+ don't include any .h files here any more, do it in the .c files
+ no Bell Labs code in this, gets a UCB copyright (the 32v sources
only have a diff.c and there is nothing in common).
o diffreg.c
+ most all remaining globals are now private to diffreg.c
+ files are only opened once
+ dynamically allocated objects are either freed or realloced
+ added missing UCB copyright (there were lots of UCB changes)
+ print correct thing when -s is specified
OK deraadt@
|
| |
|
|
|
|
|
|
|
|
| |
o get rid of now-unused tempfile variable
o move inifdef into diffreg.c (only used there)
o correct a comment
o use _PATH_DIFF, _PATH_DIFFH and _PATH_PR instead of variables set to them
o get rid of hack to look for pr and diff in /bin
|
| |
|
| |
|
|
|
|
| |
need the associated scaffolding. tedu@ OK
|
|
|
|
|
|
|
|
|
| |
o honor TMPDIR environment variable as per man page
o need 2 temp files if both file1 and file2 are devices
o add error() and errorx() which cleanup temp file and then
call err() and errx() respectively.
OK tedu@
|
| |
|
|
|
|
| |
ok tedu
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
o rename talloc -> emalloc and ralloc -> erealloc
o struct direct -> struct dirent (POSIX)
o kill remaining strcpy()
o fix unterminated string in setfile()
deraadt@ OK
|
|
|
|
|
|
|
| |
o use err/warn
o only call done() when needed (after mkstemp)
o add "-C lines" like GNU grep
OK deraadt@
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
tempfile functions, whitespace, ...
no functional improvements yet
|
| |
|
|
place to start.
|