From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::%GIZMO.SRI.COM:RELAY-INFO-VAX" 20-APR-1989 11:18
To:	MRGATE::"ARISIA::EVERHART"
Subj:		LIBSEARCH part 2 of 2

Message-Id:  <8904201355.AA17564@crdgw1.ge.com>
Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Thu, 20 APR 89 05:58:20 PDT
Received: from NSS.Cs.Ucl.AC.UK by KL.SRI.COM with TCP; Thu, 20 Apr 89 05:41:23 PDT
Received: from ncdlab.ulcc.ac.uk by NSS.Cs.Ucl.AC.UK   via Janet with NIFTP
           id aa07229; 20 Apr 89 13:31 BST
Date: 		20-APR-1989 13:32:46 GMT
From: KEVIN%ncdlab.ulcc.ac.uk@NSS.Cs.Ucl.AC.UK
To: INFO-VAX <@NSS.Cs.Ucl.AC.UK:INFO-VAX@kl.sri.com>
Subject: 	LIBSEARCH part 2 of 2
Sender: "Kevin Ashley, ULCC Networks + Comms." <KEVIN%ncdlab.ulcc.ac.uk@NSS.Cs.Ucl.AC.UK>
Postal-Address: 	ULCC, 20 Guilford St, LONDON WC1N 1DZ, UK
Telephone: 	[+44] (1)-405-8400

