.\" @(#)fsplit.1 1.15 00/01/21 SMI; from S5R3 .TH FSPLIT 1 "00/01/21" .SH NAME fsplit \- split a multi-routine FORTRAN 90 or FORTRAN 77 source file into individual files. .SH SYNOPSIS .B fsplit [ .B \-e .IR efile " ] .\|.\|. [ " fsplit_options " ] " file " " .\" .SH DESCRIPTION .\" .B fsplit takes as input a file containing FORTRAN 77 or FORTRAN 90 source code. It attempts to split the input into separate routine files of the form .B \fI\fR\fB.\fR, where .BI is the name of the program unit (function, subroutine, module, block data or program) and .BI is extension of name; it corresponds to the source language of source code. .LP Block data subprograms with no names get names of the form \fBblkdta\fINNN\fB.\fR, where .BI NNN are three digits and a file of this name does not already exist. .LP Main programs with no names get names of the form \fBmain\fINNN\fB.\fR .PP If there is a trouble in classifying a program unit, or if \fIname\fR\fB.\fR already exists, the program unit is put in a file of the form zzzNNN., where the file zzzNNN. does not already exist. .PP .LP .SH OPTIONS .TP .B \-e \fIefile\fR Normally, each subprogram unit is split into a separate file. But if e-option is used, then only subprograms named in the e-option are split off. .br .BI Example The command fsplit -e sub1 -e sub2 prog.f isolates sub1 and sub2 in the files sub1.f and sub2.f only. .TP .BI \-u Default all unit names are converted to lower case. When the u-option is used all units save their own original names. .br .BI Example Let the file main.f77 contain: subroutine SUB1 ... end subroutine SUB2 ... end .br .br Then the command fsplit main.f77 will build files named "sub1.f77" and "sub2.f77" .br .br And the command fsplit -u main.f77 will build files named "SUB1.f77" and "SUB2.f77" .TP .BI naming-options As it was noted above fsplit program takes source files containing FORTRAN-77 and FORTRAN-90 code. If naming options are not set (see below), fsplit is guided by the following rules: - If is '.f90' or '.F90' then input file is considered as FORTRAN-90 text in a free form. - If is '.f77' or '.F' then input file is considered as FORTRAN-77 text. - If is other then above-mentioned (for example '.f' or '.for'), then input file is also considered as FORTRAN-77 text. .LP There are some options for the definition of source language and source form .TP .BI \-f90 fsplit will treat source file as FORTRAN-90. .TP .BI \-fixed fsplit will treat source file as fixed form. (This option has meaning for fortran-90 text only). .LP .SH EXAMPLES .TP .BI \1. fsplit -f90 -fixed main1.f .SS main1.f file will be considered as a file containing FORTRAN-90 text in a fixed form. .TP .BI 2. fsplit -f90 main2.f .SS main2.f file will be considered as a file containing FORTRAN-90 text in a free form. .TP .BI 3. fsplit -f90 main3.f77 .SS main3.f77 file will be considered as a file containing FORTRAN-90 text in a free form. .LP .\" .SH DIAGNOSTICS .\" If names specified via the .B \-e option are not found, a diagnostic is written to .I standard .I error. .\" .SH BUGS .\" .LP Nonstandard source formats may confuse .B fsplit. .LP If source code is not syntactically right program it may confuse .B fsplit. .PP It is hard to use .B \-e option for unnamed main programs and block data subprograms since you must predict the created file name.