mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 15:18:20 +00:00
Move binpac code into the main Zeek repository
This is based on commit 48f75b5f6415fe9d597e3e991cec635b1bc400dc from the binpac repository.
This commit is contained in:
parent
a2680d5eca
commit
ff26835976
112 changed files with 14586 additions and 8 deletions
40
tools/binpac/src/pac_output.h
Normal file
40
tools/binpac/src/pac_output.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
#ifndef pac_output_h
|
||||
#define pac_output_h
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class OutputException {
|
||||
public:
|
||||
OutputException(const char* arg_msg);
|
||||
~OutputException();
|
||||
const char* errmsg() const { return msg.c_str(); }
|
||||
|
||||
protected:
|
||||
string msg;
|
||||
};
|
||||
|
||||
class Output {
|
||||
public:
|
||||
Output(string filename);
|
||||
~Output();
|
||||
|
||||
int println(const char* fmt, ...);
|
||||
int print(const char* fmt, ...);
|
||||
|
||||
int indent() const { return indent_; }
|
||||
|
||||
void inc_indent() { ++indent_; }
|
||||
void dec_indent() { --indent_; }
|
||||
|
||||
protected:
|
||||
int print(const char* fmt, va_list ap);
|
||||
|
||||
FILE* fp;
|
||||
int indent_;
|
||||
};
|
||||
|
||||
#endif /* pac_output_h */
|
Loading…
Add table
Add a link
Reference in a new issue