h21192
s 00097/00000/00000
d D 1.1 83/03/23 16:17:12 bog 1 0
c date and time created 83/03/23 16:17:12 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:  							    #
#		Integer Function EmIGet (Common,VarPtr)			    #
#			Input	Common:	CHARACTER <common> code		    #
#				VarPtr:	Integer <variable> index	    #
#			Output	EmIGet:	Integer value of <variable>	    #
#					  VarPtr in <common> Common	    #
#		    Variable fetcher for Menu subsystem.		    #
#									    #
#	Called By:							    #
#									    #
#	Routines Called:						    #
#									    #
#############################################################################
 
INTEGER Function EmIGet(Common,VarPtr)
CHARACTER Common
INTEGER VarPtr
 
CHARACTER C
INTEGER V
 
BEGINCOMMON
COMMON(BEAMSTATE)
COMMON(COMMCAPABILITY)
#COMMON(CONFIG)
COMMON(COMMSTATE)
#COMMON(DRIVER)
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,104,105),C
 
# Case MImmed:		EmIGet = J
    EmIGet = J
    Goto 199
 
# Case MEmBeamState:	EmIGet = IBmSt(V)
    101 EmIGet = IBmSt(V)
    Goto 199
 
# Case MCommCap:	EmIGet = ICmCp(V)
    102 EmIGet = ICmCp(V)
    Goto 199
 
# Case MCommState:	EmIGet = ICmSt(V)
    103 EmIGet = ICmSt(V)
    Goto 199
 
# Case MEmInit:		EmIGet = IInit(V)
    104 EmIGet = IInit(V)
    Goto 199
 
# Case MenuMachine:	EmIGet = IMenu(V)
    105 EmIGet = IMenu(V)
#   Goto 199
 
# Case MSpecialKeys:	EmIGet = ISpKey(V)
#   106 EmIGet = ISpKey(V)
#   Goto 199
 
# Case MEmStraps:	EmIGet = IStrap(V)
#   107 EmIGet = IStrap(V)
#   Goto 199
 
# Case MEmSwitches:	EmIGet = ISwtch(V)
#   108 EmIGet = ISwtch(V)
 
  199 Continue
  }
 
Return
End
E 1
