Trailing-Edge
-
PDP-10 Archives
-
BB-R595B-SM_11-9-85
-
mcb/utilities/lbrlis.bli
There is 1 other file named lbrlis.bli in the archive. Click here to see a list.
MODULE LBRLIS ( !List Contents of Library
IDENT = '001010',
LANGUAGE (BLISS16, BLISS36)
) =
BEGIN
!
!
!
! 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 module contains the routines to display the contents of the
! currently open library file.
!
!
! ENVIRONMENT: ANY
!
! AUTHOR: ALAN D. PECKHAM, CREATION DATE: 5-MAY-80
!
! MODIFIED BY:
!
! Alan D. Peckham, : VERSION 01
! 01 - Data structure reformation (change from BLOCK_16 to BLOCK structure).
!--
!
! TABLE OF CONTENTS:
!
FORWARD ROUTINE
LIST : NOVALUE, !List contents of library
LIST_ENTRIES : NOVALUE; !List entry points
!
! INCLUDE FILES
!
LIBRARY 'LBRCOM'; !LBR COMMON DEFINITIONS
!
! MACROS:
!
! NONE
!
! EQUATED SYMBOLS:
!
LITERAL
BLOCK_SIZE = 512;
!
! OWN STORAGE:
!
OWN
LIBBLK : INITIAL (0);
!
! EXTERNAL REFERENCES:
!
EXTERNAL ROUTINE
GETFIL, !Get a word from the file.
POSFIL, !Position to a word in the file
!on the listing device.
!and force a page break.
SKIP : NOVALUE; !Skip the specified number of lines.
EXTERNAL
LIBEPT : REF BLOCKVECTOR [1, EPT_LENGTH] FIELD (EPT_FIELDS),
LIBHDR : REF BLOCK [LIB_LENGTH] FIELD (LIB_FIELDS),
LIBMNT : REF BLOCKVECTOR [1, MNT_LENGTH] FIELD (MNT_FIELDS),
FLAGS : BITVECTOR [M_MAX_BITS];
GLOBAL ROUTINE LIST (LIB_FILBLK) : NOVALUE =
!++
! FUNCTIONAL DESCRIPTION:
!
!
!
!
! FORMAL PARAMETERS:
!
!
! IMPLICIT INPUTS:
!
! NONE
!
! IMPLICIT OUTPUTS:
!
! NONE
!
! ROUTINE VALUE:
!
! NONE
!
! SIDE EFFECTS
!
! NONE
!
!--
BEGIN
LOCAL
TEMP;
LIBBLK = .LIB_FILBLK;
PUTLN (1, CH$ASCIZ ('Object module library created by: LBR %2R'), .LIBHDR [LIB_VERSION_1],
.LIBHDR [LIB_VERSION_2]);
BEGIN
LOCAL
DATE : VECTOR [3],
TIME : VECTOR [3];
DATE [0] = .LIBHDR [LIB_YEAR];
DATE [1] = .LIBHDR [LIB_MONTH];
DATE [2] = .LIBHDR [LIB_DAY];
TIME [0] = .LIBHDR [LIB_HOUR];
TIME [1] = .LIBHDR [LIB_MINUTE];
TIME [2] = .LIBHDR [LIB_SECOND];
PUTLN (0, CH$ASCIZ ('Last insert occurred %Y at %3Z'), DATE, TIME);
END;
IF (TEMP = .LIBHDR [LIB_MNT_ALLOCATED]) NEQ 0
THEN
PUTLN (0,
CH$ASCIZ ('MNT entries allocated: %D; available: %D'), .TEMP, .LIBHDR [LIB_MNT_AVAILABLE]);
IF (TEMP = .LIBHDR [LIB_EPT_ALLOCATED]) NEQ 0
THEN
PUTLN (0,
CH$ASCIZ ('EPT entries allocated: %D; available: %D'), .TEMP, .LIBHDR [LIB_EPT_AVAILABLE]);
IF (TEMP = .LIBHDR [LIB_CONTIGUOUS_2]) NEQ 0
THEN
PUTLN (0, CH$ASCIZ ('File space available: %D words'),
.TEMP/2);
IF (TEMP = .LIBHDR [LIB_DELETED_2]) NEQ 0
THEN
PUTLN (0,
CH$ASCIZ ('Recoverable deleted space: %D words'), .TEMP/2);
IF (TEMP = .LIBHDR [LIB_MNT_ALLOCATED] - .LIBHDR [LIB_MNT_AVAILABLE]) NEQ 0
THEN
BEGIN
SKIP (1);
INCRA MNT FROM LIBMNT [0, 0, 0, 0, 0] TO LIBMNT [.TEMP - 1, 0, 0, 0, 0] BY LIBMNT [1, 0, 0, 0, 0] -
LIBMNT [0, 0, 0, 0, 0] DO
BEGIN
MAP
MNT : REF BLOCK [MNT_LENGTH] FIELD (MNT_FIELDS);
IF .FLAGS [M_LIST_HEADERS]
THEN
BEGIN
LOCAL
DATE : VECTOR [3],
HDR : BLOCK [HDR_LENGTH] FIELD (HDR_FIELDS);
POSFIL (.LIBBLK, .MNT [MNT_BLOCK], .MNT [MNT_OFFSET] + 2);
GETFIL (.LIBBLK, CH$PTR (HDR,, 18), HDR_SIZE/2);
DATE [0] = .HDR [HDR_YEAR];
DATE [1] = .HDR [HDR_MONTH];
DATE [2] = .HDR [HDR_DAY];
PUTLN (1, CH$ASCIZ ('%2R%9TSize: %D%21TInserted:%Y%41TIdent:%2R'), .MNT [MNT_NAME_1],
.MNT [MNT_NAME_2], .HDR [HDR_SIZE_2], DATE, .HDR [HDR_IDENT_1], .HDR [HDR_IDENT_2]);
IF .HDR [HDR_SS] NEQ 0 THEN PUTLN (0, CH$ASCIZ ('%9TAttributes: SS'));
END
ELSE
IF .FLAGS [M_LIST_ENTRIES]
THEN
BEGIN
PUTLN (1, CH$ASCIZ ('** Module:%2R'), .MNT [MNT_NAME_1], .MNT [MNT_NAME_2])
END
ELSE
PUTLN (0, CH$ASCIZ ('%2R'), .MNT [MNT_NAME_1], .MNT [MNT_NAME_2]);
IF .FLAGS [M_LIST_ENTRIES]
THEN
BEGIN
LOCAL
COUNT,
NAMES : VECTOR [16];
SKIP (1);
COUNT = 0;
INCRA EPT FROM LIBEPT [0, 0, 0, 0, 0] TO LIBEPT [.LIBHDR [LIB_EPT_ALLOCATED] - .LIBHDR [
LIB_EPT_AVAILABLE] - 1, 0, 0, 0, 0] BY LIBEPT [1, 0, 0, 0, 0] - LIBEPT [0, 0,
0, 0, 0] DO
BEGIN
MAP
EPT : REF BLOCK [EPT_LENGTH] FIELD (EPT_FIELDS);
IF (.EPT [EPT_BLOCK] EQL .MNT [MNT_BLOCK]) AND (.EPT [EPT_OFFSET] EQL .MNT [MNT_OFFSET])
THEN
BEGIN
NAMES [.COUNT] = .EPT [EPT_NAME_1];
NAMES [COUNT = .COUNT + 1] = .EPT [EPT_NAME_2];
IF (COUNT = .COUNT + 1) GEQ 16
THEN
BEGIN
LIST_ENTRIES (NAMES, .COUNT/2);
COUNT = 0;
END;
END;
END;
IF .COUNT GTR 0
THEN
BEGIN
LIST_ENTRIES (NAMES, .COUNT/2);
COUNT = 0;
END;
SKIP (1);
END;
END;
END;
END; !OF LIST
ROUTINE LIST_ENTRIES (NAMES, COUNT) : NOVALUE =
!++
! FUNCTIONAL DESCRIPTION:
!
!
!
!
! FORMAL PARAMETERS:
!
!
! IMPLICIT INPUTS:
!
! NONE
!
! IMPLICIT OUTPUTS:
!
! NONE
!
! ROUTINE VALUE:
!
! NONE
!
! SIDE EFFECTS
!
! NONE
!
!--
BEGIN
MAP
NAMES : REF VECTOR [16];
BIND
PATTERN = UPLIT (
CH$ASCIZ (' %2R'),
CH$ASCIZ (' %2R %2R'),
CH$ASCIZ (' %2R %2R %2R'),
CH$ASCIZ (' %2R %2R %2R %2R'),
CH$ASCIZ (' %2R %2R %2R %2R %2R'),
CH$ASCIZ (' %2R %2R %2R %2R %2R %2R'),
CH$ASCIZ (' %2R %2R %2R %2R %2R %2R %2R'),
CH$ASCIZ (' %2R %2R %2R %2R %2R %2R %2R %2R')
) : VECTOR [8];
PUTLN (0, .PATTERN [.COUNT - 1], .NAMES [0], .NAMES [1], .NAMES [2], .NAMES [3], .NAMES [4], .NAMES [5],
.NAMES [6], .NAMES [7], .NAMES [8], .NAMES [9], .NAMES [10], .NAMES [11], .NAMES [12], .NAMES [13],
.NAMES [14], .NAMES [15]);
END; !OF LIST_ENTRIES
END
ELUDOM