Trailing-Edge
-
PDP-10 Archives
-
tops20-v7-ft-dist1-clock
-
7-sources/diucommand.r36
There are 4 other files named diucommand.r36 in the archive. Click here to see a list.
%TITLE 'DIUCOMMAND Literals for DIU command interface'
! COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1986.
! ALL RIGHTS RESERVED.
!
! 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 THAT IS NOT SUPPLIED BY DIGITAL.
!
!
! FACILITY: DIU Data Interchange Utility
!
! ENVIRONMENT: TOPS-20 V6.1
! XPORT V4.0
! BLISS-32 V4.0
!
! ABSTRACT: This file contains various literal, macro and data structure
! declarations used in the DIU command modules.
! HISTORY:
!
! 262 Move what little there was useful in DIUCMD.R36 to here.
! Gregory A. Scott 7-Jul-86
!
! 257 Change library BLI:MONSYM to just MONSYM.
! Gregory A. Scott 7-Jul-86
!
! 256 Change library of RMSUSR to RMSINT.
! Gregory A. Scott 7-Jul-86
!
! 246 Add DIU$K_LIBOL, remove DIU$K_NONRMS and DIU$K_MACY11.
! Gregory A. Scott 27-Jun-86
!
! 200 Add F_ON_DISK.
! Gregory A. Scott 22-May-86
!
! 156 Remove F_USAGE, F_LSA, F_STREAM, and F_NONRMS.
! Gregory A. Scott 13-May-86
!
! 151 Add R_IMAGE.
! Gregory A. Scott 9-May-86
!
! 137 Add cbuf_len, FILE_QUOTED, FILE_UNQUOTED, VALID_NODE, ACC_EMBEDDED,
! ACC_UNQUOTED, ACC_NOACCESS, ACC_NONE, and ACC_PROMPT command contexts.
! Gregory A. Scott 3-May-86
!
! 127 Remove R_NOSEQUENCE.
! Gregory A. Scott 26-Apr-86
!
! 120 Add R_NODE flag to rflags.
! Gregory A. Scott 18-Apr-86
!
! 117 Remove F_NON_EXISTANT, add F_DESCRIPTION to sflags/dflags bits. Remove
! SHOW QUEUE values (VERBOSITY_NORMAL, VERBOSITY_ALL, VERBOSITY_BRIEF)
! since they aren't used properly and now we have a boolean flag for
! /ALL.
! Gregory A. Scott 17-Apr-86
!
! 116 Add F_SPAN_BLOCKS bit to sflags/dflags.
! Gregory A. Scott 10-Apr-86
!
! 115 Add UNQUOTED for a context to be used for access strings. Add bits
! F_USERID, F_PASSWORD, F_ACCOUNT to sflags/dflags.
! Gregory A. Scott 9-Apr-86
!
! 114 Add R_NOSEQUENCE to rflags bits; update some comments.
! Gregory A. Scott 8-Apr-86
!
! 113 Move def of SEEN here from DIUC20. Change COMMAND_EXIT and EXIT states
! to be EXIT_STATE and change SAME to SAME_STATE. Add several F_* bits
! to sflags/dflags, add bits for rflags.
! Gregory A. Scott 7-Apr-86
!
! 70 Add new bit fields to F_* definitions (used for SFLAGS / DFLAGS data
! structures).
! Sandy Clemens 25-Feb-86
!
! 65 Add/update /FILE_FORMAT switch codes.
! Sandy Clemens 12-Feb-86
!
! 62 Add rest of command switches, some new action routines.
! Andy Puchrik 9-Jan-86
!
! 56 Add literals for TAKE/ECHO and TAKE/NOECHO.
! Sandy Clemens 3-Dec-85
!
! 46 Remove /NOTIFY:FAILURE code.
! Sandy Clemens 4-Nov-85
!
! V01-031 Sandy Clemens 17-Sep-85
! Change name of DIU-COMMAND.R36 to DIUCOMMAND.R36 to make porting
! to TOPS-10 easier. (TOPS-10 will truncate DIUCOMMAND to DIUCOM,
! but cannot bypass the "-").
!
! V01-00 RDF0001 Rick Fricchione 30-Aug-1984
! Original version of DIUCOMMAND.R36. Convert over needed items
! from FTS-COMMAND.R36 and DIU.SDL.
!--
LIBRARY 'BLI:XPORT';
LIBRARY 'MONSYM';
LIBRARY 'RMSINT';
LIBRARY 'DIU';
! EQUATED SYMBOLS:
LITERAL MAX_MJOB=8; ! MAXIMUM-SIMULTANEOUS-REQUESTS
LITERAL DBNEXT=$CMBRK+1, ! Offset to NEXT and ACTION
DBCTX=DBNEXT+1; ! Offset to CONTEXT
LITERAL
SAME_STATE=-2, ! Magic state to stay where we are
EXIT_STATE=-1; ! Magic state to exit COMAND package
LITERAL NAME_SIZE=RMS$K_FILE_NAME_SIZE; ! Size of a name with trailing null
LITERAL NAME_LENGTH=NAME_SIZE-1; ! Max length of name itself
LITERAL FILE_NAME_LENGTH=NAME_SIZE; ! Old name
LITERAL ATOM_LEN=300, ! Length of atom buffer
cbuf_len=512; ! Length of command buffer
! Function values
LITERAL ! Values for FUNCTION:
M_MIN=1, ! Minimum legal value
M_HOLD=1, ! Command is HOLD
M_KILL=2, ! Command is KILL
M_MODIFY=3, ! Command is MODIFY
M_NEXT=4, ! Command is NEXT
M_RELEASE=5, ! Command is RELEASE
M_LIST=6, ! Command is SHOW QUEUE
M_MAX=6; ! Maximum legal value
LITERAL
SUP_ECHO=1; ! Supress echo (in ASK)
! Tag types for dest and source buffers
LITERAL
DIU$K_TAG_TEXT=1,
DIU$K_TAG_INTEGER=2;
! Contexts used to tell what FLDDB we got from the command state block
LITERAL
FILE_QUOTED=%C'"', ! quoted filespec given
FILE_UNQUOTED=%C'~', ! unquoted (cmfil) filespec given
VALID_NODE=%C':'; ! Validated node given in filespec
! /ACCESS contexts
LITERAL
ACC_EMBEDDED=%C'e', ! Embedded access info (like VMS)
ACC_NOACCESS=%C'n', ! /NOACCESS
ACC_QUOTED=%C'"', ! /USER/PASS/ACCOUNT/ACCESS:"string"
ACC_UNQUOTED=%C'~', ! /USERID/PASSWORD/ACCOUNT:string
ACC_PROMPT=%C'*', ! /ACCESS:PROMPT
ACC_NONE=%C'0'; ! /ACCESS:NONE
! Date-time storage contexts
LITERAL
TAD_MIN=11, ! Minimum Time/Date function
TAD_AFTER=11, ! switch is /AFTER
TAD_DEADLINE=12, ! switch is /DEADLINE
TAD_MAX=12; ! Maximum Time/Date function
! /SEQUENCE contexts
LITERAL
SEQ_NOSEQ=13, ! /PREREQUISITE:NONE
SEQ_ABORT=14, ! /SEQUENCE:ABORT-ON-ERROR
SEQ_CONTINUE=15, ! /SEQUENCE:CONTINUE-ON-ERROR
SEQ_NUM=16; ! /PREREQUISITE:nnn
! /NOTIFY contexts: make sure you fix DIUSHD when changing these
LITERAL
NOTIFY_MIN=0, ! Minimum legal value
NOTIFY_NONE=0, ! /NOTIFY:NONE
NOTIFY_TERMINAL=1, ! /NOTIFY or /NOTIFY:TERMINAL
NOTIFY_MAIL=2, ! /NOTIFY:MAIL
NOTIFY_IPCF=3, ! /NOTIFY:IPCF
NOTIFY_MAX=3; ! Maximum legal value
! SET DEFAULTS contexts.
LITERAL
SET_DEFAULT_ACCESS=0, ! SET DEFAULTS is setting a node entry
SET_SOURCE_ACCESS=1, ! Access info for source node
SET_DESTINATION_ACCESS=2; ! Access info for destination node
! File format codes: Following must not conflict with RMSUSR's FAB$K_anything!
LITERAL
DIU$K_IMAGE=4, ! /FILE_FORMAT:IMAGE
DIU$K_LIBOL=6; ! /FILE_FORMAT:LIBOL:n
! STOP contexts
LITERAL
SP_WAIT=0, ! /WAIT specified for STOP
SP_NOWAIT=1; ! /NOWAIT specified for STOP
! Literals for the TAKE, EXECUTE and "@" commands
LITERAL
TAK_NOECHO=0, ! /ECHO or /VERIFY specified
TAK_ECHO=1; ! /NOECHO or /NOVERIFY specified
! Start of flag bit defs
LITERAL SEEN=1; ! Following bits a 1 if part is seen
! SFLAGS/DFLAGS flags
LITERAL
F_FILESPEC=0, ! Filespec seen
F_ACCESS=1, ! /ACCESS or vms style access info seen
F_NEW_OLD=2, ! /[NO]NEW|/OLD seen
F_ON_DISK=3, ! File is on disk (dest only)
! 4 free
F_DESCRIPTION=5, ! /DESCRIPTION seen
F_RFM=6, ! /FIXED|/LSA|/STREAM|/VARIAB|/VFC seen
F_NODE=7, ! A node seen
F_SPAM_BLOCKS=8, ! /[NO]SPAM_BLOCKS seen
F_RAT=9, ! /CARRIAGE_CONTROL seen
F_CONTIG=10, ! /[NO]CONTIGUOUS
! 11 free
F_FORMAT=12, ! /FILE_FORMAT seen
F_KEY=13, ! /KEY seen
F_RMS_INDEXED=14, ! /RMS:INDEXED seen (output file)
F_USERID=15, ! /USERID seen
F_PASSWORD=16, ! /PASSWORD seen
F_ACCOUNT=17; ! /ACCOUNT seen
! RFLAGS bits
LITERAL
R_TRANSFORM=0, ! /TRANSFORM seen
R_WARNINGS=1, ! /WARNINGS seen
R_DEADLINE=2, ! /[NO]DEADLINE seen
R_QUEUE=3, ! /[NO]QUEUE seen
R_AFTER=4, ! /AFTER seen
R_LOG_FILE=5, ! /[NO]LOG_FILE seen
R_SEQUENCE=6, ! /[NO]SEQUENCE seen
R_NOTIFY=7, ! /NOTIFY seen
R_PRIORITY=8, ! /PRIORITY seen
R_PREREQUISITE=9, ! /PREREQUISITE seen
R_IMAGE=10, ! /IMAGE seen
R_REQUESTID=16, ! request id seen (KILL, MODIFY, etc)
R_NODE=17; ! node seen (SET DEFAULTS)
! Macros for DIUCMD
MACRO $COMAND_STATES ( I ) =
VECTOR [%LENGTH] INITIAL ( I $COMAND$COMMA(%REMAINING)) %,
$COMAND_STATE ( I ) = I %,
$COMAND_KEY ( I ) =
VECTOR [%LENGTH + 1] INITIAL (%LENGTH^18+0, I
$COMAND$COMMA(%REMAINING)) %,
$COMAND$COMMA [] = , %REMAINING %;
KEYWORDMACRO $COMAND_FLDDB (FUNCTION, FLAGS=0, MORE=0, DATA=0, HELP,
DEFAULT, ACTION=0, NEXT=0, CONTEXT=0, BREAK) =
UPLIT ((
! *** first word of FLDDB: $CMFNP
(FUNCTION^27) ! Function code (CM_FNC)
OR FLAGS ! Function flags (CM_FFL)
! set other flags as needed:
%IF NOT %NULL (DEFAULT) ! If default text supplied
%THEN ! then
OR CM_DPP ! light bit saying it's there
%FI
%IF NOT %NULL (HELP) ! If help text supplied
%THEN ! then
OR CM_HPP ! light bit saying it's there
%FI
%IF NOT %NULL (BREAK) ! If break mask supplied
%THEN ! then
OR CM_BRK ! light bit saying it's there
%FI
OR (MORE)), ! Pointer to next function block
! *** second word of FLDDB: $CMDAT
DATA, ! Datum for FLDDB
! *** third word of FLDDB: $CMHLP
%IF NOT %NULL (HELP) ! If help text supplied
%THEN ! then
HELP ! pointer to it
%ELSE ! else
0 ! zero
%FI ,
! *** fourth word of FLDDB: $CMDEF
%IF NOT %NULL (DEFAULT) ! If default text supplied
%THEN ! then
DEFAULT ! pointer to it
%ELSE ! else
0 ! zero
%FI ,
! *** fifth word of FLDDB: $CMBRK
%IF NOT %NULL (BREAK) ! If break mask supplied
%THEN ! then
BREAK ! pointer to it
%ELSE ! else
0 ! zero
%FI ,
! *** first "extra" word of FLDDB used by COMAND:
NEXT^18 + ACTION, ! <pointer to next state>,,
! <address of action routine>
! *** second "extra" word of FLDDB used by COMAND:
CONTEXT ! Data to be passed to action routine.
) %,
$comand_option (opt, action=0, next=0, context=0,
flags=0, related=) =
! pointer to argument block for TBLUK JSYS
UPLIT (
%IF flags NEQ 0 %THEN ! If any flags are specified,
(flags OR CM_FW), %FI ! set them and also set CM_FW
! to indicate that their there.
%ASCIZ opt)^18 + ! ptr. to ASCIZ string of
! switch or keyword
%IF (flags AND CM_ABR) EQL 0 %THEN
UPLIT( ! pointer to data used by COMAND routine
%IF %NULL(next) %THEN -2^18 %ELSE next^18 %FI
+ %IF %NULL(action) %THEN %O'777776' %ELSE action %FI ,
context)
%ELSE
%IF %NULL(related) %THEN
%ERROR
('In COMAND_OPTION for OPT: ',opt,' required RELATED is missing')
0
%ELSE
related
%FI
%FI%;