| Revision: | 1492 |
| Committed: | Fri Sep 24 16:27:58 2004 UTC (21 years, 1 month ago) by tim |
| Original Path: | trunk/OOPSE-2.0/src/io/LinkedCommand.cpp |
| File size: | 417 byte(s) |
| Log Message: | change the #include in source files |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | gezelter | 1490 | #include <stdlib.h> |
| 2 | #include <string.h> | ||
| 3 | |||
| 4 | tim | 1492 | #include "io/LinkedCommand.hpp" |
| 5 | gezelter | 1490 | |
| 6 | int LinkedCommand::match( char* the_text ){ | ||
| 7 | |||
| 8 | if( !strcmp( the_text, text ) ) return token; //search successful | ||
| 9 | else if( next != NULL ) return next->match( the_text ); // search the next | ||
| 10 | |||
| 11 | return 0; // search failed | ||
| 12 | } | ||
| 13 | |||
| 14 | void LinkedCommand::setValues( char* the_text, int the_token ){ | ||
| 15 | |||
| 16 | strcpy( text, the_text ); | ||
| 17 | token = the_token; | ||
| 18 | } |