Subversion Repositories svn1-original

Rev

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

Rev 137 Rev 174
Line 57... Line 57...
57
{
57
{
58
    t_legs     *data;                            /* Address of table */
58
    t_legs     *data;                            /* Address of table */
59
    t_legs     *dptr;                            /* Moving pointer */
59
    t_legs     *dptr;                            /* Moving pointer */
60
    int         num_records;                     /* Number of records in array */
60
    int         num_records;                     /* Number of records in array */
61
    int         i;
61
    int         i;
-
 
62
    team_type   team_buf;
62
 
63
 
63
 
64
 
64
    /*
65
    /*
65
    **  Read existing data into memory
66
    **  Read existing data into memory
66
    */
67
    */
Line 145... Line 146...
145
 *
146
 *
146
 *========================================================================*/
147
 *========================================================================*/
147
 
148
 
148
void tm_lgs(int leg, time_t delta, bool report_it, bool clear_it)
149
void tm_lgs(int leg, time_t delta, bool report_it, bool clear_it)
149
{
150
{
150
 
-
 
-
 
151
    team_type   team_buf;
151
    team = config.min_team;                      /* Team we are working with */
152
    int team = config.min_team;                      /* Team we are working with */
152
    while( team <= config.max_team )
153
    while( team <= config.max_team )
153
    {
154
    {
154
        if( valid_field( team ) )
155
        if( valid_field( team ) )
155
        {
156
        {
156
            g_record( team, &team_buf );
157
            g_record( team, &team_buf );
Line 191... Line 192...
191
 *
192
 *
192
 *========================================================================*/
193
 *========================================================================*/
193
 
194
 
194
void leg_start(void)
195
void leg_start(void)
195
{
196
{
196
 
-
 
-
 
197
    team_type   team_buf;
197
    team = config.min_team;                      /* Team we are working with */
198
    int team = config.min_team;                      /* Team we are working with */
198
    while( team <= config.max_team )
199
    while( team <= config.max_team )
199
    {
200
    {
200
        if( valid_field( team ) )
201
        if( valid_field( team ) )
201
        {
202
        {
202
            ( void ) g_record( team, &team_buf );
203
            ( void ) g_record( team, &team_buf );
Line 236... Line 237...
236
 *
237
 *
237
 *========================================================================*/
238
 *========================================================================*/
238
 
239
 
239
void tm_fixedstart(int leg, time_t starttime, bool report_it, bool clear_it)
240
void tm_fixedstart(int leg, time_t starttime, bool report_it, bool clear_it)
240
{
241
{
-
 
242
    team_type   team_buf;
241
    team = config.min_team;                      /* Team we are working with */
243
    int team = config.min_team;                      /* Team we are working with */
242
    while( team <= config.max_team )
244
    while( team <= config.max_team )
243
    {
245
    {
244
        if( valid_field( team ) )
246
        if( valid_field( team ) )
245
        {
247
        {
246
            g_record( team, &team_buf );
248
            g_record( team, &team_buf );
Line 282... Line 284...
282
 *
284
 *
283
 *========================================================================*/
285
 *========================================================================*/
284
 
286
 
285
void tm_staggered(int leg, time_t starttime, time_t delta, bool report_it, bool clear_it )
287
void tm_staggered(int leg, time_t starttime, time_t delta, bool report_it, bool clear_it )
286
{
288
{
-
 
289
    team_type   team_buf;
287
    team = config.min_team;                      /* Team we are working with */
290
    int team = config.min_team;                      /* Team we are working with */
288
    while( team <= config.max_team )
291
    while( team <= config.max_team )
289
    {
292
    {
290
        if( valid_field( team ) )
293
        if( valid_field( team ) )
291
        {
294
        {
292
            g_record( team, &team_buf );
295
            g_record( team, &team_buf );
Line 327... Line 330...
327
 *  Returns:
330
 *  Returns:
328
 *      Nothing
331
 *      Nothing
329
 *
332
 *
330
 *========================================================================*/
333
 *========================================================================*/
331
 
334
 
332
void tm_clearleg_specified(int cleg, bool manual)
335
void tm_clearleg_specified(int leg, bool manual)
333
{
336
{
-
 
337
    team_type   team_buf;
334
 
338
 
335
    /*
339
    /*
336
    **  Validate the users argument
340
    **  Validate the users argument
337
    */
341
    */
338
    if( cleg == 0 )
342
    if( leg == 0 )
339
        return;                              /* Null leg - just exit */
343
        return;                              /* Null leg - just exit */
340
    if( cleg > config.num_legs )             /* Valid leg number - Exit loop */
344
    if( leg > config.num_legs )             /* Valid leg number - Exit loop */
341
        return;
345
        return;
342
    leg = cleg;
-
 
343
 
346
 
344
    team = config.min_team;                 /* Team we are working with */
347
    int team = config.min_team;                 /* Team we are working with */
345
    while( team <= config.max_team )
348
    while( team <= config.max_team )
346
    {
349
    {
347
        if( valid_field( team ) )
350
        if( valid_field( team ) )
348
        {
351
        {
349
            g_record( team, &team_buf );
352
            g_record( team, &team_buf );
Line 375... Line 378...
375
 *========================================================================*/
378
 *========================================================================*/
376
 
379
 
377
void leg_ini(void)
380
void leg_ini(void)
378
{
381
{
379
    int         i;
382
    int         i;
-
 
383
    team_type   team_buf;
380
 
384
 
381
 
385
 
382
    team = config.min_team;                      /* Team we are working with */
386
    int team = config.min_team;                      /* Team we are working with */
383
    while( team <= config.max_team )
387
    while( team <= config.max_team )
384
    {
388
    {
385
        if( valid_field( team ) )
389
        if( valid_field( team ) )
386
        {
390
        {
387
            ( void ) g_record( team, &team_buf );
391
            ( void ) g_record( team, &team_buf );
Line 424... Line 428...
424
 *      Nothing
428
 *      Nothing
425
 *
429
 *
426
 *========================================================================*/
430
 *========================================================================*/
427
void tm_init(void)
431
void tm_init(void)
428
{
432
{
429
 
-
 
-
 
433
    team_type   team_buf;
430
    team = config.min_team;                      /* Team we are working with */
434
    int team = config.min_team;                      /* Team we are working with */
431
    while( team <= config.max_team )
435
    while( team <= config.max_team )
432
    {
436
    {
433
        if( valid_field( team ) )
437
        if( valid_field( team ) )
434
        {
438
        {
435
            clr_team( team, &team_buf );
439
            clr_team( team, &team_buf );
Line 454... Line 458...
454
 *
458
 *
455
 *========================================================================*/
459
 *========================================================================*/
456
 
460
 
457
void tm_gen(void)
461
void tm_gen(void)
458
{
462
{
459
 
-
 
-
 
463
    team_type   team_buf;
460
    team = config.min_team;                      /* Team we are working with */
464
    int team = config.min_team;                      /* Team we are working with */
461
    while( team <= config.max_team )
465
    while( team <= config.max_team )
462
    {
466
    {
463
        if( valid_field( team ) )
467
        if( valid_field( team ) )
464
        {
468
        {
465
            ( void ) g_record( team, &team_buf );
469
            ( void ) g_record( team, &team_buf );
Line 495... Line 499...
495
    t_legs     *data;                            /* Address of table */
499
    t_legs     *data;                            /* Address of table */
496
    t_legs     *dptr;                            /* Moving pointer */
500
    t_legs     *dptr;                            /* Moving pointer */
497
    int         last_team;
501
    int         last_team;
498
    int         num_records = 0;                 /* Number of records in array */
502
    int         num_records = 0;                 /* Number of records in array */
499
    char        l_s[40];                         /* Name of start time file */
503
    char        l_s[40];                         /* Name of start time file */
-
 
504
    team_type   team_buf;
500
 
505
 
501
    printf( "Generating Starters report for Leg-%d", leg );
506
    printf( "Generating Starters report for Leg-%d", leg );
502
 
507
 
503
    data = ( t_legs * ) calloc( ( unsigned ) ( config.max_team - config.min_team + 2 ), sizeof( t_legs ) ); /* Fetch memory */
508
    data = ( t_legs * ) calloc( ( unsigned ) ( config.max_team - config.min_team + 2 ), sizeof( t_legs ) ); /* Fetch memory */
504
 
509