xref: /titanic_44/usr/src/lib/libast/common/man/tab.3 (revision dd4eeefdb8e4583c47e28a7f315db6087931ef06)
.fp 5 CW .. .nr ;G \\n(.f .Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" \\*(;G .. .aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" .. .aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" .. .aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" ..

0

..

..

TAB 3
NAME
tab - simple table lookup routines
SYNOPSIS
.L "#include <ast.h>" .L "int tabindex(const void* tab, int size, const char* name);" .L "void* tablook(const void* tab, int size, const char* name);"
DESCRIPTION
These routines do linear lookups in small tables (on the order of 32 elements). Each table element has a size of .L size bytes and the beginning of the element points to a name that is matched by the lookup routines.

.L tabindex returns the index of the table element in .L tab that matches .LR name . If there is no match then .L -1 is returned.

.L tablook returns a pointer to the table element in .L tab that matches .LR name . If there is no match then .L 0 is returned.

"SEE ALSO"
hash(3)