File: grchkt.f

package info (click to toggle)
pgplot5 5.2.2-19.3
  • links: PTS
  • area: non-free
  • in suites: buster, stretch
  • size: 7,136 kB
  • ctags: 6,763
  • sloc: fortran: 39,792; ansic: 22,549; objc: 1,534; sh: 1,298; makefile: 385; perl: 234; pascal: 233; tcl: 190; awk: 51; csh: 25
file content (33 lines) | stat: -rw-r--r-- 934 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
C*GRCHKT -- determine whether a device is a terminal (VMS)
C+
      INTEGER FUNCTION GRCHKT (TERM)
      CHARACTER*(*) TERM
C
C Argument:
C  TERM (input): the name of the device according to VMS
C       conventions, ie a physical device name (_TTA4:) or a logical
C       name.
C
C Returns:
C  GRCHKT (integer): a TRUE value (odd) if TERM is a terminal device,
C       a FALSE value otherwise.
C--
C  1-Feb-1983
C 24-Jan-1986 - use LIB$GETDVI [TJP].
C-----------------------------------------------------------------------
      INTEGER   DC$_TERM, DVI$_DEVCLASS
      PARAMETER (DC$_TERM=66)
      PARAMETER (DVI$_DEVCLASS=4)
C
      INTEGER  DEVCLASS, IER, LIB$GETDVI
C
      IER = LIB$GETDVI(DVI$_DEVCLASS, , TERM, DEVCLASS)
      IF (IER.NE.1) THEN
          GRCHKT = IER
      ELSE IF (DEVCLASS.EQ.DC$_TERM) THEN
          GRCHKT = 1
      ELSE
          GRCHKT = 4828 ! "input device is not a terminal"
      END IF
C
      END