      subroutine openf
      IMPLICIT REAL*8(A-H,O-X,Z),logical*1(y)
      character*10000 namel
      common/pr/nprint
      character*80 prefix
     *,file
     *,oneint,oneint1
      character*80 blan40
      common /filc/jrc_oneint
      namelist /smufil/ prefix
      nprint=0
      blan40='                                        '
     *//'                                        '
      prefix=blan40
      oneint='OneInt    '
      oneint1=blan40
      call LECNAM('&SMUFIL ',namel,93,ierr,1)
      if(ierr.eq.1) then
         print*,'namelist SMUFIL non trouvee'
         stop
      endif
      call namela(namel,prefix,'PREFIX')
      write(6,*)' '
      write(6,*)'==========================='
      write(6,*)'openf   ouverture des files'
      write(6,*)'==========================='
      write(75,smufil)
      call scrinam('NAMELIST SMUFIL ')
c
c--   ouverture des files c
c
      write(6,*)'==========================='
      write(6,*)' '
      write(6,*)'jrc_oneint',jrc_oneint
      return
      end
       subroutine colle(a,b,c,ic)
      character*1 a*(*),b*(*),c*(*)
      la=len(a)
      lb=len(b)
      lc=len(c)
      do i=1,lc
         c(i:i)=' '
      enddo
      ic=0
      do ia=1,la
         if(a(ia:ia).ne.' ') then
            ic=ic+1
            if(ic.gt.lc) then
               print*,'impossible de coller a et b. c pas assez long'
               print*,a
               print*,b
               stop
            endif
            c(ic:ic)=a(ia:ia)
         endif
      enddo   
      do ib=1,lb
         if(b(ib:ib).ne.' ') then
            ic=ic+1
            if(ic.gt.lc) then
               print*,'impossible de coller a et b. c pas assez long'
               print*,a
               print*,b
               stop
            endif
            c(ic:ic)=b(ib:ib)
         endif
      enddo   
      return
      end
       subroutine nomfil3(file1,file,jrc)
      character*1 file*(*),file1*(*)
      if(file1(1:1).eq.' ') call colle(file,char(0),file1,long)
      lf=len(file)
      lf1=len(file1)
c      print*,'lf',lf
c      print*,'lf1',lf1
c      print*,'file1',file1(1:long)
      write(75,*)'Ouverture de la file ',file1(1:long-1),'$'
      call scril
      open(1,file=file1(1:long-1),form='unformatted',status='old')
      close(1)
      print*,'nomfil3 jrc',jrc
      return
      end
