Subversion Repositories svn1-original

Rev

Rev 27 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27 Rev 29
Line 61... Line 61...
61
void pri_awards(void);
61
void pri_awards(void);
62
void pri_master_index(void);
62
void pri_master_index(void);
63
char *placing ( int place );
63
char *placing ( int place );
64
void pri_name_index(void);
64
void pri_name_index(void);
65
void pri_name_index_body( void );
65
void pri_name_index_body( void );
-
 
66
void pri_all_reports (void );
-
 
67
void pri_leg_body(int leg);
-
 
68
void pri_eleg_body(int leg);
66
 
69
 
67
 
70
 
68
menu_table  rpt_menu[] = {
71
menu_table  rpt_menu[] = {
69
    { '1', "Print team order", pri_team },
72
    { '1', "Print team order", pri_team },
70
    { '2', "Print end leg times", pri_leg },
73
    { '2', "Print end leg times", pri_leg },
Line 76... Line 79...
76
    { '8', "Display summary information", display_summary },
79
    { '8', "Display summary information", display_summary },
77
    { '9', "Print summary information", pri_summary },
80
    { '9', "Print summary information", pri_summary },
78
    { 'a', "Print Awards only", pri_awards },
81
    { 'a', "Print Awards only", pri_awards },
79
    { 'b', "Print Master Index only", pri_master_index },
82
    { 'b', "Print Master Index only", pri_master_index },
80
    { 'c', "Print Name Index only", pri_name_index },
83
    { 'c', "Print Name Index only", pri_name_index },
-
 
84
    { 'z', "Print all reports", pri_all_reports },
81
 
85
    
82
#if defined(HI_TECH_C) || defined(__TURBOC__)
86
#if defined(HI_TECH_C) || defined(__TURBOC__)
83
    { 'S', "MS-DOS system", ms_system },
87
    { 'S', "MS-DOS system", ms_system },
84
#endif
88
#endif
85
    { 'q', "Return to main menu", 0 },
89
    { 'q', "Return to main menu", 0 },
86
    { '\0' }
90
    { '\0' }
Line 104... Line 108...
104
};
108
};
105
 
109
 
106
int         sort_leg;
110
int         sort_leg;
107
int         sort_mode;
111
int         sort_mode;
108
bool        report_html = FALSE;
112
bool        report_html = FALSE;
-
 
113
bool        report_all = FALSE;
109
 
114
 
110
/* Parameters used by the sort routine to govern its actions */
115
/* Parameters used by the sort routine to govern its actions */
111
 
116
 
112
#define S_L     1                                /* Elasped times */
117
#define S_L     1                                /* Elasped times */
113
#define S_LE    2                                /* Leg end time */
118
#define S_LE    2                                /* Leg end time */
Line 449... Line 454...
449
 *========================================================================*/
454
 *========================================================================*/
450
 
455
 
