Subversion Repositories svn1

Rev

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

Rev 361 Rev 370
Line 185... Line 185...
185
            **      - Team number - with Xref back to full result
185
            **      - Team number - with Xref back to full result
186
            **      - Full team name
186
            **      - Full team name
187
            **      - Full categoray name - with Xref to category results
187
            **      - Full categoray name - with Xref to category results
188
            **      - Country name
188
            **      - Country name
189
            */
189
            */
190
            if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
190
            if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
191
            print( "%4d",       team_buf.numb );
191
            print( "%4d",       team_buf.numb );
192
            if ( report_html == html ) print( "</A>" );
-
 
193
 
192
 
194
            print( " %-*s ",     MAX_TM_NAME, team_buf.name );
193
            print( " %-*s ",     MAX_TM_NAME, team_buf.name );
195
 
194
 
196
            if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">",url_encode(p_filename(filebase, config.team_class[team_buf.teamclass - 1].abr ,"html")), team_buf.numb );
195
            if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">",url_encode(p_filename(filebase, config.team_class[team_buf.teamclass - 1].abr ,"html")), team_buf.numb );
197
            print( "%-*s",     LEN_CLASS_NAME, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].full_name );
196
            print( "%-*s",     LEN_CLASS_NAME, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].full_name );
198
            if ( report_html == html ) print( "</A>" );
-
 
199
 
197
 
200
            print( " %-*s",     config.num_countries == 0 ? 1 : LEN_CNTRY_NAME,
198
            print( " %-*s",     config.num_countries == 0 ? 1 : LEN_CNTRY_NAME,
201
                                config.num_countries == 0
199
                                config.num_countries == 0
202
                                || team_buf.country ==
200
                                || team_buf.country ==
203
                                0 ? "" : config.country_name[team_buf.country - 1].full_name );
201
                                0 ? "" : config.country_name[team_buf.country - 1].full_name );
Line 303... Line 301...
303
     * Print out the header
301
     * Print out the header
304
     */
302
     */
305
    print( "\n" );
303
    print( "\n" );
306
 
304
 
307
    print_underline( TRUE );
305
    print_underline( TRUE );
308
    print( "%-*s %-*s %-*s %-*s", MAX_TM_NAME + 5, "Competitor name",
306
    print( "%-*s %*s %*s %-*s", MAX_TM_NAME + 5, "Competitor name",
309
               6, "Leg",
307
               6, "Leg",
310
               5, "Team",
308
               5, "Team",
311
               LEN_CLASS_NAME, "Category"
309
               LEN_CLASS_NAME, "Category"
312
               );
310
               );
313
    print_underline( FALSE ) ;
311
    print_underline( FALSE ) ;
Line 317... Line 315...
317
    for( k = 1; k <= sort_num_data; k++, ptr++ )
315
    for( k = 1; k <= sort_num_data; k++, ptr++ )
318
    {
316
    {
319
        print( "%-*s", MAX_TM_NAME + 5, ptr->name );
317
        print( "%-*s", MAX_TM_NAME + 5, ptr->name );
320
        print( " " );
318
        print( " " );
321
        
319
        
322
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), ptr->team );
320
        if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), ptr->team );
323
        print( "%-*d", 6, ptr->leg + 1 );
321
        print( "%*d", 6, ptr->leg + 1 );
324
        if ( report_html == html ) print( "</A>" );
-
 
325
        print( " " );
322
        print( " " );
326
 
323
 
327
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), ptr->team );
324
        if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), ptr->team );
328
        print( "%-*d", 5, ptr->team );
325
        print( "%*d", 5, ptr->team );
329
        if ( report_html == html ) print( "</A>" );
-
 
330
        print( " " );
326
        print( " " );
331
 
327
 
332
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">",(p_filename(filebase, config.team_class[ptr->teamclass - 1].abr ,"html")), ptr->team );
328
        if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">",(p_filename(filebase, config.team_class[ptr->teamclass - 1].abr ,"html")), ptr->team );
333
        print( "%-*s", LEN_CLASS_NAME, ptr->teamclass == 0 ? "" : config.team_class[ptr->teamclass - 1].abr );
329
        print( "%-*s", LEN_CLASS_NAME, ptr->teamclass == 0 ? "" : config.team_class[ptr->teamclass - 1].abr );
334
        if ( report_html == html ) print( "</A>" );
-
 
335
        print( " " );
330
        print( " " );
336
 
331
 
337
        if ( ptr->multi ) print( "* ");
332
        if ( ptr->multi ) print( "* ");
338
        print( "\n" );
333
        print( "\n" );
339
    }
