Subversion Repositories svn1-original

Rev

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

Rev 193 Rev 199
Line 49... Line 49...
49
*   00.1    06-sep-02   DDP     Added support for HTML report generation
49
*   00.1    06-sep-02   DDP     Added support for HTML report generation
50
*
50
*
51
**************************************************************************/
51
**************************************************************************/
52
 
52
 
53
#include    <stdio.h>
53
#include    <stdio.h>
54
#if defined(HI_TECH_C) || defined(__TURBOC__)
-
 
55
#include    <alloc.h>
-
 
56
#endif
-
 
57
#include    "consts.h"
54
#include    "consts.h"
58
#include    "structs.h"
55
#include    "structs.h"
59
#include    "proto.h"
56
#include    "proto.h"
60
#include    "mainwindow.h"
57
#include    "mainwindow.h"
61
 
58
 
Line 113... Line 110...
113
/*
110
/*
114
**  Data
111
**  Data
115
*/
112
*/
116
ty_s_data  *sort_data = 0;                       /* pointer to memory */
113
ty_s_data  *sort_data = 0;                       /* pointer to memory */
117
ty_s_aux   *sort_aux = 0;                        /* pointer to aux sort info */
114
ty_s_aux   *sort_aux = 0;                        /* pointer to aux sort info */
118
ty_s_namedata *sort_name_data = 0;                /* pointer to name info */
115
ty_s_namedata *sort_name_data = 0;               /* pointer to name info */
119
unsigned    int sort_num;                            /* Number in the array */
116
unsigned    int sort_num;                        /* Number in the array */
120
unsigned    int sort_num_data;                       /* Number in the array */
117
unsigned    int sort_num_data;                   /* Number in the array */
121
 
-
 
122
 
-
 
123
ty_stats        stats;                           /* Holds statistics */
118
ty_stats        stats;                           /* Holds statistics */
124
 
119
 
125
/*========================================================================
120
/*========================================================================
126
 *
121
 *
127
 *  Report menu
-
 
128
 *
-
 
129
 *  Purpose:
-
 
130
 *      This function is called to produce the "Report Menu"
-
 
131
 *
-
 
132
 *  Parameters:
-
 
133
 *      None
-
 
134
 *
-
 
135
 *  Returns:
-
 
136
 *      Nothing
-
 
137
 *
-
 
138
 *========================================================================*/
-
 
139
 
-
 
140
//void report(void)
-
 
141
//{
-
 
142
//    report_html = text;
-
 
143
//    if( load_report_data() )
-
 
144
//        do_menu( "Report generation", "Select option", rpt_menu );
-
 
145
 
-
 
146
//    if( sort_data )
-
 
147
//        free( ( char * ) sort_data );
-
 
148
//    if( sort_aux )
-
 
149
//        free( ( char * ) sort_aux );
-
 
150
//    if ( sort_name_data )
-
 
151
//        free( ( char * ) sort_name_data );
-
 
152
//    sort_data = ( ty_s_data * ) 0;
-
 
153
//    sort_aux = ( ty_s_aux * ) 0;
-
 
154
//    sort_name_data = ( ty_s_namedata * ) 0;
-
 
155
//}
-
 
156
 
-
 
157
/*========================================================================
-
 
158
 *
-
 
159
 *  Print in team order
122
 *  Print in team order
160
 *
123
 *
161
 *  Purpose:
124
 *  Purpose:
162
 *      This function is called to Print in team order
125
 *      This function is called to Print in team order
163
 *      This function may also be used to create an HTML suite of files
126
 *      This function may also be used to create an HTML suite of files
Line 174... Line 137...
174
void pri_team(void)
137
void pri_team(void)
175
{
138
{
176
    int         i, k;
139
    int         i, k;
177
    team_type   team_buf;
140
    team_type   team_buf;
178
 
141
 
179
    //cur( 0, 5 );
-
 
180
    printf( "Team information - in team order\n" );
-
 
181
    printf( "\nPrinting team names\n" );
-
 
182
    //flush_out();
-
 
183
 
-
 
184
    if( !open_printer( "", "name", 132, report_html, "Team Names" ) )
142
    if( !open_printer( "", "name", 132, report_html, "Team Names" ) )
185
        return;
143
        return;
186
 
144
 
187
    /*
145
    /*
188
     * Print out the data 
146
     * Print out the data 
Line 262... Line 220...
262
 *
220
 *
263
 *  Returns:
221
 *  Returns:
264
 *      Nothing
222
 *      Nothing
265
 *
223
 *
266
 *========================================================================*/
224
 *========================================================================*/
267
//void pri_name_index( void )
-
 
268
//{
-
 
269
//    //cur( 0, 5 );
-
 
270
//    printf( "Team Member information - in name order\n" );
-
 
271
//    printf( "\nPrinting competitor names\n" );
-
 
272
//    //flush_out();
-
 
273
//    pri_name_index_body();
-
 
274
//    printf( "Found %d names\n", sort_num_data );
-
 
275
//    printf( "\nAny key to continue" );
-
 
276
//    getinp();
-
 
277
//}
-
 
278
 
-
 
279
/*========================================================================
-
 
280
 *
-
 
281
 *  Print in name order
-
 
282
 *
-
 
283
 *  Purpose:
-
 
284
 *      This function is called to print a list of all known competitors
-
 
285
 *      This function may also be used to create an HTML suite of files
-
 
286
 *      within the result set
-
 
287
 *
-
 
288
 *  Parameters:
-
 
289
 *      None
-
 
290
 *
-
 
291
 *  Returns:
-
 
292
 *      Nothing
-
 
293
 *
-
 
294
 *========================================================================*/
-
 
295
void pri_name_index_body( void )
225
void pri_name_index_body( void )
296
{
226
{
297
    ty_s_namedata *ptr;
227
    ty_s_namedata *ptr;
298
    team_type   team_buf;
228
    team_type   team_buf;
299
    unsigned    num;
229
    unsigned    num;
Line 421... Line 351...
421
 *  Returns:
351
 *  Returns:
422
 *      Nothing
352
 *      Nothing
423
 *
353
 *
424
 *========================================================================*/
354
 *========================================================================*/
425
 
355
 
426
//void pri_leg(void)
-
 
427
//{
-
 
428
//    int         leg = 0;
-
 
429
 
-
 
430
 
-
 
431
//    /*
-
 
432
//     * This function is used to provide interum print-outs
-
 
433
//     * The team data is sorted by time at leg-end and the times printed are
-
 
434
//     * real times at leg end.
-
 
435
//     * This operation is designed to be quick - it doesn't update the disk file
-
 
436
//     * and is not available in an HTML version - yet
-
 
437
//     */
-
 
438
 
-
 
439
//    cur( 0, 5 );
-
 
440
//    printf( "Leg finishing time report\n" );
-
 
441
//    while( TRUE )
-
 
442
//    {
-
 
443
//        d_field( 0, 7, "Enter leg to print :", D_NUMBER, 1, ( char * ) &leg,
-
 
444
//                 TRUE, M_UPDATE );
-
 
445
//        if( abort_flag )
-
 
446
//            return;
-
 
447
//        if( leg <= config.num_legs )
-
 
448
//            break;
-
 
449
//        beep();
-
 
450
//    }
-
 
451
    
-
 
452
//    pri_leg_body ( leg );
-
 
453
//}
-
 
454
 
-
 
455
void pri_leg_body(int leg)    
356
void pri_leg_body(int leg)    
456
{
357
{
457
    ty_s_data  *ptr;
358
    ty_s_data  *ptr;
458
    int         i, k;
359
    int         i, k;
-
 
360
 
459
    /*
361
    /*
460
     * Sort the data in finishing order 
362
     * Sort the data in finishing order 
461
     */
363
     */
462
 
364
 
463
    printf( "\nSorting the data\n" );
-
 
464
    //flush_out();
-
 
465
    if( ck_data( leg, C_END ) )
365
    if( ck_data( leg, C_END ) )
466
        return;                                  /* Check data for this leg */
366
        return;                                  /* Check data for this leg */
467
    sort_team_data( leg, S_FIN );                /* Sort the data */
367
    sort_team_data( leg, S_FIN );                /* Sort the data */
468
 
368
 
469
 
369
 
Line 506... Line 406...
506
            i++;
406
            i++;
507
        p_team( i++, leg );
407
        p_team( i++, leg );
508
        print( "\n" );
408
        print( "\n" );
509
    }
409
    }
510
 
410
 
511
    printf( "\n\n" );
-
 
512
    print_underline( TRUE );
411
    print_underline( TRUE );
513
    print( "%4s %4s %-8s  ", "Plce", "Team", "Time" );
412
    print( "%4s %4s %-8s  ", "Plce", "Team", "Time" );
514
//    print( "%4s %4s %-8s  ", "Plce", "Team", "Time" );
413
//    print( "%4s %4s %-8s  ", "Plce", "Team", "Time" );
515
    print( "|" );
414
    print( "|" );
516
//    print( "%4s %4s %-8s  ", "Team", "Plce", "Time" );
415
//    print( "%4s %4s %-8s  ", "Team", "Plce", "Time" );
Line 631... Line 530...
631
 *
530
 *
632
 *  Purpose:
531
 *  Purpose:
633
 *      This function is called to Print on elapsed times for given leg
532
 *      This function is called to Print on elapsed times for given leg
634
 *
533
 *
635
 *  Parameters:
534
 *  Parameters:
636
 *      None
535
 *      leg             - Leg number to print
637
 *
536
 *
638
 *  Returns:
537
 *  Returns:
639
 *      Nothing
538
 *      Nothing
640
 *
539
 *
641
 *========================================================================*/
540
 *========================================================================*/
642
 
541
 
643
//void pri_eleg(void)
-
 
644
//{
-
 
645
//    int         leg = 0;
-
 
646
 
-
 
647
 
-
 
648
//    /*
-
 
649
//     * This function is used to provide interum print-outs
-
 
650
//     * The team data is sorted by time at leg-elapsed and the times printed are
-
 
651
//     * real times at leg end.
-
 
652
//     * This operation is designed to be quick - it doesn't update the disk file
-
 
653
//     * and is not available in an HTML version - yet
-
 
654
//     */
-
 
655
 
-
 
656
//    cur( 0, 5 );
-
 
657
//    printf( "Leg elapsed time report\n" );
-
 
658
//    while( TRUE )
-
 
659
//    {
-
 
660
//        d_field( 0, 7, "Enter leg to print :", D_NUMBER, 1, ( char * ) &leg,
-
 
661
//                 TRUE, M_UPDATE );
-
 
662
//        if( abort_flag )
-
 
663
//            return;
-
 
664
//        if( leg <= config.num_legs )
-
 
665
//            break;
-
 
666
//        beep();
-
 
667
//    }
-
 
668
//    pri_eleg_body(leg);
-
 
669
//}
-
 
670
 
-
 
671
  
-
 
672
void pri_eleg_body( int leg)
542
void pri_eleg_body( int leg)
673
{
543
{
674
    ty_s_data  *ptr;
544
    ty_s_data  *ptr;
675
    int         i, k;
545
    int         i, k;
676
 
546
 
677
    /*
547
    /*
678
     * Sort the data in finishing order
548
     * Sort the data in finishing order
679
     */
549
     */
680
 
550
 
681
    printf( "\nSorting the data\n" );
-
 
682
    //flush_out();
-
 
683
    if( ck_data( leg, C_ELAPSED ) )
551
    if( ck_data( leg, C_ELAPSED ) )
684
        return;                                  /* Check data for this leg */
552
        return;                                  /* Check data for this leg */
685
    sort_team_data( leg, S_L );                  /* Sort the data on elapsed time */
553
    sort_team_data( leg, S_L );                  /* Sort the data on elapsed time */
686
 
554
 
687
 
555
 
Line 803... Line 671...
803
 *
671
 *
804
 *  Print team information
672
 *  Print team information
805
 *
673
 *
806
 *  Purpose:
674
 *  Purpose:
807
 *      This helper function is called to Print team and elapsed time
675
 *      This helper function is called to Print team and elapsed time
808
 *      information
-
 
809
 *      in a 20-character field
676
 *      information in a 20-character field
810
 *
677
 *
811
 *  Parameters:
678
 *  Parameters:
812
 *      i           Team to print
679
 *      i           Team to print
813
 *      leg         Leg to print
680
 *      leg         Leg to print
814
 *
681
 *
Line 894... Line 761...
894
{
761
{
895
    ty_s_data  *ptr;
762
    ty_s_data  *ptr;
896
    team_type   team_buf;
763
    team_type   team_buf;
897
    unsigned    i;
764
    unsigned    i;
898
    int         j, last_class;
765
    int         j, last_class;
899
    char        suppress_classes;                /* Boolean. Printout class files too */
-
 
900
    char        *report_title;
766
    char        *report_title;
901
    bool        class_done[MAX_CLASS+1];
767
    bool        class_done[MAX_CLASS+1];
902
    int         lcount;
768
    int         lcount;
903
 
769
 
904
    //cur( 0, 5 );
-
 
905
    printf( "Generate final result printouts\n" );
-
 
906
    if( ck_data( -1, C_ELAPSED ) )
770
    if( ck_data( -1, C_ELAPSED ) )
907
        return;
771
        return;
908
                                     /* check data for all legs */
-
 
909
 
-
 
910
    /*
-
 
911
    **  If a non HTML report then ask if the user want to supress the class
-
 
912
    **  printout. For an HTML report always do the class reports as the two
-
 
913
    **  are interlinked
-
 
914
    */
-
 
915
    if ( ! report_html  && ! report_all)
-
 
916
    {
-
 
917
        suppress_classes = FALSE; //getyes( "Do you want to suppress class printouts" );
-
 
918
    }
-
 
919
    else
-
 
920
    {
-
 
921
        suppress_classes = FALSE;
-
 
922
    }
-
 
923
 
-
 
924
    /*
772
    /*
925
    **  Sort on every thing
773
    **  Sort on every thing
926
    **  Then generate all the stats too
774
    **  Then generate all the stats too
927
    */
775
    */
928
    printf( "\nSorting the data\n" );
-
 
929
    do_big_sort();
776
    do_big_sort();
930
    gen_stats();
777
    gen_stats();
931
 
778
 
932
    /*
779
    /*
933
     * Now print the data on the printer 
780
     * Now print the data on the printer 
934
     */
781
     */
935
    printf( "\nGenerating the printed output\n" );
-
 
936
    if( !open_printer( "", "finish", 132, report_html, "Finishing Order" ) )
782
    if( !open_printer( "", "finish", 132, report_html, "Finishing Order" ) )
937
        return;
783
        return;
938
 
784
 
939
    /*
785
    /*
940
     * Print out the data 
786
     * Print out the data 
Line 1022... Line 868...
1022
    /*
868
    /*
1023
     * Now produce a breakdown on a class by class basis 
869
     * Now produce a breakdown on a class by class basis 
1024
     * Now print out the class placement information
870
     * Now print out the class placement information
1025
     */
871
     */
1026
 
872
 
1027
    if( suppress_classes )
-
 
1028
    {
-
 
1029
        printf( "WARNING: Class printouts suppressed\n" );
-
 
1030
        return;
-
 
1031
    }
-
 
1032
 
-
 
1033
    sort_team_data( 0, S_LC );                 /* Generate class placement data */
873
       sort_team_data( 0, S_LC );                 /* Generate class placement data */
1034
    last_class = -1;                           /* Invalid class to start with */
874
    last_class = -1;                           /* Invalid class to start with */
1035
    memset ( class_done, 0, sizeof(class_done));
875
    memset ( class_done, 0, sizeof(class_done));
1036
 
876
 
1037
 
877
 
1038
    for( ptr = sort_data, i = 0; i < sort_num; i++, ptr++ )
878
    for( ptr = sort_data, i = 0; i < sort_num; i++, ptr++ )
Line 1493... Line 1333...
1493
            print( "    %-*s", MAX_PERSON_NAME, config.hall_fame[i-1] );
1333
            print( "    %-*s", MAX_PERSON_NAME, config.hall_fame[i-1] );
1494
        }
1334
        }
1495
    }
1335
    }
1496
    else
1336
    else
1497
    {
1337
    {
1498
        printf( "\n    There are no new stars for the Hall of Fame");
1338
        qDebug( "There are no new stars for the Hall of Fame");
1499
    }
1339
    }
1500
    if ( report_html == html ) print( "\n");
1340
    if ( report_html == html ) print( "\n");
1501
    if ( report_html == html ) print( "<A HREF=\"#%s\">Awards Index</A>",url_encode("INDEX"));
1341
    if ( report_html == html ) print( "<A HREF=\"#%s\">Awards Index</A>",url_encode("INDEX"));
1502
 
1342
 
1503
    /*
1343
    /*
Line 1665... Line 1505...
1665
{
1505
{
1666
    ty_s_data  *ptr;
1506
    ty_s_data  *ptr;
1667
    team_type   team_buf;
1507
    team_type   team_buf;
1668
    unsigned    i;
1508
    unsigned    i;
1669
    int         j, last_class;
1509
    int         j, last_class;
1670
    char        suppress_classes = FALSE;                /* Boolean. Printout class files too */
-
 
1671
    char       *report_title;
1510
    char       *report_title;
1672
 
1511
 
1673
    if ( ! report_all )
1512
    if ( ! report_all )
1674
    {
1513
    {
1675
        //cur( 0, 5 );
-
 
1676
        printf( "Generate interim result printouts\n" );
-
 
1677
        ck_data( -1, C_DISQUAL );                    /* Check the data - dummy check */
1514
        ck_data( -1, C_DISQUAL );              /* Check the data - dummy check */
1678
        suppress_classes = FALSE; //getyes( "Do you want to suppress class printouts" );
-
 
1679
        printf( "\nSorting the data\n" );
-
 
1680
    }
1515
    }
1681
    do_big_sort();                             /* Sort on every thing */
1516
    do_big_sort();                             /* Sort on every thing */
1682
    gen_stats();                               /* Generate the stats too */
1517
    gen_stats();                               /* Generate the stats too */
1683
 
1518
 
1684
    printf( "\nGenerating the printed output\n" );
-
 
1685
 
-
 
1686
    /*
1519
    /*
1687
     * Now print the data on the printer 
1520
     * Now print the data on the printer 
1688
     */
1521
     */
1689
 
1522
 
1690
    if( !open_printer( "", "int", 132, report_html, "Interim Results" ) )
1523
    if( !open_printer( "", "int", 132, report_html, "Interim Results" ) )
Line 1736... Line 1569...
1736
    /*
1569
    /*
1737
     * Now produce a breakdown on a class by class basis 
1570
     * Now produce a breakdown on a class by class basis 
1738
     * Now print out the class placement information
1571
     * Now print out the class placement information
1739
     */
1572
     */
1740
 
1573
 
1741
    if( suppress_classes )
-
 
1742
    {
-
 
1743
        printf( "WARNING: Class printouts suppressed\n" );
-
 
1744
        return;
-
 
1745
    }
-
 
1746
 
-
 
1747
    sort_team_data( 0, S_CLASS );              /* Generate class placement data */
1574
    sort_team_data( 0, S_CLASS );              /* Generate class placement data */
1748
    last_class = -1;                             /* Invalid class to start with */
1575
    last_class = -1;                             /* Invalid class to start with */
1749
 
1576
 
1750
    for( ptr = sort_data, i = 0; i < sort_num; i++, ptr++ )
1577
    for( ptr = sort_data, i = 0; i < sort_num; i++, ptr++ )
1751
    {
1578
    {
Line 1829... Line 1656...
1829
 
1656
 
1830
    /*
1657
    /*
1831
    **  Sort on every thing
1658
    **  Sort on every thing
1832
    **  Then generate all the stats too
1659
    **  Then generate all the stats too
1833
    */
1660
    */
1834
    printf( "\nSorting the data\n" );
-
 
1835
    do_big_sort();
1661
    do_big_sort();
1836
    gen_stats();
1662
    gen_stats();
1837
 
1663
 
1838
    /*
1664
    /*
1839
     * Now print the data on the printer 
1665
     * Now print the data on the printer 
1840
     */
1666
     */
1841
 
1667
 
1842
    if( !open_printer( "full_data", "csv", 2000, text, NULL ) )
1668
    if( !open_printer( "full_data", "csv", 2000, text, NULL ) )
1843
        return;
1669
        return;
1844
 
1670
 
1845
    printf( "\nGenerating the printed output\n" );
-
 
1846
 
-
 
1847
    /*
1671
    /*
1848
    **  Print headings
1672
    **  Print headings
1849
    */
1673
    */
1850
    csv_print( "%s",   "Team Number" );
1674
    csv_print( "%s",   "Team Number" );
1851
    csv_print( "%s",   "Team Name" );
1675
    csv_print( "%s",   "Team Name" );
Line 2537... Line 2361...
2537
 *
2361
 *
2538
 *========================================================================*/
2362
 *========================================================================*/
2539
 
2363
 
2540
void srt_place(void)
2364
void srt_place(void)
2541
{
2365
{
2542
    //int         i, j;
-
 
2543
 
-
 
2544
//    cur( 0, 5 );
-
 
2545
//    printf( "Update the team placings to the data base\n" );
-
 
2546
//    flush_out();
-
 
2547
    if( ck_data( -1, C_ELAPSED ) )
2366
    if( ck_data( -1, C_ELAPSED ) )
2548
        return;
2367
        return;
2549
    do_big_sort();
2368
    do_big_sort();
2550
 
2369
 
2551
    /*
2370
    /*
2552
     * Generate the stats and display them on the screen for interest
-
 
2553
     * This operation will not hurt - so why not
2371
     * Generate the stats
2554
     */
2372
     */
2555
 
-
 
2556
    gen_stats();
2373
    gen_stats();
2557
//    printf( "\nEvent statistics\n\n" );
-
 
2558
//    printf( "%-*s   %-13s ", LEN_CLASS_NAME, "", "Overall" );
-
 
2559
//    for( i = 1; i <= config.num_legs; i++ )
-
 
2560
//        printf( "%-13s ", config.leg_name[i - 1] );
-
 
2561
 
-
 
2562
//    for( j = 0; j <= config.num_class; j++ )
-
 
2563
//    {
-
 
2564
//        printf( "\n%-*s : ", LEN_CLASS_NAME,
-
 
2565
//                j ? config.team_class[j - 1].full_name : "Overall" );
-
 
2566
//        for( i = 0; i <= config.num_legs; i++ )
-
 
2567
//        {
-
 
2568
//            printf( "%4d ", stats.fast.team[i][j] );
-
 
2569
//            printf( "%s ", time_a( stats.fast.time[i][j] ) );
-
 
2570
//        }
-
 
2571
//        printf( "\n%*s : ", LEN_CLASS_NAME, "Average" );
-
 
2572
//        for( i = 0; i <= config.num_legs; i++ )
-
 
2573
//        {
-
 
2574
//            printf( "     %s ", time_a( stats.average[i][j] ) );
-
 
2575
//        }
-
 
2576
//    }
-
 
2577
//    printf( "\nAny key to continue" );
-
 
2578
//    ( void ) getinp();
-
 
2579
}
2374
}
2580
 
2375
 
2581
/*========================================================================
2376
/*========================================================================
2582
 *
2377
 *
2583
 *  Calculate summary information
2378
 *  Calculate summary information
Line 2639... Line 2434...
2639
    }
2434
    }
2640
}
2435
}
2641
 
2436
 
2642
/*========================================================================
2437
/*========================================================================
2643
 *
2438
 *
2644
 *  Display summary information
-
 
2645
 *
-
 
2646
 *  Purpose:
-
 
2647
 *      This function is called to display summary information
-
 
2648
 *
-
 
2649
 *  Parameters:
-
 
2650
 *      None
-
 
2651
 *
-
 
2652
 *  Returns:
-
 
2653
 *      Nothing
-
 
2654
 *
-
 
2655
 *========================================================================*/
-
 
2656
 
-
 
2657
//void display_summary (void)
-
 
2658
//{
-
 
2659
 
-
 
2660
//    t_class_summary data;
-
 
2661
//    int         i;
-
 
2662
//    //int         line = 2;
-
 
2663
 
-
 
2664
//    //cur( 0, line );
-
 
2665
//    printf( "Generating Summary Information" );
-
 
2666
//    calc_class_summary( & data );
-
 
2667
 
-
 
2668
 
-
 
2669
//    /*
-
 
2670
//    **  Display summary stats
-
 
2671
//    */
-
 
2672
 
-
 
2673
//    //cur( 0, line );
-
 
2674
//    //console_clreol();
-
 
2675
//    printf( "Summary Information\n\n" );
-
 
2676
//    printf( "%*s : %-7s %-7s%-7s\n", LEN_CLASS_NAME,
-
 
2677
//                                      "Category",
-
 
2678
//                                      "Total",
-
 
2679
//                                      "Disq",
-
 
2680
//                                      "NonEq" );
-
 
2681
 
-
 
2682
//    for( i = 0; i < config.num_class; i++ )
-
 
2683
//    {
-
 
2684
//        /*
-
 
2685
//        **  The non-equestrian leg does not have any data
-
 
2686
//        **  Supress the display
-
 
2687
//        */
-
 
2688
//        if ( config.nonequestrian_class == i+1  )
-
 
2689
//            continue;
-
 
2690
 
-
 
2691
//        printf( "%*s : %-7d %-7d %-7d\n", LEN_CLASS_NAME,
-
 
2692
//                                          config.team_class[i].full_name,
-
 
2693
//                                          data.teamclass[i+1].total,
-
 
2694
//                                          data.teamclass[i+1].disqualified,
-
 
2695
//                                          data.teamclass[i+1].non_equestrian );
-
 
2696
//    }
-
 
2697
 
-
 
2698
//    printf( "\n" );
-
 
2699
//    printf( "%*s : %-7d %-7d %-7d\n", LEN_CLASS_NAME,
-
 
2700
//                                      "Totals",
-
 
2701
//                                      data.total.total,
-
 
2702
//                                      data.total.disqualified,
-
 
2703
//                                      data.total.non_equestrian );
-
 
2704
 
-
 
2705
////    printf( "\nAny key to continue " );
-
 
2706
////    getinp();
-
 
2707
//}
-
 
2708
 
-
 
2709
/*========================================================================
-
 
2710
 *
-
 
2711
 *  Print summary information
2439
 *  Print summary information
2712
 *
2440
 *
2713
 *  Purpose:
2441
 *  Purpose:
2714
 *      This function is called to print summary information
2442
 *      This function is called to print summary information
2715
 *
2443
 *
Line 2724... Line 2452...
2724
void pri_summary (void)
2452
void pri_summary (void)
2725
{
2453
{
2726
 
2454
 
2727
    t_class_summary data;
2455
    t_class_summary data;
2728
    int         i;
2456
    int         i;
2729
    //int         line = 2;
-
 
2730
 
-
 
2731
 
2457
 
2732
    if( !open_printer( "", "summary", 132, text, "Summary Information" ) )
2458
    if( !open_printer( "", "summary", 132, text, "Summary Information" ) )
2733
        return;
2459
        return;
2734
    
2460
    
2735
    //cur( 0, line );
-
 
2736
    printf( "Generating Summary Information" );
-
 
2737
    calc_class_summary( & data );
2461
    calc_class_summary( & data );
2738
 
2462
 
2739
 
2463
 
2740
    /*
2464
    /*
2741
    **  Display summary stats
2465
    **  Display summary stats
Line 2769... Line 2493...
2769
                                      data.total.total,
2493
                                      data.total.total,
2770
                                      data.total.disqualified,
2494
                                      data.total.disqualified,
2771
                                      data.total.non_equestrian );
2495
                                      data.total.non_equestrian );
2772
 
2496
 
2773
    close_printer();
2497
    close_printer();
2774
//    if ( !report_all )
-
 
2775
//    {
-
 
2776
//        printf( "\nAny key to continue " );
-
 
2777
//        getinp();
-
 
2778
//    }
-
 
2779
}
2498
}
2780
 
2499
 
2781
 
2500
 
2782
 
2501
 
2783
/*========================================================================
2502
/*========================================================================
Line 2802... Line 2521...
2802
    unsigned    j;
2521
    unsigned    j;
2803
    ty_s_data  *ptr;                             /* Pointer to sort data */
2522
    ty_s_data  *ptr;                             /* Pointer to sort data */
2804
    int         teamclass;                           /* Current class */
2523
    int         teamclass;                           /* Current class */
2805
    team_type   team_buf;
2524
    team_type   team_buf;
2806
 
2525
 
2807
//    printf( "Sorting it ALL out" );
-
 
2808
//    flush_out();
-
 
2809
 
-
 
2810
    for( i = 0; i <= config.num_legs; i++ )
2526
    for( i = 0; i <= config.num_legs; i++ )
2811
    {
2527
    {
2812
        /*
2528
        /*
2813
        **  Sort on leg elapsed time
2529
        **  Sort on leg elapsed time
2814
        **  Then save the teams elapsed place in each leg
2530
        **  Then save the teams elapsed place in each leg
Line 2870... Line 2586...
2870
    }
2586
    }
2871
 
2587
 
2872
    /*
2588
    /*
2873
    **  Write the place information back to disk for use in the displays
2589
    **  Write the place information back to disk for use in the displays
2874
    */
2590
    */
2875
//    printf( "\nWriting it all back to the disk file" );
-
 
2876
//    flush_out();
-
 
2877
 
-
 
2878
    for( i = config.min_team; i <= config.max_team; i++ )
2591
    for( i = config.min_team; i <= config.max_team; i++ )
2879
    {
2592
    {
2880
        if( sort_aux[i].team && valid_field( i ) && g_record( i, &team_buf ) )
2593
        if( sort_aux[i].team && valid_field( i ) && g_record( i, &team_buf ) )
2881
        {
2594
        {
2882
            for( k = 0; k <= config.num_legs; k++ )
2595
            for( k = 0; k <= config.num_legs; k++ )
Line 3225... Line 2938...
3225
    ty_s_data  *last;
2938
    ty_s_data  *last;
3226
    int         j;
2939
    int         j;
3227
    unsigned    num;
2940
    unsigned    num;
3228
    team_type   team_buf;
2941
    team_type   team_buf;
3229
 
2942
 
3230
    //printf( "Loading team information - This will not hurt" );
-
 
3231
    //flush_out();
-
 
3232
 
-
 
3233
    /*
2943
    /*
3234
     * Fetch memory for the data store
2944
     * Fetch memory for the data store
3235
     */
2945
     */
3236
 
2946
 
3237
    if( sort_data )
2947
    if( sort_data )