| Line 21... |
Line 21... |
| 21 |
#include <memory.h>
|
21 |
#include <memory.h>
|
| 22 |
#include <stdlib.h>
|
22 |
#include <stdlib.h>
|
| 23 |
#include <stdio.h>
|
23 |
#include <stdio.h>
|
| 24 |
#endif
|
24 |
#endif
|
| 25 |
|
25 |
|
| - |
|
26 |
#include "QDebug"
|
| - |
|
27 |
#define printf qDebug
|
| - |
|
28 |
|
| - |
|
29 |
#include "qmconfig.h"
|
| - |
|
30 |
|
| 26 |
extern MARA_CFG config; /* Working configuration */
|
31 |
extern class QmConfig config; /* Working configuration */
|
| 27 |
extern char invalid_copy; /* Quick nasty test of copy */
|
- |
|
| 28 |
extern int parallel_legs; /* Legs run in Parallel */
|
32 |
extern int parallel_legs; /* Legs run in Parallel */
|
| 29 |
extern ty_check_error check_error;
|
33 |
extern ty_check_error check_error;
|
| 30 |
extern char confile[20]; /* Name of the config file */
|
34 |
extern char confile[20]; /* Name of the config file */
|
| 31 |
extern char datfile[20]; /* Name of the data file */
|
35 |
extern char datfile[20]; /* Name of the data file */
|
| 32 |
extern char filebase[20]; /* Event file name base */
|
36 |
extern char filebase[20]; /* Event file name base */
|
| - |
|
37 |
extern char filepath[300]; /* Base dir for input and output */
|
| 33 |
extern int team; /* Current team number */
|
38 |
//extern int team; /* Current team number */
|
| 34 |
extern team_type team_buf; /* Holds team data currently under display */
|
39 |
//extern team_type team_buf; /* Holds team data currently under display */
|
| 35 |
extern int n_lines; /* Number of lines on the screen */
|
40 |
//extern int n_lines; /* Number of lines on the screen */
|
| 36 |
extern int n_cols;
|
41 |
//extern int n_cols;
|
| 37 |
extern int rubout; /* users rubout character */
|
42 |
//extern int rubout; /* users rubout character */
|
| 38 |
extern int abort_flag; /* Abort character detected */
|
43 |
//extern int abort_flag; /* Abort character detected */
|
| 39 |
extern int fnc_opr; /* Function key pushed */
|
44 |
//extern int fnc_opr; /* Function key pushed */
|
| 40 |
extern int leg; /* Leg under investigation */
|
45 |
//extern int leg; /* Leg under investigation */
|
| 41 |
extern int last_loaded_leg; /* Last Leg loaded */
|
46 |
//extern int last_loaded_leg; /* Last Leg loaded */
|
| - |
|
47 |
extern ty_stats stats; /* Holds statistics */
|
| 42 |
|
48 |
|
| 43 |
|
49 |
|
| 44 |
int main( int argc, char *argv[] );
|
50 |
int main( int argc, char *argv[] );
|
| 45 |
void usage( void );
|
51 |
void usage( void );
|
| 46 |
void ms_system( void );
|
52 |
void ms_system( void );
|
| Line 60... |
Line 66... |
| 60 |
** config.c
|
66 |
** config.c
|
| 61 |
*/
|
67 |
*/
|
| 62 |
void compact( char *str );
|
68 |
void compact( char *str );
|
| 63 |
void conf_menu( void );
|
69 |
void conf_menu( void );
|
| 64 |
bool configure( char *c_name, int mode );
|
70 |
bool configure( char *c_name, int mode );
|
| 65 |
void d_class( MARA_CFG * config, int operation );
|
71 |
//void d_class( MARA_CFG * config, int operation );
|
| 66 |
void d_cntry( MARA_CFG * config, int operation );
|
72 |
//void d_cntry( MARA_CFG * config, int operation );
|
| 67 |
void d_config( MARA_CFG * config, int operation );
|
73 |
//void d_config( MARA_CFG * config, int operation );
|
| 68 |
void d_winners( MARA_CFG * config, int operation );
|
74 |
//void d_winners( MARA_CFG * config, int operation );
|
| 69 |
bool define_class( void );
|
75 |
bool define_class( void );
|
| 70 |
bool define_config( void );
|
76 |
bool define_config( void );
|
| 71 |
void define_country( void );
|
77 |
void define_country( void );
|
| 72 |
bool define_winners( void );
|
78 |
bool define_winners( void );
|
| 73 |
void display_class( void );
|
79 |
void display_class( void );
|
| Line 92... |
Line 98... |
| 92 |
|
98 |
|
| 93 |
/*
|
99 |
/*
|
| 94 |
** legtime.c
|
100 |
** legtime.c
|
| 95 |
*/
|
101 |
*/
|
| 96 |
void set_legs( void );
|
102 |
void set_legs( void );
|
| 97 |
void tm_lgs( void );
|
103 |
void tm_lgs(int leg, time_t delta, bool report_it, bool clear_it);
|
| 98 |
void tm_lgs1( void );
|
104 |
void tm_lgs1( int leg, time_t starttime, time_t delta, bool report_it, bool clear_it );
|
| 99 |
void leg_start( void );
|
105 |
void leg_start( void );
|
| 100 |
void tm_fixedstart( void );
|
106 |
void tm_fixedstart( int leg, time_t starttime, bool report_it, bool clear_it );
|
| 101 |
void tm_staggered( void );
|
107 |
void tm_staggered( int leg, time_t starttime, time_t delta, bool report_it, bool clear_it );
|
| 102 |
void tm_clearleg( void );
|
108 |
void tm_clearleg_specified(int cleg, bool manual);
|
| 103 |
void tm_clearleg_specified(int cleg, bool manual, int line);
|
109 |
void tm_recalcElapsed (int leg);
|
| 104 |
|
110 |
|
| 105 |
void leg_ini( void );
|
111 |
void leg_ini( void );
|
| 106 |
void tm_init( void );
|
112 |
void tm_init( void );
|
| 107 |
void tm_gen( void );
|
113 |
void tm_gen( void );
|
| 108 |
void legs_start_report( int line );
|
114 |
void legs_start_report( int leg );
|
| 109 |
void ls_timer( t_legs * ptr, int num );
|
115 |
void ls_timer( t_legs * ptr, int num , bool suppress);
|
| 110 |
void ls_team( int *last, t_legs * data );
|
116 |
void ls_team( int *last, t_legs * data );
|
| 111 |
int sort_legs( const void * a, const void * b );
|
117 |
int sort_legs( const void * a, const void * b );
|
| 112 |
|
118 |
|
| 113 |
void do_menu( char *header, char *prompt, menu_table * table );
|
119 |
//void do_menu( const char *header, const char *prompt, menu_table * table );
|
| 114 |
|
120 |
|
| 115 |
bool open_printer( char *name, char *ext, int width, report_type html, char * title );
|
121 |
bool open_printer( const char *name, const char *ext, int width, report_type html, const char * title );
|
| 116 |
bool open_printer_name( char *pname, int width, report_type html, char * title );
|
122 |
bool open_printer_name( const char *pname, int width, report_type html, const char * title );
|
| 117 |
bool close_printer( void );
|
123 |
bool close_printer( void );
|
| 118 |
int print( char *format, ... );
|
124 |
int print( const char *format, ... );
|
| 119 |
void printbanner( char *title );
|
125 |
void printbanner( const char *title );
|
| 120 |
void print_underline( bool on );
|
126 |
void print_underline( bool on );
|
| 121 |
void print_bold( bool on );
|
127 |
void print_bold( bool on );
|
| 122 |
|
128 |
|
| 123 |
void report( void );
|
129 |
void report( void );
|
| 124 |
void pri_team( void );
|
130 |
void pri_team( void );
|
| Line 128... |
Line 134... |
| 128 |
void pri_eleg( void );
|
134 |
void pri_eleg( void );
|
| 129 |
void pe_place( ty_s_data * ptr, int leg, unsigned k );
|
135 |
void pe_place( ty_s_data * ptr, int leg, unsigned k );
|
| 130 |
void pe_team( int i, int leg );
|
136 |
void pe_team( int i, int leg );
|
| 131 |
void pri_final_html( void );
|
137 |
void pri_final_html( void );
|
| 132 |
void pri_final( void );
|
138 |
void pri_final( void );
|
| - |
|
139 |
void pri_final_teamOrder( void );
|
| 133 |
void pri_interim( void );
|
140 |
void pri_interim( void );
|
| 134 |
void print_class_header( int class, int final );
|
141 |
void print_class_header( int teamclass, int final );
|
| 135 |
void print_class_stats( int c, int final );
|
142 |
void print_class_stats( int c, int final );
|
| 136 |
void print_legend( int class, int full );
|
143 |
void print_legend( int teamclass, int full );
|
| 137 |
char *pi_place( int num, int disq, time_t time );
|
144 |
const char *pi_place( int num, int disq, time_t time );
|
| 138 |
char *pr_place( int num, int disq );
|
- |
|
| 139 |
char *pr_place_ne( int num, int disq, int ne );
|
145 |
const char *px_place( int leg, int num, bool epMode, bool neMode, team_flags flags );
|
| 140 |
bool ck_data( int leg, int mode );
|
146 |
void ck_data( int leg, int mode );
|
| 141 |
void srt_place( void );
|
147 |
void srt_place( void );
|
| 142 |
void do_big_sort( void );
|
148 |
void do_big_sort( void );
|
| 143 |
void sort_team_data( int leg, int mode );
|
149 |
void sort_team_data( int leg, int mode, bool withEq );
|
| 144 |
int sort_comp( const void * a, const void * b );
|
150 |
int sort_comp( const void * a, const void * b );
|
| 145 |
int sort_comp_cname( const void * aa, const void * bb );
|
151 |
int sort_comp_cname( const void * aa, const void * bb );
|
| 146 |
bool load_report_data( void );
|
152 |
bool load_report_data( void );
|
| 147 |
void gen_stats( void );
|
153 |
void gen_stats( void );
|
| 148 |
void display_summary (void);
|
154 |
void display_summary (void);
|
| 149 |
void pri_summary (void);
|
155 |
void pri_summary (void);
|
| - |
|
156 |
void pri_all_reports ( void );
|
| 150 |
|
157 |
|
| 151 |
|
158 |
|
| 152 |
void team_update( void );
|
159 |
void team_update( void );
|
| 153 |
void team_display( void );
|
160 |
void team_display( void );
|
| 154 |
void leg_mods( void );
|
161 |
void leg_mods( void );
|
| 155 |
void d_display( int operation );
|
162 |
void d_display( int operation );
|
| 156 |
void d_leg( int y, int leg, leg_type * data, int valid,
|
163 |
void d_leg( int y, int leg, leg_type * data, int valid,
|
| 157 |
int operation );
|
164 |
int operation );
|
| 158 |
void d_time( int x, int y, char *prompt, time_t *data, int valid );
|
165 |
void d_time( int x, int y, const char *prompt, time_t *data, int valid );
|
| 159 |
bool d_field( int x, int y, char *prompt, int type, int length,
|
166 |
bool d_field( int x, int y, const char *prompt, int type, int length,
|
| 160 |
void *data, int valid, int operation );
|
167 |
const void *data, int valid, int operation );
|
| 161 |
bool g_tnum( int x, int y, char *prompt );
|
168 |
bool g_tnum( int x, int y, const char *prompt );
|
| 162 |
bool g_record( int _team, team_type * data );
|
169 |
bool g_record( int _team, team_type * data );
|
| 163 |
void clr_team( int tm, team_type * data );
|
170 |
void clr_team( int tm, team_type * data );
|
| 164 |
bool put_team_record( int _team, team_type * data );
|
171 |
bool put_team_record( int _team, team_type * data );
|
| 165 |
bool init_team_data( void );
|
172 |
bool init_team_data( void );
|
| 166 |
void fix_team_data( void );
|
173 |
void fix_team_data( void );
|
| Line 175... |
Line 182... |
| 175 |
void supload( void );
|
182 |
void supload( void );
|
| 176 |
void tupload( void );
|
183 |
void tupload( void );
|
| 177 |
char p_del( char *c );
|
184 |
char p_del( char *c );
|
| 178 |
void tdnload( void );
|
185 |
void tdnload( void );
|
| 179 |
void dnload( void );
|
186 |
void dnload( void );
|
| 180 |
char getfname( char *prompt, char *ext );
|
187 |
char getfname( const char *prompt, const char *ext );
|
| 181 |
|
188 |
|
| 182 |
void init_screen( void );
|
189 |
void init_screen( void );
|
| 183 |
void fix_screen( void );
|
190 |
void fix_screen( void );
|
| 184 |
void cur( int x, int y );
|
191 |
void cur( int x, int y );
|
| 185 |
void save_cur(void);
|
192 |
void save_cur(void);
|
| Line 187... |
Line 194... |
| 187 |
void clearscreen( void );
|
194 |
void clearscreen( void );
|
| 188 |
void beep( void );
|
195 |
void beep( void );
|
| 189 |
void flush_out( void );
|
196 |
void flush_out( void );
|
| 190 |
int getinp( void );
|
197 |
int getinp( void );
|
| 191 |
bool getnum( int max_len, int *final_buf );
|
198 |
bool getnum( int max_len, int *final_buf );
|
| 192 |
int getstring( int len, char *str, enum class_enum limit );
|
199 |
int getstring( int len, const char *str, enum class_enum limit );
|
| 193 |
sex_type getsex( void );
|
200 |
sex_type getsex( void );
|
| 194 |
int getclass( void );
|
201 |
int getclass( void );
|
| 195 |
int getcountry( void );
|
202 |
int getcountry( void );
|
| 196 |
char getfnc( char *list );
|
203 |
char getfnc( const char *list );
|
| 197 |
bool getyes( char *prompt );
|
204 |
bool getyes( const char *prompt );
|
| 198 |
char to_upper( char ch );
|
205 |
char to_upper( char ch );
|
| 199 |
char to_lower( char ch );
|
206 |
char to_lower( char ch );
|
| 200 |
void sleep( int t );
|
207 |
void sleep( int t );
|
| 201 |
int lookup_class( char *text, MARA_CFG *config );
|
208 |
//int lookup_class( const char *text, MARA_CFG *config );
|
| 202 |
|
209 |
|
| 203 |
bool t_parse_number( char **linep, int *number );
|
210 |
bool t_parse_number( char **linep, int *number );
|
| 204 |
bool t_parse_text( char **linep, char *text );
|
211 |
bool t_parse_text( char **linep, char *text );
|
| 205 |
char p_eol( char *c );
|
212 |
char p_eol( const char *c );
|
| 206 |
char * p_filename( char *filename, char *suffix, char *ext );
|
213 |
char * p_filename( const char *filename, const char *suffix, const char *ext );
|
| 207 |
void print_colour( long colour );
|
214 |
void print_colour( long colour );
|
| 208 |
char *tprintf( char *format, ... );
|
215 |
char *tprintf( const char *format, ... );
|
| 209 |
int raw_print( char *format, ... );
|
216 |
int raw_print( const char *format, ... );
|
| 210 |
void console_prompt( char prompt );
|
217 |
void console_prompt( char prompt );
|
| 211 |
void console_clreol( void );
|
218 |
void console_clreol( void );
|
| 212 |
void calc_class_summary( t_class_summary * ptr );
|
219 |
void calc_class_summary( t_class_summary * ptr );
|
| 213 |
int csv_print( char *format, ... );
|
220 |
int csv_print( const char *format, ... );
|
| 214 |
void set_commands ( char * cptr);
|
221 |
void set_commands ( char * cptr);
|
| 215 |
void tdnload_store(void);
|
222 |
void tdnload_store(void);
|
| 216 |
char *url_encode(char *str);
|
223 |
char *url_encode(const char *str);
|
| - |
|
224 |
const QString &getPrinterFile(void);
|
| - |
|
225 |
char *setHref( const char *format, ... );
|
| 217 |
|
226 |
|
| 218 |
/********************************* EOF ***********************************/
|
227 |
/********************************* EOF ***********************************/
|