History log of /freebsd-10-stable/usr.bin/head/head.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 216370 11-Dec-2010 joel

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


# 165955 11-Jan-2007 brooks

Fix build on architectures where off_t is signed by casting to uintmax_t
before comparing with a size_t.


# 165940 11-Jan-2007 brooks

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


# 100575 23-Jul-2002 jmallett

Remove duplicate __FBSDID() - spotted by trying to build with a non-GNU
compiler.


# 99112 30-Jun-2002 obrien

Consistently use FBSDID


# 95652 28-Apr-2002 markm

Fix VCS tags; ANSIfy functions


# 93441 30-Mar-2002 dwmalone

1) Staticise.
2) Remove registers.
3) Change some ints to size_t which are used with fread/fwrite.


# 92920 21-Mar-2002 imp

remove __P


# 89767 24-Jan-2002 dwmalone

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


# 85861 02-Nov-2001 alfred

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.


# 85859 02-Nov-2001 alfred

change a global into a local, misc style fixes


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 40114 09-Oct-1998 des

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>


# 27328 11-Jul-1997 charnier

Setting eval to 1 after calling warn was the original behaviour.


# 27314 10-Jul-1997 charnier

Use err(3) instead of local redefinition.


# 24665 05-Apr-1997 alex

Support for -c, byte count.


# 24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 23693 11-Mar-1997 peter

Merge from Lite2


# 14269 26-Feb-1996 wosch

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>


# 10064 15-Aug-1995 joerg

head(1) ignored EOFs (in certain cases).

Closes PR # bin/678: head(1) ignore EOF

Submitted by: wosch@cs.tu-berlin.de (Wolfram Schneider)


# 1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.


# 1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources