Category : Word Processors
Archive   : CAWF.ZIP
Filename : CAWF.1

Output of file : CAWF.1 contained in archive : CAWF.ZIP
.\" manual page for cawf(1)
.\" Copyright (c) 1991 Purdue University Research Foundation,
.\" West Lafayette, Indiana 47907. All rights reserved.
.\" Written by Victor A. Abell , Purdue
.\" University Computing Center. Not derived from licensed software;
.\" derived from awf(1) by Henry Spencer of the University of Toronto.
.\" Permission is granted to anyone to use this software for any
.\" purpose on any computer system, and to alter it and redistribute
.\" it freely, subject to the following restrictions:
.\" 1. The author is not responsible for any consequences of use of
.\" this software, even if they arise from flaws in it.
.\" 2. The origin of this software must not be misrepresented, either
.\" by explicit claim or by omission. Credits must appear in the
.\" documentation.
.\" 3. Altered versions must be plainly marked as such, and must not
.\" be misrepresented as being the original software. Credits must
.\" appear in the documentation.
.\" 4. This notice may not be removed or altered.
.\" Some of the stuff in this file is a bit contorted, because it's also
.\" the regression-test input.
.nr ES 5n
.de ES
.in +\\n(ESu
.de EE
.in -\\n(ESu
.de PT
.ie \\n(.$>1 .TP "\\$2"
.el .TP
.ie !'\\$1'' \\$1
.el \(bu
.ds Nr \fInroff\fR
.TH CAWF 1 "February, 1991"
.BY "Purdue University"
cawf \- C version of the nroff-like, Amazingly Workable (text) Formatter
.B cawf
.BI \-f b|e|i
] [
.BI \-m acros
] [ file ... ]
.if t .tm OOPS -- AWF THINKS IT'S TROFF!!!
.I Cawf
formats the text from the input \fIfile\fR(s)
(standard input if none)
in an approximation of \*(Nr.
It comes closest to duplicating \*(Nr's
.B man
.B ms
macro package styles.
Options must precede file names.
.B \-fb
specifies that backspace and underline sequences are to be used to
emulate bold and italic characters.
This is

.IR cawf 's
default mode.
.B \-fe
specifies that ESC, followed by `B' is to be used to precede each bold
character; and ESC, followed by `I', each italic character.
This option is normally used with a post\-filter that converts the ESC
sequences into device\-specific controls \- e. g.,
.IR fontfilt (1).
.B \-fn
specifies that no special character sequences are to be used to represent
bold or italic characters.
.BI \-m acro
specifies the macro file to be used.
The standard
.I cawf
distribution supplies macro files to support `\-man' or `\-ms'.
.I Cawf
finds a macro file by constructing its name from `m',
.B acro
.B .mac
\- e. g.,
.B \-man
is converted to
.BR man.mac .
The default directory for macro files is defined when
.I cawf
is compiled; it's
.I c:\\sys\\lib\\cawf
in the
.I cawf
MS\-DOS distribution.
file ...
are the names of files containing \*(Nr source text.
.I Cawf
accepts the following raw \*(Nr requests:
.\e" .ad .bp .br .ce .de .di .ds
.el .fi .ft .i0 .ie .if .in .it
.lg .li .ll .ls .na .ne .nf .nr
.ns .pl .po .ps .rm .rr .rs .so
.sp .ta .ti .tm .tr
and the following in-text codes:
\e$ \e% \e* \ec \ef \eh \ek \en \es \ew
plus the full list of \*(Nr/\c
.I troff
special characters in
the original V7 \fItroff\fR manual.
Many restrictions are present; the behavior in general is a subset of
\*(Nr's. Of particular note are the following:
.IP \(bu 2
Point sizes do not exist;
.B .ps
is ignored.
Special vertical spacing \- the
.B .vs
command included \- is ignored.
Conditionals cover only numeric comparisons on
.BR \en(.$ ,
string com\%par\%isons between a macro parameter and a literal,
.B n
(always true)
.BR t
(always false).
The handling of strings is generally primitive.
.IP \(bu
Horizontal motion via
.B \eh
must be supplied with a number register interpolation and must be
positive - e. g.,
.BR \ew\en(NN ,
where the value in NN is >= 0.
.IP \(bu
.B \ek
function is reliable only after TAB characters, so it is useful only
for measuring table positions.
.IP \(bu
.B .di
command only turns output on and off \- any macro name is ignored.
.IP \(bu
Expressions - e. g.,
.B .sp
- are reasonably general, but the
.BR | ,
.BR & ,
.BR :\&
operators do not exist, there must be white space between the end of the \*(Nr
command and the beginning of the expression, and
.B \ew
requires that quote (') be used as the delimiters.
.B \ew
counts the characters inside the quotes and scales the result in ens,
so that, for example, \ew'\e(bu' equals 4n, and \ew'\e(bu'/1n equals 4.
The only acceptable count for the
.B .it
command is one,
and it is effective only with
.B man
.B ms
The default scaling factor is `v' for the
.BR .ne ,
.BR .sp ,
.B .pl
raw \*(Nr requests; it is `u' for
.BR .nr ;
and `n' for
.BR .in ,
.BR .ll ,
.BR .ls ,
.BR .po ,
.BR .ta
.BR .ti .
(A different scaling factor may be specified with a trailing character.)
Some obsolete or meaningless commands \-
.BR .i0 ,
.B .lg
.B .li
\&\- are silently ignored.
White space at the beginning of lines,
and embedded white space within lines is dealt with properly.
Sentence terminators at ends of lines are understood to imply
extra space afterward in filled lines.
Tabs are im\%plemented crudely and not exactly, although
usually they work as expected.
Hyphenation is done only at explicit hyphens, em-dashes, and \*(Nr
discretionary hyphens.
Bolding and italicization are done with backspacing and overprinting.
.B man
macro set replicates the full V7 manual macros,
plus a few semi-random oddballs.
The full list is:
\&.AT .B .BI .BR .BY .DE .DS .DT .HP .I
\&.IB .IP .IR .IX .LP .NB .P .PD .PP .RB
\&.RE .RI .RS .SH .SM .TH .TP .UC
.B .BY
.B .NB
each take a single string argument (respectively, an indi\%cation of
authorship and a note about the status of the manual page) and arrange
to place it in the page footer.
.B .AT
.B .IX
do nothing.
.B ms
macro set is a substantial subset of the V7 manuscript macros.
The macros are:
\&.AB .AE .AI .AU .B .CD .DA .DE .DS .I
\&.ID .IP .LD .LG .LP .ND .NH .NL .PP .QE
\&.QP .QS .R .RE .RP .RS .SH .SM .TL .TP
\&.UL .UX
Size changes are recognized but ignored, as are
.B .RP
.BR .ND .
.B .UL
just prints its argument in italics.
.BR .DS / .DE
does not do a keep,
nor do any of the other macros that normally imply keeps.
string variable is available.
.BR PD ,
.BR PI ,
number registers exist and can be changed.
.I Cawf
allows the placement of text into the five line header and
footer sections from the
.BR LH ,
.BR CH ,
.BR RF ,
.BR LF ,
.BR CF ,
string variables, via the control of the
.B .^b
.ta \w'.^b HF 0'u+3n
\&.^b fh 1 enables header string placement on the first page
\&.^b fh 0 disables header string placement on the first page
\&.^b HF 1 enables header/footer string placement
\&.^b HF 0 disables header/footer string placement
There are appropriate
.B .^b
commands in the distribution
.B man
.B ms
macro files.
.B ms
macro file uses another
.B .^b
command, \fB.^b NH\fP, to enable numbered header processing.)
The default output format supported by
.IR cawf ,
in its distributed form,
is that appropriate to a dumb terminal,
using overprinting for italics (via underlining) and bold.
The \*(Nr special characters are printed as some vague approximation
(it's sometimes extremely vague) to their correct appearance.
.IR Cawf 's
knowledge of the output device is established by a device file,
which is read before the user's input.
The search for it begins in
.IR cawf 's
library directory, under the name \fIterm\fP.\fBdev\fP
(where \fIterm\fR is the value of the TERM environment variable).
Failing to find that,
.I cawf
searches for
.BR .
The device file
uses special internal commands
to set up resolution, special characters, fonts, etc.,
and more normal \*(Nr commands to set up page length, etc.
.I Cawf
has limited support for special forms of bold and italic characters.
It is provided through the
.BI \-fe
option and post\-filters \- e. g.,
.BR fontfilt (1).
.B \-fe
option causes
.I cawf
to precede each bold character with ESC and `B'; each italic
character, ESC and `I'.
.I fontfilt
post\-filter converts these escape sequences into appropriate
device control codes.
(\fBFontfilt\fR will also select a font (once).)
All files are located in \fIc:/sys/lib/cawf\fR (the author's MS\-DOS
environment default).
This default can be overridden by the CAWFLIB environment variable,
or changed in the source code.

.ta \w'common'u+3n
common common device-independent initialization
*.dev device-specific initialization
m*.mac macro package files
bsfilt(1), colcrt(1), fontfilt(1), man(7), ms(7) and nroff(1).
.IR nroff ,
.I cawf
complains whenever it sees unknown commands and macros.
All diagnostics appear on the standard error file.
Vic Abell of Purdue University derived
.I cawf
.IR awf ,
\&``the Amazingly Workable (text) Formatter'' that was
written by Henry Spencer of the University of Toronto.
The Toronto work was a supplement to the C News project.
The Purdue effort was aimed at producing a C language version that
would run on small systems, particularly MS\-DOS ones.
The MS\-DOS version of
.I cawf
has been compiled with version 2.5 of Microsoft's Quick-C compiler.
It runs under the Mortis Kern Systems Toolkit KornShell,
.IR ksh (1),
Nroff and troff mavens will have many complaints.
Some may even represent bugs and not deliberate omissions.
Watch out for scaling factors - especially on commands like
.BR \ew .
The overprinting required to create bold and italicized characters is
tiresome on a slow printer.
.IR cawf 's
.B \-fn
option or the
.IR bsfilt (1)
post\-filter from this distribution to manage backspacing.
The printing of bold and italic characters is sometimes better handled by
special printer codes.
.IR cawf 's
.B \-fe
option to produce output that can be easily filtered,
and a post\-filter, such as
.IR fontfilt (1),
from this distribution to filter it.
.I Cawf
has a small amount of built-in code for the
.B man
.B ms
macro packages, but none for any others.
The stacking for the
.B .so
command is limited.

  3 Responses to “Category : Word Processors
Archive   : CAWF.ZIP
Filename : CAWF.1

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: