Subversion Repositories svn1-original

Rev

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

Rev 352 Rev 353
Line 473... Line 473...
473
void p_place( ty_s_data * ptr, int leg, unsigned k )
473
void p_place( ty_s_data * ptr, int leg, unsigned k )
474
{
474
{
475
    if( k < sort_num )
475
    if( k < sort_num )
476
    {
476
    {
477
        print( "%4.4s %4d %8s  ",
477
        print( "%4.4s %4d %8s  ",
478
               pr_place( ptr->place, ptr->flags.bad_times ),
478
               pr_place( ptr->place, ptr->flags.bad_times, ptr->flags.vet_check && (leg == 0) ),
479
               ptr->team, time_fa( ptr->leg[leg], ptr->flags.disqualified ) );
479
               ptr->team, time_fa( ptr->leg[leg], ptr->flags.disqualified ) );
480
    }
480
    }
481
    else
481
    else
482
    {
482
    {
483
        print( "%20s", "" );
483
        print( "%20s", "" );
Line 519... Line 519...
519
    }
519
    }
520
    if( found )
520
    if( found )
521
    {
521
    {
522
        print( "%4d %4.4s %8s  ",
522
        print( "%4d %4.4s %8s  ",
523
               ptra->team,
523
               ptra->team,
524
               pr_place( ptra->place, ptra->flags.bad_times ),
524
               pr_place( ptra->place, ptra->flags.bad_times, ptra->flags.vet_check && (leg == 0) ),
525
               time_fa( ptra->leg[leg], ptra->flags.disqualified ) );
525
               time_fa( ptra->leg[leg], ptra->flags.disqualified ) );
526
    }
526
    }
527
    else
527
    else
528
    {
528
    {
529
        print( "%20s", "" );
529
        print( "%20s", "" );
Line 661... Line 661...
661
void pe_place( ty_s_data * ptr, int leg, unsigned k )
661
void pe_place( ty_s_data * ptr, int leg, unsigned k )
662
{
662
{
663
    if( k < sort_num )
663
    if( k < sort_num )
664
    {
664
    {
665
        print( "%4.4s %4d %8s  ",
665
        print( "%4.4s %4d %8s  ",
666
               pr_place( ptr->place, ptr->flags.bad_times ),
666
               pr_place( ptr->place, ptr->flags.bad_times, ptr->flags.vet_check && (leg == 0) ),
667
               ptr->team,
667
               ptr->team,
668
               time_fa( ptr->lege[leg], ptr->flags.disqualified ) );
668
               time_fa( ptr->lege[leg], ptr->flags.disqualified ) );
669
    }
669
    }
670
    else
670
    else
671
    {
671
    {
Line 708... Line 708...
708
    }
708
    }
709
    if( found )
709
    if( found )
710
    {
710
    {
711
        print( "%4d %4.4s %8s  ",
711
        print( "%4d %4.4s %8s  ",
712
               ptra->team,
712
               ptra->team,
713
               pr_place( ptra->place, ptra->flags.bad_times ),
713
               pr_place( ptra->place, ptra->flags.bad_times, ptra->flags.vet_check && (leg == 0) ),
714
               time_fa( ptra->lege[leg], ptra->flags.disqualified ) );
714
               time_fa( ptra->lege[leg], ptra->flags.disqualified ) );
715
    }
715
    }
716
    else
716
    else
717
    {
717
    {
718
        print( "%20s", "" );
718
        print( "%20s", "" );
Line 832... Line 832...
832
        **      - Place within complete field
832
        **      - Place within complete field
833
        **      - Team number - with HTML reference to team file
833
        **      - Team number - with HTML reference to team file
834
        **      - Class
834
        **      - Class
835
        */
835
        */
836
        if ( report_html == printed && lcount % 5 == 4 ) print_underline( TRUE );
836
        if ( report_html == printed && lcount % 5 == 4 ) print_underline( TRUE );
837
        print( "%4.4s ", pn_place( team_buf.leg[0].l_place, ptr->flags.bad_times, ptr->flags.non_equestrian ) );
837
        print( "%4.4s ", pn_place( team_buf.leg[0].l_place, ptr->flags.bad_times, ptr->flags.vet_check, ptr->flags.non_equestrian ) );
838
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
838
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
839
        print( "%4d",  team_buf.numb );
839
        print( "%4d",  team_buf.numb );
840
        if ( report_html == html ) print( "</A>" );
840
        if ( report_html == html ) print( "</A>" );
841
 
841
 
842
        print( " %-*s", 3, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
842
        print( " %-*s", 3, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
Line 860... Line 860...
860
            }
860
            }
861
            else
861
            else
862
            {
862
            {
863
                print( "  %-8s %4.4s %4.4s",
863
                print( "  %-8s %4.4s %4.4s",
864
                    time_a( team_buf.leg[j].elapsed ),
864
                    time_a( team_buf.leg[j].elapsed ),
865
                    pr_place( team_buf.leg[j].l_place, ptr->flags.bad_times ),
865
                    pr_place( team_buf.leg[j].l_place, ptr->flags.bad_times, ptr->flags.vet_check && (j == 0) ),
866
                    pn_place( team_buf.leg[j].le_place,ptr->flags.bad_times, afterEquestrianLeg )
866
                    pn_place( team_buf.leg[j].le_place,ptr->flags.bad_times, ptr->flags.vet_check && (j == 0), afterEquestrianLeg )
867
                  );
867
                  );
868
            }
868
            }
869
        }
869
        }
870
 
870
 
871
       /*
871
       /*
Line 875... Line 875...
875
        */
875
        */
876
//        print( "  %-8s ",  time_a( team_buf.leg[0].elapsed ) );
876
//        print( "  %-8s ",  time_a( team_buf.leg[0].elapsed ) );
877
        print( "  %-8s ", time_a( ptr->lege[0] ) );
877
        print( "  %-8s ", time_a( ptr->lege[0] ) );
878
        
878
        
879
        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 );
879
        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 );
880
        print( "%-4.4s", pn_place( team_buf.leg[0].lc_place, ptr->flags.bad_times, ptr->flags.non_equestrian && 0 ) );
880
        print( "%-4.4s", pn_place( team_buf.leg[0].lc_place, ptr->flags.bad_times, ptr->flags.vet_check, ptr->flags.non_equestrian && 0 ) );
881
        if ( report_html == html ) print( "</A>" );
881
        if ( report_html == html ) print( "</A>" );
882
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
882
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
883
        lcount++;
883
        lcount++;
884
        print( "\n" );
884
        print( "\n" );
885
    }
885
    }
Line 980... Line 980...
980
        **      - Team number - with HTML reference to team file
980
        **      - Team number - with HTML reference to team file
981
        **      - Class
981
        **      - Class
982
        */
982
        */
983
 
983
 
984
        if ( report_html == printed && lcount %5 == 4 ) print_underline( TRUE );
984
        if ( report_html == printed && lcount %5 == 4 ) print_underline( TRUE );
985
        print( "%4.4s ", pn_place( team_buf.leg[0].lc_place, flags , eflags ) );
985
        print( "%4.4s ", pn_place( team_buf.leg[0].lc_place, flags , ptr->flags.vet_check, eflags ) );
986
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
986
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
987
        print( "%4d",  team_buf.numb );
987
        print( "%4d",  team_buf.numb );
988
        if ( report_html == html ) print( "</A>" );
988
        if ( report_html == html ) print( "</A>" );
989
        print( " %-*s", 3, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
989
        print( " %-*s", 3, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
990
 
990
 
Line 1001... Line 1001...
1001
                print( "  %-8s %4.4s %4.4s", "-- NE --", "NE","NE");
1001
                print( "  %-8s %4.4s %4.4s", "-- NE --", "NE","NE");
1002
            }
1002
            }
1003
            else
1003
            else
1004
            {
1004
            {
1005
                print( "  %-8s %4.4s %4.4s", time_a( team_buf.leg[j].elapsed ),
1005
                print( "  %-8s %4.4s %4.4s", time_a( team_buf.leg[j].elapsed ),
1006
                       pr_place( team_buf.leg[j].lc_place,  flags ),
1006
                       pr_place( team_buf.leg[j].lc_place,  flags, ptr->flags.vet_check && (j == 0) ),
1007
                       pn_place( team_buf.leg[j].lec_place, flags, afterEquestrianLeg ) );
1007
                       pn_place( team_buf.leg[j].lec_place, flags, ptr->flags.vet_check && (j == 0), afterEquestrianLeg ) );
1008
            }
1008
            }
1009
        }
1009
        }
1010
 
1010
 
1011
        /*
1011
        /*
1012
        **  Print the trailer
1012
        **  Print the trailer
Line 1015... Line 1015...
1015
        */
1015
        */
1016
        /* print( "  %-8s ", time_a( team_buf.leg[0].elapsed ) ); */
1016
        /* print( "  %-8s ", time_a( team_buf.leg[0].elapsed ) ); */
1017
        print( "  %-8s ", time_a( ptr->lege[0] ) );
1017
        print( "  %-8s ", time_a( ptr->lege[0] ) );
1018
 
1018
 
1019
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
1019
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
1020
        print( "%4.4s", pn_place( team_buf.leg[0].l_place, flags , ptr->flags.non_equestrian));
1020
        print( "%4.4s", pn_place( team_buf.leg[0].l_place, flags , ptr->flags.vet_check, ptr->flags.non_equestrian));
1021
        if ( report_html == html ) print( "</A>" );
1021
        if ( report_html == html ) print( "</A>" );
1022
 
1022
 
1023
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
1023
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
1024
        lcount++;
1024
        lcount++;
1025
        print( "\n" );
1025
        print( "\n" );
Line 1155... Line 1155...
1155
        **      - Place within complete field
1155
        **      - Place within complete field
1156
        **      - Team number - with HTML reference to team file
1156
        **      - Team number - with HTML reference to team file
1157
        **      - Class
1157
        **      - Class
1158
        */
1158
        */
1159
        if ( report_html == printed && lcount %5 == 4 ) print_underline( TRUE );
1159
        if ( report_html == printed && lcount %5 == 4 ) print_underline( TRUE );
1160
        print( "%4.4s ", pn_place( team_buf.leg[0].l_place, ptr->flags.bad_times, ptr->flags.non_equestrian ) );
1160
        print( "%4.4s ", pn_place( team_buf.leg[0].l_place, ptr->flags.bad_times, ptr->flags.vet_check, ptr->flags.non_equestrian ) );
1161
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
1161
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
1162
        print( "%4d",  team_buf.numb );
1162
        print( "%4d",  team_buf.numb );
1163
        if ( report_html == html ) print( "</A>" );
1163
        if ( report_html == html ) print( "</A>" );
1164
 
1164
 
1165
        print( " %-*s", 3, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
1165
        print( " %-*s", 3, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
Line 1183... Line 1183...
1183
            }
1183
            }
1184
            else
1184
            else
1185
            {
1185
            {
1186
                print( "  %-8s %4.4s %4.4s",
1186
                print( "  %-8s %4.4s %4.4s",
1187
                    time_a( team_buf.leg[j].elapsed ),
1187
                    time_a( team_buf.leg[j].elapsed ),
1188
                    pr_place( team_buf.leg[j].l_place, ptr->flags.bad_times ),
1188
                    pr_place( team_buf.leg[j].l_place, ptr->flags.bad_times, ptr->flags.vet_check && (j == 0) ),
1189
                    pn_place( team_buf.leg[j].le_place,ptr->flags.bad_times, afterEquestrianLeg )
1189
                    pn_place( team_buf.leg[j].le_place,ptr->flags.bad_times, ptr->flags.vet_check && (j == 0), afterEquestrianLeg )
1190
                  );
1190
                  );
1191
            }
1191
            }
1192
        }
1192
        }
1193
 
1193
 
1194
       /*
1194
       /*
Line 1198... Line 1198...
1198
        */
1198
        */
1199
//        print( "  %-8s ",  time_a( team_buf.leg[0].elapsed ) );
1199
//        print( "  %-8s ",  time_a( team_buf.leg[0].elapsed ) );
1200
        print( "  %-8s ", time_a( ptr->lege[0] ) );
1200
        print( "  %-8s ", time_a( ptr->lege[0] ) );
1201
        
1201
        
1202
        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 );
1202
        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 );
1203
        print( "%-4.4s", pn_place( team_buf.leg[0].lc_place, ptr->flags.bad_times, ptr->flags.non_equestrian && 0 ) );
1203
        print( "%-4.4s", pn_place( team_buf.leg[0].lc_place, ptr->flags.bad_times, ptr->flags.vet_check, ptr->flags.non_equestrian && 0 ) );
1204
        if ( report_html == html ) print( "</A>" );
1204
        if ( report_html == html ) print( "</A>" );
1205
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
1205
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
1206
        lcount++;
1206
        lcount++;
1207
        print( "\n" );
1207
        print( "\n" );
1208
    }
1208
    }
Line 2579... Line 2579...
2579
    if ( full )
2579
    if ( full )
