Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!apollo!geiser From: geiser@apollo.COM (Wayne Geiser) Newsgroups: comp.sys.apollo Subject: Re: SR10 librarian (lbr) functionality loss Message-ID: <3fbe0164.ba7d@apollo.COM> Date: 18 Nov 88 16:34:00 GMT References: <3f6dd85c.ba7d@apollo.COM> <563@nikhefh.hep.nl> <3f960034.ba7d@apollo.COM> <568@nikhefh.hep.nl> Organization: Apollo Computer, Chelmsford, Mass. Lines: 40 >In <3f960034.ba7d@apollo.COM> geiser@apollo.COM (Wayne Geiser) wrote: >>This can be done automatically by the >>same shell script that breaks the sources apart (it is in the one I wrote). > >Splitting up a fortran source file is not a trivial job. Utilities like the >bsd or sysv 'fsplit' are inadequate, so your script has to be a lot smarter. >'Conditio sine qua non' is that the master file remains unedited. >The following cases must be handled: >1. Labeled END statements. >2. Variables named END must not be confused with END statements. >3. Comments between two fortran modules must be put into the proper file. >4. Continuation lines must be recognized. >5. Blank lines between modules must be handled properly. >6. Unnamed modules must be recognized, e.g. BLOCK DATA. >7. File name clashes must be solved, e.g. in case a file already exists. I have played around with fsplit. Here are the results of my experimentation: 2, 4, 6, and 7 work just fine (at least with the BSD version). 3 and 5 all comments and blank lines following the END of a preceding subprogram get grouped with the current subprogram. 1 Confuses fsplit. > . > . > . > >Eric Wassenaar >-- >Organization: NIKHEF-H, National Institute for Nuclear and High-Energy Physics >Address: Kruislaan 409, P.O. Box 41882, 1009 DB Amsterdam, the Netherlands >Phone: +31 20 5920412 Home phone: +31 20 909449 Telex: 10262 (hef nl) >Internet: e07@nikhefh.hep.nl Bitnet: nikhefh!e07@mcvax.bitnet Wayne. -- Wayne Geiser Apollo Computer, Inc. {mit-erl, yale, uw-beaver, decvax}!apollo!geiser