Trailing-Edge
-
PDP-10 Archives
-
decuslib10-08
-
43,50512/msg.req
There are no other files named msg.req in the archive.
%IF (%VARIANT AND 2) NEQ 0
%THEN MACRO PPREFIX=%ASCIZ'NET'%;
%ELSE MACRO PPREFIX=%ASCIZ'RMC'%;
%FI
MACRO MSG(BC,EC)[]=
BEGIN
TYPE(BC,PPREFIX,PREFIX);
%IF %DECLARED(NB) %THEN
BEGIN
EXTERNAL ROUTINE TNPFX;
TNPFX(NB[FILE$START]);
END;
%FI
TYPE(' ',%REMAINING,EC);
END%;
MACRO CMSG(LVL,BC,EC)[]=
BEGIN
LOCAL STR: VECTOR[CH$ALLOCATION(132)],
PTR;
EXTERNAL ROUTINE MOVEAZ;
PTR=CH$PTR(STR); !Start of string
MOVEAZ(%REF(CH$PTR(UPLIT(
%ASCIZ %STRING(BC,PPREFIX,PREFIX)))),PTR);
%IF %DECLARED(NB) %THEN
BEGIN
EXTERNAL ROUTINE NPFX;
NPFX(NB[FILE$START],PTR);
END;
%FI
MOVEAZ(%REF(CH$PTR(UPLIT(
%ASCIZ %STRING(' ',%REMAINING,EC)))),PTR);
IFMSG(LVL,(TSTR_NOLOG(STR))); !Type on terminal maybe
LOGS(STR); !Log always
END%;
MACRO INFO[]=MSG('[',%STRING(']',CRLF),%REMAINING) %;
MACRO INFO_NCRLF[]=MSG('[',,%REMAINING)%;
MACRO ERR[]=MSG('%%',CRLF,%REMAINING)%;
MACRO ERR_NCRLF[]=MSG('%%',,%REMAINING)%;
MACRO WRN[]=MSG('%',CRLF,%REMAINING)%;
MACRO WRN_NCRLF[]=MSG('%',,%REMAINING)%;
MACRO CINFO(LVL)[]=CMSG(LVL,'[',%STRING(']',CRLF),%REMAINING) %;
MACRO CWRN(LVL)[]=CMSG(LVL,'%',CRLF,%REMAINING) %;
MACRO CERR(LVL)[]=CMSG(LVL,'%%',CRLF,%REMAINING) %;
MACRO CINFO_NCRLF(LVL)[]=CMSG(LVL,'[',,%REMAINING) %;
MACRO CWRN_NCRLF(LVL)[]=CMSG(LVL,'%',,%REMAINING) %;
MACRO CERR_NCRLF(LVL)[]=CMSG(LVL,'%%',,%REMAINING) %;
MACRO BITF(NNN)=[(NNN/%BPVAL),(NNN MOD %BPVAL),1,0]%;
FIELD MLEVEL_FIELDS=SET
MLEVEL$RJOB=BITF(2), !Remote job start/end
MLEVEL$LJOB=BITF(3), !Local job
MLEVEL$RJERR=BITF(4), !Remote job error
MLEVEL$LJERR=BITF(4), !Local job error
MLEVEL$RCD=BITF(1), !Remote connect/disconnect
MLEVEL$LCD=BITF(1), !Local connect/disconnect
MLEVEL$WARN=BITF(5), !Warning messages
MLEVEL$ALL=[0,1,5,0], !All of the above
MLEVEL$ANY=[0,0,%BPVAL,0], !Anything set
MLEVEL$DEBUG=BITF(6),
MLEVEL$TRACE=BITF(7)
TES;
MACRO IFMSG(LVL,BLK)= !Execute BLK if message bit is on
BEGIN
EXTERNAL MLEVEL: BLOCK FIELD(MLEVEL_FIELDS);
IF .MLEVEL[%NAME(MLEVEL$,LVL)] NEQ 0
THEN (BLK)
END%;
MACRO IFNOTMSG(LVL,BLK)= !Execute BLK if message bit is OFF
BEGIN
EXTERNAL MLEVEL: BLOCK FIELD(MLEVEL_FIELDS);
IF .MLEVEL[%NAME(MLEVEL$,LVL)] EQL 0
THEN (BLK)
END%;
MACRO DEBUGMSG[]=
%IF %DECLARED(FTDEBUG) %THEN
%IF FTDEBUG %THEN
IFMSG(DEBUG,(((%REMAINING))));
%FI
%FI %;