$Part2:
$ File_is="STATS.FOR"
$ Check_Sum_is=219560409
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X*
X*`009This file contains routines called at the end of each module,
X*`009each file, and at the end of everything, to do any logging necessary
X*`009and to accumulate statistics.
X*
X`009Subroutine Module_End(Module)
X`009Implicit None
X`009Character*(*) Module
X
X`009Include 'STATCOM.INC'
X`009Include 'QUALCOM.INC'
X`009Include '($LBRDEF)'
X`009Include 'FILCOM.INC'
X
X`009External LIBSEARCH_MATCHEDMOD,LIBSEARCH_NOMATCHMOD
X*-------------------------------------------------------------------------
X*
X*`009Accumulate file-level statistics
X*
X`009Frec = Frec + Recs
X`009FMatch = Fmatch + Matches
X`009If(Matches .ne. 0) FmodMatch = FmodMatch + 1
X`009Fmod = Fmod + 1
X*
X*`009Report if necessary
X*
X`009If(Log) Then
X`009`009If(Matches .ne. 0) Then
X`009`009  Call Lib$Signal(LIBSEARCH_MATCHEDMOD,
X     $                          %val(3),Module,%val(Recs),%Val(Matches))
X`009`009Else
X`009`009  Call Lib$Signal(LIBSEARCH_NOMATCHMOD,
X     $                          %val(2),Module,%val(Recs))
X`009`009Endif
X`009Endif
X*
X*`009Zero statistics for next module
X*
X`009Recs = 0
X`009Matches = 0
X`009Return
X`009End
X
X
X`009Subroutine File_End(Fstat)
X`009Implicit None
X`009Integer FSTAT
X
X`009Include 'STATCOM.INC'
X`009Include 'QUALCOM.INC'
X`009Include '($LBRDEF)'
X`009Include 'FILCOM.INC'
X
X`009External LIBSEARCH_MATCHED,LIBSEARCH_NOMATCH,LIBSEARCH_RECTRUN
X*-------------------------------------------------------------------------
X*
X*`009Accumulate overall statistics
X*
X`009Totrec = Totrec + Frec
X`009Totmat = Totmat + Fmatch
X`009TotMod = TotMod + Fmod
X`009Totfil = Totfil + 1
X*
X*`009We are passed the status code from Lib$get_Index.
X*`009Two status codes may need reporting on - NoMATCHFOU, and
X*`009NULIDX. One indicates that there are no matches, the other that
X*`009the library is empty.
X*
X*`009Report if necessary
X*
X`009If(Log) Then
X`009`009If(Fmodmatch .ne. 0) Then
X`009`009  Call Lib$Signal(LIBSEARCH_MATCHED,
X     $                          %val(5),Current_File(1:Cfilnaml),
X     $    %Val(Fmod),%Val(Fmodmatch),%Val(FRec),%Val(FMatch))
X`009`009Else
X*
X*`009Check status codes when there is no match
X*
X`009`009  Call Lib$Signal(LIBSEARCH_NOMATCH,
X     $                          %val(3),Current_File(1:Cfilnaml),
X     $                                  %Val(Fmod),%Val(FRec))
X`009`009Endif
X`009Endif
X*
X*`009Report on truncated records if necessary
X*
X`009If(Rec_Truncated) Then
X`009  Call Lib$Signal(LIBSEARCH_RECTRUN)
X`009Endif
X*
X*`009Zero statistics for next file
X*
X`009FRec = 0
X`009Fmod = 0
X`009Fmatch = 0
X`009Fmodmatch = 0
X`009Return
X`009End
X
X`009Subroutine Stat_Rep
X*
X*`009Do final statistics reporting, and any other cleanup necessary.
X*
X`009Implicit None
X`009Include 'STATCOM.INC'
X`009Include 'QUALCOM.INC'
X`009Character*(*) Fmt1,Fmt2
X`009Parameter (Fmt1 = '(1X,A,T22,I13,T41,A,T61,I10)')
X`009Parameter (Fmt2 = '(1X,A,T22,I13,T41,A,T58,A)')
X`009Character*17 CPU,Elapsed
X`009Integer PF,Bio,Dio,Tl
X`009Integer Tims,Time(2)
X`009Integer Lib$Stat_Timer,Lib$Sys_Asctim,Status
X`009External LIBSEARCH_NOMATCHALL,LIBSEARCH_NOFILES
X*
X*`009If no files, signal error
X*
X`009If(Totfil .eq. 0) Then
X`009`009Call Lib$Signal(LIBSEARCH_NOFILES)
X*
X*`009If no matches, always report this.
X*
X`009Else If(TotMat .eq. 0) Then
X`009  Call Lib$Signal(LIBSEARCH_NOMATCHALL)
X`009Endif
X
X`009If(.Not.Statistics) Return
X*
X*`009They want statistics. Produce a picture like this:
X*
X*Files searched:                 6       Buffered I/O count:        15
X*Modules searched:              20      `032
X*Records searched:             646       Direct I/O count:           8
X*Characters searched:        14424       Page faults:               47
X*Records matched:                0       Elapsed CPU time:  0 00:00:00.87
X*Lines printed:                  0       Elapsed time:      0 00:00:01.45
X*
X`009Status = Lib$Stat_Timer(3,Bio,Timctx)
X`009Call StChek(Status)
X`009Status = Lib$Stat_Timer(4,Dio,Timctx)
X`009Call StChek(Status)
X`009Status = Lib$Stat_Timer(5,Pf,Timctx)
X`009Call StChek(Status)
X`009Status = Lib$Stat_Timer(2,Tims,Timctx)
X`009Call StChek(Status)
X`009Call Lib$Emul(Tims,-100 000,0,Time)
X`009Status = Lib$Sys_AscTim(Tl,CPU,Time,0)
X`009Call StChek(Status)
X
X`009Write(*,Fmt1) 'Files searched:',Totfil,'Buffered I/O count:',Bio
X`009Write(*,Fmt1) 'Records searched:',Totrec,'Direct I/O count:',Dio
X`009Write(*,Fmt1) 'Characters searched:',TotChr,'Page faults:',Pf
X
X`009Write(*,Fmt2) 'Records matched:',TotMat,'Elapsed CPU time:',CPU
X
X`009Status = Lib$Stat_Timer(1,Time,Timctx)
X`009Call StChek(Status)
X`009Status = Lib$Sys_AscTim(Tl,Elapsed,Time,0)
X`009Call StChek(Status)
X`009Write(*,Fmt2) 'Lines printed:',Totout,'Elapsed time:',Elapsed
X`009Return
X`009End
X
X`009Subroutine Stat_Ini
X*
X*`009Initialize statistics
X*
X`009Implicit None
X`009Integer Status,Lib$Init_Timer
X`009Include 'STATCOM.INC'
X
X`009Totrec = 0
X`009Totfil = 0
X`009TotMod = 0
X`009TotChr = 0
X`009TotMat = 0
X`009TotOut = 0
X`009Status = Lib$Init_Timer(TimCtx)
X`009Call StChek(Status)
X`009Return
X`009End
X
$ GoSub Convert_File
$ File_is="WINDOW.FOR"
$ Check_Sum_is=1007421174
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X*
X*`009All routines in here are concerned with maintaining the data
X*`009structures needed to support the /WINDOW qualifier.
X*`009I tried to do all this with dynamic strings, and dynamic buffers
X*`009to hold the pointers to the strings, but gave up. We allocate
X*`009fixed strings to hold the info now.
X*
X`009Subroutine Win_ini(Winbefore,Winafter,Window)
X`009Implicit None
X`009Integer Winbefore,Winafter
X`009Logical Window
X`009Integer Status
X`009Include 'WINDOW.INC'
X`009Integer I
X
X`009Totwin = 0
X`009If(.Not.Window .or. (Winbefore + Winafter .eq. 0)) Return
X
X`009Totwin = Winbefore + 1
X
X`009Do I = 1,Maxwin
X`009 Wlen(I) = -1
X`009Enddo
X
X`009Return
X`009End
X
X`009Subroutine Win_Fini
X*
X*`009Called at the start of each module to initialize window specific stuff.
X*
X`009Implicit None
X`009Include 'WINDOW.INC'
X
X`009If(Totwin .eq. 0) Return
X`009Cline = 0
X`009WBP = 0
X`009Return
X`009End
X
X`009Subroutine WinOut(Offset)
X*
X*`009Output the line at offset OFFSET from the current line
X*`009Offset may be negative or positive
X*`009It may also be illegal.
X*
X`009Implicit None
X`009Integer Offset
X`009Include 'WINDOW.INC'
X`009Integer LP
X
V`009If(Offset + Cline .le. 0) Return     !Window must wrap before start of fil
Xe
X
X`009LP = WBP + Offset
X`009If(LP .LT. 1) LP = LP + Totwin
X`009Call Type_Rec(Windows(LP)(1:Wlen(LP)),Cline+Offset)
X`009Return
X`009End
X
X`009Integer Function GetRec(Filidx,Des)
X*
X*`009Grab the next record from the library, return its descriptor.
X*`009Our return code is a status code.
X*`009The record is stored in the window buffers.
X*
X`009Implicit None
X`009Include '($DSCDEF)'
X`009Integer Filidx
X`009Record /DSCDEF1/ Des,Tdes
X`009Integer Lbr$Get_Record,Status,Lib$Len
X`009Include 'WINDOW.INC'
X
X`009WBP = WBP + 1
X`009If(WBP .gt. Totwin) WBP = 1
X`009Status = Lbr$Get_Record(Filidx,Windows(WBP),TDes)
X`009If(Status) Then
X`009`009Cline = Cline + 1
X`009`009Wlen(WBP) = Lib$Len(Tdes)
X`009`009Des.Dsc$W_Maxstrlen = Wlen(WBP)
X`009`009Des.Dsc$A_pointer = %Loc(Windows(WBP))
X`009Endif
X
X`009GetRec = Status
X`009Return
X`009End
X
$ GoSub Convert_File
$ File_is="LIBSEARCH.HLP"
$ Check_Sum_is=1763064689
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X1 LIBSEARCH
XLIBSEARCH is a program which duplicates the functions of the VMS SEARCH
Xcommand, but acts instead on text,macro or help libraries on a module-by-
X-module basis. Amongst other things, LIBSEARCH makes it easy to find help
Xtext when you know the word that you want help with (e.g. compare) but
Xdon't know what HELP topic to look in for it (DIFFERENCES, in this case.)
X
XIt also makes it much easier to find which module in a macro or include
Xlibrary defines which symbol, just by using LIBSEARCH to search for the
Xsymbol name.
X
XLIBSEARCH takes arguments which, as much as possible, are the same as those
Xfor SEARCH, and produces output which looks very similar. The restrictions
Xand additions are documented below.
X
XFormat
X LIBSEARCH library-spec,... search-string,...
X`032
X2 Parameters
Xlibrary-spec[,...]
X Specification(s) of library(s) to be searched. Wild card characters are
X allowed. Only text,macro or help libraries can be searched. The filetype
X will be defaulted appropriately if the /HELP,/MACRO or /TEXT qualifiers
X are used. /HELP is assumed if no qualifier is present.
Xsearch-string[,...]
X Character string to be located. Enclose strings containing lowercase
X letters, blanks or other nonalphanumeric characters in quotation marks.
X Up to 100 search strings may be specified, and there is no explicit limit
X on the length of strings. A limit is imposed, however, by DCL on the
X maximum length of the total command.
X2 Restrictions
XThe /EXCLUDE qualifier, to exclude specific files, is not yet available.
X
X2 Release_Notes
XVersion 1.2 of LIBSEARCH supports the /FORMAT qualifier in full
Xand also correctly implements message generation using VMS signals
Xrather than TYPE statements. The SET MESSAGE command now affects
Xits output, and status codes are correctly returned on failure.
X
XThe /SUBTOPIC switch has been added, and changes made to the handling
Xof difficulties opening input files.
X2 Additions
XThe following switches and features exist in LIBSEARCH, additional to those
Xprovided by SEARCH.
X
XThe /MEXCLUDE qualifier allows you exclude a particular module, or
Xwildcarded modules, from a search. It can be global (affecting all libraries
Xin the command) or local, affecting only one, or both.
X
XThe /MODULE qualifier allows you to specify that only certain modules are to
Xbe searched.
X
XThe /MEXCLUDE and /MODULE qualifiers can be used together.
X
XThe /STATISTICS and /LOG qualifiers produce information pertaining to
Xmodules searched, as well as files.
X
XThe /MACRO,/HELP and /TEXT qualifiers cause filetype defaulting.
X
XThe /SUBTOPICS qualifier controls whether information is output on the
XHELP subtopic in which a target is found when searching HELP libraries.
X
XThe output format of LIBSEARCH is slightly different from SEARCH. See topic
XOutput_format for more information.
X2 Output_Format
X The format of output from LIBSEARCH differs slightly from that produced
Xby the SEARCH command. LIBSEARCH outputs 40 asterisks between hits from
Xdifferent files, and 30 asterisks between hits from different modules. The
Xmodule name is displayed on a separate line, after the file name, before the
Xfirst hit from a specific module. In addition, if a HELP library is being
Xsearched, and the /SUBTOPIC qualifier is present, then the subtopic(s) in
Xwhich the target was found are displayed after the module name, on the same
Xline.
X
X 20 asterisks delimit output from different HELP subtopics within a single
X HELP module if the /SUBTOPIC qualifier is present (which it is by default.)
X
X 15 asterisks are present between different target windows if the /WINDOW
X qualifier is present with a non-zero value.
X2 Qualifiers
X/EXACT
X /NOEXACT (default)
X Distinguishes between uppercase and lowercase characters.
X/FORMAT=option
X Formats output in one of four ways:
X`032
X +---------+----------------------------------------------------------+
V `124 DUMP    `124 Displays both control and nonprintable characters as     `1
X24
V `124         `124 ANSI mnemonics.                                          `1
X24
X +---------+----------------------------------------------------------+
V `124 NONULLS `124 Same as DUMP, but removes any null characters.           `1
X24
X +---------+----------------------------------------------------------+
V `124 PASSALL `124 Does not translate control and nonprintable characters;  `1
X24
V `124         `124 the terminal driver does not actually pass 8-bit         `1
X24
V `124         `124 characters to the terminal unless SET TERMINAL/PASTHRU   `1
X24
V `124         `124 or SET TERMINAL/EIGHT_BIT are already in effect.         `1
X24
X +---------+----------------------------------------------------------+
V `124 TEXT    `124 Displays control characters as ANSI mnemonics; terminal  `1
X24
V `124         `124 formatting characters (<HT>, <CR>, <LF>, <VT>, and <FF>) `1
X24
V `124         `124 are passed without change.                               `1
X24`032
X +---------+----------------------------------------------------------+
X`032
X/HEADING (default)
X /NOHEADING
X Includes module and file names in the output file and displays 40
X asterisks as a window separator between groups of lines that belong
X to different files, and 30 asterisks between groups of lines from different
X modules. (The /WINDOW qualifier displays 15 asterisks as a separator
X between windows.)`032
X/HELP
X The /HELP,/MACRO and /TEXT qualifiers indicate the type of library to be
X searched. Their only effect is to default the filetype to .HLB,.MLB or
X .TLB appropriately. /HELP is assumed if not present.
X/LOG
X /NOLOG (default)
X Types a message to SYS$OUTPUT for each file and module searched. The
X message includes the file or module name(s), the number of records, and
X the number of matches for each file or module searched.
X/MACRO
X The /HELP,/MACRO and /TEXT qualifiers indicate the type of library to be
X searched. Their only effect is to default the filetype to .HLB,.MLB or
X .TLB appropriately.
X/MATCH=option
X Interprets multiple search strings in one of the following ways:
X`032
X +---------+----------------------------------------------------------+
V `124 AND     `124 A match occurs only if the record contains all the       `1
X24
V `124         `124 strings.                                                 `1
X24
X +---------+----------------------------------------------------------+
V `124 NAND    `124 A match occurs only if the record contains none of the   `1
X24
V `124         `124 strings.                                                 `1
X24
X +---------+----------------------------------------------------------+
V `124 NOR     `124 A match occurs only if the record does not contain all   `1
X24
V `124         `124 of the strings.                                          `1
X24
X +---------+----------------------------------------------------------+
V `124 OR      `124 A match occurs if the record contains any of the         `1
X24
V `124         `124 strings.  (default)                                      `1
X24
X +---------+----------------------------------------------------------+
X`032
X/MEXCLUDE=module
X Excludes the specified module(s) from the search. Module can be a wildcard.
X If specified after the command verb, but before any libraries, applies
X to all libraries searched. If specified after a specific library name,
X applies only to that library.
X A local specification overrides any global specification.
X/MODULE=module
X Only searches the specified module(s). Module can be a wildcard.
X If specified after the command verb, but before any libraries, applies
X to all libraries searched. If specified after a specific library name,
X applies only to that library.
X A local specification overrides any global specification.
X/NUMBERS
X /NONUMBERS (default)
X Includes source line numbers in the output.
X/OUTPUT[=file-spec]`032
X /NOOUTPUT
X Specifies an output file. The default is SYS$OUTPUT.
X/REMAINING
X /NOREMAINING (default)
X Includes in the output all records from the first matched record to
X the end of the module. This qualifier overrides n2 in /WINDOW, but
X allows /WINDOW=n1.
X/STATISTICS
X /NOSTATISTICS (default)
X Determines whether or not statistics about the search are displayed.
X/SUBTOPICS (default)
X /NOSUBTOPICS
X Determines, when searching HELP libraries, whether the subtopic(s) as
X well as the module in which targets are found is output. Has no effect
X if /NOHEADER is used.
X/TEXT
X The /HELP,/MACRO and /TEXT qualifiers indicate the type of library to be
X searched. Their only effect is to default the filetype to .HLB,.MLB or
X .TLB appropriately.
X/WINDOW[=(n1[,n2])]
X /NOWINDOW (default)
X Specifies the number of lines to be displayed with the search string.
X If you specify the /WINDOW qualifier without n1 and n2, two lines
X above the search string, the search string, and the two lines below
X the search string are included in the output. If you specify n1 and
X n2, the /WINDOW qualifier displays n1 lines above the search string,
X the search string, and n2 lines below the search string. If you
X specify /WINDOW with a single number (n1), n1 specifies the number of
X lines to display including the search string: half the lines precede
X the matched search string, and half follow it. (If n is odd, 1 line is
X added to the lines following the matched search string.) If you
X specify /WINDOW=0, the file name of each file containing a match, and
X the module name of each module (but no records) are included in the output.
X If you omit the /WINDOW qualifier, only the line containing a match is
X displayed.
$ GoSub Convert_File
$ File_is="FILCOM.INC"
$ Check_Sum_is=1111581105
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X*
X*`009Common block for library names, and current library name.
X*`009The Array Filnams holds the names as supplied by the user,
X*`009and Deftyps (not yet used) holds the default file types
X*`009to be applied to each file.
X*`009The array Excluded holds the names (if any) of files to exclude.
X*
X*`009Current_File holds the expanded filename of the current
X*`009library.
X*
X*`009Helplib is true if the current library is a help library
X*
X`009Integer Maxfiles
X`009Parameter (Maxfiles = 10)
X`009Character*160 Filnams(Maxfiles)          !Names of files to search
X`009Character*160 Excluded(Maxfiles)`009 !Files to exclude
X`009Integer Lexcl(Maxfiles)
X`009Character*3 Deftyps(Maxfiles)`009`009 !Default file types
X`009Character*(Lbr$C_MaxKeyLen) Modquals(MaxFiles),Cmodqual  !Modules
X`009Character*(Lbr$C_MaxkeyLen) Modexcl(Maxfiles)   !Excluded modules
X`009Integer Modqlen(Maxfiles),Cmodqlen       !Lengths of module names
X`009Integer Lmodexcl(Maxfiles)
X`009Integer Fnamlen(Maxfiles)                !Lengths of file names
X`009Character*256 Current_file`009`009!Expanded current filename
X`009Integer Cfilnaml
X`009Integer Nfiles,Cfile`009`009`009!Total files, current file
X`009Integer FilIdx`009`009`009`009!Library handle
X`009Logical Helplib
X
X`009Common /FILCOM/Nfiles,Cfile,Modquals,Modqlen,Filnams,FilIdx,
X     $    Deftyps,Fnamlen,Excluded,Lexcl,Modexcl,Lmodexcl,
X     $    Current_File,Cfilnaml,Cmodqual,Cmodqlen,Helplib
X
$ GoSub Convert_File
$ File_is="FORMAT.INC"
$ Check_Sum_is=1644190120
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X`009Integer Lform(0:255)
X`009Character*5 Cform(0:255)
X`009Save Lform,Cform
X`009Data Lform/8*5,8*4,8*5,5,4,5,5,4*4,
X     $             88*1,7*1,5,
X     $             8*5,5*5,4,2*5,5*5,4,2*5,4*5,4,5,4,5,
X     $             5,7*1,80*1,7*1,5/
X
X`009Data Cform /
X     $ '<NUL>','<SOH>','<STX>','<ETX>','<EOT>','<ENQ>','<ACK>','<BEL>',
X     $ '<BS>','<HT>','<LF>','<VT>','<FF>','<CR>','<SO>','<SI>',
X     $ '<DLE>','<DC1>','<DC2>','<DC3>','<DC4>','<NAK>','<SYN>','<ETB>',
X     $ '<CAN>','<EM>','<SUB>','<ESC>','<FS>','<GS>','<RS>','<US>',
X     $ ' ','!','"','#','$','%','&','''',
X     $ '(',')','*','+',',','-','.','/',
X     $ '0','1','2','3','4','5','6','7',
X     $ '8','9',':',';','<','=','>','?',
X     $ '@','A','B','C','D','E','F','G',
X     $ 'H','I','J','K','L','M','N','O',
X     $ 'P','Q','R','S','T','U','V','W',
X     $ 'X','Y','Z','[','\',']','`094','_',
X     $ '``','a','b','c','d','e','f','g',
X     $ 'h','i','j','k','l','m','n','o',
X     $ 'p','q','r','s','t','u','v','w',
X     $ 'x','y','z','`123','`124','`125','`126','<DEL>',
X     $ '<x80>','<x81>','<x82>','<x83>','<IND>','<NEL>','<SSA>','<ESA>',
X     $ '<HTS>','<HTJ>','<VTS>','<PLD>','<PLU>','<RI>','<SS2>','<SS3>',
X     $ '<DCS>','<PU1>','<PU2>','<STS>','<CCH>','<MW>','<SPA>','<EPA>',
X     $ '<x98>','<x99>','<x9A>','<CSI>','<ST>','<OSC>','<PM>','<APC>',
X     $ '<xA0>','`161','`162','`163','`164','`165','`166','`167',
X     $ '`168','`169','`170','`171','`172','`173','`174','`175',
X     $ '`176','`177','`178','`179','`180','`181','`182','`183',
X     $ '`184','`185','`186','`187','`188','`189','`190','`191',
X     $ '`192','`193','`194','`195','`196','`197','`198','`199',
X     $ '`200','`201','`202','`203','`204','`205','`206','`207',
X     $ '`208','`209','`210','`211','`212','`213','`214','`215',
X     $ '`216','`217','`218','`219','`220','`221','`222','`223',
X     $ '`224','`225','`226','`227','`228','`229','`230','`231',
X     $ '`232','`233','`234','`235','`236','`237','`238','`239',
X     $ '`240','`241','`242','`243','`244','`245','`246','`247',
X     $ '`248','`249','`250','`251','`252','`253','`254','<xFF>'/
$ GoSub Convert_File
$ File_is="QUALCOM.INC"
$ Check_Sum_is=1046675624
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X*
X*`009Common block describing user qualifiers
X*
X`009Integer Match_Or,Match_And,Match_Nand,Match_Nor
X`009Parameter (Match_Or = 0,Match_And = 1)
X`009Parameter (Match_Nand = 2,Match_Nor = 3)
X`009Character*16 Matchnams
X`009Parameter (Matchnams = 'OR  AND NANDNOR ')
X
X`009Integer FmtTxt,FmtDmp,FmtAll,FmtNul
X`009Parameter (FmtTxt = 0,FmtDmp = 2,FmtAll = 1,FmtNul = 3)
X`009Logical Remaining,Exact,Heading,Log,Statistics,Window,Numbers
X`009Logical Subtopic
X`009Integer Winbefore,Winafter
X`009Integer Format,Match
X`009Integer Outlun
X`009Common /QUALCOM/ Match,Remaining,Exact,Heading,Log,Statistics,
X     $                  Numbers,Window,WinBefore,WinAfter,Format,Outlun,
X     $                  Subtopic
X
$ GoSub Convert_File
$ File_is="STATCOM.INC"
$ Check_Sum_is=302393939
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X*
X*`009Common block for statistics
X*
X`009Integer TotFil,Totrec,Totchr,Totmod,Totout,TotMat
X`009Integer Frec,Fmatch,Fmod,Fmodmatch
X`009Integer Recs,Matches,TimCtx
X`009Logical Rec_truncated
X`009Common/StatCom/TotFil,Totrec,Totchr,Totmod,Totout,TotMat,
X     $                 Frec,Fmatch,Fmod,Fmodmatch,
X     $                 Recs,Matches,TimCtx,Rec_Truncated
$ GoSub Convert_File
$ File_is="TOPICS.INC"
$ Check_Sum_is=1462784019
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X*
X*`009Common block for help subtopics
X*
X`009Integer Maxtopic
X`009Parameter (Maxtopic = 9)
X`009Character*60 Topics(Maxtopic)
X`009Integer Ltopics(Maxtopic)
X`009Integer Ctopic
X`009Common/TOPICS/ CTopic,Topics,LTopics
$ GoSub Convert_File
$ File_is="TRGCOM.INC"
$ Check_Sum_is=303520634
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X*
X*`009Define descriptors for dynamic strings which reference
X*`009targets
X*
X`009Include '($dscdef)'
X`009Integer Maxtarget
X`009Parameter (MaxTarget = 100)
X`009Record /dscdef1/ Target(Maxtarget)
X
X`009Integer Ntargets
X
X`009Common/TRGCOM/Ntargets,Target
X
$ GoSub Convert_File
$ File_is="WINDOW.INC"
$ Check_Sum_is=1631416373
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X*
X*`009Common blocks, etc for window buffers
X*
X`009Integer Maxwin
X`009Parameter (Maxwin = 51)
X`009Integer Totwin`009`009`009`009!Total window lines
X`009Integer Cline`009`009`009`009!Current line number
X`009Integer WBP`009`009`009`009!Window buffer pointer
X`009Include '($lbrdef)'
X`009Character*(LBR$C_MAXRECSIZ) Windows(Maxwin)
X`009Integer Wlen(Maxwin)
X`009Common /WINCOM/ Totwin,Cline,WBP,Wlen,Windows
X
$ GoSub Convert_File
$ File_is="LIBSEARCHMSG.MSG"
$ Check_Sum_is=1527386180
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X.title LIBSEARCH FACILITY messages
X.FACILITY LIBSEARCH,1001
X!
X!
X.SEVERITY Informational
X
X!STATS
XNOMATCH       <!AS, !SL module!%S, !SL record!%S> /FAO=3
XNOMATCHMOD    <module !AS, !SL record!%S> /FAO=2
XNOMATCHALL    <No strings matched.>
XMATCHEDMOD    <module !AS, !SL record!%S, !SL match!%S> /FAO=3
VMATCHED       <!AS, !SL module!%S, !SL match!%S,!/!_!_ !SL record!%S, !SL matc
Xh!%S> /FAO=5
X
X.Severity Warning
X
X!$DISK1:[KEVIN.LIBSEARCH]PRSFIL.FOR;23
X
XTOOMNYFIL <No more than !SL files.>/FAO=1
X
X!$DISK1:[KEVIN.LIBSEARCH]PRSTARGET.FOR;9
X
XTOOMNYTRG <No more than !SL strings.> /FAO=1
X
XRECTRUN   <Some output records truncated>
XOPENIN    <Error opening !AS for input> /FAO=1
X
X.Severity Error
X
XNOFILES   <No files found>
X
X.Severity Severe
X
X.SEVERITY FATAL
X
X!$DISK1:[KEVIN.LIBSEARCH]LIBSEARCH.FOR;26
X
XNOTTXTMAC  <Not a text,macro or help library>
X
X!$DISK1:[KEVIN.LIBSEARCH]PRSCOM.FOR;17
X
XWINPARONE  <First parameter to /WINDOW must be less than !SL> /FAO=1
XWINPARBAD  <Value for /WINDOW must be less than !SL.> /FAO=1
XINVNUMFMT  <Invalid number format !AS> /FAO=1
$ GoSub Convert_File
$ File_is="COMPILE.COM"
$ Check_Sum_is=108554080
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X$ FORTRAN 'CSWIT' LIBSEARCH.FOR
X$ FORTRAN 'CSWIT' PRSCOM.FOR
X$ FORTRAN 'CSWIT' PRSFIL.FOR
X$ FORTRAN 'CSWIT' PRSTARGET.FOR
X$ FORTRAN 'CSWIT' SEARCH_MODULE.FOR
X$ FORTRAN 'CSWIT' STATS.FOR
X$ FORTRAN 'CSWIT' WINDOW.FOR
X$ MESSAGE LIBSEARCHMSG
$ GoSub Convert_File
$ File_is="LINK.COM"
$ Check_Sum_is=2097233183
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
X$ Link/NOTRACEBACK 'LSWIT' -
X    LIBSEARCH,PRSCOM,PRSFIL,PRSTARGET,SEARCH_MODULE,STATS,Window,-
X    LIBSEARCHMSG
$ GoSub Convert_File
$ File_is="LIBSEARCH.CLD"
$ Check_Sum_is=1395794337
$ Copy SYS$Input VMS_SHAR_DUMMY.DUMMY
Xdefine type SEARCH_FORMATS
X   keyword PASSALL
X   keyword TEXT
X      default
X   keyword DUMP
X   keyword NONULLS
Xdefine type SEARCH_MATCHES
X   keyword AND
X   keyword OR
X      default
X   keyword NAND
X   keyword NOR
Xdefine verb LIBSEARCH
X   image SYS$TOOLS:libSEARCH
X   parameter P1 , label=SOURCE , prompt="Library Filename(s)"
X      value (required,list,type=$infile)
X   parameter P2 , label=STRING , prompt="String(s)"
X      value (required,list)
X   qualifier EXACT
X   qualifier EXCLUDE
X      nonnegatable
X      value (required,Type=$infile)
X     Placement=Positional
X   qualifier FORMAT
X      nonnegatable
X      default
X      value (default="TEXT",type=SEARCH_FORMATS)
X   qualifier HEADING
X      Negatable,default
X   qualifier LOG
X   qualifier MATCH
X      nonnegatable
X      default
X      value (default="OR",type=SEARCH_MATCHES)
X   qualifier MEXCLUDE
X      nonnegatable
X      value (required)
X     Placement=Positional
X   qualifier MODULES
X     nonnegatable
X     value (required)
X     Placement=Positional
X   qualifier NUMBERS
X   qualifier OUTPUT
X      default
X      value (default="SYS$OUTPUT",type=$outfile)
X   qualifier REMAINING
X   qualifier SUBTOPICS
X      Negatable,default
X   qualifier STATISTICS
X   qualifier WINDOW
X      value (list,default="5")
X! Types of library
X   Qualifier HELP
X    Nonnegatable
X     Placement=Positional
X   Qualifier MACRO
X    Nonnegatable
X     Placement=Positional
X   Qualifier TEXT
X    Nonnegatable
X     Placement=Positional
X
$ GoSub Convert_File
$ Exit

