| 1 |
C Copyright(C) 1999-2020 National Technology & Engineering Solutions |
| 2 |
C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
C NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
C |
| 5 |
C See packages/seacas/LICENSE for details |
| 6 |
|
| 7 |
C======================================================================= |
| 8 |
SUBROUTINE GRSDEV (INDEV) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** GRSDEV *** (GRPLIB) Select device |
| 12 |
C -- Written by Amy Gilkey, revised 08/24/87 |
| 13 |
C -- |
| 14 |
C --GRSDEV selects a device and changes all the device parameters. |
| 15 |
C -- |
| 16 |
C --Parameters: |
| 17 |
C -- INDEV - IN - the device to be selected |
| 18 |
C -- |
| 19 |
C --Common Variables: |
| 20 |
C -- Uses ICURDV, DEVOK, IFONT, NUMCOL of /GRPCOM/ |
| 21 |
C -- Sets ICURDV of /GRPCOM/ |
| 22 |
|
| 23 |
C --Routines Called: |
| 24 |
C -- GRCOLT - (GRPLIB) Set color table |
| 25 |
C -- GRFONT - (GRPLIB) Set font |
| 26 |
|
| 27 |
PARAMETER (KDVDI=10000) |
| 28 |
|
| 29 |
include 'grpcom.blk' |
| 30 |
|
| 31 |
C --If the device number is not given, choose the first available device |
| 32 |
IF ((INDEV .NE. 1) .AND. (INDEV .NE. 2)) THEN |
| 33 |
IF (DEVOK(1)) THEN |
| 34 |
IDEV = 1 |
| 35 |
ELSE |
| 36 |
IDEV = 2 |
| 37 |
END IF |
| 38 |
ELSE |
| 39 |
IDEV = INDEV |
| 40 |
END IF |
| 41 |
|
| 42 |
C --Skip if invalid parameter |
| 43 |
IF (.NOT. DEVOK(IDEV)) GOTO 100 |
| 44 |
|
| 45 |
C --Skip if device already selected |
| 46 |
IF (IDEV .EQ. ICURDV) GOTO 100 |
| 47 |
|
| 48 |
C --Turn off old device and turn on new device |
| 49 |
CALL VDESCP (KDVDI + IDEV, 0, 0) |
| 50 |
|
| 51 |
ICURDV = IDEV |
| 52 |
|
| 53 |
C --Set color table |
| 54 |
CALL GRCOLT |
| 55 |
|
| 56 |
C --Set font |
| 57 |
CALL GRFONT (IFONT(ICURDV)) |
| 58 |
|
| 59 |
C --Set number of frames to snap |
| 60 |
CALL GRSNAP ('INIT', ICURDV) |
| 61 |
|
| 62 |
C --Set line widths |
| 63 |
CALL GRLWID |
| 64 |
|
| 65 |
C --Reset the single hardcopy flag if terminal device selected |
| 66 |
IF (ICURDV .EQ. 1) ISHARD = .FALSE. |
| 67 |
|
| 68 |
100 CONTINUE |
| 69 |
RETURN |
| 70 |
END |