Some output now going through PrintBuffer
This commit is contained in:
@@ -96,22 +96,30 @@ private:
|
||||
// a newline (or any other weird control characters).
|
||||
void add_line(const char *line, int len);
|
||||
|
||||
// Return the line number beyond the end of the buffer.
|
||||
int last_line() const { return first_line_ + int(lines_.size()); }
|
||||
|
||||
// Get the specified line number.
|
||||
const std::string &nth(int n) const { return lines_[n - first_line_]; }
|
||||
|
||||
|
||||
public:
|
||||
PrintBuffer(util::WorldType wt);
|
||||
|
||||
// Get the current first line.
|
||||
int first_line() const { return first_line_; }
|
||||
|
||||
// Return the line number beyond the end of the buffer.
|
||||
int last_line() const { return first_line_ + int(lines_.size()); }
|
||||
|
||||
// Get the current first unchecked line.
|
||||
int first_unchecked() const { return first_unchecked_; }
|
||||
|
||||
// Get the specified line number.
|
||||
const std::string &nth(int n) const { return lines_[n - first_line_]; }
|
||||
|
||||
// Add a string. If the string doesn't end in a newline, a newline
|
||||
// is added. The string is broken into lines, and the lines are added
|
||||
// to the PrintBuffer.
|
||||
void add_string(const char *text, int len);
|
||||
void add_string(const std::string &s);
|
||||
|
||||
|
||||
// Discard lines up to but not including line N.
|
||||
void discard_upto(int n);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user