3-OCT-1986 22:01:43.15 DISK$PG22:[UXMERRITT.DECUS.PAPERS.FALL_86]LIBED.FOR;94 program libed Purpose: Provide an interactive, screen oriented display of selected CMS Library elements. Loop through all the element spec's on the command line, validate the CMS Library, and create a virtual display for the element names. Get the name of the library to be looked at. (if not specified, it will be CMS$LIB.) If the library can't be found/accessed, signal the problem. Otherwise, create a display for the menu portion. Label the display with the CMS Library's name and the generation spec that was provided. Loop through all the element spec's for the valid CMS Libraries. Put the element names on the associated virtual display. Call CMS with the element and generation specification. (wildcards and group names may result in more than one invocation of the output routine.) Create the pasteboard for the terminal. Create the virtual keyboard. Paste up the displays that will fit on the terminal. Create a display for the getting control info - cursor, etc. Paste up the control display (it must not be occluded). Loop until done: wait for user input. ^W will refresh the screen. The cursor keys (or ^P, ^N, ^F, ^B) will move to and highlite the next element in the given display. PF2 gets help from a VMS help library. Keypad "0" switches to the next virtual display. ^Z means exit. "v" or a "V" will "VIEW" the element. "z" or a "Z" will "ZOOM" in on the element's attributes. "?" will give a mini help box. Anything else gets a bell. When done, reset the cursor and delete the pasteboard. 3-OCT-1986 22:01:43.15 DISK$PG22:[UXMERRITT.DECUS.PAPERS.FALL_86]LIBED.FOR;94 subroutine help ( paste_board_id ) Purpose: Create a small help display. create a display for the help info. fill up the menu. 3-OCT-1986 22:01:43.15 DISK$PG22:[UXMERRITT.DECUS.PAPERS.FALL_86]VIEW.FOR;14 subroutine view( pb_id, display, libdb ) Purpose: Allow the user to view a file in the CMS library. Get the element that is at the cursor. Open the element. Loop until EOF or until the user wants no more. FETCH a line of the element Check to see if we've reache EOF. Note: CMS returns RMS$_EOF, not CMS$_EOF as documented. If we've put out 20 lines, pause. Ask if the user wants to continue. Close the element. Clean up and return. 3-OCT-1986 22:01:43.15 DISK$PG22:[UXMERRITT.DECUS.PAPERS.FALL_86]ZOOM.FOR;22 subroutine zoom( pb_id, display, libdb ) Purpose: Provide a window of expanded information about a given generation of an element. Create a virtual display for the info. Get element name at present cursor position. Label the display with the element name and generation expression. Ask CMS about the element. Paste up the display. Wait for any character to continue. Clean up and return. 3-OCT-1986 22:01:43.15 DISK$PG22:[UXMERRITT.DECUS.PAPERS.FALL_86]ADD_ELEMENT_TO_DISPLAY.FOR;4 integer function add_element_to_display( new_element, ldb, + display, ! the user supplied parameter + element_id, generation_id, user_name_id, + trans_time, create_time, revision_time, remark_id, + class_list_id, format, attributes, revision_number, + reservations ) Purpose: This is a callback/output routine for CMS$SHOW_GENERATION. It serves two types of display: 1) a "menu" of CMS elements 2) a "zoom" of element characteristics if we're using the SHOW_GENERATION to display the list of elements that match. see if the new element name will fit on the line. put the element name on the line in the specified virtual display. Otherwise, we're using the SHOW_GENERATION to zoom in on the element. show the "real" generation of the element. show the username of the person who created the element. display the time that the element was placed in the library, and the source file's creation time. display the generation's remark, if any. display the classes the generation belongs to, if any (up to 255 chars). indicate if the element is on reserve. return a good status to CMS. (gee, it just had to work, right?) 3-OCT-1986 22:01:43.15 DISK$PG22:[UXMERRITT.DECUS.PAPERS.FALL_86]MOVE_TO_FIELD.FOR;32 subroutine move_to_field( motion, display ) Purpose: Move the cursor and hi-lite an element name. Options are: up, down, right, left, clear. Clear the old cursor from then screen (turn off reverse video). Calculate new position and where to put the cursor. Except when clearing the cursor, hi-lite the new position.