Subversion Repositories svn1-original

Rev

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

Rev 54 Rev 59
Line 985... Line 985...
985
        {
985
        {
986
            print( "<A NAME=\"Team_%04d\"></A>",team_buf.numb );
986
            print( "<A NAME=\"Team_%04d\"></A>",team_buf.numb );
987
        }
987
        }
988
 
988
 
989
        /*
989
        /*
990
        **  Print the basics
990
        **  Print the basics (Finishing order)
991
        **      - Place within complete field
991
        **      - Place within complete field
992
        **      - Team number - with HTML reference to team file
992
        **      - Team number - with HTML reference to team file
993
        **      - Class
993
        **      - Class
994
        */
994
        */
995
        print( "%4.4s ", pr_place_ne( team_buf.leg[0].l_place, ptr->flags.bad_times, ptr->flags.non_equestrian ) );
995
        print( "%4.4s ", pr_place( team_buf.leg[0].l_place, ptr->flags.bad_times ) );
996
        if ( report_html ) print( "<A HREF=\"%s#Team_%04d\">", p_filename(filebase, "name" ,"html"), team_buf.numb );
996
        if ( report_html ) print( "<A HREF=\"%s#Team_%04d\">", p_filename(filebase, "name" ,"html"), team_buf.numb );
997
        print( "%4d",  team_buf.numb );
997
        print( "%4d",  team_buf.numb );
998
        if ( report_html ) print( "</A>" );
998
        if ( report_html ) print( "</A>" );
999
 
999
 
1000
        print( " %-*s", 3, team_buf.class == 0 ? "" : config.team_class[team_buf.class - 1].abr );
1000
        print( " %-*s", 3, team_buf.class == 0 ? "" : config.team_class[team_buf.class - 1].abr );
Line 1016... Line 1016...
1016
            }
1016
            }
1017
            else
1017
            else
1018
            {
1018
            {
1019
                print( "  %-8s %4.4s %4.4s",
1019
                print( "  %-8s %4.4s %4.4s",
1020
                    time_a( team_buf.leg[j].elapsed ),
1020
                    time_a( team_buf.leg[j].elapsed ),
1021
                    pr_place_ne( team_buf.leg[j].l_place, ptr->flags.bad_times, ptr->flags.non_equestrian ),
1021
                    pr_place( team_buf.leg[j].l_place, ptr->flags.bad_times ),
1022
                    pr_place_ne( team_buf.leg[j].le_place,ptr->flags.bad_times, ptr->flags.non_equestrian )
1022
                    pr_place( team_buf.leg[j].le_place,ptr->flags.bad_times )
1023
                  );
1023
                  );
1024
            }
1024
            }
1025
        }
1025
        }
1026
 
1026
 
1027
       /*
1027
       /*
1028
        **  Print the trailer
1028
        **  Print the trailer (Finishing order)
1029
        **      - Total time
1029
        **      - Total time
1030
        **      - Category place - with reference to category file
1030
        **      - Category place - with reference to category file
1031
        */
1031
        */
1032
//        print( "  %-8s ",  time_a( team_buf.leg[0].elapsed ) );
1032
//        print( "  %-8s ",  time_a( team_buf.leg[0].elapsed ) );
1033
        print( "  %-8s ", time_a( ptr->lege[0] ) );
1033
        print( "  %-8s ", time_a( ptr->lege[0] ) );
Line 1105... Line 1105...
1105
        **      - Place within the class
1105
        **      - Place within the class
1106
        **      - Team number - with HTML reference to team file
1106
        **      - Team number - with HTML reference to team file
1107
        **      - Class
1107
        **      - Class
1108
        */
1108
        */
1109
 
1109
 
1110
        print( "%4.4s ", pr_place_ne( team_buf.leg[0].lc_place, ptr->flags.bad_times, ptr->flags.non_equestrian ) );
1110
        print( "%4.4s ", pr_place( team_buf.leg[0].lc_place, ptr->flags.bad_times ) );
1111
        if ( report_html ) print( "<A HREF=\"%s#Team_%04d\">", p_filename(filebase, "name" ,"html"), team_buf.numb );
1111
        if ( report_html ) print( "<A HREF=\"%s#Team_%04d\">", p_filename(filebase, "name" ,"html"), team_buf.numb );
1112
        print( "%4d",  team_buf.numb );
1112
        print( "%4d",  team_buf.numb );
1113
        if ( report_html ) print( "</A>" );
1113
        if ( report_html ) print( "</A>" );
1114
        print( " %-*s", 3, team_buf.class == 0 ? "" : config.team_class[team_buf.class - 1].abr );
1114
        print( " %-*s", 3, team_buf.class == 0 ? "" : config.team_class[team_buf.class - 1].abr );
1115
 
1115
 
Line 1123... Line 1123...
1123
                print( "  %-8s %4.4s %4.4s", "-- NE --", "NE","NE");
1123
                print( "  %-8s %4.4s %4.4s", "-- NE --", "NE","NE");
1124
            }
1124
            }
1125
            else
1125
            else
1126
            {
1126
            {
1127
                print( "  %-8s %4.4s %4.4s", time_a( team_buf.leg[j].elapsed ),
1127
                print( "  %-8s %4.4s %4.4s", time_a( team_buf.leg[j].elapsed ),
1128
                       pr_place_ne( team_buf.leg[j].lc_place,  ptr->flags.bad_times, ptr->flags.non_equestrian ),
1128
                       pr_place( team_buf.leg[j].lc_place,  ptr->flags.bad_times ),
1129
                       pr_place_ne( team_buf.leg[j].lec_place, ptr->flags.bad_times, ptr->flags.non_equestrian ) );
1129
                       pr_place( team_buf.leg[j].lec_place, ptr->flags.bad_times ) );
1130
            }
1130
            }
1131
        }
1131
        }
1132
 
1132
 
1133
        /*
1133
        /*
1134
        **  Print the trailer
1134
        **  Print the trailer
Line 1137... Line 1137...
1137
        */
1137
        */
1138
        /* print( "  %-8s ", time_a( team_buf.leg[0].elapsed ) ); */
1138
        /* print( "  %-8s ", time_a( team_buf.leg[0].elapsed ) ); */
1139
        print( "  %-8s ", time_a( ptr->lege[0] ) );
1139
        print( "  %-8s ", time_a( ptr->lege[0] ) );
1140
 
1140
 
1141
        if ( report_html ) print( "<A HREF=\"%s#Team_%04d\">", p_filename(filebase, "finish" ,"html"), team_buf.numb );
1141
        if ( report_html ) print( "<A HREF=\"%s#Team_%04d\">", p_filename(filebase, "finish" ,"html"), team_buf.numb );
1142
        print( "%4.4s", pr_place_ne( team_buf.leg[0].l_place, ptr->flags.bad_times | (ptr->class == config.nonequestrian_class), ptr->flags.non_equestrian ) );
1142
        print( "%4.4s", pr_place( team_buf.leg[0].l_place, ptr->flags.bad_times || (ptr->class == config.nonequestrian_class)));
1143
        if ( report_html ) print( "</A>" );
1143
        if ( report_html ) print( "</A>" );
1144
 
1144
 
1145
        print( "\n" );
1145
        print( "\n" );
1146
    }
1146
    }
1147
 
1147
 
Line 2191... Line 2191...
2191
    if ( full )
2191
    if ( full )
2192
    {
2192
    {
2193
        print( "\nPlace numbers (LP and EP)\n" );
2193
        print( "\nPlace numbers (LP and EP)\n" );
2194
        print( "LP - Placing based on elapsed time within the leg.                Cat Plce - Placing within the category.\n" );
2194
        print( "LP - Placing based on elapsed time within the leg.                Cat Plce - Placing within the category.\n" );
2195
        print( "EP - Placing based on accumulated times to the end of that leg.   Fin Plce - Overall placing within the event.\n" );
2195
        print( "EP - Placing based on accumulated times to the end of that leg.   Fin Plce - Overall placing within the event.\n" );
-
 
2196
        print( "U  - Placing not available.\n" );
2196
    }
2197
    }
2197
 
2198
 
2198
    /*
2199
    /*
2199
     *  Insert the contents of the config.addendum file
2200
     *  Insert the contents of the config.addendum file
2200
     *  or a defualt message
2201
     *  or a defualt message
Line 2306... Line 2307...
2306
 *      of static team_buffers are maintained
2307
 *      of static team_buffers are maintained
2307
 *
2308
 *
2308
 *  Parameters:
2309
 *  Parameters:
2309
 *      num         place - if not bad_times
2310
 *      num         place - if not bad_times
2310
 *      disq        Disqualified flag
2311
 *      disq        Disqualified flag
-
 
2312
 *      ne          Non Equestrian Flag
2311
 *
2313
 *
2312
 *  Returns:
2314
 *  Returns:
2313
 *      This function returns a pointer to the character string for the
2315
 *      This function returns a pointer to the character string for the
2314
 *      number or a pointer to a bad_times string.
2316
 *      number or a pointer to a bad_times string.
2315
 *
2317
 *
Line 2318... Line 2320...
2318
char *pr_place_ne( int num, int disq, int ne )
2320
char *pr_place_ne( int num, int disq, int ne )
2319
{
2321
{
2320
    static char store[2][5];                     /* 2 stores for 4 digit numbers */
2322
    static char store[2][5];                     /* 2 stores for 4 digit numbers */
2321
    static int  i = 0;                           /* Current index into store */
2323
    static int  i = 0;                           /* Current index into store */
2322
    static char *dis = "U";
2324
    static char *dis = "U";
2323
    static char *nes = "NE";
-
 
2324
 
2325
 
2325
    if ( ne )
-
 
2326
        return ( nes );
-
 
2327
    
-
 
2328
    if( disq )
2326
    if( disq && ! ne )
2329
        return ( dis );
2327
         return ( dis );
2330
 
2328
 
2331
    i++;
-
 
2332
    if( i >= 2 )
2329
    if( ++i >= 2 )
2333
        i = 0;                                   /* Select next entry */
2330
        i = 0;                                   /* Select next entry */
2334
    sprintf( store[i], "%4d", num );
2331
    sprintf( store[i], "%4d", num );
2335
    return ( store[i] );
2332
    return ( store[i] );
2336
 
2333
 
2337
}
2334
}