451
void pri_leg(void)
456
void pri_leg(void)
452
{
457
{
453
    int         leg = 0;
458
    int         leg = 0;
454
    ty_s_data  *ptr;
-
 
455
    int         i, k;
-
 
-
 
459
 
456
 
460
 
457
    /*
461
    /*
458
     * This function is used to provide interum print-outs
462
     * This function is used to provide interum print-outs
459
     * The team data is sorted by time at leg-end and the times printed are
463
     * The team data is sorted by time at leg-end and the times printed are
460
     * real times at leg end.
464
     * real times at leg end.
Line 472... Line 476...
472
            return;
476
            return;
473
        if( leg <= config.num_legs )
477
        if( leg <= config.num_legs )
474
            break;
478
            break;
475
        beep();
479
        beep();
476
    }
480
    }
-
 
481
    
-
 
482
    pri_leg_body ( leg );
-
 
483
}
477
 
484
 
-
 
485
void pri_leg_body(int leg)    
-
 
486
{
-
 
487
    ty_s_data  *ptr;
-
 
488
    int         i, k;
478
    /*
489
    /*
479
     * Sort the data in finishing order 
490
     * Sort the data in finishing order 
480
     */
491
     */
481
 
492
 
482
    printf( "\nSorting the data\n" );
493
    printf( "\nSorting the data\n" );
Line 636... Line 647...
636
 *========================================================================*/
647
 *========================================================================*/
637
 
648
 
638
void pri_eleg(void)
649
void pri_eleg(void)
639
{
650
{
640
    int         leg = 0;
651
    int         leg = 0;
641
    ty_s_data  *ptr;
-
 
642
    int         i, k;
-
 
-
 
652
 
643
 
653
 
644
    /*
654
    /*
645
     * This function is used to provide interum print-outs
655
     * This function is used to provide interum print-outs
646
     * The team data is sorted by time at leg-elapsed and the times printed are
656
     * The team data is sorted by time at leg-elapsed and the times printed are
647
     * real times at leg end.
657
     * real times at leg end.
Line 659... Line 669...
659
            return;
669
            return;
660
        if( leg <= config.num_legs )
670
        if( leg <= config.num_legs )
661
            break;
671
            break;
662
        beep();
672
        beep();
663
    }
673
    }
-
 
674
    pri_eleg_body(leg);
-
 
675
}
664
 
676
 
-
 
677
  
-
 
678
void pri_eleg_body( int leg)
-
 
679
{
-
 
680
    ty_s_data  *ptr;
-
 
681
    int         i, k;
-
 
682
    
665
    /*
683
    /*
666
     * Sort the data in finishing order 
684
     * Sort the data in finishing order 
667
     */
685
     */
668
 
686
 
669
    printf( "\nSorting the data\n" );
687
    printf( "\nSorting the data\n" );
Line 866... Line 884...
866
    /*
884
    /*
867
    **  If a non HTML report then ask if the user want to supress the class
885
    **  If a non HTML report then ask if the user want to supress the class
868
    **  printout. For an HTML report always do the class reports as the two
886
    **  printout. For an HTML report always do the class reports as the two
869
    **  are interlinked
887
    **  are interlinked
870
    */
888
    */
871
    if ( ! report_html )
889
    if ( ! report_html  && ! report_all)
872
    {
890
    {
873
        suppress_classes = getyes( "Do you want to suppress class printouts" );
891
        suppress_classes = getyes( "Do you want to suppress class printouts" );
874
    }
892
    }
875
    else
893
    else
876
    {
894
    {
Line 1432... Line 1450...
1432
void pri_interim(void)
1450
void pri_interim(void)
1433
{
1451
{
1434
    ty_s_data  *ptr;
1452
    ty_s_data  *ptr;
1435
    unsigned    i;
1453
    unsigned    i;
1436
    int         j, last_class;
1454
    int         j, last_class;
1437
    char        suppress_classes;                /* Boolean. Printout class files too */
1455
    char        suppress_classes = FALSE;                /* Boolean. Printout class files too */
1438
    char       *report_title;
1456
    char       *report_title;
1439
 
1457
 
-
 
1458
    if ( ! report_all )
-
 
1459
    {
1440
    cur( 0, 5 );
1460
        cur( 0, 5 );
1441
    printf( "Generate interim result printouts\n" );
1461
        printf( "Generate interim result printouts\n" );
1442
    ck_data( -1, C_DISQUAL );                    /* Check the data - dummy check */
1462
        ck_data( -1, C_DISQUAL );                    /* Check the data - dummy check */
1443
    suppress_classes = getyes( "Do you want to suppress class printouts" );
1463
        suppress_classes = getyes( "Do you want to suppress class printouts" );
1444
    printf( "\nSorting the data\n" );
1464
        printf( "\nSorting the data\n" );
-
 
1465
    }
1445
    do_big_sort();                             /* Sort on every thing */
1466
    do_big_sort();                             /* Sort on every thing */
1446
    gen_stats();                               /* Generate the stats too */
1467
    gen_stats();                               /* Generate the stats too */
1447
 
1468
 
1448
    printf( "\nGenerating the printed output\n" );
1469
    printf( "\nGenerating the printed output\n" );
1449
 
1470
 
Line 1570... Line 1591...
1570
 
1591
 
1571
}
1592
}
1572
 
1593
 
1573
/*========================================================================
1594
/*========================================================================
1574
 *
1595
 *
-
 
1596
 *  Print all reports at once
-
 
1597
 ^  Its all so fast, these days ...
-
 
1598
 *
-
 
1599
 *  Purpose:
-
 
1600
 *      This function is called to print all reports at once
-
 
1601
 *
-
 
1602
 *  Parameters:
-
 
1603
 *      None
-
 
1604
 *
-
 
1605
 *  Returns:
-
 
1606
 *      Nothing
-
 
1607
 *
-
 
1608
 *========================================================================*/
-
 
1609
 
-
 
1610
void pri_all_reports ( void )
-
 
1611
{
-
 
1612
    int leg;
-
 
1613
    report_all = TRUE;
-
 
1614
    
-
 
1615
    pri_team();
-
 
1616
    
-
 
1617
    for ( leg = 1; leg <= config.num_legs; leg ++ )
-
 
1618
    {
-
 
1619
        pri_leg_body ( leg );
-
 
1620
        pri_eleg_body ( leg );
-
 
1621
    }
-
 
1622
 
-
 
1623
    pri_final();
-
 
1624
    pri_final_html();
-
 
1625
    pri_summary();
-
 
1626
    pri_awards();
-
 
1627
    pri_master_index();
-
 
1628
   
-
 
1629
    report_all = FALSE;
-
 
1630
}
-
 
1631
 
-
 
1632
 
-
 
1633
/*========================================================================
-
 
1634
 *
1575
 *  Print a class header
1635
 *  Print a class header
1576
 *
1636
 *
1577
 *  Purpose:
1637
 *  Purpose:
1578
 *      This function is called to print a class header
1638
 *      This function is called to print a class header
1579
 *
1639
 *
Line 1946... Line 2006...
1946
    int         bad = 0;
2006
    int         bad = 0;
1947
    int         j = 0;
2007
    int         j = 0;
1948
    int         k, bad_leg;
2008
    int         k, bad_leg;
1949
    time_t     *t;                               /* An array of times */
2009
    time_t     *t;                               /* An array of times */
1950
 
2010
 
-
 
2011
    
-
 
2012
    
1951
    ptr = sort_data;
2013
    ptr = sort_data;
1952
    for( i = 1; i <= sort_num; i++, ptr++ )
2014
    for( i = 1; i <= sort_num; i++, ptr++ )
1953
    {
2015
    {
1954
        bad_leg = 0;
2016
        bad_leg = 0;
1955
        if( mode == C_DISQUAL )
2017
        if( mode == C_DISQUAL )
Line 1979... Line 2041...
1979
            }
2041
            }
1980
 
2042
 
1981
            if( bad_leg )
2043
            if( bad_leg )
1982
            {
2044
            {
1983
                ptr->flags.bad_times = TRUE;
2045
                ptr->flags.bad_times = TRUE;
1984
                if( !bad )
2046
                
1985
                    printf( "Team with incorrect time information\n" );
-
 
1986
                if( ++j > 15 )
2047
                if ( ! report_all )
1987
                {
2048
                {
-
 
2049
                    if( !bad )
-
 
2050
                        printf( "Team with incorrect time information\n" );
-
 
2051
                    if( ++j > 15 )
-
 
2052
                    {
1988
                    printf( "\n" );
2053
                        printf( "\n" );
1989
                    j = 0;
2054
                        j = 0;
-
 
2055
                    }
-
 
2056
                    printf( "%4d ", ptr->team );
-
 
2057
                    bad++;
1990
                }
2058
                }
1991
                printf( "%4d ", ptr->team );
-
 
1992
                bad++;
-
 
1993
            }
2059
            }
1994
        }
2060
        }
1995
    }
2061
    }
1996
 
2062
 
1997
    if( bad )
2063
    if( bad )
Line 2258... Line 2324...
2258
                                      data.total.total,
2324
                                      data.total.total,
2259
                                      data.total.disqualified,
2325
                                      data.total.disqualified,
2260
                                      data.total.non_equestrian );
2326
                                      data.total.non_equestrian );
2261
 
2327
 
2262
    close_printer();
2328
    close_printer();
-
 
2329
    if ( !report_all )
-
 
2330
    {
2263
    printf( "\nAny key to continue " );
2331
        printf( "\nAny key to continue " );
2264
    getinp();
2332
        getinp();
-
 
2333
    }
2265
}
2334
}
2266
 
2335
 
2267
 
2336
 
2268
 
2337
 
2269
/*========================================================================
2338
/*========================================================================