h12615
s 00726/00000/00000
d D 1.1 83/03/17 15:44:08 tes 1 0
c date and time created 83/03/17 15:44:08 by tes
e
u
4
U
t
T
I 1
#-h-  ddv185.c            local   06/27/82  14:07:03
#-h-  ddv185.rat          local   01/20/82  09:30
subroutine ddv185 (contrl, intin, rlin, intout, rlout)
########################################################################
#                                                                      #
#          THIS MATERIAL IS CONFIDENTIAL AND IS FURNISHED UNDER        #
#          A WRITTEN LICENSE AGREEMENT.  IT MAY NOT BE USED,           #
#          COPIED OR DISCLOSED TO OTHERS EXCEPT IN ACCORDANCE          #
#          WITH THE TERMS OF THAT AGREEMENT.                           #
#                                                                      #
#          COPYRIGHT (C) 1982 GRAPHIC SOFTWARE SYSTEMS INC.            #
#          ALL RIGHTS RESERVED.                                        #
#                                                                      #
#     Function: GSS-CORE device driver for VT185 terminal              #
#                                                                      #
#     Input Parameters:                                                #
#            contrl(1-3) - An integer array with following information #
#                          contrl(1) - opcode for driver function      #
#                          contrl(2) - length of integer array intin   #
#                          contrl(3) - length of real input array rlin #
#                                                                      #
#            intin   -     Array of integer input parameters           #
#                                                                      #
#            rlin    -     Array of real input parameters              #
#                                                                      #
#     Output Parameters:                                               #
#            contrl(4-6) - contrl(4) - length of integer array intout  #
#                          contrl(5) - length of integer array rlout   #
#                          contrl(6) - count of any other control parms#
#                                                                      #
#             rlout  -     Array of integer output parameters          #
#                                                                      #
#     Routines Called:                                                 #
#             Drv185 - move/draw for VT185 terminal                    #
#             gdevot - put out a character to the device               #
#             gdstot - put out a character string to the device        #
#             dcv185 - color changing on VT185  terminal               #
#             dmv185 - emulate markers for VT185 terminal              #
#             itoch  - convert integer to character string             #
#             gimnmx - bounds checking function for integers           #
#             cnvclr - convert RGB color to HLS                        #
#             gdevin - get a character from the graphics device        #
#                                                                      #
########################################################################
 
include mgsdef
 
# local defines
define(DEGREE_TO_RAD,.01745328)         # Degrees to radians conversion factor
define(X_LIMITS_VT185,767.)             # Terminal width
define(Y_LIMITS_VT185,479.)             # Terminal heigth
define(OUTLINE,1)                       # Is the polygon outlined?
define(CHAR_CELL_AREA,.0002295)         # Area of basic char cell (sizes 2-16)
define(AREA_SIZE_2,.00091792)           # Area of character size 2
#      SLOWX  1./767.
define(SLOWX,.00130378)                 # X-increment for slow movement
#      FASTX  10./767.
define(FASTX,.0130378)                  # X-increment for fast movement
#      SLOWY  1./767.
define(SLOWY,SLOWX)                     # Y-increment for slow movement
#      FASTY  10./767.
define(FASTY,FASTX)                     # Y-increment for fast movement
define(UP,ENQ)                          # Up arrow key
define(DOWN,CAN)                        # Down arrow key
define(RIGHT,EOT)                       # Right arrow key
define(LEFT,DC3)                        # Left arrow key
define(CHANGE_RATE,EQUALS)              # Equals key
 
integer contrl(1),intin(1),intout(1)
real rlin(1),rlout(1)
 
integer opcode, i, j, len, icnvt(3), gimnmx, solid(5), h, l,
        clr1(7), clr2(2), ringbl(2),
        lstyle(5), setup1(52), setup2(37), stopgr(2), newfrm(4),
        bcolor(5), shade(5), txt1(3), txt2(2), txt3(3), rate
 
real temp, xcoord, ycoord, xy(2), areain, tmpclr(3),
     savex, savey, savexy(2), xincr(2), yincr(2), xtemp, ytemp
 
logical qdone
 
real clv185(4,3)
 
include mgscom
 
common /cmv185/ clv185
 
equivalence (xy(1), xcoord), (xy(2), ycoord)
equivalence (savexy(1), savex) , (savexy(2), savey)
 
data xincr  / SLOWX, FASTX/
data yincr  / SLOWY, FASTY/
 
#             Ring the bell
data ringbl / BELL, NEWLINE/
 
