Trailing-Edge
-
PDP-10 Archives
-
LCG_Integration_Tools_Clearinghouse_T20_v7_30Apr86
-
tools/recog3/helpuser.r32
There are 2 other files named helpuser.r32 in the archive. Click here to see a list.
! HELPUSER.R32 prefix file.
!
! IDENT=V00A03
!
! COPYRIGHT (C) 1982 BY
! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
!
! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
! ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
! OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
! TRANSFERRED.
!
! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
! AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
! CORPORATION.
!
! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
!
!++
!
! FACILITY: HELP
!
! ABSTRACT:
!
! Contains macros and symbol definitions useful for programs
! that wish to invoke the recognition package.
!
! ENVIRONMENT:
!
! Runs under VMS.
!
! AUTHOR: Stanley Rabinowitz, CREATION DATE: 25-Dec-81
!
! MODIFIED BY:
!
! Stanley Rabinowitz
!
! V00A03 Stan 25-Jun-1983 Added new KEYWORD_TABLE structure
! V00A02 Stan 9-Oct-1982 Added CAB$V_NUL
! V00A01 Stan 3-Oct-1982 Added back CAB$L_STS
!
!--
!************************************************
! *
! NOTE 1 *
! *
! The use of XPORT in this file is only *
! temporary. Once I learn how, these structure *
! offsets will get created for both MACRO and *
! BLISS users by using MDL. *
! *
!************************************************
LIBRARY 'SYS$LIBRARY:XPORT';
MACRO
$WORD = $BYTES(2) %,
$LONG = $BYTES(4) %,
$QUAD = $BYTES(8) %;
!************************************************
! *
! NOTE 2 *
! *
! The use of the HLP prefix will be changing *
! since this prefix is already in use by the *
! VMS group. I haven't gotten around yet to *
! officially signing out a non-conflicting *
! prefix. The prefixes CAB and PAT have been *
! signed out. *
! *
!************************************************
! Types of fields
LITERAL
HLP$K_KEYWORD = 1, ! Parameter is a keyword
HLP$K_NUMBER = 2, ! Parameter is a number
HLP$K_QUALIFIER = 3, ! Parameter is a qualfier
HLP$K_INPUT_FILE = 4, ! Parameter is an input filespec
HLP$K_OUTPUT_FILE = 5, ! Parameter is an output filespec
HLP$K_GENERAL_FILE = 6, ! Reserved for future use
HLP$K_PARAM = 7, ! Arbitrary parameter ending
! in space, tab, slash, or comma.
HLP$K_END = 8, ! End of statement
HLP$K_DIRECTORY = 9, ! Parameter is a device:directory
HLP$K_USERNAME = 10, ! Parameter is a username
HLP$K_COMMA = 11, ! Obsolete
HLP$K_FLOAT = 12, ! Parameter is a floating point constant
HLP$K_DEVICE = 13, ! Parameter is a device name (no directory)
HLP$K_TEXT = 14, ! Arbitrary text to end-of-line
HLP$K_TIME = 15, ! Parameter is a date/time specification
HLP$K_QUOTED_STRING = 16, ! Parameter is a quoted string
HLP$K_STRING = 17, ! Parameter is a string or quoted string
HLP$K_TOKEN = 18, ! Parameter is a fixed string
HLP$K_ACCOUNT = 19, ! Parameter is an account name
HLP$K_NODENAME = 20, ! Parameter is a node name
HLP$K_LOGICAL_NAME = 21, ! Parameter is a logical name
HLP$K_UIC = 22, ! Parameter is a UIC specification
HLP$K_NAME = 23, ! Parameter is an arbitrary name
HLP$K_CHARACTER = 24, ! Any single character is accepted
HLP$K_PROCESS = 25, ! Process name
HLP$K_NYI = 100, ! Internal use only
HLP$K_GUIDEWORD = 101; ! Internal use only
! Prompt codes: (needed by DECset) reserved for future use
LITERAL
HLP$PROMPT$REQ = 1, ! parameter is required,
! prompt for it if it is missing
HLP$PROMPT$OPT = 2, ! parameter is optional,
! do nothing if it is missing
HLP$PROMPT$NUL = 3, ! If parameter is missing, prompt for it
! But once only. A null response to the
! prompt shall go on to the next parameter.
HLP$PROMPT$ERR = 4, ! parameter is required,
! give an error message if it is missing
HLP$PROMPT$CMD = 5, ! parameter is required and initiates
! a subcommand.
HLP$PROMPT$NIL = 6; ! parameter is normally optional (HLP$PROMPT$OPT)
! except if MENU mode is on, in which case
! it is prompted for once (HLP$PROMPT$NUL).
! Types of output lines.
! These symbols are needed only by programs that wish to
! handle the incremental help output themselves.
LITERAL ! NOTE: odd value means follow with CRLF
HLP$K_HELP_LINE = 1, ! A line of incremental help text
HLP$K_SINGLE_LINE = 2, ! keyword, only choice is:
HLP$K_RECOG_LINE = 4, ! Some recognition output (internal use only)
HLP$K_NOMATCH_LINE = 5, ! none match
HLP$K_BELL_LINE = 6, ! Ringing of the bell (internal use only)
HLP$K_PREFACE_LINE = 7, ! One of the following...
HLP$K_QMARK_LINE = 8, ! The "?" display
HLP$K_ENTITY_LINE = 10, ! The entity name
HLP$K_PROMPT_LINE = 12, ! The initial prompt
HLP$K_END_LINE = 14, ! Null string at end of help text
HLP$K_OR_LINE = 16; ! The word "or"
! CAB - Command Access Block (Parser State Block)
LITERAL CAB$K_BID = 123; ! CAB block ID should be assigned by VMS group
$FIELD
CAB_FIELDS =
SET
CAB$W_BLN = [$WORD], ! Size of CAB in bytes
CAB$B_BID = [$BYTE], ! Block ID (CAB$K_BID)
CAB$B_UNU = [$BYTE], ! Unused
CAB$L_FLG = [$LONG], ! Flags set by user
$OVERLAY(CAB$L_FLG)
CAB$V_CVT = [$BIT], ! Convert lower case to upper case
CAB$V_WAK = [$BIT], ! Wake up after each field
CAB$V_NUL = [$BIT], ! Reprompt on a null line
CAB$V_COM = [$BIT], ! Treat "!" as an end-of-line comment character
CAB$V_CON = [$BIT], ! Allow continuation lines with "-"
CAB$V_IND = [$BIT], ! Allow indirect command file with "@" (reserved)
CAB$V_UCA = [$BIT], ! Upcase the atom buffer
CAB$V_TMO = [$BIT], ! Timeout operation
CAB$V_PTA = [$BIT], ! Purge type-ahead buffer
CAB$V_RNE = [$BIT], ! Read with no echo
CAB$V_ASY = [$BIT], ! Asynchronous operation
CAB$V_GOT = [$BIT], ! We already have command line
CAB$V_NOS = [$BIT], ! Set if no spaces are to be automatically skipped
! fromt he beginning of the command line.
$CONTINUE
CAB$A_NXT = [$ADDRESS], ! Reserved for future use (link to next CAB)
CAB$A_PAB = [$ADDRESS], ! Address of first Parameter block
CAB$W_CHN = [$WORD], ! Channel of input device
CAB$W_RES = [$WORD], ! Flags returned by system
$OVERLAY(CAB$W_RES)
CAB$V_REC = [$BIT], ! <RECOGNIZE> terminated this field
CAB$V_NOP = [$BIT], ! Field could not be parsed because of syntax error
CAB$V_EOL = [$BIT], ! Field was terminated by end-of-record (or CRLF)
CAB$V_RPT = [$BIT], ! A reparse is needed
CAB$V_VAL = [$BIT], ! A qualifier ended with a : or =
CAB$V_PFR = [$BIT], ! <RECOGNIZE> terminated previous field
CAB$V_FUL = [$BIT], ! Command buffer was full
CAB$V_HLP = [$BIT], ! Internal only (line ended with "?")
CAB$V_PHL = [$BIT], ! Internal only (previous PAB provided help)
CAB$V_TAB = [$BIT], ! Line ended with RECOGNIZE.
$CONTINUE
CAB$A_GET = [$ADDRESS], ! Address of routine to provide input
CAB$A_PMT = [$ADDRESS], ! Address of descriptor for prompt string
CAB$A_CMD = [$ADDRESS], ! Address of descriptor for command buffer
CAB$A_CBF = [$ADDRESS], ! Address of internal command buffer
CAB$W_CSZ = [$WORD], ! Length of internal command buffer
CAB$W_ALN = [$WORD], ! Number of characters returned in atom buffer
CAB$A_ATM = [$ADDRESS], ! Address of descriptor for atom buffer
CAB$W_PTR = [$WORD], ! Offset to next character to be parsed
CAB$W_FLD_PTR = [$WORD], ! Pointer to beginning of current field
CAB$W_PMT_PTR = [$WORD], ! Pointer to first field in current prompt line
CAB$W_SUB_PTR = [$WORD], ! Pointer to beginning of current subfield
CAB$Q_IOSB = [$QUAD], ! I/O status block
$OVERLAY(CAB$Q_IOSB)
CAB$W_QIO_STS = [$WORD], ! Final status from QIO
CAB$W_CLN = [$WORD], ! Number of characters returned in command buffer
CAB$B_QIO_TRM = [$BYTE], ! QIO terminator character
CAB$B_QIO_UNU = [$BYTE], ! I don't think this is used in a TTY IOSB
CAB$W_TRM_LEN = [$WORD], ! Length of QIO terminator (escape sequence)
$CONTINUE
CAB$B_TRM = [$BYTE], ! Field terminator character
CAB$B_TMO = [$BYTE], ! Timeout time
CAB$W_WIDTH = [$WORD], ! User-requested width
CAB$L_DEVCHAR = [$LONG], ! Device characteristics
CAB$B_DEVCLASS = [$BYTE], ! Device class
CAB$B_DEVTYPE = [$BYTE], ! Device type
CAB$W_DEVBUFSIZ = [$WORD], ! Device buffer size
CAB$L_DEVDEPEND = [$LONG], ! Device dependent bits
CAB$L_DEVDEPND2 = [$LONG], ! More device dependent bits
CAB$W_EFN = [$WORD], ! Event flag to be used
CAB$W_ERR_PTR = [$WORD], ! Pointer to end of error (internal use only)
CAB$A_ASTADR = [$ADDRESS], ! Address of AST routine
CAB$L_ASTPRM = [$LONG], ! Parameter to be passed to AST routine
CAB$A_QIOGET = [$ADDRESS], ! Address of user-supplied QIO read routine
CAB$A_QIOPUT = [$ADDRESS], ! Address of user-supplied QIO write routine
! Reserve space for associated help library?
CAB$A_LEX = [$LONG], ! Address of lexical processing routine
CAB$A_PUT = [$ADDRESS], ! Address of user's routine to display output
CAB$A_CURPAB = [$ADDRESS], ! Current PAB (if they are chained together)
CAB$L_PUT = [$LONG], ! Reserved
CAB$A_IOSB = [$ADDRESS], ! Address of user's I/O Status block
CAB$A_ERR = [$ADDRESS], ! reserved for error routine address
CAB$A_SUC = [$ADDRESS], ! reserved for success routine address
CAB$L_STS = [$LONG], ! final error status
CAB$L_PAD1 = [$LONG],
CAB$L_PAD2 = [$LONG],
CAB$L_PAD3 = [$LONG],
CAB$L_PAD4 = [$LONG],
CAB$L_PAD5 = [$LONG],
CAB$L_PAD6 = [$LONG],
CAB$L_PAD7 = [$LONG]
TES;
LITERAL
CAB$K_BLN = $FIELD_SET_SIZE;
! Macros used to declare CABs
MACRO
$CAB_DECL =
BLOCK[CAB$K_BLN] FIELD(CAB_FIELDS) ! Put in ,BYTE when get rid of XPORT
%;
LITERAL CAB$V_0 = 0; ! HACK
MACRO
$HLP_OR(P)[A] =
(1 ^ %FIELDEXPAND(%NAME(P,A),1))
%,
$HLP_BITS(PFX,ARG) =
%IF %NULL(ARG)
%THEN 0
%ELSE 0 + $HLP_OR(PFX,%REMOVE(ARG))
%FI
%;
KEYWORDMACRO
$CAB( FLG=, NXT=0, PAB=0, CHN=0,
ATM=0, GET=0, PMT=0, CMD=0,
TMO=0, PUT=0, QIOGET=0, QIOPUT=0) =
$CAB_DECL
PRESET(
[CAB$W_BLN] = CAB$K_BLN,
[CAB$B_BID] = CAB$K_BID,
[CAB$L_FLG] = $HLP_BITS(CAB$V_,FLG),
[CAB$A_NXT] = NXT,
[CAB$A_PAB] = PAB,
[CAB$W_CHN] = CHN,
[CAB$A_GET] = GET,
[CAB$A_PMT] = PMT,
[CAB$A_CMD] = CMD,
[CAB$A_ATM] = ATM,
[CAB$B_TMO] = TMO,
[CAB$A_PUT] = PUT,
[CAB$A_QIOGET] = QIOGET,
[CAB$A_QIOPUT] = QIOPUT
) %;
! PAT - Parameter Table
LITERAL PAB$K_BID = 124; ! PAB block ID should be assigned by VMS group
$FIELD
PAB_FIELDS =
SET
PAB$W_BLN = [$WORD], ! Size of PAB in bytes
PAB$B_BID = [$BYTE], ! Block ID for PAB (PAB$K_BID)
PAB$B_TYP = [$BYTE], ! Field type
PAB$A_NXT = [$ADDRESS], ! Address of next PAB in chain
PAB$L_ARG = [$LONG], ! Function-specific argument
PAB$W_FLG = [$WORD], ! Function-specific flags
$OVERLAY(PAB$W_FLG)
PAB$V_SPO = [$BIT], ! Syntax parse only
PAB$V_SDH = [$BIT], ! Suppress default help text
PAB$V_NOS = [$BIT], ! Field may not be preceded by spaces
PAB$V_NOD = [$BIT], ! Keyword field may not contain digits
PAB$V_NOWLD = [$BIT], ! Wildcards are not allowed
PAB$V_INV = [$BIT], ! Make this PAB invisible in help choices
$CONTINUE
PAB$W_UNUSED = [$WORD], ! reserved for future use
PAB$A_CAB = [$ADDRESS], ! Pointer back to associated CAB
PAB$A_HLP = [$ADDRESS], ! Address of descriptor for help text
PAB$A_DEF = [$ADDRESS], ! Address of descriptor for default string
PAB$A_PMT = [$ADDRESS], ! Address of descriptor for prompt string
PAB$A_GDW = [$ADDRESS], ! Address of descriptor for guideword
PAB$L_VAL = [$LONG], ! Longword returned to user
PAB$A_VBF = [$LONG], ! Descriptor for string to be returned to user
PAB$W_VLN = [$WORD], ! Length of string returned in VBF
PAB$Q_BRK = [$QUAD], ! Terminator break mask quadword (reserved)
PAB$L_CTX = [$LONG], ! User context
PAB$A_SOS = [$ADDRESS], ! For internal use only
PAB$L_STS = [$LONG], ! Error status returned from system
PAB$L_STV = [$LONG], ! Error status value from system
PAB$L_ERR = [$LONG], ! Error status from current parse attempt
! which is being passed to the user
! should there be arguments (like _STV)?
PAB$L_PAD1 = [$LONG],
PAB$L_PAD2 = [$LONG],
PAB$L_PAD3 = [$LONG],
PAB$L_PAD4 = [$LONG],
PAB$L_PAD5 = [$LONG],
PAB$L_PAD6 = [$LONG],
PAB$L_PAD7 = [$LONG],
PAB$L_PAD8 = [$LONG]
TES;
LITERAL
PAB$K_BLN = $FIELD_SET_SIZE;
! Macros used to declare PATs:
MACRO
$PAB_DECL =
BLOCK[PAB$K_BLN] FIELD(PAB_FIELDS) ! Put in ,BYTE when get rid of XPORT
%;
LITERAL HLP$K_0 = 0; ! HACK TEMP
KEYWORDMACRO
$PAB( NXT=0, ARG=0, TYP=0, FLG=,
HLP=0, DEF=0, PMT=0, GDW=0,
CAB=0, CTX=0, VBF=0 )=
$PAB_DECL
PRESET(
[PAB$W_BLN] = PAB$K_BLN,
[PAB$B_BID] = PAB$K_BID,
[PAB$B_TYP] = %NAME(HLP$K_,TYP),
[PAB$A_NXT] = NXT,
[PAB$L_ARG] = ARG,
[PAB$W_FLG] = $HLP_BITS(PAB$V_,FLG),
[PAB$A_CAB] = CAB,
[PAB$A_HLP] = HLP,
[PAB$A_PMT] = PMT,
[PAB$A_DEF] = DEF,
[PAB$A_GDW] = GDW,
[PAB$A_VBF] = VBF,
[PAB$L_CTX] = CTX
) %;
! New-style KEYWORD_TABLE
FIELD KEYTAB_FIELDS =
SET
KEYTAB$W_MAX_ENTRIES = [0,0,16,0], ! Maximum number of keywords
! that can fit in table
KEYTAB$V_NEW_STRUC = [0,31,1,0], ! Always on - new structure bit
KEYTAB$V_NOKIT = [0,30,1,0], ! 1 means KITs aren't used
KEYTAB$W_CUR_ENTRIES = [4,0,16,0] ! Current number of keywords in table
TES;
MACRO
$KEYTAB_DECL =
BLOCK[,BYTE] FIELD(KEYTAB_FIELDS)
%;
! KIT - Keyword Item Table
LITERAL KIT$K_BID = 125; ! KIT block ID should be assigned by VMS group
$FIELD
KIT_FIELDS =
SET
KIT$L_VAL = [$LONG], ! Value to be returned if keyword matches
KIT$W_BLN = [$WORD], ! Size of KIT in bytes
KIT$B_BID = [$BYTE], ! Block ID for KIT (KIT$K_BID)
KIT$B_VER = [$BYTE], ! Reserved for future use (structure version number)
KIT$W_FLG = [$WORD], ! Flags
$OVERLAY(KIT$W_FLG)
KIT$V_INV = [$BIT], ! Keyword is invisible
KIT$V_NOR = [$BIT], ! Do not recognize this keyword
KIT$V_NEG = [$BIT], ! Keyword is negatable
KIT$V_NOT = [$BIT], ! This is the negative form for another Keyword
KIT$V_VAL = [$BIT], ! Keyword takes a value (possibly optional)
KIT$V_REQ = [$BIT], ! Keyword value is required
KIT$V_CASE = [$BIT], ! Keyword is case sensitive (reserved)
$CONTINUE
KIT$W_ABV = [$WORD], ! This Keyword is an abbreviation for
! Keyword at specified offset.
KIT$A_PFX = [$ADDRESS], ! Address of descriptor for negation prefix
KIT$L_CTX = [$LONG], ! User context longword
KIT$A_EXPL = [$ADDRESS], ! Address of descriptor for explanation
! of this Keyword (reserved for use by DECset)
KIT$A_PAT = [$ADDRESS], ! Address of PAT for Keyword value (?)
! this field is probably obsolete
KIT$B_MIN = [$BYTE], ! Minimum number of characters that must match
KIT$B_MAX = [$BYTE], ! Maximum number of characters that need be checked
KIT$W_UNUSED = [$WORD],
KIT$L_PAD1 = [$LONG],
KIT$L_PAD2 = [$LONG],
KIT$L_PAD3 = [$LONG],
KIT$L_PAD4 = [$LONG],
KIT$L_PAD5 = [$LONG],
KIT$L_PAD6 = [$LONG],
KIT$L_PAD7 = [$LONG],
KIT$L_PAD8 = [$LONG]
TES;
LITERAL
KIT$K_BLN = $FIELD_SET_SIZE;
! Must change HLPLOOKUP when KIT$K_BLN becomes size in bytes
! Macros used to declare KITs:
MACRO
$KIT_DECL =
BLOCK[KIT$K_BLN] FIELD(KIT_FIELDS) ! Put in ,BYTE when get rid of XPORT
%;
KEYWORDMACRO
$KIT( VAL=0, EXPL=0, PAT=0, FLG=,
CTX=0, PFX=0, ABV=0, MIN=0,
MAX=0 )=
$KIT_DECL
PRESET(
[KIT$W_BLN] = KIT$K_BLN,
[KIT$B_BID] = KIT$K_BID,
[KIT$L_VAL] = VAL,
[KIT$W_FLG] = $HLP_BITS(KIT$V_,FLG),
[KIT$A_EXPL] = EXPL,
[KIT$A_PFX] = PFX,
[KIT$W_ABV] = ABV,
[KIT$L_CTX] = CTX,
[KIT$B_MIN] = MIN,
[KIT$B_MAX] = MAX
) %;
! These go away when we get rid of XPORT
UNDECLARE %QUOTE $DESCRIPTOR;
UNDECLARE %QUOTE $WORD;
UNDECLARE %QUOTE $LONG;
UNDECLARE %QUOTE $QUAD;
! End of require file.