History log of /freebsd-10-stable/usr.bin/fold/fold.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 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

# 227165 06-Nov-2011 ed

Add missing static keywords to fold(1)


# 216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# 214893 06-Nov-2010 dumbbell

Fix a segmentation fault in argument processing.

The crash was caused by a command line such as this one:
# foldl -b1

PR: bin/151592
Reported by: Marcus Reid <marcus@blazingdot.com>
Tested by: Marcus Reid <marcus@blazingdot.com>
MFC after: 3 days


# 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


# 131056 24-Jun-2004 tjr

Add support for multibyte characters and characters that take up more
than one column position.


# 102944 04-Sep-2002 dwmalone

ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by: md5


# 98342 17-Jun-2002 tjr

Only advance the column position for printable characters, update manual
page to emphasise that we count column positions, not characters.


# 97266 25-May-2002 tjr

If a file cannot be processed, try to process any remaining files
then exit non-zero.


# 95033 19-Apr-2002 ache

Localize it, LC_CTYPE


# 94978 18-Apr-2002 tjr

Add the -b option (break at byte position, not column number) and the -s
option (try to break at word bounaries) for SUSv3 conformance.

Partially based on the NetBSD version, with the following changes:
- style(9)
- break on <blank>s, not spaces, per POSIX (and GNU)
- when looking for last space on line, search backwards instead of
forwards; less comparisons needed this way.
- use LINE_MAX macro instead of a magic number and a comment saying it is
LINE_MAX.

PR: 36245
Reviewed by: mike
Obtained from: NetBSD (partially)


# 92920 21-Mar-2002 imp

remove __P


# 87751 12-Dec-2001 charnier

Make clear that -w gets an argument. Add __FBSDID and remove unused
#include


# 65427 04-Sep-2000 imp

optarg and optind are declared in unistd.h.
h_error is declared in netdb.h


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 27270 08-Jul-1997 charnier

Add usage(), use err(3).


# 24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 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