334
    }
Line 828... Line 823...
828
        **      - Team number - with HTML reference to team file
823
        **      - Team number - with HTML reference to team file
829
        **      - Class
824
        **      - Class
830
        */
825
        */
831
        if ( report_html == printed && lcount % 5 == 4 ) print_underline( TRUE );
826
        if ( report_html == printed && lcount % 5 == 4 ) print_underline( TRUE );
832
        print( "%4.4s ", px_place( 0, team_buf.leg[0].l_place, false, true, ptr->flags ) );
827
        print( "%4.4s ", px_place( 0, team_buf.leg[0].l_place, false, true, ptr->flags ) );
833
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
828
        if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
834
        print( "%4d",  team_buf.numb );
829
        print( "%4d",  team_buf.numb );
835
        if ( report_html == html ) print( "</A>" );
-
 
836
 
830
 
837
        print( " %-*s", 3, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
831
        print( " %-*s", 3, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
838
 
832
 
839
        /*
833
        /*
840
        **  Print the per-leg data
834
        **  Print the per-leg data
Line 867... Line 861...
867
        **      - Total time
861
        **      - Total time
868
        **      - Category place - with reference to category file
862
        **      - Category place - with reference to category file
869
        */
863
        */
870
        if ( config.num_legs != 1 ) print( "  %-8s ", time_a( ptr->lege[0] ) );
864
        if ( config.num_legs != 1 ) print( "  %-8s ", time_a( ptr->lege[0] ) );
871
        
865
        
872
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">",url_encode(p_filename(filebase, config.team_class[team_buf.teamclass - 1].abr ,"html")), team_buf.numb );
866
        if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">",url_encode(p_filename(filebase, config.team_class[team_buf.teamclass - 1].abr ,"html")), team_buf.numb );
873
        print( "%4.4s", px_place( 0, team_buf.leg[0].lc_place, false, false, ptr->flags) );
867
        print( "%4.4s", px_place( 0, team_buf.leg[0].lc_place, false, false, ptr->flags) );
874
        if ( report_html == html ) print( "</A>" );
-
 
875
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
868
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
876
        lcount++;
869
        lcount++;
877
        print( "\n" );
870
        print( "\n" );
878
    }
871
    }
879
 
872
 
Line 974... Line 967...
974
        **      - Class
967
        **      - Class
975
        */
968
        */
976
 
969
 
977
        if ( report_html == printed && lcount %5 == 4 ) print_underline( TRUE );
970
        if ( report_html == printed && lcount %5 == 4 ) print_underline( TRUE );
978
        print( "%4.4s ", px_place( 0, team_buf.leg[0].lc_place, false, false, ptr->flags) );
971
        print( "%4.4s ", px_place( 0, team_buf.leg[0].lc_place, false, false, ptr->flags) );
979
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
972
        if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
980
        print( "%4d",  team_buf.numb );
973
        print( "%4d",  team_buf.numb );
981
        if ( report_html == html ) print( "</A>" );
-
 
