                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 1
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

    0	      1 !
    0	      2 !			  COPYRIGHT (c) 1983, 1984 BY
    0	      3 !	      DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
    0	      4 !
    0	      5 ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
    0	      6 ! ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE
    0	      7 ! INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER
    0	      8 ! COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
    0	      9 ! OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
    0	     10 ! TRANSFERRED.
    0	     11 !
    0	     12 ! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE
    0	     13 ! AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT
    0	     14 ! CORPORATION.
    0	     15 !
    0	     16 ! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS
    0	     17 ! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
    0	     18 !
    0	     19 
    0	     20 !++
    0	     21 ! FACILITY:
    0	     22 !   XPORT - BLISS Transportability Support Package
    0	     23 !
    0	     24 ! ABSTRACT:
    0	     25 !   This REQUIRE file defines non-public XPORT macros and symbols.
    0	     26 !
    0	     27 ! ENVIRONMENT:
    0	     28 !   User mode
    0	     29 !
    0	     30 ! AUTHOR: Ward Clark, CREATION DATE: 17-Mar-81
    0	     31 !
    0	     32 ! MODIFIED BY: Edward G. Freedman
    0	     33 !
    0	     34 ! REVISION HISTORY:
    0	     35 !
    0	     36 !	 3-Apr-84	LYS	Changed $XPO$SYS_IDENT for version 1.3
    0	     37 !
    0	     38 ! END OF REVISION HISTORY
    0	     39 !--

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 2
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

    0	     41 !
    0	     42 ! XPOSYS.REQ - Non-public XPORT Declarations
    0	     43 !
    0	     44 
    0	     45 !
    0	     46 ! XPOSYS.REQ Version Identifier
    0	     47 !
    0	     48 ! This should be updated with every change to XPOSYS.REQ.
    0	     49 ! The corresponding macro in XPORT.REQ ($XPO_IDENT) should be updated
    0	     50 ! according to this same format with every change to that file.
    0	     51 !
    0	     52 !   Format is 	" Avv.ll-gg "
    0	     53 !	where:
    0	     54 !	A is one of {V, T, E, X} (This stands for Version, Test, Engineering_test, eXperimental)
    0	     55 !	vv is version number from XPO$K_VERSION
    0	     56 !	ll is level number from XPO$K_LEVEL
    0	     57 !	gg is generation number of this CMS element
    0	     58 !
    0	     59 
    0	     60 MACRO
    0	     61     $XPO$SYS_IDENT = 'V1.3-16' %;	! Update this with every change to XPOSYS.REQ
    0	     62 
    0	     63 !
    0	     64 ! XPORT System-specific Declarations
    0	     65 !
    0	     66 
    0	     67 MACRO
    0	     68     $TOPS10 =
M   0	     69 	%VARIANT EQL 1 %,
    0	     70 
    0	     71     $TOPS20 =
M   0	     72 	%VARIANT EQL 2 %,
    0	     73 
    0	     74     $VMS =
M   0	     75 	%VARIANT EQL 3 %,
    0	     76 
    0	     77     $11M =
M   0	     78 	%VARIANT EQL 4 %,
    0	     79 
    0	     80     $IAS =
M   0	     81 	%VARIANT EQL 5 %,
    0	     82 
    0	     83     $RSTS =
M   0	     84 	%VARIANT EQL 6 %,
    0	     85 
    0	     86     $RT11 =
M   0	     87 	%VARIANT EQL 7 %,
    0	     88 
    0	     89     $ALL =
M   0	     90 	1 %,
    0	     91 
    0	     92     $XPO_SYS_TEST[ system_flag ] =
M   0	     93 	%IF system_flag
M   0	     94 	%THEN
M   0	     95 	    %IF $TOPS10
M   0	     96 	    %THEN %PRINT( '	This module was compiled for TOPS-10' )
M   0	     97 	    %ELSE %IF $TOPS20

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 3
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

