Subversion Repositories svn1-original

Rev

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

Rev 356 Rev 358
Line 853... Line 853...
853
            {
853
            {
854
                print( "  %-8s %4.4s %4.4s", "-- NE --", "NE","NE");
854
                print( "  %-8s %4.4s %4.4s", "-- NE --", "NE","NE");
855
            }
855
            }
856
            else
856
            else
857
            {
857
            {
858
                print( "  %-8s %4.4s %4.4s",
-
 
859
                    time_a( team_buf.leg[j].elapsed ),
858
                print( "  %-8s", time_a( team_buf.leg[j].elapsed ));
860
                    px_place( j, team_buf.leg[j].l_place, false, false, ptr->flags ),
859
                print( " %4.4s",      px_place( j, team_buf.leg[j].l_place, false, false, ptr->flags ));
861
                    px_place( j, team_buf.leg[j].le_place,true , true, ptr->flags )
860
                if ( config.num_legs != 1 ) print( "%4.4s",   px_place( j, team_buf.leg[j].le_place,true , true, ptr->flags ));
862
                  );
861
                if ( config.num_legs == 1 ) print( " %-*s ",  MAX_TM_NAME, team_buf.name );
863
            }
862
            }
864
        }
863
        }
865
 
864
 
866
       /*
865
       /*
867
        **  Print the trailer (Finishing order)
866
        **  Print the trailer (Finishing order)
868
        **      - Total time
867
        **      - Total time
869
        **      - Category place - with reference to category file
868
        **      - Category place - with reference to category file
870
        */
869
        */
871
//        print( "  %-8s ",  time_a( team_buf.leg[0].elapsed ) );
-
 
872
        print( "  %-8s ", time_a( ptr->lege[0] ) );
870
        if ( config.num_legs != 1 ) print( "  %-8s ", time_a( ptr->lege[0] ) );
873
        
871
        
874
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">",url_encode(p_filename(filebase, config.team_class[team_buf.teamclass - 1].abr ,"html")), team_buf.numb );
872
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">",url_encode(p_filename(filebase, config.team_class[team_buf.teamclass - 1].abr ,"html")), team_buf.numb );
875
        print( "%-4.4s", px_place( 0, team_buf.leg[0].lc_place, false, false, ptr->flags) );
873
        print( "%-4.4s", px_place( 0, team_buf.leg[0].lc_place, false, false, ptr->flags) );
876
        if ( report_html == html ) print( "</A>" );
874
        if ( report_html == html ) print( "</A>" );
877
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
875
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
Line 994... Line 992...
994
            {
992
            {
995
                print( "  %-8s %4.4s %4.4s", "-- NE --", "NE","NE");
993
                print( "  %-8s %4.4s %4.4s", "-- NE --", "NE","NE");
996
            }
994
            }
997
            else
995
            else
998
            {
996
            {
999
                print( "  %-8s %4.4s %4.4s", time_a( team_buf.leg[j].elapsed ),
997
                print( "  %-8s", time_a( team_buf.leg[j].elapsed ));
1000
                       px_place( j, team_buf.leg[j].lc_place,  false, false, ptr->flags ),
998
                print( " %4.4s", px_place( j, team_buf.leg[j].lc_place,  false, false, ptr->flags ));
1001
                       px_place( j, team_buf.leg[j].lec_place, true , true, ptr->flags ) );
999
                if ( config.num_legs != 1 ) print( " %4.4s", px_place( j, team_buf.leg[j].lec_place, true , true, ptr->flags ) );
-
 
1000
                if ( config.num_legs == 1 ) print( " %-*s ", MAX_TM_NAME, team_buf.name );
1002
            }
1001
            }
1003
        }
1002
        }
1004
 
1003
 
1005
        /*
1004
        /*
1006
        **  Print the trailer
1005
        **  Print the trailer
1007
        **      - Total time
1006
        **      - Total time
1008
        **      - Overall place - with reference to overall place file
1007
        **      - Overall place - with reference to overall place file
1009
        */
1008
        */
1010
        /* print( "  %-8s ", time_a( team_buf.leg[0].elapsed ) ); */
-
 
1011
        print( "  %-8s ", time_a( ptr->lege[0] ) );
1009
        if ( config.num_legs != 1 ) print( "  %-8s ", time_a( ptr->lege[0] ) );
1012
 
1010
 
1013
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
1011
        if ( report_html == html )  print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
1014
        print( "%4.4s", px_place( 0, team_buf.leg[0].l_place, false, true, ptr->flags));
1012
        print( "%4.4s", px_place( 0, team_buf.leg[0].l_place, false, true, ptr->flags));
1015
        if ( report_html == html ) print( "</A>" );
1013
        if ( report_html == html )  print( "</A>" );
1016
 
1014
 
1017
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
1015
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
1018
        lcount++;
1016
        lcount++;
1019
        print( "\n" );
1017
        print( "\n" );
1020
    }
1018
    }
Line 1174... Line 1172...
1174
            {
1172
            {
1175
                print( "  %-8s %4.4s %4.4s", "-- NE --", "NE","NE");
1173
                print( "  %-8s %4.4s %4.4s", "-- NE --", "NE","NE");
1176
            }
1174
            }
1177
            else
1175
            else
1178
            {
1176
            {
1179
                print( "  %-8s %4.4s %4.4s",
-
 
1180
                    time_a( team_buf.leg[j].elapsed ),
1177
                print( "  %-8s",                     time_a( team_buf.leg[j].elapsed ));
1181
                    px_place(j, team_buf.leg[j].l_place, false, false, ptr->flags ),
1178
                print( " %4.4s", px_place(j, team_buf.leg[j].l_place, false, false, ptr->flags ));
1182
                    px_place(j, team_buf.leg[j].le_place,true,  true, ptr->flags )
1179
                if ( config.num_legs != 1 ) print( " %4.4s", px_place(j, team_buf.leg[j].le_place,true,  true, ptr->flags ) );
1183
                  );
1180
                if ( config.num_legs == 1 ) print( " %-*s ", MAX_TM_NAME, team_buf.name );
1184
            }
1181
            }
1185
        }
1182
        }
1186
 
1183
 
-
 
1184
 
1187
       /*
1185
       /*
1188
        **  Print the trailer (Finishing order)
1186
        **  Print the trailer (Finishing order)
1189
        **      - Total time
1187
        **      - Total time
1190
        **      - Category place - with reference to category file
1188
        **      - Category place - with reference to category file
1191
        */
1189
        */
1192
//        print( "  %-8s ",  time_a( team_buf.leg[0].elapsed ) );
-
 
1193
        print( "  %-8s ", time_a( ptr->lege[0] ) );
1190
       if ( config.num_legs != 1 ) print( "  %-8s ", time_a( ptr->lege[0] ) );
1194
        
1191
        
1195
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">",url_encode(p_filename(filebase, config.team_class[team_buf.teamclass - 1].abr ,"html")), team_buf.numb );
1192
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">",url_encode(p_filename(filebase, config.team_class[team_buf.teamclass - 1].abr ,"html")), team_buf.numb );
1196
        print( "%-4.4s", px_place( 0, team_buf.leg[0].lc_place, false, false, ptr->flags ) );
1193
        print( "%-4.4s", px_place( 0, team_buf.leg[0].lc_place, false, false, ptr->flags ) );
1197
        if ( report_html == html ) print( "</A>" );
1194
        if ( report_html == html ) print( "</A>" );
1198
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
1195
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
Line 2055... Line 2052...
2055
               3,
2052
               3,
2056
               team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
2053
               team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
2057
 
2054
 
2058
        for( j = 1; j <= config.num_legs; j++ )
2055
        for( j = 1; j <= config.num_legs; j++ )
2059
        {
2056
        {
2060
            print( "  %-8s %4.4s %4.4s",
-
 
2061
                   time_fa( team_buf.leg[j].elapsed, ptr->flags.disqualified ),
2057
            print( "  %-8s", time_fa( team_buf.leg[j].elapsed, ptr->flags.disqualified ));
2062
                   px_place(j, team_buf.leg[j].l_place, false, true, ptr->flags ),
2058
            print( " %4.4s", px_place(j, team_buf.leg[j].l_place, false, true, ptr->flags ));
2063
                   px_place(j, team_buf.leg[j].le_place, false, true, ptr->flags )
2059
            if ( config.num_legs != 1 ) print( " %4.4s", px_place(j, team_buf.leg[j].le_place, false, true, ptr->flags ));
2064
                   );
2060
            if ( config.num_legs == 1 ) print( " %-*s ",     MAX_TM_NAME, team_buf.name );
2065
        }
2061
        }
2066
        print( "  %-8s %4.4s\n",
-
 
-
 
2062
 
2067
               time_fa( team_buf.leg[0].elapsed, ptr->flags.disqualified ),
2063
        if ( config.num_legs != 1 ) print( "  %-8s", time_fa( team_buf.leg[0].elapsed, ptr->flags.disqualified ));
2068
               px_place(0, team_buf.leg[config.num_legs].lec_place, false, false, ptr->flags )
2064
        print( " %4.4s\n", px_place(0, team_buf.leg[config.num_legs].lec_place, false, false, ptr->flags ));
2069
               );
-
 
2070
    }
2065
    }
2071
 
2066
 
