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