M   0	     98 	    %THEN %PRINT( '	This module was compiled for TOPS-20' )
M   0	     99 	    %ELSE %IF $VMS
M   0	    100 	    %THEN %PRINT( '	This module was compiled for VAX/VMS' )
M   0	    101 	    %ELSE %IF $11M
M   0	    102 	    %THEN %PRINT( '	This module was compiled for RSX-11M' )
M   0	    103  	    %ELSE %IF $IAS
M   0	    104  	    %THEN %PRINT( '	This module was compiled for IAS' )
M   0	    105  	    %ELSE %IF $RSTS
M   0	    106  	    %THEN %PRINT( '	This module was compiled for RSTS' )
M   0	    107  	    %ELSE %IF $RT11
M   0	    108  	    %THEN %PRINT( '	This module was compiled for RT11' )
M   0	    109 	    %ELSE %IF %BLISS(BLISS16)
M   0	    110 	    %THEN %PRINT( '	This module was compiled for any PDP-11 system' )
M   0	    111 	    %ELSE %IF %BLISS(BLISS32)
M   0	    112 	    %THEN %PRINT( '	This module was compiled for any VAX-11 system' )
M   0	    113 	    %ELSE %IF %BLISS(BLISS36)
M   0	    114 	    %THEN %PRINT( '	This module was compiled for any PDP-10 system' )
M   0	    115 	    %FI %FI %FI %FI %FI %FI %FI %FI %FI %FI
M   0	    116 
M   0	    117 	    %print ('	XPORT ', $xpo_ident,
M   0	    118 		    '    XPOSYS ', $xpo$sys_ident,
M   0	    119 		    '    XPO$K_VERSION = ', %NUMBER (xpo$k_version),
M   0	    120 		    '    XPO$K_LEVEL = ', %NUMBER (xpo$k_level) )
M   0	    121 	    %EXITMACRO
M   0	    122 	%FI
M   0	    123 
M   0	    124 	%IF %COUNT EQL %LENGTH-1
M   0	    125 	%THEN
M   0	    126 	    %ERRORMACRO( 'Variant setting (', %VARIANT, ') is invalid' )
M   0	    127 	%FI %;
    0	    128 
    0	    129 
    0	    130 !
    0	    131 ! $XPO_DFLT_DEV - Default device specification
    0	    132 !
    0	    133 
    0	    134 MACRO
    0	    135     $XPO_DFLT_DEV =
M   0	    136 	%IF $TOPS10 OR $TOPS20 %THEN	'DSK:'		%FI
M   0	    137 	%IF $VMS %THEN			'SYS$DISK:'	%FI
M   0	    138 	%IF $11M OR $IAS %THEN		'SY0:'		%FI
M   0	    139     	%IF $RSTS %THEN			'SY:'		%FI
M   0	    140 	%IF $RT11 %THEN			'DK:'		%FI
M   0	    141 	% ;

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 4
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

    0	    143 !
    0	    144 ! XPORT System-independent Declarations
    0	    145 !
    0	    146 
    0	    147 MACRO
    0	    148     $xpo$comp_code( code ) =
M   0	    149 	%IF %IDENTICAL( code, %REMOVE(code) )
M   0	    150 	%THEN
M   0	    151 	    %NAME( 'XPO$_', code )
M   0	    152 	%ELSE
M   0	    153 	    code
M   0	    154 	%FI %,
    0	    155 
    0	    156 
    0	    157 %IF %BLISS(BLISS36)
L   0	    158 %THEN
U   0	    159     $XPO_PSECTS = %,
U   0	    160 %ELSE
    0	    161     $XPO_PSECTS =
M   0	    162 	PSECT
M   0	    163 	    OWN =   _XPO$DATA  %BLISS32( (PIC,ADDRESSING_MODE(LONG_RELATIVE)) ),
M   0	    164 	    GLOBAL = _XPO$DATA  %BLISS32( (PIC,ADDRESSING_MODE(LONG_RELATIVE)) ),
M   0	    165 	    CODE =  _XPO$CODE ( NOWRITE %BLISS32( ,SHARE,PIC ) ),
M   0	    166 	    PLIT =  _XPO$PLIT; %,
    0	    167 %FI
    0	    168 
    0	    169 
    0	    170     $XPO_ADDRESS( pointer ) =				! Converts character pointer to memory address
M   0	    171 	%IF NOT %BLISS(BLISS36)
M   0	    172 	%THEN
M   0	    173 	    %WARN( 'This macro may not appear in BLISS-16 or BLISS-32 code' )
M   0	    174 	%FI
M   0	    175 
M   0	    176 	( (pointer AND 1^19-1) + 1 ) %,
    0	    177 
    0	    178 
    0	    179     $XPO_MAIN_BEGIN( function, fixup ) =
