subroutine linkfile(iuser) character tmpfile*64 character*200 command C Generate a temporary file name linked to the PostScript output. This is C necessary (to have a new file name) so the browser doesn't just use C the cached version write(tmpfile,'(i10.10,''.ps'')') time() write(command,200) iuser, tmpfile(1:13) 200 format('ln -fs /tmp/temp',i2.2, '.ps /httpd/html/tmp/',a) istat = system(command) C Provide the HTML link to the PostScript file print 101, tmpfile 101 format(' Postscript (better quality) . (Expires in 3 minutes)

') C Now generate the JPG file C if (havecolor) then write(command,201) iuser, iuser 201 format('/usr/X11R6/bin/convert -rotate 90 /tmp/temp',i2.2, & '.ps /tmp/temp',i2.2,'.jpg >&/dev/null') istat = system(command) C else C write(command,202) iuser, iuser C202 format('/usr/X11R6/bin/convert -monochrome -rotate 90 /tmp/temp',i2.2, C & '.ps /tmp/temp',i2.2,'.jpg >&/dev/null') C istat = system(command) C end if C Generate the link to the generic JPG file with a unique name (to avoid C caching problems again) write(tmpfile,'(i10.10,''.jpg'')') time() write(command,203) iuser, tmpfile(1:14) 203 format('ln -fs /tmp/temp',i2.2,'.jpg /httpd/html/tmp/',a) istat = system(command) C Provide the HTML link to the JPG file print 102, tmpfile 102 format('') C Remove the lock file write(command,204) iuser 204 format('echo rm -f /tmp/lock',i2.2,' | at now+3minutes') istat = system(command) return end