tldm-universe/Ardent/UV/APP.PROGS/GCI.NTMAP.B

120 lines
3.5 KiB
Plaintext
Raw Permalink Normal View History

2024-09-09 21:51:08 +00:00
*******************************************************************************
*
* GCI.NTMAP.B - list available GCI libraries/functions
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 10/14/98 23801 SAP Change copyrights.
* 04/04/96 18026 PGW Module created.
*
*******************************************************************************
*
* This program is run from the uniVerse TCL prompt, and will list the GCI
* libraries loaded into the current uniVerse session. If the optional
* DETAIL keyword is given, it will list the subroutines defined in each
* library as well.
*
* The program is written so that you can catalog it or not, as you wish.
* If you don't catalog it, run it like this:
*
* RUN APP.PROGS GCI.NTMAP.B [DETAIL]
*
* If you would rather catalog it, then use this command to do so:
*
* CATALOG APP.PROGS MAP.GCI GCI.NTMAP.B LOCAL
*
* You can then run the program with the command:
*
* MAP.GCI [DETAIL]
*
*******************************************************************************
PROGRAM GCI.NTMAP.B
ID = "@(#)%M% %I%"
DECLARE GCI GCIlibcount
DECLARE GCI GCIlibinfo
DECLARE GCI GCIsubinfo
* Examine the command line for the word DETAIL.
cmd = CONVERT(" ", @FM, TRIM(@SENTENCE))
IF cmd<1> = "RUN" THEN
* If 'RUN APP.PROGS' is present, just remove it
DEL cmd<1>
DEL cmd<1>
END
num.words = DCOUNT(cmd, @FM)
BEGIN CASE
CASE num.words = 1
show.detail = 0
CASE num.words = 2 AND cmd<2> = "DETAIL"
show.detail = 1
CASE 1
PRINT "Usage: RUN APP.PROGS GCI.NTMAP.B [DETAIL]"
STOP
END CASE
lib.count = GCIlibcount()
IF lib.count = 0 THEN
PRINT "There are no GCI libraries currently loaded."
STOP
END
HEADING "GCI libraries currently loaded'G'Page 'PL'"
subr.no = 0
total.subr.count = 0
FOR lib.no = 1 TO lib.count
subr.count = 0
lib.name = ""
rslt = GCIlibinfo(lib.no, subr.count, lib.name)
IF rslt THEN
PRINT "Cannot get data for library ":lib.no
STOP
END
IF lib.name = "" THEN lib.name = "[Internal table]"
PRINT lib.name : " (" : subr.count : " subroutines)"
total.subr.count += subr.count
IF show.detail THEN
PRINT
FOR subr.index = 1 TO subr.count
subr.no += 1
which.lib = 0
subr.name = ""
rslt = GCIsubinfo(subr.no, which.lib, subr.name)
IF rslt THEN
PRINT "Cannot get data for subroutine ":subr.no
STOP
END
PRINT SPACE(6) : subr.name
NEXT
PRINT
END
NEXT
PRINT
PRINT lib.count : " GCI libraries loaded"
PRINT total.subr.count : " GCI subroutines."
STOP
END