h29898
s 00000/00000/00101
d D 1.5 83/03/04 12:17:58 mjb 5 4
c 
e
s 00002/00002/00099
d D 1.4 83/03/03 23:39:53 mjb 4 3
c changed interface to ingmem and inpmem
e
s 00003/00003/00098
d D 1.3 83/03/02 22:36:46 mjb 3 2
c 
e
s 00004/00000/00097
d D 1.2 83/03/02 19:26:40 mjb 2 1
c 
e
s 00097/00000/00000
d D 1.1 83/03/02 17:41:13 mjb 1 0
c date and time created 83/03/02 17:41:13 by mjb
e
u
mjb
tes
U
t
T
I 1
subroutine graph1
########################################################################
#                                                                      #
#          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: Initialize the graph environment                       #
#                                                                      #
#     Input Parameters:                                                #
#            None                                                      #
#                                                                      #
#     Output Parameters:                                               #
#            None                                                      #
#                                                                      #
#     Routines Called:                                                 #
#            None                                                      #
#                                                                      #
########################################################################
INTEGER savpts(50), savary(50)
INTEGER CONTRL(20), INTIN(20), PTSIN(20)
D 3
ifdef(`UNIX',`',`integer*1 fname(10)')
E 3
I 3
ifdef(`UNIX',`',`integer*1 fname(11)')
E 3

integer menufd

integer gdopen, row, i

include(`gphcom')

common /mnfdcm/ menufd

ifdef(`UNIX',`',`
D 3
data fname/BIGM,BIGE,BIGN,BIGU,BIGS,PERIOD,BIGB,BIGI,BIGN,NUL/
E 3
I 3
data fname/BIGG,BIGR,BIGA,BIGP,BIGH,BIGY,PERIOD,BIGM,BIGN,BIGU,NUL/
E 3
')
# * INITIALIZE THE SYSTEM. CHANGE THE VALUES OF CONTRL(1) AND INTIN(1) 
# * TO THE DEVICE YOU ARE USING. ONE (1) IS A CRT DEVICE.

CONTRL(1) = 1
CONTRL(2) = 0
CONTRL(4) = 10

# * INTIN(1) - INTIN(10) ARE PASSED TO THE DRIVER
INTIN(1) = 1
INTIN(2) = 1
INTIN(3) = 1
INTIN(4) = 3
INTIN(5) = 1
INTIN(6) = 1
INTIN(7) = 1
INTIN(8) = 0
INTIN(9) = 0
INTIN(10) = 1

# * OPEN THE WORKSTATION AND SAVE OUTPUT IN SAVARY(1) - SAVARY(45)
# * ALSO IN SAVPTS ARRAY
CALL GZDDOP (CONTRL, INTIN, PTSIN, SAVARY, SAVPTS)

I 2
# Set graphic capabilities common from savary
bgraph = savary(7)       # Number of line types if 0 no graphics
bgin   = savary(41)      # Number of locator devices available

E 2
# clear the display
call clrscr

# initialize the default color device
call clrini

# output copyright
call chgmod (EXITxGRAPHICSxMODE)
row = 10
do i=1, 255, 51 {
   call qtext (row, 15, anobuf(i))
   row = row + 1
   }
call chgmod (ENTERxGRAPHICSxMODE)

# open the menu and read it     
changequote([,])
ifdef([UNIX],
D 3
[ menufd = gdopen ('menus.bin', BINARYxREAD) ],
E 3
I 3
[ menufd = gdopen ('graphy.mnu', BINARYxREAD) ],
E 3
[ menufd = gdopen (fname, BINARYxREAD) ])
changequote(`,')
if (menufd < 0) {
   call chgmod (EXITxGRAPHICSxMODE)
   call errmsg (STOP, OPENxMENUxERROR)
   }
call rdmenu

# initialize the H E R S H Y  F O N T  S Y S T E M
call hshini

bctype = NUL
D 4
call ingmem
call inpmem
E 4
I 4
call ingmem (YES)
call inpmem (YES)
E 4

return
end
E 1
