home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
c
/
cuj9301.zip
/
1101082A
< prev
next >
Wrap
Text File
|
1992-11-10
|
1KB
|
55 lines
////////////
// isam.h //
////////////
#ifndef isam_h
#define isam_h
extern "C" {
#include <cbtree.h> // CBTREE header
#include <btfio.h> // CBTREE header
}
typedef char *(*t_func)(char *);
typedef int (*rel_func)(char *);
class Isam
{
private:
int elements, fd[2], btr[10], indices, backingout;
long * loc;
char ** oldrec, * okey, * nkey, ** inames;
BTC * btc; // CBTREE specific
int getxxx (int index, int opt); // CBTREE specific
void backout (int ele, char op, int index = -1,
int result = 0);
public:
char ** rec;
Isam (const char *datafilename, int e = 1);
~Isam ();
int read (const char *key, int ele_limit = 0,
int idx = 0, int ele = 0);
int write ();
void clear ();
int getfirst (int index = 0);
int getnext (int index = 0);
int getge (char *key, int index = 0);
int keynum (const char *btname);
void reindex (rel_func func);
};
char * nospace(const char *arg);
int eprintf(const char *format, ...);
char * ToUpper(const char *c);
///////////////////////////////
// catalog utility functions //
///////////////////////////////
int catalog_number (char *name);
t_func cataloged_func (int f );
#endif