      CHARACTER*6  SCHNAM
      CHARACTER*10 HMNAME
      Character*80 arg, GENERATORPath
      Integer ISPG, NC

! For Watcom Fortran
!      If(nArgs() .le. 1) Then
! For g77
      If(IArgC() .lt. 1) Then
        Write(*, '(a)') ' ******  Fatal Error ******'
        Write(*, *) ' Index of Lattice System (1 - 230) must ',
     1               'be specified'
        Stop 9999
      EndIf
! For Watcom Fortran
!      Call GetArg(1, arg, iStat)
! For g77
      Call GetArg(1, arg)
      Read(arg,*) ISPG

      If(IArgC() .ge. 2) Then
        Call GetArg(2, GENERATORPath)
      Else
        GENERATORPath = 'generator'
      EndIf

      OPEN(3,FILE=GENERATORPath,IOSTAT=ISO,STATUS='OLD')
      WRITE(6,*) 'ISO=', ISO, ' should be 0.'
C      pause
      IF(ISO.NE.0) STOP

       CALL TSNTNM(ISPG,3,NC,SCHNAM,HMNAME)
       DO 2 IC=1,NC
         CALL TSPNGE(ISPG,IC,3)
c         CALL TSPGDS
    2 continue
      CLOSE(3)

      END
