written by Mark Horton; add Berkeley copyright
[unix-history] / usr / src / usr.bin / fpr / fpr.1
CommitLineData
9c6b803e
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
14140efb 5.\" @(#)fpr.1 6.2 (Berkeley) %G%
9c6b803e 6.\"
b62c4e46 7.TH FPR 1 ""
9c6b803e
KM
8.UC 5
9.ds f. fpr.tbl
10.SH NAME
11fpr \- print Fortran file
12.SH SYNOPSIS
13.B fpr
14.SH DESCRIPTION
15.I Fpr
16is a filter that transforms files formatted according to
17Fortran's carriage control conventions into files formatted
18according to UNIX line printer conventions.
19.PP
20.I Fpr
21copies its input onto its output, replacing the carriage
22control characters with characters that will produce the intended
23effects when printed using
24.IR lpr (1).
25The first character of each line determines the vertical spacing as follows:
26
27.if t \{\
28.\" tbl input for vertical spacing table
29.\" .TS
30.\" center box;
31.\" c | l.
32.\" Character Vertical Space Before Printing
33.\" _
34.\" Blank One line
35.\" 0 Two lines
36.\" 1 To first line of next page
37.\" + No advance
38.\" .TE
39.\" end of tbl input for vertical spacing table
40.\" tbl output for vertical spacing table
41.TS
42.if \n+(b.=1 .nr d. \n(.c-\n(c.-1
43.de 35
44.ps \n(.s
45.vs \n(.vu
46.in \n(.iu
47.if \n(.u .fi
48.if \n(.j .ad
49.if \n(.j=0 .na
50..
51.nf
52.nr #~ 0
53.if n .nr #~ 0.6n
54.ds #d .d
55.if \(ts\n(.z\(ts\(ts .ds #d nl
56.fc
57.nr 33 \n(.s
58.rm 80 81
59.nr 80 0
60.nr 38 \w\ 2Character\ 2
61.if \n(80<\n(38 .nr 80 \n(38
62.nr 38 \w\ 2Blank\ 2
63.if \n(80<\n(38 .nr 80 \n(38
64.nr 38 \w\ 20\ 2
65.if \n(80<\n(38 .nr 80 \n(38
66.nr 38 \w\ 21\ 2
67.if \n(80<\n(38 .nr 80 \n(38
68.nr 38 \w\ 2+\ 2
69.if \n(80<\n(38 .nr 80 \n(38
70.80
71.rm 80
72.nr 81 0
73.nr 38 \w\ 2Vertical Space Before Printing\ 2
74.if \n(81<\n(38 .nr 81 \n(38
75.nr 38 \w\ 2One line\ 2
76.if \n(81<\n(38 .nr 81 \n(38
77.nr 38 \w\ 2Two lines\ 2
78.if \n(81<\n(38 .nr 81 \n(38
79.nr 38 \w\ 2To first line of next page\ 2
80.if \n(81<\n(38 .nr 81 \n(38
81.nr 38 \w\ 2No advance\ 2
82.if \n(81<\n(38 .nr 81 \n(38
83.81
84.rm 81
85.nr 38 1n
86.nr 79 0
87.nr 40 \n(79+(1*\n(38)
88.nr 80 +\n(40
89.nr 41 \n(80+(3*\n(38)
90.nr 81 +\n(41
91.nr TW \n(81
92.nr TW +1*\n(38
93.if t .if (\n(TW+\n(.o)>7.65i .tm Table at line 45 file fpr.tbl is too wide - \n(TW units
94.ne 5v+2p
95.nr #I \n(.i
96.in +(\n(.lu-\n(TWu-\n(.iu)/2u
97.fc \ 2 \ 3
98.nr #T 0-1
99.nr #a 0-1
100.nr #a 0-1
101.eo
102.de T#
103.ds #d .d
104.if \(ts\n(.z\(ts\(ts .ds #d nl
105.mk ##
106.nr ## -1v
107.ls 1
108.if \n(#T>=0 .nr #a \n(#T
109.if \n(T. .vs \n(.vu-\n(.sp
110.if \n(T. \h'|0'\s\n(33\l'|\n(TWu\(ul'\s0
111.if \n(T. .vs
112.if \n(#a>=0 .sp -1
113.if \n(#a>=0 \h'|0'\s\n(33\h'-\n(#~u'\L'|\n(#au-1v'\s0\v'\n(\*(#du-\n(#au+1v'\h'|\n(TWu'
114.if \n(#a>=0 .sp -1
115.if \n(#a>=0 \h'(|\n(41u+|\n(80u)/2u'\s\n(33\h'-\n(#~u'\L'|\n(#au-1v'\s0\v'\n(\*(#du-\n(#au+1v'\h'|\n(TWu'
116.if \n(#a>=0 .sp -1
117.if \n(#a>=0 \h'|\n(TWu'\s\n(33\h'-\n(#~u'\L'|\n(#au-1v'\s0\v'\n(\*(#du-\n(#au+1v'
118.ls
119..
120.ec
121.nr 36 \n(.v
122.vs \n(.vu-\n(.sp
123\h'|0'\s\n(33\l'|\n(TWu\(ul'\s0
124.vs \n(36u
125.mk #a
126.ta \n(80u \n(81u
127.nr 31 \n(.f
128.nr 35 1m
129\&\h'|\n(40u'\ 2\ 3Character\ 3\ 2\h'|\n(41u'\ 2Vertical Space Before Printing\ 3\ 2
130.nr 36 \n(.v
131.vs \n(.vu-\n(.sp
132\h'|0'\s\n(33\l'|\n(TWu\(ul'\s0
133.vs \n(36u
134.ta \n(80u \n(81u
135.nr 31 \n(.f
136.nr 35 1m
137\&\h'|\n(40u'\ 2\ 3Blank\ 3\ 2\h'|\n(41u'\ 2One line\ 3\ 2
138.ta \n(80u \n(81u
139.nr 31 \n(.f
140.nr 35 1m
141\&\h'|\n(40u'\ 2\ 30\ 3\ 2\h'|\n(41u'\ 2Two lines\ 3\ 2
142.ta \n(80u \n(81u
143.nr 31 \n(.f
144.nr 35 1m
145\&\h'|\n(40u'\ 2\ 31\ 3\ 2\h'|\n(41u'\ 2To first line of next page\ 3\ 2
146.ta \n(80u \n(81u
147.nr 31 \n(.f
148.nr 35 1m
149\&\h'|\n(40u'\ 2\ 3+\ 3\ 2\h'|\n(41u'\ 2No advance\ 3\ 2
150.fc
151.nr T. 1
152.T# 1
153.in \n(#Iu
154.35
155.nr #a 0
156.TE
157.if \n-(b.=0 .nr c. \n(.c-\n(d.-9
158.\" end of tbl output for vertical spacing table
159.\}
160.if n \{\
161.nf
162 +---------------+--------------------------------+
163 | Character | Vertical Space Before Printing |
164 |---------------+--------------------------------|
165 | Blank | One line |
166 | 0 | Two lines |
167 | 1 | To first line of next page |
168 | + | No advance |
169 +---------------+--------------------------------+
170.fi
171.\}
172
173.PP
174A blank line is treated as if its first
175character is a blank. A blank that appears as a carriage control
176character is deleted. A zero is changed to a newline. A one is
177changed to a form feed. The effects of a "+" are simulated using
178backspaces.
179.SH EXAMPLES
180a.out | fpr | lpr
181.PP
182fpr < f77.output | lpr
9c6b803e
KM
183.SH BUGS
184Results are undefined for input lines longer than 170 characters.