home *** CD-ROM | disk | FTP | other *** search
- .^x /tmp/awe16087
- .^b
- .^# 1 <prolog>
- .\" Device-dependent but not macro-set-dependent definitions.
- .\" --------------------------------
- .\" overall formatting initialization
- .\" 12 cpi horizontal exploits 80-column terminal well (6.5i@12 = 78)
- .^r cpi 12 6
- .\" call margin adjustment device-dependent for sake of some unusual cases
- .ad
- .\" page parameters
- .pl 11i
- .ll 6.5i
- .po 0
- .\" --------------------------------
- .\" fonts, and their hyphens, last font change doubled to set up \fP
- .^f R
- .ft R
- .^c hy 1 -
- .^f I
- .ft I
- .^c hy 1 -
- .^f B
- .ft B
- .^c hy 1 -\b-\b-
- .ft R
- .ft R
- .\" --------------------------------
- .\" definitions of nroff special characters
- .\" The character definitions here operate on the "better ugly than invisible"
- .\" principle, and try to approximate the character *somehow*. They were
- .\" tuned for a Teletype 40 line printer, but should give vaguely plausible
- .\" results on any overprinting ASCII device.
- .\"
- .\" first, things that nroff considered builtins
- .^c \ 1 \\
- .^c e 1 \\
- .^c ' 1 '
- .^c ` 1 `
- .^c - 1 -
- .\" some things seem to assume that \+ is like \-
- .^c + 1 +
- .\" we do not do backslash-space here, it can't be done with .^c, but the
- .\" other forms of space we can do
- .^c 0 1 "
- .^c | 0
- .^c ^ 0
- .^c & 0
- .\"
- .\" and more normal characters
- .\" note, the hyphenation logic knows about em
- .^c em 2 --
- .\" hy is a special case, see above
- .^c bu 1 +\bo
- .^c sq 2 []
- .^c ru 1 _
- .^c 12 3 1/2
- .^c 14 3 1/4
- .^c 34 3 3/4
- .^c de 1 '\b`
- .^c dg 1 -\b!
- .^c fm 1 '
- .^c ct 1 /\bc
- .^c rg 3 (R)
- .^c co 3 (c)
- .^c pl 1 +
- .^c mi 1 -
- .^c eq 1 =
- .^c ** 1 *
- .^c sc 1 j\bf
- .^c aa 1 '
- .^c ga 1 `
- .^c ul 1 _
- .^c sl 1 /
- .^c *a 1 <\ba
- .^c *b 1 ,\bB
- .^c *g 1 ,\by
- .^c *d 1 S\bo
- .^c *e 1 -\bc
- .^c *z 1 ,\bL
- .^c *y 1 ,\bn
- .^c *h 1 -\b0
- .^c *i 1 ,\bi
- .^c *k 1 <\bK
- .^c *l 1 \\\b>
- .^c *m 1 ,\bu
- .^c *n 1 ,\bv
- .^c *c 1 ,\b3
- .^c *o 1 o
- .^c *p 1 -\bn
- .^c *r 1 p
- .^c *s 1 -\bo
- .^c ts 1 s
- .^c *t 1 ~\bt
- .^c *u 1 u
- .^c *f 1 /\bo
- .^c *x 1 /\b\\
- .^c *q 1 |\bu
- .^c *w 1 u\bw
- .^c *G 2 ~\b|~
- .^c *D 2 _\b/_\b\\
- .^c *H 1 -\bO
- .^c *L 2 /\\
- .^c *C 1 _\b-\b~
- .^c *P 2 ~\b|~\b|
- .^c *S 1 ~\b_\b>
- .^c *U 1 Y
- .^c *F 1 |\bO
- .^c *Q 1 |\bU
- .^c *W 2 _\b(_\b)
- .^c sr 2 \\/
- .^c rn 1 ~
- .^c >= 1 _\b>
- .^c <= 1 _\b<
- .^c == 1 _\b=
- .^c ~= 1 ~\b=
- .^c ap 1 ~
- .^c != 1 /\b=
- .^c -> 2 ->
- .^c <- 2 <-
- .^c ua 1 |\b^
- .^c da 1 |\bv
- .^c mu 1 x
- .^c di 1 -\b:
- .^c +- 1 _\b+
- .^c cu 1 U
- .^c ca 3 (^)
- .^c sb 2 (_\b~
- .^c sp 2 _\b~)
- .^c ib 2 (~\b_\b=
- .^c ip 2 ~\b_\b=)
- .^c if 2 oo
- .^c pd 1 3\bo
- .^c gr 1 ~\bV
- .^c no 1 -
- .^c is 1 '\b,\bI
- .^c pt 2 oc
- .^c es 1 /\bO
- .^c mo 1 -\bC
- .^c br 1 |
- .^c dd 1 I\b|
- .^c rh 1 =\b>
- .^c lh 1 =\b<
- .^c bs 4 (:-)
- .^c or 1 |
- .^c ci 1 O
- .^c lt 1 ~\b(
- .^c lb 1 _\b(
- .^c rt 1 ~\b)
- .^c rb 1 _\b)
- .^c lk 1 -\b(
- .^c rk 1 -\b)
- .^c bv 1 |
- .^c lf 1 _\b[
- .^c rf 1 _\b]
- .^c lc 1 ~\b[
- .^c rc 1 ~\b]
- .\" Common startup code, fully device-independent.
- .\" --------------------------------
- .fi
- .ce 0
- .ta +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5
- .in 0
- .ti 0
- .\"-----------------
- .^# 171 <prolog>
- .\"-----------------
- .^# 176 <prolog>
- .\"-----------------
- .^# 181 <prolog>
- .\"-----------------
- .^# 185 <prolog>
- .\"-----------------
- .\" common initialization for headers and paragraphs: .In need
- .^# 197 <prolog>
- .\"-----------------
- .^# 207 <prolog>
- .\"-----------------
- .^# 211 <prolog>
- .\"-----------------
- .^# 215 <prolog>
- .\"-----------------
- .^# 219 <prolog>
- .\"-----------------
- .^# 224 <prolog>
- .\"-----------------
- .^# 232 <prolog>
- .\"-----------------
- .^# 238 <prolog>
- .\"-----------------
- .^# 244 <prolog>
- .\"-----------------
- .^# 250 <prolog>
- .\"-----------------
- .^# 254 <prolog>
- .\"-----------------
- .^# 258 <prolog>
- .\"-----------------
- .^# 262 <prolog>
- .\"-----------------
- .^# 266 <prolog>
- .\"-----------------
- .^# 270 <prolog>
- .\"-----------------
- .^# 274 <prolog>
- .\"-----------------
- .^# 279 <prolog>
- .\"-----------------
- .^# 283 <prolog>
- .\"-----------------
- .^# 287 <prolog>
- .\"-----------------
- .^# 291 <prolog>
- .\"-----------------
- .^# 296 <prolog>
- .\"-----------------
- .\" misc. initialization
- .nr tp 5n
- .^= 299 <prolog>
- .nr PD 0.3v
- .^# 300 <prolog>
- .ds R \(rg
- .ds S "
- .ds Tm (TM)
- .^# 1 awf.1
- .\" Some of the stuff in this file is a bit contorted, because it's also
- .\" the regression-test input.
- .nr ES 5n
- .^# 9 awf.1
- .^# 14 awf.1
- .^# 20 awf.1
- .ds Nr \fInroff\fR
- .^= 21 awf.1
- .ds LH "AWF(1)
- .ds CH "Unix Programmer's Manual
- .ds RH "AWF(1)
- .ds LF "
- .ds CF "13 July 1990
- .ds RF "%
- .^# 22 awf.1
- .^= 22 awf.1
- .ds by "U of Toronto
- .lF
- .^# 23 awf.1
- .^= 23 awf.1
- .ne 6
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in 0
- .ft B
- \&NAME
- .ft R
- .nr in 5n
- .in \n(inu
- .^# 24 awf.1
- awf \- amazingly workable (text) formatter
- .^= 25 awf.1
- .ne 6
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in 0
- .ft B
- \&SYNOPSIS
- .ft R
- .nr in 5n
- .in \n(inu
- .^# 26 awf.1
- .^= 26 awf.1
- .ft B
- .it 1 fP
- \&awf
- .^# 27 awf.1
- .^= 27 awf.1
- \&\fB\-m\fIacros\fB\fI\fB\fI\fB\fI\fB\fR
- .^# 28 awf.1
- [ file ] ...
- .^= 29 awf.1
- .ne 6
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in 0
- .ft B
- \&DESCRIPTION
- .ft R
- .nr in 5n
- .in \n(inu
- .^# 30 awf.1
- .^= 30 awf.1
- .^# 31 awf.1
- .^= 31 awf.1
- .ft I
- .it 1 fP
- \&Awf
- .^# 32 awf.1
- formats the text from the input \fIfile\fR(s)
- (standard input if none)
- in an imitation of
- \*(Nr's style with the \fB\-man\fR or \fB\-ms\fR macro packages.
- The
- .^= 37 awf.1
- \&\fB\-m\fIacro\fB\fI\fB\fI\fB\fI\fB\fR
- .^# 38 awf.1
- option is mandatory and must be `\-man' or `\-ms'.
- .^= 39 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .^# 40 awf.1
- .^= 40 awf.1
- .ft I
- .it 1 fP
- \&Awf
- .^# 41 awf.1
- implements the following raw \*(Nr requests:
- .^= 42 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .^# 43 awf.1
- .\e" .ce .fi .in .ne .pl .sp
- .ad .de .ft .it .nf .po .ta
- .bp .ds .ie .ll .nr .ps .ti
- .br .el .if .na .ns .rs .tm
- .^= 47 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .^# 48 awf.1
- and the following in-text codes:
- .^= 49 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in +\n(ESu
- .nf
- .^# 50 awf.1
- \e$ \e% \e* \ec \ef \en \es
- .^= 51 awf.1
- .in -\n(ESu
- .fi
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .^# 52 awf.1
- plus the full list of \*(Nr/\c
- .^= 53 awf.1
- .ft I
- .it 1 fP
- \&troff
- .^# 54 awf.1
- special characters in
- the original V7 \fItroff\fR manual.
- .^= 56 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .^# 57 awf.1
- Many restrictions are present; the behavior in general is a subset of
- \*(Nr's. Of particular note are the following:
- .^= 59 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .nr tp 2n
- .in \n(inu+\n(tpu
- .ti 0-\n(tpu
- .it 1 tP
- \&\(bu
- .^# 60 awf.1
- Point sizes do not exist;
- .^= 61 awf.1
- .ft B
- .it 1 fP
- \&.ps
- .^# 62 awf.1
- and
- .^= 63 awf.1
- .ft B
- .it 1 fP
- \&\es
- .^# 64 awf.1
- are ignored.
- .^= 65 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in \n(inu+\n(tpu
- .ti 0-\n(tpu
- .it 1 tP
- \(bu
- .^# 66 awf.1
- Conditionals implement only numeric comparisons on
- .^= 67 awf.1
- \&\fB\en(.$\fR,\fB\fR\fB\fR\fB\fR\fB\fR
- .^# 68 awf.1
- string com\%par\%isons between a macro parameter and a literal,
- and
- .^= 70 awf.1
- .ft B
- .it 1 fP
- \&n
- .^# 71 awf.1
- (always true)
- and
- .^= 73 awf.1
- \&\fBt\fR\fB\fR\fB\fR\fB\fR\fB\fR
- .^# 74 awf.1
- (always false).
- .^= 75 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in \n(inu+\n(tpu
- .ti 0-\n(tpu
- .it 1 tP
- \(bu
- .^# 76 awf.1
- The implementation of strings is generally primitive.
- .^= 77 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in \n(inu+\n(tpu
- .ti 0-\n(tpu
- .it 1 tP
- \&\(bu
- .^# 78 awf.1
- Expressions in (e.g.)\&
- .^= 79 awf.1
- .ft B
- .it 1 fP
- \&.sp
- .^# 80 awf.1
- are fairly general, but the
- .^= 81 awf.1
- \&\fB|\fR,\fB\fR\fB\fR\fB\fR\fB\fR
- .^# 82 awf.1
- .^= 82 awf.1
- \&\fB&\fR,\fB\fR\fB\fR\fB\fR\fB\fR
- .^# 83 awf.1
- and
- .^= 84 awf.1
- \&\fB:\&\fR\fB\fR\fB\fR\fB\fR\fB\fR
- .^# 85 awf.1
- operators do not exist, and the implementation of
- .^= 86 awf.1
- .ft B
- .it 1 fP
- \&\ew
- .^# 87 awf.1
- requires that quote (') be used as the delimiter and
- simply counts the characters inside (so that, e.g.,
- \ew'\e(bu'
- equals 4).
- .^= 91 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .^# 92 awf.1
- White space at the beginning of lines,
- and imbedded 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 quite correctly, although
- in most cases they work as expected.
- Hyphenation is done only at explicit hyphens, em-dashes, and \*(Nr
- discretionary hyphens.
- .^= 100 awf.1
- .ne 6
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in 0
- .ft B
- \&MAN MACROS
- .ft R
- .nr in 5n
- .in \n(inu
- .^# 101 awf.1
- The
- .^= 102 awf.1
- .ft B
- .it 1 fP
- \&\-man
- .^# 103 awf.1
- macro set implements the full V7 manual macros,
- plus a few semi-random oddballs.
- The full list is:
- .^= 106 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in +\n(ESu
- .nf
- .^# 107 awf.1
- \&.B .DT .IP .P .RE .SM
- \&.BI .HP .IR .PD .RI .TH
- \&.BR .I .LP .PP .RS .TP
- \&.BY .IB .NB .RB .SH .UC
- .^= 111 awf.1
- .in -\n(ESu
- .fi
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .^# 112 awf.1
- .^= 112 awf.1
- .ft B
- .it 1 fP
- \&.BY
- .^# 113 awf.1
- and
- .^= 114 awf.1
- .ft B
- .it 1 fP
- \&.NB
- .^# 115 awf.1
- 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.
- .^= 118 awf.1
- .ne 6
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in 0
- .ft B
- \&MS MACROS
- .ft R
- .nr in 5n
- .in \n(inu
- .^# 119 awf.1
- The
- .^= 120 awf.1
- .ft B
- .it 1 fP
- \&\-ms
- .^# 121 awf.1
- macro set is a substantial subset of the V7 manuscript macros.
- The implemented macros are:
- .^= 123 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in +\n(ESu
- .nf
- .^# 124 awf.1
- \&.AB .CD .ID .ND .QP .RS .UL
- \&.AE .DA .IP .NH .QS .SH .UX
- \&.AI .DE .LD .NL .R .SM
- \&.AU .DS .LG .PP .RE .TL
- \&.B .I .LP .QE .RP .TP
- .^= 129 awf.1
- .in -\n(ESu
- .fi
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .^# 130 awf.1
- Size changes are recognized but ignored, as are
- .^= 131 awf.1
- .ft B
- .it 1 fP
- \&.RP
- .^# 132 awf.1
- and
- .^= 133 awf.1
- \&\fB.ND\fR.\fB\fR\fB\fR\fB\fR\fB\fR
- .^# 134 awf.1
- .^= 134 awf.1
- .ft B
- .it 1 fP
- \&.UL
- .^# 135 awf.1
- just prints its argument in italics.
- .^= 136 awf.1
- \&\fB.DS\fR/\fB.DE\fR\fB\fR\fB\fR\fB\fR
- .^# 137 awf.1
- does not do a keep,
- nor do any of the other macros that normally imply keeps.
- .^= 139 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .^# 140 awf.1
- Assignments to the header/footer string variables are recognized and
- implemented, but there is otherwise no control over header/footer
- formatting.
- The
- .^= 144 awf.1
- .ft B
- .it 1 fP
- \&DY
- .^# 145 awf.1
- string variable is available.
- The
- .^= 147 awf.1
- \&\fBPD\fR,\fB\fR\fB\fR\fB\fR\fB\fR
- .^# 148 awf.1
- .^= 148 awf.1
- \&\fBPI\fR,\fB\fR\fB\fR\fB\fR\fB\fR
- .^# 149 awf.1
- and
- .^= 150 awf.1
- \&\fBLL\fR\fB\fR\fB\fR\fB\fR\fB\fR
- .^# 151 awf.1
- number registers exist and can be changed.
- .^= 152 awf.1
- .ne 6
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in 0
- .ft B
- \&OUTPUT
- .ft R
- .nr in 5n
- .in \n(inu
- .^# 153 awf.1
- The only output format supported by
- .^= 154 awf.1
- \&\fIawf\fR,\fI\fR\fI\fR\fI\fR\fI\fR
- .^# 155 awf.1
- 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 very vague) to their correct appearance.
- .^= 160 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .^# 161 awf.1
- .^= 161 awf.1
- \&\fIAwf\fR's\fI\fR\fI\fR\fI\fR\fI\fR
- .^# 162 awf.1
- knowledge of the output device is established by a device file,
- which is read before the user's input.
- It is sought in
- .^= 165 awf.1
- \&\fIawf\fR's\fI\fR\fI\fR\fI\fR\fI\fR
- .^# 166 awf.1
- library directory, first as
- .^= 167 awf.1
- \&\fBdev.\fIterm\fB\fI\fB\fI\fB\fI\fB\fR
- .^# 168 awf.1
- (where \fIterm\fR is the value of the TERM environment variable)
- and, failing that, as
- .^= 170 awf.1
- \&\fBdev.dumb\fR.\fB\fR\fB\fR\fB\fR\fB\fR
- .^# 171 awf.1
- 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.
- .^= 175 awf.1
- .ne 6
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in 0
- .ft B
- \&FILES
- .ft R
- .nr in 5n
- .in \n(inu
- .^# 176 awf.1
- All in \fI/usr/lib/awf\fR (this can be overridden by the AWFLIB
- environment variable):
-
- .ta \w'pass2.base'u+((3n-1n)/2u)
- .nf
- common common device-independent initialization
- dev.* device-specific initialization
- mac.m* macro packages
- pass1 macro substituter
- pass2.base central formatter
- pass2.m* macro-package-specific bits of formatter
- pass3 line and page composer
- .^= 188 awf.1
- .ne 6
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in 0
- .ft B
- \&SEE ALSO
- .ft R
- .nr in 5n
- .in \n(inu
- .^# 189 awf.1
- awk(1), nroff(1), man(7), ms(7)
- .^= 190 awf.1
- .ne 6
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in 0
- .ft B
- \&DIAGNOSTICS
- .ft R
- .nr in 5n
- .in \n(inu
- .^# 191 awf.1
- .na
- Unlike
- .^= 193 awf.1
- \&\fInroff\fR,\fI\fR\fI\fR\fI\fR\fI\fR
- .^# 194 awf.1
- .^= 194 awf.1
- .ft I
- .it 1 fP
- \&awf
- .^# 195 awf.1
- complains whenever it sees unknown commands and macros.
- All diagnostics (these and some internal ones) appear on standard error
- at the end of the run.
- .ad
- .^= 199 awf.1
- .ne 6
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in 0
- .ft B
- \&HISTORY
- .ft R
- .nr in 5n
- .in \n(inu
- .^# 200 awf.1
- Written at University of Toronto by Henry Spencer,
- more or less as a supplement to the C News project.
- .^= 202 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .^# 203 awf.1
- .ce 99
- \(rh None of the above really want to admit it. \(lh
- .ce 0
- .^= 206 awf.1
- .ne 6
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .in 0
- .ft B
- \&BUGS
- .ft R
- .nr in 5n
- .in \n(inu
- .^# 207 awf.1
- There are plenty, but what do you expect for a text formatter
- written entirely in (old) \fIawk\fR?
- .^= 209 awf.1
- .ne 4
- .sp \n(PDu
- .fi
- .in \n(inu
- .ti 0
- .it
- .ft R
- .ns
- .^# 210 awf.1
- The
- .^= 211 awf.1
- .ft B
- .it 1 fP
- \&\-ms
- .^# 212 awf.1
- stuff has not been checked out very thoroughly.
- .^e
-