File: grtrml.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 (39 lines) | stat: -rw-r--r-- 1,114 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
34
35
36
37
38
39

C*GRTRML -- get name of user's terminal (VMS)
C+
      SUBROUTINE GRTRML(STRING, L)
      CHARACTER*(*) STRING
      INTEGER L
C
C Return the device name of the user's terminal, if any. In VMS, the
C name of the terminal is found by translating and expanding the
C logical name TT.
C
C Arguments:
C  STRING : receives the terminal name, truncated or extended with
C           blanks as necessary.
C  L      : receives the number of characters in STRING, excluding
C           trailing blanks. If there is not attached terminal, 
C           zero is returned.
C--
C 19-Jan-1988
C-----------------------------------------------------------------------
      INTEGER LIB$GETDVI
      INTEGER I, IER
      EXTERNAL DVI$_FULLDEVNAM
C
      STRING = ' '
      IER = LIB$GETDVI(%LOC(DVI$_FULLDEVNAM), , 'TT:', ,
     1                 STRING, L)
      IF (IER.NE.1 .OR. L.LT.1 .OR. STRING.EQ.' ') THEN
          L = 0
          STRING = ' '
      ELSE
          DO 10 I=L,1,-1
              L = I
              IF (STRING(I:I).NE.' ') GOTO 20
   10     CONTINUE
          L = 0
   20     CONTINUE
      END IF
      END