summaryrefslogtreecommitdiffstats
path: root/usr.bin/cmp/regular.c
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate unneeded headers.delphij2011-06-211-2/+0
|
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-111-4/+0
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-131-0/+2
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-111-2/+0
| | | | Tested with: make universe
* add __unused to succeed at WARNS=6charnier2008-07-101-1/+1
|
* The cmp utility has the questionable feature of using mmap whendas2003-02-261-0/+21
| | | | | | | | | | | comparing regular files. Add a SIGSEGV handler to make its behavior less surprising when a read error occurs. The handler does not attempt to distinguish errors from file truncation, but anyone actively modifying a file while trying to compare it shouldn't even expect something sane to happen. PR: 45391 Reviewed by: mike (mentor)
* ANSIify function definitions to avoid a warning.dwmalone2002-07-281-8/+3
|
* remove __Pimp2002-03-221-1/+1
|
* Style improvements recommended by Bruce as a follow up to somedwmalone2001-12-101-5/+6
| | | | | | | | of the recent WARNS commits. The idea is: 1) FreeBSD id tags should follow vendor tags. 2) Vendor tags should not be compiled (though copyrights probably should). 3) There should be no blank line between including cdefs and __FBSDIF.
* Cast off_t to long long before printing. Use %ll instead of %q incasedwmalone2001-12-031-2/+4
| | | | long long and quad_t are not the same.
* Turn on WARNS=2.markm2001-12-021-4/+5
| | | | Use __FBSDID().
* Make filenames const to avoid a few warnings.dwmalone2001-11-051-1/+1
| | | | | | Add FreeBSD tags. Reviewed by: cmp
* Make cmp work by mmapping chunks of a file, rather than the wholedwmalone2001-11-041-14/+52
| | | | | | | | file at one time. PR: 24732 Submitted by: Andrew L. Neporada <andr@dgap.mipt.ru> MFC after: 2 weeks
* Make cmp -s work properly if skip values are given. Also, exit(1)green2000-06-201-3/+3
| | | | | | | | is now exit(DIFF_EXIT). PR: 18597 Submitted by: Anatoly Vorobey <mellon@pobox.com> Committed at: Usenix terminal room
* Oops, byte offset was as off_t.phk2000-05-151-1/+1
|
* Let cmp(1) grow in -x option to print differences in contemporarry hexphk2000-05-151-1/+7
| | | | format rather than the mixed decimal/octal format of -l.
* Fix improper mmap length paramater which can result in improper behaviorgreen1999-07-291-7/+9
| | | | or cmp crashing in specific cases.
* More egcs warning fixes:imp1999-04-251-1/+2
| | | | | | | | | | o main returns int not void o use return 0 at end of main when needed o use braces to avoid potentially ambiguous else o don't default to type int o #ifdef 0 -> #if 0 Reviewed by: obrien and chuckr
* Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]).archie1998-12-061-1/+1
|
* Sweep through the tree fixing mmap() usage:alex1997-01-161-2/+2
| | | | | | | | | | | | - Use MAP_FAILED instead of the constant -1 to indicate failure (required by POSIX). - Removed flag arguments of '0' (required by POSIX). - Fixed code which expected an error return of 0. - Fixed code which thought any address with the high bit set was an error. - Check for failure where no checks were present. Discussed with: bde
* Our mmap(2) has a limitation where the `offset' parameter must bejoerg1997-01-081-2/+12
| | | | | | | page-aligned. cmp(1) should know about this flaw, and work around it. While i was at it, fixed an uninitialized variable as reported by -Wall.
* When mmap is used, do an madvise(MADV_SEQUENTIAL) to make thingsdyson1996-12-111-0/+3
| | | | | go much more quickly when file input is really done. Of course, the fully cached case will make no difference.
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+98
OpenPOWER on IntegriCloud