! DEC/CMS REPLACEMENT HISTORY, Element DDIF$INTDEF.R32 ! *1 25-MAR-1988 17:17:27 ALLISON "Initial entry into DECwindows V1" ! DEC/CMS REPLACEMENT HISTORY, Element DDIF$INTDEF.R32 !++ ! ! DDIF$INTDEF.R32 - DDIF_to_Text Extension Internal Definitions ! IDENT = X-2 ! !-- ! COPYRIGHT (c) 1988 BY ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. ! ALL RIGHTS RESERVED. ! ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ! ONLY IN ACCORDANCE OF 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: ! ! RMSEXT - RMS DDIF_to_Text Extension ! ! ABSTRACT: ! ! This require file contains the literals, macros, and global variables ! used by the DDIF_to_Text modules for the RMS extension. ! ! ENVIRONMENT: ! ! EXEC mode ! ! AUTHORS: ! ! Pat Justus ! ! CREATION DATE: ! ! 15-FEB-1988 ! ! MODIFICATION HISTORY: ! ! X-2 MCH0036 Martin C. Heermance 12-Oct-1989 ! Add SCAN_XAB_CHAIN macro to aid in the definition of ! arguments to scan_xab_chain. ! ! X-1 GJA0100 Gary J. Allison 17-Jun-1988 ! Remove DEXT$K_DEC_MCS literal. ! !-- ! ! State definitions ! literal DEXT$K_STATE_0 = 0; literal DEXT$K_STATE_1 = 1; literal DEXT$K_STATE_2 = 2; literal DEXT$K_STATE_3 = 3; literal DEXT$K_STATE_4 = 4; literal DEXT$K_STATE_5 = 5; ! DDIF/DDIS Definitions ! literal DEXT$K_TAG_TXT = 67; literal DEXT$K_TAG_GTX = 68; literal DEXT$K_TAG_HRD = 73; literal DEXT$K_TAG_SFT = 74; literal DEXT$K_NEW_PAGE = 1; literal DEXT$K_NEW_LINE = 2; literal DEXT$K_NEW_GALLEY = 3; literal DEXT$K_TAB = 4; literal DEXT$K_SPACE = 5; literal DEXT$K_ISO_LATIN1 = 1; literal DEXT$K_DDIFDOCUMENT = 8388607; ! Private constructor 16383 literal DEXT$K_DOC_CONTENT = 162; ! Context constructor 162 literal DEXT$K_EOC = 0; literal DEXT$K_END_OF_SEG = 65; ! Application primitive 1 literal DEXT$K_OCTET_STRING = 4; ! Status and completion codes ! literal DEXT$K_SUCCESS = 1; literal DEXT$K_END_OF_RECORD = 2; ! A "failure" status to indicate end of record literal DEXT$K_END_OF_DOC = 4; ! A "failure" status to indicate end of document literal DEXT$K_END_OF_FILE = 6; literal DEXT$K_INVTAGLEN = 10; ! Invalid tag length literal DEXT$K_INVDOC = 12; ! Invalid document literal DEXT$K_UNEXP_EOF = 14; ! End of file occurred before end of document literal DEXT$K_INVLEN = 16; ! Invalid length literal DEXT$K_INV_CTXBLK = 18; ! Invalid context block ! ! literal DEXT$M_FORM_BIT = 32; literal DEXT$K_FORMFEED = %X'0C'; literal DEXT$K_CAR_RET = %X'0D'; literal DEXT$K_ASCII_SPACE = %X'20'; literal DEXT$K_ASCII_TAB = %X'09'; ! Misc. defs. ! literal DEXT$K_FIXED_RECORD_SIZE = 512, DEXT$K_CONF_MAX_RECORD_SIZE = 2048; ! ! ! Context Block Data Structure ! ! FIELD CTX$CONTEXT_BLOCK_FIELDSET = SET CTX$R_DATABUFFER = [0,0,0,0], ! The data buffer where data read from the disk may be stored. This ! is the buffer used by the extension that is passed in via the RAB ! for calls to GET_REC_AT_NRP. CTX$A_DATA_BUFEND = [512,0,32,0], ! The address of the end of the data buffer. This value is calulated by ! adding 512 to the buffer address returned by RMS in the RBF field. CTX$A_DATAPTR = [516,0,32,0], ! The address of the current position in the data buffer. When a new ! buffer is retrieved this CTX$L_INPUT_TAG = [520,0,32,0], ! The tag as it is read from the data stream CTX$V_TAG_ID = [520,0,5,0], CTX$V_TAG_FORM = [520,5,1,0], CTX$V_TAG_CLASS = [520,6,2,0], CTX$V_EXTENDED_ID_1 = [520,8,7,0], CTX$V_EXTENSION_BIT_1 = [520,15,1,0], CTX$V_EXTENDED_ID_2 = [520,16,7,0], CTX$V_EXTENSION_BIT_2 = [520,23,1,0], CTX$V_EXTENDED_ID_3 = [520,24,7,0], CTX$V_EXTENSION_BIT_3 = [520,31,1,0], CTX$B_INPUT_TAG0 = [520,0,8,0], ! Alias for INPUT_TAG byte 0. CTX$B_INPUT_TAG1 = [521,0,8,0], ! Alias for INPUT_TAG byte 1. CTX$B_INPUT_TAG2 = [522,0,8,0], ! Alias for INPUT_TAG byte 2. CTX$B_INPUT_TAG3 = [523,0,8,0], ! Alias for INPUT_TAG byte 3. CTX$L_LENGTH = [524,0,32,0], ! The length of the tag just read expressed as a VAX integer CTX$L_PARTIAL_LEN = [528,0,32,0], ! The amount of data to move from the data buffer to the text buffer ! or the amount of data to skip in the data buffer. CTX$L_ACTUAL_LEN = [532,0,32,0], ! The amount of data that is actually returned to the user CTX$L_STRING_LEN = [536,0,32,0], ! The total length of a constructed string CTX$L_SKIP_LEN = [540,0,32,0], ! The amount of data that has been skipped when the entire record ! does not fit in the user's buffer. It is added to the actual length ! to get the record lenght CTX$L_RECORD_LEN = [544,0,32,0], CTX$A_TEXT_BUFSTART = [548,0,32,0], ! The address of the user buffer where text content that is filtered ! from a DDIF file is placed. It is the buffer from the user RAB. CTX$A_TEXT_BUFEND = [552,0,32,0], ! The address of the end of the user buffer. It is determined from the ! user buffer size in the user RAB CTX$A_TEXTPTR = [556,0,32,0], ! The address of the current position in the user text buffer. It is set ! to the address of text_bufstart at the start of the GET routine CTX$L_CUR_VBN = [560,0,32,0], ! The Virtual Block Number (VBN) of the current input record that is being ! processed. It is initialized to 0. CTX$L_TAG_VBN = [564,0,32,0], ! The VBN of the first tag byte. At the start of a new text record it is ! stored as the record_VBN CTX$L_TAG_OFFSET = [568,0,32,0], ! The byte offset in the block specified by the tag_VBN where the DDIS ! tag is located. CTX$L_RECORD_VBN = [572,0,32,0], ! The VBN that is returned to the user in the RFA field in the user RAB. ! It is the block of the tag_VBN which started this user record. CTX$L_RECORD_OFFSET = [576,0,32,0], ! The tag_offset in the record_VBN where the DDIS tag for this record is ! located. CTX$W_TL_COUNT = [580,0,16,0], ! The tag_length count is accumulated in the GET_TAG_AND_LENGTH routine ! and is used in maintaining an accurate count of the string_length ! for counted constructed strings CTX$B_STATE = [582,0,8,0], CTX$B_FLAGS = [583,0,8,0], CTX$V_COUNTED = [583,0,1,0], ! If set, the constructor is counted ! If clear, the constructor is uncounted CTX$V_FIRST_STRING = [583,1,1,0], ! If set, this is the first string of a GTX constructed string ! If clear, this is not the first string of a GTX constructed string CTX$V_BUFFEROVF = [583,2,1,0], ! If set, the user buffer is too small to hold all the text ! If clear, the user buffer is large enough CTX$V_FIND_SVC = [583,3,1,0], ! If set, this is a FIND service call ! If clear, this is a GET service call CTX$V_END_OF_DOC = [583,4,1,0], ! If set, the end of a DDIF document has been encountered ! If clear, the end of a DDIF document has not been encountered CTX$V_END_OF_FILE = [583,5,1,0], ! If set, EOF was encountered before end of document ! If clear, EOF was not encountered before end of document CTX$V_LAST_FUNCTION = [583,6,1,0], ! If set, last function was ! Find CTX$V_END_FLAGS = [583,7,1,0], ! Spare flags CTX$L_SAVED_RBF = [584,0,32,0], CTX$L_SAVED_ROP = [588,0,32,0], CTX$W_SAVED_RSZ = [592,0,16,0], CTX$L_SAVED_UBF = [594,0,32,0], CTX$W_SAVED_USZ = [598,0,32,0], CTX$L_TEMP = [602,0,32,0], ! Work space for the MOVE_TEXT routine. CTX$L_REMAINING_LEN = [606,0,32,0], ! Modifiable version of CTX$L_LENGTH. CTX$A_DATA_BUFSTART = [610,0,32,0], CTX$L_CONSTRUCTOR_COUNT = [ 614,0,32,0 ], CTX$L_DIRECTIVE = [ 618,0,32,0 ], CTX$L_TAG = [ 622,0,32,0 ], CTX$B_CHAR_ID = [ 626,0,8,0 ] TES; literal CTX$S_CONTEXT_BLOCK = 627; MACRO $CONTEXT_BLOCK = BLOCK [CTX$S_CONTEXT_BLOCK,BYTE] FIELD (CTX$CONTEXT_BLOCK_FIELDSET) %; !++ ! SCAN_XAB_CHAIN ! ! Macro used to call the RM$SCAN_XAB_CHAIN routine with the top of the stack ! pointing to the required XAB scan processing structures for the caller ! specified XAB types. ! ! Usage: ! ! routine_value = SCAN_XAB_CHAIN( xab_entry { , xab_entry } ) ! ! Where each xab_entry can be one of the follow three types: ! ! xab_entry := ! ! (CODE=xab_suffix, UNQ=uniqueness_suffix, ROUTIN=routine), ! ! (CODE=SET, ITMCODE=itmcod_suffix, NUMCODE=number_of_codes, ! UNQ=uniqueness_suffix, ROUTIN=routine) ! ! (CODE=SENSE, ITMCODE=itmcod_suffix, NUMCODE=number_of_codes, ! UNQ=uniqueness_suffix, ROUTIN=routine) ! ! Each xab_entry type can be specified in any order. The xab_entry parameters ! are keyword based and can be specified in any order. The following default ! values are used: UNQ=NOTUNI and NUMCODE=1. ! ! Example usage: ! ! STATUS = SCAN_XAB_CHAIN ( ! (CODE=ALL, UNQ=ALL, ROUTIN=FOO1), ! (CODE=RU, ROUTIN=FOO2), ! (CODE=SET, ITMCODE=ACCESS_SEMANTICS, NUMCODE=2, ROUTIN=FOO3), ! (CODE=SENSE, ITMCODE=STORED_SEMANTICS, ROUTIN=FOO4), ! (CODE=SENSE, ITMCODE=NET_LINK_TIMEOUT, ROUTIN=FOO5) ! ); ! !-- MACRO SCAN_XAB_CHAIN [] = BEGIN ! If the RMS$SCAN_XAB_CHAIN routine has not been declared in this scope, ! then declare it in this block with the default linkage which depends ! on whether we are in a FAB or RAB environment. ! %IF NOT %DECLARED(RMS$SCAN_XAB_CHAIN) %THEN EXTERNAL ROUTINE RMS$SCAN_XAB_CHAIN: %IF %DECLARED(FAB) %THEN RMS$LINK_FABREG %ELSE RMS$LINK_RABREG %FI ADDRESSING_MODE(GENERAL); %FI ! All XAB processing entry structures should go into the _RMS$XAT psect. ! PSECT PLIT = _DDIF$XAT(READ, WRITE, NOEXECUTE, ALIGN(3), NOPIC, CONCATENATE, ADDRESSING_MODE(GENERAL)); ! Call RM$XAB_SCAN and return its value ! RMS$SCAN_XAB_CHAIN( UPLIT($$XAB_ENTRY_ARG('XAB',%REMAINING), $$XAB_ENTRY_ARG('SET',%REMAINING), $$XAB_ENTRY_ARG('SENSE',%REMAINING)) ) END % ;