Commit Graph

18 Commits

Author SHA1 Message Date
Juli Mallett
58a8e6d20e Remove duplicate __FBSDID() - spotted by trying to build with a non-GNU
compiler.
2002-07-23 14:39:20 +00:00
David E. O'Brien
e026a48c34 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
Mark Murray
1abf87a869 Fix VCS tags; ANSIfy functions 2002-04-28 13:50:54 +00:00
David Malone
4001504df5 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
Warner Losh
f1bb2cd2aa remove __P 2002-03-22 01:22:50 +00:00
David Malone
ecca80bd97 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 Perlstein
c7a2aa5dfc 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 Perlstein
c16b5e4f8a change a global into a local, misc style fixes 2001-11-02 09:21:11 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Dag-Erling Smørgrav
710668cad4 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
Philippe Charnier
73f3d05336 Setting eval to 1 after calling warn was the original behaviour. 1997-07-11 06:13:18 +00:00
Philippe Charnier
c851008590 Use err(3) instead of local redefinition. 1997-07-10 06:46:13 +00:00
Alexander Langer
ef0e2ea4c7 Support for -c, byte count. 1997-04-06 00:54:27 +00:00
Warner Losh
1c8af87873 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 Wemm
df3f5d9dd5 Merge from Lite2 1997-03-11 13:43:33 +00:00
Wolfram Schneider
298f429180 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 Wunsch
8e502f1158 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
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00