forked from JSpeedie/G2ME-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentry_file.h
64 lines (59 loc) · 2.35 KB
/
entry_file.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef G2ME_ENTRY_FILE
#define G2ME_ENTRY_FILE
#include <stdio.h>
#define MAX_NAME_LEN 256
typedef struct entry {
unsigned short opp_id;
unsigned short tournament_id;
unsigned short season_id;
unsigned char len_name;
unsigned char len_opp_name;
char name[MAX_NAME_LEN];
char opp_name[MAX_NAME_LEN];
double rating;
double RD;
double vol;
signed char gc;
signed char opp_gc;
unsigned char is_competitor;
unsigned char day;
unsigned char month;
unsigned short year;
unsigned char len_t_name;
char t_name[MAX_NAME_LEN];
}Entry;
double entry_file_get_glicko_change_since_last_event(char *);
int entry_file_contains_opponent(char *, char *);
int entry_file_add_new_opponent(struct entry *, char *);
int entry_file_contains_tournament(char *, char *);
int entry_file_add_new_tournament(struct entry *, char *);
int entry_file_get_name_from_id(FILE *, struct entry *);
int entry_file_get_id_from_name(FILE *, struct entry *);
int entry_file_get_tournament_name_from_id(FILE *, struct entry *);
int entry_file_read_entry(FILE *, struct entry *);
int entry_file_read_next_opp_entry(FILE *, struct entry *, short);
int entry_file_read_entry_minimal(FILE *, struct entry *);
int entry_file_read_entry_absent(FILE *, struct entry *);
int entry_file_get_to_entries(FILE *);
int entry_file_get_number_of_entries(char *);
int entry_file_number_of_opponents(char *);
int entry_file_number_of_events(char *);
int entry_file_get_number_of_outcomes_against(char *, char *);
long *entry_file_get_all_number_of_outcomes_against(char *);
long int entry_file_get_last_entry_offset(char *);
int entry_file_read_last_entry(char *, struct entry *);
int entry_file_read_last_entry_minimal(char *, struct entry *);
int entry_file_read_last_entry_absent(char *, struct entry *);
int entry_file_append_entry_to_file(struct entry *, char *);
int entry_file_append_pr_entry_to_file(struct entry *, char *, int);
int entry_file_append_pr_entry_to_file_verbose(\
struct entry *, char *, int, int, int);
int entry_file_read_start_from_file(char *, struct entry *);
int entry_file_open_read_start_from_file(FILE *, struct entry *);
int entry_file_refactor_name(char *);
int entry_file_remove_entry(char *);
int entry_file_get_outcome_count(char *);
int entry_file_get_events_attended_count(char *);
char *entry_file_get_events_attended(char *, int *);
double entry_file_get_glicko_change_since_last_event(char*);
#endif