mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
Merge remote-tracking branch 'origin/topic/bernhard/input-logging-commmon-functions'
* origin/topic/bernhard/input-logging-commmon-functions: add the last of Robins suggestions (separate info-struct for constructors). port memory leak fix from master harmonize function naming move AsciiInputOutput over to threading and thinking about it, ascii-io doesn't need the separator change constructors and factor stuff out the input framework too. factor out ascii input/output. std::string accessors to escape_sequence functionality intermediate commit - it has been over a month since I touched this... I cleaned up the AsciiInputOutput class somewhat, including renaming it to AsciiFormatter, renaming some of its methods, and turning the static methods into members for consistency. Closes #929.
This commit is contained in:
commit
762c034ec2
25 changed files with 807 additions and 597 deletions
|
@ -57,9 +57,13 @@ public:
|
|||
void AddEscapeSequence(const char* s) { escape_sequences.push_back(s); }
|
||||
void AddEscapeSequence(const char* s, size_t n)
|
||||
{ escape_sequences.push_back(string(s, n)); }
|
||||
void AddEscapeSequence(const string & s)
|
||||
{ escape_sequences.push_back(s); }
|
||||
void RemoveEscapeSequence(const char* s) { escape_sequences.remove(s); }
|
||||
void RemoveEscapeSequence(const char* s, size_t n)
|
||||
{ escape_sequences.remove(string(s, n)); }
|
||||
void RemoveEscapeSequence(const string & s)
|
||||
{ escape_sequences.remove(s); }
|
||||
|
||||
void PushIndent();
|
||||
void PopIndent();
|
||||
|
@ -114,6 +118,7 @@ public:
|
|||
|
||||
// Bypasses the escaping enabled via SetEscape().
|
||||
void AddRaw(const char* s, int len) { AddBytesRaw(s, len); }
|
||||
void AddRaw(const string &s) { AddBytesRaw(s.data(), s.size()); }
|
||||
|
||||
// Returns the description as a string.
|
||||
const char* Description() const { return (const char*) base; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue