h62298
s 00248/00000/00000
d D 1.1 83/03/23 15:26:11 bog 1 0
c date and time created 83/03/23 15:26:11 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:  							    #
#		Common GHStat,GHCmCp					    #
#	    Common containing current state and capabilities of host	    #
#	    communications subsystem					    #
#									    #
#	Called By:							    #
#	    Included in GHost modules					    #
#									    #
#############################################################################
dnl
dnl	CHARACTER:	~Ascii [BREAK,EMPTY,NUL..DEL]
dnl	SMALL:		[-127..127] at least
dnl	BYTE:		[0..255] at least
dnl	INTEGER:	[-32767..32767] at least
dnl	UNSIGNED:	[0..65535] at least
dnl	LONG:		[-2147483647..2147483647] at least
dnl
define(`TARGET',`MICROSOFTFORTRAN80')dnl
dnl
ifelse(
TARGET,`MICROSOFTFORTRAN80',`dnl
  define(`CHARACTER',`Integer*1')dnl
  define(`SMALL',`Integer*1')dnl
  define(`BYTE',`Byte')dnl
  define(`INTEGER',`Integer*2')dnl
  define(`UNSIGNED',`Logical*2')dnl
  define(`LONG',`Integer*4')dnl
  define(`LOGICAL',`Logical*1')dnl
    define(`TRUE',`.True.')dnl
    define(`FALSE',`.False.')dnl
  ',
TARGET,`UNIXF77',`
  define(`CHARACTER',`Character*1')dnl
  define(`SMALL',`Integer*2')dnl
  define(`BYTE',`Integer*2')dnl
  define(`INTEGER',`Integer*2')dnl
  define(`UNSIGNED',`Integer*4')dnl
  define(`LONG',`Integer*4')dnl
  define(`LOGICAL',`Logical')dnl
    define(`TRUE',`.True.')dnl
    define(`FALSE',`.False.')dnl
  ')dnl
dnl
define(`BREAK',-2)dnl
define(`EMPTY',-1)dnl
dnl
define(`NOTSENT',-1)dnl
define(`NOERROR',0)dnl
define(`NOTCAPABLEERROR',1)dnl
define(`LENGTHERROR',2)dnl
define(`REQUESTERROR',3)dnl
define(`OPENERROR',4)dnl
dnl
define(`FLAGSTRINGDIM',40)dnl
define(`COMMSTATECOMMON',
`
# Whether currently open; 0 if not, -1 if so
INTEGER COpen
 
# Current receive baud rate index
INTEGER RBaudI
 
# Current receive baud rate
INTEGER CRBaud
 
# Current transmit baud rate index
INTEGER TBaudI
 
# Current transmit baud rate
INTEGER CTBaud
 
# Current parity setting
INTEGER CurPar
 
# Current data bits per character index
INTEGER DatBtI
 
# Current data bits per character
INTEGER CDatBt
 
# Current stop bits per character index
INTEGER StoBtI
 
# Current stop bits per character
INTEGER CStoBt
 
# Current break time in milliseconds
INTEGER CBkTim
 
# Current input flagging mode
INTEGER CIFMod
 
# Current output flagging mode
INTEGER COFMod
 
# Current input flagging stop string
INTEGER CInStL
INTEGER CInStS(FLAGSTRINGDIM)
 
# Current input flagging go string
INTEGER CInGoL
INTEGER CInGoS(FLAGSTRINGDIM)
 
# Current output flagging stop string
INTEGER COtStL
INTEGER COtStS(FLAGSTRINGDIM)
 
# Current output flagging go string
INTEGER COtGoL
INTEGER COtGoS(FLAGSTRINGDIM)
 
 
$1
 
Common /GHStat/ COpen
Common /GHStat/ RBaudI,CRBaud,TBaudI,CTBaud
Common /GHStat/ CurPar
Common /GHStat/ DatBtI,CDatBt,StoBtI,CStoBt
Common /GHStat/ CBkTim
Common /GHStat/ CIFMod,COFMod
Common /GHStat/ CInStL,CInStS,CInGoL,CInGoS,COtStL,COtStS,COtGoL,COtGoS
')
 
 
define(`BAUDDIM',15)
define(`DATABITDIM',4)
define(`STOPBITDIM',3)
define(`COMMCAPABILITYCOMMON',
`
# If the driver is not capable of changing the baud rates,
#  RBdCpL and TBdCpL will be zero.
 
# If the driver is not capable of splitting transmit and receive rates,
#  TBdCpL will be zero and only the Rx set will be used.
 
# Usual baud rates:
#	50
#	75
#	110
#	134.5 (encoded as 134)
#	150
#	200
#	300
#	600
#	1200
#	1800
#	2000
#	2400
#	4800
#	7200
#	9600
#	19200
#	external (coded as -1)
 
# Number of receive baud rates
INTEGER RBdCpL
 
# Array of receive rates
INTEGER RxBdCp(BAUDDIM)
 
# Number of transmit baud rates
INTEGER TBdCpL
 
# Array of transmit rates
INTEGER TxBdCp(BAUDDIM)
 
 
# If the driver is not capable of controlling parity,
#  ParCap will be 0; -1 if capable.
INTEGER ParCap
 
 
# If the driver is not capable of controlling the number of data bits,
#  DtBCpL will be zero.
 
# Number of data bit formats
INTEGER DtBCpL
 
# Array of valid data bits per character
INTEGER DtBtCp(DATABITDIM)
 
 
# If the driver is not capable of controlling the number of stop bits,
#  StBCpL will be zero.
 
# Number of stop bit formats
INTEGER StBCpL
 
# Array of valid stop bits per character
#  Usual value		coding
#	1		  1
#	1.5		  2
#	2		  3
INTEGER StBtCp(STOPBITDIM)
 
 
# If the driver is not capable of sending a Break,
#  TxBkCp will be 0; -1 if capable.
INTEGER TxBkCp
 
# If the driver is not capable of controlling the time a Break spaces,
#  TBkTCp will be 0; -1 if capable.
INTEGER TBkTCp
 
# If the driver is not capable of controlling DSR/DTR receive flagging,
#  RHwFCp will be 0; -1 if capable.
INTEGER RHwFCp
 
# Receive string flagging capability:
#  0	Driver not capable of controlling string flagging
#  1	Driver capable of single-character string flagging
#  2	Driver capable of arbitrary string flagging
INTEGER RStFCp
 
# If the driver is not capable of controlling RTS/CTS transmit flagging,
#  THwFCp will be 0; -1 if capable.
INTEGER THwFCp
 
# Transmit string flagging capability:
#  0	Driver not capable of controlling string flagging
#  1	Driver capable of single-character string flagging
#  2	Driver capable of arbitrary string flagging
INTEGER TStFCp
 
# If the driver is not capable of having a receive flagging mode different
#  from the transmit flagging mode, SpFMCp will be 0; -1 if capable.
INTEGER SpFMCp
 
 
$1
 
Common /GHCmCp/ RBdCpL,RxBdCp,TBdCpL,TxBdCp
Common /GHCmCp/ ParCap,DtBCpL,DtBtCp,StBCpL,StBtCp
Common /GHCmCp/ TxBkCp,TBkTCp
Common /GHCmCp/ RHwFCp,RStFCp,THwFCp,TStFCp,SpFMCp
')
E 1
