Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99p-bb - mxlcl.r36
There are 13 other files named mxlcl.r36 in the archive. Click here to see a list.
!	COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1985, 1989.
!	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.
!Linkages to some TOPS-10 utility functions
%IF %SWITCHES(TOPS10) %THEN
    LINKAGE
	ned1 = PUSHJ(REGISTER=1,REGISTER=2; REGISTER=2):
		SKIP(1)
		LINKAGE_REGS(15,13,1)
		NOPRESERVE(1,2,3,4),

	ned2 = PUSHJ(REGISTER=1,REGISTER=2):
		SKIP(0)
		LINKAGE_REGS(15,13,1)
		NOPRESERVE(1,2,3,4,5,6,7,8,9),

	ned3 = PUSHJ(REGISTER=1; REGISTER=1):
		SKIP(1)
		LINKAGE_REGS(15,13,1)
		NOPRESERVE(1,2,3,4),

	ned4 = PUSHJ(REGISTER=1,REGISTER=2; REGISTER=1,REGISTER=2,REGISTER=3):
		SKIP(1)
		LINKAGE_REGS(15,13,1)
		NOPRESERVE(1,2,3,4),

        ned5 = PUSHJ(REGISTER=1; REGISTER=2):
                SKIP(1)
                LINKAGE_REGS(15,13,1)
                NOPRESERVE(1,2,3),

        ufd1 = PUSHJ(REGISTER=1,REGISTER=2):
                SKIP(0)
                LINKAGE_REGS(15,13,1)
                NOPRESERVE(1,2),

        ufd2 = PUSHJ(REGISTER=1):
                SKIP(1)
                LINKAGE_REGS(15,13,1)
                NOPRESERVE(1,2);

    EXTERNAL ROUTINE
	udtdat: ned2 NOVALUE,
        udttim: ned2 NOVALUE,
	namppn: ned3,
	ppnnam: ned3,
	quotas: ned4,
	fndusr: ned1,
	spltty: ned2 NOVALUE,
	bldque: ned5,
        ufdcre: ufd2,
        ufddel: ufd2;
%FI
!
! REQUIRE file for communication between MX modules
!
! Linkage used between MX and the outside world
!
!
! Define the IPCF message format
!
!    The IPCF message is divided into two parts: header and body.
!    The header contains information about the overall message,
!    while the body of the message contains one or more records to
!    indicate the destination of the message to be posted
!
! Define the IPCF message header
!
$FIELD
  hdr_fields =
    SET
    hdr_type = [$SHORT_INTEGER],	! Type of message
    hdr_domain_id = [$SHORT_INTEGER],   ! The domain id of the sender
    hdr_id = [$SHORT_INTEGER],		! packet message id
    hdr_msid = [$SHORT_INTEGER],        ! Id assigned by MS (don't touch)
    hdr_sequence = [$INTEGER],		! sequence number of this packet
    hdr_status = [$INTEGER],
    hdr_record_count = [$INTEGER],
    hdr_record = [$SUB_BLOCK()]		! first data record
    TES;

! Define the IPCF header size

LITERAL
  hdr_size = $FIELD_SET_SIZE;		! declare the header area size

! Define a macro to reference this data structure

MACRO
  ipcf_hdr = BLOCK [hdr_size] FIELD (hdr_fields) %;
!
! Define the header types
!
$LITERAL
  lcl_post = $DISTINCT,			! post a message
  lcl_cont = $DISTINCT,			! continue posting a previous one
  min_hdr_type = lcl_post,		! minimum
  max_hdr_type = lcl_cont;		! and maximum type

$LITERAL
    lcl_complete = $DISTINCT,
    lcl_incomplete = $DISTINCT,
    min_status = lcl_complete,
    max_status = lcl_incomplete;
!
! Define the IPCF message body
!
!    The IPCF packet body contains one or more variable length records
!    that contain the filespec of the message to be posted, and the node
!    name and destination string for each user to receive the message
!
! Define the packet body record format
!
$FIELD
  rec_fields =
    SET
    rec_seq = [$INTEGER],
    rec_type = [$SHORT_INTEGER],	! record type
    rec_error = [$SHORT_INTEGER],       ! The error code for this record
    rec_length = [$INTEGER],		! number of words in this record
    rec_data = [$STRING(1)]		! dummy pointer
    TES;

! Define the size of a record

LITERAL
  rec_size = $FIELD_SET_SIZE;

! Define a macro to reference this structure

MACRO
  ipcf_rec = BLOCK [rec_size] FIELD (rec_fields) %;

!
! Define the record types
!
$LITERAL
  rec_file = $DISTINCT,			! filespec
  rec_sender = $DISTINCT,		! sender string (for posting by proxy)
  rec_dest = $DISTINCT,			! destination string
  rec_subj = $DISTINCT,                 ! subject string
  min_rec_type = rec_file,		! minimum
  max_rec_type = rec_subj;		! and maximum record type

!
! Define the overall format of the IPCF packet
!
$FIELD
  ipcf_fields =
    SET
    ipcf_header = [$SUB_BLOCK(hdr_size)],	! header first
    ipcf_block = [$SUB_BLOCK(rec_size)]		! and the first record
    TES;

! Define the size of that block

LITERAL
  ipcf_size = $FIELD_SET_SIZE;

! Define a macro to use to reference this stuff

MACRO
  ipcf_msg = BLOCK [ipcf_size] FIELD (ipcf_fields) %;

! Error codes here, for the time being...

$LITERAL
  mx$_no_dest_node = $DISTINCT,
  mx$_invalid_destination = $DISTINCT,
  mx$_empty_work_request = $DISTINCT,
  mx$_invalid_continuation_packet = $DISTINCT,
  mx$_no_such_message = $DISTINCT,
  mx$_invalid_node_name = $DISTINCT,
  mx$_no_message_file = $DISTINCT,
  mx$_wrong_domain = $DISTINCT,
  mx$_duplicate_message_file = $DISTINCT;

!++[303] Add this macro for use in MX$GET_USERNAME
! Macro SPECIAL_CHARACTERS
!
!   This macro expands to a list of 128 1's and 0's separated by commas.  There
!   will be a 1 in the position of each special character, and a 0 in all other
!   positions.  For example: SPECIAL_CHARACTERS('@') will expand to 64 0's
!   followed by a 1, followed by 63 0's. The parameter must be a quoted string.
!   At present, non-printing characters cannot be represented, and the
!   parameters must be listed in ascending alphabetical order.
!   
!   This macro is used to build a CH$TRANSTABLE for an efficient check for
!   special characters.
!--
MACRO
    special_characters(s) =
        spec_char(%EXPLODE(s)) %,

    spec_char(c)[]=
        %IF %COUNT LSS 127
        %THEN
            %IF %ISSTRING(c)
            %THEN
                %IF %COUNT NEQ %C c 
                %THEN 
                    0 ,spec_char(c,%REMAINING)
                %ELSE
                    %IF %NULL(%REMAINING)
                    %THEN
                        1 ,spec_char(0)
                    %ELSE
                        1 ,spec_char(%REMAINING)
                    %FI
                %FI
            %ELSE
                0, spec_char(0)
            %FI
        %ELSE
            %IF %ISSTRING(c)
            %THEN
                %IF %COUNT NEQ %C c
                %THEN 
                    0 
                %ELSE
                    1
                %FI
            %ELSE
                0
            %FI
        %FI
    %;