Commit Graph

21 Commits

Author SHA1 Message Date
Mike Barcroft
a4616748ab o Correctly define rcsid.
o Add consts where appropriate.
o Rename some variables that were shadowing global declarations.
o Remove register storage-classes.
o Make errmsg a const, so we can just set error messages instead
  of using sprintf/strcpy.
o Set WARNS=2

Reviewed by:	bde, des
2001-08-06 22:01:31 +00:00
Dima Dorfman
d164fef6d7 Back out previous commit: it doesn't help anything since write_file(),
which is also called from handle_hup(), uses stdio(3).  Furthermore,
this means that calling exit(3) (via quit()) there is required to
flush the buffer write_file() was working on.

Submitted by:	bde
2001-06-28 22:06:27 +00:00
Dima Dorfman
e0e97f0aab Don't call exit(3) from a signal handler.
Obtained from:	OpenBSD
2001-06-24 01:55:17 +00:00
Warner Losh
9842e24c34 Use PATH_MAX rather than MAXPATHLEN. Also fix a possible off by one
error caused by the -1 being on the wrong side of the comparison.
This would not cause an overflow, as near as I can tell, because we
truncate later anyway.  We'd just fail to get a diagnostic for 1024
and 1025 byte file names.
2001-05-29 18:03:14 +00:00
Kris Kennaway
4195af47fd Constify 2000-11-27 06:26:48 +00:00
Brian Somers
0d8188ce22 Include sys/types.h 2000-10-16 07:11:30 +00:00
Josef Karthauser
2ef72bc152 Fixes a potential buffer overflow with 'ed [MAXPATHLEN + 1 characters]'.
Submitted by:	Mike Heffner <spock@techfour.net>
Submitted on:	audit@freebsd.org
2000-04-30 20:46:14 +00:00
Peter Wemm
2a4562393f $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
Doug Rabson
d1ade4ad42 Silence some warnings when building on the alpha. 1998-08-07 09:39:11 +00:00
Eivind Eklund
ad0b1f1ac3 make signal handlers errno safe
Obtained from:	OpenBSD (file rev 1.11) - Theo de Raadt <deraadt@openbsd.org>
1997-10-08 14:47:56 +00:00
Steve Price
5967604a1e sccsid -> rcsid and fix some minor nits. 1997-08-07 21:33:47 +00:00
Warner Losh
93ef08af3e compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-28 15:24:41 +00:00
Peter Wemm
b97fa2ef50 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Steve Price
78b09ffeaf -Wall cleaning. 1996-12-14 06:08:03 +00:00
Andrey A. Chernov
de727e7d02 Localize it
8bit cleanup
1996-08-11 16:48:11 +00:00
Rodney W. Grimes
2162b2d226 Remove trailing whitespace.
Reviewed by:	phk
1995-05-30 00:07:29 +00:00
Joerg Wunsch
0fd510b71a You will find enclosed some changes to make gcc -Wall more happy in
/usr/src/bin. Note that some patches are still needed in that directory.

I (Joerg) finished most of Philippe's cleanup.  /bin/sh will still
need *allot* of work, however.

Submitted by:	charnier@lirmm.fr (Philippe Charnier)
1995-03-19 13:29:28 +00:00
David Greenman
89730b290a Added $Id$ 1994-09-24 02:59:15 +00:00
Andrew Moore
d165d4acee use umask 077 for buffer file 1994-03-23 04:36:59 +00:00
Andrew Moore
95e6217e73 Fixed range address bug: 1,2, == 2,2 not 2,.
Overhauled the name space,  reworked some modules and removed the
obsolescent Addison-Wesley copyright.
1994-02-01 00:36:28 +00:00