new copyright notice
[unix-history] / usr / src / usr.bin / fsplit / fsplit.1
CommitLineData
d4f06e9c
KB
1.\" Copyright (c) 1983 The Regents of the University of California.
2.\" All rights reserved.
49b2b382 3.\"
d4f06e9c
KB
4.\" This code is derived from software contributed to Berkeley by
5.\" Asa Romberger and Jerry Berkman.
6.\"
7.\" Redistribution and use in source and binary forms are permitted
8.\" provided that the above copyright notice and this paragraph are
9.\" duplicated in all such forms and that any documentation,
10.\" advertising materials, and other materials related to such
11.\" distribution and use acknowledge that the software was developed
12.\" by the University of California, Berkeley. The name of the
13.\" University may not be used to endorse or promote products derived
14.\" from this software without specific prior written permission.
15.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18.\"
19.\" @(#)fsplit.1 6.2 (Berkeley) %G%
49b2b382 20.\"
15ae4bc7 21.TH FSPLIT 1 ""
49b2b382
KM
22.UC 5
23.SH NAME
24fsplit \- split a multi-routine Fortran file into individual files
25.SH SYNOPSIS
26.B fsplit
27[
28.B -e
29efile] ... [ file ]
30.SH DESCRIPTION
31.B Fsplit
32takes as input either a file or standard input containing Fortran source code.
33It attempts to split the input into separate routine files of the
34form
35.I name.f,
36where
37.I name
38is the name of the program unit (e.g. function, subroutine, block data or
39program). The name for unnamed block data subprograms has the form
40.I blkdtaNNN.f
41where NNN is three digits and a file of this name does not already exist.
42For unnamed main programs the name has the form
43.I mainNNN.f.
44If there is an error in classifying a program unit, or if
45.I name.f
46already exists,
47the program unit will be put in a file of the form
48.I zzzNNN.f
49where
50.I zzzNNN.f
51does not already exist.
52.PP
53Normally each subprogram unit is split into a separate file. When the
54.I -e
55option is used, only the specified subprogram units are split into separate
56files. E.g.:
57.nf
58 fsplit -e readit -e doit prog.f
59.fi
60will split readit and doit into separate files.
61.SH DIAGNOSTICS
62If names specified via the
63.I -e
64option are not found, a diagnostic is written to
65.I standard
66.I error.
67.SH AUTHOR
68Asa Romberger and Jerry Berkman
69.SH BUGS
70.I Fsplit
71assumes the subprogram name is on the first noncomment line of the subprogram
72unit. Nonstandard source formats may confuse
73.I fsplit.
74.PP
75It is hard to use
76.I -e
77for unnamed main programs and block data subprograms since you must
78predict the created file name.