Subversion Repositories svn1-original

Rev

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

Rev 180 Rev 192
Line 69... Line 69...
69
void pri_leg_body(int leg);
69
void pri_leg_body(int leg);
70
void pri_eleg_body(int leg);
70
void pri_eleg_body(int leg);
71
void pri_csv_data ( void );
71
void pri_csv_data ( void );
72
 
72
 
73
 
73
 
74
//menu_table  rpt_menu[] = {
-
 
75
//    { '1', "Print team order", pri_team },
-
 
76
//    { '2', "Print end leg times", pri_leg },
-
 
77
//    { '3', "Print elapsed leg times", pri_eleg },
-
 
78
//    { '4', "Print final results", pri_final },
-
 
79
//    { '5', "Print final results(All-HTML)", pri_final_html },
-
 
80
//    { '6', "Print Interim results", pri_interim },
-
 
81
//    { '7', "Update event and class placings", srt_place },
-
 
82
//    { '8', "Display summary information", display_summary },
-
 
83
//    { '9', "Print summary information", pri_summary },
-
 
84
//    { 'a', "Print Awards only", pri_awards_html },
-
 
85
//    { 'b', "Print Master Index only", pri_master_index },
-
 
86
//    { 'c', "Print Name Index only", pri_name_index },
-
 
87
//    { 'e', "Export CSV Report Data", pri_csv_data },
-
 
88
//    { 'z', "Print all reports", pri_all_reports },
-
 
89
    
-
 
90
//#if defined(HI_TECH_C) || defined(__TURBOC__)
-
 
91
//    { 'S', "MS-DOS system", ms_system },
-
 
92
//#endif
-
 
93
//    { 'q', "Return to main menu", 0 },
-
 
94
//    { '\0' }
-
 
95
//};
-
 
96
 
-
 
97
#define MAX_PLACE 11
74
#define MAX_PLACE 11
98
const char * place_text[] =
75
const char * place_text[] =
99
{
76
{
100
    "Zero'th",
77
    "Zero'th",
101
    "First",
78
    "First",
Line 140... Line 117...
140
ty_s_aux   *sort_aux = 0;                        /* pointer to aux sort info */
117
ty_s_aux   *sort_aux = 0;                        /* pointer to aux sort info */
141
ty_s_namedata *sort_name_data = 0;                /* pointer to name info */
118
ty_s_namedata *sort_name_data = 0;                /* pointer to name info */
142
unsigned    int sort_num;                            /* Number in the array */
119
unsigned    int sort_num;                            /* Number in the array */
143
unsigned    int sort_num_data;                       /* Number in the array */
120
unsigned    int sort_num_data;                       /* Number in the array */
144
 
121
 
145
/*
-
 
146
**  A structure to hold statistical information
-
 
147
*/
-
 
148
typedef struct
-
 
149
{
-
 
150
    int         team[MAX_LEGS + 1][MAX_CLASS + 1];
-
 
151
    struct
-
 
152
    {
-
 
153
        int     team[MAX_LEGS + 1][MAX_CLASS + 1];
-
 
154
        time_t  time[MAX_LEGS + 1][MAX_CLASS + 1];
-
 
155
    } fast;
-
 
156
    time_t      average[MAX_LEGS + 1][MAX_CLASS + 1];
-
 
157
} ty_stats;
-
 
158
 
122
 
159
ty_stats        stats;                           /* Holds statistics */
123
ty_stats        stats;                           /* Holds statistics */
160
 
124
 
161
/*========================================================================
125
/*========================================================================
162
 *
126
 *
Line 2585... Line 2549...
2585
 *
2549
 *
2586
 *========================================================================*/
2550
 *========================================================================*/
2587
 
2551
 
2588
void srt_place(void)
2552
void srt_place(void)
2589
{
2553
{
2590
    int         i, j;
2554
    //int         i, j;
2591
 
2555
 
2592
//    cur( 0, 5 );
2556
//    cur( 0, 5 );
2593
//    printf( "Update the team placings to the data base\n" );
2557
//    printf( "Update the team placings to the data base\n" );
2594
//    flush_out();
2558
//    flush_out();
2595
    if( ck_data( -1, C_ELAPSED ) )
2559
    if( ck_data( -1, C_ELAPSED ) )
Line 2600... Line 2564...
2600
     * Generate the stats and display them on the screen for interest
2564
     * Generate the stats and display them on the screen for interest
2601
     * This operation will not hurt - so why not
2565
     * This operation will not hurt - so why not
2602
     */
2566
     */
2603
 
2567
 
2604
    gen_stats();
2568
    gen_stats();
2605
    printf( "\nEvent statistics\n\n" );
2569
//    printf( "\nEvent statistics\n\n" );
2606
    printf( "%-*s   %-13s ", LEN_CLASS_NAME, "", "Overall" );
2570
//    printf( "%-*s   %-13s ", LEN_CLASS_NAME, "", "Overall" );
2607
    for( i = 1; i <= config.num_legs; i++ )
2571
//    for( i = 1; i <= config.num_legs; i++ )
2608
        printf( "%-13s ", config.leg_name[i - 1] );
2572
//        printf( "%-13s ", config.leg_name[i - 1] );
2609
 
2573
 
2610
    for( j = 0; j <= config.num_class; j++ )
2574
//    for( j = 0; j <= config.num_class; j++ )
2611
    {
2575
//    {
2612
        printf( "\n%-*s : ", LEN_CLASS_NAME,
2576
//        printf( "\n%-*s : ", LEN_CLASS_NAME,
2613
                j ? config.team_class[j - 1].full_name : "Overall" );
2577
//                j ? config.team_class[j - 1].full_name : "Overall" );
2614
        for( i = 0; i <= config.num_legs; i++ )
2578
//        for( i = 0; i <= config.num_legs; i++ )
2615
        {
2579
//        {
2616
            printf( "%4d ", stats.fast.team[i][j] );
2580
//            printf( "%4d ", stats.fast.team[i][j] );
2617
            printf( "%s ", time_a( stats.fast.time[i][j] ) );
2581
//            printf( "%s ", time_a( stats.fast.time[i][j] ) );
2618
        }
2582
//        }
2619
        printf( "\n%*s : ", LEN_CLASS_NAME, "Average" );
2583
//        printf( "\n%*s : ", LEN_CLASS_NAME, "Average" );
2620
        for( i = 0; i <= config.num_legs; i++ )
2584
//        for( i = 0; i <= config.num_legs; i++ )
2621
        {
2585
//        {
2622
            printf( "     %s ", time_a( stats.average[i][j] ) );
2586
//            printf( "     %s ", time_a( stats.average[i][j] ) );
2623
        }
2587
//        }
2624
    }
2588
//    }
2625
//    printf( "\nAny key to continue" );
2589
//    printf( "\nAny key to continue" );
2626
//    ( void ) getinp();
2590
//    ( void ) getinp();
2627
}
2591
}
2628
 
2592
 
2629
/*========================================================================
2593
/*========================================================================