Commit Graph

159 Commits

Author SHA1 Message Date
Ken Smith
0c0146f019 Don't include encryption features of ed(1) when building for the
"rescue media" bundled with releases.

Suggested by:	ru
Approved by:	re (hrs)
2007-07-02 14:00:25 +00:00
Warner Losh
bfe1239a78 while(0); -> while (0) in multiline macro 2006-08-17 23:00:33 +00:00
Ruslan Ermilov
e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Ruslan Ermilov
a89237ae95 Sync program's usage() with manpage's SYNOPSIS. 2005-02-09 17:37:39 +00:00
Ruslan Ermilov
6fca4c7c3f Add the new standard EXIT STATUS section where appropriate.
Sort standard sections in the (documented) preferred order.
2005-01-16 16:41:59 +00:00
Philippe Charnier
34af7a1a38 no need to have break; after return; 2005-01-16 11:10:21 +00:00
Warner Losh
9ddb49cbe4 /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
Ruslan Ermilov
a216173556 NOCRYPT -> NO_CRYPT 2004-12-21 10:16:04 +00:00
Colin Percival
d37df47d31 Join the 21st century: Cryptography is no longer an optional component
of releases.  The -DNOCRYPT build option still exists for anyone who
really wants to build non-cryptographic binaries, but the "crypto"
release distribution is now part of "base", and anyone installing from a
release will get cryptographic binaries.

Approved by:	re (scottl), markm
Discussed on:	freebsd-current, in late April 2004
2004-08-06 07:27:08 +00:00
Tim J. Robbins
128dc4a2e3 Document missing multibyte character handling in utilities specified
by POSIX.
2004-07-03 02:03:44 +00:00
Mark Murray
6195fb4102 Remove clause 3 from the UCB licenses.
OK'ed by:	imp, core
2004-04-06 20:06:54 +00:00
Mark Murray
ebb9f0efa8 Don't check for the existance of src/crypto/ for building items that
may contain crypto. The days of ITAR paranoia are over, and the simple
macro tests that remain are sufficient.
2003-07-24 18:30:25 +00:00
Ruslan Ermilov
8fe29a4f17 This code isn't WARNS=6 clean in the standard (crypto) case
due to bugs in OpenSSL headers.  I was testing in the wrong
environmement: standalone build without crypto/ sources.
2003-07-20 12:26:24 +00:00
Ruslan Ermilov
ff572a5e73 Make this code WARNS=6 clean again (after GCC 3.1.1 import).
Submitted by:	Marius Strobl <marius@alchemy.franken.de>
2003-07-20 10:24:09 +00:00
Ruslan Ermilov
ce17762f4a Unbreak NOCRYPT buildworld.
Reviewed by:	markm
2003-06-29 10:03:35 +00:00
Mark Murray
eac4bdcca4 Get this area compiling with the highest WARNS= that it works with.
Obsolete WFORMAT= junk also removed where possible.

OK'ed by:	obrien
Tested on:	sparc64, alpha, i386
2003-06-13 07:04:02 +00:00
Mark Murray
8027fe397a Fix for the NO_OPENSSL case.
Reported by:	Marius Strobl <marius@alchemy.franken.de>
2003-06-08 08:24:07 +00:00
John Hay
ae75fcbdb0 Make ed compile in the NOCRYPT case.
Reviewed by:	markm
2003-06-03 17:03:48 +00:00
Mark Murray
eb338d3666 Modernise. Use libcrypto for DES instead of libcipher. 2003-06-02 19:06:28 +00:00
Dag-Erling Smørgrav
7691f66abf Retire the useless NOSECURE knob.
Approved by:	re (scottl)
2003-05-19 15:52:01 +00:00
Giorgos Keramidas
b093b41206 Fix a broken reference to locale(5) and point to re_format(7) too for an
explanation of `collating elements'.
2003-05-03 20:26:11 +00:00
David E. O'Brien
09a80d4867 Quiet warnings about copyright[]. 2003-05-01 16:58:57 +00:00
Jens Schweikhardt
9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Philippe Charnier
0d9f1a69d8 Replace various spellings with FALLTHROUGH which is lint()able 2002-08-25 13:01:47 +00:00
Mark Murray
13fcef50d0 Fix some easy WARNS. 2002-07-31 16:52:16 +00:00
Ruslan Ermilov
73ca71fef9 mdoc(7) police: a bit of tidying. 2002-07-04 13:22:22 +00:00
David E. O'Brien
5eb43ac2f7 Consistently use __FBSDID 2002-06-30 05:13:54 +00:00
Giorgos Keramidas
09152a86ff Add a description of the restrictions that red(1) imposes to users,
and a warning that this "restricted mode" can be bypassed easily by
using symlinks, so that users don't depend too much on it.

PR:		docs/35940
Submitted by:	Gary W. Swearingen <swear@blarg.net>
Reviewed by:	jmallett
MFC after:	1 week
2002-06-24 22:06:47 +00:00
Juli Mallett
49d54362f1 Bogusness may have happened using a variable assignment here before, but
proper parens mean that fd is always set by open(2) [in any part of C],
and so we can accurately check for it returning -1, without feeling like
we need to initialise fd to -1 in its declaration.

In other words, fix a stylistic/bogus nit.
2002-06-20 07:15:55 +00:00
Juli Mallett
0e6c085ae6 We have a place for extern declarations of global variables in ed.h, do not
use main() to do it locally.
2002-06-20 05:28:02 +00:00
Philippe Charnier
e004acc891 Use `The .Nm utility' 2002-04-16 20:08:06 +00:00
Warner Losh
7669d0fc4f o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
  they already are.
