1N/A/*********************************************************************** 1N/A* This software is part of the ast package * 1N/A* Copyright (c) 1992-2011 AT&T Intellectual Property * 1N/A* and is licensed under the * 1N/A* Common Public License, Version 1.0 * 1N/A* by AT&T Intellectual Property * 1N/A* A copy of the License is available at * 1N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 1N/A* Information and Software Systems Research * 1N/A* Glenn Fowler <gsf@research.att.com> * 1N/A* David Korn <dgk@research.att.com> * 1N/A***********************************************************************/ 1N/A"[-?\n@(#)$Id: fmt (AT&T Research) 2007-01-02 $\n]" 1N/A"[+NAME?fmt - simple text formatter]" 1N/A"[+DESCRIPTION?\bfmt\b reads the input files and left justifies space " 1N/A "separated words into lines \awidth\a characters or less in length and " 1N/A "writes the lines to the standard output. The standard input is read if " 1N/A "\b-\b or no files are specified. Blank lines and interword spacing are " 1N/A "preserved in the output. Indentation is preserved, and lines with " 1N/A "identical indentation are joined and justified.]" 1N/A"[+?\bfmt\b is meant to format mail messages prior to sending, but may " 1N/A "also be useful for other simple tasks. For example, in \bvi\b(1) the " 1N/A "command \b:!}fmt\b will justify the lines in the current paragraph.]" 1N/A"[c:crown-margin?Preserve the indentation of the first two lines within " 1N/A "a paragraph, and align the left margin of each subsequent line with " 1N/A "that of the second line.]" 1N/A"[o:optget?Format concatenated \boptget\b(3) usage strings.]" 1N/A"[s:split-only?Split lines only; do not join short lines to form longer " 1N/A"[u:uniform-spacing?One space between words, two after sentences.]" 1N/A"[w:width?Set the output line width to \acolumns\a.]#[columns:=72]" 1N/A"[+SEE ALSO?\bmailx\b(1), \bnroff\b(1), \btroff\b(1), \bvi\b(1), " 1N/A * preserve blank lines 1N/A * two spaces at ends of sentences 1N/A else if (*
ep !=
' ' && *
ep !=
'\t')
1N/A if (*
cp ==
']' || *
cp ==
'@' && *(
cp +
1) ==
'(')
1N/A if (*
cp ==
'\\' && *(
cp +
1) ==
'n')
1N/A else if (*
cp ==
' ' || *
cp ==
'\t')
1N/A if (x && c !=
'\n' &&
dp !=
buf && *(
dp -
1) !=
' ')
1N/A else if (c ==
']' && (
cp >=
lp || *
cp !=
':' && *
cp !=
'#' && *
cp !=
'!'))
1N/A else if (c ==
' ' || c ==
'\t')
1N/A else if (c ==
'?' && (
cp >=
lp || *
cp !=
'?'))
1N/A else if (c ==
' ' || c ==
'\t')
1N/A for (c =
' '; *
cp ==
' ' || *
cp ==
'\t';
cp++);