      IMPLICIT REAL*8 (A-H,O-Z)
      DIMENSION NRECPT(3,30),RECTAX(4,30)
      DIMENSION CO(3,2,100)
      DIMENSION JB(2,3)
      Character*80 InFile

! For Watcom Fortran
!       If(nArgs() .le. 1) Then
! For g77
      If(IArgC() .lt. 1) Then
         Write(*, '(a)') ' ******  Fatal Error ******'
         Write(*, '(a)') '  Input file must be specified'
         Stop 9999
      EndIf
! For Watcom Fortran
!       Call GetArg(1, InFile, iStat)
! For g77
       Call GetArg(1, InFile)
      OPEN(1,FILE=InFile,iostat=ISO,STATUS='OLD')

      READ(1,*)
      READ(1,*) IL,NGEN,INV
      CALL TSPACE(IL)
      DO 1 I=1,NGEN
      READ(1,*) JA,((JB(J,K),J=1,2),K=1,3)
      CALL TSGENR(JA,JB)
    1 CONTINUE
      CALL TSPGRP(INV)
      CALL TSPGDS
      READ(1,*) A,B,C
      READ(1,*) CA,CB,CC
      CALL TSLATC(A,B,C,CA,CB,CC)
      CALL TSBZEG(NRECPT,RECTAX,NRP,CO,NLIN)
      WRITE(6,901)
  901 FORMAT(/' RECIPROCAL LATTICE VECTOR FOR THE B.Z. FORMATION'
     &       /' UNIT IS A*, X-AXIS//A* Y-AXIS IS IN A* B* PLANE')
      WRITE(6,902)
  902 FORMAT('  NO ','   A* B* C*',
     &     '   RECTANGULAR COORDINATE',7X,'LENGTH')
      DO 41 J=1,NRP
      WRITE(6,900) J,(NRECPT(I,J),I=1,3),(RECTAX(I,J),I=1,4)
  900 FORMAT(I4,2X,3I3,4F10.5)
   41 CONTINUE
      WRITE(6,*) ' BRILLOUIN ZONE EDGES' 
      DO 31 J=1,NLIN
      WRITE(6,903) J,((CO(K,I,J),K=1,3),I=1,2)
  903 FORMAT(1H ,I4,' FROM(',3F9.5,') TO(',3F9.5,')')
   31 CONTINUE
      pause
      STOP
      END