2580
    {
2580
    {
2581
        print( "\nPlace numbers (LP and EP)\n" );
2581
        print( "\nPlace numbers (LP and EP)\n" );
2582
        print( "LP - Placing based on elapsed time within the leg.                Cat Plce - Placing within the category.\n" );
2582
        print( "LP - Placing based on elapsed time within the leg.                Cat Plce - Placing within the category.\n" );
2583
        print( "EP - Placing based on accumulated times to the end of that leg.   Fin Plce - Overall placing within the event.\n" );
2583
        print( "EP - Placing based on accumulated times to the end of that leg.   Fin Plce - Overall placing within the event.\n" );
2584
        print( "U  - Placing not available.\n" );
2584
        print( "U  - Placing not available.                                       V        - Failed Vet Check.\n" );
2585
    }
2585
    }
2586
 
2586
 
2587
    /*
2587
    /*
2588
     *  Insert the contents of the config.addendum file
2588
     *  Insert the contents of the config.addendum file
2589
     *  or a defualt message
2589
     *  or a defualt message
Line 2663... Line 2663...
2663
 *      of static team_buffers are maintained
2663
 *      of static team_buffers are maintained
2664
 *
2664
 *
2665
 *  Parameters:
2665
 *  Parameters:
2666
 *      num         place - if not bad_times
2666
 *      num         place - if not bad_times
2667
 *      disq        Disqualified flag
2667
 *      disq        Disqualified flag
-
 
2668
 *      vflag       Team is vet checked
2668
 *
2669
 *
2669
 *  Returns:
2670
 *  Returns:
2670
 *      This function returns a pointer to the character string for the
2671
 *      This function returns a pointer to the character string for the
2671
 *      number or a pointer to a bad_times string.
2672
 *      number or a pointer to a bad_times string.
2672
 *
2673
 *
2673
 *========================================================================*/
2674
 *========================================================================*/
2674
 
2675
 
2675
const char *pr_place( int num, int disq )
2676
const char *pr_place( int num, int disq, bool vflag )
2676
{
2677
{
2677
    static char store[2][5];                     /* 2 stores for 4 digit numbers */
2678
    static char store[2][5];                     /* 2 stores for 4 digit numbers */
2678
    static int  i = 0;                           /* Current index into store */
2679
    static int  i = 0;                           /* Current index into store */
2679
    static const char *dis = "U";
2680
    static const char *dis = "U";
-
 
2681
    static const char *vet = "V";
-
 
2682
 
-
 
2683
    if (vflag)
-
 
2684
        return (vet);
2680
 
2685
 
2681
    if( disq )
2686
    if( disq )
2682
        return ( dis );
2687
        return ( dis );
2683
 
2688
 
2684
    i++;
2689
    i++;
Line 2701... Line 2706...
2701
 *      of static team_buffers are maintained
2706
 *      of static team_buffers are maintained
2702
 *
2707
 *
2703
 *  Parameters:
2708
 *  Parameters:
2704
 *      num         place - if not bad_times
2709
 *      num         place - if not bad_times
2705
 *      disq        Disqualified flag
2710
 *      disq        Disqualified flag
-
 
2711
 *      vflag       Flag VetChecked team
2706
 *      flag        Flag NE data
2712
 *      flag        Flag NE data
2707
 *
2713
 *
2708
 *  Returns:
2714
 *  Returns:
2709
 *      This function returns a pointer to the character string for the
2715
 *      This function returns a pointer to the character string for the
2710
 *      number or a pointer to a bad_times string.
2716
 *      number or a pointer to a bad_times string.
2711
 *
2717
 *
2712
 *========================================================================*/
2718
 *========================================================================*/
2713
const char *pn_place( int num, int disq, bool flag )
2719
const char *pn_place( int num, int disq, bool vflag, bool flag )
2714
{
2720
{
2715
    static char store[2][5];                     /* 2 stores for 4 digit numbers */
2721
    static char store[2][5];                     /* 2 stores for 4 digit numbers */
2716
    static int  i = 0;                           /* Current index into store */
2722
    static int  i = 0;                           /* Current index into store */
2717
    static const char *dis = "U";
2723
    static const char *dis = "U";
2718
    static const char *alt = "NE";
2724
    static const char *alt = "NE";
-
 
2725
    static const char *vet = "V";
2719
 
2726
 
-
 
2727
    if (vflag)
-
 
2728
        return (vet);
2720
    if( disq )
2729
    if( disq )
2721
        return ( dis );
2730
        return ( dis );
2722
    if (flag)
2731
    if (flag)
2723
        return ( alt );
2732
        return ( alt );
2724
 
2733