1*62005Sbostic.\" Copyright (c) 1983, 1990, 1993 2*62005Sbostic.\" The Regents of the University of California. All rights reserved. 319704Smckusick.\" 439864Sbostic.\" This code is derived from software contributed to Berkeley by 539864Sbostic.\" Asa Romberger and Jerry Berkman. 650521Scael.\" %sccs.include.redist.roff% 719704Smckusick.\" 8*62005Sbostic.\" @(#)fsplit.1 8.1 (Berkeley) 06/06/93 939864Sbostic.\" 1043693Scael.Dd 1143693Scael.Dt FSPLIT 1 1243693Scael.Os BSD 4.2 1343693Scael.Sh NAME 1443693Scael.Nm fsplit 1543693Scael.Nd split a multi-routine Fortran file into individual files 1643693Scael.Sh SYNOPSIS 1743693Scael.Nm fsplit 1843693Scael.Op Fl e Ar efile 1943693Scael\&... 2043693Scael.Op Ar file 2143693Scael.Sh DESCRIPTION 2243693Scael.Nm Fsplit 2319704Smckusicktakes as input either a file or standard input containing Fortran source code. 2419704SmckusickIt attempts to split the input into separate routine files of the 2519704Smckusickform 2643693Scael.Ar name.f , 2719704Smckusickwhere 2843693Scael.Ar name 2919704Smckusickis the name of the program unit (e.g. function, subroutine, block data or 3019704Smckusickprogram). The name for unnamed block data subprograms has the form 3143693Scael.Ar blkdtaNNN.f 3219704Smckusickwhere NNN is three digits and a file of this name does not already exist. 3319704SmckusickFor unnamed main programs the name has the form 3443693Scael.Ar mainNNN.f . 3519704SmckusickIf there is an error in classifying a program unit, or if 3643693Scael.Ar name.f 3719704Smckusickalready exists, 3843693Scaelthe program unit will be put in a file of the form 3943693Scael.Ar zzzNNN.f 4043693Scaelwhere 4143693Scael.Ar zzzNNN.f 4219704Smckusickdoes not already exist. 4343693Scael.Pp 4450521Scael.Bl -tag -width Fl 4550521Scael.It Fl e Ar efile 4619704SmckusickNormally each subprogram unit is split into a separate file. When the 4743693Scael.Fl e 4819704Smckusickoption is used, only the specified subprogram units are split into separate 4919704Smckusickfiles. E.g.: 5043693Scael.Pp 5143693Scael.Dl fsplit -e readit -e doit prog.f 5243693Scael.Pp 5319704Smckusickwill split readit and doit into separate files. 5450521Scael.El 5543693Scael.Sh DIAGNOSTICS 5643693ScaelIf names specified via the 5743693Scael.Fl e 5843693Scaeloption are not found, a diagnostic is written to 5943693Scaelstandard error. 6043693Scael.Sh HISTORY 6150521ScaelThe 6250521Scael.Nm fsplit 6350521Scaelcommand 6450521Scaelappeared in 6550521Scael.Bx 4.2 . 6643693Scael.Sh AUTHORS 6719704SmckusickAsa Romberger and Jerry Berkman 6843693Scael.Sh BUGS 6943693Scael.Nm Fsplit 7019704Smckusickassumes the subprogram name is on the first noncomment line of the subprogram 7143693Scaelunit. Nonstandard source formats may confuse 7243693Scael.Nm fsplit . 7343693Scael.Pp 7443693ScaelIt is hard to use 7543693Scael.Fl e 7643693Scaelfor unnamed main programs and block data subprograms since you must 7719704Smckusickpredict the created file name. 78