xref: /original-bsd/usr.bin/fsplit/fsplit.1 (revision c471a344)
1.\" Copyright (c) 1983, 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Asa Romberger and Jerry Berkman.
6.\"
7.\" %sccs.include.redist.man%
8.\"
9.\"     @(#)fsplit.1	6.6 (Berkeley) 03/14/91
10.\"
11.Vx
12.Vx
13.Dd
14.Dt FSPLIT 1
15.Os BSD 4.2
16.Sh NAME
17.Nm fsplit
18.Nd split a multi-routine Fortran file into individual files
19.Sh SYNOPSIS
20.Nm fsplit
21.Op Fl e Ar efile
22\&...
23.Op Ar file
24.Sh DESCRIPTION
25.Nm Fsplit
26takes as input either a file or standard input containing Fortran source code.
27It attempts to split the input into separate routine files of the
28form
29.Ar name.f ,
30where
31.Ar name
32is the name of the program unit (e.g. function, subroutine, block data or
33program).  The name for unnamed block data subprograms has the form
34.Ar blkdtaNNN.f
35where NNN is three digits and a file of this name does not already exist.
36For unnamed main programs the name has the form
37.Ar mainNNN.f .
38If there is an error in classifying a program unit, or if
39.Ar name.f
40already exists,
41the program unit will be put in a file of the form
42.Ar zzzNNN.f
43where
44.Ar zzzNNN.f
45does not already exist.
46.Pp
47.Tw Ar
48.Tc Fl e
49.Ws
50.Ar efile
51.Cx
52Normally each subprogram unit is split into a separate file.  When the
53.Fl e
54option is used, only the specified subprogram units are split into separate
55files.  E.g.:
56.Pp
57.Dl fsplit -e readit -e doit prog.f
58.Pp
59will split readit and doit into separate files.
60.Tp
61.Sh DIAGNOSTICS
62If names specified via the
63.Fl e
64option are not found, a diagnostic is written to
65standard error.
66.Sh HISTORY
67.Nm Fsplit
68appeared in 4.2 BSD.
69.Sh AUTHORS
70Asa Romberger and Jerry Berkman
71.Sh BUGS
72.Nm Fsplit
73assumes the subprogram name is on the first noncomment line of the subprogram
74unit.  Nonstandard source formats may confuse
75.Nm fsplit .
76.Pp
77It is hard to use
78.Fl e
79for unnamed main programs and block data subprograms since you must
80predict the created file name.
81