982
        print( " %-*s", 3, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
974
        print( " %-*s", 3, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
983
 
975
 
984
        for( j = 1; j <= config.num_legs; j++ )
976
        for( j = 1; j <= config.num_legs; j++ )
985
        {
977
        {
986
            bool isEquestrianLeg = (j == config.equestrian_leg && (ptr->teamclass == config.nonequestrian_class || ptr->flags.non_equestrian));
978
            bool isEquestrianLeg = (j == config.equestrian_leg && (ptr->teamclass == config.nonequestrian_class || ptr->flags.non_equestrian));
Line 1006... Line 998...
1006
        **      - Total time
998
        **      - Total time
1007
        **      - Overall place - with reference to overall place file
999
        **      - Overall place - with reference to overall place file
1008
        */
1000
        */
1009
        if ( config.num_legs != 1 ) print( "  %-8s ", time_a( ptr->lege[0] ) );
1001
        if ( config.num_legs != 1 ) print( "  %-8s ", time_a( ptr->lege[0] ) );
1010
 
1002
 
1011
        if ( report_html == html )  print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
1003
        if ( report_html == html )  setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
1012
        print( "%4.4s", px_place( 0, team_buf.leg[0].l_place, false, true, ptr->flags));
1004
        print( "%4.4s", px_place( 0, team_buf.leg[0].l_place, false, true, ptr->flags));
1013
        if ( report_html == html )  print( "</A>" );
-
 
1014
 
1005
 
1015
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
1006
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
1016
        lcount++;
1007
        lcount++;
1017
        print( "\n" );
1008
        print( "\n" );
1018
    }
1009
    }
Line 1148... Line 1139...
1148
        **      - Team number - with HTML reference to team file
1139
        **      - Team number - with HTML reference to team file
1149
        **      - Class
1140
        **      - Class
1150
        */
1141
        */
1151
        if ( report_html == printed && lcount %5 == 4 ) print_underline( TRUE );
1142
        if ( report_html == printed && lcount %5 == 4 ) print_underline( TRUE );
1152
        print( "%4.4s ", px_place( 0, team_buf.leg[0].l_place, false, true, ptr->flags ) );
1143
        print( "%4.4s ", px_place( 0, team_buf.leg[0].l_place, false, true, ptr->flags ) );
1153
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
1144
        if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
1154
        print( "%4d",  team_buf.numb );
1145
        print( "%4d",  team_buf.numb );
1155
        if ( report_html == html ) print( "</A>" );
-
 
1156
 
1146
 
1157
        print( " %-*s", 3, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
1147
        print( " %-*s", 3, team_buf.teamclass == 0 ? "" : config.team_class[team_buf.teamclass - 1].abr );
1158
 
1148
 
1159
        /*
1149
        /*
1160
        **  Print the per-leg data
1150
        **  Print the per-leg data
Line 1187... Line 1177...
1187
        **      - Total time
1177
        **      - Total time
1188
        **      - Category place - with reference to category file
1178
        **      - Category place - with reference to category file
1189
        */
1179
        */
1190
       if ( config.num_legs != 1 ) print( "  %-8s ", time_a( ptr->lege[0] ) );
1180
       if ( config.num_legs != 1 ) print( "  %-8s ", time_a( ptr->lege[0] ) );
1191
        
1181
        
1192
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">",url_encode(p_filename(filebase, config.team_class[team_buf.teamclass - 1].abr ,"html")), team_buf.numb );
1182
        if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">",url_encode(p_filename(filebase, config.team_class[team_buf.teamclass - 1].abr ,"html")), team_buf.numb );
1193
        print( "%4.4s", px_place( 0, team_buf.leg[0].lc_place, false, false, ptr->flags ) );
1183
        print( "%4.4s", px_place( 0, team_buf.leg[0].lc_place, false, false, ptr->flags ) );
1194
        if ( report_html == html ) print( "</A>" );
-
 
1195
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
1184
        if ( report_html == printed && lcount %5 == 4 ) print_underline( FALSE );
1196
        lcount++;
1185
        lcount++;
1197
        print( "\n" );
1186
        print( "\n" );
1198
    }
1187
    }
1199
 
1188
 
Line 1280... Line 1269...
1280
    ty_s_data  *ptr;
1269
    ty_s_data  *ptr;
1281
    team_type   team_buf;
1270
    team_type   team_buf;
1282
    int         last_class;
1271
    int         last_class;
1283
    char    solid_line[100];
1272
    char    solid_line[100];
1284
    bool header_done = false;
1273
    bool header_done = false;
-
 
1274
    bool entryFound;
-
 
1275
 
1285
 
1276
 
1286
    /*
1277
    /*
1287
    **  Calculate Summary information
1278
    **  Calculate Summary information
1288
    **  Should cache the data
1279
    **  Should cache the data
1289
    */
1280
    */
Line 1325... Line 1316...
1325
                winmax = valid;
1316
                winmax = valid;
1326
        }
1317
        }
1327
 
1318
 
1328
        print( "\n");
1319
        print( "\n");
1329
        print( "    ");
1320
        print( "    ");
1330
        if ( report_html == html ) print( "<A HREF=\"#%s\">",url_encode(config.team_class[j-1].full_name));
1321
        if ( report_html == html ) setHref( "<A HREF=\"#%s\">",url_encode(config.team_class[j-1].full_name));
1331
        print( "%s",  tprintf( "%-*s", LEN_CLASS_NAME ,config.team_class[j-1].full_name ));
1322
        print( "%s",  tprintf( "%-*s", LEN_CLASS_NAME ,config.team_class[j-1].full_name ));
1332
        if ( report_html == html ) print( "</A>" );
-
 
1333
        print( "  %3d Awards", winmax );
1323
        print( "  %3d Awards", winmax );
1334
        if ( config.class_winners[j-1] != winmax )
1324
        if ( config.class_winners[j-1] != winmax )
1335
            print( " from a maximum of %3d", config.class_winners[j-1] );
1325
            print( " from a maximum of %3d", config.class_winners[j-1] );
1336
    }
1326
    }
1337
 
1327
 
Line 1360... Line 1350...
1360
                    winmax = valid;
1350
                    winmax = valid;
