History log of /freebsd-current/bin/ed/buf.c
Revision Date Author Comments
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# f50fae31 14-Dec-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

ed(1): drop redundant parenthesis.

These were Left-over from the cleanup in r309936.


# 8bd856de 12-Dec-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

ed(1): Simplify some checks.

The return type for both fread(3) and fwrite(3) cannot be negative, this
renders some checks invalid and variable 'ct' unnecessary.
Also bump 'len' to size_t to avoid signed/unsigned comparison warnings.


# bf70bece 19-Oct-2012 Ed Schouten <ed@FreeBSD.org>

More -Wmissing-variable-declarations fixes.

In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.


# ae824d80 18-Oct-2012 Ed Schouten <ed@FreeBSD.org>

Fix warnings found by -Wmising-variable-declarations.

This self-written compiler warning, which is hopefully going to be
committed into LLVM sources soon, warns about potentially missing
`static' keywords, similar to -Wmissing-prototypes.

- bin/pax: Move external declaration of chdname and s_mask into extern.h.
- bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h.
- sbin/mount_fusefs: Remove char *progname; use getprogname().
- others: add `static' where possible.


# ae568477 27-Aug-2011 Christian Brueffer <brueffer@FreeBSD.org>

Fix memory leaks in error cases.

PR: 159011
Submitted by: Henning Petersen <henning.petersen@t-online.de>
Approved by: re (kib)
MFC after: 1 week


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 5eb43ac2 29-Jun-2002 David E. O'Brien <obrien@FreeBSD.org>

Consistently use __FBSDID


# 49d54362 20-Jun-2002 Juli Mallett <jmallett@FreeBSD.org>

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.


# 7669d0fc 01-Feb-2002 Warner Losh <imp@FreeBSD.org>

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)


# 7cbfe4d8 01-Sep-2001 Andrey A. Chernov <ache@FreeBSD.org>

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.


# a4616748 06-Aug-2001 Mike Barcroft <mike@FreeBSD.org>

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


# 2a456239 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 46be34b9 08-May-1999 Kris Kennaway <kris@FreeBSD.org>

Various spelling/formatting changes.

Submitted by: Philippe Charnier <charnier@xp11.frmug.org>


# fd0e1c25 30-Dec-1997 Wolfgang Helbig <helbig@FreeBSD.org>

Ensure stdout is line buffered.
Change "pat" -> "re" in man page.


# f8ce2ec9 09-Oct-1997 Eivind Eklund <eivind@FreeBSD.org>

Un-clobber mktemp->mkstemp patch.


# af6ab81d 08-Oct-1997 Eivind Eklund <eivind@FreeBSD.org>

mktemp -> mkstemp

Obtained from: OpenBSD (file rev 1.4 by Theo de Raadt <deraadt@openbsd.org>)


# 5967604a 07-Aug-1997 Steve Price <steve@FreeBSD.org>

sccsid -> rcsid and fix some minor nits.


# e38b5013 23-Mar-1997 Warner Losh <imp@FreeBSD.org>

Use mkstemp rather than mktemp to prevent races.

Obtained from: OpenBSD


# b97fa2ef 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

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.


# 78b09ffe 13-Dec-1996 Steve Price <steve@FreeBSD.org>

-Wall cleaning.


# 2162b2d2 29-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.

Reviewed by: phk


# 89730b29 23-Sep-1994 David Greenman <dg@FreeBSD.org>

Added $Id$


# d165d4ac 22-Mar-1994 Andrew Moore <alm@FreeBSD.org>

use umask 077 for buffer file


# 95e6217e 31-Jan-1994 Andrew Moore <alm@FreeBSD.org>

Fixed range address bug: 1,2, == 2,2 not 2,.
Overhauled the name space, reworked some modules and removed the
obsolescent Addison-Wesley copyright.


# 95c745af 02-Jul-1993 Andrew Moore <alm@FreeBSD.org>

Consolidate mark code - no functional changes or fixes.


# 10ca1c6c 26-Jun-1993 Andrew Moore <alm@FreeBSD.org>

fixed undo within a global command (would corrupt the buffer)
changed move within a global to behave as in SunOS
added a couple error messages


# 30154ac8 18-Jun-1993 Andrew Moore <alm@FreeBSD.org>

POSIX ed version 0.6 by Andrew Moore (alm@netcom.com).