Path: utzoo!attcan!uunet!yale!cmcl2!acf4!mcqueen From: mcqueen@acf4.NYU.EDU (David M. McQueen) Newsgroups: comp.sys.sgi Subject: Re: FORTRAN System Interface Routine Library Message-ID: <17280021@acf4.NYU.EDU> Date: 19 Oct 89 13:17:00 GMT References: Organization: New York University Lines: 31 c c this fragment determines what type of terminal you are logged in on c using the getenv routine. the purpose is to prevent inadvertently c running graphics when you are not (and somebody else is) at the c IRIS console. this may not be elegant, but it works. c character*80 terminal c do 101 iterm=1,80 terminal(iterm:iterm) = ' ' 101 continue call getenv('TERM',terminal) if (terminal .ne. 'iris-ansi') then do 103 iterm=1,80 lterm = iterm if (terminal(iterm:iterm) .eq. ' ') go to 104 103 continue 104 lterm = lterm - 1 if (lterm .lt. 10) then write(fm,111) lterm else write(fm,112) lterm end if 111 format('(a',i1,',a52)') 112 format('(a',i2,',a52)') write(6,*) write(6,fm) terminal(1:lterm), c ' is an inappropriate terminal type for IRIS graphics' write(6,*) stop end if