Subversion Repositories svn1

Rev

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

Rev 272 Rev 284
Line 1104... Line 1104...
1104
    int winmax;
1104
    int winmax;
1105
    ty_s_data  *ptr;
1105
    ty_s_data  *ptr;
1106
    team_type   team_buf;
1106
    team_type   team_buf;
1107
    int         last_class;
1107
    int         last_class;
1108
    char    solid_line[100];
1108
    char    solid_line[100];
-
 
1109
    bool header_done = false;
1109
 
1110
 
1110
    /*
1111
    /*
1111
    **  Calculate Summary information
1112
    **  Calculate Summary information
1112
    **  Should cache the data
1113
    **  Should cache the data
1113
    */
1114
    */
Line 1128... Line 1129...
1128
    if ( report_html == html )
1129
    if ( report_html == html )
1129
    {
1130
    {
1130
        print( "<hr>" );
1131
        print( "<hr>" );
1131
        print( "<A NAME=\"%s\"></A>",url_encode("INDEX"));
1132
        print( "<A NAME=\"%s\"></A>",url_encode("INDEX"));
1132
    }
1133
    }
1133
    print( "Award Categories");
1134
    print( "Award Categories - Full Event");
1134
 
1135
 
1135
    for( j = 1; j <= config.num_class; j++ )
1136
    for( j = 1; j <= config.num_class; j++ )
1136
    {
1137
    {
1137
        /*
1138
        /*
1138
        **  Header for the class
1139
        **  Header for the class
Line 1140... Line 1141...
1140
        if ( config.class_winners[j-1] <= 0 )
1141
        if ( config.class_winners[j-1] <= 0 )
1141
            continue;
1142
            continue;
1142
 
1143
 
1143
        winmax = config.class_winners[j-1];
1144
        winmax = config.class_winners[j-1];
1144
        {
1145
        {
1145
            int valid =   sdata.teamclass[j].valid;
1146
            int valid =   sdata.teamclass[j].valid_ev;
1146
            if ( valid < winmax )
1147
            if ( valid < winmax )
1147
                winmax = valid;
1148
                winmax = valid;
1148
        }
1149
        }
1149
 
1150
 
1150
        print( "\n");
1151
        print( "\n");
Line 1153... Line 1154...
1153
        print( "%s",  tprintf( "%-*s", LEN_CLASS_NAME ,config.team_class[j-1].full_name ));
1154
        print( "%s",  tprintf( "%-*s", LEN_CLASS_NAME ,config.team_class[j-1].full_name ));
1154
        if ( report_html == html ) print( "</A>" );
1155
        if ( report_html == html ) print( "</A>" );
1155
        print( "  %3d Awards", winmax );
1156
        print( "  %3d Awards", winmax );
1156
        if ( config.class_winners[j-1] != winmax )
1157
        if ( config.class_winners[j-1] != winmax )
1157
            print( " from a maximum of %3d", config.class_winners[j-1] );
1158
            print( " from a maximum of %3d", config.class_winners[j-1] );
-
 
1159
    }
-
 
1160
 
-
 
1161
    /*
-
 
1162
    **  NE Award Categories
-
 
1163
    */
-
 
1164
    if ( config.class_ne_winners_by_class )
-
 
1165
    {
-
 
1166
        print( "\n");
-
 
1167
        print( "Award Categories - Non Equestrian");
-
 
1168
 
-
 
1169
        for( j = 1; j <= config.num_class; j++ )
-
 
1170
        {
-
 
1171
            /*
-
 
1172
            **  Header for the class
-
 
1173
            */
-
 
1174
            if ( config.class_ne_winners[j-1] <= 0 )
-
 
1175
                continue;
-
 
1176
 
-
 
1177
            winmax = config.class_ne_winners[j-1];
-
 
1178
            {
-
 
1179
                int valid =   sdata.teamclass[j].valid_ne;
-
 
1180
                if ( valid < winmax )
-
 
1181
                    winmax = valid;
-
 
1182
            }
1158
 
1183
 
-
 
1184
            print( "\n");
-
 
1185
            print( "    ");
-
 
1186
            if ( report_html == html ) print( "<A HREF=\"#%s_NE\">",url_encode(config.team_class[j-1].full_name));
-
 
1187
            print( "%s",  tprintf( "%-*s", LEN_CLASS_NAME ,config.team_class[j-1].full_name ));
-
 
1188
            if ( report_html == html ) print( "</A>" );
-
 
1189
            print( "  %3d Awards", winmax );
-
 
1190
            if ( config.class_ne_winners[j-1] != winmax )
-
 
1191
                print( " from a maximum of %3d", config.class_ne_winners[j-1] );
-
 
1192
        }
1159
    }
1193
    }
1160
 
1194
 
1161
    /*
1195
    /*
1162
    **  Manual entries
1196
    **  Manual entries
1163
    */
1197
    */
-
 
1198
    print( "\n");
-
 
1199
    print( "Miscellaneous");
-
 
1200
 
-
 
1201
        print( "\n");
-
 
1202
        print( "    ");
-
 
1203
        if ( report_html == html ) print( "<A HREF=\"#%s_by_cat\">",url_encode("Full Event"));
-
 
1204
        print( "%s",  tprintf( "%-*s", LEN_CLASS_NAME ,"Full Event"));
-
 
1205
        if ( report_html == html ) print( "</A>" );
-
 
1206
        print (" by Category");
-
 
1207
    
1164
    if ( config.class_ne_winners_by_class )
1208
    if ( config.class_ne_winners_by_class )
1165
    {
1209
    {
1166
        print( "\n");
1210
        print( "\n");
1167
        print( "    ");
1211
        print( "    ");
1168
        if ( report_html == html ) print( "<A HREF=\"#%s_by_cat\">",url_encode(config.team_class[config.nonequestrian_class-1].full_name));
1212
        if ( report_html == html ) print( "<A HREF=\"#%s_by_cat\">",url_encode(config.team_class[config.nonequestrian_class-1].full_name));
Line 1213... Line 1257...
1213
        */
1257
        */
1214
        print( "\n");
1258
        print( "\n");
1215
        if ( report_html == html )
1259
        if ( report_html == html )
1216
        {
1260
        {
1217
            print( "<hr>" );
1261
            print( "<hr>" );
-
 
1262
 
-
 
1263
            if ( !header_done )
-
 
1264
            {
-
 
1265
                header_done = true;
-
 
1266
                if ( report_html == html )
-
 
1267
                {
-
 
1268
                    print( "<A name=\"%s_by_cat\"></A>",url_encode("Full Event"));
-
 
1269
                }
-
 
1270
            }
-
 
1271
 
1218
            print( "<A name=\"%s\"></A>",url_encode(config.team_class[j-1].full_name));
1272
            print( "<A name=\"%s\"></A>",url_encode(config.team_class[j-1].full_name));
1219
        }
1273
        }
1220
        else
1274
        else
1221
        {
1275
        {
1222
            print( "%s\n", solid_line);
1276
            print( "%s\n", solid_line);
Line 1228... Line 1282...
1228
 
1282
 
1229
        if ( config.class_winners[j-1] <= 0 )
1283
        if ( config.class_winners[j-1] <= 0 )
1230
        {
1284
        {
1231
            print( "\n");
1285
            print( "\n");
1232
            print( "No winners awarded" );
1286
            print( "No winners awarded" );
-
 
1287
            if ( report_html == html ) print("<br>");
1233
            continue;
1288
            continue;
1234
        }
1289
        }
1235
 
1290
 
1236
        /*
1291
        /*
1237
        **  Enties for 'n' the best teams as configured
1292
        **  Enties for 'n' the best teams as configured
Line 1335... Line 1390...
1335
    /*
1390
    /*
1336
    ** Non Equestrian winners by category
1391
    ** Non Equestrian winners by category
1337
    */
1392
    */
1338
    if ( config.class_ne_winners_by_class)
1393
    if ( config.class_ne_winners_by_class)
1339
    {
1394
    {
1340
        bool header_done = false;
1395
        header_done = false;
1341
 
1396
 
1342
        /*
1397
        /*
1343
        **  Sort the data by class with NE data sorted by real class
1398
        **  Sort the data by class with NE data sorted by real class
1344
        */
1399
        */
1345
        sort_team_data( 0, S_LC_NE );      /* Generate class placement data */
1400
        sort_team_data( 0, S_LC_NE );      /* Generate class placement data */
Line 1377... Line 1432...
1377
 
1432
 
1378
            print( "\n");
1433
            print( "\n");
1379
            if ( report_html == html )
1434
            if ( report_html == html )
1380
            {
1435
            {
1381
                print( "<hr>" );
1436
                print( "<hr>" );
1382
                print( "<A name=\"%s\"></A>",url_encode(config.team_class[j-1].full_name));
1437
                print( "<A name=\"%s_NE\"></A>",url_encode(config.team_class[j-1].full_name));
1383
            }
1438
            }
1384
            else
1439
            else
1385
            {
1440
            {
1386
                print( "%s\n", solid_line);
1441
                print( "%s\n", solid_line);
1387
            }
1442
            }
Line 2566... Line 2621...
2566
    for( i = config.min_team; i <= config.max_team; i++ )
2621
    for( i = config.min_team; i <= config.max_team; i++ )
2567
    {
2622
    {
2568
        if( valid_field( i ) && g_record( i, &team_buf ) )
2623
        if( valid_field( i ) && g_record( i, &team_buf ) )
2569
        {
2624
        {
2570
            bool valid = true;
2625
            bool valid = true;
-
 
2626
            bool valid_ne = true;
2571
 
2627
 
2572
            if ( team_buf.flags.disqualified )
2628
            if ( team_buf.flags.disqualified )
2573
            {
2629
            {
2574
                ptr->teamclass[team_buf.teamclass].disqualified++;
2630
                ptr->teamclass[team_buf.teamclass].disqualified++;
2575
                ptr->total.disqualified++;
2631
                ptr->total.disqualified++;
2576
                valid = false;
2632
                valid = false;
2577
 
-
 
-
 
2633
                valid_ne = false;
2578
            }
2634
            }
2579
 
2635
 
2580
            if ( team_buf.flags.vet_check )
2636
            if ( team_buf.flags.vet_check )
2581
            {
2637
            {
2582
                ptr->teamclass[team_buf.teamclass].vet_check++;
2638
                ptr->teamclass[team_buf.teamclass].vet_check++;
2583
                ptr->total.vet_check++;
2639
                ptr->total.vet_check++;
2584
                valid = false;
2640
                valid = false;
-
 
2641
                valid_ne = false;
2585
            }
2642
            }
2586
 
2643
 
2587
            if ( config.nonequestrian_class && team_buf.flags.non_equestrian )
2644
            if ( config.nonequestrian_class && team_buf.flags.non_equestrian )
2588
            {
2645
            {
2589
                ptr->teamclass[team_buf.teamclass].non_equestrian++;
2646
                ptr->teamclass[team_buf.teamclass].non_equestrian++;
2590
                ptr->total.non_equestrian++;
2647
                ptr->total.non_equestrian++;
2591
                valid = false;
2648
                valid = false;
2592
            }
2649
            }
-
 
2650
            else
-
 
2651
            {
-
 
2652
                valid_ne = false;
-
 
2653
            }
2593
 
2654
 
2594
            ptr->total.total++;
2655
            ptr->total.total++;
2595
            ptr->teamclass[team_buf.teamclass].total++;
2656
            ptr->teamclass[team_buf.teamclass].total++;
2596
            if ( valid )
2657
            if ( valid )
2597
            {
2658
            {
2598
                ptr->total.valid++;
2659
                ptr->total.valid++;
2599
                ptr->teamclass[team_buf.teamclass].valid++;
2660
                ptr->teamclass[team_buf.teamclass].valid++;
-
 
2661
 
-
 
2662
                if ( ! team_buf.flags.bad_times )
-
 
2663
                {
-
 
2664
                    ptr->total.valid_ev++;
-
 
2665
                    ptr->teamclass[team_buf.teamclass].valid_ev++;
-
 
2666
                }
-
 
2667
            }
-
 
2668
 
-
 
2669
            if ( valid_ne )
-
 
2670
            {
-
 
2671
                if ( ! team_buf.flags.bad_times )
-
 
2672
                {
-
 
2673
                    ptr->total.valid_ne++;
-
 
2674
                    ptr->teamclass[team_buf.teamclass].valid_ne++;
-
 
2675
                }
2600
            }
2676
            }
2601
        }
2677
        }
2602
    }
2678
    }
2603
 
2679
 
2604
    /*
2680
    /*
Line 2667... Line 2743...
2667
 
2743
 
2668
    /*
2744
    /*
2669
    **  Display summary stats
2745
    **  Display summary stats
2670
    */
2746
    */
2671
 
2747
 
2672
    print( "%*s : %-7s %-7s%-7s%-7s%-7s\n",
2748
    print( "%*s : %-7s %-7s %-7s %-7s %-7s %-7s %-7s\n",
2673
                                      LEN_CLASS_NAME, "Category",
2749
                                      LEN_CLASS_NAME, "Category",
2674
                                      "Total",
2750
                                      "Total",
2675
                                      "Valid",
2751
                                      "Valid",
2676
                                      "Disq",
2752
                                      "Disq",
2677
                                      "NonEq",
2753
                                      "NonEq",
2678
                                      "VetChck"
2754
                                      "VetChk",
-
 
2755
                                      "CompEv",
-
 
2756
                                      "CompNe"
2679
                                       );
2757
                                       );
2680
 
2758
 
2681
    for( i = 0; i < config.num_class; i++ )
2759
    for( i = 0; i < config.num_class; i++ )
2682
    {
2760
    {
2683
        /*
2761
        /*
Line 2689... Line 2767...
2689
 
2767
 
2690
        if ( report_html == html ) print( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[i].abr ,"html")) );
2768
        if ( report_html == html ) print( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[i].abr ,"html")) );
2691
        print( "%*s ", LEN_CLASS_NAME, config.team_class[i].full_name );
2769
        print( "%*s ", LEN_CLASS_NAME, config.team_class[i].full_name );
2692
        if ( report_html == html ) print( "</A>" );
2770
        if ( report_html == html ) print( "</A>" );
2693
 
2771
 
2694
        print( ": %-7d %-7d %-7d%-7d %-7d\n",
2772
        print( ": %-7d %-7d %-7d %-7d %-7d %-7d %-7d\n",
2695
                                          data.teamclass[i+1].total,
2773
                                          data.teamclass[i+1].total,
2696
                                          data.teamclass[i+1].valid,
2774
                                          data.teamclass[i+1].valid,
2697
                                          data.teamclass[i+1].disqualified,
2775
                                          data.teamclass[i+1].disqualified,
2698
                                          data.teamclass[i+1].non_equestrian,
2776
                                          data.teamclass[i+1].non_equestrian,
2699
                                          data.teamclass[i+1].vet_check
2777
                                          data.teamclass[i+1].vet_check,
-
 
2778
                                          data.teamclass[i+1].valid_ev,
-
 
2779
                                          data.teamclass[i+1].valid_ne
2700
                                          );
2780
                                          );
2701
    }
2781
    }
2702
 
2782
 
2703
    print( "\n" );
2783
    print( "\n" );
2704
    print( "%*s : %-7d %-7d %-7d%-7d %-7d\n",
2784
    print( "%*s : %-7d %-7d %-7d%-7d %-7d %-7d %-7d\n",
2705
                                      LEN_CLASS_NAME, "Totals",
2785
                                      LEN_CLASS_NAME, "Totals",
2706
                                      data.total.total,
2786
                                      data.total.total,
2707
                                      data.total.valid,
2787
                                      data.total.valid,
2708
                                      data.total.disqualified,
2788
                                      data.total.disqualified,
2709
                                      data.total.non_equestrian,
2789
                                      data.total.non_equestrian,
2710
                                      data.total.vet_check
2790
                                      data.total.vet_check,
-
 
2791
                                      data.total.valid_ev,
-
 
2792
                                      data.total.valid_ne
2711
                                      );
2793
                                      );
2712
 
2794
 
2713
    close_printer();
2795
    close_printer();
2714
}
2796
}
2715
 
2797