o gc some #ifdef sun ... #endif code

Approved by: arch@, new style(9)
2002-02-02 06:36:49 +00:00
Ruslan Ermilov
aa70e98b87 -lcipher is an installable library. 2001-12-06 10:50:23 +00:00
David E. O'Brien
a748290789 Default to WARNS=2. Binary builds that cannot handle this must explicitly
set WARNS=0.

Reviewed by:	mike
2001-12-04 01:57:47 +00:00
Andrey A. Chernov
7cbfe4d8da File positions are off_t nowdays, not long, so:
fseek -> fseeko
  ftell -> ftello

  NOTE: that fseek/ftell not works for >long offsets per POSIX:

  [EOVERFLOW] For fseek( ), the resulting file offset would be a value which
  cannot be represented correctly in an object of type long.

  [EOVERFLOW] For ftell ( ), the current file offset cannot be represented
  correctly in an object of type long.
2001-09-01 23:26:40 +00:00
Ruslan Ermilov
94ba280c59 mdoc(7) police: join split punctuation to macro calls. 2001-08-10 17:35:21 +00:00
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
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +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
Dima Dorfman
9076772fce Correct a spelling nit (a -> an). 2001-06-04 23:33:02 +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
Ben Smithurst
e8145c5440 Remove a comment which seemed to confuse makewhatis:
ben@freefall:~$ whatis ed
ed(1), -(1) - ed, red text editor

PR:		25164
Submitted by:	Rich Morin <rdm@cfcl.com>
2001-03-29 01:25:06 +00:00
Kris Kennaway
27540537e8 Switch from using rand() or random() to a stronger, more appropriate PRNG
(random() or arc4random())

Reviewed by:	bde
2001-03-05 02:15:38 +00:00
Ruslan Ermilov
c2d03ea879 Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Ruslan Ermilov
1586940ea5 Prepare for mdoc(7)NG. 2000-12-18 14:48:17 +00:00
Ruslan Ermilov
12e720d78b Prepare for mdoc(7)NG. 2000-12-15 17:37:31 +00:00
Kris Kennaway
4195af47fd Constify 2000-11-27 06:26:48 +00:00
Ruslan Ermilov
be8b149795 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 11:39:41 +00:00
Ruslan Ermilov
1bdbdb4564 Properly declare the multiple-columns list. 2000-11-06 11:18:13 +00:00
Ruslan Ermilov
2b0a73ba23 Finish conversion from man(7) to mdoc(7). 2000-11-06 09:14:22 +00:00
Brian Somers
0d8188ce22 Include sys/types.h 2000-10-16 07:11:30 +00:00
Sheldon Hearn
ed9b87e322 Locale support was added by ache long ago. 2000-07-17 10:40:48 +00:00
Sheldon Hearn
0f5fcaa3f1 Supply only one author name per instance of %A, as per mdoc.samples(7).
PR:		18465
Submitted by:	Kazu TAKAMUNE <takamune@avrl.mei.co.jp>
2000-05-10 09:49:04 +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
Sheldon Hearn
bef84d6bc0 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 10:43:09 +00:00
Mark Murray
e1a456f0e4 Change DISTRIBUTION name to match reality. 2000-02-29 11:39:24 +00:00
Alexey Zelkin
daa40efd8c Add `.Nm red' to NAME section. 2000-01-10 12:20:30 +00:00
Peter Wemm
2a4562393f $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
Kris Kennaway
46be34b902 Various spelling/formatting changes.
Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
1999-05-08 10:22:15 +00:00
Doug Rabson
d1ade4ad42 Silence some warnings when building on the alpha. 1998-08-07 09:39:11 +00:00
Joseph Koshy
056103b6d3 Fix use of -man macro, correct description of the behaviour of the `+n'
command to match whats there in the source.

