      Program wavlst                                                    WAVL001
c ----------------------------------------------------------------------WAVL002
c     list X-ray edges and energies                                     WAVL003
c ----------------------------------------------------------------------WAVL004
c     This program module is part of the PhysiSoft X-ray Library        WAVL005
c     and may not be sold or reproduced for commercial purposes.        WAVL006
c     Although it has been tested carefully, there is no warranty       WAVL007
c     regarding accuracy or freedom from side-effects.                  WAVL008
c                   (C) 1986-1990 Bernhard Rupp                         WAVL009
c ----------------------------------------------------------------------WAVL010
      parameter (ipr=6)                                                 WAVL011
      character isym*2,lv,icomp*4                                       WAVL012
      logical exists                                                    WAVL013
                                                                        WAVL014
c --- look for SEXIE configuration file and read the computer type --   WAVL015
      inquire (file='SEXIE.CFG',exist=exists)                           WAVL016
      if (exists) then                                                  WAVL017
         open (4,file='SEXIE.CFG',status='old')                         WAVL018
         do 8808 i=1,7                                                  WAVL019
 8808       read (4,'(8x,a4)') icomp                                    WAVL020
         read(4,'(8x,a4)')   icomp                                      WAVL021
         call upstrg (icomp,4)                                          WAVL022
         close(4,status='keep')                                         WAVL023
      else                                                              WAVL024
         write (*,'(/a)') '  Cannot find configuration file SEXIE.CFG'  WAVL025
         write (*,*) ' Resume with 7-bit TTY terminal character set'    WAVL026
         icomp  = '7BIT'                                                WAVL027
      end if                                                            WAVL028
                                                                        WAVL029
c --- character set for screen output --                                WAVL030
      if (icomp.eq.'IBM ') then                                         WAVL031
         lv=char(179)                                                   WAVL032
      else                                                              WAVL033
         lv='|'                                                         WAVL034
      end if                                                            WAVL035
                                                                        WAVL036
      open (unit=ipr+1,file='wavelist.out',status='unknown')            WAVL037
      call clrscr (icomp)                                               WAVL038
      call wavhed (ipr,icomp,lv)                                        WAVL039
      call wavhed (ipr+1,icomp,lv)                                      WAVL040
      do 0001 i=1,103                                                   WAVL041
         call isymbl (i,isym)                                           WAVL042
         call makels (isym)                                             WAVL043
         aw =atweit(i)                                                  WAVL044
         ek=energy(i,1,1)*1000                                          WAVL045
         el1=energy(i,2,1)*1000                                         WAVL046
         el2=energy(i,2,2)*1000                                         WAVL047
         el3=energy(i,2,3)*1000                                         WAVL048
         do 0002 j=ipr,ipr+1                                            WAVL049
            write(j,'(1x,a1,3x,a3,4x,i3,4x,f8.3,4f12.1,4x,a1)')         WAVL050
     &             lv,isym,i,aw,ek,el1,el2,el3,lv                       WAVL051
            if (i.eq.53.and.j.eq.ipr+1) then                            WAVL052
               call frames(j,3,icomp)                                   WAVL053
               write (j,'(a1)') char(12)                                WAVL054
               call wavhed (j,icomp,lv)                                 WAVL055
            end if                                                      WAVL056
 0002    continue                                                       WAVL057
 0001 continue                                                          WAVL058
      call botlin(ipr,icomp,lv)                                         WAVL059
      call botlin(ipr+1,icomp,lv)                                       WAVL060
      close(7,status='keep')                                            WAVL061
      end                                                               WAVL062
                                                                        WAVL063
      subroutine wavhed (ipr,icomp,lv)                                  WAVH001
c -----------------------------------                                   WAVH002
c     Table header WAVELIST                                             WAVH003
c -----------------------------------                                   WAVH004
      character lv,icomp*4                                              WAVH005
      call frames (ipr,1,icomp)                                         WAVH006
      write(ipr,'(1x,a1,21x,a,21x,a1)')                                 WAVH007
     & lv,' X-Ray K- and L-Edge Energies, eV  ',lv                      WAVH008
      call frames (ipr,2,icomp)                                         WAVH009
      write(ipr,'(1x,a1,1x,a,a,4x,a1)')lv,' Element   Z   Atomic Weigh',WAVH010
     & 't   K-Edge        L1          L2          L3 ',lv               WAVH011
      call frames (ipr,2,icomp)                                         WAVH012
      return                                                            WAVH013
      end                                                               WAVH014
                                                                        WAVH015
      subroutine botlin (ipr,icomp,lv)                                  BOTL001
c -----------------------------------                                   BOTL002
c     bottom line for WAVELIST                                          BOTL003
c -----------------------------------                                   BOTL004
      character lv,icomp*4                                              BOTL005
      call frames (ipr,2,icomp)                                         BOTL006
      write(ipr,'(1x,a1,1x,a,13x,a1)') lv,                              BOTL007
     & ' Source: J.A.Bearden and A.F.Burr, Rev.Mod.Phys. 39, 125 (1967)'BOTL008
     &,lv                                                               BOTL009
      call frames (ipr,3,icomp)                                         BOTL010
      return                                                            BOTL011
      end                                                               BOTL012
