Subversion Repositories svn1-original

Rev

Rev 261 | 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
 
180 - 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 */
202 - 37
extern char filepath[300];                          /* Base dir for input and output */
174 - 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 */
192 - 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 );
181 - 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 );
134 - 103
void        tm_lgs(int leg, time_t delta, bool report_it, bool clear_it);
135 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 );
135 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  );
137 david 108
void        tm_clearleg_specified(int cleg, bool manual);
244 - 109
void        tm_recalcElapsed (int leg);
1 root 110
 
111
void        leg_ini( void );
112
void        tm_init( void );
113
void        tm_gen( void );
137 david 114
void        legs_start_report( int leg );
261 - 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
 
181 - 119
//void        do_menu( const char *header, const char *prompt, menu_table * table );
1 root 120
 
95 - 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 );
95 - 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 );
95 - 140
void        print_class_header( int teamclass, int final );
1 root 141
void        print_class_stats( int c, int final );
95 - 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 );
1 root 145
bool        ck_data( int leg, int mode );
146
void        srt_place( void );
147
void        do_big_sort( void );
148
void        sort_team_data( int leg, int mode );
149
int         sort_comp( const void * a, const void * b );
18 david 150
int         sort_comp_cname( const void * aa, const void * bb );
1 root 151
bool        load_report_data( void );
152
void        gen_stats( void );
153
void        display_summary (void);
13 david 154
void        pri_summary (void);
160 - 155
void        pri_all_reports ( void );
1 root 156
 
18 david 157
 
1 root 158
void        team_update( void );
159
void        team_display( void );
160
void        leg_mods( void );
161
void        d_display( int operation );
162
void        d_leg( int y, int leg, leg_type * data, int valid,
163
                   int operation );
95 - 164
void        d_time( int x, int y, const char *prompt, time_t *data, int valid );
165
bool        d_field( int x, int y, const char *prompt, int type, int length,
166
                     const void *data, int valid, int operation );
167
bool        g_tnum( int x, int y, const char *prompt );
1 root 168
bool        g_record( int _team, team_type * data );
169
void        clr_team( int tm, team_type * data );
170
bool        put_team_record( int _team, team_type * data );
171
bool        init_team_data( void );
172
void        fix_team_data( void );
173
 
174
char       *time_a( time_t tim );
175
char       *time_fa( time_t tim, char flag );
176
time_t      conv_time( int hh, int mm, int ss );
177
time_t      get_time( time_t tim );
178
 
179
void        upload( void );
180
int         ins_data( int tm, int hh, int mm, int ss );
181
void        supload( void );
182
void        tupload( void );
183
char        p_del( char *c );
184
void        tdnload( void );
185
void        dnload( void );
95 - 186
char        getfname( const char *prompt, const char *ext );
1 root 187
 
188
void        init_screen( void );
189
void        fix_screen( void );
190
void        cur( int x, int y );
191
void        save_cur(void);
192
void        restore_cur(void);
193
void        clearscreen( void );
194
void        beep( void );
195
void        flush_out( void );
196
int         getinp( void );
197
bool        getnum( int max_len, int *final_buf );
95 - 198
int         getstring( int len, const char *str, enum class_enum limit );
1 root 199
sex_type    getsex( void );
200
int         getclass( void );
201
int         getcountry( void );
95 - 202
char        getfnc( const char *list );
203
bool        getyes( const char *prompt );
1 root 204
char        to_upper( char ch );
205
char        to_lower( char ch );
206
void        sleep( int t );
180 - 207
//int         lookup_class( const char *text, MARA_CFG *config );
1 root 208
 
209
bool t_parse_number( char **linep, int *number );
210
bool t_parse_text( char **linep, char *text );
95 - 211
char p_eol( const char *c );
212
char * p_filename( const char *filename, const char *suffix, const char *ext );
1 root 213
void print_colour( long colour );
95 - 214
char *tprintf( const char *format, ... );
215
int raw_print( const char *format, ... );
1 root 216
void console_prompt( char prompt );
217
void console_clreol( void );
218
void calc_class_summary( t_class_summary * ptr );
95 - 219
int csv_print( const char *format, ... );
61 - 220
void set_commands ( char * cptr);
221
void tdnload_store(void);
95 - 222
char *url_encode(const char *str);
207 - 223
const QString &getPrinterFile(void);
1 root 224
 
225
/********************************* EOF ***********************************/