C
C     INCLUDE 'writ.inc'
C     ------------------------------------------------------------------
      INTEGER MF
      PARAMETER (MF=64)
      CHARACTER*80 TEXTW
      CHARACTER*16 FN1A,FN2A,FN3A,FN1I,FN2I,FN3I,FNB(MF),FN1C,FN2C,FN3C
      CHARACTER*16 FN1T,FN2D(MF)
      COMMON/WRITT/TEXTW,FN1T,
     *             FN1A,FN2A,FN3A,FN1I,FN2I,FN3I,FNB,FN1C,FN2C,FN3C,FN2D
      SAVE /WRITT/
C     ..................................................................
      INTEGER K2P,ISRC,JWAVE,JRAY,JUEB,JFCT,JOUTP,JTRANS
      INTEGER KWRIT1,KWRIT2,KWRIT3,NF1,NF2,NF3,MF3,NUW,MENDR
      PARAMETER (NUW=16)
      PARAMETER (MENDR=18)
      PARAMETER (MTMP=1024)
      INTEGER LUW(NUW),JPOINT(NUW),JSTOR(NUW)
      INTEGER JENDR(MENDR),NENDR(MENDR+2),KTMP(6,MTMP)
      REAL TMP(42,MTMP)
      COMMON/WRITC/K2P,ISRC,JWAVE,JRAY,JUEB,JFCT,JOUTP,JTRANS,KWRIT1,
     *             KWRIT2,KWRIT3,NF1,NF2,NF3,MF3,LUW,JPOINT,JSTOR,JENDR,
     *             NENDR,NTMP,KTMP,TMP
      SAVE /WRITC/
C     ..................................................................
      CHARACTER*16 NAME2(NUW)
      COMMON/WRITN/NAME2
      SAVE /WRITN/
C     ------------------------------------------------------------------
C     TEXTW...The name of the data set. String of 80 characters.
C     FN1A,FN2A,FN3A,FN1I,FN2I,FN3I,FNB(MF),FN1C,FN2C,FN3C,FN1T...
C             Storage locations for the input data (3) to (6).
C             The common block /WRITT/ is used just in the subroutine
C             WRIT1.
C
C     K2P...  If non-zero, only two-point rays are written.
C     ISRC... Index of the source.  The sources are indexed by positive
C             integers, see input file SRC.
C     JWAVE...Index of the current elementary wave.
C     JRAY... Index of the current ray.
C     JUEB... Count of rays exceeding the specified upper bounds of the
C             checked quantities.
C     JFCT... Total number of invocations of the subroutine FCT.
C     JOUTP...Total number of steps of the numerical integration.
C     JTRANS..Total number of invocations of the subroutine TRANS.
C     KWRIT1,KWRIT2,KWRIT3... Numbers of initial ray elements along
C             which nothing is stored in the subroutines WRIT31, WRIT32
C             and WRIT33, respectively.
C     NF1...  Number of open files, see the input data (3) and the
C             subroutine WRIT31.
C     NF2...  Number of open files, see the input data (4) and the
C             subroutine WRIT32.
C     NF3...  Number of open files, see the input data (5) and the
C             subroutine WRIT33.
C     MF3...  Number of files corresponding to the current elementary
C             wave, see the input data (5) and the subroutine WRIT33.
C     NUW...  The maximum count of available logical unit numbers.
C     LUW...  List of the logical unit numbers corresponding to the
C             output files.
C     JPOINT..Array containing numbers of points stored into the files.
C     JSTOR(I)... The number of crosssections of the computed ray with
C             the surface KSTOR(I).  Because, for the structural
C             interfaces, the positive or negative side of the surface
C             is specified, either zero or two crosssections correspond
C             to the reflection from the surface KSTOR(I).
C     MENDR...Total number of distinct reasons of the termination of the
C             computation of the ray, see subroutine RAY2 of the file
C             'ray.for' and subroutine INIT2 of the file 'init.for'.
C     JENDR...List of the indices corresponding to distinct reasons of
C             the termination of the computation of the ray, see
C             subroutine RAY2 of the file 'ray.for' and subroutine INIT2
C             of the file 'init.for'.
C     NENDR...NENDR(I),I=1,MENDR... Number of rays terminated for the
C               reason JENDR(I).
C             NENDR(MENDR+1)... Number of rays terminated for the reason
C               not listed in the array JENDR.
C             NENDR(MENDR+2)... Total number of computed rays of the
C               current elementary wave.
C
C     NAME2...List of the names of the open files.
C
C Date: 2001, January 19
C Coded by Ludek Klimes
C
C=======================================================================
C