      logical function crt

      include    'swing.cmn'
      include    '($dvidef)'
      include    '($ttdef)'
      include    '($tt2def)'

	integer linest
	common /length/ linest

      integer*2  b2(20)
      integer*4  b4(10), buf, len_buf, sys$trnlog, sys$getdviw, dev_type
      integer*4  len_dev_type, len_linest
      logical*4  for$bjtest, istat

      equivalence ( b4(1), b2(1) )

      b2(1) = 4
      b2(2) = dvi$_devdepend2
      b4(2) = %loc( buf )
      b4(3) = %loc( len_buf )

      b2(7) = 4
      b2(8) = dvi$_devtype
      b4(5) = %loc( dev_type )
      b4(6) = %loc( len_dev_type )

      b2(13) = 4
      b2(14) = dvi$_tt_page
      b4(8) = %loc( linest )
      b4(9) = %loc( len_linest )

      b4(10) = 0

      istat = sys$getdviw( ,, 'SYS$COMMAND', b4,,,, )

      crt      = ( for$bjtest( buf, tt2$v_deccrt ) .or. 
     .                            dev_type .eq. tt$_vt52 )
      avo      = for$bjtest( buf, tt2$v_avo )

      return
      end      
