Trailing-Edge
-
PDP-10 Archives
-
TOPS-20_V6.1_DECnetSrc_7-23-85
-
mcb/utilities/lbrcom.req
There is 1 other file named lbrcom.req in the archive. Click here to see a list.
! LBRCOM.BLI - LBR20 COMMON DEFINITIONS
!
! COPYRIGHT (c) 1980, 1981, 1982
! DIGITAL EQUIPMENT CORPORATION
! Maynard, Massachusetts
!
! 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: LBR20 - Librarian Utility
!
! ABSTRACT:
!
!
! THIS FILE CONTAINS DEFINITIONS COMMON TO ALL THE MODULES OF THE
! Librarian
!
!
! ENVIRONMENT: ANY
!
! AUTHOR: ALAN D. PECKHAM, CREATION DATE: 2-MAY-80
!
! MODIFIED BY:
!
! Alan D. Peckham, : VERSION 01
! 01 - Revise file handling interfaces.
! 02 - Data structure reformation (change from BLOCK_16 to BLOCK structure).
! Add COMPRESS function
! 03 - Add FAST switch.
! 04 - Add support for RG (replace globals) switch.
!--
!
! INCLUDE FILES
!
REQUIRE 'BLI:XPORT';
!
! MACROS
!
MACRO
XPO$PTR (addr, idx) =
CH$PTR (addr, idx, $xpo$bits_byte) %;
MACRO
POINTR (adr, mask) =
adr <%NBITSU (mask AND - mask) - 1,
%NBITSU (mask) - %NBITSU (mask AND - mask) + 1> %,
FLD (val, mask) =
((val)^(%NBITSU (mask AND - mask) - 1)) %;
!
! Convenient character string macros
!
MACRO
CH$LEN (PTR) = !Get length of ASCIZ string.
CH$DIFF(CH$FIND_CH(200,PTR,0),PTR) %,
CH$SEQUENCE (CHARS, CS) = !Allocate storage for string.
VECTOR[CH$ALLOCATION(CHARS,CS)] %,
CH$ASCIC [] = !A pointer to an ASCIC string.
CH$PTR(UPLIT(%STRING(%CHAR(%CHARCOUNT(%REMAINING)),%REMAINING)),1) %,
CH$ASCII [] = !A pointer to an ASCII string.
CH$PTR(UPLIT(%ASCII %STRING(%REMAINING))) %,
CH$ASCIZ [] = !A pointer to an ASCIZ string.
CH$PTR(UPLIT(%ASCIZ %STRING(%REMAINING))) %;
!
! Bit checking routines
!
MACRO
BIT_SET (VALUE, BIT_TO_TEST) =
(((VALUE) AND (BIT_TO_TEST)) NEQ 0) %,
BIT_CLEAR (VALUE, BIT_TO_TEST) =
(((VALUE) AND (BIT_TO_TEST)) EQL 0) %;
MACRO
RAD50 (TEXT) =
UPLIT( RAD50_CHARS( %EXPLODE(%STRING(TEXT)) ) ) %,
RAD50_WORD (TEXT) =
RAD50_CHARS ( %EXPLODE(%STRING(TEXT))) %,
RAD50_CHARS [CHAR1, CHAR2, CHAR3] =
( RAD50_CHAR(CHAR1) *40+RAD50_CHAR(CHAR2))*40+RAD50_CHAR(CHAR3) %,
RAD50_CHAR (CHAR) =
%IF %NULL(CHAR) %THEN 0 %FI
%IF %IDENTICAL( ' ', CHAR ) %THEN 0 %FI
%IF %IDENTICAL( 'A', CHAR ) %THEN 1 %FI
%IF %IDENTICAL( 'B', CHAR ) %THEN 2 %FI
%IF %IDENTICAL( 'C', CHAR ) %THEN 3 %FI
%IF %IDENTICAL( 'D', CHAR ) %THEN 4 %FI
%IF %IDENTICAL( 'E', CHAR ) %THEN 5 %FI
%IF %IDENTICAL( 'F', CHAR ) %THEN 6 %FI
%IF %IDENTICAL( 'G', CHAR ) %THEN 7 %FI
%IF %IDENTICAL( 'H', CHAR ) %THEN 8 %FI
%IF %IDENTICAL( 'I', CHAR ) %THEN 9 %FI
%IF %IDENTICAL( 'J', CHAR ) %THEN 10 %FI
%IF %IDENTICAL( 'K', CHAR ) %THEN 11 %FI
%IF %IDENTICAL( 'L', CHAR ) %THEN 12 %FI
%IF %IDENTICAL( 'M', CHAR ) %THEN 13 %FI
%IF %IDENTICAL( 'N', CHAR ) %THEN 14 %FI
%IF %IDENTICAL( 'O', CHAR ) %THEN 15 %FI
%IF %IDENTICAL( 'P', CHAR ) %THEN 16 %FI
%IF %IDENTICAL( 'Q', CHAR ) %THEN 17 %FI
%IF %IDENTICAL( 'R', CHAR ) %THEN 18 %FI
%IF %IDENTICAL( 'S', CHAR ) %THEN 19 %FI
%IF %IDENTICAL( 'T', CHAR ) %THEN 20 %FI
%IF %IDENTICAL( 'U', CHAR ) %THEN 21 %FI
%IF %IDENTICAL( 'V', CHAR ) %THEN 22 %FI
%IF %IDENTICAL( 'W', CHAR ) %THEN 23 %FI
%IF %IDENTICAL( 'X', CHAR ) %THEN 24 %FI
%IF %IDENTICAL( 'Y', CHAR ) %THEN 25 %FI
%IF %IDENTICAL( 'Z', CHAR ) %THEN 26 %FI
%IF %IDENTICAL( '$', CHAR ) %THEN 27 %FI
%IF %IDENTICAL( '.', CHAR ) %THEN 28 %FI
%IF %IDENTICAL( '_', CHAR ) %THEN 28 %FI
%IF %IDENTICAL( '0', CHAR ) %THEN 30 %FI
%IF %IDENTICAL( '1', CHAR ) %THEN 31 %FI
%IF %IDENTICAL( '2', CHAR ) %THEN 32 %FI
%IF %IDENTICAL( '3', CHAR ) %THEN 33 %FI
%IF %IDENTICAL( '4', CHAR ) %THEN 34 %FI
%IF %IDENTICAL( '5', CHAR ) %THEN 35 %FI
%IF %IDENTICAL( '6', CHAR ) %THEN 36 %FI
%IF %IDENTICAL( '7', CHAR ) %THEN 37 %FI
%IF %IDENTICAL( '8', CHAR ) %THEN 38 %FI
%IF %IDENTICAL( '9', CHAR ) %THEN 39 %FI %;
!
! I/O definitions
!
$LITERAL
F_READ = 0,
F_WRITE = $DISTINCT,
F_APPEND = $DISTINCT,
F_MODIFY = $DISTINCT,
F_UPDATE = $DISTINCT;
$LITERAL
F_ASCII = 0,
F_BINARY = $DISTINCT;
MACRO
PUTLN (SKIP, EDIT) [] =
BEGIN
EXTERNAL ROUTINE PUTLIN : NOVALUE;
%IF %LENGTH GTR 2
%THEN
LOCAL PRM_LIST : VECTOR[%LENGTH-2];
MACRO PUTASG[PARAMETER] =
PRM_LIST[%COUNT]=PARAMETER %QUOTE %;
PUTASG( %REMAINING );
PUTLIN( SKIP, EDIT, PRM_LIST )
%ELSE
PUTLIN( SKIP, EDIT, 0 )
%FI
END %,
TYPLN (SKIP, EDIT) [] =
BEGIN
EXTERNAL ROUTINE TYPLIN : NOVALUE;
%IF %LENGTH GTR 2
%THEN
LOCAL PRM_LIST : VECTOR[%LENGTH-2];
MACRO TYPASG[PARAMETER] =
PRM_LIST[%COUNT]=PARAMETER %QUOTE %;
TYPASG( %REMAINING );
TYPLIN( SKIP, EDIT, PRM_LIST )
%ELSE
TYPLIN( SKIP, EDIT, 0 )
%FI
END %;
MACRO
FATAL =
'*FATAL* ' %,
WARNING =
'*WARNING* ' %;
!
! EQUATED SYMBOLS
!
LITERAL
TRUE = 1 eql 1, !Truisms.
FALSE = 1 eql 0,
DEBUG = FALSE, !No debugging available
LBR_SUPPORT = %C'X', !Support code.
LBR_VERSION = 1, !Version number.
LBR_UPDATE = 0, !Update release number.
LBR_EDIT = 6; !Edit number.
MACRO
LST_FILE = %STRING ('Listing of') %,
LST_TITLE = %STRING ('LBR20 - Librarian Utility') %,
PROMPT = %STRING ('LBR20') %;
LITERAL
LBR_MAX_EXTRACTS = 8, !Maximum number of extracted modules.
LBR_MAX_GLOBAL_DELETES = 15, !Maximum number of global symbol deletes.
LBR_MAX_MODULE_DELETES = 15, !Maximum number of module deletes.
LBR_MAX_OBJ = 10, !Maximum number of input files.
LBR_MAX_FILES = LBR_MAX_OBJ + 5; !Maximum number of open files.
$LITERAL
!
! General switches
!
M_VERSION = $DISTINCT, !Display version.
M_HELP = $DISTINCT, !Display HLP file.
M_EXIT = $DISTINCT, !Exit switch specified.
M_WIDE = $DISTINCT, !Use 132 column listing format.
M_FAST = $DISTINCT, !Do not rewrite EPT or MNT
!until all operations finished.
M_LIST = $DISTINCT, !List library
M_LIST_ENTRIES = $DISTINCT, !List EPT table
M_LIST_HEADERS = $DISTINCT, !List module header
M_CREATE = $DISTINCT, !Creating new library
M_COMPRESS = $DISTINCT, !Compress library
M_NOEPT = $DISTINCT, !Do not insert entry points
M_REPLACE = $DISTINCT, !Replace modules
M_RG = $DISTINCT, !Replace globals
M_SS = $DISTINCT, !Selective search
M_MAX = M_SS,
!
! Number of bits required
!
M_MAX_BITS = M_MAX + 1; !Maximum number of bits needed.
MACRO
F_NOEPT = 0, 0, 1, 0 %,
F_REPLACE = 0, 1, 1, 0 %,
F_RG = 0, 2, 1, 0 %,
F_SS = 0, 3, 1, 0 %;
LITERAL
F_MAX = 1; !Allocation for file flags.
!
! Field and structure definitions
!
FIELD
LIB_FIELDS =
SET
LIB_TYPE = [0, 18, 8, 0],
LIB_IDENTIFICATION = [0, 24, 8, 0],
LIB_VERSION_1 = [0, 0, 16, 0],
LIB_VERSION_2 = [1, 18, 16, 0],
LIB_YEAR = [1, 0, 16, 0],
LIB_MONTH = [2, 18, 16, 0],
LIB_DAY = [2, 0, 16, 0],
LIB_HOUR = [3, 18, 16, 0],
LIB_MINUTE = [3, 0, 16, 0],
LIB_SECOND = [4, 18, 16, 0],
LIB_EPT_SIZE = [4, 0, 8, 0],
LIB_EPT_BLOCK = [5, 18, 16, 0],
LIB_EPT_ALLOCATED = [5, 0, 16, 0],
LIB_EPT_AVAILABLE = [6, 18, 16, 0],
LIB_MNT_SIZE = [6, 0, 8, 0],
LIB_MNT_BLOCK = [7, 18, 16, 0],
LIB_MNT_ALLOCATED = [7, 0, 16, 0],
LIB_MNT_AVAILABLE = [8, 18, 16, 0],
LIB_DELETED_1 = [8, 0, 16, 0], !(in bytes)
LIB_DELETED_2 = [9, 18, 16, 0],
LIB_CONTIGUOUS_1 = [9, 0, 16, 0], !(in bytes)
LIB_CONTIGUOUS_2 = [10, 18, 16, 0],
LIB_INSERT_BLOCK = [10, 0, 16, 0],
LIB_INSERT_OFFSET = [11, 18, 16, 0]
TES;
LITERAL
LIB_OBJECT = 0, !LIB_TYPE
LIB_MACRO = 1,
LIB_ID_2 = 2, !LIB_IDENTIFICATION
LIB_SIZE = 24*2, !in bytes
LIB_LENGTH = 12;
FIELD
EPT_FIELDS =
SET
EPT_NAME_1 = [0, 18, 16, 0],
EPT_NAME_2 = [0, 0, 16, 0],
EPT_BLOCK = [1, 18, 16, 0],
EPT_OFFSET = [1, 0, 16, 0]
TES;
LITERAL
EPT_SIZE = 4*2, !in bytes
EPT_LENGTH = 2;
FIELD
MNT_FIELDS =
SET
MNT_NAME_1 = [0, 18, 16, 0],
MNT_NAME_2 = [0, 0, 16, 0],
MNT_BLOCK = [1, 18, 16, 0],
MNT_OFFSET = [1, 0, 16, 0]
TES;
LITERAL
MNT_SIZE = 4*2, !in bytes
MNT_LENGTH = 2;
FIELD
HDR_FIELDS =
SET
HDR_STATUS = [0, 18, 8, 0],
HDR_DELETED = [$SUB_FIELD (HDR_STATUS, 0, 0, 1, 0)],
HDR_ATTRIBUTES = [0, 26, 8, 0],
HDR_SS = [$SUB_FIELD (HDR_ATTRIBUTES, 0, 0, 1, 0)],
HDR_SIZE_1 = [0, 0, 16, 0], !(in bytes)
HDR_SIZE_2 = [1, 18, 16, 0],
HDR_YEAR = [1, 0, 16, 0],
HDR_MONTH = [2, 18, 16, 0],
HDR_DAY = [2, 0, 16, 0],
HDR_IDENT_1 = [3, 18, 16, 0],
HDR_IDENT_2 = [3, 0, 16, 0]
TES;
LITERAL
HDR_SIZE = 8*2, !in bytes
HDR_LENGTH = 4;
! LBRCOM.BLI - LAST LINE