1361
            }
1351
            }
1362
 
1352
 
1363
            print( "\n");
1353
            print( "\n");
1364
            print( "    ");
1354
            print( "    ");
1365
            if ( report_html == html ) print( "<A HREF=\"#%s_NE\">",url_encode(config.team_class[j-1].full_name));
1355
            if ( report_html == html ) setHref( "<A HREF=\"#%s_NE\">",url_encode(config.team_class[j-1].full_name));
1366
            print( "%s",  tprintf( "%-*s", LEN_CLASS_NAME ,config.team_class[j-1].full_name ));
1356
            print( "%s",  tprintf( "%-*s", LEN_CLASS_NAME ,config.team_class[j-1].full_name ));
1367
            if ( report_html == html ) print( "</A>" );
-
 
1368
            print( "  %3d Awards", winmax );
1357
            print( "  %3d Awards", winmax );
1369
            if ( config.class_ne_winners[j-1] != winmax )
1358
            if ( config.class_ne_winners[j-1] != winmax )
1370
                print( " from a maximum of %3d", config.class_ne_winners[j-1] );
1359
                print( " from a maximum of %3d", config.class_ne_winners[j-1] );
1371
        }
1360
        }
1372
    }
1361
    }
Line 1377... Line 1366...
1377
    print( "\n");
1366
    print( "\n");
1378
    print( "Miscellaneous");
1367
    print( "Miscellaneous");
1379
 
1368
 
1380
        print( "\n");
1369
        print( "\n");
1381
        print( "    ");
1370
        print( "    ");
1382
        if ( report_html == html ) print( "<A HREF=\"#%s_by_cat\">",url_encode("Full Event"));
1371
        if ( report_html == html ) setHref( "<A HREF=\"#%s_by_cat\">",url_encode("Full Event"));
1383
        print( "%s",  tprintf( "%-*s", LEN_CLASS_NAME ,"Full Event"));
1372
        print( "%s",  tprintf( "%-*s", LEN_CLASS_NAME ,"Full Event"));
1384
        if ( report_html == html ) print( "</A>" );
-
 
1385
        print (" by Category");
1373
        print (" by Category");
1386
    
1374
    
1387
    if ( config.class_ne_winners_by_class )
1375
    if ( config.class_ne_winners_by_class )
1388
    {
1376
    {
1389
        print( "\n");
1377
        print( "\n");
1390
        print( "    ");
1378
        print( "    ");
1391
        if ( report_html == html ) print( "<A HREF=\"#%s_by_cat\">",url_encode(config.team_class[config.nonequestrian_class-1].full_name));
1379
        if ( report_html == html ) setHref( "<A HREF=\"#%s_by_cat\">",url_encode(config.team_class[config.nonequestrian_class-1].full_name));
1392
        print( "%s",  tprintf( "%-*s", LEN_CLASS_NAME ,config.team_class[config.nonequestrian_class-1].full_name ));
1380
        print( "%s",  tprintf( "%-*s", LEN_CLASS_NAME ,config.team_class[config.nonequestrian_class-1].full_name ));
1393
        if ( report_html == html ) print( "</A>" );
-
 
1394
        print (" by Category");
1381
        print (" by Category");
1395
    }
1382
    }
1396
 
1383
 
1397
 
1384
 
1398
    print( "\n");
1385
    print( "\n");
1399
    print( "    ");
1386
    print( "    ");
1400
    if ( report_html == html ) print( "<A HREF=\"#%s\">",url_encode("Hall Of Fame"));
1387
    if ( report_html == html ) setHref( "<A HREF=\"#%s\">",url_encode("Hall Of Fame"));
1401
    print( "%s",  "Hall Of Fame" );
1388
    print( "%s",  "Hall Of Fame" );
1402
    if ( report_html == html ) print( "</A>" );
-
 
1403
 
1389
 
1404
    if (config.awardsfilename[0])
1390
    if (config.awardsfilename[0])
1405
    {
1391
    {
1406
        print( "\n");
1392
        print( "\n");
1407
        print( "    ");
1393
        print( "    ");
1408
        if ( report_html == html ) print( "<A HREF=\"#%s\">",url_encode("Additional Awards"));
1394
        if ( report_html == html ) setHref( "<A HREF=\"#%s\">",url_encode("Additional Awards"));
1409
        print( "%s",  "Additional Awards" );
1395
        print( "%s",  "Additional Awards" );
1410
        if ( report_html == html ) print( "</A>" );
-
 
1411
    }
1396
    }
1412
 
1397
 
1413
    print( "\n");
1398
    print( "\n");
1414
    print( "    ");
