summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/diff_internals.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-6/+6
| | | | | | 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.
* Quiet compiler warnings. OK tomc@ tb@millert2016-10-151-3/+3
|
* Remove xfree(), like already done for RCS. From Michael W Bombardieri,nicm2015-11-051-8/+9
| | | | ok mmcc
* Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@millert2015-02-051-1/+2
|
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-11/+14
| | | | | | | | | 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)
* An internal function called xrealloc() is actually a fail-hardderaadt2014-12-011-9/+9
| | | | reallocarray()... so rename it.
* Move an isqrt() call outside a macro, from Michael W Bombardieri.nicm2011-04-011-7/+10
| | | | ok ray
* Support -U and -C to specify the context length for "cvs diff".nicm2010-07-281-12/+12
| | | | | | | This doesn't alter cvs rdiff, where -U and -C are not support by GNU cvs. ok sthen zinovik
* Reduce variable/function name and whitespace differences betweenray2010-07-231-3/+3
| | | | | | cvs/rcs. OK xsa zinovik
* Combine two diff_output lines into one, from diff.ray2010-07-161-9/+5
| | | | OK stsp xsa nicm
* Die immediately if pread fails. It's a fatal error so treat it asray2010-07-151-6/+3
| | | | | | | | such. Besides, we weren't handling the NULL being returned. From diff. Minor nit by nicm. OK xsa stsp nicm
* Sync with diff/diffreg.c r1.75:ray2010-07-151-5/+4
| | | | | | | Return -1 on error as advertised. Handle case when only one stream failed. OK xsa, stsp
* More cvs/diff/rcs convergence:ray2009-06-071-13/+9
| | | | | | | | | | | 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
* Sync some rcsdiff changes to cvsdiff. As a side effect,ray2009-06-061-72/+72
| | | | | | | cvs diff -t now works. There should be no functional change otherwise. OK millert
* support some additional diff options: -a, -b, -d, -wsthen2009-04-281-10/+14
| | | | ok joris@
* Removed bogus var definition.tobias2008-06-111-8/+2
| | | | ok joris
* Avoid possible NULL pointer dereferences by using reentrant versionstobias2008-06-111-17/+18
| | | | | | of time functions. ok joris
* We have a cvs_buf_puts implementation now, also use cvs_buf_putc insteadtobias2008-06-101-2/+2
| | | | | | of cvs_buf_append where appropiate. ok joris
* diff -D support, also a change in diff_internals to properly printtobias2008-05-301-6/+9
| | | | file name or /dev/null, if file has been removed or added.
* Use a fixed string in case of vasprintf() error instead of relying ontobias2008-04-241-2/+2
| | | | | | | strerror(). Although our vasprintf() sets errno, we cannot rely on it on other systems. ok ray (who spotted this issue), xsa
* correct usage of lseek(2);joris2008-03-081-3/+3
|
* prevent file racesjoris2008-02-271-7/+23
| | | | ok tobias@
* Diff header complies to GNU cvs now.tobias2008-02-031-13/+8
| | | | OK joris@
* Added rdiff support. In order to do this, some output and option fixestobias2008-02-031-35/+96
| | | | | | had to be done for diff, too. OK joris@
* vasprintf requires stdio.htobias2008-01-311-1/+2
|
* fix error message output, it caused diffs to be formed incorrectlyjoris2007-09-221-2/+2
| | | | when no newline was present.
* Sync cvs/rcs diff code.ray2007-06-291-75/+69
| | | | OK joris and xsa.
* Remove cand structure (but not its definition).ray2007-05-301-2/+2
|
* Remove unused struct diff_arg.ray2007-05-301-8/+1
|
* Sync rcsdiff -> cvs diffray2007-05-301-12/+14
| | | | | | | | | | | Surprisingly, rcsdiff has nicer code than cvs diff. Changes: 1. Include sys/param.h because we are using MIN/MAX... not sure why it hasn't complained in the past. 2. Use fstat instead of stat. 3. Remove useless casts and __inline. 4. Plug a memory leak. OK niallo@
* Get rid of another useless variable, another difference between ourray2007-05-291-5/+3
| | | | | | diff code and diff(1). OK niallo@
* Since xrealloc dies on failure it is safe to directly assign to theray2007-05-291-22/+11
| | | | | | | | | original pointer. Theo agrees, and so does the rest of the tree (ssh, etc. all do this already). Saves a bunch of variables and assignments. OK niallo@
* Some spacing syncs with diff(1).ray2007-05-281-3/+3
|
* "in formation" -> "information"ray2007-05-281-2/+2
| | | | OK niallo@
* Line up comments with the rest of the file, like in diff(1).ray2007-05-281-5/+5
|
* sync with espie@'s latest change to diff(1).xsa2007-03-271-6/+23
| | | | | | | | | | | | | | from src/usr.bin/diff/diffreg.c rev 1.67: improve -p for C++ code: classes definition often have 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... OK niallo@ espie@.
* general includes cleanup sweep. ok joris@ niallo@otto2007-02-221-6/+9
|
* first part of opencvs remote, fairly useable on existing treesjoris2006-07-071-3/+3
| | | | | | | | | | | | | | although i advise against using it on real development trees for now. only a few commands work right so far: - commit - diff - status - log - update (partially working) if you feel like testing remote and run into bugs feel free to contact me, and please include a full trace (-t).
* support -p flag for diff, makes dlg@ feel all warmjoris2006-05-311-4/+5
| | | | and fuzzie inside.
* commit the new opencvs code, i have been hacking onjoris2006-05-271-0/+1393
this for the past 2 weeks now and it should go in at the start of the hackathon so others can help out. this code is a lot safer, smarter, faster and best of all it is actually doing what it is suppose to do! basic checkout, update, status, diff and commit are working in local mode only. there is no support for any remote setups now.