#             First part of define color command - S(M<index> (L
data clr1   / BIGS, LPAREN, BIGM, DIG0, BLANK, LPAREN, BIGL/
 
#             Second part of define color command - ))
data clr2   / RPAREN, RPAREN/
 
#            Line style    W(P<style>)
data lstyle /BIGW, LPAREN, BIGP, DIG1, RPAREN/
 
#            Set a solid line style   W(P1)
data solid /BIGW, LPAREN, BIGP, DIG1, RPAREN/
 
#
#            Set up -
#               Erase alpha plane         <ESC>[2J
#               Enter graphics mode       <ESC>Pp
#               Set replace mode          W(R,
#               Use 2 planes for graphics F,
#               Negative writing off      N0,
#               Shading off               S0,
#               Pattern mulitplier of 2   P(M2))
#               Set window                S(A[0,0] [767,479],
#               Set scale of 1            S1,
#               Set background index of 0 I0,
#               Set time delay of 0       T0)
#               Define color index 0      S(M0 (L0),
#               Define color index 1      M1 (L50),
#               Define color index 2      M2 (L75),
#               Define color index 3      M3 (L25))
#
data setup1 /ESC, LBRACK, DIG2, BIGJ,
             ESC, BIGP, LETP, BIGW, LPAREN, BIGR, COMMA, BIGF, COMMA,
             BIGN, DIG0, COMMA, BIGS, DIG0, COMMA, BIGP, LPAREN, BIGM,
             DIG2, RPAREN, RPAREN,
             BIGS, LPAREN, BIGA, LBRACK, DIG0, COMMA, RBRACK, BLANK,
             LBRACK, DIG7, DIG6, DIG7, COMMA, DIG4, DIG7, DIG9, RBRACK,
             COMMA, BIGS, DIG1, COMMA, BIGI, DIG0, COMMA, BIGT, DIG0, RPAREN/
 
data setup2/ BIGS, LPAREN, BIGM, DIG0, BLANK, LPAREN, BIGL, DIG0, RPAREN,
             COMMA,
             BIGM, DIG1, BLANK, LPAREN, BIGL, DIG5, DIG0, RPAREN, COMMA,
             BIGM, DIG2, BLANK, LPAREN, BIGL, DIG7, DIG5, RPAREN, COMMA,
             BIGM, DIG3, BLANK, LPAREN, BIGL, DIG2, DIG5, RPAREN, RPAREN /
 
#            Stop graphics -  <ESC>\
data stopgr /ESC, BACKSLASH/
 
#            Erase the screen  - S(E)
data newfrm /BIGS, LPAREN, BIGE, RPAREN/
 
#            Change the background color - S(I<index>)
data bcolor /BIGS, LPAREN, BIGI, DIG0, RPAREN/
 
#           Turn shading on or off - W(S<status>)
data shade  / BIGW, LPAREN, BIGS, DIG0, RPAREN/
 
#           First part of text command - T(D
data txt1   / BIGT, LPAREN, BIGD/
 
#           Second part of text command - ,S
data txt2   / COMMA, BIGS/
 
#           Third part of text command - ) "
data txt3   / RPAREN, BLANK, DQUOTE/
 
opcode=contrl(OPCODE)
 
#
#  opcode move and draw
#
if  ((opcode == DRAW) | (opcode == MOVE)) {
   if ((opcode == DRAW) & (ndclrp ~= ndclrl))   { # Change the color
      i = ndclrl
      call dcv185 (i)
      }
   call drv185 (opcode, rlin)
   }
 
#
#  opcode text
#
else if (opcode == TEXT) {
   if (ndclrp ~= ndclrt)  {  # Need to change the color
      i = ndclrt
      call dcv185 (i)
      }
 
   # The VT185 assumes that the current cursor position is the
   # upper left hand corner of the character cell.  Therefore,
   # we must move cursor up the height of a character cell.
 
   temp = DEGREE_TO_RAD * mod (ndtxrt + 90, 360)    # Convert angle to radians
   xcoord = zdxpos + (zdtysz * cos (temp))
   ycoord = zdypos + (zdtysz * sin (temp))
   call drv185 (MOVE, xy)
 
   # The format of a text command is :
   #    T(D<rotation>,S<size>) "<text string>"
 
   call gdstot (3, txt1)
   len = itoch (ndtxrt, icnvt, 3, ierror)           # Output rotation
   call gdstot (len, icnvt)
   call gdstot (2, txt2)
 
   # The text size must be adjusted for 45 degree rotations
 
   i = ndtxsz
   if (mod (ndtxrt, 90) ~= 0) i = max0 (1, ndtxsz-1)
   len = itoch (i, icnvt, 2, ierror)           # Output size
   call gdstot (len, icnvt)
   call gdstot (3, txt3)
   call gdstot (contrl(INTEGER_IN_LENGTH), intin)
   call gdevot (DQUOTE)
   }
 
