Commit Graph

10 Commits

Author SHA1 Message Date
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