      PARAMETER    (NSIZE=200)
      COMMON /DFMACH/ ISCDEF,ICDDEF,IDTDEF,IDODEF,IDCDEF,IFRDEF,NRC,
     $                NATTEN,STEPDG,ICADSL,ICADSW
      CHARACTER       DFTYPE*5,DFMODL*5
      COMMON /DFMACC/ DFTYPE,DFMODL
      COMMON /ANGLE/  THETA,PHI,CHI,OMEGA,RTHETA,ROMEGA,RPHI,RCHI,
     $                DTHETA,DOMEGA,DCHI,THEMAX,THEMIN,PSI,DPSI,PSIMAX,
     $                PSIMIN,R(3,3),ROLD(3,3),IVALID,WAVE,IROT,DEG,DPHI
      COMMON /REFLEC/ IH,IK,IL,IH0,IK0,IL0,IHMAX,IKMAX,ILMAX,NREF,
     $                IOH(NSIZE),IOK(NSIZE),IOL(NSIZE),ITRUE
      COMMON /SYMTRY/ NSYM,ICENT,LATCEN,LAUENO,NAXIS,
     $                SGSYMB(10),JHKL(3,24),JRT(3,4,24)
      COMMON /INTENS/ IHK(10),ILA(10),BCOUNT(10),BBGR1(10),BBGR2(10),
     $                BTIME(10),BPSI(10),NREFB(10),PRESET,COUNT,BGRD1,
     $                BGRD2,NATT,AS,BS,CS,PA,PM,QTIME,TMAX,AFRAC,
     $                ATTEN(6)
      COMMON /PROFL/  ACOUNT(10*NSIZE),D12,ILOW,IHIGH,IDEL,IWARN,SUM,
     $                FRAC1,IPRFLG,IAUTO,STEPOF,FRAC,PJUNK(9),NPK
      COMMON /CUTOFF/ ISYS,SINABS(6),ILN,DELAY,STEP,IUPDWN,ISTOP,
     $                CJUNK(8)
      COMMON /CELL/   SR(3,3),SSG(3,3),GI(3,3),AP(3),APS(3),SANGS(3),
     $                CANGS(3),SANG(3),CANG(3)
      COMMON /SEGS/   IFSHKL(3,3),NDH(3,3),IHO(8),IKO(8),ILO(8),
     $                IDH(8,3,3),ISEG,NCOND,ICOND(5),IHS(5),IKS(5),
     $                ILS(5),IR(5),IS(5),NSEG,NMSEG,IND(3),NUMDH,NSET
      COMMON /IODEVS/ ITP,ITR,LPT,LPTX,NB,NBLOCK,ISD,IID,
     $                IBYLEN,IPR,NPR,IIP
      COMMON /IOUASS/ IOUNIT(10)
      CHARACTER*132   COUT(20)
      COMMON /IOUASC/ COUT 
      COMMON /STAN/   NSTAN,NMSTAN,ISTAN,NN,IHSTAN(6),IKSTAN(6),
     $                ILSTAN(6),NINTRR,NINTOR,IORNT,REOTOL,NREFOR
      COMMON /FLAGS/  ITYPE,KQFLAG,KQFLG2,IBSECT,ISCAN,IPRVAL,IUMPTY
      COMMON /TRANS/  BLINDR(3,3),TMATS(3,3,20),IFSYS(20),IFMODE(20),
     $                NTMATS
      COMMON /JUNKS/  JA(8),JB(8),JC(8),JMIN(8),JMAX(8)
      COMMON /INFREE/ IFREE(20),RFREE(20),ICFLAG
      CHARACTER OCHAR*100,KI*2,ANS*1
      COMMON /FREECH/ OCHAR
      COMMON /POINTR/ KI,ANS
      CHARACTER IDNAME*40,DSNAME*40,DDNAME*40,STATUS*2,PRNAME*40
      COMMON /FNAMES/ IDNAME,DSNAME,DDNAME,STATUS,PRNAME
      COMMON /REGIST/ ISREG(10)
      COMMON /SCRTCH/ SIGMA(7),SIGSQ(7),LAUE,NUMD,IAXIS
      CHARACTER       WIN1BF*80
      COMMON /CWIND1/ WIN1BF(3)
      COMMON /FWIND1/ IWNCUR
      DIMENSION PROF(520),CUT(20)
      EQUIVALENCE (ACOUNT(1),PROF(1)),(CUT(1),ISYS)
      INTEGER XOPEN,XCLOSE,XMOVE,XDRAW,XCLEAR,XTEXT,XSCROL,XWIN,
     $        XTDEL  
      PARAMETER (XOPEN  = 1, XCLOSE = 2, XMOVE  = 3, XDRAW  = 4,
     $           XCLEAR = 5, XTEXT  = 6, XSCROL = 7, XWIN   = 8,
     $           XTDEL  = 9)
