Subversion Repositories svn1-original

Rev

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