mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
binpac: Initial import of Bro's binpac subdirectory from SVN r7088.
This commit is contained in:
parent
5a1c4fd5fe
commit
c8665318e6
113 changed files with 15630 additions and 0 deletions
42
tools/binpac/src/pac_output.h
Normal file
42
tools/binpac/src/pac_output.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
// $Id: pac_output.h 3225 2006-06-08 00:00:01Z vern $
|
||||
|
||||
#ifndef pac_output_h
|
||||
#define pac_output_h
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.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(const char *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