/*- * Copyright (c) 2001 * Tatsuya Kudoh(CDR/TK),ROYALPANDA. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #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