M   0	    180 	COMPILETIME
M   0	    181 	    $xpo$function = %NAME( 'XPO$K_', function ),
M   0	    182 	    $xpo$main_block = 1;
M   0	    183 
M   0	    184 	%IF %IDENTICAL( function, IO )
M   0	    185 	%THEN
M   0	    186 	    BIND primary_code = iob[IOB$G_COMP_CODE],
M   0	    187 		secondary_code = iob[IOB$G_2ND_CODE];
M   0	    188 	%ELSE
M   0	    189 	    LOCAL primary_code,
M   0	    190 		secondary_code;
M   0	    191 	%FI
M   0	    192 
M   0	    193 	LABEL
M   0	    194 	    MAIN_BLOCK;
M   0	    195 
M   0	    196 	MAIN_BLOCK:  BEGIN
M   0	    197 
M   0	    198 	%IF NOT %NULL( fixup )
M   0	    199 	%THEN

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 5
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

M   0	    200 	    IF .iob[IOB$H_LENGTH] EQL 0 AND		! If an OWN/GLOBAL IOB has not been initialized,
M   0	    201 		.iob[IOB$B_VERSION] EQL 0 AND		!
M   0	    202 		.iob[IOB$B_LEVEL] EQL 0 AND		!
M   0	    203 		.iob[IOB$G_COMP_CODE] EQL 0		!
M   0	    204 	    THEN					!
M   0	    205 		BEGIN					!
M   0	    206 		iob[IOB$H_LENGTH] = IOB$K_LENGTH;	! setup the IOB length,
M   0	    207 		iob[IOB$B_VERSION] = XPO$K_VERSION;	! XPORT version number,
M   0	    208 		iob[IOB$B_LEVEL] = XPO$K_LEVEL;		! and XPORT base level number.
M   0	    209 		END;
M   0	    210 
M   0	    211 	    iob[$SUB_FIELD(IOB$T_RESULTANT,STR$B_DTYPE)] = STR$K_DTYPE_T;
M   0	    212 	    iob[$SUB_FIELD(IOB$T_RESULTANT,STR$B_CLASS)] = STR$K_CLASS_D;
M   0	    213 	%FI
M   0	    214 
M   0	    215 	%IF %IDENTICAL( function, IO )
M   0	    216 	%THEN
M   0	    217 	    IF .iob[IOB$H_LENGTH] NEQ IOB$K_LENGTH	! If the IOB is not the proper size,
M   0	    218 	    THEN					!
M   0	    219 		$XPO_QUIT( BAD_IOB, BAD_LENGTH );	! return error codes to the caller.
M   0	    220 	%FI
M   0	    221 
M   0	    222 	secondary_code = 0;				! Clear the secondary completion code
M   0	    223 	%,
    0	    224 
    0	    225 
    0	    226     $XPO_QUIT( primary, secondary ) =
M   0	    227 	BEGIN
M   0	    228 	%IF NOT %NULL( primary )
M   0	    229 	%THEN
M   0	    230 	    primary_code = $xpo$comp_code( primary );
M   0	    231 	%FI
M   0	    232 
M   0	    233 	%IF NOT %NULL( secondary )
M   0	    234 	%THEN
M   0	    235 	    secondary_code = $xpo$comp_code( secondary );
M   0	    236 	%FI
M   0	    237 
M   0	    238 	%IF $xpo$main_block
M   0	    239 	%THEN
M   0	    240 	    LEAVE MAIN_BLOCK
M   0	    241 	%FI
M   0	    242 	END %,
    0	    243 
    0	    244 
    0	    245     $XPO_MAIN_END =
M   0	    246 	END;						! End of MAIN_BLOCK
M   0	    247 	%ASSIGN( $xpo$main_block, 0 ) %,
    0	    248 
    0	    249 
    0	    250     $XPO_RETURN( primary, secondary ) =
M   0	    251 	BEGIN
M   0	    252 	%IF NOT %NULL( secondary )
M   0	    253 	%THEN
M   0	    254 	    iob[IOB$G_2ND_CODE] = $xpo$comp_code( secondary );
M   0	    255 	%FI
M   0	    256 

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 6
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

M   0	    257 	iob[IOB$G_COMP_CODE] = $xpo$comp_code( primary );
M   0	    258 
M   0	    259 	RETURN $xpo$comp_code( primary )
M   0	    260 	END %,
    0	    261 
    0	    262 
    0	    263     $XPO_RETURN2( primary, secondary ) =
M   0	    264 	BEGIN
M   0	    265 	.SECONDARY_CODE = $xpo$comp_code( secondary );
M   0	    266 	RETURN $xpo$comp_code( primary )
M   0	    267 	END %,
    0	    268 
    0	    269 
    0	    270     $XPO_VALID_IOB( iob, primary ) =
M   0	    271 	BEGIN
M   0	    272 	$xpo$ex_routine( XPO$VALID_IOB )
M   0	    273 
M   0	    274 	IF NOT XPO$VALID_IOB( iob )
M   0	    275 	THEN
M   0	    276 	    %IF NOT %NULL(primary)
M   0	    277 	    %THEN
M   0	    278 		$XPO_QUIT( primary );
M   0	    279 	    %ELSE
M   0	    280 		$XPO_QUIT();
M   0	    281 	    %FI
M   0	    282 	END %,
    0	    283 
    0	    284 
    0	    285     $XPO_BUILD_SPEC( iob, primary ) =
M   0	    286 	BEGIN
M   0	    287 	$xpo$ex_routine( XPO$BUILD_SPEC )
M   0	    288 
M   0	    289 	IF NOT XPO$BUILD_SPEC( iob )
M   0	    290 	THEN
M   0	    291 	    %IF NOT %NULL(primary)
M   0	    292 	    %THEN
M   0	    293 		$XPO_QUIT( primary );
M   0	    294 	    %ELSE
M   0	    295 		$XPO_QUIT();
M   0	    296 	    %FI
M   0	    297 	END %,
    0	    298 
    0	    299 
    0	    300     $XPO_ACTION_RTN( action_argument ) =
M   0	    301 	%IF NOT %DECLARED( success_action ) OR
M   0	    302 	    NOT %DECLARED( failure_action ) OR
M   0	    303 	    NOT %DECLARED( primary_code ) OR
M   0	    304 	    NOT %DECLARED( secondary_code )
M   0	    305 	%THEN
M   0	    306 	    %WARN( 'SUCCESS_ACTION, FAILURE_ACTION, PRIMARY_CODE and SECONDARY_CODE must be defined' )
M   0	    307 	    %EXITMACRO
M   0	    308 	%FI
M   0	    309 
M   0	    310 	BEGIN
M   0	    311 	LOCAL
M   0	    312 	    $xpo$action;				! address of appropriate action routine
M   0	    313 

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 7
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

