The LBR$SEARCH routine searches the library index for symbols
with the given RFA and calls the supplied routine with those
symbols.
Use LBR$SEARCH to find index keys that point to the same module
header. Generally, in index number 1 (the module name table),
just one key points to any particular module; thus, you would
probably use this routine only to search library indexes where
more than one key points to a module. For example, you might call
LBR$SEARCH to find all the symbols in the symbol index that are
associated with an object module in an object library.
If LBR$SEARCH finds an index key associated with the specified
RFA, it calls a user-supplied routine with two arguments:
o The key argument, which is the address of either of the
following items:
- A string descriptor for the key name (libraries with ASCII
key names)
- An unsigned longword for the key value (libraries with
binary keys)
o The RFA argument, which is the address of a 2-longword array
containing the RFA of the module header
o The key's type, whose flag bits are as follows:
Flag Bits Description
LBR$M_SYM_WEAK = 1 UNIX-style weak symbol attribute
LBR$M_SYM_GROUP = 2 Group symbol attribute
The user routine must return a value to indicate success or
failure. If the specified user routine returns a false value
(low bit = 0), then the index search terminates.
Note that the key found by LBR$SEARCH is valid only during the
call to the user-supplied routine. If you want to use the key
later, you must copy it.