Trailing-Edge
-
PDP-10 Archives
-
bb-h138e-bm_tops20_v6_1_distr
-
language-sources/setai.bli
There are 21 other files named setai.bli in the archive. Click here to see a list.
MODULE SETAI ( ! Extract access info from node ID, or put it in
IDENT = '2'
%BLISS36(,
ENTRY(
SETAI, ! Nodeid with access info -> NLB
SETAIF ! NLB -> Nodeid with access info
))
) =
BEGIN
! COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1981, 1985.
! 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:
!
! ABSTRACT:
!
!
! ENVIRONMENT:
!
! AUTHOR: , CREATION DATE:
!
! MODIFIED BY:
!
! , : VERSION
! 01 -
!--
!
! TABLE OF CONTENTS:
!
FORWARD ROUTINE
SETAI: NOVALUE,
SETAIF: NOVALUE;
!
! INCLUDE FILES:
!
LIBRARY 'BLISSNET';
LIBRARY 'BLI:XPORT';
!
! MACROS:
!
MACRO DESCRIPTOR_LENGTH[]=FIXED_DESC_LEN %;
MACRO ALLOCATE_DESCRIPTOR[]=
(LOCAL DESC: REF $STR_DESCRIPTOR(%REMAINING);
$XPO_GET_MEM(UNITS=DESCRIPTOR_LENGTH(%REMAINING),
RESULT=DESC,
FILL=0);
$STR_DESC_INIT(%REMAINING, DESCRIPTOR=.DESC);
.DESC) %;
MACRO ALLOCATED_DESCRIPTOR[]=ALLOCATE_DESCRIPTOR(%REMAINING):
$STR_DESCRIPTOR(%REMAINING) %;
!
! EQUATED SYMBOLS:
!
LITERAL
FIXED_DESC_LEN = STR$K_F_BLN , ! Length of a fixed descriptor
DYNAMIC_DESC_LEN = STR$K_D_BLN , ! Length of a dynamic descriptor
BOUNDED_DESC_LEN = STR$K_B_BLN , ! Length of a bounded descriptor
DYNAMIC_BOUNDED_DESC_LEN = STR$K_DB_BLN ; ! dynamic bounded descriptor
!
! OWN STORAGE:
!
!
! EXTERNAL REFERENCES:
!
GLOBAL ROUTINE SETAI (NLB,NODESPEC) :NOVALUE = !
!++
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
!
! NLB: Addr of NLB
! NODESPEC: Descriptor for nodeid (with possible access info in it)
!
! IMPLICIT INPUTS:
!
! NONE
!
! IMPLICIT OUTPUTS:
!
! NONE
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE
!
! SIDE EFFECTS:
!
! STRING DESCRIPTORS WILL BE ALLOCATED FOR NODE, USERID, PASSWORD
! ACCOUNT, & OPTIONAL DATA IF PRESENT IN NODEID
!
!--
BEGIN
MAP NODESPEC: REF $STR_DESCRIPTOR(CLASS=BOUNDED),
NLB:REF $XPN_NLB();
BIND
NODEID=ALLOCATED_DESCRIPTOR(CLASS=FIXED),
USERID= ALLOCATED_DESCRIPTOR(CLASS=FIXED),
PASSWORD= ALLOCATED_DESCRIPTOR(CLASS=FIXED),
ACCOUNT=ALLOCATED_DESCRIPTOR(CLASS=FIXED),
OPTIONAL= ALLOCATED_DESCRIPTOR(CLASS=FIXED);
LOCAL
D; ! Delimiter
$STR_SCAN(REMAINDER=.NODESPEC,STOP='":',DELIMITER=D,
SUBSTRING=.NODESPEC);
$STR_DESC_INIT(DESCRIPTOR=NODEID,STRING=.NODESPEC);
NLB[NLB$A_NODE_NAME]=NODEID;
IF .D EQL %C'"'
THEN
BEGIN
$STR_SCAN(REMAINDER=.NODESPEC,SPAN='"',SUBSTRING=.NODESPEC);
$STR_SCAN(REMAINDER=.NODESPEC,STOP='" ',DELIMITER=D,
SUBSTRING=.NODESPEC);
$STR_DESC_INIT(DESCRIPTOR=USERID,STRING=.NODESPEC);
NLB[NLB$A_USER_ID]=USERID;
IF .D EQL %C' '
THEN
BEGIN
$STR_SCAN(REMAINDER=.NODESPEC,SPAN=' ',SUBSTRING=.NODESPEC);
$STR_SCAN(REMAINDER=.NODESPEC,STOP='" ',DELIMITER=D,
SUBSTRING=.NODESPEC);
$STR_DESC_INIT(DESCRIPTOR=PASSWORD,STRING=.NODESPEC);
NLB[NLB$A_PASSWORD]=PASSWORD;
IF .D EQL %C' '
THEN
BEGIN
$STR_SCAN(REMAINDER=.NODESPEC,SPAN=' ',SUBSTRING=.NODESPEC);
$STR_SCAN(REMAINDER=.NODESPEC,STOP='" ',DELIMITER=D,
SUBSTRING=.NODESPEC);
$STR_DESC_INIT(DESCRIPTOR=ACCOUNT,STRING=.NODESPEC);
NLB[NLB$A_ACCOUNT]=ACCOUNT;
IF .D EQL %C' '
THEN
BEGIN
$STR_SCAN(REMAINDER=.NODESPEC,SPAN=' ',SUBSTRING=.NODESPEC);
$STR_SCAN(REMAINDER=.NODESPEC,STOP='" ',DELIMITER=D,
SUBSTRING=.NODESPEC);
$STR_DESC_INIT(DESCRIPTOR=OPTIONAL,STRING=.NODESPEC);
NLB[NLB$A_OPTIONAL]=OPTIONAL
END;
END;
END;
END;
END; !End of SETAI
GLOBAL ROUTINE SETAIF (NLB,NODESPEC) :NOVALUE =
!++
! FUNCTIONAL DESCRIPTION:
!
! Convert nodeid/access info in NLB to spec
! (The reverse of what SETAI does)
!
! FORMAL PARAMETERS:
!
! NLB: Addr of NLB
! NODESPEC: Descriptor to store nodespec
!
! IMPLICIT INPUTS:
!
! NONE
!
! IMPLICIT OUTPUTS:
!
! NONE
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE
!
! SIDE EFFECTS:
!
!
!--
BEGIN
MAP NODESPEC: REF $STR_DESCRIPTOR(CLASS=BOUNDED),
NLB:REF $XPN_NLB();
BIND
NODEID=.NLB[NLB$A_NODE_NAME]: $STR_DESCRIPTOR(CLASS=FIXED),
USERID= .NLB[NLB$A_USER_ID]: $STR_DESCRIPTOR(CLASS=FIXED),
PASSWORD=.NLB[NLB$A_PASSWORD]: $STR_DESCRIPTOR(CLASS=FIXED),
ACCOUNT= .NLB[NLB$A_ACCOUNT]: $STR_DESCRIPTOR(CLASS=FIXED),
OPTIONAL= .NLB[NLB$A_OPTIONAL]: $STR_DESCRIPTOR(CLASS=FIXED);
$STR_COPY(STRING=NODEID, TARGET=.NODESPEC);
IF USERID NEQ 0
THEN ($STR_APPEND(STRING=$STR_CONCAT('"',USERID), TARGET=.NODESPEC);
IF PASSWORD NEQ 0
THEN ($STR_APPEND(STRING=$STR_CONCAT(' ',PASSWORD),
TARGET=.NODESPEC);
IF ACCOUNT NEQ 0
THEN ($STR_APPEND(STRING=$STR_CONCAT(' ',ACCOUNT),
TARGET=.NODESPEC);
IF OPTIONAL NEQ 0
THEN $STR_APPEND(STRING=$STR_CONCAT(' ',OPTIONAL),
TARGET=.NODESPEC);
)
);
$STR_APPEND(STRING='"',TARGET=.NODESPEC);
);
$STR_APPEND(STRING='::', TARGET=.NODESPEC);
END; !End of SETAIF
END !End of module
ELUDOM