1399
    print( "    ");
1415
    if ( report_html == html ) print( "<A HREF=\"#%s\">",url_encode("FASTEST"));
1400
    if ( report_html == html ) setHref( "<A HREF=\"#%s\">",url_encode("FASTEST"));
1416
    print( "%s",  "FASTEST" );
1401
    print( "%s",  "FASTEST" );
1417
    if ( report_html == html ) print( "</A>" );
-
 
1418
 
1402
 
1419
    /*
1403
    /*  ---------------------------- Awards for Teams ----
1420
    **  Sort the data by class
1404
    **  Sort the data by class
1421
    */
1405
    */
1422
    sort_team_data( 0, S_LC, true );     /* Generate class placement data */
1406
    sort_team_data( 0, S_LC, true );     /* Generate class placement data */
1423
    last_class = -1;                /* Invalid class to start with */
1407
    last_class = -1;                     /* Invalid class to start with */
1424
 
1408
 
1425
    /*
1409
    /*
1426
    **  Process each category
1410
    **  Process each category
1427
    */
1411
    */
1428
    print( "\n");
1412
    print( "\n");
-
 
1413
    entryFound = false;
1429
    for( j = 1; ; j++ )
1414
    for( j = 1; ; j++ )
1430
    {
1415
    {
1431
        if (!config.team_class[j - 1].abr[0])
1416
        if (!config.team_class[j - 1].abr[0])
1432
            continue;
1417
            continue;
1433
 
1418
 
Line 1435... Line 1420...
1435
        **  Tail for previous entry
1420
        **  Tail for previous entry
1436
        */
1421
        */
1437
        //if ( config.class_ne_winners_by_class && j == config.nonequestrian_class )
1422
        //if ( config.class_ne_winners_by_class && j == config.nonequestrian_class )
1438
        //    continue;
1423
        //    continue;
1439
 
1424
 
1440
        if ( j != 1 )
1425
        if ( j != 1 ) {
-
 
1426
            if (!entryFound) {
-
 
1427
                print( "\n");
-
 
1428
                print( "No winners awarded. Non eligable." );
-
 
1429
                if ( report_html == html ) print("<br>");
-
 
1430
            }
1441
            if ( report_html == html ) print( "<A HREF=\"#%s\">Awards Index</A>",url_encode("INDEX"));
1431
            if ( report_html == html ) print( "<A HREF=\"#%s\">Awards Index</A>",url_encode("INDEX"));
-
 
1432
        }
1442
 
1433
 
1443
        if ( j > config.num_class  )
1434
        if ( j > config.num_class  )
1444
            break;
1435
            break;
1445
 
1436
 
1446
        /*
1437
        /*
Line 1465... Line 1456...
1465
        else
1456
        else
1466
        {
1457
        {
1467
            print( "%s\n", solid_line);
1458
            print( "%s\n", solid_line);
1468
        }
1459
        }
1469
        print( "Category: ");
1460
        print( "Category: ");
1470
        if ( report_html == html ) print( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[j - 1].abr ,"html")));
1461
        if ( report_html == html ) setHref( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[j - 1].abr ,"html")));
1471
        print( "%s",  config.team_class[j-1].full_name );
1462
        print( "%s",  config.team_class[j-1].full_name );
1472
        if ( report_html == html ) print( "</A>" );
-
 
1473
 
1463
 
1474
        if ( config.class_winners[j-1] <= 0 )
1464
        if ( config.class_winners[j-1] <= 0 )
1475
        {
1465
        {
1476
            print( "\n");
1466
            print( "\n");
1477
            print( "No winners awarded" );
1467
            print( "No winners awarded" );
Line 1481... Line 1471...
1481
 
1471
 
1482
        /*
1472
        /*
1483
        **  Enties for 'n' the best teams as configured
1473
        **  Enties for 'n' the best teams as configured
1484
        */
1474
        */
1485
        windex = 0;                     /* Winners done */
1475
        windex = 0;                     /* Winners done */
-
 
1476
        entryFound = false;
1486
        unsigned int i;
1477
        unsigned int i;
1487
        for( ptr = sort_data, i = 0; i < sort_num; i++, ptr++ )
1478
        for( ptr = sort_data, i = 0; i < sort_num; i++, ptr++ )
1488
        {
1479
        {
1489
            if ( ptr->teamclass != j )
1480
            if ( ptr->teamclass != j )
1490
            {
1481
            {
Line 1509... Line 1500...
1509
 
1500
 
1510
                /*
1501
                /*
1511
                **  Count the entry
1502
                **  Count the entry
1512
                */
1503
                */
1513
                windex++;
1504
                windex++;
-
 
1505
                entryFound = true;
1514
 
1506
 
1515
                /*
1507
                /*
1516
                **  If printing an HTML report then we need to mark
1508
                **  If printing an HTML report then we need to mark
1517
                **  the entry with a reference so that we can link to it
1509
                **  the entry with a reference so that we can link to it
1518
                */
1510
                */
Line 1530... Line 1522...
1530
                **      - Full categoray name
1522
                **      - Full categoray name
1531
                */
1523
                */
1532
                print( "%s", placing(windex) );
1524
                print( "%s", placing(windex) );
1533
 
1525
 
1534
                print( "  Team Name: ");
1526
                print( "  Team Name: ");
1535
                if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
1527
                if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
1536
                print( "%-*s ",     MAX_TM_NAME, team_buf.name );
1528
                print( "%-*s ",     MAX_TM_NAME, team_buf.name );
1537
                    if ( report_html == html ) print( "</A>" );
-
 
1538
 
1529
 
1539
                print( "  Number: ");
1530
                print( "  Number: ");
1540
                if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
1531
                if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
1541
                print( "%4d",       team_buf.numb );
1532
                print( "%4d",       team_buf.numb );
1542
                if ( report_html == html ) print( "</A>" );
-
 
1543
 
1533
 
1544
 
1534
 
1545
                for( k = 0; k < MAX_MEMB; k++ )
1535
                for( k = 0; k < MAX_MEMB; k++ )
1546
                {
1536
                {
1547
 
1537
 
Line 1593... Line 1583...
1593
 
1583
 
1594
        /*
1584
        /*
1595
        **  Only process the Non Equestrian teams in this pass
1585
        **  Only process the Non Equestrian teams in this pass
1596
        */
1586
        */
1597
        print( "\n");
1587
        print( "\n");
-
 
1588
        entryFound = false;
1598
        for( j = 1; ; j++ )
1589
        for( j = 1; ; j++ )
1599
        {
1590
        {
1600
            if (!config.team_class[j - 1].abr[0])
1591
            if (!config.team_class[j - 1].abr[0])
1601
                continue;
1592
                continue;
1602
 
1593
 
Line 1604... Line 1595...
1604
            **  Tail for previous entry
1595
            **  Tail for previous entry
1605
            */
1596
            */
1606
            if ( j == config.nonequestrian_class)
1597
            if ( j == config.nonequestrian_class)
1607
                continue;
1598
                continue;
1608
 
1599
 
1609
            if ( j != 1 )
1600
            if ( j != 1 ) {
-
 
1601
                if (!entryFound) {
-
 
1602
                    print( "\n");
-
 
1603
                    print( "No winners awarded. Non eligable." );
-
 
1604
                    if ( report_html == html ) print("<br>");
-
 
1605
                }
1610
                if ( report_html == html ) print( "<A HREF=\"#%s\">Awards Index</A>",url_encode("INDEX"));
1606
                if ( report_html == html ) print( "<A HREF=\"#%s\">Awards Index</A>",url_encode("INDEX"));
-
 
1607
            }
1611
 
1608
 
1612
            if ( j > config.num_class  )
1609
            if ( j > config.num_class  )
1613
                break;
1610
                break;
1614
 
1611
 
1615
            /*
1612
            /*
Line 1633... Line 1630...
1633
            else
1630
            else
1634
            {
1631
            {
1635
                print( "%s\n", solid_line);
1632
                print( "%s\n", solid_line);
1636
            }
1633
            }
1637
            print( "Category: ");
1634
            print( "Category: ");
1638
            if ( report_html == html ) print( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[config.nonequestrian_class - 1].abr ,"html")));
1635
            if ( report_html == html ) setHref( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[config.nonequestrian_class - 1].abr ,"html")));
1639
            print( "%s",  config.team_class[config.nonequestrian_class-1].full_name );
1636
            print( "%s",  config.team_class[config.nonequestrian_class-1].full_name );
1640
            if ( report_html == html ) print( "</A>" );
-
 
1641
 
1637
 
1642
            print (" :: ");
1638
            print (" :: ");
1643
 
1639
 
1644
            if ( report_html == html ) print( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[j - 1].abr ,"html")));
1640
            if ( report_html == html ) setHref( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[j - 1].abr ,"html")));
1645
            print( "%s",  config.team_class[j-1].full_name );
1641
            print( "%s",  config.team_class[j-1].full_name );
1646
            if ( report_html == html ) print( "</A>" );
-
 
1647
 
1642
 
1648
            if ( config.class_ne_winners[j-1] <= 0 )
1643
            if ( config.class_ne_winners[j-1] <= 0 )
1649
            {
1644
            {
1650
                print( "\n");
1645
                print( "\n");
1651
                print( "No winners awarded" );
1646
                print( "No winners awarded" );
Line 1654... Line 1649...
1654
            }
1649
            }
1655
 
1650
 
1656
            /*
1651
            /*
1657
            **  Enties for 'n' the best teams as configured
1652
            **  Enties for 'n' the best teams as configured
1658
            */
1653
            */
-
 
1654
            entryFound = false;
1659
            windex = 0;                     /* Winners done */
1655
            windex = 0;                     /* Winners done */
1660
            unsigned int i;
1656
            unsigned int i;
1661
            for( ptr = sort_data, i = 0; i < sort_num; i++, ptr++ )
1657
            for( ptr = sort_data, i = 0; i < sort_num; i++, ptr++ )
1662
            {
1658
            {
1663
                if ( ptr->teamclass != config.nonequestrian_class ||  ptr->real_teamclass != j )
1659
                if ( ptr->teamclass != config.nonequestrian_class ||  ptr->real_teamclass != j )
Line 1683... Line 1679...
1683
 
1679
 
1684
                    /*
1680
                    /*
1685
                    **  Count the entry
1681
                    **  Count the entry
1686
                    */
1682
                    */
1687
                    windex++;
1683
                    windex++;
-
 
1684
                    entryFound = true;
1688
 
1685
 
1689
                    /*
1686
                    /*
1690
                    **  If printing an HTML report then we need to mark
1687
                    **  If printing an HTML report then we need to mark
1691
                    **  the entry with a reference so that we can link to it
1688
                    **  the entry with a reference so that we can link to it
1692
                    */
1689
                    */
Line 1704... Line 1701...
1704
                    **      - Full categoray name
1701
                    **      - Full categoray name
1705
                    */
1702
                    */
1706
                    print( "%s", placing(windex) );
1703
                    print( "%s", placing(windex) );
1707
 
1704
 
1708
                    print( "  Team Name: ");
1705
                    print( "  Team Name: ");
1709
                    if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
1706
                    if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
1710
                    print( "%-*s ",     MAX_TM_NAME, team_buf.name );
1707
                    print( "%-*s ",     MAX_TM_NAME, team_buf.name );
1711
                        if ( report_html == html ) print( "</A>" );
-
 
1712
 
1708
 
1713
                    print( "  Number: ");
1709
                    print( "  Number: ");
1714
                    if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
1710
                    if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
1715
                    print( "%4d",       team_buf.numb );
1711
                    print( "%4d",       team_buf.numb );
1716
                    if ( report_html == html ) print( "</A>" );
-
 
1717
 
1712
 
1718
 
1713
 
1719
                    for( k = 0; k < MAX_MEMB; k++ )
1714
                    for( k = 0; k < MAX_MEMB; k++ )
1720
                    {
1715
                    {
1721
 
1716
 
Line 1865... Line 1860...
1865
        g_record( stats.fast.team[i][0], &team_buf );
1860
        g_record( stats.fast.team[i][0], &team_buf );
1866
 
1861
 
1867
        print( "\n");
1862
        print( "\n");
1868
        print( "    %-13s ", config.leg_name[i - 1] );
1863
        print( "    %-13s ", config.leg_name[i - 1] );
1869
        print( "  Name: ");
1864
        print( "  Name: ");
1870
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
1865
        if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), team_buf.numb );
1871
        print( "%-*s", MAX_PERSON_NAME, team_buf.members[i-1].name );
1866
        print( "%-*s", MAX_PERSON_NAME, team_buf.members[i-1].name );
1872
        if ( report_html == html ) print( "</A>" );
-
 
1873
        print( "  Team:");
1867
        print( "  Team:");
1874
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
1868
        if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "finish" ,"html")), team_buf.numb );
1875
        print( "%4d" , stats.fast.team[i][0] );
1869
        print( "%4d" , stats.fast.team[i][0] );
1876
        if ( report_html == html ) print( "</A> " );
-
 
1877
        print( "  Time:%s ", time_a( stats.fast.time[i][0] ) );
1870
        print( "  Time:%s ", time_a( stats.fast.time[i][0] ) );
1878
 
1871
 
1879
    }
1872
    }
1880
 
1873
 
1881
    if ( report_html == html ) print( "\n");
1874
    if ( report_html == html ) print( "\n");
Line 2521... Line 2514...
2521
                j = 0;                           /* Leg-0 last */
2514
                j = 0;                           /* Leg-0 last */
2522
            else
2515
            else
2523
                break;
2516
                break;
2524
        }
2517
        }
2525
 
2518
 
2526
        if ( report_html == html ) print( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), stats.fast.team[j][c] );
2519
        if ( report_html == html ) setHref( "<A HREF=\"%s#Team_%04d\">", url_encode(p_filename(filebase, "name" ,"html")), stats.fast.team[j][c] );
2527
        print( "%4d",  stats.fast.team[j][c] );
2520
        print( "%4d",  stats.fast.team[j][c] );
2528
        if ( report_html == html ) print( "</A>" );
-
 
2529
        print( " %s  ", time_a( stats.fast.time[j][c] ) );
2521
        print( " %s  ", time_a( stats.fast.time[j][c] ) );
2530
        if ( config.num_legs == 1 ) break;
2522
        if ( config.num_legs == 1 ) break;
2531
    }
2523
    }
2532
    print( "\n" );
2524
    print( "\n" );
2533
 
2525
 
Line 2587... Line 2579...
2587
    for( i = 1, count = 0; i <= config.num_class; i++ )
2579
    for( i = 1, count = 0; i <= config.num_class; i++ )
2588
    {
2580
    {
2589
        if (!config.team_class[i - 1].abr[0])
2581
        if (!config.team_class[i - 1].abr[0])
2590
            continue;
2582
            continue;
2591
 
2583
 
2592
        if ( report_html == html ) print( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[i - 1].abr ,"html")) );
2584
        if ( report_html == html ) setHref( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[i - 1].abr ,"html")) );
2593
        print( "%-*s", 3, config.team_class[i - 1].abr );
2585
        print( "%-*s", 3, config.team_class[i - 1].abr );
2594
        if ( report_html == html ) print( "</A>" );
-
 
2595
        print( " : %-*s  ", LEN_CLASS_NAME, config.team_class[i - 1].full_name );
2586
        print( " : %-*s  ", LEN_CLASS_NAME, config.team_class[i - 1].full_name );
2596
 
2587
 
2597
        if( !( ++count % 5 ) )
2588
        if( !( ++count % 5 ) )
2598
            print( "\n" );
2589
            print( "\n" );
2599
    }
2590
    }
Line 2601... Line 2592...
2601
    /*
2592
    /*
2602
    **  Add link to the finish order report
2593
    **  Add link to the finish order report
2603
    */
2594
    */
2604
    if ( report_html == html )
2595
    if ( report_html == html )
2605
    {
2596
    {
2606
        print( "<A HREF=\"%s\">", url_encode(p_filename(filebase, "finish" ,"html")) );
2597
        setHref( "<A HREF=\"%s\">", url_encode(p_filename(filebase, "finish" ,"html")) );
2607
        print( "%-*s", 3, "All" );
2598
        print( "%-*s", 3, "All" );
2608
        print( "</A>" );
-
 
2609
        print( " : %-*s  ", LEN_CLASS_NAME, "Finishing Order" );
2599
        print( " : %-*s  ", LEN_CLASS_NAME, "Finishing Order" );
2610
    }
2600
    }
