mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 02:58:20 +00:00
compiles. sill doesn't do much.
This commit is contained in:
parent
9c8b0dec3b
commit
3654060246
9 changed files with 117 additions and 29 deletions
|
@ -2,11 +2,47 @@
|
|||
#include "InputReaderAscii.h"
|
||||
#include "DebugLogger.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
InputReaderAscii::InputReaderAscii()
|
||||
{
|
||||
DBG_LOG(DBG_LOGGING, "input reader initialized");
|
||||
//DBG_LOG(DBG_LOGGING, "input reader initialized");
|
||||
file = 0;
|
||||
}
|
||||
|
||||
InputReaderAscii::~InputReaderAscii()
|
||||
{
|
||||
}
|
||||
|
||||
void InputReaderAscii::DoFinish()
|
||||
{
|
||||
}
|
||||
|
||||
bool InputReaderAscii::DoInit(string path, int num_fields,
|
||||
const LogField* const * fields)
|
||||
{
|
||||
fname = path;
|
||||
|
||||
file = new ifstream(path.c_str());
|
||||
if ( !file->is_open() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// try to read the header line...
|
||||
string line;
|
||||
if ( !getline(*file, line) )
|
||||
return false;
|
||||
|
||||
// split on tabs...
|
||||
istringstream ss(line);
|
||||
while ( ss ) {
|
||||
string s;
|
||||
if ( !getline(ss, s, '\t'))
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue