program wdsref c c This program reads the file wdsref.memo and converts c it to html by adding links and header info. c character*1 junk,ref2 character*7 ref1 character*117 data character*125 data1 character*110 header c open(10,file='../Catalog/wdsref.memo',status='UNKNOWN') open(11,file='wdsref.header',status='UNKNOWN') open(12,file='wdsref.html',status='UNKNOWN') open(13,file='wdsref.body',status='UNKNOWN') open(14,file='wdsref.txt',status='UNKNOWN') c c read header lines from wdsref.memo c do 100 n=1,9 read(10,901) data1 901 format(a125) if (n .ne. 3) write(14,901) data1 100 continue c c write header lines for wdsref.body c write(13,902) 902 format(''/''/'

'/'
')
c
c	read and write header lines for html file
c
  200	read(11,903,end=300) header
  903	format(a110)
  	write(12,903) header
	go to 200
c
c	read each reference line. If first column contains a
c	reference code, make it a link. Reformat slightly
c	for output (extra space, remove DM ref code)
c
  300	read(10,904,end=500) data1,ref1,ref2,data
  904	format(a125,t6,a7,a1,a117)
c
        if (ref1 .eq. '=======') go to 500
        write(14,901) data1
c
	if (ref1 .eq. '       ') write(12,905) data
	if (ref1 .eq. '       ') write(13,905) data
  905	format(8x,a117)
c
	if ((ref1 .ne. '       ') .and. (ref2 .eq. ' '))
     $     write(12,906) ref1,ref1,ref2,data
	if ((ref1 .ne. '       ') .and. (ref2 .eq. ' '))
     $     write(13,906) ref1,ref1,ref2,data
  906	format('',a7,a1,'',a117)
c
	if ((ref1 .ne. '       ') .and. (ref2 .ne. ' '))
     $     write(12,907) ref1,ref2,ref1,ref2,data
	if ((ref1 .ne. '       ') .and. (ref2 .ne. ' '))
     $     write(13,907) ref1,ref2,ref1,ref2,data
  907	format('',a7,a1,'',a117)
c
	go to 300
c
  500	write(12,908)
  908	format('
') write(13,909) 909 format(''/'') c 999 stop end