      program fofc2fo
      character line*132
      open(1,file='fofc',status='unknown')
      open(2,file='shelxl.hkl', status='unknown')
   10 read(1,'(A)',end=1000) line
      if (line(4:8) .eq. 'Table') goto 20
      goto 10
   20 read(1,'(A)', END=900) line
      write(6,'(A)') line
      if (line(4:8) .eq. 'Table') goto 20
      if (line(4:8) .eq. 'h  k ') goto 20
      if (line(4:8) .eq. 'H  K ') goto 20
      if (line(4:8) .eq. '     ') goto 20
      if (line(1:1) .EQ. '#')     goto 20
      IF (line(4:4) .EQ. '-')     goto 20
      do 30 i = 1, 5
      j = -24 + 26 * i
      read(line(j:),'(3i3,2i5,i4)') ih, ik, il, ifo, ifc, isig
      if (ih .ne. 0 .or. ik .ne. 0 .or. il .ne. 0)
     1 write(2,'(3I4,2I8)') ih,ik,il,ifo,isig
   30 continue
      goto 20
  900 write(2, '(A)') '    '
 1000 WRITE(6,'(//, ''HKLF 3 - written'')') 
      end
