*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: ohash_interval | Section: 3 | Source: OpenBSD | File: ohash_interval.3
OHASH_INTERVAL(3) FreeBSD Library Functions Manual OHASH_INTERVAL(3) NAME ohash_interval, ohash_create_entry, ohash_qlookup, ohash_qlookupi - helper functions for open hashing SYNOPSIS #include <stdint.h> #include <stddef.h> #include <ohash.h> uint32_t ohash_interval(const char *start, const char **pend); void * ohash_create_entry(struct ohash_info *info, const char *start, const char **pend); unsigned int ohash_qlookupi(struct ohash *h, const char *start, const char **pend); unsigned int ohash_qlookup(struct ohash *h, const char *start); DESCRIPTION These functions are commonly used to simplify open hashing usage, and use similar conventions. They operate indifferently on NUL-terminated strings (by setting *pend = NULL) or memory ranges (delimited by start and *pend). For NUL-terminated strings, as a side effect, those functions set *pend to the terminating NUL byte. ohash_interval() is a simple hashing function that yields good results on common data sets. ohash_create_entry() can be used to create a new record with a given key. In that case, the alloc field of info should point to a malloc(3)-like function to allocate the storage: p = (*info->alloc)(sz, info->data); ohash_qlookupi() is a wrapper function that simply calls ohash_interval() and ohash_lookup_interval(). ohash_qlookup() is a variation on ohash_qlookupi() designed for NUL- terminated strings. SEE ALSO ohash_init(3) STANDARDS Those functions are completely non-standard and should be avoided in portable programs. HISTORY Those functions were designed and written for OpenBSD make(1) by Marc Espie in 1999. FreeBSD 14.1-RELEASE-p8 May 12, 2014 FreeBSD 14.1-RELEASE-p8

Navigation Options