Age | Commit message (Collapse) | Author |
|
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
|
(very sloppy specification) leaves an undefined value in *ret, so it is
wrong to inspect it, the error condition is enough.
discussed a little with nicm, and then much more with millert until we
were exasperated
|
|
|
|
|
|
|
|
or -P options are not used. From Ibrahim Khalifa
|
|
When diff encounters a line that consists of a single dot, it emits two
dots instead, stops the current command and emits a substitute command
to replace the double dot with a single one. Then it restarts the
(original) command if necessary and inserts further lines. This is done
because a single dot on a line does have special meaning in ed. (It
stops text insertion.)
Following issues are fixed by this commit.
- The line number for the substitute command should be the number of the
most recently inserted line. diff instead uses the number of the first
inserted line of the current hunk. The first character of that line is
removed when applying the diff, while the superfluous dot is not.
- The line number of the restarted command is not adjusted for the
number of lines already inserted, resulting in the reordering of lines..
- When there is a bare dot in the replacement text of a change command,
too many lines are deleted, because a second change command is emitted.
An append command should be emitted instead, because the target lines
have already been removed by the first change command.
tweaks and ok stefan@
|
|
OK tb@ jsg@
|
|
ok millert
|
|
ok nicm
|
|
ago. Pointed out by Ricardo Mestre.
|
|
|
|
|
|
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@
|
|
- tmppath for when mktemp() operates in /tmp proper
- cpath+wpath for use of $TMPDIR
based on log-message from previous commit
ok deraadt@
|
|
uses can tame "stdio wpath rpath cpath tmppath". tmppath for when
mktemp() operates in /tmp proper, but cpath+wpath for use of $TMPDIR.
ok sthen millert
|
|
|
|
|
|
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@
|
|
Also, in 'ftp', always put the error message last, after the hostname/ipaddr.
ok jsing@ krw@ millert@
|
|
while here, converting \*(Gt to >, in accordance with some advice from ingo
|
|
For size and overflow errors, use the same error messages as ecalloc().
OK otto@
|
|
from Jan Stary
|
|
|
|
int (*)(struct dirent *)
to
int (*)(const struct dirent *)
to match POSIX.
ok millert@, ports check by naddy@
|
|
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
|
|
diff originally from Daniel Dickman, but otto suggested this paper
ok otto millert
|
|
the returned count and set and end pointer instead. we no longer
need to allocate a dummy array when diffing against a non-existent
directory so eliminate slurpdir() and call scandir() directly.
OK krw@
|
|
instead. This makes slurpdir() just a thin wrapper around scandir(3).
OK schwarze@
|
|
so it works correctly with large offsets (and matches other systems).
This requires adding a new getdirentries syscall, with the old one
renamed to ogetdirentries. All in-tree consumers of getdirentries()
have been updated. Bump libc and libpthread major numbers.
OK and with deraadt@
|
|
|
|
as suggested by Thomas de Grivel <billitch at gmail dot com> on tech@.
While here, remove the SEE ALSO entries (but not the cross references
at the appropriate places!) to fnmatch(3), re_format(7), and pr(1).
Their relevance is restricted to one single option each, the latter
is mostly obsolete nowadays anyway, and the number of SEE ALSO entries
is so large that SEE ALSO is starting to look confusing.
"yes" jmc@
|
|
! com>, thanks!
OK deraadt
|
|
OK nicm
|
|
OK nicm
|
|
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@
|
|
ok jmc@
|
|
ok jmc@
|