M   0	    314 	IF .primary_code				! If the function was successful,
M   0	    315 	THEN						!
M   0	    316 	    $xpo$action = .success_action		! save the address of the success action routine.
M   0	    317 	ELSE
M   0	    318 	    $xpo$action = .failure_action;		! Otherwise, save the address of the failure action routine.
M   0	    319 
M   0	    320 	IF .$xpo$action NEQ 0				! If an action routine exists,
M   0	    321 	THEN						!
M   0	    322 	    primary_code =				! call it and update the primary code.
M   0	    323 		%IF %BLISS(BLISS36)
M   0	    324 		%THEN
M   0	    325 		    BLISS36C(
M   0	    326 		%ELSE
M   0	    327 		    BLISS(
M   0	    328 		%FI
M   0	    329 			.$xpo$action,
M   0	    330 			$xpo$function,
M   0	    331 			.primary_code,
M   0	    332 			.secondary_code,
M   0	    333 			action_argument );
M   0	    334 	END; %,
    0	    335 
    0	    336 
    0	    337     $XPO_ZAP_IOB( iob ) =
M   0	    338 	BEGIN
M   0	    339 	$xpo$ex_routine( XPO$ZAP_IOB )
M   0	    340 	%IF $xpo$main_block
M   0	    341 	%THEN
M   0	    342 	    $XPO_IF_NOT( XPO$ZAP_IOB( iob ) )
M   0	    343 	    THEN
M   0	    344 		$XPO_QUIT( FREE_MEM, (.$XPO_STATUS) );
M   0	    345 	%ELSE
M   0	    346 	    XPO$ZAP_IOB( iob )
M   0	    347 	%FI
M   0	    348 	END %,
    0	    349 
    0	    350 
    0	    351     $XPO_LEAVE_IOB( iob ) =
M   0	    352 	BEGIN
M   0	    353 	$xpo$ex_routine( XPO$LEAVE_IOB )
M   0	    354 
M   0	    355 	$XPO_IF_NOT( XPO$LEAVE_IOB( iob ) )
M   0	    356 	THEN
M   0	    357 	    $XPO_QUIT( FREE_MEM, (.$XPO_STATUS) );
M   0	    358 	END %;
    0	    359 
    0	    360 
    0	    361 KEYWORDMACRO
    0	    362     $XPO_FREE_QUIT( string, binary_data ) =
M   0	    363 
M   0	    364 	BEGIN
M   0	    365 	LOCAL $xpo$status;
M   0	    366 
M   0	    367 	IF NOT ($xpo$status = $XPO_FREE_MEM(
M   0	    368 				%QUOTE STRING = string,
M   0	    369 				%QUOTE BINARY_DATA = binary_data,
M   0	    370 				FAILURE = 0 ))

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 8
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

M   0	    371 	THEN
M   0	    372 	    $XPO_QUIT( FREE_MEM, (.$xpo$status) );
M   0	    373 	END %;
    0	    374 
    0	    375 
    0	    376 MACRO
    0	    377     $XPO_IF_NOT [] =
M   0	    378 	(
M   0	    379 	LOCAL $xpo$status;
M   0	    380 	IF NOT ( $xpo$status = %REMAINING ) %,
    0	    381 
    0	    382 
    0	    383     $XPO_STATUS =
M   0	    384 	$xpo$status
M   0	    385 	) %;
    0	    386 
    0	    387 MACRO
    0	    388     $XPO_MODULE( module_name ) =
M   0	    389 	%IF %BLISS( BLISS16 )
M   0	    390 	%THEN
M   0	    391 	    END
M   0	    392 	    ELUDOM
M   0	    393 
M   0	    394 	    MODULE module_name =
M   0	    395 	    BEGIN
M   0	    396 	    LIBRARY 'XPORT';
M   0	    397 	    LIBRARY 'XPOSYS';
M   0	    398 	    
M   0	    399 	    $XPO_PSECTS
M   0	    400 	%FI %;

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 9
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

    0	    402 !
    0	    403 ! XPO$PARSE_SPEC Internal Declarations
    0	    404 !
    0	    405 !	The following declarations are located here rather than in XPARSE.BLI since
    0	    406 !	that source file contains multiple modules under BLISS-16.
    0	    407 
    0	    408 LITERAL							! Expected field indicator codes:
    0	    409     XPO$K_NO_NEXT = 1,					!    no field expected
    0	    410     XPO$K_NAME_NEXT = 2,				!    file name expected
    0	    411     XPO$K_TYPE_NEXT = 3,				!    file type expected
    0	    412     XPO$K_VER_NEXT = 4;					!    file version expected
    0	    413 
    0	    414 LITERAL							! File-spec parsing state indicators:
    0	    415     XPO$V_SPEC_NODE = 0,				!    node name specified or omitted
    0	    416     XPO$V_SPEC_DEV = 1,					!    device name specified or omitted
    0	    417     XPO$V_SPEC_DIR = 2,					!    directory-spec specified or omitted
    0	    418     XPO$V_SPEC_NAME = 3,				!    file name specified or omitted
    0	    419     XPO$V_SPEC_TYPE = 4,				!    file type specified or omitted
    0	    420     XPO$V_SPEC_VER = 5,					!    file version specified or omitted
    0	    421     XPO$V_SPEC_SIZE = 6,				!    file size specified or omitted
    0	    422     XPO$V_SPEC_PROT = 7,				!    file protection specified or omitted
    0	    423 
    0	    424     XPO$K_STATE_LEN = 8;				! Number of file-spec states
    0	    425 
    0	    426 MACRO
    0	    427     $XPO_PARSE_STATE =
M   0	    428 	BITVECTOR[ XPO$K_STATE_LEN ] %,
    0	    429 
    0	    430     $XPO_PARSE_MAX =
M   0	    431 	LITERAL
M   0	    432 	%IF $TOPS10 %THEN
M   0	    433 	    XPO$K_MAX_DEV = 6,
M   0	    434 	    XPO$K_MAX_NAME = 6,
M   0	    435 	    XPO$K_MAX_TYPE = 3;
M   0	    436 	%ELSE
M   0	    437 	%IF $TOPS20 %THEN
M   0	    438 	    XPO$K_MAX_DEV = 39,
M   0	    439 	    XPO$K_MAX_NAME = 39,
M   0	    440 	    XPO$K_MAX_TYPE = 39,
M   0	    441 	    XPO$K_MAX_ATTR = 17;
M   0	    442 	%ELSE
M   0	    443 	%IF $VMS %THEN
M   0	    444 	    XPO$K_MAX_NODE = 63,
M   0	    445 	    XPO$K_MAX_DEV = 63,
M   0	    446 	    XPO$K_MAX_NAME = 63,
M   0	    447 	    XPO$K_MAX_TYPE = 39;
M   0	    448 	%ELSE
M   0	    449 	%IF $11M %THEN
M   0	    450 	    XPO$K_MAX_DEV = 4,
M   0	    451 	    XPO$K_MAX_NAME = 9,
M   0	    452 	    XPO$K_MAX_TYPE = 3;
M   0	    453 	%ELSE
M   0	    454 	%IF $RSTS %THEN
M   0	    455 	    XPO$K_MAX_DEV = 8,
M   0	    456 	    XPO$K_MAX_NAME = 8,
M   0	    457 	    XPO$K_MAX_TYPE = 5;
M   0	    458 	%ELSE

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 10
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

M   0	    459 	%IF $RT11 %THEN
M   0	    460 	    XPO$K_MAX_DEV = 3,
M   0	    461 	    XPO$K_MAX_NAME = 6,
M   0	    462 	    XPO$K_MAX_TYPE = 3;
M   0	    463 	%FI %FI %FI %FI %FI %FI %;

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 11
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

    0	    465 !
    0	    466 ! Non-public XPORT Data Structure Macros
    0	    467 !
    0	    468 
    0	    469 MACRO
    0	    470     $XPO_BIT_MASK( field_name, bit_name ) =
M   0	    471 	%IF NOT %DECLARED( %NAME(field_name) )
M   0	    472 	%THEN
M   0	    473 	    %WARN( field_name, ' is not defined' )
M   0	    474 	    0
M   0	    475 	    %EXITMACRO
M   0	    476 	%FI
M   0	    477 
M   0	    478 	%IF NOT %DECLARED( %NAME(bit_name) )
M   0	    479 	%THEN
M   0	    480 	    %WARN( bit_name, ' is not defined' )
M   0	    481 	    0
M   0	    482 	    %EXITMACRO
M   0	    483 	%FI
M   0	    484 
M   0	    485 	%IF %FIELDEXPAND( bit_name, 2 ) NEQ 1
M   0	    486 	%THEN
M   0	    487 	    %WARN( bit_name, ' is not a 1-bit field' )
M   0	    488 	    0
M   0	    489 	    %EXITMACRO
M   0	    490 	%FI
M   0	    491 
M   0	    492 	1 ^ ( %FIELDEXPAND(bit_name,1) - %FIELDEXPAND(field_name,1) ) %,
    0	    493 
    0	    494 
    0	    495     $SHOW_FIELD( prefix ) [ name ] =
M   0	    496 	%PRINT( '	', %NAME(prefix,name), '	= [',
M   0	    497 		%FIELDEXPAND(%NAME(prefix,name),0), ',',
M   0	    498 		%FIELDEXPAND(%NAME(prefix,name),1), ',',
M   0	    499 		%FIELDEXPAND(%NAME(prefix,name),2), ',',
M   0	    500 		%FIELDEXPAND(%NAME(prefix,name),3), ']   (+',
M   0	    501 		%IF %BLISS(BLISS32)
M   0	    502 		%THEN
M   0	    503 		    '%X''' $XPO$SHOW_NUMB( %FIELDEXPAND(%NAME(prefix,name),0)*%UPVAL, 16 )
M   0	    504 		%ELSE
M   0	    505 		    '%O''' $XPO$SHOW_NUMB( %FIELDEXPAND(%NAME(prefix,name),0)*%UPVAL, 8 )
M   0	    506 		%FI
M   0	    507 		, ''')') %,
    0	    508 
    0	    509 
    0	    510     $SHOW_LITERAL( prefix ) [ name ] =
M   0	    511 	%PRINT( '	', %NAME(prefix,name), '	= ',
M   0	    512 		%NUMBER(%NAME(prefix,name)), '   (',
M   0	    513 		%IF %BLISS(BLISS32)
M   0	    514 		%THEN
M   0	    515 		    '%X'''  $XPO$SHOW_NUMB(%NUMBER(%NAME(prefix,name)),16)
M   0	    516 		%ELSE
M   0	    517 		    '%O'''  $XPO$SHOW_NUMB(%NUMBER(%NAME(prefix,name)),8)
M   0	    518 		%FI
M   0	    519 		, ''')'
M   0	    520 		) %;
    0	    521 

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 12
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

    0	    523 !
    0	    524 ! Non-public XPORT String Handling Definitions
    0	    525 !
    0	    526 
    0	    527 COMPILETIME
    0	    528     $xpo$internal = 1;					! Indicate no auto freeing of XPORT temporary strings
    0	    529 							! when a string function is called within any XPORT code
    0	    530 							! which includes a "LIBRARY 'XPOSYS';" declaration.
    0	    531 
    0	    532 
    0	    533 MACRO
    0	    534     $str$comp_code( code ) =
M   0	    535 	%IF %IDENTICAL( code, %REMOVE(code) )
M   0	    536 	%THEN
M   0	    537 	    %NAME( 'STR$_', code )
M   0	    538 	%ELSE
M   0	    539 	    code
M   0	    540 	%FI %,
    0	    541 
    0	    542 
    0	    543     $STR_MAIN_BEGIN( function ) =
M   0	    544 	COMPILETIME
M   0	    545 	    $str$function = %NAME( 'STR$K_', function ),
M   0	    546 	    $xpo$main_block = 1;
M   0	    547 
M   0	    548 	LOCAL primary_code;
M   0	    549 
M   0	    550 	LABEL
M   0	    551 	    MAIN_BLOCK;
M   0	    552 
M   0	    553 	%IF $str$function NEQ STR$K_PSEUDO
M   0	    554 	%THEN
M   0	    555 	    LOCAL secondary_code;
M   0	    556 	    secondary_code = 0;
M   0	    557 	%FI
M   0	    558 
M   0	    559 	MAIN_BLOCK:  BEGIN %,
    0	    560 
    0	    561 
    0	    562     $STR_QUIT( primary, secondary ) =
M   0	    563 	BEGIN
M   0	    564 	%IF NOT %NULL( primary )
M   0	    565 	%THEN
M   0	    566 	    primary_code = $str$comp_code( primary );
M   0	    567 	%FI
M   0	    568 
M   0	    569 	%IF NOT %NULL( secondary ) AND $str$function NEQ STR$K_PSEUDO
M   0	    570 	%THEN
M   0	    571 	    secondary_code = $str$comp_code( secondary );
M   0	    572 	%FI
M   0	    573 
M   0	    574 	%IF $xpo$main_block
M   0	    575 	%THEN
M   0	    576 	    LEAVE MAIN_BLOCK
M   0	    577 	%FI
M   0	    578 	END %,
    0	    579 

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 13
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

    0	    580 
    0	    581     $STR_MAIN_END =
M   0	    582 	END;						! End of MAIN_BLOCK
M   0	    583 	%ASSIGN( $xpo$main_block, 0 ) %,
    0	    584 
    0	    585 
    0	    586     $STR_ACTION_RTN( action_arg1, action_arg2, action_arg3 ) =
M   0	    587 	%IF NOT %DECLARED( success_action ) OR
M   0	    588 	    NOT %DECLARED( failure_action ) OR
M   0	    589 	    NOT %DECLARED( primary_code ) OR
M   0	    590 	    NOT %DECLARED( secondary_code )
M   0	    591 	%THEN
M   0	    592 	    %WARN( 'SUCCESS_ACTION, FAILURE_ACTION, PRIMARY_CODE and SECONDARY_CODE must be defined' )
M   0	    593 	    %EXITMACRO
M   0	    594 	%FI
M   0	    595 
M   0	    596 	BEGIN
M   0	    597 	LOCAL
M   0	    598 	    $str$action;				! address of appropriate action routine
M   0	    599 
M   0	    600 	IF .primary_code				! If the function was successful,
M   0	    601 	%IF $str$function EQL STR$K_COMPARE OR		!
M   0	    602 	    $str$function EQL STR$K_SCAN		!
M   0	    603 	%THEN						!
M   0	    604 	    OR .primary_code EQL 0			! ( 0 is not failure from comparison and scan functions )
M   0	    605 	%FI						!
M   0	    606 	THEN						!
M   0	    607 	    $str$action = .success_action		! save the address of the success action routine.
M   0	    608 	ELSE
M   0	    609 	    $str$action = .failure_action;		! Otherwise, save the address of the failure action routine.
M   0	    610 
M   0	    611 	IF .$str$action NEQ 0				! If an action routine exists,
M   0	    612 	THEN						!
M   0	    613 	    primary_code =				! call it and update the completion code.
M   0	    614 		%IF %BLISS(BLISS36)
M   0	    615 		%THEN
M   0	    616 		    BLISS36C(
M   0	    617 		%ELSE
M   0	    618 		    BLISS(
M   0	    619 		%FI
M   0	    620 			.$str$action,
M   0	    621 			$str$function,
M   0	    622 			.primary_code,
M   0	    623 			.secondary_code,
M   0	    624 			action_arg1,
M   0	    625 			action_arg2,
M   0	    626 			$xpo$default( action_arg3, 0 ) );
M   0	    627 	END; %,
    0	    628 
    0	    629 
    0	    630     $STR_VALIDATE( string, primary ) =
M   0	    631 	BEGIN
M   0	    632 	$xpo$ex_routine( XST$VALIDATE )
M   0	    633 
M   0	    634 	%IF %DECLARED( $xpo$main_block )
M   0	    635 	%THEN
M   0	    636 	    %IF $xpo$main_block

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 14
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

M   0	    637 	    %THEN
M   0	    638 		LOCAL $str$status;
M   0	    639 
M   0	    640 		$str$status = XST$VALIDATE( string );
M   0	    641 
M   0	    642 		IF NOT .$str$status
M   0	    643 		THEN
M   0	    644 	    	    $STR_QUIT( primary, (.$str$status) );
M   0	    645 		END
M   0	    646 	    %EXITMACRO
M   0	    647 	    %FI
M   0	    648 	%FI
M   0	    649 
M   0	    650 	XST$VALIDATE( string )
M   0	    651 	END %,
    0	    652 
    0	    653 
    0	    654     $STR_ALLOC_TEMP( string_desc ) =
M   0	    655 	BEGIN
M   0	    656 	EXTERNAL XST$NO_MEMORY;				! Fixed erroneous temporary string descriptor
M   0	    657 							!    ( error code = XPO$_NO_MEMORY )
M   0	    658 	IF NOT $XPO_GET_MEM( FULLWORDS = STR$K_D_BLN,	! Allocate a string descriptor in dynamic memory.
M   0	    659 			    RESULT = string_desc,
M   0	    660 			    FAILURE = 0 )
M   0	    661 	THEN						! If dynamic memory is not available,
M   0	    662 	    RETURN XST$NO_MEMORY;			! return the address of a static erroneous
M   0	    663 							! temporary string descriptor.
M   0	    664 
M   0	    665 	$STR_DESC_INIT( DESCRIPTOR = .string_desc,	! Initialize the temporary string descriptor.
M   0	    666 		    CLASS = XPORT_TEMPORARY );
M   0	    667 	END %;

                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 15
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

    0	    669 !
    0	    670 ! ASCII Control Character Definitions
    0	    671 !
    0	    672 
    0	    673 LITERAL
    0	    674     nul = %O'0',	! null
    0	    675     null = nul,		! null (alternate spelling)
    0	    676     soh = %O'1',	! start of header
    0	    677     stx = %O'2',	! start of text
    0	    678     etx = %O'3',	! end of text
    0	    679     eot = %O'4',	! end of transmission
    0	    680     enq = %O'5',	! enquire
    0	    681     ack = %O'6',	! acknowledge
    0	    682     bel = %O'7',	! audible alarm
    0	    683     bell = bel,		! audible alarm (alternate spelling)
    0	    684     bs = %O'10',	! backspace
    0	    685     ht = %O'11',	! horizontal tab
    0	    686     lf = %O'12',	! line feed
    0	    687     vt = %O'13',	! vertical tab
    0	    688     ff = %O'14',	! form feed
    0	    689     cr = %O'15',	! carriage return
    0	    690     so = %O'16',	! shift out
    0	    691     si = %O'17',	! shift in
    0	    692     dle = %O'20',	! data link escape
    0	    693     dc1 = %O'21',	! device control #1 (XON)
    0	    694     dc2 = %O'22',	! device control #2
    0	    695     dc3 = %O'23',	! device control #3 (XOFF)
    0	    696     dc4 = %O'24',	! device control #4
    0	    697     nak = %O'25',	! negative acknowledge
    0	    698     syn = %O'26',	! synchronous null
    0	    699     etb = %O'27',	! end of text block
    0	    700     can = %O'30',	! cancel
    0	    701     em = %O'31',	! end of medium
    0	    702     sub = %O'32',	! substitute
    0	    703     esc = %O'33',	! escape
    0	    704     fs = %O'34',	! field separator
    0	    705     gs = %O'35',	! group separator
    0	    706     rs = %O'36',	! record separator
    0	    707     us = %O'37',	! unit separator
    0	    708     sp = %O'40',	! space (blank)
    0	    709     space = sp,		! space (alternate spelling)
    0	    710     del = %O'177';	! delete


                                Source Listing                   4-FEB-2004 11:01:33  BLISS-32I T1.1-053                Page 16
                                Source Listing                  19-MAR-2002 10:24:31  [LASTOVICA.XPORT.VMSGEN]XPOSYS.REQ;2

COMMAND LINE:

BLISSXPOSYS/LIBRARY/LIST
