mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Reformat the world
This commit is contained in:
parent
194cb24547
commit
b2f171ec69
714 changed files with 35149 additions and 35203 deletions
|
@ -1,26 +1,24 @@
|
|||
#include "zeek/ScriptCoverageManager.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
#include <algorithm>
|
||||
|
||||
#include "zeek/Stmt.h"
|
||||
#include "zeek/Desc.h"
|
||||
#include "zeek/Reporter.h"
|
||||
#include "zeek/Stmt.h"
|
||||
#include "zeek/util.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace zeek::detail {
|
||||
|
||||
ScriptCoverageManager::ScriptCoverageManager()
|
||||
: ignoring(0), delim('\t')
|
||||
namespace zeek::detail
|
||||
{
|
||||
}
|
||||
|
||||
ScriptCoverageManager::ScriptCoverageManager() : ignoring(0), delim('\t') { }
|
||||
|
||||
ScriptCoverageManager::~ScriptCoverageManager()
|
||||
{
|
||||
|
@ -129,8 +127,7 @@ bool ScriptCoverageManager::WriteStats()
|
|||
return false;
|
||||
}
|
||||
|
||||
for ( list<Stmt*>::const_iterator it = stmts.begin();
|
||||
it != stmts.end(); ++it )
|
||||
for ( list<Stmt*>::const_iterator it = stmts.begin(); it != stmts.end(); ++it )
|
||||
{
|
||||
ODesc location_info;
|
||||
(*it)->GetLocationInfo()->Describe(&location_info);
|
||||
|
@ -146,15 +143,15 @@ bool ScriptCoverageManager::WriteStats()
|
|||
usage_map[location_desc] = (*it)->GetAccessCount();
|
||||
}
|
||||
|
||||
map<pair<string, string>, uint64_t >::const_iterator it;
|
||||
map<pair<string, string>, uint64_t>::const_iterator it;
|
||||
for ( it = usage_map.begin(); it != usage_map.end(); ++it )
|
||||
{
|
||||
fprintf(f, "%" PRIu64"%c%s%c%s\n", it->second, delim,
|
||||
it->first.first.c_str(), delim, it->first.second.c_str());
|
||||
fprintf(f, "%" PRIu64 "%c%s%c%s\n", it->second, delim, it->first.first.c_str(), delim,
|
||||
it->first.second.c_str());
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace zeek::detail
|
||||
} // namespace zeek::detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue