mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Move all debugger code into the zeek::detail namespace
This commit is contained in:
parent
834b76f94f
commit
35c61697d9
17 changed files with 525 additions and 419 deletions
|
@ -37,7 +37,7 @@ int how_many_lines_in(const char* policy_filename)
|
|||
FILE* throwaway = fopen(policy_filename, "r");
|
||||
if ( ! throwaway )
|
||||
{
|
||||
debug_msg("No such policy file: %s.\n", policy_filename);
|
||||
zeek::detail::debug_msg("No such policy file: %s.\n", policy_filename);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ int how_many_lines_in(const char* policy_filename)
|
|||
match = policy_files.find(policy_filename);
|
||||
if ( match == policy_files.end() )
|
||||
{
|
||||
debug_msg("Policy file %s was not loaded.\n", policy_filename);
|
||||
zeek::detail::debug_msg("Policy file %s was not loaded.\n", policy_filename);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -69,14 +69,14 @@ bool LoadPolicyFileText(const char* policy_filename)
|
|||
|
||||
if ( ! f )
|
||||
{
|
||||
debug_msg("No such policy file: %s.\n", policy_filename);
|
||||
zeek::detail::debug_msg("No such policy file: %s.\n", policy_filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
PolicyFile* pf = new PolicyFile;
|
||||
|
||||
if ( policy_files.find(policy_filename) != policy_files.end() )
|
||||
debug_msg("Policy file %s already loaded\n", policy_filename);
|
||||
zeek::detail::debug_msg("Policy file %s already loaded\n", policy_filename);
|
||||
|
||||
policy_files.insert(PolicyFileMap::value_type(policy_filename, pf));
|
||||
|
||||
|
@ -129,7 +129,7 @@ bool PrintLines(const char* policy_filename, unsigned int start_line,
|
|||
FILE* throwaway = fopen(policy_filename, "r");
|
||||
if ( ! throwaway )
|
||||
{
|
||||
debug_msg("No such policy file: %s.\n", policy_filename);
|
||||
zeek::detail::debug_msg("No such policy file: %s.\n", policy_filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ bool PrintLines(const char* policy_filename, unsigned int start_line,
|
|||
match = policy_files.find(policy_filename);
|
||||
if ( match == policy_files.end() )
|
||||
{
|
||||
debug_msg("Policy file %s was not loaded.\n", policy_filename);
|
||||
zeek::detail::debug_msg("Policy file %s was not loaded.\n", policy_filename);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ bool PrintLines(const char* policy_filename, unsigned int start_line,
|
|||
|
||||
if ( start_line > pf->lines.size() )
|
||||
{
|
||||
debug_msg("Line number %d out of range; %s has %d lines\n",
|
||||
zeek::detail::debug_msg("Line number %d out of range; %s has %d lines\n",
|
||||
start_line, policy_filename, int(pf->lines.size()));
|
||||
return false;
|
||||
}
|
||||
|
@ -166,10 +166,10 @@ bool PrintLines(const char* policy_filename, unsigned int start_line,
|
|||
for ( unsigned int i = 0; i < how_many_lines; ++i )
|
||||
{
|
||||
if ( show_numbers )
|
||||
debug_msg("%d\t", i + start_line);
|
||||
zeek::detail::debug_msg("%d\t", i + start_line);
|
||||
|
||||
const char* line = pf->lines[start_line + i - 1];
|
||||
debug_msg("%s\n", line);
|
||||
zeek::detail::debug_msg("%s\n", line);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue