home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR2
/
BYTE24.ZIP
/
DB.H
< prev
next >
Wrap
Text File
|
1992-01-05
|
2KB
|
65 lines
/* database and file handling definitions for the byte benchmarks
** BYTE magazine, spring 1990
** Include when compiling benchfac.c and dbsubs.c.
*/
/* type codes */
#define CHARCODE 0
#define INTCODE 1
#define CHARPTRCODE 2
#define FLOATCODE 3
#define NAMESPACE 15
/* record structure definition */
struct database_record {
unsigned int currflag;
unsigned int comp; /* set for comparisons; 1=1st, 2=sec*/
unsigned int basenum; /* set for baselines; 2=notebook, 3=desktop */
unsigned int proc;
unsigned int mhz;
char name[NAMESPACE];
double sieveres; /* test results */
double sortres;
double imathres;
double movbres;
double movwores;
double movweres;
double movdores;
double movderes;
double fourbangres;
double forres;
double fiorres;
double fiowres;
double tpres;
double seekres;
double txposres;
double txscrollres;
double graphres;
double cpuNB; /* indexes */
double fpuNB;
double diskNB;
double videoNB;
double cpuDT;
double fpuDT;
double diskDT;
double videoDT;
};
typedef struct database_record db_rec;
/* macros */
#define offset_in_struc(x, y) (unsigned int)(&(((x*)0)->y))
/* function prototypes */
char init_db( char, db_rec**, char *);
int dump_db( char, db_rec**, char *);
void free_db( char, db_rec**);
int lin_search_db(char, char, void**,int,char, double);
void sort_db( char, void**,int, char);
void update_db(int, void**, int, char, double);
char add_entry_db(char, char, db_rec**, char*);
void dup_rec( void**, int, int);