PR: 7328
1998-07-21 04:53:18 +00:00
Philippe Charnier
00c2adfe12 Convert to mdoc. 1998-05-13 07:41:13 +00:00
Bruce Evans
8199f5c431 Fixed existence test for secure sources (don't test for secure objects).
Fixed some formatting.
1998-03-06 16:05:18 +00:00
Wolfgang Helbig
fd0e1c252b Ensure stdout is line buffered.
Change "pat" -> "re" in man page.
1997-12-31 12:25:35 +00:00
Eivind Eklund
007d33500e Remove simultaneous include of <sys/param.h> and <sys/types.h>.
Reorder includes to be alphabetical some places since I already was in
here.
1997-12-10 22:18:54 +00:00
Eivind Eklund
f8ce2ec95f Un-clobber mktemp->mkstemp patch. 1997-10-09 11:05:16 +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
Eivind Eklund
af6ab81d43 mktemp -> mkstemp
Obtained from: OpenBSD (file rev 1.4 by Theo de Raadt <deraadt@openbsd.org>)
1997-10-08 13:46:39 +00:00
John-Mark Gurney
e3d79adaba fix misspelling
Submitted-by: Josh Gilliam

Closes PR:4427
1997-08-30 11:09:26 +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
Warner Losh
e38b50134c Use mkstemp rather than mktemp to prevent races.
Obtained from: OpenBSD
1997-03-24 05:45:29 +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
Wolfram Schneider
e83201b43a delete doubled words, e.g.: "the the" -> "the" 1996-10-05 22:27:30 +00:00
Wolfram Schneider
148531ef1e add forgotten $Id$ 1996-09-22 21:56:57 +00:00
Wolfram Schneider
b8923d4cc0 [HISTORY] command appeared in Version 1 AT&T UNIX
Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41
1996-08-29 18:06:19 +00:00
Andrey A. Chernov
de727e7d02 Localize it
8bit cleanup
1996-08-11 16:48:11 +00:00
Jordan K. Hubbard
cd9a2f5c28 Bring in my changes for removing the pestilent obj links (unless you
really want them) from /usr/src.  This is the final version of the
patches, incorporating the feedback I've received from -current.
1996-06-24 04:26:21 +00:00
Thomas Gellekum
de64b714f8 Output line count to stdout. Complies to POSIX.2.
Reviewed by:	joerg
1996-05-23 06:36:34 +00:00
Peter Wemm
6065a0be11 This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.
1995-12-30 19:02:48 +00:00
Andrey A. Chernov
afceae0c47 Wrong library was picked by ed 1995-10-22 20:14:13 +00:00
Mark Murray
2f67cae6ef Correctly build the secure ed(1) only if secure/ exists.
Pointed out by:	bde
1995-10-03 15:44:50 +00:00
Mark Murray
6eb5c24ff8 Use the same make technique as passwd and xntpd for the secure ed(1). This
will allow the secure/bin/ed directory to be cleaned out and the bin/Makefile
to be cleaned up.
1995-10-01 14:17:29 +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
Andrew Moore
c723083073 fixed `s' to set dot to last line affected, not the last line in
a substitution range.
1995-01-14 11:47:16 +00:00
Jordan K. Hubbard
ffdd6a7267 src/bin/ed will never build DES encumbered ed again. That is the job
for secure/bin/ed ...
1994-12-18 15:15:10 +00:00
David Greenman
efaf4c8649 Nuked #ifdef __386BSD__ since this is not appropriate and no longer defined
in our 2.6.1 gcc port.
1994-11-03 21:46:55 +00:00
Poul-Henning Kamp
e615020eae Don't check existence of -lcrypt to decide if DES is employed,
instead check that "NOCRYPT" isn't defined.
1994-10-29 10:13:34 +00:00
David Greenman
89730b290a Added $Id$ 1994-09-24 02:59:15 +00:00
Poul-Henning Kamp
2787321c9f Submitted by: phk
Got rid of a couple of binary files by uuencoding.  49 more to go.
BTW: ed(1) seems to have an exit(2) problem, 5 tests fail.
1994-07-23 18:14:06 +00:00
Jordan K. Hubbard
60fd953f54 Fix gross spelling and typographical errors pointed out by Keith Bostic. 1994-04-24 01:06:32 +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
Andrew Moore
d20b621b11 Renamed some files that were giving SUP trouble. 1993-08-27 22:15:16 +00:00
Andrew Moore
0bca9fd9dc Only a single slash (/) is now necessary to repeat a search as per Theo's
request.  So the command:
/pattern/;/
finds the second line containing "pattern" after the current line.
Caveat: The commands `st' and `sr'  are now both legal and have very
different meanings.  This is because ed(1) extends POSIX to include the
old Berkeley syntax s[rgp]*.
(So should two slashes still be required in the case of the substitute
command, as SunOS ed does?)
1993-08-27 22:14:24 +00:00