| Revision: | 11 |
| Committed: | Tue Jul 9 18:40:59 2002 UTC (23 years, 3 months ago) by mmeineke |
| File size: | 412 byte(s) |
| Log Message: | This commit was generated by cvs2svn to compensate for changes in r10, which included commits to RCS files with non-trunk default branches. |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | mmeineke | 10 | #include <cstdlib> |
| 2 | #include <cstring> | ||
| 3 | |||
| 4 | #include "LinkedCommand.hpp" | ||
| 5 | |||
| 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 | } |