MODULE XXMSG ( IDENT = 'X00.11' %TITLE 'XPO$XMSG - XPORT Messages' %BLISS32( ,ADDRESSING_MODE( EXTERNAL=LONG_RELATIVE ) ) %BLISS36( ,ENTRY( XPO$XMSG ),OTS='' ) ) = BEGIN ! ! COPYRIGHT (c) 1980 BY ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. ! ! 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 WHICH IS NOT SUPPLIED BY DIGITAL. ! !++ ! ! FACILITY: BLISS Library ! ! ABSTRACT: ! ! This module returns message text corresponding to an XPORT ! completion code. ! ! ENVIRONMENT: User mode - multiple host operating/file systems ! ! AUTHOR: Ward Clark, CREATION DATE: 18 December 1978 ! !-- ! ! TABLE OF CONTENTS: ! FORWARD ROUTINE XPO$XMSG; ! XPORT message retrieval routine ! ! INCLUDE FILES: ! LIBRARY 'XPORT' ; ! Public XPORT control block and macro definitions LIBRARY 'XPOSYS' ; ! Internal XPORT macro definitions $XPO_SYS_TEST( $TOPS10, $TOPS20, $11M, $RSTS, $RT11 ) ! ! MACROS: ! MACRO xport_setup[ message_info ] = %NAME( 'XPO$_', $XPO$ARG1(%REMOVE(message_info)) ), $XPO$ARG2(%REMOVE(message_info)) %, string_setup[ message_info ] = %NAME( 'STR$_', $XPO$ARG1(%REMOVE(message_info)) ), $XPO$ARG2(%REMOVE(message_info)) %, message_table [] = BLOCKVECTOR[ %LENGTH / 2, msg_entry_size ] INITIAL( message_entry(%REMAINING) ) %, message_entry[ message_name, message_text ] = %IF %BLISS(BLISS16) %THEN message_name, %CHARCOUNT( message_text ), %ELSE message_name + %CHARCOUNT( message_text ) ^ (%BPVAL/2), %FI CH$PTR( UPLIT %BLISS16(BYTE) ( message_text ) ) %; ! ! EQUATED SYMBOLS: ! $FIELD msg_entry_field = SET ! XPORT message table format: msg_code = [$BYTES(2)], ! XPORT completion code msg_length = [$BYTES(2)], ! length of message text msg_text = [$POINTER] ! pointer to message text TES; LITERAL msg_entry_size = $FIELD_SET_SIZE; ! size of a message table entry ! ! PSECT DECLARATIONS: ! $XPO_PSECTS ! Declare XPORT PSECT names and attributes ! ! OWN STORAGE: ! OWN xport_messages : ! Table of all messages: message_table( xport_setup( $XPO_OK_CODE, ! XPORT success message $XPO_WARN_CODE, ! XPORT warning message $XPO_ERROR_CODE, ! XPORT error messages $XPO_FATAL_CODE ), ! XPORT fatal error messages string_setup( $STR_OK_CODE, ! STRING success messages ! $STR_WARN_CODE, ! STRING warning messages (currently none) $STR_ERROR_CODE, ! STRING error messages $STR_FATAL_CODE ), ! STRING fatal error messages 0, '*** invalid XPORT completion code ***' ! invalid code message (must be last) ); ! ! EXTERNAL REFERENCES: ! GLOBAL ROUTINE XPO$XMSG( completion_code, string_desc ) = !++ ! ! FUNCTIONAL DESCRIPTION: ! ! This routine returns message text which corresponds to an XPORT ! completion code. This text is returned by filling in a string ! descriptor which is passed by the caller. ! ! FORMAL PARAMETERS: ! ! completion_code - XPORT completion code ! string_desc - address of a string descriptor to be completed ! ! IMPLICIT INPUTS: ! ! xport_messages - local table of XPORT completion codes and ! associated message text - last table entry is ! a "no match" message ! ! IMPLICIT OUTPUTS: ! ! None ! ! COMPLETION CODES: ! ! XPO$_NORMAL ! ! SIDE EFFECTS: ! ! None ! !-- BEGIN ! ! Search the message text table for the caller's completion code. ! INCR index from 0 DO ! Loop to the end of the table. BEGIN BIND text_desc = ! Map a single message table entry. xport_messages[.index,0,0,0,0] : BLOCK[] FIELD(msg_entry_field); IF .completion_code EQL .text_desc[msg_code] ! Check for a completion code match OR .text_desc[msg_code] EQL 0 ! or the end of the message table ! (last entry is "no match" message). THEN ! ! Fill in the caller's string descriptor with appropriate message information. ! BEGIN $STR_DESC_INIT( DESCRIPTOR = .string_desc, ! Fill in the caller's string descriptor: STRING = ( .text_desc[msg_length], ! length of the message text .text_desc[msg_text] ) ); ! pointer to the message text ! (descriptor completed by the macro) EXITLOOP; ! Exit the search loop. END; END; ! ! Return to the caller. ! RETURN XPO$_NORMAL ! Return a success code to the caller. END; END ELUDOM