*DECK NDLCKPT USETEXT NDLER2T USETEXT NDLPS2T USETEXT NDLTBLT PROC NDLCKPT(PORT,NODE$ID,PORT$STAT); BEGIN *IF,DEF,IMS # ** NDLCKPT - CHECKS FOR DUPLICATE PORT NUMBERS. * * D.K. ENDO 81/10/12 * * THIS PROCEDURE, GIVEN A PORT NUMBER AND NPU NODE I.D., DETERMINES * IF THE PORT NUMBER HAS ALREADY BEEN USED FOR A PREVIOUSLY DEFINED * LINE OR TRUNK. * * PROC NDLCKPT(PORT,NODE$ID,PORT$STAT) * * ENTRY PORT = PORT NUMBER TO BE CHECKED. * NODE$ID = NPU NODE I.D. THAT SUPPORTS PORT. * * EXIT PORT$STAT = RETURNED STATUS, SET TO TRUE IF PORT O.K. * * METHOD * * SEARCH FOR NODE$ID IN NPU TABLE. * IF NPU IS FOUND, * CHECK BIT MAP FOR PORT. * IF BIT IS SET, * THEN, * FLAG ERROR -- DUPLICATE PORT NUMBER. * CLEAR STATUS FLAG. * OTHERWISE, * SET BIT CORRESPONDING TO PORT * SET STATUS FLAG. * # *ENDIF ITEM PORT; # PORT NUMBER TO BE CHECKED # ITEM NODE$ID; # NPU NODE I.D. THAT SUPPORTS PORT # ITEM PORT$STAT B; # RETURN STATUS OF PORT # # **** PROC NDLCKPT - XREF LIST BEGINS # XREF BEGIN PROC NDLEM2; # MAKES ENTRY IN PASS 2 ERROR FILE # FUNC XCHD C(10); # CONVERTS INTEGER TO HEX DISPLAY CODE # END # **** # ITEM CTEMP C(10); # CHARACTER TEMPORARY # ITEM FOUND B; # NODE I.D. FOUND FLAG # ITEM I; # SCRATCH ITEM # ITEM ITEMP; # INTEGER TEMPORARY # ITEM J; # SCRATCH ITEM # CONTROL EJECT; # # # NDLCKPT CODE BEGINS HERE # # # FOUND = FALSE; # CLEAR FOUND FLAG # FOR I=1 WHILE NOT FOUND AND I LS NTWC[0] DO BEGIN IF NODE$ID EQ NTNID[I] THEN # IF NODE I.D. IS FOUND # BEGIN FOUND = TRUE; END ELSE # NOT FOUND YET # BEGIN I = I + NTENTSZ; # POINT TO NEXT ENTRY # END END IF FOUND # NPU WAS FOUND # THEN BEGIN ITEMP = PORT; # SAVE PORT NUMBER IN TEMPORARY # FOR J=0 STEP 1 WHILE ITEMP GQ 0 DO BEGIN # CALCULATE INDEX INTO PORT EXISTS BIP MAP# ITEMP = ITEMP - 60; END ITEMP = ITEMP + 60; IF BNTWORD[I+J] NQ 1 THEN # PORT HAS NOT BEEN USED # BEGIN BNTWORD[I+J] = 1; # SET BIT CORRESPONDING TO PORT # PORT$STAT = TRUE; # RETURN STATUS O.K. # END ELSE # PORT WAS ALREADY USED # BEGIN CTEMP = XCHD(PORT); # CONVERT PORT TO DISPLAY CODE # NDLEM2(ERR102,STLNUM[0],CTEMP); # FLAG ERROR, DUPLICATE PORT # PORT$STAT = FALSE; # RETURN ERROR STATUS # END END ELSE # NODE I.D. NOT FOUND # BEGIN PORT$STAT = FALSE; # RETURN ERROR STATUS # END RETURN; # **** RETURN **** # END # NDLCKPT # TERM