| 5 | // version v0 ... |
| 6 | |
| 7 | int WhichMatrix(istream & f) |
| 8 | { |
| 9 | string line; |
| 10 | while ( isspace(f.peek())) |
| 11 | f.get(); |
| 12 | if ( f.peek() =='#' ) |
| 13 | { |
| 14 | line=""; |
| 15 | while ( f.good() ) |
| 16 | { |
| 17 | char c=f.get(); |
| 18 | if(c=='\n' || c=='\r') { break;} |
| 19 | line += c; |
| 20 | } |
| 21 | if( line.find("(Morse)") != std::string::npos) |
| 22 | return 2; // morse |
| 23 | |
| 24 | else if( line.find("(COO)") != std::string::npos) |
| 25 | return 3; // morse |
| 26 | |
| 27 | return 0; |
| 28 | } |
| 29 | return 0; |
| 30 | } |
| 31 | |
| 32 | |
| 33 | template<class I,class R> |
no test coverage detected