Subversion Repositories svn1-original

Rev

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