      subroutine printequiv(fs,ts,ns)
      implicit none
      include 'io_files.inc'
      
c...	passed variables
      double precision fs(3,3,*),ts(3,*)
c01Dec      double precision fs(3,3,ns),ts(3,ns) !! last dimension = 24 in lazy. 
C      real fs(3,3,ns),ts(3,ns)
      integer ns

c...	local variables
      integer i,j,k,length
      character*9 pos(3),old(3)
      character*1 xchar(3)

      data (xchar(i),i=1,3)/1HX,1HY,1HZ/

C  UNIT 7 is structinfo.dat
      write (unitstruct, *) '>> printequiv()'
      write(unitstruct,10) '# of equiv. pos. (not counting ',
     &  'inversion or Bravais lattice symmetry) ',ns
c      write(7,10) '# of equiv. pos. (not counting inversion or',
c     &  ' Bravais lattice symmetry) ',ns
 10   format(2a,i2)

C  trying to save screen space

      do i=1,ns
         do j=1,3
         pos(j)=''
         length=0
         if (ts(j,i).ne.0.0d0) then
           write(pos(j),'(f3.2)') ts(j,i)
           length=3
         endif
           do k=1,3
             old(j)=pos(j)
             if (fs(k,j,i).eq.1.0d0) then
               if (length.eq.0) then
                 pos(j)= old(j)(1:length)//xchar(k)
                 length=length+1
               else  
                 pos(j)= old(j)(1:length)//'+'//xchar(k)
c0111                 pos(j)= old(j)(1:length)//1h+//xchar(k)
                 length=length+2
               endif
             endif
             if (fs(k,j,i).eq.-1.0d0) then
               pos(j)= old(j)(1:length)//'-'//xchar(k)
c0111               pos(j)= old(j)(1:length)//1h-//xchar(k)
               length=length+2
             endif
           enddo
         enddo
         write(unitstruct,11) i,pos(1),pos(2),pos(3)
c         write(7,11) i,pos(1),pos(2),pos(3)
 11      format(1h(,i2,1h),1x,a9,1h,,a9,1h,,a9,$)
         if (float(i)/2.0.eq.int(float(i)/2.0)) write(unitstruct,*)
c         if (float(i)/2.0.eq.int(float(i)/2.0)) write(7,*)
      enddo
      return
      end
