📄 ranhash.3x
字号:
.TH ranhash 3x RISC.SH Nameranhashinit, ranhash, ranlookup \- access routine for the symbol tabledefinition file in archives.SH Syntax.B #include <ar.h>.PP.B int ranhashinit(pran, pstr, size).br.B struct ranlib *pran;.br.B char *pstr;.br.B int size;.PP.B ranhash(name).br.B char *name;.PP.B struct ranlib *ranhash(name).br.B char *name;.SH DescriptionThe function.PN ranhashinitinitializes static information for future use by.PN ranhashand.PN ranlookup .The argument.IR pranpoints to an array of ranlib structures.The argument.IR pstrpoints to the corresponding ranlib string table (these are only used by .PN ranlookup ).The argument size.IR sizeis the size of the hash table and should be a power of 2. If the size is nota power of 2,a 1 is returned; otherwise, a 0 is returned..PPThe function.PN ranhashreturns a hash number given a name. It uses a multiplicativehashing algorithmand the.IR sizeargument to.PN ranhashinit ..PPThe.PN ranlookupfunction looks up.IR namein the ranlib table specified by.IR ranhashinit.It uses the.PN ranhashroutine 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 beinferred if the ran_off field is zero), the empty ranlib structure hash table should be sparse. This routine does not expect to run outof places to look in the table. For example, if you collide on all entries inthe table, an error is printed tostderr and a zero is returned..SH See Alsoar(1), ar(5)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -