isindexinfo

read the key description structure of an ISAM index

SYNOPSIS

int isindexinfo( int isfd, IsKdsc * kdsc, int idx );

isfd isam file identifier
kdsc pointer to dictinfo or key description structure
idx zero for dictinfo, otherwise index number

RETURN

SUCCESS, or a negative value on error, in which case the error code is found in iserrno.

NOTES

this call serves two somewhat different purposes.

if idx is zero, then it is actually expecting a pointer to a dictinfo struct, which will then be loaded with information about the current file. this is a C-ISAM inherited oddness, please see isisaminfo for a somewhat tidier method.

if idx is non zero then isindexinfo will return the specified key description, where a value of 1 represents the primary, followed by each successive index in the file.