Commit Graph

25 Commits

Author SHA1 Message Date
ed
15a0ba36db Add missing static keywords to look(1) 2011-11-06 08:15:59 +00:00
ed
ce57dfe403 Sort header file names.
Spotted by:	des
2011-10-17 13:54:55 +00:00
ed
934a6f8b67 Add missing #include.
Note to myself: don't write patches while watching a movie.
2011-10-16 19:23:43 +00:00
ed
191c732ed6 Don't cast SIZE_T_MAX to off_t.
I focused so much on the 32-bits case where we have to cast SIZE_T_MAX
up in size, that I forgot about the 64-bits case, where off_t and size_t
are equal in size. Simply cast both numbers to uintmax_t, as we can
assume st_size is never negative.

Reported by:	cperciva
2011-10-16 19:15:25 +00:00
ed
9a877f97e7 Build look(1) with WARNS=6. 2011-10-14 07:24:48 +00:00
joel
29af67e52c Remove the advertising clause from UCB copyrighted files in usr.bin. This
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
2010-12-11 08:32:16 +00:00
cperciva
ae925c45f5 Don't try to mmap the contents of empty files. This behaviour was harmless
prior to r195693, since historical behaviour of mmap(2) was to silently
ignore length-zero mmap requests; but mmap now returns EINVAL, which caused
look(1) to emit an error message and fail.

Among other things, this makes `freebsd-update fetch` on a newly installed
8.0-BETA3 system print bogus warning messages.

MFC after:	3 days
2009-08-26 03:30:06 +00:00
stefanf
ad319e77f4 Remove break after return. 2006-07-18 10:19:46 +00:00
tjr
9e984856c2 Add support for multibyte characters. While here, fix a longstanding bug in
the implementation of the -d option: we were skipping too many characters
when a non-alphanumeric character was encountered.
2004-07-19 11:12:02 +00:00
dwmalone
b4339b74ad ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by:	md5
2002-09-04 23:29:10 +00:00
obrien
bc61fc95d8 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
markm
d642bb3e8a Fix a const-char vs char issue. 2002-04-28 12:39:12 +00:00
imp
74d826c7a6 remove __P 2002-03-22 01:22:50 +00:00
dwmalone
ffd5084704 Warns cleanup - not ready for WARNS=2 yet. 2001-12-03 21:04:50 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
wosch
e8396430fb Support multiple databases. For example
$ look miau  dict1 dict2 dict3
1998-08-31 16:38:23 +00:00
jkh
ec064bd139 revert: The warning was supposed to irritate someone into fixing this. 1997-09-15 11:02:10 +00:00
jkh
75fe7a4d61 unsigned char -> caddr_t for mmap's return value. 1997-09-15 08:31:20 +00:00
charnier
d3106d444a Use err(3) instead of local redefinition. 1997-07-23 06:46:10 +00:00
imp
141381e1cb compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
peter
deba7db48c Merge from Lite2 1997-03-11 13:43:33 +00:00
alex
a3118e8c68 Sweep through the tree fixing mmap() usage:
- 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
1997-01-16 21:58:40 +00:00
ache
c7a58db719 Make it works with 8bit charsets
Add setlocale LC_CTYPE
1995-10-29 00:20:05 +00:00
rgrimes
a14d555c87 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
rgrimes
f9ab90d9d6 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00