Subversion Repositories svn1

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 root 1
/*************************************************************************
2
*           Copyright (C) 1995 Embedded Solutions
3
*                       All rights reserved
4
*
5
* file:     hdrs/proto.h
6
*
7
* purpose:  System wide prototypes and external declarations
8
*
9
* programmer: David Purdie
10
*
11
*   00.0    27/01/95    DDP     Tidies up the program and formatted the file
12
*   00.1    27/01/95    DDP     initial release
13
*
14
**************************************************************************/
15
 
16
 
17
#include    <ctype.h>
18
 
19
#ifdef __MINGW32__
20
#include    <strings.h>
21
#include    <memory.h>
22
#include    <stdlib.h>
23
#include    <stdio.h>
24
#endif
25
 
26
extern MARA_CFG config;                          /* Working configuration */
27
extern char invalid_copy;                        /* Quick nasty test of copy */
28
extern int  parallel_legs;                       /* Legs run in Parallel */
29
extern ty_check_error check_error;
30
extern char confile[20];                         /* Name of the config file */
31
extern char datfile[20];                         /* Name of the data file */
32
extern char filebase[20];                        /* Event file name base */
33
extern int  team;                                /* Current team number */
34
extern team_type team_buf;                       /* Holds team data currently under display */
35
extern int  n_lines;                             /* Number of lines on the screen */
36
extern int  n_cols;
37
extern int  rubout;                              /* users rubout character */
38
extern int  abort_flag;                          /* Abort character detected */
39
extern int  fnc_opr;                             /* Function key pushed */
40
extern int  leg;                                 /* Leg under investigation */
41
 
42
 
43
int         main( int argc, char *argv[] );
44
void        usage( void );
45
void        ms_system( void );
46
void        test_legal_version( void );
47
void        display_structures(void);
48
 
49
bool        test_times( team_type * data, int upto_leg );
50
void        set_times( team_type * data );
51
 
52
/*
53
**  config.c
54
*/
55
void        compact( char *str );
56
void        conf_menu( void );
57
bool        configure( char *c_name, int mode );
58
void        d_class( MARA_CFG * config, int operation );
59
void        d_cntry( MARA_CFG * config, int operation );
60
void        d_config( MARA_CFG * config, int operation );
61
void        d_winners( MARA_CFG * config, int operation );
62
bool        define_class( void );
63
bool        define_config( void );
64
void        define_country( void );
65
bool        define_winners( void );
66
void        display_class( void );
67
void        display_config( void );
68
void        display_country( void );
69
void        display_winners( void );
70
int         f_comp_int( const void * a, const void * b );
71
bool        r_config( FILE *fcon );
72
bool        rd_config( void );
73
bool        valid_field( int x );
74
bool        wt_config( void );
75
 
76
void        data_check( void );
77
bool        correct_times( int tm, int list );
78
 
79
void        f_disqualify( void );
80
void        ds_team( void );
81
void        ds_non_equestrian(void);
82
void        ds_requal( void );
83
void        ds_displ( void );
84
void        del_team( void );
85
 
86
/*
87
**  legtime.c
88
*/
89
void        set_legs( void );
90
void        tm_lgs( void );
91
void        tm_lgs1( void );
92
void        leg_start( void );
93
void        tm_fixedstart( void );
94
void        tm_staggered( void );
95
void        tm_clearleg( void );
96
void        tm_clearleg_specified(int cleg, int line);
97
 
98
void        leg_ini( void );
99
void        tm_init( void );
100
void        tm_gen( void );
101
void        legs_start_report( int line );
102
void        ls_timer( t_legs * ptr, int num );
103
void        ls_team( int *last, t_legs * data );
104
int         sort_legs( const void * a, const void * b );
105
 
106
void        do_menu( char *header, char *prompt, menu_table * table );
107
 
108
bool        open_printer( char *name, char *ext, int width, bool html, char * title );
109
bool        close_printer( void );
110
int         print( char *format, ... );
111
void        printbanner( char *title );
112
void        print_underline( bool on );
113
void        print_bold( bool on );
114
 
115
void        report( void );
116
void        pri_team( void );
117
void        pri_leg( void );
118
void        p_place( ty_s_data * ptr, int leg, unsigned k );
119
void        p_team( int i, int leg );
120
void        pri_eleg( void );
121
void        pe_place( ty_s_data * ptr, int leg, unsigned k );
122
void        pe_team( int i, int leg );
123
void        pri_final_html( void );
124
void        pri_final( void );
125
void        pri_interim( void );
126
void        print_class_header( int class, int final );
127
void        print_class_stats( int c, int final );
128
void        print_legend( int class );
129
char       *pi_place( int num, int disq, time_t time );
130
char       *pr_place( int num, int disq );
131
bool        ck_data( int leg, int mode );
132
void        srt_place( void );
133
void        do_big_sort( void );
134
void        sort_team_data( int leg, int mode );
135
int         sort_comp( const void * a, const void * b );
136
bool        load_report_data( void );
137
void        gen_stats( void );
138
void        display_summary (void);
139
 
140
void        team_update( void );
141
void        team_display( void );
142
void        leg_mods( void );
143
void        d_display( int operation );
144
void        d_leg( int y, int leg, leg_type * data, int valid,
145
                   int operation );
146
void        d_time( int x, int y, char *prompt, time_t *data, int valid );
147
bool        d_field( int x, int y, char *prompt, int type, int length,
148
                     void *data, int valid, int operation );
149
bool        g_tnum( int x, int y, char *prompt );
150
bool        g_record( int _team, team_type * data );
151
void        clr_team( int tm, team_type * data );
152
bool        put_team_record( int _team, team_type * data );
153
bool        init_team_data( void );
154
void        fix_team_data( void );
155
 
156
char       *time_a( time_t tim );
157
char       *time_fa( time_t tim, char flag );
158
time_t      conv_time( int hh, int mm, int ss );
159
time_t      get_time( time_t tim );
160
 
161
void        upload( void );
162
int         ins_data( int tm, int hh, int mm, int ss );
163
void        supload( void );
164
void        tupload( void );
165
char        p_del( char *c );
166
void        tdnload( void );
167
void        dnload( void );
168
char        getfname( char *prompt, char *ext );
169
 
170
void        init_screen( void );
171
void        fix_screen( void );
172
void        cur( int x, int y );
173
void        save_cur(void);
174
void        restore_cur(void);
175
void        clearscreen( void );
176
void        beep( void );
177
void        flush_out( void );
178
int         getinp( void );
179
bool        getnum( int max_len, int *final_buf );
180
int         getstring( int len, char *str, enum class_enum limit );
181
sex_type    getsex( void );
182
int         getclass( void );
183
int         getcountry( void );
184
char        getfnc( char *list );
185
bool        getyes( char *prompt );
186
char        to_upper( char ch );
187
char        to_lower( char ch );
188
void        sleep( int t );
189
int         lookup_class( char *text, MARA_CFG *config );
190
 
191
bool t_parse_number( char **linep, int *number );
192
bool t_parse_text( char **linep, char *text );
193
char p_eol( char *c );
194
char * p_filename( char *filename, char *suffix, char *ext );
195
void print_colour( long colour );
196
char *tprintf( char *format, ... );
197
int raw_print( char *format, ... );
198
void console_prompt( char prompt );
199
void console_clreol( void );
200
void calc_class_summary( t_class_summary * ptr );
201
 
202
 
203
/********************************* EOF ***********************************/