Mission Base

Program Base Library Functions

long pblKfFind

( pblKeyFile_t* k, int mode, void* skey,
  size_t skeylen, void* okey,
  size_t* okeylen )

Find a record in a key file, set the current record.

Documentation

Find a record in a key file, set the current record.

The parameter mode specifies which record to find relative to the search key specified by skey and skeylen. The following values for mode are possible


PBLEQ - find a record whose key is equal to skey
PBLFI - find the first record that is equal
PBLLA - find the last record that is equal
PBLGE - find the last record that is equal or the smallest record that is greater
PBLGT - find the smallest record that is greater
PBLLE - find the first record that is equal or the biggest record that is smaller
PBLLT - find the biggest record that is smaller

Keep in mind that PBL allows multiple records with the same key.

RESTRICTIONS:
- the out parameter okey must point to a memory area that is big enough to hold any possible key, i.e 255 bytes

Parameters:
k - key file to search in
mode - mode to use for search
skey - key to use for search
skeylen - length of search key
okey - buffer for result key
okeylen - length of the result key after return
Returns:
long rc >= 0:
long rc < 0:

Alphabetic index



This page was generated with the help of DOC++.