| 300 | **************************************************************************/ |
| 301 | |
| 302 | condition* find_ground(agent* thisAgent, explain_chunk_str* chunk, int number) |
| 303 | { |
| 304 | |
| 305 | condition* ground, *cond; |
| 306 | |
| 307 | ground = NIL; /* unnecessary, but gcc -Wall warns without it */ |
| 308 | for (cond = chunk->all_grounds; cond != NIL; cond = cond->next) |
| 309 | { |
| 310 | number--; |
| 311 | if (number == 0) |
| 312 | { |
| 313 | ground = cond; |
| 314 | } |
| 315 | } |
| 316 | if (number > 0) |
| 317 | { |
| 318 | print(thisAgent, "Could not find this condition.\n"); |
| 319 | return (NIL); |
| 320 | } |
| 321 | return (ground); |
| 322 | } |
| 323 | |
| 324 | /*************************************************************************** |
| 325 | * Function : explain_trace_chunk |
no test coverage detected