2072
    print_class_stats( -1, FALSE );             /* Print statistics */
2067
    print_class_stats( -1, FALSE );             /* Print statistics */
2073
    print_legend(-1, 1);                        /* Print the legend */
2068
    print_legend(-1, 1);                        /* Print the legend */
2074
    close_printer();                            /* Close the printer */
2069
    close_printer();                            /* Close the printer */
Line 2116... Line 2111...
2116
               3,
2111
               3,
2117
               team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
2112
               team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
2118
 
2113
 
2119
        for( j = 1; j <= config.num_legs; j++ )
2114
        for( j = 1; j <= config.num_legs; j++ )
2120
        {
2115
        {
2121
            print( "  %-8s %4.4s %4.4s",
-
 
2122
                   time_fa( team_buf.leg[j].elapsed, ptr->flags.disqualified ),
2116
            print( "  %-8s", time_fa( team_buf.leg[j].elapsed, ptr->flags.disqualified ));
2123
                   px_place(j, team_buf.leg[j].lc_place,  false, true, ptr->flags ),
2117
            print( " %4.4s", px_place(j, team_buf.leg[j].lc_place,  false, true, ptr->flags ));
2124
                   px_place(j, team_buf.leg[j].lec_place, false, true, ptr->flags ) );
2118
            if ( config.num_legs != 1 ) print( " %4.4s", px_place(j, team_buf.leg[j].lec_place, false, true, ptr->flags ));
-
 
2119
            if ( config.num_legs == 1 ) print( " %-*s ", MAX_TM_NAME, team_buf.name );
2125
        }
2120
        }
2126
        print( "  %-8s %4.4s\n",
-
 
-
 
2121
 
-
 
2122
 
2127
               time_fa( team_buf.leg[0].elapsed, ptr->flags.disqualified ),
2123
        if ( config.num_legs != 1 ) print( "  %-8s", time_fa( team_buf.leg[0].elapsed, ptr->flags.disqualified ));
2128
               px_place(0, team_buf.leg[config.num_legs].le_place, false, false, ptr->flags ) );
2124
        print( " %4.4s\n", px_place(0, team_buf.leg[config.num_legs].le_place, false, false, ptr->flags ) );
2129
    }
2125
    }
2130
 
2126
 
2131
    print_class_stats( last_class, FALSE );
2127
    print_class_stats( last_class, FALSE );
2132
    print_legend(last_class, 1);
2128
    print_legend(last_class, 1);
2133
    close_printer();
2129
    close_printer();
Line 2412... Line 2408...
2412
    **  Now printout the column headings
2408
    **  Now printout the column headings
2413
    **  This is a two line display
2409
    **  This is a two line display
2414
    **
2410
    **
2415
    **  Line-1  Leg names
2411
    **  Line-1  Leg names
2416
    */
2412
    */
-
 
2413
 
-
 
2414
    if (config.num_legs == 1 ) {
-
 
2415
        print( "%-*s %-*s", 4, "", 4, "" );
-
 
2416
        print( "  %-*s", 18, config.leg_name[0] );
-
 
2417
        print( " %-*s", MAX_TM_NAME + 1, "" );
-
 
2418
        print( "  %-4s\n", ( teamclass < 0 ) ? "Cat" : "Fin" );
-
 
2419
 
-
 
2420
    } else {
2417
    print( "%-*s %-*s %-*s", 4, "", 4, "", 3, "" );
2421
        print( "%-*s %-*s %-*s", 4, "", 4, "", 3, "" );
2418
    for( j = 1; j <= config.num_legs; j++ )
2422
        for( j = 1; j <= config.num_legs; j++ )
2419
    {
2423
        {
2420
        print_bold( TRUE );
2424
            print_bold( TRUE );
2421
        print( "  %-*s", 18, config.leg_name[j - 1] );
2425
            print( "  %-*s", 18, config.leg_name[j - 1] );
2422
        print_bold( FALSE );
2426
            print_bold( FALSE );
-
 
2427
        }
-
 
2428
        print( "  %-8s %-4s\n", "Total", ( teamclass < 0 ) ? "Cat" : "Fin" );
2423
    }
2429
    }
2424
    print( "  %-8s %-4s\n", "Total", ( teamclass < 0 ) ? "Cat" : "Fin" );
-
 
-
 
2430
 
-
 
2431
 
2425
 
2432
 
2426
 
2433
 
2427
    /*
2434
    /*
2428
    **  Line-2  Details
2435
    **  Line-2  Details
2429
    */
2436
    */
2430
    print_underline( TRUE );
2437
    print_underline( TRUE );
