[comp.os.vms] terminal width

dahls%vax.elab.unit.uninett@TOR.NTA.NO (J|rn Yngve Dahl-Stamnes) (04/30/88)

How can I find the terminal width from a program?
To find the terminal page size is no problem (dvi$_tt_page), so why
is there not any dvi$_tt_width?

  +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
  ! The University of Trondheim           ! Joern Yngve Dahl-Stamnes  !
  ! The Norwegian Institute of Technology ! System Manager            !
  ! Division of Physical Electronics      !                           !
  ! N 7034 Trondheim, Norway              !                           !
  !---------------------------------------+---------------------------!
  !             dahls%vax.elab.unit.uninett@tor.nta.no                !
  !------->>>>>>>>  "t'nia stnatsnoc ,t'now selbairaV"  <<<<<<<<------!
  +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+

jdc@beach.cis.ufl.edu (Jeff Capehart) (05/06/88)

If I remember correctly, the terminal width is only available through
the status buffer (just like baud rate) when chatting with a device
such as a terminal, using the $QIO function.  I have a little program
which returns the baud rate of a terminal into a global symbol, and
I am sure if could be adapted to return the terminal width also.

--
Jeff Capehart 		Internet: jdc@beach.cis.ufl.edu
University of Florida	UUCP:   ..!ihnp4!codas!uflorida!beach.cis.ufl.edu!jdc	

sdowdy@charon.unm.edu (Stephen Dowdy) (05/07/88)

In article <15403@uflorida.cis.ufl.EDU> jdc@beach.cis.ufl.edu (Jeff Capehart) writes:
>If I remember correctly, the terminal width is only available through
>the status buffer (just like baud rate) when chatting with a device
>such as a terminal, using the $QIO function.  I have a little program
>which returns the baud rate of a terminal into a global symbol, and
>I am sure if could be adapted to return the terminal width also.
>--
>Jeff Capehart 		Internet: jdc@beach.cis.ufl.edu
>University of Florida	UUCP:   ..!ihnp4!codas!uflorida!beach.cis.ufl.edu!jdc	

This may be a fluke, but i once wrote a DCL Screen package, and needed to
know wether the term was in 80 or 132 column mode.  Turned out that a
F$GetDVI("TT:","DEVBUFSIZ") returned the terminal width.

--stephen dowdy
P.S. "Screen Package in *DCL*!  Yuck!".  It's the challenge.  Now, to
write a screen editor...
-- 
$!#######################################################################
$! stephen dowdy (UNM CIRT) Albuquerque, New Mexico, 87131 (505) 277-8044
$! Usenet:   {convex,ucbvax,gatech,csu-cs,anl-mcs}!unmvax!charon!sdowdy
$! BITNET:   sdowdy@unmb
$! Internet: sdowdy@ariel.unm.edu
$!      Team SPAM in '88!            SPAAAAAAAAAAAAAAAAAAAAMMMMMMM!
$!#######################################################################

leres@ucbarpa.Berkeley.EDU (Craig Leres) (05/07/88)

You can use DVI$_DEVBUFSIZ to learn the number of columns the system
thinks a terminal has. This is documented (but perhaps not well
documented).

It pays to read the entire 16 pages of documentaion on sys$getdvi()...

		Craig

GG.SPY@ISUMVS.BITNET ("John Hascall") (07/03/88)

> Date:         Sat, 30 Apr 88 16:18:00 +0100
> Sender:       INFO-VAX Discussion <INFO-VAX@UBVM>
> From:         J|rn Yngve Dahl-Stamnes <dahls%vax.elab.unit.uninett@TOR.nta.no>
> Subject:      terminal width
> Comments: To: info-vax@kl.sri.com
> To:           John Hascall <GA.JPH@ISUMVS>
>
> How can I find the terminal width from a program?
> To find the terminal page size is no problem (dvi$_tt_page), so why
> is there not any dvi$_tt_width?
>

    You can use SYS$QIOW(func=IO$_SENSEMODE) see the I/O user's guide Vol.1

MCGUIRE@GRIN1.BITNET ("The Sysco Kid ", McGuire,Ed) (07/05/88)

Joern,

The $GETDVI item code for the terminal width is DVI$_DEVBUFSIZ.  This code
returns the device buffer size.  The terminal's width is defined by its buffer
size.  This is documented in the $GETDVI section of the System Services
Reference Manual.

Ed