Subversion Repositories svn1-original

Rev

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

Rev 295 Rev 317
Line 982... Line 982...
982
    /*
982
    /*
983
    **  Pickup missed classes and create a report
983
    **  Pickup missed classes and create a report
984
    */
984
    */
985
    for( j = 1; j <= config.num_class; j++ )
985
    for( j = 1; j <= config.num_class; j++ )
986
    {
986
    {
987
        if ( class_done[j] )
987
        if ( class_done[j] || !config.team_class[j-1].abr[0] )
988
        {
988
        {
989
            continue;
989
            continue;
990
        }
990
        }
991
 
-
 
992
        report_title = tprintf( "Category results for : %-*s", LEN_CLASS_NAME, config.team_class[j - 1].full_name );
991
        report_title = tprintf( "Category results for : %-*s", LEN_CLASS_NAME, config.team_class[j - 1].full_name );
993
        
992
        
994
        if( !open_printer( "", config.team_class[j - 1].abr, 132, report_html, report_title ) )
993
        if( !open_printer( "", config.team_class[j - 1].abr, 132, report_html, report_title ) )
995
            continue;
994
            continue;
996
        print_class_header( j-1, TRUE );
995
        print_class_header( j-1, TRUE );
Line 1138... Line 1137...
1138
    for( j = 1; j <= config.num_class; j++ )
1137
    for( j = 1; j <= config.num_class; j++ )
1139
    {
1138
    {
1140
        /*
1139
        /*
1141
        **  Header for the class
1140
        **  Header for the class
1142
        */
1141
        */
-
 
1142
        if (!config.team_class[j - 1].abr[0])
-
 
1143
            continue;
1143
        if ( config.class_winners[j-1] <= 0 )
1144
        if (config.class_winners[j - 1] <= 0) 
1144
            continue;
1145
            continue;
1145
 
1146
 
1146
        winmax = config.class_winners[j-1];
1147
        winmax = config.class_winners[j-1];
1147
        {
1148
        {
1148
            int valid =   sdata.teamclass[j].valid_ev;
1149
            int valid =   sdata.teamclass[j].valid_ev;
Line 1171... Line 1172...
1171
        for( j = 1; j <= config.num_class; j++ )
1172
        for( j = 1; j <= config.num_class; j++ )
1172
        {
1173
        {
1173
            /*
1174
            /*
1174
            **  Header for the class
1175
            **  Header for the class
1175
            */
1176
            */
-
 
1177
            if (!config.team_class[j - 1].abr[0])
-
 
1178
                continue;
1176
            if ( config.class_ne_winners[j-1] <= 0 )
1179
            if ( config.class_ne_winners[j-1] <= 0 )
1177
                continue;
1180
                continue;
1178
 
1181
 
1179
            winmax = config.class_ne_winners[j-1];
1182
            winmax = config.class_ne_winners[j-1];
1180
            {
1183
            {
Line 1240... Line 1243...
1240
    **  Process each category
1243
    **  Process each category
1241
    */
1244
    */
1242
    print( "\n");
1245
    print( "\n");
1243
    for( j = 1; ; j++ )
1246
    for( j = 1; ; j++ )
1244
    {
1247
    {
-
 
1248
        if (!config.team_class[j - 1].abr[0])
-
 
1249
            continue;
-
 
1250
 
1245
        /*
1251
        /*
1246
        **  Tail for previous entry
1252
        **  Tail for previous entry
1247
        */
1253
        */
1248
        //if ( config.class_ne_winners_by_class && j == config.nonequestrian_class )
1254
        //if ( config.class_ne_winners_by_class && j == config.nonequestrian_class )
1249
        //    continue;
1255
        //    continue;
Line 1406... Line 1412...
1406
        **  Only process the Non Equestrian teams in this pass
1412
        **  Only process the Non Equestrian teams in this pass
1407
        */
1413
        */
1408
        print( "\n");
1414
        print( "\n");
1409
        for( j = 1; ; j++ )
1415
        for( j = 1; ; j++ )
1410
        {
1416
        {
-
 
1417
            if (!config.team_class[j - 1].abr[0])
-
 
1418
                continue;
-
 
1419
 
1411
            /*
1420
            /*
1412
            **  Tail for previous entry
1421
            **  Tail for previous entry
1413
            */
1422
            */
1414
            if ( j == config.nonequestrian_class)
1423
            if ( j == config.nonequestrian_class)
1415
                continue;
1424
                continue;
Line 1680... Line 1689...
1680
    print( "<tr><td>\n" );
1689
    print( "<tr><td>\n" );
1681
 
1690
 
1682
    print( "\n" );
1691
    print( "\n" );
1683
    for( j = 1; j <= config.num_class; j++ )
1692
    for( j = 1; j <= config.num_class; j++ )
1684
    {
1693
    {
-
 
1694
        if (!config.team_class[j - 1].abr[0])
-
 
1695
            continue;
1685
        pri_master_index_entry( config.team_class[j - 1].abr, tprintf("Category Results for: %s", config.team_class[j-1].full_name) );
1696
        pri_master_index_entry( config.team_class[j - 1].abr, tprintf("Category Results for: %s", config.team_class[j-1].full_name) );
1686
    }
1697
    }
1687
        
1698
        
1688
    print( "</TABLE>" );
1699
    print( "</TABLE>" );
1689
 
1700
 
Line 1709... Line 1720...
1709
 
1720
 
1710
    print( "\n" );
1721
    print( "\n" );
1711
    pri_master_index_entry( "summary", "Category Summary" );
1722
    pri_master_index_entry( "summary", "Category Summary" );
1712
    for( j = 1; j <= config.num_class; j++ )
1723
    for( j = 1; j <= config.num_class; j++ )
1713
    {
1724
    {
-
 
1725
        if (!config.team_class[j - 1].abr[0])
-
 
1726
            continue;
1714
        pri_master_index_entry( config.team_class[j - 1].abr, tprintf("Category Results for: %s", config.team_class[j-1].full_name) );
1727
        pri_master_index_entry( config.team_class[j - 1].abr, tprintf("Category Results for: %s", config.team_class[j-1].full_name) );
1715
    }
1728
    }
1716
#endif
1729
#endif
1717
    print( "<tr><td>\n" );
1730
    print( "<tr><td>\n" );
1718
 
1731
 
Line 2308... Line 2321...
2308
    print( "\n" );
2321
    print( "\n" );
2309
 
2322
 
2310
 
2323
 
2311
    for( i = 1, count = 0; i <= config.num_class; i++ )
2324
    for( i = 1, count = 0; i <= config.num_class; i++ )
2312
    {
2325
    {
-
 
2326
        if (!config.team_class[i - 1].abr[0])
-
 
2327
            continue;
2313
#if 0
2328
#if 0
2314
        /*
2329
        /*
2315
        **  Skip any non-equestrian class in the legend
2330
        **  Skip any non-equestrian class in the legend
2316
        **  Don't want to tell the general user whats goes on, unless we actually
2331
        **  Don't want to tell the general user whats goes on, unless we actually
2317
        **  creating the non-equestrian report.
2332
        **  creating the non-equestrian report.
Line 2765... Line 2780...
2765
                                      "CompNe"
2780
                                      "CompNe"
2766
                                       );
2781
                                       );
2767
 
2782
 
2768
    for( i = 0; i < config.num_class; i++ )
2783
    for( i = 0; i < config.num_class; i++ )
2769
    {
2784
    {
-
 
2785
        if (!config.team_class[i].abr[0])
-
 
2786
            continue;
2770
        /*
2787
        /*
2771
        **  The non-equestrian leg does not have any data
2788
        **  The non-equestrian leg does not have any data
2772
        **  Supress the display
2789
        **  Suppress the display
2773
        */
2790
        */
2774
        if ( config.nonequestrian_class == i+1  )
2791
        if ( config.nonequestrian_class == i+1  )
2775
            continue;
2792
            continue;
2776
 
2793
 
2777
        if ( report_html == html ) print( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[i].abr ,"html")) );
2794
        if ( report_html == html ) print( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[i].abr ,"html")) );
Line 3257... Line 3274...
3257
    */
3274
    */
3258
    num = config.max_team - config.min_team + 1 ;
3275
    num = config.max_team - config.min_team + 1 ;
3259
 
3276
 
3260
    /*
3277
    /*
3261
    **  Allow for non-equestrian teams - since some of the data is loaded twice
3278
    **  Allow for non-equestrian teams - since some of the data is loaded twice
3262
    **  Take a guess that at most 1/2 the teams will be non-equestrian
3279
    **  OLD: Take a guess that at most 1/2 the teams will be non-equestrian
-
 
3280
    **  NEW: Memory is cheap. Assume all teams could be non-equestrian
3263
    */
3281
    */
-
 
3282
    // OLD: num = num * 3 / 2;
3264
    num = num * 3 / 2;
3283
    num = num * 2;
3265
 
3284
 
3266
    sort_data = ( ty_s_data * ) calloc ( num , sizeof( ty_s_data ) );
3285
    sort_data = ( ty_s_data * ) calloc ( num , sizeof( ty_s_data ) );
3267
    sort_aux = ( ty_s_aux * ) calloc( num + 1, sizeof( ty_s_aux ) );
3286
    sort_aux = ( ty_s_aux * ) calloc( num + 1, sizeof( ty_s_aux ) );
3268
 
3287
 
3269
    if( sort_data == 0 || sort_aux == 0 )
3288
    if( sort_data == 0 || sort_aux == 0 )
Line 3455... Line 3474...
3455
            stats.team[j][ptr->teamclass]++;
3474
            stats.team[j][ptr->teamclass]++;
3456
        }
3475
        }
3457
    }
3476
    }
3458
 
3477
 
3459
    /*
3478
    /*
3460
     * Calculate the averages
3479
     * Calculate the averages 
-
 
3480
     *      Can ignore that fact that some categories don't exists
-
 
3481
     *      The results will be -1
3461
     */
3482
     */
3462
    for( k = 0; k <= config.num_legs; k++ )
3483
    for( k = 0; k <= config.num_legs; k++ )
3463
    {
3484
    {
3464
        for( j = 0; j <= config.num_class; j++ )
3485
        for( j = 0; j <= config.num_class; j++ )
3465
        {
3486
        {