2431
    print( "%-*s %*s %-*s", 4, final ? "Plce" : "Team",
2438
    print( "%-*s %*s %-*s", 4, final ? "Plce" : "Team",
2432
                            4, final ? "Team" : "Plce",
2439
                            4, final ? "Team" : "Plce",
2433
                            3, "Cat" );
2440
                            3, "Cat" );
2434
 
2441
 
2435
    for( j = 1; j <= config.num_legs; j++ )
-
 
2436
        print( "  %-8s %-4s %-4s", "Time", " LP", " EP" );
-
 
2437
 
2442
 
-
 
2443
    if (config.num_legs == 1 ) {
-
 
2444
        print( "  %-8s %-4s", "Time", " LP" );
-
 
2445
        print( " %-*s", MAX_TM_NAME + 1, "Team Name" );
-
 
2446
        print( "  %-4s\n", "Plce" );
-
 
2447
 
-
 
2448
    } else {
-
 
2449
        for( j = 1; j <= config.num_legs; j++ )
-
 
2450
            print( "  %-8s %-4s %-4s", "Time", " LP", " EP" );
2438
    print( "  %-8s %-4s\n", "Time", "Plce" );
2451
        print( "  %-8s %-4s\n", "Time", "Plce" );
-
 
2452
    }
-
 
2453
 
-
 
2454
 
2439
    print_underline( FALSE );
2455
    print_underline( FALSE );
2440
}
2456
}
2441
 
2457
 
2442
/*========================================================================
2458
/*========================================================================
2443
 *
2459
 *
Line 2486... Line 2502...
2486
    {
2502
    {
2487
        print_bold( TRUE );
2503
        print_bold( TRUE );
2488
        print( "%-13s  ", config.leg_name[i - 1] );
2504
        print( "%-13s  ", config.leg_name[i - 1] );
2489
        print_bold( FALSE );
2505
        print_bold( FALSE );
2490
    }
2506
    }
2491
    print( "%-13s  \n", final ? "Total" : "" );
2507
    if ( config.num_legs != 1 ) print( "%-13s  ", final ? "Total" : "" );
-
 
2508
    print( "\n" );
2492
 
2509
 
2493
    /*
2510
    /*
2494
    **  Print the fastest teams for each leg and overall
2511
    **  Print the fastest teams for each leg and overall
2495
    **  Add cross references to the team names for the fastest teams
2512
    **  Add cross references to the team names for the fastest teams
2496
    */
2513
    */
Line 2508... Line 2525...
2508
 
2525
 
2509
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), stats.fast.team[j][c] );
2526
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), stats.fast.team[j][c] );
2510
        print( "%4d",  stats.fast.team[j][c] );
2527
        print( "%4d",  stats.fast.team[j][c] );
2511
        if ( report_html == html ) print( "</A>" );
2528
        if ( report_html == html ) print( "</A>" );
2512
        print( " %s  ", time_a( stats.fast.time[j][c] ) );
2529
        print( " %s  ", time_a( stats.fast.time[j][c] ) );
-
 
2530
        if ( config.num_legs == 1 ) break;
2513
    }
2531
    }
2514
    print( "\n" );
2532
    print( "\n" );
2515
 
2533
 
2516
    /*
2534
    /*
2517
    **  Print the average time for each leg
2535
    **  Print the average time for each leg
Line 2526... Line 2544...
2526
                j = 0;                           /* Leg-0 last */
2544
                j = 0;                           /* Leg-0 last */
2527
            else
2545
            else
2528
                break;
2546
                break;
2529
        }
2547
        }
2530
        print( "     %s  ", time_a( stats.average[j][c] ) );
2548
        print( "     %s  ", time_a( stats.average[j][c] ) );
-
 
2549
        if ( config.num_legs == 1 ) break;
2531
    }
2550
    }
2532
}
2551
}
2533
 
2552
 
2534
/*========================================================================
2553
/*========================================================================
2535
 *
2554
 *
Line 2682... Line 2701...
2682
{
2701
{
2683
    static char store[2][5];                     /* 2 stores for 4 digit numbers */
2702
    static char store[2][5];                     /* 2 stores for 4 digit numbers */
2684
    static int  i = 0;                           /* Current index into store */
2703
    static int  i = 0;                           /* Current index into store */
2685
    static const char *dis = "U";
2704
    static const char *dis = "U";
2686
    static const char *alt = "NE";
2705
    static const char *alt = "NE";
2687
    static const char *vet = "V";
2706
    static const char *vet = "U";
2688
 
2707
 
2689
    if (flags.bad_times || flags.disqualified || !flags.valid)
2708
    if (flags.bad_times || flags.disqualified || !flags.valid)
2690
        return dis;
2709
        return dis;
2691
 
2710
 
2692
    if (leg == -1 && flags.vet_check )
2711
    if (leg == -1 && flags.vet_check )