Subversion Repositories svn1

Rev

Rev 77 | Details | Compare with Previous | 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 */
77 - 41
extern int  last_loaded_leg;                     /* Last Leg loaded */
1 root 42
 
43
 
44
int         main( int argc, char *argv[] );
45
void        usage( void );
46
void        ms_system( void );
47
void        test_legal_version( void );
48
void        display_structures(void);
49
 
50
bool        test_times( team_type * data, int upto_leg );
51
void        set_times( team_type * data );
52
 
53
/*
45 - 54
**  ages.c
55
*/
56
char       *age_a( int age );
57
 
58
 
59
/*
1 root 60
**  config.c
61
*/
62
void        compact( char *str );
63
void        conf_menu( void );
64
bool        configure( char *c_name, int mode );
65
void        d_class( MARA_CFG * config, int operation );
66
void        d_cntry( MARA_CFG * config, int operation );
67
void        d_config( MARA_CFG * config, int operation );
68
void        d_winners( MARA_CFG * config, int operation );
69
bool        define_class( void );
70
bool        define_config( void );
71
void        define_country( void );
72
bool        define_winners( void );
73
void        display_class( void );
74
void        display_config( void );
75
void        display_country( void );
76
void        display_winners( void );
77
int         f_comp_int( const void * a, const void * b );
78
bool        r_config( FILE *fcon );
79
bool        rd_config( void );
80
bool        valid_field( int x );
81
bool        wt_config( void );
82
 
83
void        data_check( void );
84
bool        correct_times( int tm, int list );
85
 
86
void        f_disqualify( void );
87
void        ds_team( void );
88
void        ds_non_equestrian(void);
89
void        ds_requal( void );
90
void        ds_displ( void );
91
void        del_team( void );
92
 
93
/*
94
**  legtime.c
95
*/
96
void        set_legs( void );
97
void        tm_lgs( void );
98
void        tm_lgs1( void );
99
void        leg_start( void );
100
void        tm_fixedstart( void );
101
void        tm_staggered( void );
102
void        tm_clearleg( void );
31 - 103
void        tm_clearleg_specified(int cleg, bool manual, int line);
1 root 104
 
105
void        leg_ini( void );
106
void        tm_init( void );
107
void        tm_gen( void );
108
void        legs_start_report( int line );
109
void        ls_timer( t_legs * ptr, int num );
110
void        ls_team( int *last, t_legs * data );
111
int         sort_legs( const void * a, const void * b );
112
 
113
void        do_menu( char *header, char *prompt, menu_table * table );
114
 
75 - 115
bool        open_printer( char *name, char *ext, int width, report_type html, char * title );
116
bool        open_printer_name( char *pname, int width, report_type html, char * title );
1 root 117
bool        close_printer( void );
118
int         print( char *format, ... );
119
void        printbanner( char *title );
120
void        print_underline( bool on );
121
void        print_bold( bool on );
122
 
123
void        report( void );
124
void        pri_team( void );
125
void        pri_leg( void );
126
void        p_place( ty_s_data * ptr, int leg, unsigned k );
127
void        p_team( int i, int leg );
128
void        pri_eleg( void );
129
void        pe_place( ty_s_data * ptr, int leg, unsigned k );
130
void        pe_team( int i, int leg );
131
void        pri_final_html( void );
132
void        pri_final( void );
133
void        pri_interim( void );
134
void        print_class_header( int class, int final );
135
void        print_class_stats( int c, int final );
18 david 136
void        print_legend( int class, int full );
1 root 137
char       *pi_place( int num, int disq, time_t time );
138
char       *pr_place( int num, int disq );
61 - 139
char       *pr_place_ne( int num, int disq, int ne );
1 root 140
bool        ck_data( int leg, int mode );
141
void        srt_place( void );
142
void        do_big_sort( void );
143
void        sort_team_data( int leg, int mode );
144
int         sort_comp( const void * a, const void * b );
18 david 145
int         sort_comp_cname( const void * aa, const void * bb );
1 root 146
bool        load_report_data( void );
147
void        gen_stats( void );
148
void        display_summary (void);
13 david 149
void        pri_summary (void);
1 root 150
 
18 david 151
 
1 root 152
void        team_update( void );
153
void        team_display( void );
154
void        leg_mods( void );
155
void        d_display( int operation );
156
void        d_leg( int y, int leg, leg_type * data, int valid,
157
                   int operation );
158
void        d_time( int x, int y, char *prompt, time_t *data, int valid );
159
bool        d_field( int x, int y, char *prompt, int type, int length,
160
                     void *data, int valid, int operation );
161
bool        g_tnum( int x, int y, char *prompt );
162
bool        g_record( int _team, team_type * data );
163
void        clr_team( int tm, team_type * data );
164
bool        put_team_record( int _team, team_type * data );
165
bool        init_team_data( void );
166
void        fix_team_data( void );
167
 
168
char       *time_a( time_t tim );
169
char       *time_fa( time_t tim, char flag );
170
time_t      conv_time( int hh, int mm, int ss );
171
time_t      get_time( time_t tim );
172
 
173
void        upload( void );
174
int         ins_data( int tm, int hh, int mm, int ss );
175
void        supload( void );
176
void        tupload( void );
177
char        p_del( char *c );
178
void        tdnload( void );
179
void        dnload( void );
180
char        getfname( char *prompt, char *ext );
181
 
182
void        init_screen( void );
183
void        fix_screen( void );
184
void        cur( int x, int y );
185
void        save_cur(void);
186
void        restore_cur(void);
187
void        clearscreen( void );
188
void        beep( void );
189
void        flush_out( void );
190
int         getinp( void );
191
bool        getnum( int max_len, int *final_buf );
192
int         getstring( int len, char *str, enum class_enum limit );
193
sex_type    getsex( void );
194
int         getclass( void );
195
int         getcountry( void );
196
char        getfnc( char *list );
197
bool        getyes( char *prompt );
198
char        to_upper( char ch );
199
char        to_lower( char ch );
200
void        sleep( int t );
201
int         lookup_class( char *text, MARA_CFG *config );
202
 
203
bool t_parse_number( char **linep, int *number );
204
bool t_parse_text( char **linep, char *text );
205
char p_eol( char *c );
206
char * p_filename( char *filename, char *suffix, char *ext );
207
void print_colour( long colour );
208
char *tprintf( char *format, ... );
209
int raw_print( char *format, ... );
210
void console_prompt( char prompt );
211
void console_clreol( void );
212
void calc_class_summary( t_class_summary * ptr );
61 - 213
int csv_print( char *format, ... );
214
void set_commands ( char * cptr);
215
void tdnload_store(void);
68 - 216
char *url_encode(char *str);
1 root 217
 
218
/********************************* EOF ***********************************/