Subversion Repositories svn1-original

Rev

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