#ifndef _RECORD_H_
#define _RECORD_H_


typedef struct {
	int score;	/* score */
	int uid;	/* user-ID */
	int date;	/* date */
	char name[32];	/* name */
}record_t;

typedef struct{
		/* user define */
	char *record_file;	/* record file name */
	char *swap_file;	/* swap file name */
	char *lock_file;	/* lock file name */
	int max_record;		/* max number of records */
	record_t *new_record;	/* pointer to new record */
	int override;		/* override old record */

		/* initialize by RECORD_init() */

	record_t *record;	/* list of records */
	int num_record;		/* number of records */
	int lock_fd;		/* lock file descripter */
}record_file_t;



int RECORD_init( record_file_t *rp );
int RECORD_read( record_file_t *rp );
int RECORD_write( record_file_t *rp );

#endif
