Subversion Repositories svn1

Rev

Rev 71 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 71 Rev 72
Line 1271... Line 1271...
1271
{
1271
{
1272
    int j;
1272
    int j;
1273
    int i;
1273
    int i;
1274
    int k;
1274
    int k;
1275
    int windex;
1275
    int windex;
-
 
1276
    int winmax;
1276
    ty_s_data  *ptr;
1277
    ty_s_data  *ptr;
1277
    int         last_class;
1278
    int         last_class;
1278
    char    solid_line[100];
1279
    char    solid_line[100];
1279
 
1280
 
-
 
1281
    /*
-
 
1282
    **  Calculate Summary information
-
 
1283
    **  Should cache the data
-
 
1284
    */
-
 
1285
    t_class_summary sdata;
-
 
1286
    calc_class_summary( & sdata );
-
 
1287
    
-
 
1288
 
1280
    if( !open_printer( "", "awards", 80, report_html, "Prizes and Awards" ) )
1289
    if( !open_printer( "", "awards", 80, report_html, "Prizes and Awards" ) )
1281
        return;
1290
        return;
1282
 
1291
 
1283
    memset ( solid_line, 0, sizeof( solid_line ));
1292
    memset ( solid_line, 0, sizeof( solid_line ));
1284
    memset ( solid_line, '-', 80 );
1293
    memset ( solid_line, '-', 80 );
Line 1300... Line 1309...
1300
        **  Header for the class
1309
        **  Header for the class
1301
        */
1310
        */
1302
        if ( config.class_winners[j-1] <= 0 )
1311
        if ( config.class_winners[j-1] <= 0 )
1303
            continue;
1312
            continue;
1304
 
1313
 
-
 
1314
        winmax = config.class_winners[j-1];
-
 
1315
        {
-
 
1316
            int valid =   sdata.class[j].total
-
 
1317
                        - sdata.class[j].disqualified;
-
 
1318
//                        - sdata.class[j].non_equestrian;
-
 
1319
            if ( valid < winmax )
-
 
1320
                winmax = valid;
-
 
1321
        }
-
 
1322
 
1305
        print( "\n");
1323
        print( "\n");
1306
        print( "    ");
1324
        print( "    ");
1307
        if ( report_html ) print( "<A HREF=\"#%s\">",url_encode(config.team_class[j-1].full_name));
1325
        if ( report_html ) print( "<A HREF=\"#%s\">",url_encode(config.team_class[j-1].full_name));
1308
        print( "%s",  config.team_class[j-1].full_name );
1326
        print( "%s",  tprintf( "%-*s", LEN_CLASS_NAME ,config.team_class[j-1].full_name ));
1309
        if ( report_html ) print( "</A>" );
1327
        if ( report_html ) print( "</A>" );
-
 
1328
        print( "  %3d Awards", winmax );
-
 
1329
        if ( config.class_winners[j-1] != winmax )
-
 
1330
            print( " from a maximum of %3d", config.class_winners[j-1] );
-
 
1331
 
1310
    }
1332
    }
1311
 
1333
 
1312
    /*
1334
    /*
1313
    **  Manual entries
1335
    **  Manual entries
1314
    */
1336
    */
Line 1384... Line 1406...
1384
            /*
1406
            /*
1385
            **  Now read in the team record
1407
            **  Now read in the team record
1386
            */
1408
            */
1387
            if( valid_field( ptr->team ) && g_record( ptr->team, &team_buf ) )
1409
            if( valid_field( ptr->team ) && g_record( ptr->team, &team_buf ) )
1388
            {
1410
            {
-
 
1411
                /*
-
 
1412
                **  Ensure we have a valid team
-
 
1413
                **  Can't award disqualified teams
-
 
1414
                **  Can't award NE teams unless its a NE award
-
 
1415
                */
-
 
1416
                if ( ptr->flags.bad_times )
-
 
1417
                    break;
-
 
1418
 
-
 
1419
                if ( ptr->class != config.nonequestrian_class  && ptr->flags.non_equestrian )
-
 
1420
                    break;
-
 
1421
 
-
 
1422
                /*
-
 
1423
                **  Count the entry
-
 
1424
                */
1389
                windex++;
1425
                windex++;
1390
 
1426
 
1391
                /*
1427
                /*
1392
                **  If printing an HTML report then we need to mark
1428
                **  If printing an HTML report then we need to mark
1393
                **  the entry with a reference so that we can link to it
1429
                **  the entry with a reference so that we can link to it
Line 2009... Line 2045...
2009
    pri_csv_data();
2045
    pri_csv_data();
2010
    pri_summary();
2046
    pri_summary();
2011
    pri_awards_html();
2047
    pri_awards_html();
2012
    pri_awards();
2048
    pri_awards();
2013
    pri_master_index();
2049
    pri_master_index();
2014
   
2050
 
2015
    report_all = FALSE;
2051
    report_all = FALSE;
2016
}
2052
}
2017
 
2053
 
2018
 
2054
 
2019
/*========================================================================
2055
/*========================================================================