Trailing-Edge
-
PDP-10 Archives
-
decuslib10-08
-
43,50512/rmccon.bli
There are no other files named rmccon.bli in the archive.
MODULE RMCCONTROL(!RMCOPY MAIN CONTROL AND INITIALIZATION ROUTINE
IDENT = '12'
) =
BEGIN
! COPYRIGHT (C) 1978
! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754
!
! THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A SINGLE
! COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE INCLUSION OF THE
! ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR ANY OTHER COPISE THEREOF,
! MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON
! EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE
! TERMS. TITLE TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES
! REMAIN IN DEC.
!
! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
! AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
! CORPORATION.
!
! DEC ASSUMES NO RESPONSIBLILTY FOR THE USE OR RELIABILITY OF ITS
! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
!
!++
! FACILITY:
! RMCOPY TRANSPORTABLE CODE
!
! ABSTRACT:
! This module IS THE MAIN CONTROL ROUTINE FOR THE RMCOPY PROGRAM. IT CONTAINS
! THE CONTROL ROUTINE AND MOST GLOBAL DECLARATIONS FOR
! THE TRASPORTABLE RMCOPY CODE.
!
! ENVIRONMENT:
! TRANSPORTABLE
!
! AUTHOR: JOHN DEROSE, CREATION DATE: FEB 1978
!
! MODIFIED BY:
!
!--
! TABLE OF CONTENTS:
!
FORWARD ROUTINE
RMC_ENTRY_EXIT; !RMCOPY TRANPORTABLE ENTRY/EXIT ROUTINE
!
! DEFINITION LIBRARY FILES:
!
LIBRARY 'RMCOPY'; !The interface to the system-independent portion
!
!
!
! CONDITIONAL COMPILATION:
!
%IF FTTOPS10 %THEN %INFORM ('RMCOPY FOR TOPS10') %FI
%IF FTTOPS20 %THEN %INFORM ('RMCOPY FOR TOPS20') %FI
%IF FTVAX %THEN %INFORM ('RMCOPY FOR VAX') %FI
!
!
! MACROS:
!
!
! EQUATED SYMBOLS:
!
!
! OWN STORAGE:
!
!
! EXTERNAL REFERENCES:
!
EXTERNAL ROUTINE
MSGERR, !MESSAGE/ERROR ROUTINE
GETPATH, !GET DEFAULT USERNUM AND SFD PATH
GETVRS, !GET VERSION ROUTINE
GET_LOCAL_NODEI, !GET LOCAL NODE ID ROUTINE
RMC_MSG, !RMC MSG TTY-OUTPUT ROUTINE
RMC_SCAN, !CONTROL ROUTINE FOR SYNTAX/SWITCH CHECK
RMC_PARSE,RMC_SEMANTIC,ZEROBLK;
!
!
! GLOBAL STORAGE
!
GLOBAL
TOTALCHARCOUNT,
RMCVRS:CH$SEQUENCE[MAX$VERSIZE],
STRG_1:CH$SEQUENCE[MAX$CMDSIZE],
!STRGE_1 CONTAINS THE ORIGINAL CMD STRING BEING EXECUTED
STRG_2:CH$SEQUENCE[MAX$CMDSIZE/2],
!STRGE_2 IS A WORKING STORAGE
STRG_3:CH$SEQUENCE[MAX$CMDSIZE/2],
!STRG_3 IS THE WORKING STORAGE ONLY
STRG_4:CH$SEQUENCE[MAX$CMDSIZE/2],
!STRGE_4 CONTAINS THE SRC FILE SPEC IN THE END
STRG_5:CH$SEQUENCE[MAX$CMDSIZE/2],
!STRG_5 CONTAINS THE LOG FILE SPEC IN THE END
STRG_6:CH$SEQUENCE[MAX$CMDSIZE/2],
!STRG_6 CONTAINS THE DST FILE TEXT STRING IN THE END
USER_NUM:CH$SEQUENCE[MAX$USERNUMSIZE],
USER_PATH:CH$SEQUENCE[MAX$PATHSIZE],
DEV_PATH:CH$SEQUENCE[MAX$DEVSIZE],
CHK_BLK:VECTOR[CHK$SIZE_ARG],
SOURCE_FILEBLK:VECTOR[FILE$SIZE_ARG],
LNSTRG: CH$SEQUENCE[MAX$NODESIZE]; !LOCAL NODE TEXT STRING STORAGE SPACE
GLOBAL BIND
LOG_EXT_DEFAULT=PLIT(%ASCIZ'LOG');
GLOBAL BIND
CMD_EXT_DEFAULT=PLIT(%ASCIZ'CMD');
GLOBAL BIND
CMD_NAM_DEFAULT=PLIT(%ASCIZ'RMCOPY');
GLOBAL
EVALBLK: VECTOR[EVAL$SIZE],SDRMCBLK: VECTOR[SD$SIZE];
GLOBAL ROUTINE RMC_ENTRY_EXIT(PROMPTFLAG)=
!++
!
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
!
! IMPLICIT INPUTS:
!
! IMPLICIT OUTPUTS:
!
! ROUTINE VALUE:
!
! SIDE EFFECTS:
!
!--
BEGIN
LABEL LOOP;
LOCAL EVALPTR: REF EVAL_BLK,
SDBKPTR: REF SD_RMCBLK;
LOCAL DUMMY5;
LOCAL PTR,PTR1,CHKERROR;
EVALPTR=EVALBLK;
SDBKPTR=SDRMCBLK;
SELECTONE .PROMPTFLAG OF
SET
[MAIN$NOPROMPT]:BEGIN END;
[MAIN$PROMPT]:BEGIN
PTR=CH$PTR(RMCVRS);
CH$FILL(%O'0',MAX$VERSIZE,.PTR);
!FIND VERSION NUMBER AND OUTPUT IF ON TTY
GETVRS(.PTR,MAX$VERSIZE-1);
RMC_MSG(RMCRMV,S$CRLFMSG);
MSGERR(.PTR,S$MSGCRLF);
!OUTPUT INPUT REQUEST MSG
RMC_MSG(RMCRMC,S$CRLFMSG);
END;
[OTHERWISE]:RETURN -1
TES;
ZEROBLK(EVALBLK,EVAL$SIZE);
LOOP:BEGIN
WHILE 1 DO
BEGIN
!GET LOCAL USERNUM(PPN) AND SFD PATH
!STORAGE VALUES FOR FUTURE REFERENCES
PTR=EVALPTR[EVAL$USERNUMPTR]=CH$PTR(USER_NUM);
PTR1=EVALPTR[EVAL$USERSFDPTR]=CH$PTR(USER_PATH);
SELECTONE GETPATH(PTR,MAX$USERNUMSIZE,PTR1,MAX$SFDSIZE) OF
SET
[GETPATH$OK]:BEGIN
EVALPTR[EVAL$USERNUMCNT]=CH$DIFF(.PTR,.EVALPTR[EVAL$USERNUMPTR]);
EVALPTR[EVAL$USERSFDCNT]=CH$DIFF(.PTR1,.EVALPTR[EVAL$USERSFDPTR]);
END;
[GETPATH$FAIL]:RETURN RMC_MSG(RMCI13,S$SEVERE);
TES;
ZEROBLK(SDRMCBLK,SD$SIZE);
!SET DEFAULT REQUEST PRIORITY LEVEL
SDBKPTR[SD$PRIOR]=10;
EVALPTR[EVAL$COMSTAT]=0;
PTR=CH$PTR(LNSTRG);
CH$FILL(%O'0',MAX$NODESIZE,.PTR);
EVALPTR[EVAL$LOCALPTR]=CH$PTR(LNSTRG); !SET UP LOCAL NODE TEXT STRING PTR
!FIND OUT WHAT THE LOCAL NODEID IS
IF (EVALPTR[EVAL$LOCALCC]=GET_LOCAL_NODEI(EVALPTR[EVAL$LOCALPTR],MAX$NODESIZE-1)) LEQ 0
THEN BEGIN
SELECTONE .EVALPTR[EVAL$LOCALCC] OF
SET
[ZERO]: RETURN RMC_MSG(RMCI11,S$SEVERE);
[G_L_N$FAI]: RETURN RMC_MSG(RMCI12,S$SEVERE);
[OTHERWISE]: RETURN RMC_MSG(RMCI11,S$SEVERE)
TES
END
ELSE
EVALPTR[EVAL$LOCALPTR]=CH$PTR(LNSTRG); !SET UP LOCAL NODE TEXT STRING PTR
!FIND OUT THE SPECIFICS OF THE LOCAL NODE ID AND
!SAVE THEM FOR COMPARSION.
%IF FTTOPS10 %THEN SDBKPTR[SD$LDAP_NOD]=DAP$TOPS10; %FI
%IF FTTOPS20 %THEN SDBKPTR[SD$LDAP_NOD]=DAP$TOPS20; %FI
%IF FTVAX %THEN SDBKPTR[SD$LDAP_NOD]=DAP$RESERVED; %FI
!REQUEST INPUT FLAG FOR INITIAL INPUT
EVALPTR[EVAL$S_MORE]=1;
IF (CHKERROR= RMC_SCAN() ) LSS 0 THEN RETURN .CHKERROR;
IF .EVALPTR[EVAL$S_KILL] OR .EVALPTR[EVAL$S_LIST]
THEN IF .EVALPTR[EVAL$S_INDCOMPL]
THEN ELSE RETURN ZERO
ELSE BEGIN
IF .EVALPTR[EVAL$S_INPUTEOF]
THEN RETURN ZERO;
IF (CHKERROR= RMC_PARSE() ) LSS 0 THEN RETURN .CHKERROR;
IF (CHKERROR= RMC_SEMANTIC() ) LSS 0 THEN RETURN .CHKERROR;
END;
IF .EVALPTR[EVAL$S_INPUTEOF] OR NOT .EVALPTR[EVAL$S_INDCOMPL]
THEN RETURN ZERO;
CHKERROR=.EVALPTR[EVAL$GLOBSTAT]; !SAVE GLOBAL STATUS
ZEROBLK(EVALBLK,EVAL$SIZE);
EVALPTR[EVAL$GLOBSTAT]=.CHKERROR;
END;
END; !END-OF-LOOP
END;
END
ELUDOM