| 1 | .\" Copyright (c) 1983 Regents of the University of California. |
| 2 | .\" All rights reserved. The Berkeley software License Agreement |
| 3 | .\" specifies the terms and conditions for redistribution. |
| 4 | .\" |
| 5 | .\" @(#)fsplit.1 6.1 (Berkeley) %G% |
| 6 | .\" |
| 7 | .TH FSPLIT 1 "" |
| 8 | .UC 5 |
| 9 | .SH NAME |
| 10 | fsplit \- split a multi-routine Fortran file into individual files |
| 11 | .SH SYNOPSIS |
| 12 | .B fsplit |
| 13 | [ |
| 14 | .B -e |
| 15 | efile] ... [ file ] |
| 16 | .SH DESCRIPTION |
| 17 | .B Fsplit |
| 18 | takes as input either a file or standard input containing Fortran source code. |
| 19 | It attempts to split the input into separate routine files of the |
| 20 | form |
| 21 | .I name.f, |
| 22 | where |
| 23 | .I name |
| 24 | is the name of the program unit (e.g. function, subroutine, block data or |
| 25 | program). The name for unnamed block data subprograms has the form |
| 26 | .I blkdtaNNN.f |
| 27 | where NNN is three digits and a file of this name does not already exist. |
| 28 | For unnamed main programs the name has the form |
| 29 | .I mainNNN.f. |
| 30 | If there is an error in classifying a program unit, or if |
| 31 | .I name.f |
| 32 | already exists, |
| 33 | the program unit will be put in a file of the form |
| 34 | .I zzzNNN.f |
| 35 | where |
| 36 | .I zzzNNN.f |
| 37 | does not already exist. |
| 38 | .PP |
| 39 | Normally each subprogram unit is split into a separate file. When the |
| 40 | .I -e |
| 41 | option is used, only the specified subprogram units are split into separate |
| 42 | files. E.g.: |
| 43 | .nf |
| 44 | fsplit -e readit -e doit prog.f |
| 45 | .fi |
| 46 | will split readit and doit into separate files. |
| 47 | .SH DIAGNOSTICS |
| 48 | If names specified via the |
| 49 | .I -e |
| 50 | option are not found, a diagnostic is written to |
| 51 | .I standard |
| 52 | .I error. |
| 53 | .SH AUTHOR |
| 54 | Asa Romberger and Jerry Berkman |
| 55 | .SH BUGS |
| 56 | .I Fsplit |
| 57 | assumes the subprogram name is on the first noncomment line of the subprogram |
| 58 | unit. Nonstandard source formats may confuse |
| 59 | .I fsplit. |
| 60 | .PP |
| 61 | It is hard to use |
| 62 | .I -e |
| 63 | for unnamed main programs and block data subprograms since you must |
| 64 | predict the created file name. |