h20347
s 00096/00000/00000
d D 1.1 83/03/23 16:15:36 bog 1 0
c date and time created 83/03/23 16:15:36 by bog
e
u
4
U
t
T
I 1
#############################################################################
#									    #
#	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:  							    #
#		CHARACTER Function EmCGet (Common,VarPtr)		    #
#			Input	Common:	CHARACTER <common> code		    #
#				VarPtr:	Integer <variable> index	    #
#			Output	EmIGet:	CHARACTER value of <variable> 	    #
#					  VarPtr in <common> Common	    #
#		    Variable fetcher for Menu subsystem.		    #
#									    #
#	Called By:							    #
#									    #
#	Routines Called:						    #
#									    #
#############################################################################
 
CHARACTER Function EmCGet(Common,VarPtr)
CHARACTER Common
INTEGER VarPtr
 
CHARACTER C
INTEGER V
 
BEGINCOMMON
COMMON(BEAMSTATE)
COMMON(COMMCAPABILITY)
#COMMON(CONFIG)
COMMON(COMMSTATE)
#COMMON(INITIALIZATION)
COMMON(MENUMACHINE)
COMMON(SPECIALKEYS)
COMMON(STRAPS)
#COMMON(SWITCHES)
ENDCOMMON
 
C = Common			# Assume not indexed access
V = VarPtr
 
If (C < 0) {			# Indexed access
  V = V+MenIx-1			#  is 1-based
  C = -C			# Make <common> positive
  }
 
#Switch (C) {			# Switch on commons
{Goto (101,102,103,199,105,106,107),C
 
# Case MImmed:		EmCGet = J
    EmCGet = J
    Goto 199
 
# Case MEmBeamState:	EmCGet = CBmSt(V)
    101 EmCGet = CBmSt(V)
    Goto 199
 
# Case MCommCap:	EmCGet = CCmCp(V)
    102 EmCGet = CCmCp(V)
    Goto 199
 
# Case MCommState:	EmCGet = CCmSt(V)
    103 EmCGet = CCmSt(V)
    Goto 199
 
# Case MEmInit:		EmCGet = CInit(V)
#   104 EmCGet = CInit(V)
#   Goto 199
 
# Case MenuMachine:	EmCGet = CMenu(V)
    105 EmCGet = CMenu(V)
    Goto 199
 
# Case MSpecialKeys:	EmCGet = CSpKey(V)
    106 EmCGet = CSpKey(V)
    Goto 199
 
# Case MEmStraps:	EmCGet = CStrap(V)
    107 EmCGet = CStrap(V)
#   Goto 199
 
# Case MEmSwitches:	EmCGet = CSwtch(V)
#   108 EmCGet = CSwtch(V)
 
  199 Continue
   }
 
Return
End
E 1
