| 659 | input(const Iter &first, const Iter &last) : cur_(first), end_(last), consumed_(false), line_(1) { |
| 660 | } |
| 661 | int getc() { |
| 662 | if (consumed_) { |
| 663 | if (*cur_ == '\n') { |
| 664 | ++line_; |
| 665 | } |
| 666 | ++cur_; |
| 667 | } |
| 668 | if (cur_ == end_) { |
| 669 | consumed_ = false; |
| 670 | return -1; |
| 671 | } |
| 672 | consumed_ = true; |
| 673 | return *cur_ & 0xff; |
| 674 | } |
| 675 | void ungetc() { |
| 676 | consumed_ = false; |
| 677 | } |
no outgoing calls
no test coverage detected