#
#  opcode marker
#
else if (opcode == MARKER) {
 
     if (ndclrp ~= ndclrm)  {  # Need a different color to do a marker
        i = ndclrm
        call dcv185 (i)
        }
     # Set the line style to be solid
     call gdstot ( 5, solid)
 
     call dmv185 (intin, rlin)
 
     # Restore the users line style
     lstyle (4) = ndlntp
     call gdstot (5, lstyle)
     }
 
#
#  opcode filled bar
#
else if (opcode == BAR_FILL) {
   if ( ndclrf ~= ndclrp )  {  # Need another color for the bar
      i = ndclrf
      call dcv185 (i)
      }
 
   call gdstot (5, solid)    # Set solid lines
   call drv185 (MOVE, rlin(3))
   shade(4) = DIG1           # Turn on shading and use y-coordinate of
   call gdstot (5, shade)    # upper left corner as shading reference line
   call drv185 (MOVE, rlin)  # Move to first point
   xcoord = rlin(3)
   ycoord = rlin(2)
   call drv185 (DRAW, xy)    # Draw base line and fill to shading reference
   shade(4) = DIG0
   call gdstot (5, shade)    # Turn off shading
   lstyle(4) = ndlntp
   call gdstot (5, lstyle)   # Restore line style
   }
 
#
#  opcode set fill color
#
else if (opcode == SET_FILL_COLOR) {
   ndclrf = gimnmx(intin(1), 0, 3)
   intout(1) = ndclrf      # Communicate which pattern was selected
   }
 
#
#  opcode text rotation
#
else if (opcode == CHAR_ROTATION) {
   # Device can rotate in 45 degree multiples
   rlout(1) = int ((rlin(1) + 22.5) / 45.) * 45
   ndtxrt = rlout(1)
   }
 
#
#  opcode text size
#
else if (opcode == TEXT_SIZE) {
   areain = rlin(1) * rlin(2)
   if (areain < AREA_SIZE_2) {
      ndtxsz = 1
      zdtxsz = .011734        # 9.0 / X_LIMITS_VT185
      zdtysz = .0260756       # 20.0 / X_LIMITS_VT185
      }
   else {
      for (i=2; i<=17; i=i+1) { # find closest size
         temp = CHAR_CELL_AREA * i * i
         if (temp > areain) break
         }
      ndtxsz = i - 1
      zdtxsz = .011734 * ndtxsz   # 9.0 / X_LIMITS_VT185 * size
      zdtysz = .0195567 * ndtxsz  # 15.0 / X_LIMITS_VT185 * size
      }
 
   rlout(1) = zdtxsz
   rlout(2) = zdtysz
   }
 
#
#  opcode line style
#
else if (opcode == LINESTYLE) {
   ndlntp  = gimnmx( intin(1), 1, 6)
   intout(1) = ndlntp
   ndlntp = ndlntp + DIG0
   lstyle(4) = ndlntp
   call gdstot (5, lstyle)
   }
 
#
#    opcode new_frame
#
else if (opcode == NEW_FRAME) {
    call gdstot (4, newfrm)  # Clear the screen
    }
 
#
#   Set background color
#
else if (opcode == SET_BACKGROUND_COLOR) {
   ndclrb = gimnmx (intin(1), 0, 3)
   intout(1) = ndclrb
   ndclrb = ndclrb + DIG0
   bcolor(4) = ndclrb
   call gdstot ( 5, bcolor)
   }
 
#
#  Set line color
#
else if (opcode == SET_LINE_COLOR)  {
   ndclrl = gimnmx( intin(1), 0, 3)
   intout(1) = ndclrl
   }
 
#
#  Set text color
#
else if (opcode == SET_TEXT_COLOR)  {
   ndclrt = gimnmx ( intin(1), 0, 3)
   intout(1) = ndclrt
   }
 
#
#  Set marker color
#
else if (opcode == SET_MARKER_COLOR)  {
   ndclrm = gimnmx ( intin(1), 0, 3)
   intout(1) = ndclrm
   }
 
