c$Id: pincld.f,v 1.1 2000/08/24 20:42:44 rlt Exp $ subroutine pincld(fname) c * * F E A P * * A Finite Element Analysis Program c.... Copyright (c) 1984-2005: Robert L. Taylor c All rights reserved c-----[--.----+----.----+----.-----------------------------------------] c Purpose: Control file for I/O from include files c Inputs: c fname - Name of file to read include data from c N.B. If fname = 'end', closes include file c Outputs: c none c-----[--.----+----.----+----.-----------------------------------------] implicit none include 'comfil.h' include 'iodata.h' include 'ioincl.h' include 'iofile.h' include 'iosave.h' logical errc,lopen,pcomp character fname*(*),dnam*15, fnamr*21, fext*8 save c Perform inputs from an include file dnam = fname if(pcomp(dnam,'end',3)) then inquire(file=fnamr,opened=lopen,exist=errc) if(errc.and.lopen) then close(icf) else inquire(unit=icf,opened=lopen,exist=errc) if(errc.and.lopen) then close(icf) endif endif if(isf.gt.1) then fincld(isf) = ' ' endif isf = max(1,isf-1) ior = isfile(isf) icf = max(icl,abs(ior)) lread = .false. else 1 inquire(unit=icf,opened=lopen) if(lopen) then icf = icf + 1 go to 1 endif fnamr = dnam fext = dnam call opnfil(fext,fnamr,-2,icf,lread) if(.not.lread) then if(ior.lt.0) return call plstop() endif isfile(isf) = ior ior = icf isf = isf + 1 fincld(isf) = fnamr irecrd(isf) = 0 endif end