Subversion Repositories svn1

Rev

Rev 176 | Rev 213 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 176 Rev 177
Line 35... Line 35...
35
#include    "proto.h"
35
#include    "proto.h"
36
 
36
 
37
#include    "qmconfteams.h"
37
#include    "qmconfteams.h"
38
#include    "mainwindow.h"
38
#include    "mainwindow.h"
39
#include    "qmconfig.h"
39
#include    "qmconfig.h"
-
 
40
#include    "qmteamdata.h"
40
 
41
 
41
#undef      DISPLAY_STRUCTURES
42
#undef      DISPLAY_STRUCTURES
42
 
43
 
43
/*============================================================================
44
/*============================================================================
44
 *  Main entry point
45
 *  Main entry point
Line 104... Line 105...
104
            eventFile = argv[0];
105
            eventFile = argv[0];
105
        }
106
        }
106
    }
107
    }
107
 
108
 
108
    config.load(eventFile);
109
    config.load(eventFile);
109
    init_team_data();
110
    QmTeamData  teamDataReader;
-
 
111
    teamDataReader.initTeamData(NULL);
110
 
112
 
111
    MainWindow w;
113
    MainWindow w;
112
    w.show();
114
    w.show();
113
 
115
 
114
    MainWindow::showMessage ("Mara Started", 5000);
116
    MainWindow::showMessage ("Mara Started", 5000);
Line 131... Line 133...
131
 *      
133
 *      
132
 *===========================================================================*/
134
 *===========================================================================*/
133
 
135
 
134
void usage(void)
136
void usage(void)
135
{
137
{
136
    qDebug( "Usage : mara [options] configuration_file\n" );
138
    qDebug( "Usage : mara [options] [configuration_file]\n" );
137
    qDebug( " or   : mara -v\n" );
-
 
138
    qDebug( "\n" );
139
    qDebug( "\n" );
139
    qDebug( "Options are:\n" );
140
    qDebug( "Options are:\n" );
140
    qDebug( "   -c       - Create configuration file\n" );
-
 
141
    qDebug( "   -q       - No splash screen\n" );
-
 
142
    qDebug( "   -v       - Display version then exit\n" );
-
 
143
    qDebug( "   -x<cmds> - Execute commnads\n" );
141
    qDebug( "   No Options\n" );
144
    exit( 3 );
142
    exit( 3 );
145
}
143
}
146
 
144
 
147
 
145
 
148
/*============================================================================
-
 
149
**
-
 
150
**  Temp escape to DOS
-
 
151
**
-
 
152
**  Purpose:    Temp escape to DOS
-
 
153
**
-
 
154
**  Parameters: None
-
 
155
**      
-
 
156
**  Returns:    Nothing
-
 
157
**
-
 
158
**===========================================================================*/
-
 
159
 
-
 
160
//void ms_system(void)
-
 
161
//{
-
 
162
//    static char command[101] = "";               /* Save the command here */
-
 
163
 
-
 
164
//    cur( 0, 20 );
-
 
165
//    printf( "Command:" );
-
 
166
//    if( getstring( 100, command, Alphanum ) )
-
 
167
//    {
-
 
168
//        printf( "\n" );
-
 
169
//        system( command );
-
 
170
//        printf( "\nAny key to continue" );
-
 
171
//        getinp();
-
 
172
//    }
-
 
173
//}
-
 
174
 
-
 
175
#ifdef DISPLAY_STRUCTURES
-
 
176
/*============================================================================
-
 
177
**
-
 
178
**  Display structure information
-
 
179
**
-
 
180
**  Purpose:    Display internal structure information
-
 
181
**
-
 
182
**  Parameters: Nothing
-
 
183
**      
-
 
184
**  Returns:    Nothing directly
-
 
185
**
-
 
186
**===========================================================================*/
-
 
187
 
-
 
188
/*
-
 
189
**  esize - A macro to return the size of a structure element
-
 
190
**  element - print element information
-
 
191
*/
-
 
192
#define esize( st, el) ( sizeof(((st *)0)->el))
-
 
193
#define element( st, el) \
-
 
194
    printf( "Offset of %-15s :%4d, Size:%d   \n", #el, offsetof( st, el), esize(st, el) );
-
 
195
 
146
 
196
void display_structures(void)
-
 
197
{
-
 
198
    printf( "Structure: leg_type\n" );
-
 
199
    element( leg_type, start    );
-
 
200
    element( leg_type, end      );
-
 
201
    element( leg_type, elapsed  );
-
 
202
    element( leg_type, l_place  );
-
 
203
    element( leg_type, le_place );
-
 
204
    element( leg_type, lc_place );
-
 
205
    element( leg_type, lec_place);
-
 
206
    element( leg_type, manual   );
-
 
207
    printf( "Sizeof %-18s :%4d\n", "leg_type", sizeof(leg_type) );
-
 
208
 
-
 
209
 
-
 
210
    printf( "\n" );
-
 
211
    printf( "Structure: team_type\n" );
-
 
212
    element( team_type, numb   );
-
 
213
    element( team_type, name   );
-
 
214
    element( team_type, leg    );
-
 
215
    element( team_type, members);
-
 
216
    element( team_type, class  );
-
 
217
    element( team_type, country);
-
 
218
    element( team_type, flags  );
-
 
219
    printf( "Sizeof %-18s :%4d\n", "team_type", sizeof(team_type) );
-
 
220
 
-
 
221
    printf( "\n" );
-
 
222
    printf( "Structure: MARA_CFG\n" );
-
 
223
    element( MARA_CFG, event_name      );
-
 
224
    element( MARA_CFG, leg_name        );
-
 
225
    element( MARA_CFG, t_def           );
-
 
226
    element( MARA_CFG, num_legs        );
-
 
227
    element( MARA_CFG, num_teams       );
-
 
228
    element( MARA_CFG, max_team        );
-
 
229
    element( MARA_CFG, min_team        );
-
 
230
    element( MARA_CFG, team_class      );
-
 
231
    element( MARA_CFG, num_class       );
-
 
232
    element( MARA_CFG, country_name    );
-
 
233
    element( MARA_CFG, num_countries   );
-
 
234
    element( MARA_CFG, addendum        );
-
 
235
    element( MARA_CFG, datafilename    );
-
 
236
    printf( "Sizeof %-18s :%4d\n", "MARA_CFG", sizeof(MARA_CFG) );
-
 
237
}
-
 
238
#endif
-
 
239
/********************************* EOF ***********************************/
147
/********************************* EOF ***********************************/
240
 
148