#
# Set device color
#
else if (opcode == COLOR)  {
   i = gimnmx (intin(1), 0, 3)                # determine color index
   j = i + 1
   do k = 1, 3 {                              # save color values as RGB
      clv185(j,k) = rlin(k)
      }
 
   call cnvclr (RGB, rlin, HLS, tmpclr)       # convert color to HLS
   tmpclr(2) = tmpclr(2) * 100.
   tmpclr(3) = tmpclr(3) * 100.
   clr1(4) = i + DIG0
   call gdstot (7, clr1)
 
   l = tmpclr(2)                              # map color to gray level
   if (l > 13 & l < 86) {                   # color not black or white
      h = tmpclr(1)
      if (h > 0 & h <= 120)        l = 50     # red is lightness 50
      else if (h > 120 & h <= 240) l = 75     # green is lightness 75
      else                         l = 25     # blue is lightness 25
      }
   len = itoch (l, icnvt, 3, ierror)
   call gdstot (len, icnvt)
   call gdstot (2, clr2)
   }
 
#
#   inquire color index
#
else if (opcode == INQUIRE_COLOR_INDEX)  {
   i = gimnmx (intin(1), 0, 3) + 1
   do j = 1, 3 {
      rlout(j) = clv185 (i,j)
      }
   }
 
#
# opcode set_device_parameters
#
else if (opcode == SET_DEVICE_PARAMETERS) {
 
   # set up device capability array
 
   devcap(TEXT_CAP) = YES      # Text capability
   devcap(LINESTYLE_CAP) = 6   # Capable of 6 different linestyle
   devcap(COLOR_CAP) = 4       # Capable of 16 different colors
   devcap(TEXT_SIZE_CAP) = 17  # Capable of many different text sizes
   devcap(GIN_CAP) = YES       # Capable of graphic input
   devcap(MARKER_CAP) = 5      # Capable of 5 different markers
   devcap (TEXT_ROT_CAP)= 8    # Capable of 8 text rotations (45 degree mult)
   devcap(BAR_FILL_CAP) = 4    # Capable of filling a rectangle
 
   # Initialize Device Driver globals
 
   zdlgax = X_LIMITS_VT185   # Set the length of the longest axis in device
                             #    units
   zdxlng = 1.0              # Set x and y axis lengths in NDC units
   zdylng = 0.625            # Y_LIMITS_VT185/X_LIMITS_VT185
 
   ndlntp = 1                # Default line type is solid
   ndclrb = 0                # Default background color is black
   ndclrl = 1                # Default line color is red
   ndclrm = 1                # Default marker color is red
   ndclrt = 1                # Default text color is red
   ndclrf = 1                # Default panel fill is red
   ndclrp = -1               # No color is active now
   ndtxrt = 0                # No text rotation active
   ndedgs = OUTLINE          # Outline polygons with current line color
 
   zdxpos = 0.0              # Default position is at home
   zdypos = 0.0
   ndtxsz = 1                # Default text size index
   zdtxsz = .011734          # Char width = 5.0 / X_LIMITS_VT185
   zdtysz = .0260756         # Char height = 10.0 / X_LIMITS_VT185
 
   do i = 1, 4 {             # Initialize color map in common
      do j = 1, 3 {
         clv185 (i,j) = 0.0
         }
      }
   clv185 (2,1) = 1.0
   clv185 (3,2) = 1.0
   clv185 (4,3) = 1.0
 
   # initialize the terminal
   call gdstot (52, setup1)
   call gdstot (37, setup2)   # Initialize the color map
   }
 
#
#    opcode get_point
#
else if (opcode == GET_POINT) {
   xcoord = zdxpos            # get current cursor position
   ycoord = zdypos
   savex = zdxpos             # save current cursor position
   savey = zdypos
 
   rate = 2                   # initialize rate to fast
   qdone = .false.
   call gdstot (2,ringbl)     # ring bell to wake user up
 
   repeat {
      xtemp = 0.
      ytemp = 0.
      call gdevin (j)         # read character
      if      (j == UP)          ytemp = yincr (rate)
      else if (j == DOWN)        ytemp = -yincr (rate)
      else if (j == LEFT)        xtemp = -xincr (rate)
      else if (j == RIGHT)       xtemp = xincr (rate)
      else if (j == CHANGE_RATE) rate = mod (rate, 2) + 1
      else                       qdone = .true.
 
      xcoord = xcoord + xtemp   # update position
      ycoord = ycoord + ytemp
      if (xcoord < 0.0) xcoord = 0.0     # keep cursor on screen
      if (ycoord < 0.0) ycoord = 0.0
      if (xcoord > zdxlng) xcoord= zdxlng
      if (ycoord > zdylng) ycoord= zdylng
      call drv185 (MOVE, xy)
      } until (qdone)
 
   call drv185 (MOVE, savexy)  # move back to start
 
   # return x,y coordinate and key that was struck
   rlout (1) = xcoord
   rlout (2) = ycoord
   intout(1) = j
   contrl(4) = 1
   }
 
