xref: /original-bsd/usr.bin/fpr/fpr.1 (revision 50d6ebba)
Copyright (c) 1989 The Regents of the University of California.
All rights reserved.

This code is derived from software contributed to Berkeley by
Robert Corbett.

Redistribution and use in source and binary forms are permitted
provided that the above copyright notice and this paragraph are
duplicated in all such forms and that any documentation,
advertising materials, and other materials related to such
distribution and use acknowledge that the software was developed
by the University of California, Berkeley. The name of the
University may not be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

@(#)fpr.1 6.4 (Berkeley) 06/11/90

FPR 1 ""
C 5
NAME
fpr - print Fortran file
SYNOPSIS
fpr
DESCRIPTION
Fpr is a filter that transforms files formatted according to Fortran's carriage control conventions into files formatted according to UNIX line printer conventions.

Fpr copies its input onto its output, replacing the carriage control characters with characters that will produce the intended effects when printed using lpr (1). The first character of each line determines the vertical spacing as follows: tbl input for vertical spacing table
.TS
center box;
c | l.
Character Vertical Space Before Printing
_
Blank One line
0 Two lines
1 To first line of next page
+ No advance
.TE
end of tbl input for vertical spacing table
tbl output for vertical spacing table

.nr #~ 0
.fc
.nr 33 \n(.s
.nr 80 0
.nr 38 \wCharacter
.nr 38 \wBlank
.nr 38 \w0
.nr 38 \w1
.nr 38 \w+
.80
.nr 81 0
.nr 38 \wVertical Space Before Printing
.nr 38 \wOne line
.nr 38 \wTwo lines
.nr 38 \wTo first line of next page
.nr 38 \wNo advance
.81
.nr 38 1n
.nr 79 0
.nr 40 \n(79+(1*\n(38)
.nr 80 +\n(40
.nr 41 \n(80+(3*\n(38)
.nr 81 +\n(41
.nr TW \n(81
.nr TW +1*\n(38
.nr #I \n(.i
.fc  
.nr #T 0-1
.nr #a 0-1
.nr #a 0-1
.eo

##

.nr ## -1v
.ls 1
.ls
..
.ec
.nr 36 \n(.v
.vs \n(.vu-\n(.sp
\h'|0'\s\n(33\l'|\n(TWu\(ul'\s0
.vs \n(36u

#a

.nr 31 \n(.f
.nr 35 1m
\h'|\n(40u'Character\h'|\n(41u'Vertical Space Before Printing
.nr 36 \n(.v
.vs \n(.vu-\n(.sp
\h'|0'\s\n(33\l'|\n(TWu\(ul'\s0
.vs \n(36u
.nr 31 \n(.f
.nr 35 1m
\h'|\n(40u'Blank\h'|\n(41u'One line
.nr 31 \n(.f
.nr 35 1m
\h'|\n(40u'0\h'|\n(41u'Two lines
.nr 31 \n(.f
.nr 35 1m
\h'|\n(40u'1\h'|\n(41u'To first line of next page
.nr 31 \n(.f
.nr 35 1m
\h'|\n(40u'+\h'|\n(41u'No advance
.fc
.nr T. 1
.T# 1
.35
.nr #a 0
end of tbl output for vertical spacing table
.\}
 +---------------+--------------------------------+
 | Character | Vertical Space Before Printing |
 |---------------+--------------------------------|
 | Blank | One line |
 | 0 | Two lines |
 | 1 | To first line of next page |
 | + | No advance |
 +---------------+--------------------------------+
.\}

A blank line is treated as if its first character is a blank. A blank that appears as a carriage control character is deleted. A zero is changed to a newline. A one is changed to a form feed. The effects of a "+" are simulated using backspaces.

EXAMPLES
a.out | fpr | lpr

fpr < f77.output | lpr

BUGS
Results are undefined for input lines longer than 170 characters.