Subversion Repositories svn1-original

Rev

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

Rev 370 Rev 371
Line 155... Line 155...
155
        int badData = 0;
155
        int badData = 0;
156
        team_type team_buf;
156
        team_type team_buf;
157
        if( valid_field( tm ) )
157
        if( valid_field( tm ) )
158
        {
158
        {
159
            g_record( tm, &team_buf );
159
            g_record( tm, &team_buf );
160
            if ( !team_buf.flags.disqualified && team_buf.flags.valid)
160
            if (team_buf.flags.valid)
161
            {
161
            {
162
                // Test for class not defined
162
                // Test for class not defined
163
                if ( cb_class->isChecked() && (team_buf.teamclass <= 0))
163
                if ( cb_class->isChecked() && (team_buf.teamclass <= 0))
164
                {
164
                {
165
                    addItem(tm, 0, QString("Team %1, No Class specified").arg(QString::number(tm) ) );
165
                    addItem(tm, 0, QString("Team %1, No Class specified").arg(QString::number(tm) ) );
Line 170... Line 170...
170
                {
170
                {
171
                    addItem(tm, 0, QString("Team %1, No Team Name specified").arg(QString::number(tm) ) );
171
                    addItem(tm, 0, QString("Team %1, No Team Name specified").arg(QString::number(tm) ) );
172
                    badData = 1;
172
                    badData = 1;
173
                }
173
                }
174
 
174
 
175
                // Test for NE Team with a team name
175
                if ( !team_buf.flags.disqualified )
176
                if ((cb_neNames->isChecked() || cb_eqNames->isChecked()) && config.equestrian_leg )
-
 
177
                {
-
 
178
                    int neindex = config.equestrian_leg - 1;
-
 
179
                    char *nptr = team_buf.members[neindex].name;
-
 
180
                    bool validTeamName = ( *nptr && strcmp(nptr, "0") != 0
-
 
181
                                        && strcmp(nptr, "-") != 0
-
 
182
                                        && stricmp(nptr, "N/A") != 0 );
-
 
183
 
-
 
184
                    if (cb_neNames->isChecked() && team_buf.flags.non_equestrian && validTeamName && stricmp(nptr, "NE") != 0 )
-
 
185
                    {
176
                    {
186
                        addItem(tm, 0, QString("Team %1, NE with named competitor: %2").arg(QString::number(tm)).arg(nptr) );
-
 
187
                        badData = 1;
177
                    // Test for NE Team with a team name
188
                    }
-
 
189
                    if (cb_eqNames->isChecked() && !team_buf.flags.non_equestrian && !validTeamName )
178
                    if ((cb_neNames->isChecked() || cb_eqNames->isChecked()) && config.equestrian_leg )
190
                    {
179
                    {
-
 
180
                        int neindex = config.equestrian_leg - 1;
-
 
181
                        char *nptr = team_buf.members[neindex].name;
-
 
182
                        bool validTeamName = ( *nptr && strcmp(nptr, "0") != 0
-
 
183
                                            && strcmp(nptr, "-") != 0
-
 
184
                                            && stricmp(nptr, "N/A") != 0 );
-
 
185
 
-
 
186
                        if (cb_neNames->isChecked() && team_buf.flags.non_equestrian && validTeamName && stricmp(nptr, "NE") != 0 )
-
 
187
                        {
-
 
188
                            addItem(tm, 0, QString("Team %1, NE with named competitor: %2").arg(QString::number(tm)).arg(nptr) );
-
 
189
                            badData = 1;
-
 
190
                        }
-
 
191
                        if (cb_eqNames->isChecked() && !team_buf.flags.non_equestrian && !validTeamName )
-
 
192
                        {
191
                        addItem(tm, 0, QString("Team %1, possible NE team").arg(QString::number(tm)) );
193
                            addItem(tm, 0, QString("Team %1, possible NE team").arg(QString::number(tm)) );
192
                        badData = 1;
194
                            badData = 1;
-
 
195
                        }
193
                    }
196
                    }
194
                }
-
 
195
 
197
 
196
                // Test Leg Data if required
198
                    // Test Leg Data if required
197
                if (cb_checkLegs->isChecked() && leg_end)
199
                    if (cb_checkLegs->isChecked() && leg_end)
198
                {
-
 
199
                    test_times( &team_buf, leg_end );
-
 
200
                    if( check_error.type > 0 )
-
 
201
                    {
200
                    {
-
 
201
                        test_times( &team_buf, leg_end );
-
 
202
                        if( check_error.type > 0 )
-
 
203
                        {
202
                        addItem(tm, check_error.leg, QString("Team %1, Leg %2: %3").arg(QString::number(tm)).arg(QString::number(check_error.leg)).arg(qck_err_mess[check_error.type]));
204
                            addItem(tm, check_error.leg, QString("Team %1, Leg %2: %3").arg(QString::number(tm)).arg(QString::number(check_error.leg)).arg(qck_err_mess[check_error.type]));
203
                        badData = 1;
205
                            badData = 1;
-
 
206
                        }
204
                    }
207
                    }
205
                }
208
                }
206
            }
209
            }
207
        }
210
        }
208
        else
211
        else