#
#     inquire screen size
#
else if (opcode == INQUIRE_SCREEN_SIZE) {
      rlout(1) = zdxlng
      rlout(2) = zdylng
      rlout(3) = X_LIMITS_VT185
      }
 
#
#  opcode escape
#
else if (opcode == ESCAPE) {
      j = contrl(INTEGER_IN_LENGTH)
      call gdstot (j, intin)
      }
#
#     stop graphics
#
else if (opcode == STOP_GRAPHICS) {
      call gdstot (4, newfrm)       # Erase screen
      call gdstot (2, stopgr)       # Terminate graphics
      }
 
return
end
#-t-  ddv185.rat          local   01/20/82  09:30
#-h-  dmv185.rat          local   03/24/82  11:21
subroutine dmv185 (marker,rlin)
########################################################################
#                                                                      #
#          THIS MATERIAL IS CONFIDENTIAL AND IS FURNISHED UNDER        #
#          A WRITTEN LICENSE AGREEMENT.  IT MAY NOT BE USED,           #
#          COPIED OR DISCLOSED TO OTHERS EXCEPT IN ACCORDANCE          #
#          WITH THE TERMS OF THAT AGREEMENT.                           #
#                                                                      #
#          COPYRIGHT (C) 1982 GRAPHIC SOFTWARE SYSTEMS INC.            #
#          ALL RIGHTS RESERVED.                                        #
#                                                                      #
#     Function: Place a marker at the current location on VT185        #
#                                                                      #
#     Input Parameters:                                                #
#            marker - marker symbol index (1-5)                        #
#            rlin   - x/y location for marker                          #
#     Output Parameters:                                               #
#            none                                                      #
#                                                                      #
#     Routines Called:                                                 #
#            drv185 - VT185 move/draw routine                          #
#                                                                      #
########################################################################
 
include mgsdef
 
define (MARK_PERIOD,1)
define (MARK_PLUS,2)
define (MARK_STAR,3)
define (MARK_O,4)
define (MARK_X,5)
define (FULLSZ,.0125)
define (HALFSZ,.00625)
define (FPERSZ,.005)
define (HPERSZ,.0025)
 
integer marker
real rlin(1)
 
real fsize, hsize, x1, x2, y1, y2
real rxy(2), rxy1, rxy2
 
include mgscom
 
# The following equivalence statements are used to decrease the amount of code
#    necessary to access specific array elements. The arrays and the
#    variables equivalenced are listed below:
#
#       rxy(1) :: rxy1
#       rxy(2) :: rxy2
 
equivalence (rxy(1), rxy1), (rxy(2), rxy2)
 
 
   if (marker == MARK_PERIOD) {
      fsize = FPERSZ
      hsize = HPERSZ
      }
   else {
      fsize = FULLSZ
      hsize = HALFSZ
      }
 
   x1 = rlin(1) - hsize        #clip marker to device limits
   x2 = x1 + fsize
   y1 = rlin(2) - hsize
   y2 = y1 + fsize
   if ((amin1(x1,y1) < 0.0) | (x2 > zdxlng) | (y2 > zdylng)) return
 
   # output appropriate marker centered on location
 
   rxy1 = x1
   rxy2 = y1
   call drv185 (MOVE, rxy)   # move to lower left corner of character cell
 
   if (marker == MARK_PERIOD | marker == MARK_O) {
      rxy1 = x2
      call drv185 (DRAW, rxy)
      rxy2 = y2
      call drv185 (DRAW, rxy)
      rxy1 = x1
      call drv185 (DRAW, rxy)
      rxy2 = y1
      call drv185 (DRAW, rxy)
      }
   else {
      if (marker == MARK_X | marker == MARK_STAR) {
         rxy1 = x2
         rxy2 = y2
         call drv185 (DRAW, rxy)
         rxy2 = y1
         call drv185 (MOVE, rxy)
         rxy1 = x1
         rxy2 = y2
         call drv185 (DRAW, rxy)
         }
      if (marker == MARK_PLUS | marker == MARK_STAR) {
         rxy2 = y1 + hsize
         call drv185 (MOVE, rxy)
         rxy1 = x2
         call drv185 (DRAW, rxy)
         rxy1 = x1 + hsize
         rxy2 = y1
         call drv185 (MOVE, rxy)
         rxy2 = y2
         call drv185 (DRAW, rxy)
         }
      }
   call drv185 (MOVE, rlin)     # Return the cursor position to the original
                                #    value
   return
