Commit Graph

21 Commits

Author SHA1 Message Date
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
brooks
b069330b5d Fix build on architectures where off_t is signed by casting to uintmax_t
before comparing with a size_t.
2007-01-11 20:23:01 +00:00
brooks
fa97295521 Fix head -c ### where ### is greater than 2^31. Unlike the submitted
patch this uses off_t.

WARNSify and add $FreeBSD$ to Makefile.

PR:		bin/107824
Submitted by:	Brian Cornell <briancornell at earthlink dot net>
MFC after:	3 days
2007-01-11 17:03:51 +00:00
jmallett
558b722f1e Remove duplicate __FBSDID() - spotted by trying to build with a non-GNU
compiler.
2002-07-23 14:39:20 +00:00
obrien
bc61fc95d8 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
markm
deaa4a187b Fix VCS tags; ANSIfy functions 2002-04-28 13:50:54 +00:00
dwmalone
aafb6b12f8 1) Staticise.
2) Remove registers.
3) Change some ints to size_t which are used with fread/fwrite.
2002-03-30 17:17:26 +00:00
imp
74d826c7a6 remove __P 2002-03-22 01:22:50 +00:00
dwmalone
ffdbedf4c8 Make usage message and man page synopsis reflect the fact that -n
and -c are mutually exclusive.

PR:		34233
Submitted by:	Gary W. Swearingen <swear@blarg.net>
MFC after:	3 days
2002-01-24 22:27:50 +00:00
alfred
883f7cf969 In order to perform faster when doing "head -n", use a pair of
fgetln/fwrite instead of getc/putchar, this seems about five times
faster.
2001-11-02 09:27:16 +00:00
alfred
558e29c5a0 change a global into a local, misc style fixes 2001-11-02 09:21:11 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
des
077f96877a fread() returns 0 on eof or error, not EOF. This fixes the following
bug:

  "head -c <n>" never exit and loops forever (until it is killed),
  if the input stream has fewer bytes than specified (n).

PR:		bin/8225
Submitted-by:	FUJIMOTO Kensaku <fujimoto@oscar.elec.waseda.ac.jp>
1998-10-09 10:33:46 +00:00
charnier
4320b92868 Setting eval to 1 after calling warn was the original behaviour. 1997-07-11 06:13:18 +00:00
charnier
6ebe32537f Use err(3) instead of local redefinition. 1997-07-10 06:46:13 +00:00
alex
6bd5a8ae49 Support for -c, byte count. 1997-04-06 00:54:27 +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
wosch
fc85423c34 first check the count and then get
the next line of characters and not cause it to first get
the characters even if the count (cnt) has become 0.

Submitted by:	R Bezuidenhout <rbezuide@mikom.csir.co.za>
1996-02-26 22:46:36 +00:00
joerg
71bcd71cfd head(1) ignored EOFs (in certain cases).
Closes PR # bin/678: head(1) ignore EOF

Submitted by:	wosch@cs.tu-berlin.de (Wolfram Schneider)
1995-08-15 19:34:11 +00:00
rgrimes
f9ab90d9d6 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00