! MSGMAC.REQ -- Some general purpose definitions for PRETTY !++ ! Facility: PRETTY ! ! Abstract: ! ! This file contains the $BLF_MESSAGE macro. ! ! Environment: Transportable ! ! Creation Date: MAY 1981 ! !-- ! This file assumes that the declaration ! ! LIBRARY 'XPORT:' ; ! ! or equivalent has already appeared in the program. !++ ! What follows is the set of declarations that are needed by any module ! that makes calls to the message facility. ! ! This set of declarations includes: ! ! - The declaration of the keyword macro that serves as the interface ! to the message facility. ! - An External Literal declaration referring to the message codes ! that are declared in the error message file. ! - A Literal declaration defining the integer codes that ! specify the type of error message to be written. ! - An External Routine declaration referring to the routine ! that the macro calls. The actual routine is declared in ! its own separate module (MSGMOD.BLI). ! !-- ! ! MACROS: ! KEYWORDMACRO $blf_message ( type = -1 , code = -1 , xcode = -1 , string = , fao1 = -1 , fao2 = -1 ) = !+ ! The main action of the macro is to call the routine BLF$_MSG. ! ! If the STRING parameter is specified in the macro call, the string ! information is stored in a local string descriptor and passed to the ! routine BLF$_MSG as the address of the descriptor. ! ! If the STRING parameter is not specified in the call to the macro, ! then the dummy address -1 is passed as the address of the string ! descriptor. The routine can check the value of the address to determine ! that no string was specified in the call to the macro. !- %IF %NULL (STRING) %THEN BLF$_MSG (type, code, xcode, -1, fao1, fao2) %ELSE BEGIN LOCAL str_desc : $STR_DESCRIPTOR () ; $STR_DESC_INIT (DESCRIPTOR = str_desc , %QUOTE STRING = string) ; BLF$_MSG (type, code, xcode, str_desc, fao1, fao2) ; END %FI % ; ! ! EXTERNAL REFERENCES: ! EXTERNAL LITERAL !+ ! The following literals are the message codes. ! When SIGNAL is called to signal an error, the message associated ! with the error is indicated by the message code. ! ! If any messages are added, deleted, of modified in the message file ! it is necessary to update this list of external ! references. At any given time, this list should be in one-to-one ! correspondence with the messages in the message file. !- PRETTY_ERRSFOUND, PRETTY_BADINFILE , PRETTY_BADOUTFIL , PRETTY_BADLISFIL ; !+ ! The routine that does the message writing is declared as a global routine ! in its own module. Any module that calls it must have this External ! Routine declaration. ! ! The %DECLARED stuff is needed because the module that contains the ! message handling routine also contains this require file. !- %IF NOT %DECLARED (blf$_msg) %THEN EXTERNAL ROUTINE blf$_msg ; %FI ! ! EQUATED SYMBOLS: ! LITERAL !+ ! These literals are integer codes that the caller uses to specify ! the type of message to be written. !- output = 1 , ! Type = Output debug = 2 , ! Type = Debug xport = 3 , ! Type = Xport success = 4 , ! Type = Standard Message informational = 4 , warning = 4 , error = 4 , fatal = 4 ; !++ ! End of declarations needed for the message handling facility !-- ! MSGMAC.REQ -- LAST LINE