History log of /freebsd-10.0-release/usr.bin/fmt/fmt.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 200462 13-Dec-2009 delphij

Revert most part of 200420 as requested, as more review and polish is
needed.


# 200420 11-Dec-2009 delphij

Remove unneeded header includes from usr.bin/ except contributed code.

Tested with: make universe


# 172721 17-Oct-2007 jmallett

Prevent strange crashes in fmt with absurd goal lengths introduced by the
support for wide characters.

If the sizeof (wchar_t) times max_length would yield a value beyond
representation in a size_t, exit with a usage error up front, rather than
strange errors down the line from trying to malloc (well, realloc) with a size
of 0.

This is perhaps not the optimal behaviour - a clamp may be more appropriate as
we clamp the value of max_length now anyway, but this is at least better than
segfaulting or worse. On systems which are friendly to malloc with a value of 0
the results could end up being strange corruption of the output.


# 133008 02-Aug-2004 tjr

Add support for multibyte characters.


# 132200 15-Jul-2004 tjr

Avoid passing negative values to isspace() on systems with signed chars.


# 132178 15-Jul-2004 tjr

Use warn() instead of perror().


# 99112 30-Jun-2002 obrien

Consistently use FBSDID


# 95258 22-Apr-2002 des

Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.


# 89268 11-Jan-2002 ru

Don't format lines that look like troff requests, for
compatibility with old fmt(1). New option -n permits
formatting of lines beginning with a dot character.

PR: bin/31392
MFC after: 3 days


# 81701 15-Aug-2001 ru

The old fmt(1) always did what the new ``-l 8'' option does.
POLA: Changed the default to ``-l 8'' while still providing
a way to disable this feature with ``-l 0''.

PR: bin/29247
Reviewed by: iedowse


# 81510 10-Aug-2001 kris

Don't call errx() with a variable format string

MFC after: 1 week


# 78334 16-Jun-2001 jlemon

Cast size_t -> int to satisfy printf %* constraints on the alpha.


# 77807 06-Jun-2001 ru

fmt(1) rewrite by Gareth McCaughan.

PR: bin/5901, bin/12242, bin/19071
Submitted by: Gareth McCaughan <gjm11@dpmms.cam.ac.uk>
Obtained from: OpenBSD + ctype(3), WARNS=2, and manpage cleanup
MFC after: 2 weeks


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 30009 30-Sep-1997 joerg

Fix a number of fixed-size buffers etc.

PR: bin/4520
Submitted by: gjm11@dpmms.cam.ac.uk (Gareth McCaughan)


# 28478 21-Aug-1997 jlemon

Pre-allocate buffer to avoid core dump in corner cases.
PR: 2968
Submitted by: Gareth McCaughan <gjm11@dpmms.cam.ac.uk>


# 27185 03-Jul-1997 charnier

Add rcsid, prototypes. Use err(3).


# 25103 23-Apr-1997 bde

Removed inconsistent declaration of malloc(). `make world' with DESTDIR
set to something other than "/" now actually works.


# 18227 10-Sep-1996 phk

Add -c flag to fmt to center lines.


# 15344 22-Apr-1996 smpatel

Fix a segfault which occurs when it gets an empty input line.
Closes PR bin/1153

Reviewed by: smpatel
Submitted by: Matthew C. Mead (mmead@Glock.COM)


# 12317 15-Nov-1995 joerg

Dynamically allocate line buffers, instead of assuming that all the
world would fit into BUFSIZ.


# 11765 24-Oct-1995 ache

Add setlocale LC_CTYPE


# 8874 30-May-1995 rgrimes

Remove trailing whitespace.


# 8461 11-May-1995 ache

Make fmt ctype-aware
Fix non-critical bug with getting EOF double times
Not call strlen for zero length test


# 1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.


# 1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources