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