--------------------------------------------------------------------------*/
| 2601 | |
| 2602 | /*--------------------------------------------------------------------------*/ |
| 2603 | int cmListFileLexer_SetString(cmListFileLexer* lexer, const char* text) |
| 2604 | { |
| 2605 | int result = 1; |
| 2606 | cmListFileLexerDestroy(lexer); |
| 2607 | if (text) { |
| 2608 | int length = (int)strlen(text); |
| 2609 | lexer->string_buffer = (char*)malloc(length + 1); |
| 2610 | if (lexer->string_buffer) { |
| 2611 | strcpy(lexer->string_buffer, text); |
| 2612 | lexer->string_position = lexer->string_buffer; |
| 2613 | lexer->string_left = length; |
| 2614 | } else { |
| 2615 | result = 0; |
| 2616 | } |
| 2617 | } |
| 2618 | cmListFileLexerInit(lexer); |
| 2619 | return result; |
| 2620 | } |
| 2621 | |
| 2622 | /*--------------------------------------------------------------------------*/ |
| 2623 | cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer* lexer) |
nothing calls this directly
no test coverage detected