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