program gzinp character*80 s80,s1,s2 call getarg(1,s1) call getarg(2,s2) i=0 iv=0 io=0 open(9,file=s1) open(8,file=s2) 1 read(9,80,end=99,err=99)s80 80 format(a80) if(s80(1:2).eq.' %')write(8,80)s80 if(s80(2:4).eq.'---')then i=i+1 if(i.eq.1)then read(9,80,end=99,err=99)s80 write(8,80)s80 endif endif if(s80(1:2).eq.' #')then i=0 write(8,80)s80 2 read(9,80,end=99,err=99)s80 if(s80(2:4).ne.'---')then write(8,80)s80 goto 2 endif endif if(s80(1:10).eq.' Charge = ')then read(s80(11:12),*)ic read(s80(28:29),*)m write(8,*)ic,m 3 read(9,80,end=99,err=99)s80 if(s80(1:17).ne.' Variables:')then write(8,80)s80 goto 3 else 5 read(9,80,end=99,err=99)s80 if(s80(1:17).ne.' Constants:')then iv=iv+1 goto 5 endif endif endif if(s80(47:51).eq.'! Non-Optimized Parameters !')then write(8,*) read(9,80,end=99,err=99)s80 read(9,80,end=99,err=99)s80 read(9,80,end=99,err=99)s80 read(9,80,end=99,err=99)s80 4 read(9,80,end=99,err=99)s80 if(s80(2:4).ne.'---')then io=io+1 if(io.eq.iv)write(8,*) write(8,*)s80(3:37) goto 4 endif write(8,*) endif goto 1 99 close(9) close(8) end