2611
 
2601
 
2612
    /*
2602
    /*
2613
    **  Country data - if countries have been defined
2603
    **  Country data - if countries have been defined
Line 3047... Line 3037...
3047
        **  Suppress the display
3037
        **  Suppress the display
3048
        */
3038
        */
3049
        if ( config.nonequestrian_class == i+1  )
3039
        if ( config.nonequestrian_class == i+1  )
3050
            continue;
3040
            continue;
3051
 
3041
 
3052
        if ( report_html == html ) print( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[i].abr ,"html")) );
3042
        if ( report_html == html ) setHref( "<A HREF=\"%s\">",url_encode(p_filename(filebase, config.team_class[i].abr ,"html")) );
3053
        print( "%*s ", LEN_CLASS_NAME, config.team_class[i].full_name );
3043
        print( "%*s ", LEN_CLASS_NAME, config.team_class[i].full_name );
3054
        if ( report_html == html ) print( "</A>" );
-
 
3055
 
3044
 
3056
        print( ": %-7d %-7d %-7d %-7d %-7d %-7d %-7d\n",
3045
        print( ": %-7d %-7d %-7d %-7d %-7d %-7d %-7d\n",
3057
                                          data.teamclass[i+1].total,
3046
                                          data.teamclass[i+1].total,
3058
                                          data.teamclass[i+1].valid,
3047
                                          data.teamclass[i+1].valid,
3059
                                          data.teamclass[i+1].disqualified,
3048
                                          data.teamclass[i+1].disqualified,