This is a cross-referenced version of iohead.defs, to download the unmodified
source try iohead.defs.
# IOHEAD(/PLAN) - I/O include file
# Errors, fix to "match" unix
#DEFINE EBADF=1
#DEFINE EIO=2
#DEFINE EMFILE=3
#DEFINE EINVAL=4
#DEFINE ENOMEM=5
# Device types
#DEFINE DEVTR=0
#DEFINE DEVTP=1
#DEFINE DEVFR=50
#DEFINE DEVFW=51
#DEFINE DEVFH=52
#DEFINE DEVCI=60
# The famous unit numbers
#DEFINE STDIN=0
#DEFINE STDOUT=1
#DEFINE STDERR=2
# A file descriptor:
#SET SZFDESC=0
#DEFINE FDUNIT=SZFDESC [ EXEC Unit #
#SET SZFDESC=SZFDESC+1
#DEFINE FDTYPE=SZFDESC [ Type, eg TP
#SET SZFDESC = SZFDESC+1
# If current shift is zero we're writing a GRAPHIC
# file. If it's negative then it's an AMORPHOUS file
# (what a horrible hack)
#DEFINE FDSHIFT=SZFDESC [ Current shift or 0
#SET SZFDESC = SZFDESC+1
# To convert shifted characters to ECMA we need t0
# flip bits #140 for ALPHA, #100 for BETA
#DEFINE SMODALPHA=#140
#DEFINE SMODBETA=#100
#DEFINE SMODNONE=0
#DEFINE FDSHIFTMOD=SZFDESC [ current shiftmod or zero
#SET SZFDESC=SZFDESC+1
#DEFINE FDPERI=SZFDESC [ PERI control block
#DEFINE FDREPLY=FDPERI+1 [ PERI reply word
#DEFINE FDCOUNT=FDREPLY+1 [ PERI count word
#DEFINE FDADDR=FDCOUNT+1 [ PERI address word
#SET SZFDESC=SZFDESC+4
#DEFINE FDBUFLEN=SZFDESC [ buffer size in chars
#SET SZFDESC=SZFDESC+1
#DEFINE FDCHARS=SZFDESC [ chars written
#SET SZFDESC=SZFDESC+1 [ or chars left to read
#DEFINE FDNEXT=SZFDESC [ next char to read/write
#SET SZFDESC=SZFDESC+1
#DEFINE FDRECORD=SZFDESC [ start of next record
#SET SZFDESC=SZFDESC+1
#DEFINE FDFLAGS=SZFDESC
#SET SZFDESC=SZFDESC+1 [ flags
#DEFINE FLAGPART=#0001 [ partial record read
#DEFINE FLAGWRITE=#0002 [ currently in write mode
#DEFINE FLAGNOCLOSE=#0004 [ no release on close
#DEFINE FDWRITE=SZFDESC [ write mode PERI
#SET SZFDESC=SZFDESC+1
#DEFINE FDREAD=SZFDESC [ read mode PERI
#SET SZFDESC=SZFDESC+1
# Red tape word for FW/FH
# Bits 0..1 = chars used in last word, 00 = all
# Bits 12..17 = Initial shift, #74 for NORM or #00
# for graphic.
# Bits 18..23 = PFCC. #41 ("A" = single line advance)
# If red tape is zero that implies we are writing to
# an amorphous file.
# (If we are reading or writing an amorphous file
# then shift will be -1)
#DEFINE FDREDTAPE=SZFDESC [ red tape word
#SET SZFDESC=SZFDESC+1
#DEFINE FDBUF=SZFDESC [ Start of buffer
# Pointer to table of FDESC's
# First word is #words in table
#DEFINE SZFTABLE=64
#LOWER COMMON/PFTABLE/
PFTABLE