Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ranhash(3) [osf1 man page]

ranhash(3)						     Library Functions Manual							ranhash(3)

NAME
ranhashinit, ranhash, ranlookup - access routine for the symbol table definition file in archives SYNOPSIS
#include <ar.h> int ranhashinit(pran, pstr, size) struct ranlib *pran; char *pstr; int size; ranhash(name) char *name; struct ranlib *ranhash(name) char *name; DESCRIPTION
ranhashinit initializes static information for future use by ranhash and ranlookup. pran points to an array of ranlib structures. pstr points to the corresponding ranlib string table (these are only used by ranlookup). size is the size of the hash table and should be a power of 2. If the size isn't a power of 2, a 1 is returned; otherwise, a 0 is returned. ranhash returns a hash number given a name. It uses a multiplicative hashing algorithm and the size argument to ranhashinit. ranlookup looks up name in the ranlib table specified by ranhashinit. It uses the ranhash routine as a starting point. Then, it does a rehash from there. This routine returns a pointer to a valid ranlib entry on a match. If no matches are found (the "emptiness" can be inferred if the ran_off field is zero), the empty ranlib structure hash table should be sparse. This routine does not expect to run out of places to look in the table. For example, if you collide on all entries in the table, an error is printed tostderr and a zero is returned. AUTHOR
Mark I. Himelstein RELATED INFORMATION
ar(1) delim off ranhash(3)

Check Out this Related Man Page

RANLIB(5)						      BSD File Formats Manual							 RANLIB(5)

NAME
ranlib -- a.out archive (library) table-of-contents format SYNOPSIS
#include <ranlib.h> DESCRIPTION
The archive table-of-contents command ranlib creates a table of contents for archives, containing object files, to be used by the link-editor ld(1). It operates on archives created with the utility ar(1). The ranlib function prepends a new file to the archive which has three separate parts. The first part is a standard archive header, which has a special name field, "__.SYMDEF". The second part is a ``long'' followed by a list of ranlib structures. The long is the size, in bytes, of the list of ranlib structures. Each of the ranlib structures consists of a zero based offset into the next section (a string table of symbols) and an offset from the begin- ning of the archive to the start of the archive file which defines the symbol. The actual number of ranlib structures is this number divided by the size of an individual ranlib structure. The third part is a ``long'' followed by a string table. The long is the size, in bytes of the string table. SEE ALSO
ar(1), ranlib(1) BUGS
The <ranlib.h> header file, and the ranlib manual page, do not describe the table-of-contents used by ELF systems, which is that from the AT&T System V Release 4 UNIX ABI. BSD
June 6, 1993 BSD
Man Page