summaryrefslogtreecommitdiffstats
path: root/usr.bin/cmp/cmp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Stricter checking for skip1 and skip2.cheloha2018-03-051-3/+23
| | | | | | | | As we do elsewhere in the tree, make sure we (a) got a number at all, (b) that it doesn't have non-digits dangling off the end, (c) that it's positive, and (d) that it didn't overflow. ok tb@
* Add fatal() and fatalx() and put them to use.cheloha2018-03-051-32/+11
| | | | | | | | | | | ... but don't use them for pledge errors or usage errors. They are convenience wrappers that check if sflag is set before logging an error. They always exit with status 2. We were not honoring sflag in special.c at all. Now we do. ok tb@
* Delete some useless setlocale(3) calls in /usr/bin, no functional change.schwarze2016-10-281-12/+8
| | | | | | | | Patches from Jan Stary <hans at stare dot cz>, tweaked by me and tb@. While here, apply some simple style improvements: Sort headers, static void __dead usage(), return from main(), zap case '?', drop /* NOTREACHED */, drop break after usage(), ... OK tb@ millert@
* Convert remaining calls to strtoq/strtouq in base with strtoll/strtoull.guenther2016-08-141-3/+3
| | | | | | | Fix a type mismatch in ftp's "page" command and could make transfers restart at the wrong position. ok and a ull->ll tweak from natano@, ok tedu@
* fix exit status on pledge(2) failure.gsoares2015-12-291-3/+3
| | | | OK tb@ jsg@
* Add pledge support to cmp(1).doug2015-10-101-1/+7
| | | | | | | This is a simple case of using "stdio rpath" until all files are opened and then dropping down to "stdio" since it includes "rw" on open fds. ok deraadt@
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-15/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* mostly ansi cleanup; pval okderaadt2003-06-101-10/+6
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-031-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-3/+3
|
* use particular mapping type instead of bogus zero.mickey1999-08-031-7/+11
| | | | -Wall overall happiness; millert@ ok
* errorderaadt1998-01-211-3/+3
|
* allow hex/octal offsets; metcalf@snet.netderaadt1997-06-121-4/+4
|
* getopt(3) returns -1 when out of args, not EOF, whee!millert1997-01-151-3/+3
|
* whoops, goofed on the last one, this should be correct.michaels1996-08-011-7/+19
|
* Modified cmp to, when given arg -s, really be silent. (reported bymichaels1996-08-011-5/+9
| | | | | | | | marc@mit.edu, netbsd pr #2642.) Changed main() to use return() rather than exit(). (just tried checking it in, but local cvs got killed while writting log message)
* rcsidderaadt1996-06-261-1/+2
|
* initial import of NetBSD treederaadt1995-10-181-0/+152