Subversion Repositories svn1-original

Rev

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

Rev 47 Rev 48
Line 1008... Line 1008...
1008
            /*
1008
            /*
1009
            **  Ensure that non-equestrian leg data is not displayed
1009
            **  Ensure that non-equestrian leg data is not displayed
1010
            */
1010
            */
1011
            if ( j == config.equestrian_leg && team_buf.flags.non_equestrian )
1011
            if ( j == config.equestrian_leg && team_buf.flags.non_equestrian )
1012
            {
1012
            {
1013
                print( "  %-8s %4.4s %4.4s", "-- NE --", "-","-");
1013
                print( "  %-8s %4.4s %4.4s", "-- NE --", "NE","NE");
1014
            }
1014
            }
1015
            else
1015
            else
1016
            {
1016
            {
1017
                print( "  %-8s %4.4s %4.4s",
1017
                print( "  %-8s %4.4s %4.4s",
1018
                    time_a( team_buf.leg[j].elapsed ),
1018
                    time_a( team_buf.leg[j].elapsed ),
Line 1025... Line 1025...
1025
       /*
1025
       /*
1026
        **  Print the trailer
1026
        **  Print the trailer
1027
        **      - Total time
1027
        **      - Total time
1028
        **      - Category place - with reference to category file
1028
        **      - Category place - with reference to category file
1029
        */
1029
        */
1030
        print( "  %-8s ",  time_a( team_buf.leg[0].elapsed ) );
1030
//        print( "  %-8s ",  time_a( team_buf.leg[0].elapsed ) );
-
 
1031
        print( "  %-8s ", time_a( ptr->lege[0] ) );
-
 
1032
        
1031
        if ( report_html ) print( "<A HREF=\"%s#Team_%04d\">",p_filename(filebase, config.team_class[team_buf.class - 1].abr ,"html"), team_buf.numb );
1033
        if ( report_html ) print( "<A HREF=\"%s#Team_%04d\">",p_filename(filebase, config.team_class[team_buf.class - 1].abr ,"html"), team_buf.numb );
1032
        print( "%-4.4s", pr_place_ne( team_buf.leg[0].lc_place, ptr->flags.bad_times, ptr->flags.non_equestrian ) );
1034
        print( "%-4.4s", pr_place_ne( team_buf.leg[0].lc_place, ptr->flags.bad_times, ptr->flags.non_equestrian ) );
1033
        if ( report_html ) print( "</A>" );
1035
        if ( report_html ) print( "</A>" );
1034
 
1036
 
1035
        print( "\n" );
1037
        print( "\n" );
Line 2717... Line 2719...
2717
    **  Note: NE also have bad_times set
2719
    **  Note: NE also have bad_times set
2718
    */
2720
    */
2719
 
2721
 
2720
    if( a->flags.bad_times || b->flags.bad_times )  /* Valid data has precedence */
2722
    if( a->flags.bad_times || b->flags.bad_times )  /* Valid data has precedence */
2721
    {
2723
    {
2722
        if( sort_mode == S_LE || sort_mode == S_L ) /* Sort NOT within a class */
2724
        if( a->flags.bad_times && b->flags.bad_times )
2723
        {
2725
        {
2724
            if( a->flags.non_equestrian || b->flags.non_equestrian )
2726
            if( sort_mode == S_LE || sort_mode == S_L ) /* Sort NOT within a class */
2725
            {
2727
            {
2726
                if( a->flags.non_equestrian && b->flags.non_equestrian )
2728
                if( a->flags.non_equestrian || b->flags.non_equestrian )
2727
                {
-
 
2728
                    /*
-
 
2729
                    **  Can't do much better in the overall report
-
 
2730
                    **  Need different information to sort NE entries
-
 
2731
                    */
-
 
2732
                    return ( a->team - b->team );
-
 
2733
                }
-
 
2734
                else
-
 
2735
                {
2729
                {
-
 
2730
                    if( a->flags.non_equestrian && b->flags.non_equestrian )
-
 
2731
                    {
-
 
2732
                        /*
-
 
2733
                        **  Both are non equestrian
-
 
2734
                        **  Let the time sort operate ...
-
 
2735
                        */
-
 
2736
    //                    return ( a->team - b->team );
-
 
2737
                    }
-
 
2738
                    else
-
 
2739
                    {
2736
                    /* Good times better than NE */
2740
                        /* Good times better than NE */
2737
                    return ( a->flags.bad_times ? 1 : -1 );
2741
                        return ( a->flags.non_equestrian ? -1 : 1 );
-
 
2742
                    }
2738
                }
2743
                }
2739
            }
2744
            }
-
 
2745
            else
-
 
2746
               return ( a->team - b->team );
2740
        }
2747
        }
2741
        
-
 
2742
 
-
 
2743
        if( a->flags.bad_times && b->flags.bad_times )
-
 
2744
            return ( a->team - b->team );
-
 
2745
        else
2748
        else
2746
            return ( a->flags.bad_times ? 1 : -1 );
2749
            return ( a->flags.bad_times ? 1 : -1 );
2747
    }
2750
    }
2748
 
2751
 
2749
 
2752
 
Line 2895... Line 2898...
2895
 
2898
 
2896
bool load_report_data(void)
2899
bool load_report_data(void)
2897
{
2900
{
2898
 
2901
 
2899
    ty_s_data  *ptr;                             /* pointer to sort data type */
2902
    ty_s_data  *ptr;                             /* pointer to sort data type */
-
 
2903
    ty_s_data  *last;
2900
    int         j;
2904
    int         j;
2901
    unsigned    num;
2905
    unsigned    num;
2902
 
2906
 
2903
    printf( "Loading team information - This will not hurt" );
2907
    printf( "Loading team information - This will not hurt" );
2904
    flush_out();
2908
    flush_out();
Line 2951... Line 2955...
2951
        if( valid_field( team ) )
2955
        if( valid_field( team ) )
2952
        {
2956
        {
2953
            g_record( team, &team_buf );
2957
            g_record( team, &team_buf );
2954
            if( team_buf.flags.valid )
2958
            if( team_buf.flags.valid )
2955
            {
2959
            {
-
 
2960
                last = ptr;
2956
                ptr->team = team;
2961
                ptr->team = team;
2957
                for( j = 0; j < MAX_LEGS + 1; j++ )
2962
                for( j = 0; j < MAX_LEGS + 1; j++ )
2958
                {
2963
                {
2959
                    ptr->lege[j] = team_buf.leg[j].elapsed;
2964
                    ptr->lege[j] = team_buf.leg[j].elapsed;
2960
                    ptr->leg[j] = team_buf.leg[j].end;
2965
                    ptr->leg[j] = team_buf.leg[j].end;
Line 2979... Line 2984...
2979
 
2984
 
2980
                    for( j = 0; j < MAX_LEGS + 1; j++ )
2985
                    for( j = 0; j < MAX_LEGS + 1; j++ )
2981
                    {
2986
                    {
2982
                        if ( j == config.equestrian_leg )
2987
                        if ( j == config.equestrian_leg )
2983
                        {
2988
                        {
2984
                            ptr->lege[j] = 0;
2989
                            last->lege[j] = ptr->lege[j] = 0;
2985
                            if ( config.equestrian_leg > 1 )
2990
                            if ( config.equestrian_leg > 1 )
2986
                                ptr->leg[j] = ptr->leg[j-1];
2991
                                last->leg[j] = ptr->leg[j] = ptr->leg[j-1];
2987
                        }
2992
                        }
2988
                        else
2993
                        else
2989
                        {
2994
                        {
2990
                            if ( j )
2995
                            if ( j )
2991
                                ptr->lege[j] = team_buf.leg[j].elapsed;
2996
                                last-> lege[j] = ptr->lege[j] = team_buf.leg[j].elapsed;
2992
                            ptr->leg[j] = team_buf.leg[j].end;
2997
                            last->leg[j] = ptr->leg[j] = team_buf.leg[j].end;
2993
                            ptr->lege[0] += ptr->lege[j] ;
2998
                            ptr->lege[0] += ptr->lege[j] ;
-
 
2999
                            last->lege[0] = ptr->lege[0] ;
2994
                        }
3000
                        }
2995
                    }
3001
                    }
2996
 
3002
 
2997
                    ptr->start = team_buf.leg[0].start;
3003
                    last->start = ptr->start = team_buf.leg[0].start;
2998
                    ptr->class = config.nonequestrian_class;
3004
                    ptr->class = config.nonequestrian_class;
2999
                    ptr->flags = team_buf.flags;
3005
                    ptr->flags = team_buf.flags;
3000
                    ptr->flags.disqualified = 0;
3006
                    ptr->flags.disqualified = 0;
-
 
3007
 
-
 
3008
 
3001
                    ptr++;
3009
                    ptr++;
3002
                    sort_num++;
3010
                    sort_num++;
3003
                }
3011
                }
3004
            }
3012
            }
3005
        }
3013
        }