end
#-t-  dmv185.rat          local   03/24/82  11:21
#-h-  drv185.rat          local   01/20/82  09:30
subroutine drv185 (opcode, rlin)
########################################################################
#                                                                      #
#          THIS MATERIAL IS CONFIDENTIAL AND IS FURNISHED UNDER        #
#          A WRITTEN LICENSE AGREEMENT.  IT MAY NOT BE USED,           #
#          COPIED OR DISCLOSED TO OTHERS EXCEPT IN ACCORDANCE          #
#          WITH THE TERMS OF THAT AGREEMENT.                           #
#                                                                      #
#          COPYRIGHT (C) 1982 GRAPHIC SOFTWARE SYSTEMS INC.            #
#          ALL RIGHTS RESERVED.                                        #
#                                                                      #
#     Function: GSS-CORE device driver move/draw for VT185             #
#                                                                      #
#     Input Parameters:                                                #
#           opcode - driver function, either move/draw                 #
#                                                                      #
#            rlin    -     Array of real input parameters              #
#                                                                      #
#     Output Parameters: none                                          #
#                                                                      #
#     Routines Called:                                                 #
#            gdstot - put a character string to a device               #
#            gdevot - put a character to a device                      #
#            itoch  - convert an integer into a string of characters   #
#                                                                      #
########################################################################
 
define(Y_AXIS_VT185,479)
 
include mgsdef
 
integer opcode
real rlin(1)
 
integer len, xcoord, ycoord, drawcd(3), iconvt(3)
 
include mgscom
 
data drawcd /BIGV, LBRACK, RBRACK/
 
zdxpos = rlin(1)
zdypos = rlin(2)
xcoord = int (zdxpos*zdlgax)                # convert coords to device space
ycoord = Y_AXIS_VT185 - int (zdypos*zdlgax) # 0,0 is upper left corner
 
if (opcode == DRAW) call gdstot (3, drawcd)
else                call gdevot (BIGP)
 
call gdevot (LBRACK)
len = itoch (xcoord,iconvt,3,ierr)
call gdstot (len,iconvt)
call gdevot (COMMA)
len = itoch (ycoord,iconvt,3,ierr)
call gdstot (len,iconvt)
call gdevot (RBRACK)
 
return
end
#-t-  drv185.rat          local   01/20/82  09:30
#-h-  dcv185.rat          local   03/24/82  11:21
subroutine dcv185 (color)
########################################################################
#                                                                      #
#          THIS MATERIAL IS CONFIDENTIAL AND IS FURNISHED UNDER        #
#          A WRITTEN LICENSE AGREEMENT.  IT MAY NOT BE USED,           #
#          COPIED OR DISCLOSED TO OTHERS EXCEPT IN ACCORDANCE          #
#          WITH THE TERMS OF THAT AGREEMENT.                           #
#                                                                      #
#          COPYRIGHT (C) 1982 GRAPHIC SOFTWARE SYSTEMS INC.            #
#          ALL RIGHTS RESERVED.                                        #
#                                                                      #
#     Function: Change the color on the VT185 terminal                 #
#                                                                      #
#     Input Parameters:                                                #
#            color - color to change to                                #
#     Output Parameters:                                               #
#            none                                                      #
#                                                                      #
#     Routines Called:                                                 #
#            gdstot - output a string to the current device            #
#                                                                      #
########################################################################
 
include mgsdef
 
integer color
 
integer fcolor(5)
 
include mgscom
 
#    Set the foreground color - W(I<index>)
data fcolor / BIGW, LPAREN, BIGI, DIG1, RPAREN/
 
ndclrp = color    # Set the current color
 
fcolor(4) = color + DIG0
call gdstot (5, fcolor)
 
return
end
#-t-  dcv125.rat          local   03/24/82  11:21
#-t-  ddv185.c            local   06/27/82  14:07:03
#-h-  ddv550.c            local   06/27/82  14:08:24
E 1
