      subroutine xtlsys (cel,isystm,iortho)                             XTLS001
c ----------------------------------------------------------------------XTLS002
c     This program module is part of the author's X-ray Library         XTLS003
c     and may not be sold or reproduced for commercial purposes.        XTLS004
c     Although it has been tested carefully, there is no warranty       XTLS005
c     regarding accuracy or freedom from side-effects.                  XTLS006
c                   (C) 1986-1994 Bernhard Rupp                         XTLS007
c ----------------------------------------------------------------------XTLS008
c     XTLSYS computes crystal system from cell constants                XTLS009
c ----------------------------------------------------------------------XTLS010
      dimension cel(6)                                                  XTLS011
                                                                        XTLS012
      iortho=0                                                          XTLS013
      if (cel(6).eq.120.0) then                                         XTLS014
         isystm=6                                                       XTLS015
      elseif ((cel(5).ne.90.and.cel(6).ne.90).or.cel(4).ne.90) then     XTLS016
         isystm=7                                                       XTLS017
      elseif (cel(5).ne.90) then                                        XTLS018
         isystm=1                                                       XTLS019
      elseif (cel(3).eq.cel(1)) then                                    XTLS020
         isystm=5                                                       XTLS021
         iortho=1                                                       XTLS022
      elseif (cel(1).eq.cel(2)) then                                    XTLS023
         isystm=4                                                       XTLS024
         iortho=1                                                       XTLS025
      else                                                              XTLS026
         isystm=2                                                       XTLS027
         iortho=1                                                       XTLS028
      end if                                                            XTLS029
      return                                                            XTLS030
      end                                                               XTLS031
                                                                        XTLS032
                                                                        XTLS033
