Subversion Repositories svn1-original

Rev

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